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C,OACL,SAAU,CACR,MAAMt+G,EAAM,gEACNu+G,EAAa,SAAS,cAAc,QAAQ,EACvCA,EAAA,aAAa,MAAOv+G,CAAG,EACzB,cAAK,YAAYu+G,CAAU,CACtC,EAEJ,CCnBA,eAAsBC,GAAcr/H,EAAU,CACxCA,EAAA,IAAI++H,IAAc,EAClB/+H,EAAA,IAAIm/H,IAAoB,EACxBn/H,EAAA,IAAImvC,IAAY,EAChBnvC,EAAA,IAAIgyC,IAAa,EACjBhyC,EAAA,IAAI,MAAMwnD,GAAA,CAAa,EACvBxnD,EAAA,IAAI6jE,IAAa,CACvB,CCTA,eAAey7D,IAAa,CACpB,MAAAt/H,EAAMob,GAAUmkH,EAAG,EAEzB,MAAMF,GAAcr/H,CAAG,EAEvBA,EAAI,IAAI0pB,EAAM,EAEd1pB,EAAI,MAAM,MAAM,CAClB,CAEAs/H,GAAW","names":["makeMap","str","expectsLowerCase","map","list","val","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","onRE","isOn","key","isModelListener","extend","remove","arr","el","i","hasOwnProperty","hasOwn","isArray","isMap","toTypeString","isSet","isDate","isFunction","isString","isSymbol","isObject","isPromise","objectToString","value","toRawType","isPlainObject","isIntegerKey","isReservedProp","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","looseToNumber","n","toNumber","_globalThis","getGlobalThis","normalizeStyle","res","item","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","ret","tmp","normalizeClass","name","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","looseCompareArrays","a","b","equal","looseEqual","aValidType","bValidType","aKeysCount","bKeysCount","aHasKey","bHasKey","looseIndexOf","toDisplayString","replacer","_key","entries","val2","activeEffectScope","EffectScope","detached","currentEffectScope","fromParent","l","last","effectScope","recordEffectScope","effect","scope","getCurrentScope","onScopeDispose","createDep","effects","dep","wasTracked","trackOpBit","newTracked","initDepMarkers","deps","finalizeDepMarkers","ptr","targetMap","effectTrackDepth","maxMarkerBits","activeEffect","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ReactiveEffect","scheduler","parent","lastShouldTrack","shouldTrack","cleanupEffect","effect2","trackStack","pauseTracking","resetTracking","track","target","type","depsMap","trackEffects","debuggerEventExtraInfo","shouldTrack2","trigger","newValue","oldTarget","newLength","key2","triggerEffects","triggerEffect","getDepFromReactive","object","_a","isNonTrackableKeys","builtInSymbols","get$1","createGetter","shallowGet","readonlyGet","arrayInstrumentations","createArrayInstrumentations","instrumentations","args","toRaw","isReadonly2","shallow","receiver","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","targetIsArray","isRef","readonly","reactive","set$1","createSetter","shallowSet","isReadonly","isShallow","hadKey","result","deleteProperty","has$1","ownKeys","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","toShallow","getProto","v","get","rawTarget","rawKey","has2","wrap","toReadonly","toReactive","has","size","add","set","get2","deleteEntry","clear","hadItems","createForEach","callback","thisArg","observed","createIterableMethod","method","targetIsMap","isPair","isKeyOnly","innerIterator","done","createReadonlyMethod","createInstrumentations","mutableInstrumentations2","shallowInstrumentations2","readonlyInstrumentations2","shallowReadonlyInstrumentations2","mutableInstrumentations","readonlyInstrumentations","shallowInstrumentations","shallowReadonlyInstrumentations","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","proxy","isReactive","isProxy","raw","markRaw","trackRefValue","ref2","triggerRefValue","newVal","r","ref","createRef","shallowRef","rawValue","RefImpl","__v_isShallow","useDirectValue","unref","toValue","source","shallowUnwrapHandlers","proxyRefs","objectWithRefs","CustomRefImpl","factory","customRef","toRefs","propertyToRef","ObjectRefImpl","_object","_defaultValue","GetterRefImpl","_getter","toRef","defaultValue","ComputedRefImpl","getter","_setter","isSSR","self","computed","getterOrOptions","debugOptions","setter","onlyGetter","callWithErrorHandling","instance","err","handleError","callWithAsyncErrorHandling","values","throwInDev","contextVNode","cur","exposedInstance","errorInfo","errorCapturedHooks","appErrorHandler","logError","isFlushing","isFlushPending","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","getId","queueJob","job","queueFlush","flushJobs","invalidateJob","queuePostFlushCb","cb","flushPreFlushCbs","seen","flushPostFlushCbs","deduped","comparator","diff","check","emit","event","rawArgs","props","modelArg","modifiersKey","number","trim","handlerName","handler","onceHandler","normalizeEmitsOptions","comp","appContext","asMixin","cached","hasExtends","extendEmits","raw2","normalizedFromExtend","isEmitListener","options","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","prev","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","renderComponentRoot","Component","vnode","withProxy","propsOptions","slots","attrs","render","renderCache","data","setupState","inheritAttrs","fallthroughAttrs","proxyToUse","normalizeVNode","render2","getFunctionalFallthrough","blockStack","createVNode","Comment","root","keys","shapeFlag","filterModelListeners","cloneVNode","shouldUpdateComponent","prevVNode","nextVNode","optimized","prevProps","prevChildren","component","nextProps","nextChildren","patchFlag","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","updateHOCHostEl","isSuspense","queueEffectWithSuspense","suspense","INITIAL_WATCHER_VALUE","watch","doWatch","immediate","deep","flush","onTrack","onTrigger","currentInstance","forceTrigger","isMultiSource","isShallow$1","s","traverse","cleanup","onCleanup","baseGetter","ssrCleanup","isInSSRComponentSetup","useSSRContext","queuePostRenderEffect","unwatch","instanceWatch","publicThis","createPathGetter","setCurrentInstance","unsetCurrentInstance","path","segments","withDirectives","directives","internalInstance","getExposeProxy","bindings","dir","modifiers","invokeDirectiveHook","oldBindings","binding","hook","useTransitionState","state","onMounted","onBeforeUnmount","TransitionHookValidator","BaseTransitionPropsValidators","BaseTransitionImpl","getCurrentInstance","prevTransitionKey","children","getTransitionRawChildren","child","rawProps","mode","emptyPlaceholder","innerChild","getKeepAliveChild","enterHooks","resolveTransitionHooks","setTransitionHooks","oldChild","oldInnerChild","transitionKeyChanged","getTransitionKey","isSameVNodeType","leavingHooks","earlyRemove","delayedLeave","leavingVNodesCache","getLeavingNodesForType","BaseTransition","leavingVNodes","appear","persisted","onBeforeEnter","onEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onLeave","onAfterLeave","onLeaveCancelled","onBeforeAppear","onAppear","onAfterAppear","onAppearCancelled","callHook","callAsyncHook","hook2","hooks","leavingVNode","afterHook","cancelHook","called","cancelled","vnode2","isKeepAlive","keepComment","parentKey","keyedFragmentCount","Fragment","defineComponent","extraOptions","isAsyncWrapper","onActivated","registerKeepAliveHook","onDeactivated","wrappedHook","current","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","createHook","lifecycle","onBeforeMount","onBeforeUpdate","onUpdated","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","COMPONENTS","resolveComponent","maybeSelfReference","resolveAsset","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","warnMissing","selfName","getComponentName","resolve","registry","renderList","renderItem","index","renderSlot","fallback","noSlotted","slot","openBlock","validSlotContent","ensureValidVNode","rendered","createBlock","vnodes","isVNode","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","hasSetupBinding","PublicInstanceProxyHandlers","accessCache","normalizedProps","shouldCacheAccess","publicGetter","cssModule","globalProperties","descriptor","useAttrs","getContext","useModel","createSetupContext","normalizePropsOrEmits","applyOptions","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","components","filters","resolveInjections","methodHandler","opt","createWatcher","provides","provide","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","normalizeInject","inject","h","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","hydrate","rootComponent","rootProps","context","installedPlugins","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","isSVG","currentApp","parentProvides","treatDefaultAsFactory","hasInjectionContext","initProps","isStateful","InternalObjectKey","setFullProps","updateProps","rawPrevProps","rawCurrentProps","hasAttrsChanged","propsToUpdate","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","normalizePropsOptions","extendProps","normalizedKey","validatePropName","prop","booleanIndex","getTypeIndex","stringIndex","getType","ctor","match","isSameType","expectedTypes","t","isInternalKey","normalizeSlotValue","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","normalizeVNodeSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","refValue","owner","oldRef","refs","_isString","_isRef","doSet","existing","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostRemove","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","patch","n1","n2","container","anchor","parentComponent","slotScopeIds","getNextHostNode","unmount","Text","processText","processCommentNode","Static","mountStaticNode","processFragment","processElement","processComponent","internals","moveStaticNode","nextSibling","next","removeStaticNode","mountElement","patchElement","vnodeHook","transition","dirs","mountChildren","setScopeId","unmountChildren","invokeVNodeHook","needCallTransitionHooks","scopeId","subTree","parentVNode","cloneIfMounted","dynamicChildren","oldProps","newProps","toggleRecurse","areChildrenSVG","patchBlockChildren","patchChildren","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","placeholder","updateComponentPreRender","componentUpdateFn","bu","u","originNext","nextTree","prevTree","bm","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","update","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","oldLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","j","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","move","moveType","leave","delayLeave","afterLeave","remove2","performLeave","doRemove","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","allowed","ch1","ch2","len","arrI","isTeleport","isTeleportDisabled","isTargetSVG","resolveTarget","select","targetSelector","TeleportImpl","insert","querySelector","createText","createComment","disabled","mainAnchor","targetAnchor","mount","container2","anchor2","wasDisabled","currentContainer","currentAnchor","moveTeleport","nextTarget","updateCssVars","hydrateTeleport","isReorder","node","parentNode","hydrateChildren","targetNode","Teleport","currentBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","klass","style","extraProps","mergeRef","mergedProps","mergeProps","createTextVNode","text","flag","createCommentVNode","asBlock","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","globalCurrentInstanceSetters","settersKey","setupResult","setupStatefulComponent","setup","setupContext","resolvedResult","handleSetupResult","e","finishComponentSetup","compile","skipOptions","template","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","getAttrsProxy","includeInferred","computed$1","propsOrChildren","ssrContextKey","svgNS","doc","templateContainer","nodeOps","tag","is","selector","content","before","wrapper","patchClass","transitionClasses","patchStyle","isCssString","setStyle","currentDisplay","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","needRemove","addEventListener","removeEventListener","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","cachedNow","getNow","initialValue","patchStopImmediatePropagation","originalStop","nativeOnRE","patchProp","shouldSetAsProp","TRANSITION","ANIMATION","Transition","resolveTransitionProps","DOMTransitionPropsValidators","TransitionPropsValidators","h2","hasExplicitCallback","baseProps","duration","enterFromClass","enterActiveClass","enterToClass","appearFromClass","appearActiveClass","appearToClass","leaveFromClass","leaveActiveClass","leaveToClass","durations","normalizeDuration","enterDuration","leaveDuration","finishEnter","isAppear","removeTransitionClass","finishLeave","makeEnterHook","nextFrame","addTransitionClass","whenTransitionEnds","forceReflow","NumberOf","cls","_vtc","endId","expectedType","explicitTimeout","resolveIfNotStale","timeout","propCount","getTransitionInfo","endEvent","ended","onEnd","styles","getStyleProperties","transitionDelays","transitionDurations","transitionTimeout","getTimeout","animationDelays","animationDurations","animationTimeout","hasTransform","delays","d","toMs","positionMap","newPositionMap","TransitionGroupImpl","moveClass","hasCSSTransform","callPendingCbs","recordPosition","movedChildren","applyTranslation","cssTransitionProps","removeMode","TransitionGroup","oldPos","newPos","dx","dy","clone","getModelAssigner","vModelSelect","isSetModel","selectedVal","getValue","setSelected","_binding","isMultiple","option","optionValue","systemModifiers","modifierGuards","withModifiers","guard","keyNames","withKeys","eventKey","k","vShow","setDisplay","rendererOptions","renderer","ensureRenderer","createApp","containerOrSelector","normalizeContainer","isBrowser","isESModule","assign","applyToParams","params","newParams","noop","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery","location","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery","stripBase","pathname","isSameRouteLocation","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","fromSegments","toSegments","lastToSegment","position","toPosition","segment","NavigationType","NavigationDirection","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","beforeUnloadListener","history","destroy","buildState","back","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","hashIndex","url","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","route","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","createRouterError","isNavigationFailure","error","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","score","pattern","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re","subPattern","parse","stringify","avoidDuplicatedSlash","param","compareScoreArray","comparePathParserScore","aScore","bScore","isLastScoreNegative","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","message","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","record","parser","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","isAliasRecord","removeRoute","insertMatcher","matcherRef","getRoutes","isRecordChildOf","paramsFromLocation","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","searchParams","searchParam","eqPos","currentValue","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","reset","guardToPromiseFn","enterCallbackArray","reject","valid","guardReturn","guardCall","extractComponentsGuards","guardType","guards","rawComponent","isRouteComponent","componentPromise","resolvedComponent","useLink","router","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","guardEvent","RouterLinkImpl","link","elClass","getLinkClass","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","viewRef","oldInstance","oldName","currentName","ViewComponent","routePropsOption","routeProps","slotContent","RouterView","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","href","matcherLocation","targetParams","fullPath","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","force","shouldRedirect","toLocation","failure","handleScroll","markAsReady","triggerError","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","runWithContext","installedApps","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","info","readyHandlers","errorHandlers","ready","isReady","scrollBehavior","started","reactiveRoute","unmountApp","promise","recordFrom","recordTo","useRouter","useRoute","inBrowser","makeSymbol","shareable","generateFormatCacheKey","locale","friendlyJSONstringify","json","isNumber","isRegExp","isEmptyObject","warn","msg","escapeHtml","rawText","proto","join","items","separator","createPosition","line","column","createLocation","loc","RE_ARGS","format","identifier","CompileErrorCodes","errorMessages","createCompileError","code","domain","messages","defaultOnError","CHAR_SP","CHAR_CR","CHAR_LF","CHAR_LS","CHAR_PS","createScanner","_buf","_index","_line","_column","_peekOffset","isCRLF","isLF","isPS","isLS","isLineEnd","peekOffset","charAt","currentChar","currentPeek","peek","resetPeek","skipToPeek","EOF","LITERAL_DELIMITER","ERROR_DOMAIN$1","createTokenizer","_scnr","currentOffset","currentPosition","_initLoc","_initOffset","_context","onError","emitError","pos","getToken","getEndToken","eat","scnr","ch","peekSpaces","buf","skipSpaces","isIdentifierStart","cc","isNumberStart","isNamedIdentifierStart","currentType","isListIdentifierStart","isLiteralStart","isLinkedDotStart","isLinkedModifierStart","isLinkedDelimiterStart","isLinkedReferStart","isPluralStart","detectModuloStart","spaces","isTextStart","hasSpace","detectModulo","takeChar","takeIdentifierChar","takeDigit","takeHexDigit","getDigits","num","readModulo","readText","readNamedIdentifier","readListIdentifier","readLiteral","literal","x","readEscapeSequence","readUnicodeEscapeSequence","unicode","digits","sequence","readInvalidIdentifier","identifiers","closure","readLinkedModifier","readLinkedRefer","detect","readPlural","plural","readTokenInPlaceholder","readTokenInLinked","validNamedIdentifier","validListIdentifier","validLiteral","readToken","isModulo","nextToken","startLoc","endLoc","ERROR_DOMAIN","KNOWN_ESCAPES","fromEscapeSequence","codePoint4","codePoint6","codePoint","createParser","tokenzer","startNode","endNode","parseText","tokenizer","parseList","parseNamed","parseLiteral","parseLinkedModifier","getTokenCaption","parseLinkedKey","parseLinked","linkedNode","parsed","nextContext","emptyLinkedKeyNode","parseMessage","startOffset","endOffset","parsePlural","msgNode","hasEmptyMessage","parseResource","createTransformer","ast","traverseNodes","nodes","transformer","traverseNode","transform","optimize","body","optimizeMessageNode","minify","resource","cases","valueNode","linked","named","createCodeGenerator","sourceMap","filename","breakLineCode","_needIndent","_newline","withBreakLine","_breakLineCode","indent","withNewLine","level","deindent","newline","generateLinkedNode","generator","helper","generateNode","generateMessageNode","needIndent","generatePluralNode","generateResource","generate","helpers","baseCompile","assignedOptions","jit","enalbeMinify","enambeOptimize","IntlifyDevToolsHooks","initFeatureFlags","pathStateMachine","literalValueRE","isLiteral","exp","stripQuotes","getPathCharType","formatSubPath","trimmed","subPathDepth","newChar","action","typeMap","actions","maybeUnescapeQuote","nextChar","resolveWithKeyValue","resolveValue","hit","DEFAULT_MODIFIER","DEFAULT_MESSAGE","DEFAULT_MESSAGE_DATA_TYPE","DEFAULT_NORMALIZE","DEFAULT_INTERPOLATE","pluralDefault","choice","choicesLength","getPluralIndex","normalizeNamed","pluralIndex","createMessageContext","pluralRule","orgPluralRule","_list","_named","_modifier","normalize","interpolate","arg1","arg2","modifier","devtools","setDevToolsHook","initI18nDevTools","i18n","translateDevTools","createDevToolsHook","payloads","fallbackWithSimple","fallbackWithLocaleChain","startLocale","DEFAULT_LOCALE","chain","block","appendBlockToChain","blocks","follow","appendLocaleToChain","appendItemToChain","VERSION","NOT_REOSLVED","MISSING_RESOLVE_VALUE","getDefaultLinkedModifiers","_compiler","registerMessageCompiler","compiler","_resolver","registerMessageResolver","resolver","_fallbacker","registerLocaleFallbacker","fallbacker","_additionalMeta","setAdditionalMeta","getAdditionalMeta","_fallbackContext","setFallbackContext","getFallbackContext","_cid","createCoreContext","fallbackLocale","datetimeFormats","numberFormats","pluralRules","missing","missingWarn","fallbackWarn","fallbackFormat","unresolving","postTranslation","processor","warnHtmlMessage","escapeParameter","messageCompiler","messageResolver","localeFallbacker","fallbackContext","onWarn","internalOptions","__datetimeFormatters","__numberFormatters","__meta","handleMissing","updateFallbackLocale","formatParts","formatMessageParts","_static","acm","formatMessagePart","linkedKey","linkedModifier","inc","CoreErrorCodes","createCoreError","defaultOnCacheKey","compileCache","detectError","baseCompile$1","compileToFunction","cacheKey","NOOP_MESSAGE_FUNCTION","isMessageFunction","isMessageAST","translate","parseTranslateArgs","resolvedMessage","defaultMsgOrKey","enableDefaultMsg","escapeParams","formatScope","targetLocale","resolveMessageFormat","cacheBaseKey","occurred","errorDetector","compileMessageFormat","ctxOptions","getMessageContextOptions","msgContext","messaged","evaluateMessage","locales","missingRet","getCompileOptions","msgCtx","arg3","datetime","overrides","parseDateTimeArgs","part","datetimeFormat","formatter","DATETIME_FORMAT_OPTIONS_KEYS","arg4","matches","dateTime","clearDateTimeFormat","parseNumberArgs","numberFormat","NUMBER_FORMAT_OPTIONS_KEYS","clearNumberFormat","I18nErrorCodes","createI18nError","TranslateVNodeSymbol","DatetimePartsSymbol","NumberPartsSymbol","SetPluralRulesSymbol","InejctWithOptionSymbol","DisposeSymbol","handleFlatJson","subKeys","lastIndex","currentObj","hasStringValue","getLocaleMessages","__i18n","flatJson","custom","deepCopy","isNotObjectOrIsArray","src","des","getComponentOptions","adjustI18nResources","gl","componentOptions","createTextNode","DEVTOOLS_META","composerID","defineCoreMissingHandler","getMetaInfo","createComposer","VueI18nLegacy","__root","__injectWithOption","_isGlobal","_inheritLocale","_locale","_fallbackLocale","_messages","_datetimeFormats","_numberFormats","_missingWarn","_fallbackWarn","_fallbackRoot","_fallbackFormat","_missing","_runtimeMissing","_postTranslation","_warnHtmlMessage","_escapeParameter","_modifiers","_pluralRules","trackReactivityValues","getPostTranslationHandler","setPostTranslationHandler","getMissingHandler","setMissingHandler","wrapWithDeps","argumentParser","warnType","fallbackSuccess","fallbackFail","successCondition","rt","translateVNode","numberParts","datetimeParts","setPluralRules","rules","te","getLocaleMessage","resolveMessages","targetLocaleMessages","messageValue","tm","setLocaleMessage","mergeLocaleMessage","getDateTimeFormat","setDateTimeFormat","mergeDateTimeFormat","getNumberFormat","setNumberFormat","mergeNumberFormat","composer","convertComposerOptions","fallbackRoot","pluralizationRules","inheritLocale","sharedMessages","createVueI18n","__extender","vueI18n","baseFormatProps","getInterpolateArg","getFragmentableTag","TranslationImpl","useI18n","assignedAttrs","Translation","renderFormatter","slotKeys","partFormatter","parts","NumberFormatImpl","NumberFormat","DatetimeFormatImpl","DatetimeFormat","getComposer$2","i18nInternal","vTDirective","_process","parsedValue","parseValue","makeParams","textContent","apply","pluginOptions","useI18nComponentName","defineMixin","vuei18n","optionsI18n","mergeToGlobal","_vueI18n","g","I18nInjectionKey","createI18n","__legacyMode","__globalInjection","__allowComposition","__instances","globalScope","__global","createGlobal","symbol","__getInstance","__setInstance","__deleteInstance","opts","globalReleaseHandler","injectGlobalFields","getI18nInstance","getGlobalComposer","getScope","useI18nForLegacy","getComposer","composerOptions","setupLifeCycle","legacyMode","useComponent","getParentComponentInstance","_composer","dispose","isLocalScope","warpWithDeps","sync","globalExportProps","globalExportMethods","desc","Env","en","de","i18n.useI18n","i18n.createI18n","isVue2","activePinia","setActivePinia","pinia","piniaSymbol","o","MutationType","createPinia","_p","toBeInstalled","addSubscription","subscriptions","removeSubscription","idx","triggerSubscriptions","fallbackRunWithContext","mergeReactiveObjects","patchToApply","subPatch","targetValue","skipHydrateSymbol","shouldHydrate","isComputed","createOptionsStore","hot","getters","initialState","store","localState","computedGetters","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","actionSubscriptions","debuggerEvents","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","$reset","newState","$state","$dispose","wrapAction","afterCallbackList","onErrorCallbackList","after","partialStore","stopWatcher","setupStore","actionValue","extender","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","hasContext","useConfigurationStore","organization","logo","icon","color","_hoisted_1","_hoisted_2","_createElementVNode","_hoisted_3","_hoisted_4","_hoisted_5","_ctx","_cache","_openBlock","_createElementBlock","ArrowLong","Check","ChevronDown","Search","Spinner","Warning","WarningTriangle","Xmark","ChevronRight","ChevronLeft","Calendar","CircleCheck","Pin","TaskList","CalendarRemove","Instagram","Facebook","IconMap","tryOnScopeDispose","createEventHook","off","offFn","isClient","toString","isIOS","getIsIOS","_b","createFilterWrapper","filter","debounceFilter","ms","timer","maxTimer","lastRejector","_clearTimeout","timer2","invoke","maxDuration","promiseTimeout","throwOnTimeout","reason","containsProp","getLifeCycleTarget","toRef$1","useDebounceFn","refDebounced","debounced","updater","tryOnBeforeUnmount","createUntil","isNot","toMatch","condition","stop","promises","toBe","v1","v2","toBeTruthy","toBeNull","toBeUndefined","toBeNaN","toContains","array","changed","changedTimes","count","until","useTimeoutFn","interval","isPending","unrefElement","elRef","plain","defaultWindow","defaultDocument","useEventListener","events","cleanups","options2","stopWatch","optionsClone","_iOSWorkaround","onClickOutside","window","ignore","capture","detectIframe","shouldListen","shouldIgnore","target2","useMounted","useSupported","useMutationObserver","mutationOptions","observer","isSupported","takeRecords","payloadMapping","isFetchOptions","isAbsoluteURL","headersToObject","headers","combineCallbacks","combination","callbacks","createFetch","config","_combination","_options","_fetchOptions","useFactoryFetch","computedUrl","baseUrl","targetUrl","joinPaths","fetchOptions","useFetch","supportsAbort","fetch","initialData","responseEvent","errorEvent","finallyEvent","isFinished","isFetching","aborted","statusCode","response","canAbort","controller","abort","loading","isLoading","executeCounter","execute","throwOnFailed","_a2","currentExecuteCounter","defaultFetchOptions","payload","isCanceled","responseData","fetchResponse","fetchError","errorData","refetch","refetch2","shell","setMethod","setType","payloadType","onFulfilled","onRejected","waitUntilFinished","error2","resolveElement","checkOverflowScroll","ele","preventDefault","rawEvent","_target","elInitialOverflow","useScrollLock","element","isLocked","stopTouchMoveListener","initialOverflow","lock","unlock","useTitle","newTitle","_c","document","restoreOnUnmount","originalTitle","title","restoredTitle","defaultHeaderBackgroundImage","theme","backgroundImage","TillhubLogo","TERMS_AND_CONDITIONS_URL","PRIVACY_POLICY_URL","IMPRINT_URL","links","global","module","this","fetchRetry","ArgumentError","isPositiveInteger","baseDefaults","input","init","retries","retryDelay","retryOn","wrappedFetch","attempt","_input","retryOnResponse","retry","delay","retryableFetch","useThFetch","useConfigurationQuery","hexToRGB","R","it","ot","T","M","at","st","lt","ct","E","ut","D","H","ft","dt","nt","pt","$","f","A","N","O","B","y","V","Y","G","q","K","Q","U","Z","tt","L","W","F","P","I","w","z","J","et","C","S","vt","getBannerColor","layout","showMerchantNotFoundScreen","fetchConfiguration","showUnexpectedErrorScreen","styleTag","rgb","createAppRouter","__vitePreload","pinia.createPinia","require$$0","dayjs","utc","timezone","weekOfYear","isoWeek","minMax","isSameOrBefore","INJECTION_KEY","useDayjs","createDayjs","extendStatics","__extends","__","__assign","__rest","__awaiter","_arguments","adopt","fulfilled","step","rejected","__generator","verb","op","__values","__read","ar","__spreadArray","pack","SUCCESS_MESSAGE","UNEXPECTED_ERROR_MESSAGE","MAX_RETRIES_EXCEEDED_MESSAGE","OPT_OUT_MESSAGE","MISSING_API_KEY_MESSAGE","INVALID_API_KEY","CLIENT_NOT_INITIALIZED","IdentifyOperation","RevenueProperty","SpecialEventType","LogLevel","ServerZone","Status","buildResult","UUID","Timeline","client","_d","pluginName","plugins","_this","before_1","before_1_1","e_1_1","enrichment","enrichment_1","enrichment_1_1","e_2_1","destination","executeDestinations","e_1","e_2","_e","eventClone","resolveResult","UNSET_VALUE","AMPLITUDE_PREFIX","STORAGE_PREFIX","AMPLITUDE_SERVER_URL","EU_AMPLITUDE_SERVER_URL","AMPLITUDE_BATCH_SERVER_URL","EU_AMPLITUDE_BATCH_SERVER_URL","MAX_PROPERTY_KEYS","isValidObject","properties","isValidProperties","property","isValid","value_1","value_1_1","valueElement","Identify","operation","userPropertyMap","createTrackEvent","eventInput","eventProperties","eventOptions","baseEvent","createIdentifyEvent","identify","identifyEvent","createGroupIdentifyEvent","groupType","groupName","groupIdentify","createGroupEvent","groupEvent","createRevenueEvent","revenue","returnWrapper","awaitable","AmplitudeCore","queueName","queuedFunctions","queuedFunctions_1","queuedFunctions_1_1","queuedFunction","optOut","Revenue","productId","quantity","price","revenueType","chunk","chunkSize","chunks","chunkIndex","PREFIX","Logger","logLevel","_i","getDefaultConfig","Config","defaultConfig","serverConfig","createServerConfig","getServerUrl","serverZone","useBatch","serverUrl","_serverZone","getErrorMessage","getResponseBodyString","responseBodyString","Destination","unsent","tryable","useRetry","later","batches","batch","errorMessage","eventWithoutExtra","status","dropIndex","dropIndexSet","dropUserIds","dropDeviceIds","throttledIndex","dropUserIdsSet","dropDeviceIdsSet","throttledIndexSet","getStacktrace","ignoreDepth","trace","getClientLogConfig","logger","getValueByStringPath","attr","getClientStates","paths","paths_1","paths_1_1","debugWrapper","fnName","getLogConfig","getStates","fnContext","debugContext","MemoryStorage","BaseTransport","_serverUrl","_payload","responseJSON","_f","_g","_h","_j","_k","_l","_m","_o","_q","_r","_s","_t","_u","_v","_w","_x","getGlobalScope","getQueryParams","pairs","acc","curr","tryDecodeURIComponent","UTM_CAMPAIGN","UTM_CONTENT","UTM_ID","UTM_MEDIUM","UTM_SOURCE","UTM_TERM","DCLID","FBCLID","GBRAID","GCLID","KO_CLICK_ID","LI_FAT_ID","MSCLKID","RDT_CID","TTCLID","TWCLID","WBRAID","BASE_CAMPAIGN","CampaignParser","utmCampaign","utmContent","utmId","utmMedium","utmSource","utmTerm","getCookieName","apiKey","postKey","limit","getOldCookieName","isNewSession","sessionTimeout","lastEventTime","currentTime","timeSinceLastEvent","CookieStorage","testStrorage","testKey","cookie","expirationDays","expires","expireDate","date","FetchTransport","_super","responsePayload","ApplicationContextProviderImpl","getLanguage","EventBridgeImpl","isEqual","obj1","obj2","primitive","typeA","typeB","primitive_1","isArrayA","isArrayB","sorted1","sorted2","result_1","ID_OP_SET","ID_OP_UNSET","ID_OP_CLEAR_ALL","ownProps","resArray","IdentityStoreImpl","actingUserProperties","actingIdentity","userId","deviceId","userProperties","actingProperties","identity","originalIdentity","safeGlobal","AnalyticsConnector","instanceName","getAnalyticsConnector","setConnectorUserId","setConnectorDeviceId","IdentityEventSender","userLanguage","isTrackingEnabled","defaultTracking","isAttributionTrackingEnabled","isFileDownloadTrackingEnabled","isFormInteractionTrackingEnabled","isPageViewTrackingEnabled","isSessionTrackingEnabled","getPageViewTrackingConfig","trackOn","trackHistoryChanges","eventType","isDefaultPageViewTrackingEnabled","getAttributionTrackingConfig","convertProxyObjectToRealObject","name_1","isInstanceProxy","instanceProxy","BROWSER_PLATFORM","IP_ADDRESS","Context","time","lastEventId","nextEventId","BrowserStorage","storage","random","testStorage","MAX_ARRAY_LENGTH","LocalStorage","droppedEventsCount","SessionStorage","XHRTransport","xhr","parsedResponsePayload","SendBeaconTransport","success","parseLegacyCookies","cookieStorage","deleteLegacyCookies","cookieName","cookies","sessionId","parseTime","integer","DEFAULT_EVENT_PREFIX","DEFAULT_FORM_START_EVENT","DEFAULT_FORM_SUBMIT_EVENT","DEFAULT_FILE_DOWNLOAD_EVENT","DEFAULT_SESSION_START_EVENT","DEFAULT_SESSION_END_EVENT","FILE_EXTENSION","FILE_NAME","LINK_ID","LINK_TEXT","LINK_URL","FORM_ID","FORM_NAME","FORM_DESTINATION","DEFAULT_IDENTITY_STORAGE","DEFAULT_SERVER_ZONE","BrowserConfig","appVersion","cookieOptions","flushIntervalMillis","flushMaxRetries","flushQueueSize","identityStorage","ingestionMetadata","loggerProvider","minIdLength","partnerId","plan","storageProvider","trackingOptions","transport","createTransport","useBrowserConfig","amplitudeInstance","legacyCookies","previousCookies","queryParams","_y","_z","_0","_1","_2","getTopLevelDomain","createCookieStorage","host","levels","storageKey","getStorageKey","domainWithoutSubdomain","isDirectTraffic","isNewCampaign","previous","referring_domain","currentCampaign","prevReferringDomain","previousCampaign","isExcludedReferrer","hasNewCampaign","hasNewDomain","excludeReferrers","referringDomain","createCampaignEvent","campaign","campaignParameters","getDefaultExcludedReferrers","cookieDomain","webAttributionPlugin","amplitude","pluginConfig","isEventInNewSession","campaignEvent","omitUndefined","pageViewTrackingPlugin","pushState","createPageViewEvent","getCampaignParams","shouldTrackOnPageLoad","previousURL","trackHistoryPageView","newURL","shouldTrackPageView","shouldTrackHistoryPageView","trackHistoryPageViewWrapper","unused","pageViewEvent","isCampaignEvent","$set","$unset","userProperties_1","trackingOption","oldURL","formInteractionTracking","eventListeners","removeClickListeners","addFormInteractionListener","forms","form","hasFormChanged","stringOrUndefined","mutations","mutation","fileDownloadTracking","addFileDownloadListener","ext","fileExtension","notified","detNotify","AmplitudeBrowser","userIdOrOptions","maybeOptions","browserOptions","connector","attributionTrackingOptions","webAttribution","previousSessionId","createInstance","ApiKey","DefaultConfiguration","amplitude.Types.ServerZone","BackButtonClicked","event_properties","__publicField","BookingConfirmed","BranchSelected","DataEntered","ServicesSelected","TimeSelected","getVoidPromiseResult","Ampli","amplitude.createInstance","configuration","amplitudeIdentify","amplitude.Identify","ampli","useAmpli","isEnabled","userAgreedToTracking","loadAmpliIfAllowed","environment","createAmpli","isError","wat","isInstanceOf","isBuiltin","className","isErrorEvent","isDOMError","isDOMException","isPrimitive","isEvent","isElement","isThenable","isSyntheticEvent","isNaN","isVueViewModel","truncate","max","safeJoin","delimiter","output","isMatchingPattern","requireExactStringMatch","stringMatchesSomePattern","testString","patterns","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","hint","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exception","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","parentId","exceptions","maxValueLength","isGlobalObj","GLOBAL_OBJ","getGlobalObject","getGlobalSingleton","creator","gbl","__SENTRY__","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","elem","currentElem","MAX_TRAVERSE_HEIGHT","out","height","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","classes","keyAttrPairs","keyAttr","keyAttrPair","allowedAttrs","getLocationHref","getDomElement","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","console","wrappedFuncs","wrappedLevels","originalConsoleMethod","makeLogger","enabled","DSN_REGEX","isValidProtocol","protocol","dsnToString","dsn","withPassword","pass","port","projectId","publicKey","dsnFromString","lastPath","split","projectMatch","dsnFromComponents","validateDsn","makeDsn","SentryError","fill","replacementFactory","original","wrapped","markFunctionWrapped","addNonEnumerableProperty","getOriginalFunction","func","urlEncode","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","extractedProps","extractExceptionKeysForMessage","maxLength","includedKeys","serialized","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","memoVal","returnValue","STACKTRACE_FRAME_LIMIT","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","stack","skipFirst","frames","lines","cleanedLine","frame","stripSentryFramesAndReverse","stackParserFromStackParserOptions","stackParser","localStack","defaultFunctionName","getFunctionName","supportsFetch","isNativeFetch","supportsNativeFetch","sandbox","supportsHistory","chrome","isChromePackagedApp","hasHistoryApi","SENTRY_XHR_DATA_KEY","instrumented","instrument","instrumentConsole","instrumentDOM","instrumentXHR","instrumentFetch","instrumentHistory","instrumentError","instrumentUnhandledRejection","addInstrumentationHandler","triggerHandlers","log","originalFetch","parseFetchArgs","handlerData","hasProp","getUrlFromResource","fetchArgs","xhrproto","originalOpen","startTimestamp","xhrInfo","onreadystatechangeHandler","readyStateArgs","setRequestHeaderArgs","header","originalSend","sentryXhrData","lastHref","oldOnPopState","historyReplacementFunction","originalHistoryFunction","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEvent","areSimilarDomEvents","shouldSkipDOMEvent","makeDOMEventHandler","globalListener","triggerDOMHandler","globalDOMEventHandler","originalAddEventListener","handlerForType","originalRemoveEventListener","_oldOnErrorHandler","_oldOnUnhandledRejectionHandler","isBrowserBundle","getSDKSource","isNodeEnv","dynamicRequire","mod","request","isElectronNodeRenderer","memoBuilder","hasWeakSet","memoize","unmemoize","uuid4","crypto","getRandomByte","getFirstException","getEventDescription","eventId","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","mergedData","checkOrSetAlreadyCaught","arrayify","maybeArray","maxProperties","visit","normalizeToSize","maxSize","jsonSize","memo","stringified","stringifyValue","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","visitKey","visitValue","objName","getConstructorName","prototype","utf8Length","States","RESOLVED","REJECTED","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","executor","onfulfilled","onrejected","onfinally","isRejected","cachedHandlers","makePromiseBuffer","task","taskProducer","drain","counter","capturedSetTimeout","parseUrl","fragment","validSeverityLevels","severityLevelFromString","dateTimestampSource","getBrowserPerformance","performance","timeOrigin","getNodePerformance","platformPerformance","timestampSource","dateTimestampInSeconds","timestampInSeconds","browserPerformanceTimeOrigin","threshold","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","navigationStartDelta","navigationStartIsReliable","BAGGAGE_HEADER_NAME","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","currBaggageObject","baggageHeaderToObject","dynamicSamplingContext","nonPrefixedKey","dynamicSamplingContextToSentryBaggageHeader","sentryPrefixedDSC","dscKey","dscValue","objectToBaggageHeader","baggageEntry","keyOrValue","objectKey","objectValue","currentIndex","newBaggageHeader","TRACEPARENT_REGEXP","extractTraceparentData","traceparent","parentSampled","tracingContextFromHeaders","sentryTrace","baggage","traceparentData","traceId","parentSpanId","propagationContext","generateSentryTraceHeader","spanId","sampled","sampledString","createEnvelope","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","envelopeItemType","envelopeContainsItemType","types","encodeUTF8","textEncoder","serializeEnvelope","envHeaders","append","itemHeaders","stringifiedPayload","concatBuffers","buffers","totalLength","parseEnvelope","env","textDecoder","readBinary","bin","readJson","envelopeHeader","itemHeader","binaryLength","createAttachmentEnvelopeItem","attachment","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","createEventEnvelopeHeaders","sdkInfo","tunnel","createClientReportEnvelope","discarded_events","timestamp","clientReportItem","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","now","headerDelay","headerDate","disabledUntil","limits","category","isRateLimited","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","DEFAULT_ENVIRONMENT","getGlobalEventProcessors","addGlobalEventProcessor","notifyEventProcessors","processors","final","makeSession","startingTime","session","sessionToJSON","updateSession","closeSession","DEFAULT_MAX_BREADCRUMBS","Scope","generatePropagationContext","newScope","user","requestSession","tags","extras","extra","fingerprint","span","captureContext","updatedScope","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","breadcrumbs","additionalEventProcessors","transaction","transactionName","scopeBreadcrumbs","newData","API_VERSION","DEFAULT_BREADCRUMBS","Hub","_version","top","syntheticException","beforeBreadcrumb","finalBreadcrumb","oldHub","makeMain","integration","customSamplingContext","endSession","release","userAgent","currentSession","sentry","getMainCarrier","hub","getHubFromCarrier","setHubOnCarrier","getCurrentHub","getGlobalHub","hasHubOnCarrier","carrier","getActiveTransaction","maybeHub","errorsInstrumented","registerErrorInstrumentation","errorCallback","activeTransaction","SpanRecorder","maxlen","Span","spanContext","childSpan","opStr","nameStr","idStr","logMessage","httpStatus","spanStatus","spanStatusfromHttpCode","endTimestamp","getDynamicSamplingContextFromClient","trace_id","public_key","user_segment","dsc","Transaction","transactionContext","incomingDynamicSamplingContext","newName","unit","newMetadata","maybeSampleRate","finishedSpans","metadata","TRACING_DEFAULTS","FINISH_REASON_TAG","IDLE_TRANSACTION_FINISH_REASONS","IdleTransactionSpanRecorder","_pushActivity","_popActivity","transactionSpanId","IdleTransaction","_idleHub","_idleTimeout","_finalTimeout","_heartbeatInterval","_onScope","spanStartedBeforeTransactionFinish","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","pushActivity","popActivity","restartOnChildSpanChange","heartbeatString","hasTracingEnabled","sampleTransaction","samplingContext","sampleRate","isValidSampleRate","rate","traceHeaders","_startTransaction","configInstrumenter","transactionInstrumenter","startIdleTransaction","idleTimeout","finalTimeout","onScope","heartbeatInterval","addTracingExtensions","normalizeContext","parentSpan","activeSpan","createChildSpanOrTransaction","finishAndSetSpan","maybePromiseResult","startSpan","startSpanManual","startInactiveSpan","getActiveSpan","continueTrace","currentScope","setMeasurement","captureException","captureMessage","captureEvent","configureScope","addBreadcrumb","setContext","setExtras","setExtra","setTags","setTag","setUser","withScope","startTransaction","close","SENTRY_API_VERSION","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","tunnelOrOptions","getReportDialogEndpoint","dsnLike","dialogOptions","endpoint","encodedOptions","enhanceEventWithSdkInfo","createSessionEnvelope","envelopeHeaders","createEventEnvelope","installedIntegrations","filterDuplicates","integrations","integrationsByName","existingInstance","getIntegrationsToSetup","defaultIntegrations","userIntegrations","finalIntegrations","debugIndex","findIndex","debugInstance","setupIntegrations","integrationIndex","setupIntegration","addIntegration","prepareEvent","normalizeDepth","normalizeMaxBreadth","prepared","applyClientOptions","applyIntegrationsMetadata","applyDebugIds","finalScope","clientEventProcessors","attachments","evt","applyDebugMeta","normalizeEvent","dist","debugIdStackParserCache","debugIdMap","debugIdStackFramesCache","cachedDebugIdStackFrameCache","filenameDebugIdMap","debugIdStackTrace","parsedStack","cachedParsedStack","stackFrame","images","integrationNames","maxBreadth","ALREADY_SEEN_ERROR","BaseClient","promisedEvent","clientFinished","transportFlushed","eventProcessor","forceInitialize","integrationId","sendResponse","_event","rest","crashed","errored","ex","mechanism","sessionNonTerminal","ticked","tick","finalEvent","sentryError","isTransaction","isTransactionEvent","beforeSendLabel","dataCategory","processBeforeSend","_validateBeforeSendResult","processedEvent","transactionInfo","outcomes","beforeSendResult","invalidValueError","beforeSend","beforeSendTransaction","initAndBind","clientClass","DEFAULT_TRANSPORT_BUFFER_SIZE","makeRequest","rateLimits","send","filteredEnvelopeItems","envelopeItemDataCategory","getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","requestTask","MIN_DELAY","START_DELAY","MAX_DELAY","makeOfflineTransport","flushTimer","shouldQueue","flushIn","found","flushWithBackOff","eventFromEnvelope","makeOverrideReleaseTransport","makeMultiplexedTransport","fallbackTransport","otherTransports","getTransport","validatedDsn","getEvent","eventTypes","transports","allTransports","SDK_VERSION","originalFunctionToString","FunctionToString","DEFAULT_IGNORE_ERRORS","DEFAULT_IGNORE_TRANSACTIONS","InboundFilters","_addGlobaleventProcessor","_getCurrentHub","_eventHint","clientOptions","_mergeOptions","_shouldDropEvent","_isSentryError","_isIgnoredError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","_getPossibleEventMessages","ignoreTransactions","denyUrls","allowUrls","possibleMessages","lastException","_getLastValidUrl","isSentryRequestUrl","checkDsn","checkTunnel","filenameMetadataMap","parsedStacks","ensureMetadataStacksAreParsed","getMetadataForUrl","addMetadataToStackFrames","stripMetadataFromStackFrames","ModuleMetadata","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","sentryWrapped","wrappedArguments","exceptionFromError","parseStackFrames","extractMessage","eventFromPlainObject","isUnhandledRejection","getNonErrorObjectExceptionValue","eventFromError","stacktrace","popSize","getPopSize","reactMinifiedRegexp","eventFromException","attachStacktrace","eventFromUnknownInput","eventFromMessage","eventFromString","domException","captureType","getObjectClassName","createUserFeedbackEnvelope","feedback","createUserFeedbackEnvelopeItem","BrowserClient","sdkSource","cachedFetchImpl","getNativeFetchImplementation","fetchImpl","contentWindow","clearCachedFetchImplementation","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","requestSize","requestOptions","XHR_READYSTATE_DONE","makeXHRTransport","UNKNOWN_FUNCTION","OPERA10_PRIORITY","OPERA11_PRIORITY","CHROME_PRIORITY","WINJS_PRIORITY","GECKO_PRIORITY","createFrame","lineno","colno","chromeRegex","chromeEvalRegex","subMatch","extractSafariExtensionDetails","chromeStackLineParser","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","winjsRegex","winjs","winjsStackLineParser","opera10Regex","opera10","opera10StackLineParser","opera11Regex","opera11","opera11StackLineParser","defaultStackLineParsers","defaultStackParser","isSafariExtension","isSafariWebExtension","GlobalHandlers","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","installFunc","globalHandlerLog","getHubAndOptions","_eventFromIncompleteOnError","_enhanceEventWithInitialFrame","addMechanismAndCapture","_eventFromRejectionWithPrimitive","ERROR_TYPES_RE","groups","ev","ev0","ev0s","ev0sf","DEFAULT_EVENT_TARGET","TryCatch","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","originalCallback","wrapOptions","originalFunction","globalObject","eventName","wrappedEventHandler","originalEventHandler","MAX_ALLOWED_STRING_LENGTH","Breadcrumbs","_consoleBreadcrumb","_domBreadcrumb","_xhrBreadcrumb","_fetchBreadcrumb","_historyBreadcrumb","addSentryBreadcrumb","dom","_innerDomBreadcrumb","_isEvent","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_KEY","DEFAULT_LIMIT","LinkedErrors","HttpContext","referrer","Dedupe","currentEvent","previousEvent","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","_getFramesFromEvent","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","Integrations.InboundFilters","Integrations.FunctionToString","startSessionTracking","showReportDialog","script","injectionPoint","forceLoad","onLoad","wrap$1","startSessionOnHub","captureUserFeedback","registerBackgroundTabDetection","statusType","bindReporter","metric","reportAllChanges","forceReport","generateUniqueID","getNavigationEntryFromPerformanceTiming","timing","navigationEntry","getNavigationEntry","getActivationStart","navEntry","initMetric","navigationType","observe","po","onHidden","once","onHiddenOrPageHide","onCLS","onReport","report","sessionValue","sessionEntries","handleEntries","entry","firstSessionEntry","lastSessionEntry","stopListening","firstHiddenTime","initHiddenTime","trackChanges","timeStamp","getVisibilityWatcher","onFID","visibilityWatcher","handleEntry","reportedMetricIDs","onLCP","lastEntry","_previousCls","_previousFid","_previousLcp","addClsInstrumentationHandler","addMetricObserver","instrumentCls","addLcpInstrumentationHandler","instrumentLcp","addFidInstrumentationHandler","instrumentFid","addPerformanceInstrumentationHandler","addHandler","instrumentPerformanceObserver","getCleanupCallback","typeHandlers","instrumentFn","previousValue","isMeasurementValue","_startChild","msToSec","getBrowserPerformanceAPI","_performanceCursor","_measurements","_lcpEntry","_clsEntry","startTrackingWebVitals","fidCallback","_trackFID","clsCallback","_trackCLS","lcpCallback","_trackLCP","startTrackingLongTasks","startTime","startTrackingInteractions","addPerformanceEntries","performanceEntries","responseStartTimestamp","requestStartTimestamp","_addNavigationSpans","_addMeasureSpans","firstHidden","shouldRecord","resourceName","_addResourceSpans","_trackNavigator","measurementTimestamp","normalizedValue","fidMark","measurementName","_tagMetricInfo","measureStartTimestamp","measureEndTimestamp","_addPerformanceNavigationTiming","_addRequest","description","eventEnd","navigator","connection","DEFAULT_TRACE_PROPAGATION_TARGETS","defaultRequestInstrumentationOptions","instrumentOutgoingRequests","traceFetch","traceXHR","tracePropagationTargets","tracingOrigins","shouldCreateSpanForRequest","enableHTTPTimings","shouldCreateSpan","shouldAttachHeadersWithTargets","shouldAttachHeaders","spans","createdSpan","fetchCallback","addHTTPTimings","xhrCallback","isPerformanceResourceTiming","resourceTimingEntryToSpanData","extractNetworkProtocol","nextHopProtocol","_name","getAbsoluteTime","resourceTiming","timingSpanData","shouldCreateSpanResult","contentLength","contentLengthNum","addTracingHeadersToFetchRequest","requestSpan","sentryTraceHeader","sentryBaggageHeader","newHeaders","existingBaggageHeader","newBaggageHeaders","setHeaderOnXhr","instrumentRoutingWithDefaults","customStartTransaction","startTransactionOnPageLoad","startTransactionOnLocationChange","startingUrl","BROWSER_TRACING_INTEGRATION_ID","DEFAULT_BROWSER_TRACING_OPTIONS","BrowserTracing","instrumentRouting","markBackgroundTransactions","_experiments","clientOptionsTracePropagationTargets","beforeNavigate","isPageloadTransaction","getMetaContent","expandedContext","modifiedContext","finalContext","idleTransaction","inflightInteractionTransaction","registerInteractionTransaction","currentTransaction","metaName","metaTag","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","NodeType$1","NodeType","isElement$1","isShadowRoot","isNativeShadowDom","shadowRoot","fixBrowserCompatibilityIssuesInCSS","escapeImportStatement","rule","statement","stringifyStylesheet","stringifyRule","importStringified","isCSSImportRule","isCSSStyleRule","fixSafariColons","cssStringified","regex","Mirror","childNode","oldNode","createMirror","shouldMaskInput","maskInputOptions","tagName","maskInputValue","isMasked","maskInputFn","toLowerCase","toUpperCase","ORIGINAL_ATTRIBUTE_NAME","is2DCanvasBlank","canvas","getImageData","originalGetImageData","pixel","getInputType","getInputValue","_id","tagNameRegex","IGNORED_NODE","genId","getValidTagName","processedTagName","extractOrigin","origin","canvasService","canvasCtx","URL_IN_CSS_REF","URL_PROTOCOL_MATCH","URL_WWW_MATCH","DATA_URI","absoluteToStylesheet","quote1","path1","quote2","path2","path3","filePath","maybeQuote","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","getAbsoluteSrcsetString","attributeValue","collectCharacters","regEx","chars","absoluteToDoc","descriptorsStr","inParens","isSVGElement","getHref","transformAttribute","maskAttributeFn","ignoreAttribute","_value","_isBlockedElement","blockClass","blockSelector","unblockSelector","eIndex","elementClassMatchesRegex","distanceToMatch","matchPredicate","distance","createMatchPredicate","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","maskDistance","unmaskDistance","onceIframeLoaded","iframeEl","iframeLoadTimeout","win","fired","readyState","blankUrl","onceStylesheetLoaded","styleSheetLoadTimeout","styleSheetLoaded","serializeNode","mirror","inlineStylesheet","maskTextFn","dataURLOptions","inlineImages","recordCanvas","keepIframeSrcFn","newlyAddedElement","rootId","getRootId","serializeElementNode","serializeTextNode","docId","parentTagName","isStyle","isScript","isTextarea","forceMask","isInputMasked","needBlock","attributes","stylesheet","checked","canvasDataURL","blankCanvas","blankCanvasDataURL","image","recordInlineImage","width","lowerIfExists","maybeAttr","slimDOMExcluded","sn","slimDOMOptions","serializeNodeWithId","skipChild","onSerialize","onIframeLoad","onStylesheetLoad","stylesheetLoadTimeout","preserveWhiteSpace","_serializedNode","serializedNode","recordChild","bypassOptions","childN","serializedChildNode","iframeDoc","serializedIframeNode","serializedLinkNode","snapshot","maskAllInputs","slimDOM","on","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","throttle$1","wait","remaining","hookSetter","isRevoked","replacement","nowTimestamp","getWindowScroll","getWindowHeight","getWindowWidth","isBlocked","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","isSerialized","isIgnored","isAncestorRemoved","legacy_isTouchEvent","polyfill","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","StyleSheetMirror","newId","getShadowHost","shadowHost","getRootShadowHost","rootShadowHost","shadowHostInDom","inDom","EventType","EventType2","IncrementalSource","IncrementalSource2","MouseInteractions","MouseInteractions2","PointerTypes","PointerTypes2","CanvasContext","CanvasContext2","isNodeInLinkedList","DoubleLinkedList","moveKey","MutationBuffer","adds","addedIds","addList","getNextId","ns","nextId","pushAdd","currentN","iframe","childSn","isParentRemoved","isAncestorInSet","candidate","tailNode","_node","unhandledNode","attribute","diffAsStr","unchangedAsStr","unattachedDoc","attributeName","old","pname","newPriority","nodeId","deepDelete","targetId","addsSet","removes","_isParentRemoved","_isAncestorInSet","errorHandler","registerErrorHandler","unregisterErrorHandler","callbackWrapper","mutationBuffers","getEventTarget","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","angularZoneSymbol","initMoveObserver","mousemoveCb","sampling","callbackThreshold","positions","timeBaseline","wrappedCb","totalOffset","updatePosition","clientX","clientY","initMouseInteractionObserver","mouseInteractionCb","disableMap","currentPointerType","getHandler","pointerType","thisEventKey","initScrollObserver","scrollCb","scrollLeftTop","initViewportResizeObserver","viewportResizeCb","lastH","lastW","updateDimension","wrapEventWithUserTriggeredFlag","enable","INPUT_TAGS","lastInputValueMap","initInputObserver","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","eventHandler","userTriggered","isChecked","cbWithDedup","lastInputValue","currentWindow","propertyDescriptor","hookProperties","getNestedCSSRulePositions","recurse","childRule","hasNestedCSSRule","getIdAndStyleId","sheet","styleMirror","styleId","initStyleSheetObserver","styleSheetRuleCb","stylesheetManager","insertRule","argumentsList","deleteRule","replaceSync","supportedNestedCSSRuleTypes","canMonkeyPatchNestedCSSRule","unmodifiedFunctions","typeKey","initAdoptedStyleSheetObserver","hostId","patchTarget","originalPropertyDescriptor","sheets","initStyleDeclarationObserver","styleDeclarationCb","ignoreCSSAttributes","setProperty","priority","removeProperty","initMediaInteractionObserver","mediaInteractionCb","volume","muted","playbackRate","initFontObserver","fontCb","fontMap","originalFontFace","family","descriptors","fontFace","restoreHandler","initSelectionObserver","selectionCb","collapsed","updateSelection","selection","ranges","range","startContainer","endContainer","initCustomElementObserver","customElementCb","constructor","mergeHooks","mutationCb","canvasMutationCb","initObservers","mutationObserver","mousemoveHandler","mouseInteractionHandler","scrollHandler","viewportResizeHandler","inputHandler","mediaInteractionHandler","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","selectionObserver","customElementObserver","pluginHandlers","CrossOriginIframeMirror","generateIdFn","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","remoteIdToIdMap","ids","IframeManagerNoop","IframeManager","crossOriginMessageEvent","transformedEvent","iframeMirror","ShadowDomManagerNoop","ShadowDomManager","iframeElement","manager","lookup","encode","arraybuffer","bytes","base64","canvasVarMap","variableListFor","contextMap","saveWebGLVar","isInstanceOfWebGLObject","serializeArg","serializeArgs","initCanvas2DMutationObserver","props2D","recordArgs","hookHandler","getNormalizedContextName","contextType","initCanvasContextObserver","setPreserveDrawingBufferToTrue","ctxName","contextAttributes","patchGLPrototype","initCanvasWebGLMutationObserver","decodeBase64","enableUnicode","binaryString","binaryView","createURL","sourcemapArg","enableUnicodeArg","sourcemap","blob","createBase64WorkerFactory","WorkerFactory","CanvasManagerNoop","CanvasManager","fps","canvasContextReset","snapshotInProgressMap","worker","timeBetweenSnapshots","lastSnapshotTime","rafId","getCanvas","matchedCanvas","takeCanvasSnapshots","bitmap","canvas2DReset","canvasWebGL1and2Reset","setLatestRAFTimestamp","valuesWithType","StylesheetManager","linkEl","adoptedStyleSheetData","ProcessedNodeManager","thisBuffer","wrapEvent","wrappedEmit","takeFullSnapshot","canvasManager","recording","checkoutEveryNms","checkoutEveryNth","_maskInputOptions","_slimDOMOptions","packFn","mousemoveWait","recordCrossOriginIframes","recordAfter","collectFonts","onMutation","inEmittingFrame","passEmitsToParent","lastFullSnapshotEvent","incrementalSnapshotCount","isCheckout","exceedCount","exceedTime","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","wrappedAdoptedStyleSheetEmit","iframeManager","processedNodeManager","shadowDomManager","timestampToMs","timestampToS","addBreadcrumbEvent","replay","INTERACTIVE_SELECTOR","getClickTargetNode","getTargetNode","isEventWithTarget","onWindowOpen","monkeyPatchWindowOpen","originalWindowOpen","handleClick","clickDetector","clickBreadcrumb","ClickDetector","slowClickConfig","_addBreadcrumbEvent","mutationHandler","nowInSeconds","cleanupWindowOpen","clickHandler","obs","ignoreElement","isClickBreadcrumb","newClick","click","timedOutClicks","hadScroll","hadMutation","isSlowClick","clickCount","timeAfterClickMs","endReason","SLOW_CLICK_TAGS","createBreadcrumb","ATTRIBUTES_TO_RECORD","getAttributesToRecord","handleDomListener","handleDom","isClick","getBaseDomBreadcrumb","getDomTarget","handleKeyboardEvent","getKeyboardBreadcrumb","metaKey","shiftKey","ctrlKey","altKey","isInputElement","hasModifierKey","isCharacterKey","baseBreadcrumb","ENTRY_TYPES","createResourceEntry","createPaintEntry","createNavigationEntry","createPerformanceEntries","createPerformanceEntry","entryType","decodedBodySize","domComplete","encodedBodySize","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","redirectCount","transferSize","initiatorType","responseEnd","responseStatus","getLargestContentfulPaint","setupPerformanceObserver","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","logInfo","shouldAddBreadcrumb","logInfoNextTick","EventBufferSizeExceededError","EventBufferArray","eventSize","eventsRet","WorkerHandler","EventBufferCompressionWorker","EventBufferProxy","hasCheckout","addEventPromises","createEventBuffer","useCompression","workerUrl","hasSessionStorage","clearSession","deleteSession","isSampled","saveSession","lastActivity","segmentId","getSessionSampleType","sessionSampleRate","allowBuffering","createSession","stickySession","fetchSession","traceInternals","sessionStringFromStorage","sessionObj","isExpired","initialTime","expiry","targetTime","isSessionExpired","maxReplayDuration","sessionIdleExpire","shouldRefreshSession","loadOrCreateSession","sessionOptions","existingSession","ReplayEventTypeCustom","isCustomEvent","addEventSync","shouldAddEvent","_addEvent","addEvent","replayOptions","eventAfterPossibleCallback","maybeApplyCallback","timestampInMs","isReplayEvent","handleAfterSendEvent","enforceStatusCode","isBaseTransportSend","handleTransactionEvent","handleErrorEvent","replayContext","isRrwebError","shouldSampleForBufferEvent","handleGlobalEventListener","includeAfterSendEventHandling","afterSendHandler","createPerformanceSpans","handleHistory","handleHistorySpanListener","shouldFilterRequest","addNetworkBreadcrumb","handleFetch","fetchData","handleFetchSpanListener","handleXhr","handleXhrSpanListener","OBJ","OBJ_KEY","OBJ_KEY_STR","OBJ_VAL","OBJ_VAL_STR","OBJ_VAL_COMPLETED","ARR","ARR_VAL","ARR_VAL_STR","ARR_VAL_COMPLETED","ALLOWED_PRIMITIVES","completeJson","incompleteJson","lastPos","lastStep","_fixLastStep","_maybeFixIncompleteObjValue","_maybeFixIncompleteArrValue","_findLastArrayDelimiter","startPos","evaluateJson","_evaluateJsonPos","curStep","_isEscaped","_handleQuote","_handleObj","_handleArr","_handleColon","_handleComma","_handleObjClose","_handleArrClose","fixJson","getBodySize","formDataStr","_serializeFormData","parseContentLengthHeader","getBodyString","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","warnings","normalizeNetworkBody","getAllowedHeaders","allowedHeaders","filteredHeaders","formData","exceedsSizeLimit","_strIsProbablyJson","first","urlMatches","urls","fullUrl","getFullUrl","baseURI","fixedUrl","captureFetchBreadcrumbToReplay","_prepareFetchData","enrichFetchBreadcrumb","_getFetchRequestArgBody","reqSize","resSize","requestBodySize","responseBodySize","captureDetails","_getRequestInfo","_getResponseInfo","networkCaptureBodies","networkRequestHeaders","getRequestHeaders","requestBody","bodyStr","networkResponseHeaders","getAllHeaders","bodyText","_parseFetchBody","allHeaders","getHeadersFromOptions","captureXhrBreadcrumbToReplay","_prepareXhrData","enrichXhrBreadcrumb","getResponseHeaders","handleNetworkBreadcrumbs","networkDetailAllowUrls","networkDetailDenyUrls","beforeAddNetworkBreadcrumb","_isXhrBreadcrumb","_isXhrHint","_isFetchBreadcrumb","_isFetchHint","_LAST_BREADCRUMB","isBreadcrumbWithCategory","handleScopeListener","handleScope","newBreadcrumb","normalizeConsoleBreadcrumb","isTruncated","normalizedArgs","normalizedArg","fixedJson","addGlobalListeners","hasHooks","replayId","addMemoryEntry","createMemoryEntry","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","debounce","callbackReturnValue","timerId","maxTimerId","maxWait","invokeFunc","cancelTimers","getHandleRecordingEmit","hadFirstEvent","_isCheckout","addSettingsEvent","earliestEvent","createOptionsEvent","createReplayEnvelope","replayEvent","recordingData","prepareRecordingData","payloadWithSequence","replayHeaders","prepareReplayEvent","event_id","eventHint","preparedEvent","sendReplayRequest","segment_id","eventContext","preparedRecordingData","errorIds","traceIds","initialTimestamp","TransportStatusCodeError","sendReplay","replayData","retryConfig","THROTTLED","SKIPPED","throttle","maxCount","durationSeconds","_cleanup","_getTotalCount","isThrottled","wasThrottled","ReplayContainer","recordingOptions","slowClickTimeout","slowClickIgnoreSelectors","errorSampleRate","forceFlush","continueRecording","activityTime","hasStoppedRecording","cbResult","urlPath","lastTransaction","checkout","_lastActivity","eventBuffer","tooShort","tooLong","mutationLimit","mutationBreadcrumbLimit","overMutationLimit","getOption","selectors","defaultSelectors","deprecatedClassOption","deprecatedSelectorOption","deprecatedSelectors","allSelectors","getPrivacyOptions","mask","unmask","unblock","defaultBlockedElements","maskSelector","unmaskSelector","maskAttribute","maskAttributes","privacyOptions","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","_initialized","Replay","flushMinDelay","flushMaxDelay","minReplayDuration","blockAllMedia","maskFn","beforeAddRecordingEvent","_getMergedNetworkHeaders","finalOptions","loadReplayOptionsFromClient","initialOptions","promisifyRequest","createStore","dbName","storeName","dbp","db","maxQueueSize","pop","createIndexedDbStore","getStore","deserialized","makeIndexedDbOfflineTransport","makeBrowserOfflineTransport","MS_TO_NS","THREAD_ID_STRING","THREAD_NAME","OS_PLATFORM","OS_PLATFORM_VERSION","OS_ARCH","OS_BROWSER","OS_MODEL","OS_LOCALE","isUserAgentData","userAgentData","ua","firstUa","isProcessedJSSelfProfile","profile","enrichWithThreadInformation","convertJSSelfProfileToSampledFormat","getTraceId","createProfilePayload","profile_id","start_timestamp","processed_profile","enrichedThreadProfile","transactionStartMs","transactionEndMs","applyDebugMetadata","isAutomatedPageLoadTransaction","EMPTY_STACK_ID","STACK_ID","adjustForOriginChange","jsSample","stackTop","sample","addProfilesToEnvelope","profiles","findProfiledTransactionsFromEnvelope","resource_paths","file","isValidProfile","PROFILING_CONSTRUCTOR_FAILED","MAX_PROFILE_DURATION_MS","isJSProfilerSupported","maybeProfiler","startJSSelfProfile","JSProfilerConstructor","samplingIntervalMS","maxSamples","shouldProfileTransaction","profilesSampleRate","createProfilingEvent","PROFILE_MAP","getActiveProfilesCount","takeProfileFromGlobalCache","addProfileToGlobalCache","onProfilingStartRouteTransaction","startProfileForTransaction","profiler","profileId","onProfileHandler","maxDurationTimeoutID","originalFinish","profilingWrappedTransactionFinish","BrowserProfilingIntegration","_addGlobalEventProcessor","profiledTransactionEvents","profilesToAddToEnvelope","profiledTransaction","profileEvent","windowIntegrations","INTEGRATIONS","Integrations","DEFAULT_HOOKS","classifyRE","classify","ROOT_COMPONENT_NAME","ANONYMOUS_COMPONENT_NAME","repeat","formatComponentName","vm","includeFile","generateComponentTrace","tree","currentRecursiveSequence","attachErrorHandler","warnHandler","silent","lifecycleHook","componentName","hasConsole","VUE_OP","HOOKS","finishRootSpan","createTracingMixins","internalHooks","internalHook","isRoot","oldSpan","globalWithVue","DEFAULT_CONFIG","VueIntegration","vueInit","appWithInstance","init$1","vueRouterInstrumentation","isPageLoadNavigation","transactionSource","pageloadTransaction","useSentry","Sentry","ignoreErrorPatterns","isErrorIgnored","createSentry","Sentry.init","Sentry.BrowserTracing","Sentry.vueRouterInstrumentation","createCookiePolicy","scriptNode","createPlugins","initialize","App"],"sources":["../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../node_modules/vue-router/dist/vue-router.mjs","../../node_modules/@intlify/shared/dist/shared.mjs","../../node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js","../../node_modules/@intlify/devtools-if/dist/devtools-if.mjs","../../node_modules/@intlify/core-base/dist/core-base.mjs","../../node_modules/vue-i18n/dist/vue-i18n.mjs","../../src/env.ts","../../src/plugins/i18n.ts","../../node_modules/pinia/node_modules/vue-demi/lib/index.mjs","../../node_modules/pinia/dist/pinia.mjs","../../src/stores/useConfigurationStore.ts","../../src/components/SalonLogo.vue","../../src/components/ui/ThBanner.vue","../../src/assets/icons/ArrowLong.svg","../../src/assets/icons/Check.svg","../../src/assets/icons/ChevronDown.svg","../../src/assets/icons/Search.svg","../../src/assets/icons/Spinner.svg","../../src/assets/icons/Warning.svg","../../src/assets/icons/WarningTriangle.svg","../../src/assets/icons/Xmark.svg","../../src/assets/icons/ChevronRight.svg","../../src/assets/icons/ChevronLeft.svg","../../src/assets/icons/Calendar.svg","../../src/assets/icons/CircleCheck.svg","../../src/assets/icons/Pin.svg","../../src/assets/icons/TaskList.svg","../../src/assets/icons/CalendarRemove.svg","../../src/assets/icons/Instagram.svg","../../src/assets/icons/Facebook.svg","../../src/components/ui/ThIcon.vue","../../node_modules/@vueuse/shared/index.mjs","../../node_modules/@vueuse/core/index.mjs","../../src/assets/images/default-header-background.jpg","../../src/components/AppHeader.vue","../../src/assets/images/TillhubLogo.svg","../../src/common/constants.ts","../../src/components/AppFooter.vue","../../node_modules/fetch-retry/dist/fetch-retry.umd.js","../../src/composables/useThFetch.ts","../../src/api/useConfigurationQuery.ts","../../src/utils/hexToRGB.ts","../../src/views/UnexpectedErrorView.vue","../../src/views/NotFoundView.vue","../../node_modules/@kyvg/vue3-notification/dist/index.es.js","../../src/components/NotificationsContainer.vue","../../src/App.vue","../../src/router/index.ts","../../src/plugins/pinia.ts","../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs/plugin/utc.js","../../node_modules/dayjs/plugin/timezone.js","../../node_modules/dayjs/plugin/duration.js","../../node_modules/dayjs/plugin/weekOfYear.js","../../node_modules/dayjs/plugin/isoWeek.js","../../node_modules/dayjs/plugin/minMax.js","../../node_modules/dayjs/plugin/isSameOrBefore.js","../../node_modules/dayjs/locale/de.js","../../src/plugins/dayjs.ts","../../node_modules/tslib/tslib.es6.mjs","../../node_modules/@amplitude/analytics-core/lib/esm/messages.js","../../node_modules/@amplitude/analytics-types/lib/esm/event.js","../../node_modules/@amplitude/analytics-types/lib/esm/logger.js","../../node_modules/@amplitude/analytics-types/lib/esm/server-zone.js","../../node_modules/@amplitude/analytics-types/lib/esm/status.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js","../../node_modules/@amplitude/analytics-core/lib/esm/timeline.js","../../node_modules/@amplitude/analytics-core/lib/esm/constants.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js","../../node_modules/@amplitude/analytics-core/lib/esm/identify.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js","../../node_modules/@amplitude/analytics-core/lib/esm/core-client.js","../../node_modules/@amplitude/analytics-core/lib/esm/revenue.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js","../../node_modules/@amplitude/analytics-core/lib/esm/logger.js","../../node_modules/@amplitude/analytics-core/lib/esm/config.js","../../node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js","../../node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js","../../node_modules/@amplitude/analytics-core/lib/esm/transports/base.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/global-scope.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/query-params.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/attribution/constants.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/attribution/campaign-parser.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/cookie-name.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/session.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/storage/cookie.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/transports/fetch.js","../../node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/analytics-connector.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/plugins/identity.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/language.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/default-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/utils/snippet-helper.js","../../node_modules/@amplitude/analytics-browser/lib/esm/version.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/context.js","../../node_modules/@amplitude/analytics-browser/lib/esm/storage/browser-storage.js","../../node_modules/@amplitude/analytics-browser/lib/esm/storage/local-storage.js","../../node_modules/@amplitude/analytics-browser/lib/esm/storage/session-storage.js","../../node_modules/@amplitude/analytics-browser/lib/esm/transports/xhr.js","../../node_modules/@amplitude/analytics-browser/lib/esm/transports/send-beacon.js","../../node_modules/@amplitude/analytics-browser/lib/esm/cookie-migration/index.js","../../node_modules/@amplitude/analytics-browser/lib/esm/constants.js","../../node_modules/@amplitude/analytics-browser/lib/esm/config.js","../../node_modules/@amplitude/plugin-web-attribution-browser/lib/esm/helpers.js","../../node_modules/@amplitude/plugin-web-attribution-browser/lib/esm/web-attribution.js","../../node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/utils.js","../../node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/page-view-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/form-interaction-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/det-notification.js","../../node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js","../../node_modules/@amplitude/analytics-browser/lib/esm/browser-client-factory.js","../../src/ampli/index.ts","../../src/plugins/ampli.ts","../../node_modules/@sentry/utils/esm/is.js","../../node_modules/@sentry/utils/esm/string.js","../../node_modules/@sentry/utils/esm/aggregate-errors.js","../../node_modules/@sentry/utils/esm/worldwide.js","../../node_modules/@sentry/utils/esm/browser.js","../../node_modules/@sentry/utils/esm/logger.js","../../node_modules/@sentry/utils/esm/dsn.js","../../node_modules/@sentry/utils/esm/error.js","../../node_modules/@sentry/utils/esm/object.js","../../node_modules/@sentry/utils/esm/stacktrace.js","../../node_modules/@sentry/utils/esm/supports.js","../../node_modules/@sentry/utils/esm/vendor/supportsHistory.js","../../node_modules/@sentry/utils/esm/instrument.js","../../node_modules/@sentry/utils/esm/env.js","../../node_modules/@sentry/utils/esm/node.js","../../node_modules/@sentry/utils/esm/isBrowser.js","../../node_modules/@sentry/utils/esm/memo.js","../../node_modules/@sentry/utils/esm/misc.js","../../node_modules/@sentry/utils/esm/normalize.js","../../node_modules/@sentry/utils/esm/syncpromise.js","../../node_modules/@sentry/utils/esm/promisebuffer.js","../../node_modules/@sentry/utils/esm/url.js","../../node_modules/@sentry/utils/esm/severity.js","../../node_modules/@sentry/utils/esm/time.js","../../node_modules/@sentry/utils/esm/baggage.js","../../node_modules/@sentry/utils/esm/tracing.js","../../node_modules/@sentry/utils/esm/envelope.js","../../node_modules/@sentry/utils/esm/clientreport.js","../../node_modules/@sentry/utils/esm/ratelimit.js","../../node_modules/@sentry/core/esm/constants.js","../../node_modules/@sentry/core/esm/eventProcessors.js","../../node_modules/@sentry/core/esm/session.js","../../node_modules/@sentry/core/esm/scope.js","../../node_modules/@sentry/core/esm/hub.js","../../node_modules/@sentry/core/esm/tracing/utils.js","../../node_modules/@sentry/core/esm/tracing/errors.js","../../node_modules/@sentry/core/esm/tracing/span.js","../../node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","../../node_modules/@sentry/core/esm/tracing/transaction.js","../../node_modules/@sentry/core/esm/tracing/idletransaction.js","../../node_modules/@sentry/core/esm/utils/hasTracingEnabled.js","../../node_modules/@sentry/core/esm/tracing/sampling.js","../../node_modules/@sentry/core/esm/tracing/hubextensions.js","../../node_modules/@sentry/core/esm/tracing/trace.js","../../node_modules/@sentry/core/esm/tracing/measurement.js","../../node_modules/@sentry/core/esm/exports.js","../../node_modules/@sentry/core/esm/api.js","../../node_modules/@sentry/core/esm/envelope.js","../../node_modules/@sentry/core/esm/integration.js","../../node_modules/@sentry/core/esm/utils/prepareEvent.js","../../node_modules/@sentry/core/esm/baseclient.js","../../node_modules/@sentry/core/esm/sdk.js","../../node_modules/@sentry/core/esm/transports/base.js","../../node_modules/@sentry/core/esm/transports/offline.js","../../node_modules/@sentry/core/esm/transports/multiplexed.js","../../node_modules/@sentry/core/esm/version.js","../../node_modules/@sentry/core/esm/integrations/functiontostring.js","../../node_modules/@sentry/core/esm/integrations/inboundfilters.js","../../node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js","../../node_modules/@sentry/core/esm/metadata.js","../../node_modules/@sentry/core/esm/integrations/metadata.js","../../node_modules/@sentry/browser/esm/helpers.js","../../node_modules/@sentry/browser/esm/eventbuilder.js","../../node_modules/@sentry/browser/esm/userfeedback.js","../../node_modules/@sentry/browser/esm/client.js","../../node_modules/@sentry/browser/esm/transports/utils.js","../../node_modules/@sentry/browser/esm/transports/fetch.js","../../node_modules/@sentry/browser/esm/transports/xhr.js","../../node_modules/@sentry/browser/esm/stack-parsers.js","../../node_modules/@sentry/browser/esm/integrations/globalhandlers.js","../../node_modules/@sentry/browser/esm/integrations/trycatch.js","../../node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","../../node_modules/@sentry/browser/esm/integrations/linkederrors.js","../../node_modules/@sentry/browser/esm/integrations/httpcontext.js","../../node_modules/@sentry/browser/esm/integrations/dedupe.js","../../node_modules/@sentry/browser/esm/sdk.js","../../node_modules/@sentry-internal/tracing/esm/browser/types.js","../../node_modules/@sentry-internal/tracing/esm/browser/backgroundtab.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/bindReporter.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getNavigationEntry.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getActivationStart.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/initMetric.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/observe.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/onHidden.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getCLS.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getFID.js","../../node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getLCP.js","../../node_modules/@sentry-internal/tracing/esm/browser/instrument.js","../../node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js","../../node_modules/@sentry-internal/tracing/esm/browser/metrics/index.js","../../node_modules/@sentry-internal/tracing/esm/browser/request.js","../../node_modules/@sentry-internal/tracing/esm/browser/router.js","../../node_modules/@sentry-internal/tracing/esm/browser/browsertracing.js","../../node_modules/@sentry/replay/esm/index.js","../../node_modules/@sentry/browser/esm/transports/offline.js","../../node_modules/@sentry/browser/esm/profiling/utils.js","../../node_modules/@sentry/browser/esm/profiling/hubextensions.js","../../node_modules/@sentry/browser/esm/profiling/integration.js","../../node_modules/@sentry/browser/esm/index.js","../../node_modules/@sentry/vue/esm/constants.js","../../node_modules/@sentry/vue/esm/vendor/components.js","../../node_modules/@sentry/vue/esm/errorhandler.js","../../node_modules/@sentry/vue/esm/tracing.js","../../node_modules/@sentry/vue/esm/integration.js","../../node_modules/@sentry/vue/esm/sdk.js","../../node_modules/@sentry/vue/esm/router.js","../../src/plugins/sentry.ts","../../src/plugins/cookiePolicy.ts","../../src/plugins/index.ts","../../src/main.ts"],"sourcesContent":["function makeMap(str, expectsLowerCase) {\n const map = /* @__PURE__ */ Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst onRE = /^on[^a-z]/;\nconst isOn = (key) => onRE.test(key);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return isObject(val) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction(\n (str) => str.charAt(0).toUpperCase() + str.slice(1)\n);\nconst toHandlerKey = cacheStringFunction(\n (str) => str ? `on${capitalize(str)}` : ``\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `HYDRATE_EVENTS`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_WHITE_LISTED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console\";\nconst isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value)) {\n return value;\n } else if (isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {\n entries[`${key} =>`] = val2;\n return entries;\n }, {})\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()]\n };\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nconst createDep = (effects) => {\n const dep = new Set(effects);\n dep.w = 0;\n dep.n = 0;\n return dep;\n};\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\nconst initDepMarkers = ({ deps }) => {\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].w |= trackOpBit;\n }\n }\n};\nconst finalizeDepMarkers = (effect) => {\n const { deps } = effect;\n if (deps.length) {\n let ptr = 0;\n for (let i = 0; i < deps.length; i++) {\n const dep = deps[i];\n if (wasTracked(dep) && !newTracked(dep)) {\n dep.delete(effect);\n } else {\n deps[ptr++] = dep;\n }\n dep.w &= ~trackOpBit;\n dep.n &= ~trackOpBit;\n }\n deps.length = ptr;\n }\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nlet effectTrackDepth = 0;\nlet trackOpBit = 1;\nconst maxMarkerBits = 30;\nlet activeEffect;\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nclass ReactiveEffect {\n constructor(fn, scheduler = null, scope) {\n this.fn = fn;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n this.parent = void 0;\n recordEffectScope(this, scope);\n }\n run() {\n if (!this.active) {\n return this.fn();\n }\n let parent = activeEffect;\n let lastShouldTrack = shouldTrack;\n while (parent) {\n if (parent === this) {\n return;\n }\n parent = parent.parent;\n }\n try {\n this.parent = activeEffect;\n activeEffect = this;\n shouldTrack = true;\n trackOpBit = 1 << ++effectTrackDepth;\n if (effectTrackDepth <= maxMarkerBits) {\n initDepMarkers(this);\n } else {\n cleanupEffect(this);\n }\n return this.fn();\n } finally {\n if (effectTrackDepth <= maxMarkerBits) {\n finalizeDepMarkers(this);\n }\n trackOpBit = 1 << --effectTrackDepth;\n activeEffect = this.parent;\n shouldTrack = lastShouldTrack;\n this.parent = void 0;\n if (this.deferStop) {\n this.stop();\n }\n }\n }\n stop() {\n if (activeEffect === this) {\n this.deferStop = true;\n } else if (this.active) {\n cleanupEffect(this);\n if (this.onStop) {\n this.onStop();\n }\n this.active = false;\n }\n }\n}\nfunction cleanupEffect(effect2) {\n const { deps } = effect2;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect2);\n }\n deps.length = 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn);\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep());\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { effect: activeEffect, target, type, key } : void 0;\n trackEffects(dep, eventInfo);\n }\n}\nfunction trackEffects(dep, debuggerEventExtraInfo) {\n let shouldTrack2 = false;\n if (effectTrackDepth <= maxMarkerBits) {\n if (!newTracked(dep)) {\n dep.n |= trackOpBit;\n shouldTrack2 = !wasTracked(dep);\n }\n } else {\n shouldTrack2 = !dep.has(activeEffect);\n }\n if (shouldTrack2) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (!!(process.env.NODE_ENV !== \"production\") && activeEffect.onTrack) {\n activeEffect.onTrack(\n extend(\n {\n effect: activeEffect\n },\n debuggerEventExtraInfo\n )\n );\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { target, type, key, newValue, oldValue, oldTarget } : void 0;\n if (deps.length === 1) {\n if (deps[0]) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(deps[0], eventInfo);\n } else {\n triggerEffects(deps[0]);\n }\n }\n } else {\n const effects = [];\n for (const dep of deps) {\n if (dep) {\n effects.push(...dep);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(createDep(effects), eventInfo);\n } else {\n triggerEffects(createDep(effects));\n }\n }\n}\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\n const effects = isArray(dep) ? dep : [...dep];\n for (const effect2 of effects) {\n if (effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n for (const effect2 of effects) {\n if (!effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n}\nfunction triggerEffect(effect2, debuggerEventExtraInfo) {\n if (effect2 !== activeEffect || effect2.allowRecurse) {\n if (!!(process.env.NODE_ENV !== \"production\") && effect2.onTrigger) {\n effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n if (effect2.scheduler) {\n effect2.scheduler();\n } else {\n effect2.run();\n }\n }\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst get$1 = /* @__PURE__ */ createGetter();\nconst shallowGet = /* @__PURE__ */ createGetter(false, true);\nconst readonlyGet = /* @__PURE__ */ createGetter(true);\nconst shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n const res = toRaw(this)[key].apply(this, args);\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nfunction createGetter(isReadonly2 = false, shallow = false) {\n return function get2(target, key, receiver) {\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n };\n}\nconst set$1 = /* @__PURE__ */ createSetter();\nconst shallowSet = /* @__PURE__ */ createSetter(true);\nfunction createSetter(shallow = false) {\n return function set2(target, key, value, receiver) {\n let oldValue = target[key];\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\n return false;\n }\n if (!shallow) {\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n };\n}\nfunction deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction has$1(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n}\nfunction ownKeys(target) {\n track(target, \"iterate\", isArray(target) ? \"length\" : ITERATE_KEY);\n return Reflect.ownKeys(target);\n}\nconst mutableHandlers = {\n get: get$1,\n set: set$1,\n deleteProperty,\n has: has$1,\n ownKeys\n};\nconst readonlyHandlers = {\n get: readonlyGet,\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n },\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n};\nconst shallowReactiveHandlers = /* @__PURE__ */ extend(\n {},\n mutableHandlers,\n {\n get: shallowGet,\n set: shallowSet\n }\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ extend(\n {},\n readonlyHandlers,\n {\n get: shallowReadonlyGet\n }\n);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (key !== rawKey) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (key !== rawKey) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(\n method,\n false,\n false\n );\n readonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n false\n );\n shallowInstrumentations2[method] = createIterableMethod(\n method,\n false,\n true\n );\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n def(value, \"__v_skip\", true);\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref2) {\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n trackEffects(ref2.dep || (ref2.dep = createDep()), {\n target: ref2,\n type: \"get\",\n key: \"value\"\n });\n } else {\n trackEffects(ref2.dep || (ref2.dep = createDep()));\n }\n }\n}\nfunction triggerRefValue(ref2, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(dep, {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n });\n } else {\n triggerEffects(dep);\n }\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(\n source,\n key,\n defaultValue\n );\n}\n\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this._dirty = true;\n this.effect = new ReactiveEffect(getter, () => {\n if (!this._dirty) {\n this._dirty = true;\n triggerRefValue(this);\n }\n });\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n trackRefValue(self);\n if (self._dirty || !self._cacheable) {\n self._dirty = false;\n self._value = self.effect.run();\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n console.warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst tick = /* @__PURE__ */ Promise.resolve();\nconst queue = [];\nlet queued = false;\nconst scheduler = (fn) => {\n queue.push(fn);\n if (!queued) {\n queued = true;\n tick.then(flush);\n }\n};\nconst flush = () => {\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n queued = false;\n};\nclass DeferredComputedRefImpl {\n constructor(getter) {\n this.dep = void 0;\n this._dirty = true;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = true;\n let compareTarget;\n let hasCompareTarget = false;\n let scheduled = false;\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\n if (this.dep) {\n if (computedTrigger) {\n compareTarget = this._value;\n hasCompareTarget = true;\n } else if (!scheduled) {\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\n scheduled = true;\n hasCompareTarget = false;\n scheduler(() => {\n if (this.effect.active && this._get() !== valueToCompare) {\n triggerRefValue(this);\n }\n scheduled = false;\n });\n }\n for (const e of this.dep) {\n if (e.computed instanceof DeferredComputedRefImpl) {\n e.scheduler(\n true\n /* computedTrigger */\n );\n }\n }\n }\n this._dirty = true;\n });\n this.effect.computed = this;\n }\n _get() {\n if (this._dirty) {\n this._dirty = false;\n return this._value = this.effect.run();\n }\n return this._value;\n }\n get value() {\n trackRefValue(this);\n return toRaw(this)._get();\n }\n}\nfunction deferredComputed(getter) {\n return new DeferredComputedRefImpl(getter);\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, capitalize, isGloballyWhitelisted, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, normalizeStyle } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn(msg, ...args) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n let res;\n try {\n res = args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n return res;\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] : type;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJobId = getId(queue[middle]);\n middleJobId < id ? start = middle + 1 : end = middle;\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)];\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n warn(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n props,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n let result;\n let fallthroughAttrs;\n const prev = setCurrentRenderingInstance(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n result = normalizeVNode(\n render.call(\n proxyToUse,\n proxyToUse,\n renderCache,\n props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return attrs;\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n props,\n null\n /* we know it doesn't need it */\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren);\n if (!childRoot) {\n return [vnode, void 0];\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent && parent.subTree === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else {\n suspense.pendingId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n suspense.pendingId++;\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n isSVG,\n container,\n hiddenContainer,\n anchor,\n deps: 0,\n pendingId: 0,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: true,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(pendingBranch, container2, anchor2, 0);\n }\n };\n }\n let { anchor: anchor2 } = suspense;\n if (activeBranch) {\n anchor2 = next(activeBranch);\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor2, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n isSVG2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n isSVG,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n document.createElement(\"div\"),\n null,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n /* hydrating */\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild) {\n warn(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n const el = vnode.el = branch.el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n var _a;\n return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;\n}\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\n var _a;\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow$1(source);\n } else if (isReactive(source)) {\n getter = () => source;\n deep = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return traverse(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (instance && instance.isUnmounted) {\n return;\n }\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some(\n (v, i) => hasChanged(v, oldValue[i])\n ) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, scheduler);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n const unwatch = () => {\n effect.stop();\n if (instance && instance.scope) {\n remove(instance.scope.effects, effect);\n }\n };\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const cur = currentInstance;\n setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n if (cur) {\n setCurrentInstance(cur);\n } else {\n unsetCurrentInstance();\n }\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n const internalInstance = currentRenderingInstance;\n if (internalInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(internalInstance) || internalInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n let prevTransitionKey;\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n let transitionKeyChanged = false;\n const { getTransitionKey } = innerChild.type;\n if (getTransitionKey) {\n const key = getTransitionKey();\n if (prevTransitionKey === void 0) {\n prevTransitionKey = key;\n } else if (key !== prevTransitionKey) {\n prevTransitionKey = key;\n transitionKeyChanged = true;\n }\n }\n if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\") {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el._leaveCb = () => {\n earlyRemove();\n el._leaveCb = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el._leaveCb) {\n el._leaveCb(\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) {\n leavingVNode.el._leaveCb();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el._enterCb = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el._enterCb = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el._enterCb) {\n el._enterCb(\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el._leaveCb = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el._leaveCb = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n /* do not throw in dev if user provided error component */\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n isSVG,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n unsetCurrentInstance();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, \"\"));\n warn(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n /* do not include inferred name to avoid breaking existing code */\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn(`Cannot mutate \n\n\n","\n\n\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 12 10\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M11.739 4.524a.625.625 0 0 0-.881.071l-3.534 4.16a.625.625 0 1 0 .953.81l3.533-4.16a.625.625 0 0 0-.071-.881Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M7.396.364a.625.625 0 0 0-.072.88l3.534 4.16a.625.625 0 0 0 .952-.809L8.277.435a.625.625 0 0 0-.881-.071Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M11.959 5a.625.625 0 0 0-.625-.625H.667a.625.625 0 1 0 0 1.25h10.667c.345 0 .625-.28.625-.625Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_5 = [\n _hoisted_2,\n _hoisted_3,\n _hoisted_4\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_5))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 16 16\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M13.726 3.547a.6.6 0 0 1 .06.846l-6.946 8a.6.6 0 0 1-.906 0l-3.72-4.285a.6.6 0 1 1 .905-.787l3.268 3.764 6.493-7.478a.6.6 0 0 1 .846-.06Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"currentColor\",\n viewBox: \"0 0 12 8\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", { d: \"M10.59.59 6 5.17 1.41.59 0 2l6 6 6-6L10.59.59Z\" }, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 20 20\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M.924 7.465a6.541 6.541 0 1 1 13.082 0 6.541 6.541 0 0 1-13.082 0Zm6.54-5.041a5.041 5.041 0 1 0 0 10.082 5.041 5.041 0 0 0 0-10.082ZM13.202 13.201a.75.75 0 0 1 1.06 0l4.556 4.556a.75.75 0 0 1-1.06 1.06l-4.556-4.555a.75.75 0 0 1 0-1.06Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n class: \"animate-spin\",\n viewBox: \"0 0 21 20\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M10.5 20c-5.523 0-10-4.477-10-10s4.477-10 10-10 10 4.477 10 10h-1.667a8.333 8.333 0 1 0-8.333 8.333V20Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 14 14\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M.333 7a6.667 6.667 0 1 1 13.334 0A6.667 6.667 0 0 1 .333 7ZM7 1.264a5.736 5.736 0 1 0 0 11.472A5.736 5.736 0 0 0 7 1.264Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M7 2.991c.257 0 .465.208.465.465V8.33a.465.465 0 1 1-.93 0V3.456c0-.257.208-.465.465-.465ZM7 9.414a.687.687 0 1 0 0 1.373.687.687 0 0 0 0-1.373Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = [\n _hoisted_2,\n _hoisted_3\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 20 20\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M9.93 6.65c.346 0 .626.28.626.626v5.172a.625.625 0 0 1-1.25 0V7.276c0-.346.28-.625.625-.625Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M8.86 2.278a1.2 1.2 0 0 1 2.148 0l7.117 14.24a1.2 1.2 0 0 1-1.068 1.728H2.812a1.2 1.2 0 0 1-1.069-1.728l.003-.004L8.86 2.278Zm1.074.648 7.032 14.07H2.902l7.032-14.07Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M9.93 13.835a.912.912 0 1 0 .001 1.824.912.912 0 0 0 0-1.824Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_5 = [\n _hoisted_2,\n _hoisted_3,\n _hoisted_4\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_5))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 12 12\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M11.232.827a.833.833 0 0 1 0 1.179l-9.226 9.226a.833.833 0 0 1-1.179-1.178L10.054.827a.833.833 0 0 1 1.178 0Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M.827.827a.833.833 0 0 1 1.179 0l9.226 9.227a.833.833 0 0 1-1.178 1.178L.827 2.006a.833.833 0 0 1 0-1.179Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = [\n _hoisted_2,\n _hoisted_3\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 8 12\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M.59 1.41 5.17 6 .59 10.59 2 12l6-6-6-6L.59 1.41Z\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 8 12\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M7.41 10.59 2.83 6l4.58-4.59L6 0 0 6l6 6 1.41-1.41Z\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 27 27\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M8.884.975a.975.975 0 1 0-1.95 0v4.333a.975.975 0 0 0 1.95 0V.975ZM3.555 2.6h1.727a.975.975 0 1 1 0 1.95H3.587A1.68 1.68 0 0 0 1.95 6.264v3.27h22.317v-3.27a1.68 1.68 0 0 0-1.636-1.714h-1.695a.975.975 0 0 1 0-1.95h1.726a3.63 3.63 0 0 1 3.555 3.692v16.232a3.63 3.63 0 0 1-3.554 3.692H3.556A3.631 3.631 0 0 1 0 22.524V6.292A3.63 3.63 0 0 1 3.555 2.6Zm-1.604 8.883v11.07a1.68 1.68 0 0 0 1.636 1.714H22.63a1.68 1.68 0 0 0 1.636-1.714v-11.07H1.951Zm7.583-7.908c0-.538.436-.975.975-.975h5.2a.975.975 0 0 1 0 1.95h-5.2a.975.975 0 0 1-.975-.975ZM18.309 0c.538 0 .975.437.975.975v4.333a.975.975 0 0 1-1.95 0V.975c0-.538.436-.975.975-.975Zm.866 14.3a1.408 1.408 0 1 0 0 2.817 1.408 1.408 0 0 0 0-2.817Zm-1.408 6.608a1.408 1.408 0 1 1 2.817 0 1.408 1.408 0 0 1-2.817 0ZM13.11 19.5a1.408 1.408 0 1 0 0 2.817 1.408 1.408 0 0 0 0-2.817ZM11.7 15.708a1.408 1.408 0 1 1 2.817 0 1.408 1.408 0 0 1-2.816 0ZM7.042 14.3a1.408 1.408 0 1 0 0 2.817 1.408 1.408 0 0 0 0-2.817Zm-1.408 6.608a1.408 1.408 0 1 1 2.816 0 1.408 1.408 0 0 1-2.816 0Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 40 40\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M0 20C0 8.954 8.954 0 20 0s20 8.954 20 20-8.954 20-20 20S0 31.046 0 20ZM20 2.79C10.496 2.79 2.79 10.497 2.79 20c0 9.504 7.706 17.21 17.21 17.21 9.504 0 17.21-7.706 17.21-17.21 0-9.504-7.706-17.21-17.21-17.21Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M29.417 12.88c.57.518.613 1.4.096 1.971L18.469 27.024a1.396 1.396 0 0 1-2.067 0l-5.914-6.526a1.395 1.395 0 1 1 2.068-1.873l4.88 5.384 10.01-11.033c.517-.57 1.4-.614 1.97-.096Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = [\n _hoisted_2,\n _hoisted_3\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 27 27\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M10.146.656A8.619 8.619 0 0 1 22.064 8.62c0 4.132-2.057 7.776-4.017 10.324a28.132 28.132 0 0 1-2.717 3.038 24.018 24.018 0 0 1-1.16 1.05l-.071.06-.02.016-.007.005-.002.001-.626-.78c-.624.781-.625.781-.625.78l-.003-.001-.006-.005-.02-.017a10.288 10.288 0 0 1-.33-.28c-.22-.191-.53-.47-.901-.83a28.137 28.137 0 0 1-2.717-3.037c-1.96-2.548-4.017-6.192-4.017-10.324A8.619 8.619 0 0 1 10.146.656Zm3.298 21.677.625.781a1 1 0 0 1-1.25 0l.625-.78Zm0-1.324a26.134 26.134 0 0 0 3.017-3.285c1.85-2.405 3.603-5.618 3.603-9.105a6.62 6.62 0 0 0-13.239 0c0 3.487 1.753 6.7 3.603 9.105a26.144 26.144 0 0 0 3.016 3.285Zm7.94-2.231a1 1 0 0 1 1.261-.639c1.156.38 2.163.85 2.902 1.42.724.559 1.342 1.337 1.342 2.33 0 1.006-.634 1.791-1.373 2.353-.755.574-1.784 1.047-2.966 1.427-2.375.764-5.595 1.22-9.106 1.22-3.51 0-6.73-.456-9.105-1.22-1.182-.38-2.211-.853-2.966-1.427C.633 23.68 0 22.895 0 21.889c0-.993.618-1.771 1.342-2.33.739-.57 1.746-1.04 2.902-1.42a1 1 0 1 1 .623 1.9c-1.043.343-1.814.727-2.303 1.104-.504.388-.564.649-.564.746 0 .099.063.365.583.76.505.384 1.298.772 2.368 1.116 2.129.684 5.132 1.124 8.493 1.124 3.362 0 6.365-.44 8.494-1.124 1.07-.344 1.863-.732 2.368-1.115.52-.396.583-.662.583-.761 0-.097-.06-.358-.564-.746-.489-.377-1.26-.761-2.303-1.103a1 1 0 0 1-.639-1.262ZM11.777 8.11a1.667 1.667 0 1 1 3.333 0 1.667 1.667 0 0 1-3.333 0Zm1.666-3.667a3.667 3.667 0 1 0 0 7.334 3.667 3.667 0 0 0 0-7.334Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 28 22\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M6.958 1.809a1 1 0 1 0-1.76-.95l-1.93 3.574-.895-.896A1 1 0 0 0 .96 4.952l1.844 1.844a1 1 0 0 0 1.587-.232L6.958 1.81Zm1.668 8.964a1 1 0 1 0 0 2h17.915a1 1 0 1 0 0-2H8.626Zm-1-6.166a1 1 0 0 1 1-1h17.915a1 1 0 1 1 0 2H8.626a1 1 0 0 1-1-1Zm1 13.332a1 1 0 1 0 0 2h17.915a1 1 0 1 0 0-2H8.626ZM6.554 7.619a1 1 0 0 1 .404 1.356L4.39 13.73a1 1 0 0 1-1.587.232L.96 12.118a1 1 0 1 1 1.414-1.415l.895.896 1.93-3.575a1 1 0 0 1 1.356-.404Zm.404 8.521a1 1 0 1 0-1.76-.95l-1.93 3.574-.895-.895A1 1 0 0 0 .96 19.283l1.844 1.845a1 1 0 0 0 1.587-.232l2.568-4.756Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 34 34\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"#1B6AD7\",\n \"fill-rule\": \"evenodd\",\n d: \"M11.585 1.444a1.25 1.25 0 0 0-2.5 0V7a1.25 1.25 0 1 0 2.5 0V1.444ZM4.753 3.528H7.002a1.25 1.25 0 1 1 0 2.5H4.794a2.155 2.155 0 0 0-2.098 2.197V12.416h28.611V8.225a2.155 2.155 0 0 0-2.098-2.197h-2.207a1.25 1.25 0 0 1 0-2.5H29.25a4.655 4.655 0 0 1 4.557 4.733v20.811a4.655 4.655 0 0 1-4.557 4.733H4.753a4.655 4.655 0 0 1-4.557-4.733V8.262a4.655 4.655 0 0 1 4.557-4.734Zm26.554 11.388H2.696v14.192a2.155 2.155 0 0 0 2.098 2.197h24.415a2.155 2.155 0 0 0 2.098-2.197V14.917ZM12.418 4.778c0-.69.56-1.25 1.25-1.25h6.667a1.25 1.25 0 0 1 0 2.5h-6.667c-.69 0-1.25-.56-1.25-1.25ZM23.668.194c.69 0 1.25.56 1.25 1.25V7a1.25 1.25 0 1 1-2.5 0V1.444c0-.69.56-1.25 1.25-1.25Zm-4.899 22.64 2.45 2.449a1.25 1.25 0 0 1-1.768 1.767l-2.45-2.449-2.449 2.45a1.25 1.25 0 1 1-1.768-1.768l2.45-2.45-2.45-2.45a1.25 1.25 0 0 1 1.768-1.767l2.45 2.45 2.449-2.45a1.25 1.25 0 1 1 1.768 1.768l-2.45 2.45Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 18 18\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n d: \"M13.45 3.547a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm3.833 2.017A6.326 6.326 0 0 0 16.9 3.54a4.117 4.117 0 0 0-.967-1.475 3.916 3.916 0 0 0-1.475-.958 6.083 6.083 0 0 0-2.025-.392C11.55.664 11.267.664 9 .664s-2.55 0-3.433.05a6.083 6.083 0 0 0-2.025.392 3.983 3.983 0 0 0-1.475.958 3.917 3.917 0 0 0-.959 1.475 6.083 6.083 0 0 0-.391 2.025c-.05.883-.05 1.167-.05 3.433 0 2.267 0 2.55.05 3.434.014.692.146 1.377.391 2.025.204.558.532 1.062.959 1.475.414.425.918.752 1.475.958a6.084 6.084 0 0 0 2.025.392c.883.05 1.166.05 3.433.05s2.55 0 3.433-.05a6.084 6.084 0 0 0 2.025-.392 3.916 3.916 0 0 0 1.475-.958 4.04 4.04 0 0 0 .967-1.475c.238-.65.367-1.334.383-2.025 0-.884.05-1.167.05-3.434 0-2.266 0-2.55-.05-3.433Zm-1.5 6.767a4.672 4.672 0 0 1-.283 1.55c-.133.362-.347.69-.625.958-.27.275-.597.489-.958.625a4.678 4.678 0 0 1-1.55.283c-.834.042-1.142.05-3.334.05-2.191 0-2.5 0-3.333-.05a4.775 4.775 0 0 1-1.617-.25 2.725 2.725 0 0 1-.916-.625 2.5 2.5 0 0 1-.617-.958 4.617 4.617 0 0 1-.333-1.583c0-.834-.05-1.142-.05-3.334 0-2.191 0-2.5.05-3.333.003-.54.102-1.077.291-1.583a2.5 2.5 0 0 1 .659-.917c.253-.286.566-.514.916-.667a4.775 4.775 0 0 1 1.584-.283c.833 0 1.141-.05 3.333-.05s2.5 0 3.333.05a4.675 4.675 0 0 1 1.55.283c.379.14.719.37.992.667.273.256.486.569.625.917.185.507.281 1.043.283 1.583.042.833.05 1.142.05 3.333 0 2.192-.008 2.5-.05 3.334ZM9 4.722a4.275 4.275 0 1 0 4.283 4.275A4.268 4.268 0 0 0 9 4.722Zm0 7.05a2.775 2.775 0 1 1 0-5.55 2.775 2.775 0 0 1 0 5.55Z\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n fill: \"none\",\n viewBox: \"0 0 11 18\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"currentColor\",\n \"fill-rule\": \"evenodd\",\n d: \"M4.112 1.443A4.792 4.792 0 0 1 7.5.039H10c.345 0 .625.28.625.625v3.333c0 .346-.28.625-.625.625H7.5a.208.208 0 0 0-.208.209v1.875H10a.625.625 0 0 1 .606.776l-.833 3.334a.625.625 0 0 1-.606.473H7.292v6.042c0 .345-.28.625-.625.625H3.333a.625.625 0 0 1-.625-.625v-6.042H.833a.625.625 0 0 1-.625-.625V7.331c0-.345.28-.625.625-.625h1.875V4.83c0-1.271.505-2.49 1.404-3.388ZM7.5 1.289a3.542 3.542 0 0 0-3.542 3.542v2.5c0 .345-.28.625-.625.625H1.458v2.083h1.875c.346 0 .625.28.625.625v6.042h2.084v-6.042c0-.345.28-.625.625-.625h2.012l.52-2.083H6.668a.625.625 0 0 1-.625-.625v-2.5A1.458 1.458 0 0 1 7.5 3.372h1.875V1.29H7.5Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_3))\n}\nexport default { render: render }","\n\n\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n const instance = target || getCurrentInstance();\n return isVue3 ? instance : instance == null ? void 0 : instance.proxy;\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, instance);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, instance);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onMounted(fn, instance);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, instance);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, notNullish, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\nimport { useEventListener as useEventListener$1 } from '@vueuse/core';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[k]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && permissionRead.value !== \"denied\") {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && permissionWrite.value !== \"denied\")\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n var _a2;\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), containerRect.width - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), containerRect.height - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener$1(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener$1(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener$1(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener$1(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold: 0\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n ...gamepad,\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = target.document ? target.document.documentElement : (_a = target.documentElement) != null ? _a : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, initialOverflow);\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n var _a;\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = (_a = elInitialOverflow.get(el)) != null ? _a : \"\";\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","export default \"__VITE_ASSET__a81b2229__\"","\n\n\n","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"54\",\n height: \"12\",\n fill: \"none\",\n \"aria-label\": \"Tillhub Logo\"\n}\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"#9295A3\",\n d: \"M18.889 11.488h1.03v-.795h-.989c-.278 0-.543-.028-.71-.085-.417-.156-.431-.54-.431-1.292V5.042h1.907v-.908H17.79v-2.94h-1.114v2.94h-1.56v.908h1.56v4.203c0 1.391.083 1.789.96 2.115.307.114.822.128 1.254.128Zm2.544-8.661h1.1v-1.25h-1.1v1.25Zm0 8.661h1.1V4.134h-1.1v7.354Zm3.305 0h1.1V.385h-1.1v11.103Zm3.304 0h1.1V.385h-1.1v11.103Zm3.304 0h1.1v-3.72c0-1.462.92-2.925 2.172-2.925.822 0 1.156.426 1.156 1.534v5.111h1.1V6.15c0-1.207-.348-2.158-1.907-2.158-1.128 0-2.005.582-2.465 1.874h-.028V.386h-1.128v11.102Zm9.632.142c1.253 0 1.991-.71 2.437-1.902h.042l.264 1.76h.78V4.134h-1.1V7.71c0 1.704-.85 3.067-2.033 3.067-.822 0-1.295-.426-1.295-1.533v-5.11h-1.1v5.338c0 1.207.487 2.158 2.005 2.158Zm9.048 0c1.95 0 2.98-1.562 2.98-3.833 0-2.47-.975-3.805-2.813-3.805-.849 0-1.865.482-2.297 1.789h-.111V.385h-1.087v11.203h.78l.362-1.548h.098c.404 1.008 1.114 1.59 2.088 1.59Zm-.139-.88c-1.128 0-2.033-.98-2.033-2.968 0-1.987 1.156-2.84 2.06-2.84 1.184 0 1.922.668 1.922 2.855 0 2.044-.78 2.953-1.949 2.953Z\"\n}, null, -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"path\", {\n fill: \"#9295A3\",\n \"fill-rule\": \"evenodd\",\n d: \"M6.42 0h5.35v5.455H6.42V0ZM0 0h5.35v12H0V0Zm11.77 6.545H6.42V12h5.35V6.545Z\",\n \"clip-rule\": \"evenodd\"\n}, null, -1)\nconst _hoisted_4 = [\n _hoisted_2,\n _hoisted_3\n]\n\nexport function render(_ctx, _cache) {\n return (_openBlock(), _createElementBlock(\"svg\", _hoisted_1, _hoisted_4))\n}\nexport default { render: render }","export const TERMS_AND_CONDITIONS_URL = 'https://www.tillhub.de/agb/'\nexport const PRIVACY_POLICY_URL = 'https://www.tillhub.de/datenschutz/'\nexport const IMPRINT_URL = 'https://www.tillhub.de/impressum/'\n","\n\n\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.fetchRetry = factory());\n})(this, (function () { 'use strict';\n\n var fetchRetry = function (fetch, defaults) {\n defaults = defaults || {};\n if (typeof fetch !== 'function') {\n throw new ArgumentError('fetch must be a function');\n }\n\n if (typeof defaults !== 'object') {\n throw new ArgumentError('defaults must be an object');\n }\n\n if (defaults.retries !== undefined && !isPositiveInteger(defaults.retries)) {\n throw new ArgumentError('retries must be a positive integer');\n }\n\n if (defaults.retryDelay !== undefined && !isPositiveInteger(defaults.retryDelay) && typeof defaults.retryDelay !== 'function') {\n throw new ArgumentError('retryDelay must be a positive integer or a function returning a positive integer');\n }\n\n if (defaults.retryOn !== undefined && !Array.isArray(defaults.retryOn) && typeof defaults.retryOn !== 'function') {\n throw new ArgumentError('retryOn property expects an array or function');\n }\n\n var baseDefaults = {\n retries: 3,\n retryDelay: 1000,\n retryOn: [],\n };\n\n defaults = Object.assign(baseDefaults, defaults);\n\n return function fetchRetry(input, init) {\n var retries = defaults.retries;\n var retryDelay = defaults.retryDelay;\n var retryOn = defaults.retryOn;\n\n if (init && init.retries !== undefined) {\n if (isPositiveInteger(init.retries)) {\n retries = init.retries;\n } else {\n throw new ArgumentError('retries must be a positive integer');\n }\n }\n\n if (init && init.retryDelay !== undefined) {\n if (isPositiveInteger(init.retryDelay) || (typeof init.retryDelay === 'function')) {\n retryDelay = init.retryDelay;\n } else {\n throw new ArgumentError('retryDelay must be a positive integer or a function returning a positive integer');\n }\n }\n\n if (init && init.retryOn) {\n if (Array.isArray(init.retryOn) || (typeof init.retryOn === 'function')) {\n retryOn = init.retryOn;\n } else {\n throw new ArgumentError('retryOn property expects an array or function');\n }\n }\n\n // eslint-disable-next-line no-undef\n return new Promise(function (resolve, reject) {\n var wrappedFetch = function (attempt) {\n // As of node 18, this is no longer needed since node comes with native support for fetch:\n /* istanbul ignore next */\n var _input =\n typeof Request !== 'undefined' && input instanceof Request\n ? input.clone()\n : input;\n fetch(_input, init)\n .then(function (response) {\n if (Array.isArray(retryOn) && retryOn.indexOf(response.status) === -1) {\n resolve(response);\n } else if (typeof retryOn === 'function') {\n try {\n // eslint-disable-next-line no-undef\n return Promise.resolve(retryOn(attempt, null, response))\n .then(function (retryOnResponse) {\n if(retryOnResponse) {\n retry(attempt, null, response);\n } else {\n resolve(response);\n }\n }).catch(reject);\n } catch (error) {\n reject(error);\n }\n } else {\n if (attempt < retries) {\n retry(attempt, null, response);\n } else {\n resolve(response);\n }\n }\n })\n .catch(function (error) {\n if (typeof retryOn === 'function') {\n try {\n // eslint-disable-next-line no-undef\n Promise.resolve(retryOn(attempt, error, null))\n .then(function (retryOnResponse) {\n if(retryOnResponse) {\n retry(attempt, error, null);\n } else {\n reject(error);\n }\n })\n .catch(function(error) {\n reject(error);\n });\n } catch(error) {\n reject(error);\n }\n } else if (attempt < retries) {\n retry(attempt, error, null);\n } else {\n reject(error);\n }\n });\n };\n\n function retry(attempt, error, response) {\n var delay = (typeof retryDelay === 'function') ?\n retryDelay(attempt, error, response) : retryDelay;\n setTimeout(function () {\n wrappedFetch(++attempt);\n }, delay);\n }\n\n wrappedFetch(0);\n });\n };\n };\n\n function isPositiveInteger(value) {\n return Number.isInteger(value) && value >= 0;\n }\n\n function ArgumentError(message) {\n this.name = 'ArgumentError';\n this.message = message;\n }\n\n return fetchRetry;\n\n}));\n","import { Env } from '@/env'\nimport { createFetch } from '@vueuse/core'\nimport fetchRetry from 'fetch-retry'\n\nconst retryableFetch = fetchRetry(window.fetch, {\n retryOn(retries, error, response) {\n // 0 based\n if (retries > 2) {\n return false\n }\n\n // Network errors, the request was not sent\n if (!response || error) {\n return true\n }\n\n // timeout, too many requests\n if ([408, 429].includes(response.status)) {\n return true\n }\n\n if (response.status >= 500) {\n return true\n }\n\n return false\n },\n retryDelay: (attempt) => (attempt + 1) * 1000\n})\n\n/**\n * The backend requires the organization name to be appended to the end of the url\n * This composable configures the base url and automatically adds the organization name.\n * Also, if you add any query variables, they will be moved to the end of the url\n */\nexport const useThFetch = createFetch({\n baseUrl: Env.VITE_VUE_APP_API_BASE,\n options: {\n // @TODO use Env when vitest is implemented\n // We do not need retry in tests\n fetch: typeof global === 'object' ? undefined : retryableFetch\n }\n})\n","import type { Configuration } from '@/types/Configuration'\nimport { useThFetch } from '@/composables/useThFetch'\nimport { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport type { UseFetchOptions } from '@vueuse/core'\nimport type { Branch } from '@/types'\n\nexport function useConfigurationQuery(options?: UseFetchOptions) {\n const store = useConfigurationStore()\n\n return useThFetch(() => `/v0/configurations/public/booking/${store.organization}`, {\n afterFetch(ctx) {\n return {\n ...ctx,\n data: ctx.data.results\n }\n },\n ...options\n }).json<{\n configuration: Configuration\n branch: Branch\n }>()\n}\n","export function hexToRGB(value: string) {\n value = value.replace(/^#/, '')\n\n if (value.length !== 6) {\n return null\n }\n\n const r = parseInt(value.substring(0, 2), 16)\n const g = parseInt(value.substring(2, 4), 16)\n const b = parseInt(value.substring(4, 6), 16)\n\n return [r, g, b]\n}\n","\n\n\n","\n\n\n","(function(){var o;\"use strict\";try{if(typeof document<\"u\"){var e=document.createElement(\"style\");e.nonce=(o=document.head.querySelector(\"meta[property=csp-nonce]\"))==null?void 0:o.content,e.appendChild(document.createTextNode(\".vue-notification-group{display:block;position:fixed;z-index:5000}.vue-notification-wrapper{display:block;overflow:hidden;width:100%;margin:0;padding:0}.notification-title{font-weight:600}.vue-notification-template{display:block;box-sizing:border-box;background:white;text-align:left}.vue-notification{display:block;box-sizing:border-box;text-align:left;font-size:12px;padding:10px;margin:0 5px 5px;color:#fff;background:#44A4FC;border-left:5px solid #187FE7}.vue-notification.warn{background:#ffb648;border-left-color:#f48a06}.vue-notification.error{background:#E54D42;border-left-color:#b82e24}.vue-notification.success{background:#68CD86;border-left-color:#42a85f}.vn-fade-enter-active,.vn-fade-leave-active,.vn-fade-move{transition:all .5s}.vn-fade-enter-from,.vn-fade-leave-to{opacity:0}\")),document.head.appendChild(e)}}catch(i){console.error(\"vite-plugin-css-injected-by-js\",i)}})();\nimport { defineComponent as D, createVNode as l, TransitionGroup as H, ref as $, computed as g, onMounted as et, Fragment as C, isVNode as nt } from \"vue\";\nconst R = /* @__PURE__ */ new Map();\nclass it {\n constructor(n, o, a) {\n this.remaining = o, this.callback = n, this.notifyItem = a, this.resume();\n }\n pause() {\n clearTimeout(this.notifyItem.timer), this.remaining -= Date.now() - this.start;\n }\n resume() {\n this.start = Date.now(), clearTimeout(this.notifyItem.timer), this.notifyItem.timer = setTimeout(this.callback, this.remaining);\n }\n}\nfunction ot(t) {\n return { all: t = t || /* @__PURE__ */ new Map(), on: function(n, o) {\n var a = t.get(n);\n a ? a.push(o) : t.set(n, [o]);\n }, off: function(n, o) {\n var a = t.get(n);\n a && (o ? a.splice(a.indexOf(o) >>> 0, 1) : t.set(n, []));\n }, emit: function(n, o) {\n var a = t.get(n);\n a && a.slice().map(function(s) {\n s(o);\n }), (a = t.get(\"*\")) && a.slice().map(function(s) {\n s(n, o);\n });\n } };\n}\nconst b = ot(), T = \"[-+]?[0-9]*.?[0-9]+\", M = [\n {\n name: \"px\",\n regexp: new RegExp(`^${T}px$`)\n },\n {\n name: \"%\",\n regexp: new RegExp(`^${T}%$`)\n },\n /**\n * Fallback option\n * If no suffix specified, assigning \"px\"\n */\n {\n name: \"px\",\n regexp: new RegExp(`^${T}$`)\n }\n], at = (t) => {\n if (t === \"auto\")\n return {\n type: t,\n value: 0\n };\n for (let n = 0; n < M.length; n++) {\n const o = M[n];\n if (o.regexp.test(t))\n return {\n type: o.name,\n value: parseFloat(t)\n };\n }\n return {\n type: \"\",\n value: t\n };\n}, rt = (t) => {\n switch (typeof t) {\n case \"number\":\n return { type: \"px\", value: t };\n case \"string\":\n return at(t);\n default:\n return { type: \"\", value: t };\n }\n}, k = {\n x: /* @__PURE__ */ new Set([\"left\", \"center\", \"right\"]),\n y: /* @__PURE__ */ new Set([\"top\", \"bottom\"])\n}, st = ((t) => () => t++)(0), lt = (t) => typeof t != \"string\" ? [] : t.split(/\\s+/gi).filter(Boolean), ct = (t) => {\n typeof t == \"string\" && (t = lt(t));\n let n = null, o = null;\n return t.forEach((a) => {\n k.y.has(a) && (o = a), k.x.has(a) && (n = a);\n }), { x: n, y: o };\n}, E = {\n position: [\"top\", \"right\"],\n cssAnimation: \"vn-fade\",\n velocityAnimation: {\n enter: (t) => ({\n height: [t.clientHeight, 0],\n opacity: [1, 0]\n }),\n leave: {\n height: 0,\n opacity: [0, 1]\n }\n }\n}, ut = /* @__PURE__ */ D({\n name: \"velocity-group\",\n inheritAttrs: !1,\n props: {\n name: {\n type: String,\n default: \"\"\n }\n },\n emits: {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n enter: (t, n) => !0,\n leave: (t, n) => !0,\n afterLeave: () => !0\n /* eslint-enable @typescript-eslint/no-unused-vars */\n },\n setup: (t, {\n slots: n,\n emit: o\n }) => {\n const a = (c, u) => {\n o(\"enter\", c, u);\n }, s = (c, u) => {\n o(\"leave\", c, u);\n }, h = () => {\n o(\"afterLeave\");\n };\n return () => l(H, {\n tag: \"div\",\n css: !1,\n name: t.name,\n onEnter: a,\n onLeave: s,\n onAfterLeave: h\n }, {\n default: () => {\n var c;\n return [(c = n.default) == null ? void 0 : c.call(n)];\n }\n });\n }\n}), ft = /* @__PURE__ */ D({\n name: \"css-group\",\n inheritAttrs: !1,\n props: {\n name: {\n type: String,\n default: \"\"\n }\n },\n setup: (t, {\n slots: n\n }) => () => l(H, {\n tag: \"div\",\n name: t.name\n }, {\n default: () => {\n var o;\n return [(o = n.default) == null ? void 0 : o.call(n)];\n }\n })\n});\nfunction dt(t) {\n return typeof t == \"function\" || Object.prototype.toString.call(t) === \"[object Object]\" && !nt(t);\n}\nconst x = {\n IDLE: 0,\n DESTROYED: 2\n}, pt = /* @__PURE__ */ D({\n // eslint-disable-next-line vue/multi-word-component-names\n name: \"notifications\",\n props: {\n group: {\n type: String,\n default: \"\"\n },\n /** \n * Width of notification holder, can be `%`, `px` string or number.\n * @example '100%', '200px', 200 \n * */\n width: {\n type: [Number, String],\n default: 300\n },\n reverse: {\n type: Boolean,\n default: !1\n },\n position: {\n type: [String, Array],\n default: () => E.position\n },\n classes: {\n type: [String, Array],\n default: \"vue-notification\"\n },\n animationType: {\n type: String,\n default: \"css\",\n validator(t) {\n return t === \"css\" || t === \"velocity\";\n }\n },\n animation: {\n type: Object,\n default() {\n return E.velocityAnimation;\n }\n },\n animationName: {\n type: String,\n default: E.cssAnimation\n },\n speed: {\n type: Number,\n default: 300\n },\n /** Time (in ms) to keep the notification on screen (if **negative** - notification will stay **forever** or until clicked) */\n duration: {\n type: Number,\n default: 3e3\n },\n delay: {\n type: Number,\n default: 0\n },\n max: {\n type: Number,\n default: 1 / 0\n },\n ignoreDuplicates: {\n type: Boolean,\n default: !1\n },\n closeOnClick: {\n type: Boolean,\n default: !0\n },\n pauseOnHover: {\n type: Boolean,\n default: !1\n },\n /** Use [v-html](https://vuejs.org/api/built-in-directives.html#v-html) to set `title` and `text` */\n dangerouslySetInnerHtml: {\n type: Boolean,\n default: !1\n }\n },\n emits: {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n click: (t) => !0,\n destroy: (t) => !0,\n start: (t) => !0\n /* eslint-enable @typescript-eslint/no-unused-vars */\n },\n slots: Object,\n setup: (t, {\n emit: n,\n slots: o,\n expose: a\n }) => {\n const s = $([]), h = $(null), c = R.get(\"velocity\"), u = g(() => t.animationType === \"velocity\"), j = g(() => u.value ? ut : ft), f = g(() => s.value.filter((e) => e.state !== x.DESTROYED)), A = g(() => rt(t.width)), N = g(() => {\n const {\n x: e,\n y: i\n } = ct(t.position), r = A.value.value, d = A.value.type, m = {\n width: r + d\n };\n return i && (m[i] = \"0px\"), e && (e === \"center\" ? m.left = `calc(50% - ${+r / 2}${d})` : m[e] = \"0px\"), m;\n }), O = g(() => \"bottom\" in N.value), B = (e) => {\n n(\"click\", e), t.closeOnClick && y(e);\n }, V = () => {\n var e;\n t.pauseOnHover && ((e = h.value) == null || e.pause());\n }, Y = () => {\n var e;\n t.pauseOnHover && ((e = h.value) == null || e.resume());\n }, G = (e = {}) => {\n if (e.group || (e.group = \"\"), e.data || (e.data = {}), t.group !== e.group)\n return;\n if (e.clean || e.clear) {\n q();\n return;\n }\n const i = typeof e.duration == \"number\" ? e.duration : t.duration, r = typeof e.speed == \"number\" ? e.speed : t.speed, d = typeof e.ignoreDuplicates == \"boolean\" ? e.ignoreDuplicates : t.ignoreDuplicates, {\n title: m,\n text: K,\n type: Q,\n data: U,\n id: X\n } = e, p = {\n id: X || st(),\n title: m,\n text: K,\n type: Q,\n state: x.IDLE,\n speed: r,\n length: i + 2 * r,\n data: U\n };\n i >= 0 && (h.value = new it(() => y(p), p.length, p));\n const Z = t.reverse ? !O.value : O.value;\n let v = -1;\n const tt = f.value.some((L) => L.title === e.title && L.text === e.text);\n (!d || !tt) && (Z ? (s.value.push(p), n(\"start\", p), f.value.length > t.max && (v = 0)) : (s.value.unshift(p), n(\"start\", p), f.value.length > t.max && (v = f.value.length - 1)), v !== -1 && y(f.value[v]));\n }, _ = (e) => {\n W(e);\n }, F = (e) => [\"vue-notification-template\", t.classes, e.type || \"\"], P = (e) => u.value ? void 0 : {\n transition: `all ${e.speed}ms`\n }, y = (e) => {\n clearTimeout(e.timer), e.state = x.DESTROYED, I(), n(\"destroy\", e);\n }, W = (e) => {\n const i = s.value.find((r) => r.id === e);\n i && y(i);\n }, q = () => {\n f.value.forEach(y);\n }, w = (e, i) => {\n var d;\n const r = (d = t.animation) == null ? void 0 : d[e];\n return typeof r == \"function\" ? r(i) : r;\n }, z = (e, i) => {\n if (!u.value)\n return;\n const r = w(\"enter\", e);\n c(e, r, {\n duration: t.speed,\n complete: i\n });\n }, J = (e, i) => {\n if (!u.value)\n return;\n const r = w(\"leave\", e);\n c(e, r, {\n duration: t.speed,\n complete: i\n });\n };\n function I() {\n s.value = s.value.filter((e) => e.state !== x.DESTROYED);\n }\n return et(() => {\n b.on(\"add\", G), b.on(\"close\", _);\n }), () => {\n let e;\n return l(\"div\", {\n class: \"vue-notification-group\",\n style: N.value\n }, [l(j.value, {\n name: t.animationName,\n onEnter: z,\n onLeave: J,\n onAfterLeave: I\n }, dt(e = f.value.map((i) => l(\"div\", {\n key: i.id,\n class: \"vue-notification-wrapper\",\n style: P(i),\n \"data-id\": i.id,\n onMouseenter: V,\n onMouseleave: Y\n }, [o.body ? o.body({\n item: i,\n class: [t.classes, i.type],\n close: () => y(i)\n }) : l(\"div\", {\n class: F(i),\n onClick: () => B(i)\n }, [t.dangerouslySetInnerHtml ? l(C, null, [i.title ? l(\"div\", {\n class: \"notification-title\",\n innerHTML: i.title\n }, null) : null, l(\"div\", {\n class: \"notification-content\",\n innerHTML: i.text\n }, null)]) : l(C, null, [i.title ? l(\"div\", {\n class: \"notification-title\"\n }, [i.title]) : null, l(\"div\", {\n class: \"notification-content\"\n }, [i.text])])])]))) ? e : {\n default: () => [e]\n })]);\n };\n }\n}), S = (t) => {\n typeof t == \"string\" && (t = { title: \"\", text: t }), typeof t == \"object\" && b.emit(\"add\", t);\n};\nS.close = (t) => {\n b.emit(\"close\", t);\n};\nconst vt = () => ({ notify: S }), yt = \"Notifications\";\nfunction mt(t, n = {}) {\n Object.entries(n).forEach((a) => R.set(...a));\n const o = n.name || \"notify\";\n t.config.globalProperties[\"$\" + o] = S, t.component(n.componentName || yt, pt);\n}\nconst xt = {\n install: mt\n};\nexport {\n pt as Notifications,\n xt as default,\n S as notify,\n vt as useNotification\n};\n","\n\n\n\n\n","\n\n\n","import { createRouter, createWebHistory } from 'vue-router'\n\nexport const createAppRouter = () => {\n return createRouter({\n history: createWebHistory(),\n routes: [\n {\n path: '/:organization',\n name: 'appointment_create',\n component: () => import('@/views/appointments/AppointmentCreateView.vue'),\n meta: {\n layout: 'blank'\n }\n },\n {\n path: '/:organization/appointments/:id',\n component: () => import('@/views/appointments/AppointmentEditView.vue'),\n beforeEnter(to) {\n // Ensure they always start at the root route\n if (to.name !== 'appointment') {\n return {\n name: 'appointment',\n params: to.params,\n query: to.query\n }\n }\n },\n children: [\n {\n name: 'appointment',\n path: '',\n component: () => import('@/views/appointments/AppointmentView.vue')\n },\n {\n name: 'appointment_cancelled',\n path: '/:organization/appointments/:id/cancelled',\n component: () => import('@/views/appointments/AppointmentCancelledView.vue')\n },\n {\n name: 'appointment_reschedule',\n path: '/:organization/appointments/:id/reschedule',\n component: () => import('@/views/appointments/AppointmentRescheduleView.vue')\n },\n {\n name: 'appointment_rescheduled',\n path: '/:organization/appointments/:id/rescheduled',\n component: () => import('@/views/appointments/AppointmentRescheduledView.vue')\n }\n ]\n },\n {\n // This is a 404 page where the merchant was found, but the page visited\n // did not exist\n path: '/:organization/:pathMatch(.*)*',\n name: 'not_found',\n component: () => import('@/views/NotFoundView.vue')\n },\n {\n // This is handled by App.vue, but its added here so that VueRouter\n // does not complain about not finding routes\n path: '/',\n component: () => import('@/views/NotFoundView.vue')\n }\n ]\n })\n}\n\nexport default createAppRouter()\n","import * as pinia from 'pinia'\n\nexport function createPinia() {\n return pinia.createPinia()\n}\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+\"-\"+r[1]+\"-\"+r[2]+\" \"+l+\":\"+r[4]+\":\"+r[5]+\":000\",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString(\"en-US\",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set(\"millisecond\",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,\"minute\")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if(\"string\"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));","!function(t,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s():\"function\"==typeof define&&define.amd?define(s):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2592e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,\"Y\"),s=v(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,\"D\"),e=v(this.$d.hours,\"H\"),r=v(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=v(o,\"S\"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",h=(d?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===h||\"-P\"===h?\"P0D\":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/h[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}(),p=function(t,s,n){return t.add(s.years()*n,\"y\").add(s.months()*n,\"M\").add(s.days()*n,\"d\").add(s.hours()*n,\"h\").add(s.minutes()*n,\"m\").add(s.seconds()*n,\"s\").add(s.milliseconds()*n,\"ms\")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){\"use strict\";var e=\"day\";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf(\"year\"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,\"week\")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return\"isoweek\"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf(\"day\"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(\"day\"):n.bind(this)(e,t)}}}));","!function(e,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(n):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_minMax=n()}(this,(function(){\"use strict\";return function(e,n,t){var i=function(e,n){if(!n||!n.length||1===n.length&&!n[0]||1===n.length&&Array.isArray(n[0])&&!n[0].length)return null;var t;1===n.length&&n[0].length>0&&(n=n[0]);t=(n=n.filter((function(e){return e})))[0];for(var i=1;i= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","export var SUCCESS_MESSAGE = 'Event tracked successfully';\nexport var UNEXPECTED_ERROR_MESSAGE = 'Unexpected error occurred';\nexport var MAX_RETRIES_EXCEEDED_MESSAGE = 'Event rejected due to exceeded retry count';\nexport var OPT_OUT_MESSAGE = 'Event skipped due to optOut config';\nexport var MISSING_API_KEY_MESSAGE = 'Event rejected due to missing API key';\nexport var INVALID_API_KEY = 'Invalid API key';\nexport var CLIENT_NOT_INITIALIZED = 'Client not initialized';\n//# sourceMappingURL=messages.js.map","export var IdentifyOperation;\n(function (IdentifyOperation) {\n // Base Operations to set values\n IdentifyOperation[\"SET\"] = \"$set\";\n IdentifyOperation[\"SET_ONCE\"] = \"$setOnce\";\n // Operations around modifying existing values\n IdentifyOperation[\"ADD\"] = \"$add\";\n IdentifyOperation[\"APPEND\"] = \"$append\";\n IdentifyOperation[\"PREPEND\"] = \"$prepend\";\n IdentifyOperation[\"REMOVE\"] = \"$remove\";\n // Operations around appending values *if* they aren't present\n IdentifyOperation[\"PREINSERT\"] = \"$preInsert\";\n IdentifyOperation[\"POSTINSERT\"] = \"$postInsert\";\n // Operations around removing properties/values\n IdentifyOperation[\"UNSET\"] = \"$unset\";\n IdentifyOperation[\"CLEAR_ALL\"] = \"$clearAll\";\n})(IdentifyOperation || (IdentifyOperation = {}));\nexport var RevenueProperty;\n(function (RevenueProperty) {\n RevenueProperty[\"REVENUE_PRODUCT_ID\"] = \"$productId\";\n RevenueProperty[\"REVENUE_QUANTITY\"] = \"$quantity\";\n RevenueProperty[\"REVENUE_PRICE\"] = \"$price\";\n RevenueProperty[\"REVENUE_TYPE\"] = \"$revenueType\";\n RevenueProperty[\"REVENUE\"] = \"$revenue\";\n})(RevenueProperty || (RevenueProperty = {}));\n/**\n * Strings that have special meaning when used as an event's type\n * and have different specifications.\n */\nexport var SpecialEventType;\n(function (SpecialEventType) {\n SpecialEventType[\"IDENTIFY\"] = \"$identify\";\n SpecialEventType[\"GROUP_IDENTIFY\"] = \"$groupidentify\";\n SpecialEventType[\"REVENUE\"] = \"revenue_amount\";\n})(SpecialEventType || (SpecialEventType = {}));\n//# sourceMappingURL=event.js.map","export var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"None\"] = 0] = \"None\";\n LogLevel[LogLevel[\"Error\"] = 1] = \"Error\";\n LogLevel[LogLevel[\"Warn\"] = 2] = \"Warn\";\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\n LogLevel[LogLevel[\"Debug\"] = 4] = \"Debug\";\n})(LogLevel || (LogLevel = {}));\n//# sourceMappingURL=logger.js.map","/**\n * @deprecated use ServerZoneType instead\n */\nexport var ServerZone;\n(function (ServerZone) {\n ServerZone[\"US\"] = \"US\";\n ServerZone[\"EU\"] = \"EU\";\n})(ServerZone || (ServerZone = {}));\n//# sourceMappingURL=server-zone.js.map","/** The status of an event. */\nexport var Status;\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent successfully. */\n Status[\"Success\"] = \"success\";\n /** A user or device in the payload is currently rate limited and should try again later. */\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The sent payload was too large to be processed. */\n Status[\"PayloadTooLarge\"] = \"payload_too_large\";\n /** The event could not be processed. */\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error ocurred during submission. */\n Status[\"Failed\"] = \"failed\";\n /** a server or client side error occuring when a request takes too long and is cancelled */\n Status[\"Timeout\"] = \"Timeout\";\n /** NodeJS runtime environment error.. E.g. disconnected from network */\n Status[\"SystemError\"] = \"SystemError\";\n})(Status || (Status = {}));\n//# sourceMappingURL=status.js.map","import { Status } from '@amplitude/analytics-types';\nexport var buildResult = function (event, code, message) {\n if (code === void 0) { code = 0; }\n if (message === void 0) { message = Status.Unknown; }\n return { event: event, code: code, message: message };\n};\n//# sourceMappingURL=result-builder.js.map","/**\n * Source: [jed's gist]{@link https://gist.github.com/982883}.\n * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,\n * where each x is replaced with a random hexadecimal digit from 0 to f, and\n * y is replaced with a random hexadecimal digit from 8 to b.\n * Used to generate UUIDs for deviceIds.\n * @private\n */\nexport var UUID = function (a) {\n return a // if the placeholder was passed, return\n ? // a random number from 0 to 15\n (a ^ // unless b is 8,\n ((Math.random() * // in which case\n 16) >> // a random number from\n (a / 4))) // 8 to 11\n .toString(16) // in hexadecimal\n : // or otherwise a concatenated string:\n (String(1e7) + // 10000000 +\n String(-1e3) + // -1000 +\n String(-4e3) + // -4000 +\n String(-8e3) + // -80000000 +\n String(-1e11)) // -100000000000,\n .replace(\n // replacing\n /[018]/g, // zeroes, ones, and eights with\n UUID);\n};\n//# sourceMappingURL=uuid.js.map","import { __assign, __awaiter, __generator, __read, __values } from \"tslib\";\nimport { buildResult } from './utils/result-builder';\nimport { UUID } from './utils/uuid';\nvar Timeline = /** @class */ (function () {\n function Timeline(client) {\n this.client = client;\n this.queue = [];\n // Flag to guarantee one schedule apply is running\n this.applying = false;\n // Flag indicates whether timeline is ready to process event\n // Events collected before timeline is ready will stay in the queue to be processed later\n this.plugins = [];\n }\n Timeline.prototype.register = function (plugin, config) {\n var _a, _b, _c;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n plugin.name = (_a = plugin.name) !== null && _a !== void 0 ? _a : UUID();\n plugin.type = (_b = plugin.type) !== null && _b !== void 0 ? _b : 'enrichment';\n return [4 /*yield*/, ((_c = plugin.setup) === null || _c === void 0 ? void 0 : _c.call(plugin, config, this.client))];\n case 1:\n _d.sent();\n this.plugins.push(plugin);\n return [2 /*return*/];\n }\n });\n });\n };\n Timeline.prototype.deregister = function (pluginName) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var index, plugin;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n index = this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; });\n plugin = this.plugins[index];\n this.plugins.splice(index, 1);\n return [4 /*yield*/, ((_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin))];\n case 1:\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n Timeline.prototype.reset = function (client) {\n this.applying = false;\n var plugins = this.plugins;\n plugins.map(function (plugin) { var _a; return (_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin); });\n this.plugins = [];\n this.client = client;\n };\n Timeline.prototype.push = function (event) {\n var _this = this;\n return new Promise(function (resolve) {\n _this.queue.push([event, resolve]);\n _this.scheduleApply(0);\n });\n };\n Timeline.prototype.scheduleApply = function (timeout) {\n var _this = this;\n if (this.applying)\n return;\n this.applying = true;\n setTimeout(function () {\n void _this.apply(_this.queue.shift()).then(function () {\n _this.applying = false;\n if (_this.queue.length > 0) {\n _this.scheduleApply(0);\n }\n });\n }, timeout);\n };\n Timeline.prototype.apply = function (item) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, event, _b, resolve, before, before_1, before_1_1, plugin, e, e_1_1, enrichment, enrichment_1, enrichment_1_1, plugin, e, e_2_1, destination, executeDestinations;\n var e_1, _c, e_2, _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (!item) {\n return [2 /*return*/];\n }\n _a = __read(item, 1), event = _a[0];\n _b = __read(item, 2), resolve = _b[1];\n before = this.plugins.filter(function (plugin) { return plugin.type === 'before'; });\n _e.label = 1;\n case 1:\n _e.trys.push([1, 6, 7, 8]);\n before_1 = __values(before), before_1_1 = before_1.next();\n _e.label = 2;\n case 2:\n if (!!before_1_1.done) return [3 /*break*/, 5];\n plugin = before_1_1.value;\n /* istanbul ignore if */\n if (!plugin.execute) {\n // do nothing\n return [3 /*break*/, 4];\n }\n return [4 /*yield*/, plugin.execute(__assign({}, event))];\n case 3:\n e = _e.sent();\n if (e === null) {\n resolve({ event: event, code: 0, message: '' });\n return [2 /*return*/];\n }\n else {\n event = e;\n }\n _e.label = 4;\n case 4:\n before_1_1 = before_1.next();\n return [3 /*break*/, 2];\n case 5: return [3 /*break*/, 8];\n case 6:\n e_1_1 = _e.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 8];\n case 7:\n try {\n if (before_1_1 && !before_1_1.done && (_c = before_1.return)) _c.call(before_1);\n }\n finally { if (e_1) throw e_1.error; }\n return [7 /*endfinally*/];\n case 8:\n enrichment = this.plugins.filter(function (plugin) { return plugin.type === 'enrichment' || plugin.type === undefined; });\n _e.label = 9;\n case 9:\n _e.trys.push([9, 14, 15, 16]);\n enrichment_1 = __values(enrichment), enrichment_1_1 = enrichment_1.next();\n _e.label = 10;\n case 10:\n if (!!enrichment_1_1.done) return [3 /*break*/, 13];\n plugin = enrichment_1_1.value;\n /* istanbul ignore if */\n if (!plugin.execute) {\n // do nothing\n return [3 /*break*/, 12];\n }\n return [4 /*yield*/, plugin.execute(__assign({}, event))];\n case 11:\n e = _e.sent();\n if (e === null) {\n resolve({ event: event, code: 0, message: '' });\n return [2 /*return*/];\n }\n else {\n event = e;\n }\n _e.label = 12;\n case 12:\n enrichment_1_1 = enrichment_1.next();\n return [3 /*break*/, 10];\n case 13: return [3 /*break*/, 16];\n case 14:\n e_2_1 = _e.sent();\n e_2 = { error: e_2_1 };\n return [3 /*break*/, 16];\n case 15:\n try {\n if (enrichment_1_1 && !enrichment_1_1.done && (_d = enrichment_1.return)) _d.call(enrichment_1);\n }\n finally { if (e_2) throw e_2.error; }\n return [7 /*endfinally*/];\n case 16:\n destination = this.plugins.filter(function (plugin) { return plugin.type === 'destination'; });\n executeDestinations = destination.map(function (plugin) {\n var eventClone = __assign({}, event);\n return plugin.execute(eventClone).catch(function (e) { return buildResult(eventClone, 0, String(e)); });\n });\n void Promise.all(executeDestinations).then(function (_a) {\n var _b = __read(_a, 1), result = _b[0];\n var resolveResult = result || buildResult(event, 100, 'Event not tracked, no destination plugins on the instance');\n resolve(resolveResult);\n });\n return [2 /*return*/];\n }\n });\n });\n };\n Timeline.prototype.flush = function () {\n return __awaiter(this, void 0, void 0, function () {\n var queue, destination, executeDestinations;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n queue = this.queue;\n this.queue = [];\n return [4 /*yield*/, Promise.all(queue.map(function (item) { return _this.apply(item); }))];\n case 1:\n _a.sent();\n destination = this.plugins.filter(function (plugin) { return plugin.type === 'destination'; });\n executeDestinations = destination.map(function (plugin) {\n return plugin.flush && plugin.flush();\n });\n return [4 /*yield*/, Promise.all(executeDestinations)];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return Timeline;\n}());\nexport { Timeline };\n//# sourceMappingURL=timeline.js.map","export var UNSET_VALUE = '-';\nexport var AMPLITUDE_PREFIX = 'AMP';\nexport var STORAGE_PREFIX = \"\".concat(AMPLITUDE_PREFIX, \"_unsent\");\nexport var AMPLITUDE_SERVER_URL = 'https://api2.amplitude.com/2/httpapi';\nexport var EU_AMPLITUDE_SERVER_URL = 'https://api.eu.amplitude.com/2/httpapi';\nexport var AMPLITUDE_BATCH_SERVER_URL = 'https://api2.amplitude.com/batch';\nexport var EU_AMPLITUDE_BATCH_SERVER_URL = 'https://api.eu.amplitude.com/batch';\n//# sourceMappingURL=constants.js.map","import { __values } from \"tslib\";\nvar MAX_PROPERTY_KEYS = 1000;\nexport var isValidObject = function (properties) {\n if (Object.keys(properties).length > MAX_PROPERTY_KEYS) {\n return false;\n }\n for (var key in properties) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var value = properties[key];\n if (!isValidProperties(key, value))\n return false;\n }\n return true;\n};\nexport var isValidProperties = function (property, value) {\n var e_1, _a;\n if (typeof property !== 'string')\n return false;\n if (Array.isArray(value)) {\n var isValid = true;\n try {\n for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {\n var valueElement = value_1_1.value;\n if (Array.isArray(valueElement)) {\n return false;\n }\n else if (typeof valueElement === 'object') {\n isValid = isValid && isValidObject(valueElement);\n }\n else if (!['number', 'string'].includes(typeof valueElement)) {\n return false;\n }\n if (!isValid) {\n return false;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (value === null || value === undefined) {\n return false;\n }\n else if (typeof value === 'object') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return isValidObject(value);\n }\n else if (!['number', 'string', 'boolean'].includes(typeof value)) {\n return false;\n }\n return true;\n};\n//# sourceMappingURL=valid-properties.js.map","import { __assign } from \"tslib\";\nimport { IdentifyOperation, } from '@amplitude/analytics-types';\nimport { UNSET_VALUE } from './constants';\nimport { isValidProperties } from './utils/valid-properties';\nvar Identify = /** @class */ (function () {\n function Identify() {\n this._propertySet = new Set();\n this._properties = {};\n }\n Identify.prototype.getUserProperties = function () {\n return __assign({}, this._properties);\n };\n Identify.prototype.set = function (property, value) {\n this._safeSet(IdentifyOperation.SET, property, value);\n return this;\n };\n Identify.prototype.setOnce = function (property, value) {\n this._safeSet(IdentifyOperation.SET_ONCE, property, value);\n return this;\n };\n Identify.prototype.append = function (property, value) {\n this._safeSet(IdentifyOperation.APPEND, property, value);\n return this;\n };\n Identify.prototype.prepend = function (property, value) {\n this._safeSet(IdentifyOperation.PREPEND, property, value);\n return this;\n };\n Identify.prototype.postInsert = function (property, value) {\n this._safeSet(IdentifyOperation.POSTINSERT, property, value);\n return this;\n };\n Identify.prototype.preInsert = function (property, value) {\n this._safeSet(IdentifyOperation.PREINSERT, property, value);\n return this;\n };\n Identify.prototype.remove = function (property, value) {\n this._safeSet(IdentifyOperation.REMOVE, property, value);\n return this;\n };\n Identify.prototype.add = function (property, value) {\n this._safeSet(IdentifyOperation.ADD, property, value);\n return this;\n };\n Identify.prototype.unset = function (property) {\n this._safeSet(IdentifyOperation.UNSET, property, UNSET_VALUE);\n return this;\n };\n Identify.prototype.clearAll = function () {\n // When clear all happens, all properties are unset. Reset the entire object.\n this._properties = {};\n this._properties[IdentifyOperation.CLEAR_ALL] = UNSET_VALUE;\n return this;\n };\n // Returns whether or not this set actually worked.\n Identify.prototype._safeSet = function (operation, property, value) {\n if (this._validate(operation, property, value)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var userPropertyMap = this._properties[operation];\n if (userPropertyMap === undefined) {\n userPropertyMap = {};\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this._properties[operation] = userPropertyMap;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n userPropertyMap[property] = value;\n this._propertySet.add(property);\n return true;\n }\n return false;\n };\n Identify.prototype._validate = function (operation, property, value) {\n if (this._properties[IdentifyOperation.CLEAR_ALL] !== undefined) {\n // clear all already set. Skipping operation;\n return false;\n }\n if (this._propertySet.has(property)) {\n // Property already used. Skipping operation\n return false;\n }\n if (operation === IdentifyOperation.ADD) {\n return typeof value === 'number';\n }\n if (operation !== IdentifyOperation.UNSET && operation !== IdentifyOperation.REMOVE) {\n return isValidProperties(property, value);\n }\n return true;\n };\n return Identify;\n}());\nexport { Identify };\n//# sourceMappingURL=identify.js.map","import { __assign } from \"tslib\";\nimport { SpecialEventType, } from '@amplitude/analytics-types';\nimport { Identify } from '../identify';\nexport var createTrackEvent = function (eventInput, eventProperties, eventOptions) {\n var baseEvent = typeof eventInput === 'string' ? { event_type: eventInput } : eventInput;\n return __assign(__assign(__assign({}, baseEvent), eventOptions), (eventProperties && { event_properties: eventProperties }));\n};\nexport var createIdentifyEvent = function (identify, eventOptions) {\n var identifyEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties() });\n return identifyEvent;\n};\nexport var createGroupIdentifyEvent = function (groupType, groupName, identify, eventOptions) {\n var _a;\n var groupIdentify = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.GROUP_IDENTIFY, group_properties: identify.getUserProperties(), groups: (_a = {},\n _a[groupType] = groupName,\n _a) });\n return groupIdentify;\n};\nexport var createGroupEvent = function (groupType, groupName, eventOptions) {\n var _a;\n var identify = new Identify();\n identify.set(groupType, groupName);\n var groupEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties(), groups: (_a = {},\n _a[groupType] = groupName,\n _a) });\n return groupEvent;\n};\nexport var createRevenueEvent = function (revenue, eventOptions) {\n return __assign(__assign({}, eventOptions), { event_type: SpecialEventType.REVENUE, event_properties: revenue.getEventProperties() });\n};\n//# sourceMappingURL=event-builder.js.map","export var returnWrapper = function (awaitable) { return ({\n promise: awaitable || Promise.resolve(),\n}); };\n//# sourceMappingURL=return-wrapper.js.map","import { __awaiter, __generator, __values } from \"tslib\";\nimport { CLIENT_NOT_INITIALIZED, OPT_OUT_MESSAGE } from './messages';\nimport { Timeline } from './timeline';\nimport { createGroupEvent, createGroupIdentifyEvent, createIdentifyEvent, createRevenueEvent, createTrackEvent, } from './utils/event-builder';\nimport { buildResult } from './utils/result-builder';\nimport { returnWrapper } from './utils/return-wrapper';\nvar AmplitudeCore = /** @class */ (function () {\n function AmplitudeCore(name) {\n if (name === void 0) { name = '$default'; }\n this.initializing = false;\n this.q = [];\n this.dispatchQ = [];\n this.logEvent = this.track.bind(this);\n this.timeline = new Timeline(this);\n this.name = name;\n }\n AmplitudeCore.prototype._init = function (config) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.config = config;\n this.timeline.reset(this);\n return [4 /*yield*/, this.runQueuedFunctions('q')];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.runQueuedFunctions = function (queueName) {\n return __awaiter(this, void 0, void 0, function () {\n var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, e_1_1;\n var e_1, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n queuedFunctions = this[queueName];\n this[queueName] = [];\n _b.label = 1;\n case 1:\n _b.trys.push([1, 6, 7, 8]);\n queuedFunctions_1 = __values(queuedFunctions), queuedFunctions_1_1 = queuedFunctions_1.next();\n _b.label = 2;\n case 2:\n if (!!queuedFunctions_1_1.done) return [3 /*break*/, 5];\n queuedFunction = queuedFunctions_1_1.value;\n return [4 /*yield*/, queuedFunction()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n queuedFunctions_1_1 = queuedFunctions_1.next();\n return [3 /*break*/, 2];\n case 5: return [3 /*break*/, 8];\n case 6:\n e_1_1 = _b.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 8];\n case 7:\n try {\n if (queuedFunctions_1_1 && !queuedFunctions_1_1.done && (_a = queuedFunctions_1.return)) _a.call(queuedFunctions_1);\n }\n finally { if (e_1) throw e_1.error; }\n return [7 /*endfinally*/];\n case 8: return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.track = function (eventInput, eventProperties, eventOptions) {\n var event = createTrackEvent(eventInput, eventProperties, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.identify = function (identify, eventOptions) {\n var event = createIdentifyEvent(identify, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {\n var event = createGroupIdentifyEvent(groupType, groupName, identify, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.setGroup = function (groupType, groupName, eventOptions) {\n var event = createGroupEvent(groupType, groupName, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.revenue = function (revenue, eventOptions) {\n var event = createRevenueEvent(revenue, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.add = function (plugin) {\n if (!this.config) {\n this.q.push(this.add.bind(this, plugin));\n return returnWrapper();\n }\n return returnWrapper(this.timeline.register(plugin, this.config));\n };\n AmplitudeCore.prototype.remove = function (pluginName) {\n if (!this.config) {\n this.q.push(this.remove.bind(this, pluginName));\n return returnWrapper();\n }\n return returnWrapper(this.timeline.deregister(pluginName));\n };\n AmplitudeCore.prototype.dispatchWithCallback = function (event, callback) {\n if (!this.config) {\n return callback(buildResult(event, 0, CLIENT_NOT_INITIALIZED));\n }\n void this.process(event).then(callback);\n };\n AmplitudeCore.prototype.dispatch = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (!this.config) {\n return [2 /*return*/, new Promise(function (resolve) {\n _this.dispatchQ.push(_this.dispatchWithCallback.bind(_this, event, resolve));\n })];\n }\n return [2 /*return*/, this.process(event)];\n });\n });\n };\n AmplitudeCore.prototype.process = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var result, e_2, message, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n // skip event processing if opt out\n if (this.config.optOut) {\n return [2 /*return*/, buildResult(event, 0, OPT_OUT_MESSAGE)];\n }\n return [4 /*yield*/, this.timeline.push(event)];\n case 1:\n result = _a.sent();\n result.code === 200\n ? this.config.loggerProvider.log(result.message)\n : result.code === 100\n ? this.config.loggerProvider.warn(result.message)\n : this.config.loggerProvider.error(result.message);\n return [2 /*return*/, result];\n case 2:\n e_2 = _a.sent();\n message = String(e_2);\n this.config.loggerProvider.error(message);\n result = buildResult(event, 0, message);\n return [2 /*return*/, result];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.setOptOut = function (optOut) {\n if (!this.config) {\n this.q.push(this.setOptOut.bind(this, Boolean(optOut)));\n return;\n }\n this.config.optOut = Boolean(optOut);\n };\n AmplitudeCore.prototype.flush = function () {\n return returnWrapper(this.timeline.flush());\n };\n return AmplitudeCore;\n}());\nexport { AmplitudeCore };\n//# sourceMappingURL=core-client.js.map","import { __assign } from \"tslib\";\nimport { RevenueProperty, } from '@amplitude/analytics-types';\nimport { isValidObject } from './utils/valid-properties';\nvar Revenue = /** @class */ (function () {\n function Revenue() {\n this.productId = '';\n this.quantity = 1;\n this.price = 0.0;\n }\n Revenue.prototype.setProductId = function (productId) {\n this.productId = productId;\n return this;\n };\n Revenue.prototype.setQuantity = function (quantity) {\n if (quantity > 0) {\n this.quantity = quantity;\n }\n return this;\n };\n Revenue.prototype.setPrice = function (price) {\n this.price = price;\n return this;\n };\n Revenue.prototype.setRevenueType = function (revenueType) {\n this.revenueType = revenueType;\n return this;\n };\n Revenue.prototype.setRevenue = function (revenue) {\n this.revenue = revenue;\n return this;\n };\n Revenue.prototype.setEventProperties = function (properties) {\n if (isValidObject(properties)) {\n this.properties = properties;\n }\n return this;\n };\n Revenue.prototype.getEventProperties = function () {\n var eventProperties = this.properties ? __assign({}, this.properties) : {};\n eventProperties[RevenueProperty.REVENUE_PRODUCT_ID] = this.productId;\n eventProperties[RevenueProperty.REVENUE_QUANTITY] = this.quantity;\n eventProperties[RevenueProperty.REVENUE_PRICE] = this.price;\n eventProperties[RevenueProperty.REVENUE_TYPE] = this.revenueType;\n eventProperties[RevenueProperty.REVENUE] = this.revenue;\n return eventProperties;\n };\n return Revenue;\n}());\nexport { Revenue };\n//# sourceMappingURL=revenue.js.map","// Creates an array of elements split into groups the length of size.\n// If array can't be split evenly, the final chunk will be the remaining elements.\n// Works similary as https://lodash.com/docs/4.17.15#chunk\nexport var chunk = function (arr, size) {\n var chunkSize = Math.max(size, 1);\n return arr.reduce(function (chunks, element, index) {\n var chunkIndex = Math.floor(index / chunkSize);\n if (!chunks[chunkIndex]) {\n chunks[chunkIndex] = [];\n }\n chunks[chunkIndex].push(element);\n return chunks;\n }, []);\n};\n//# sourceMappingURL=chunk.js.map","import { LogLevel } from '@amplitude/analytics-types';\nvar PREFIX = 'Amplitude Logger ';\nvar Logger = /** @class */ (function () {\n function Logger() {\n this.logLevel = LogLevel.None;\n }\n Logger.prototype.disable = function () {\n this.logLevel = LogLevel.None;\n };\n Logger.prototype.enable = function (logLevel) {\n if (logLevel === void 0) { logLevel = LogLevel.Warn; }\n this.logLevel = logLevel;\n };\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Verbose) {\n return;\n }\n console.log(\"\".concat(PREFIX, \"[Log]: \").concat(args.join(' ')));\n };\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Warn) {\n return;\n }\n console.warn(\"\".concat(PREFIX, \"[Warn]: \").concat(args.join(' ')));\n };\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Error) {\n return;\n }\n console.error(\"\".concat(PREFIX, \"[Error]: \").concat(args.join(' ')));\n };\n Logger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Debug) {\n return;\n }\n // console.debug output is hidden by default in chrome\n console.log(\"\".concat(PREFIX, \"[Debug]: \").concat(args.join(' ')));\n };\n return Logger;\n}());\nexport { Logger };\n//# sourceMappingURL=logger.js.map","import { LogLevel, } from '@amplitude/analytics-types';\nimport { AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL, } from './constants';\nimport { Logger } from './logger';\nexport var getDefaultConfig = function () { return ({\n flushMaxRetries: 12,\n flushQueueSize: 200,\n flushIntervalMillis: 10000,\n instanceName: '$default_instance',\n logLevel: LogLevel.Warn,\n loggerProvider: new Logger(),\n optOut: false,\n serverUrl: AMPLITUDE_SERVER_URL,\n serverZone: 'US',\n useBatch: false,\n}); };\nvar Config = /** @class */ (function () {\n function Config(options) {\n var _a, _b, _c, _d;\n this._optOut = false;\n var defaultConfig = getDefaultConfig();\n this.apiKey = options.apiKey;\n this.flushIntervalMillis = (_a = options.flushIntervalMillis) !== null && _a !== void 0 ? _a : defaultConfig.flushIntervalMillis;\n this.flushMaxRetries = options.flushMaxRetries || defaultConfig.flushMaxRetries;\n this.flushQueueSize = options.flushQueueSize || defaultConfig.flushQueueSize;\n this.instanceName = options.instanceName || defaultConfig.instanceName;\n this.loggerProvider = options.loggerProvider || defaultConfig.loggerProvider;\n this.logLevel = (_b = options.logLevel) !== null && _b !== void 0 ? _b : defaultConfig.logLevel;\n this.minIdLength = options.minIdLength;\n this.plan = options.plan;\n this.ingestionMetadata = options.ingestionMetadata;\n this.optOut = (_c = options.optOut) !== null && _c !== void 0 ? _c : defaultConfig.optOut;\n this.serverUrl = options.serverUrl;\n this.serverZone = options.serverZone || defaultConfig.serverZone;\n this.storageProvider = options.storageProvider;\n this.transportProvider = options.transportProvider;\n this.useBatch = (_d = options.useBatch) !== null && _d !== void 0 ? _d : defaultConfig.useBatch;\n this.loggerProvider.enable(this.logLevel);\n var serverConfig = createServerConfig(options.serverUrl, options.serverZone, options.useBatch);\n this.serverZone = serverConfig.serverZone;\n this.serverUrl = serverConfig.serverUrl;\n }\n Object.defineProperty(Config.prototype, \"optOut\", {\n get: function () {\n return this._optOut;\n },\n set: function (optOut) {\n this._optOut = optOut;\n },\n enumerable: false,\n configurable: true\n });\n return Config;\n}());\nexport { Config };\nexport var getServerUrl = function (serverZone, useBatch) {\n if (serverZone === 'EU') {\n return useBatch ? EU_AMPLITUDE_BATCH_SERVER_URL : EU_AMPLITUDE_SERVER_URL;\n }\n return useBatch ? AMPLITUDE_BATCH_SERVER_URL : AMPLITUDE_SERVER_URL;\n};\nexport var createServerConfig = function (serverUrl, serverZone, useBatch) {\n if (serverUrl === void 0) { serverUrl = ''; }\n if (serverZone === void 0) { serverZone = getDefaultConfig().serverZone; }\n if (useBatch === void 0) { useBatch = getDefaultConfig().useBatch; }\n if (serverUrl) {\n return { serverUrl: serverUrl, serverZone: undefined };\n }\n var _serverZone = ['US', 'EU'].includes(serverZone) ? serverZone : getDefaultConfig().serverZone;\n return {\n serverZone: _serverZone,\n serverUrl: getServerUrl(_serverZone, useBatch),\n };\n};\n//# sourceMappingURL=config.js.map","import { __awaiter, __generator, __read, __rest, __spreadArray } from \"tslib\";\nimport { Status, } from '@amplitude/analytics-types';\nimport { INVALID_API_KEY, MAX_RETRIES_EXCEEDED_MESSAGE, MISSING_API_KEY_MESSAGE, SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, } from '../messages';\nimport { STORAGE_PREFIX } from '../constants';\nimport { chunk } from '../utils/chunk';\nimport { buildResult } from '../utils/result-builder';\nimport { createServerConfig } from '../config';\nfunction getErrorMessage(error) {\n if (error instanceof Error)\n return error.message;\n return String(error);\n}\nexport function getResponseBodyString(res) {\n var responseBodyString = '';\n try {\n if ('body' in res) {\n responseBodyString = JSON.stringify(res.body, null, 2);\n }\n }\n catch (_a) {\n // to avoid crash, but don't care about the error, add comment to avoid empty block lint error\n }\n return responseBodyString;\n}\nvar Destination = /** @class */ (function () {\n function Destination() {\n this.name = 'amplitude';\n this.type = 'destination';\n this.retryTimeout = 1000;\n this.throttleTimeout = 30000;\n this.storageKey = '';\n this.scheduled = null;\n this.queue = [];\n }\n Destination.prototype.setup = function (config) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var unsent;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.config = config;\n this.storageKey = \"\".concat(STORAGE_PREFIX, \"_\").concat(this.config.apiKey.substring(0, 10));\n return [4 /*yield*/, ((_a = this.config.storageProvider) === null || _a === void 0 ? void 0 : _a.get(this.storageKey))];\n case 1:\n unsent = _b.sent();\n this.saveEvents(); // sets storage to '[]'\n if (unsent && unsent.length > 0) {\n void Promise.all(unsent.map(function (event) { return _this.execute(event); })).catch();\n }\n return [2 /*return*/, Promise.resolve(undefined)];\n }\n });\n });\n };\n Destination.prototype.execute = function (event) {\n var _this = this;\n return new Promise(function (resolve) {\n var context = {\n event: event,\n attempts: 0,\n callback: function (result) { return resolve(result); },\n timeout: 0,\n };\n void _this.addToQueue(context);\n });\n };\n Destination.prototype.addToQueue = function () {\n var _this = this;\n var list = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n list[_i] = arguments[_i];\n }\n var tryable = list.filter(function (context) {\n if (context.attempts < _this.config.flushMaxRetries) {\n context.attempts += 1;\n return true;\n }\n void _this.fulfillRequest([context], 500, MAX_RETRIES_EXCEEDED_MESSAGE);\n return false;\n });\n tryable.forEach(function (context) {\n _this.queue = _this.queue.concat(context);\n if (context.timeout === 0) {\n _this.schedule(_this.config.flushIntervalMillis);\n return;\n }\n setTimeout(function () {\n context.timeout = 0;\n _this.schedule(0);\n }, context.timeout);\n });\n this.saveEvents();\n };\n Destination.prototype.schedule = function (timeout) {\n var _this = this;\n if (this.scheduled)\n return;\n this.scheduled = setTimeout(function () {\n void _this.flush(true).then(function () {\n if (_this.queue.length > 0) {\n _this.schedule(timeout);\n }\n });\n }, timeout);\n };\n Destination.prototype.flush = function (useRetry) {\n if (useRetry === void 0) { useRetry = false; }\n return __awaiter(this, void 0, void 0, function () {\n var list, later, batches;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n list = [];\n later = [];\n this.queue.forEach(function (context) { return (context.timeout === 0 ? list.push(context) : later.push(context)); });\n this.queue = later;\n if (this.scheduled) {\n clearTimeout(this.scheduled);\n this.scheduled = null;\n }\n batches = chunk(list, this.config.flushQueueSize);\n return [4 /*yield*/, Promise.all(batches.map(function (batch) { return _this.send(batch, useRetry); }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n Destination.prototype.send = function (list, useRetry) {\n if (useRetry === void 0) { useRetry = true; }\n return __awaiter(this, void 0, void 0, function () {\n var payload, serverUrl, res, e_1, errorMessage;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.config.apiKey) {\n return [2 /*return*/, this.fulfillRequest(list, 400, MISSING_API_KEY_MESSAGE)];\n }\n payload = {\n api_key: this.config.apiKey,\n events: list.map(function (context) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _a = context.event, extra = _a.extra, eventWithoutExtra = __rest(_a, [\"extra\"]);\n return eventWithoutExtra;\n }),\n options: {\n min_id_length: this.config.minIdLength,\n },\n client_upload_time: new Date().toISOString(),\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n serverUrl = createServerConfig(this.config.serverUrl, this.config.serverZone, this.config.useBatch).serverUrl;\n return [4 /*yield*/, this.config.transportProvider.send(serverUrl, payload)];\n case 2:\n res = _a.sent();\n if (res === null) {\n this.fulfillRequest(list, 0, UNEXPECTED_ERROR_MESSAGE);\n return [2 /*return*/];\n }\n if (!useRetry) {\n if ('body' in res) {\n this.fulfillRequest(list, res.statusCode, \"\".concat(res.status, \": \").concat(getResponseBodyString(res)));\n }\n else {\n this.fulfillRequest(list, res.statusCode, res.status);\n }\n return [2 /*return*/];\n }\n this.handleResponse(res, list);\n return [3 /*break*/, 4];\n case 3:\n e_1 = _a.sent();\n errorMessage = getErrorMessage(e_1);\n this.config.loggerProvider.error(errorMessage);\n this.fulfillRequest(list, 0, errorMessage);\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n Destination.prototype.handleResponse = function (res, list) {\n var status = res.status;\n switch (status) {\n case Status.Success: {\n this.handleSuccessResponse(res, list);\n break;\n }\n case Status.Invalid: {\n this.handleInvalidResponse(res, list);\n break;\n }\n case Status.PayloadTooLarge: {\n this.handlePayloadTooLargeResponse(res, list);\n break;\n }\n case Status.RateLimit: {\n this.handleRateLimitResponse(res, list);\n break;\n }\n default: {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(\"{code: 0, error: \\\"Status '\".concat(status, \"' provided for \").concat(list.length, \" events\\\"}\"));\n this.handleOtherResponse(list);\n break;\n }\n }\n };\n Destination.prototype.handleSuccessResponse = function (res, list) {\n this.fulfillRequest(list, res.statusCode, SUCCESS_MESSAGE);\n };\n Destination.prototype.handleInvalidResponse = function (res, list) {\n var _this = this;\n if (res.body.missingField || res.body.error.startsWith(INVALID_API_KEY)) {\n this.fulfillRequest(list, res.statusCode, res.body.error);\n return;\n }\n var dropIndex = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(Object.values(res.body.eventsWithInvalidFields)), false), __read(Object.values(res.body.eventsWithMissingFields)), false), __read(Object.values(res.body.eventsWithInvalidIdLengths)), false), __read(res.body.silencedEvents), false).flat();\n var dropIndexSet = new Set(dropIndex);\n var retry = list.filter(function (context, index) {\n if (dropIndexSet.has(index)) {\n _this.fulfillRequest([context], res.statusCode, res.body.error);\n return;\n }\n return true;\n });\n if (retry.length > 0) {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n }\n this.addToQueue.apply(this, __spreadArray([], __read(retry), false));\n };\n Destination.prototype.handlePayloadTooLargeResponse = function (res, list) {\n if (list.length === 1) {\n this.fulfillRequest(list, res.statusCode, res.body.error);\n return;\n }\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n this.config.flushQueueSize /= 2;\n this.addToQueue.apply(this, __spreadArray([], __read(list), false));\n };\n Destination.prototype.handleRateLimitResponse = function (res, list) {\n var _this = this;\n var dropUserIds = Object.keys(res.body.exceededDailyQuotaUsers);\n var dropDeviceIds = Object.keys(res.body.exceededDailyQuotaDevices);\n var throttledIndex = res.body.throttledEvents;\n var dropUserIdsSet = new Set(dropUserIds);\n var dropDeviceIdsSet = new Set(dropDeviceIds);\n var throttledIndexSet = new Set(throttledIndex);\n var retry = list.filter(function (context, index) {\n if ((context.event.user_id && dropUserIdsSet.has(context.event.user_id)) ||\n (context.event.device_id && dropDeviceIdsSet.has(context.event.device_id))) {\n _this.fulfillRequest([context], res.statusCode, res.body.error);\n return;\n }\n if (throttledIndexSet.has(index)) {\n context.timeout = _this.throttleTimeout;\n }\n return true;\n });\n if (retry.length > 0) {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n }\n this.addToQueue.apply(this, __spreadArray([], __read(retry), false));\n };\n Destination.prototype.handleOtherResponse = function (list) {\n var _this = this;\n this.addToQueue.apply(this, __spreadArray([], __read(list.map(function (context) {\n context.timeout = context.attempts * _this.retryTimeout;\n return context;\n })), false));\n };\n Destination.prototype.fulfillRequest = function (list, code, message) {\n this.saveEvents();\n list.forEach(function (context) { return context.callback(buildResult(context.event, code, message)); });\n };\n /**\n * Saves events to storage\n * This is called on\n * 1) new events are added to queue; or\n * 2) response comes back for a request\n */\n Destination.prototype.saveEvents = function () {\n if (!this.config.storageProvider) {\n return;\n }\n var events = Array.from(this.queue.map(function (context) { return context.event; }));\n void this.config.storageProvider.set(this.storageKey, events);\n };\n return Destination;\n}());\nexport { Destination };\n//# sourceMappingURL=destination.js.map","import { __assign, __values } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { LogLevel } from '@amplitude/analytics-types';\nexport var getStacktrace = function (ignoreDepth) {\n if (ignoreDepth === void 0) { ignoreDepth = 0; }\n var trace = new Error().stack || '';\n return trace\n .split('\\n')\n .slice(2 + ignoreDepth)\n .map(function (text) { return text.trim(); });\n};\n// This hook makes sure we always get the latest logger and logLevel.\nexport var getClientLogConfig = function (client) { return function () {\n var _a = __assign({}, client.config), logger = _a.loggerProvider, logLevel = _a.logLevel;\n return {\n logger: logger,\n logLevel: logLevel,\n };\n}; };\n// This is a convenient function to get the attribute from object with string path, similar to lodash '#get'.\nexport var getValueByStringPath = function (obj, path) {\n var e_1, _a;\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n path = path.replace(/^\\./, ''); // strip a leading dot\n try {\n for (var _b = __values(path.split('.')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var attr = _c.value;\n if (attr in obj) {\n obj = obj[attr];\n }\n else {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return obj;\n};\nexport var getClientStates = function (client, paths) { return function () {\n var e_2, _a;\n var res = {};\n try {\n for (var paths_1 = __values(paths), paths_1_1 = paths_1.next(); !paths_1_1.done; paths_1_1 = paths_1.next()) {\n var path = paths_1_1.value;\n res[path] = getValueByStringPath(client, path);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (paths_1_1 && !paths_1_1.done && (_a = paths_1.return)) _a.call(paths_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n}; };\nexport var debugWrapper = function (fn, fnName, getLogConfig, getStates, fnContext) {\n if (fnContext === void 0) { fnContext = null; }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a = getLogConfig(), logger = _a.logger, logLevel = _a.logLevel;\n // return early if possible to reduce overhead\n if ((logLevel && logLevel < LogLevel.Debug) || !logLevel || !logger) {\n return fn.apply(fnContext, args);\n }\n var debugContext = {\n type: 'invoke public method',\n name: fnName,\n args: args,\n stacktrace: getStacktrace(1),\n time: {\n start: new Date().toISOString(),\n },\n states: {},\n };\n if (getStates && debugContext.states) {\n debugContext.states.before = getStates();\n }\n var result = fn.apply(fnContext, args);\n if (result && result.promise) {\n // if result is a promise, add the callback\n result.promise.then(function () {\n if (getStates && debugContext.states) {\n debugContext.states.after = getStates();\n }\n if (debugContext.time) {\n debugContext.time.end = new Date().toISOString();\n }\n logger.debug(JSON.stringify(debugContext, null, 2));\n });\n }\n else {\n if (getStates && debugContext.states) {\n debugContext.states.after = getStates();\n }\n if (debugContext.time) {\n debugContext.time.end = new Date().toISOString();\n }\n logger.debug(JSON.stringify(debugContext, null, 2));\n }\n return result;\n };\n};\n//# sourceMappingURL=debug.js.map","import { __awaiter, __generator } from \"tslib\";\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.memoryStorage = new Map();\n }\n MemoryStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, true];\n });\n });\n };\n MemoryStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.memoryStorage.get(key)];\n });\n });\n };\n MemoryStorage.prototype.getRaw = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(key)];\n case 1:\n value = _a.sent();\n return [2 /*return*/, value ? JSON.stringify(value) : undefined];\n }\n });\n });\n };\n MemoryStorage.prototype.set = function (key, value) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.set(key, value);\n return [2 /*return*/];\n });\n });\n };\n MemoryStorage.prototype.remove = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.delete(key);\n return [2 /*return*/];\n });\n });\n };\n MemoryStorage.prototype.reset = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.clear();\n return [2 /*return*/];\n });\n });\n };\n return MemoryStorage;\n}());\nexport { MemoryStorage };\n//# sourceMappingURL=memory.js.map","/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { Status } from '@amplitude/analytics-types';\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport() {\n }\n BaseTransport.prototype.send = function (_serverUrl, _payload) {\n return Promise.resolve(null);\n };\n BaseTransport.prototype.buildResponse = function (responseJSON) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;\n if (typeof responseJSON !== 'object') {\n return null;\n }\n var statusCode = responseJSON.code || 0;\n var status = this.buildStatus(statusCode);\n switch (status) {\n case Status.Success:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n eventsIngested: (_a = responseJSON.events_ingested) !== null && _a !== void 0 ? _a : 0,\n payloadSizeBytes: (_b = responseJSON.payload_size_bytes) !== null && _b !== void 0 ? _b : 0,\n serverUploadTime: (_c = responseJSON.server_upload_time) !== null && _c !== void 0 ? _c : 0,\n },\n };\n case Status.Invalid:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_d = responseJSON.error) !== null && _d !== void 0 ? _d : '',\n missingField: (_e = responseJSON.missing_field) !== null && _e !== void 0 ? _e : '',\n eventsWithInvalidFields: (_f = responseJSON.events_with_invalid_fields) !== null && _f !== void 0 ? _f : {},\n eventsWithMissingFields: (_g = responseJSON.events_with_missing_fields) !== null && _g !== void 0 ? _g : {},\n eventsWithInvalidIdLengths: (_h = responseJSON.events_with_invalid_id_lengths) !== null && _h !== void 0 ? _h : {},\n epsThreshold: (_j = responseJSON.eps_threshold) !== null && _j !== void 0 ? _j : 0,\n exceededDailyQuotaDevices: (_k = responseJSON.exceeded_daily_quota_devices) !== null && _k !== void 0 ? _k : {},\n silencedDevices: (_l = responseJSON.silenced_devices) !== null && _l !== void 0 ? _l : [],\n silencedEvents: (_m = responseJSON.silenced_events) !== null && _m !== void 0 ? _m : [],\n throttledDevices: (_o = responseJSON.throttled_devices) !== null && _o !== void 0 ? _o : {},\n throttledEvents: (_p = responseJSON.throttled_events) !== null && _p !== void 0 ? _p : [],\n },\n };\n case Status.PayloadTooLarge:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_q = responseJSON.error) !== null && _q !== void 0 ? _q : '',\n },\n };\n case Status.RateLimit:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_r = responseJSON.error) !== null && _r !== void 0 ? _r : '',\n epsThreshold: (_s = responseJSON.eps_threshold) !== null && _s !== void 0 ? _s : 0,\n throttledDevices: (_t = responseJSON.throttled_devices) !== null && _t !== void 0 ? _t : {},\n throttledUsers: (_u = responseJSON.throttled_users) !== null && _u !== void 0 ? _u : {},\n exceededDailyQuotaDevices: (_v = responseJSON.exceeded_daily_quota_devices) !== null && _v !== void 0 ? _v : {},\n exceededDailyQuotaUsers: (_w = responseJSON.exceeded_daily_quota_users) !== null && _w !== void 0 ? _w : {},\n throttledEvents: (_x = responseJSON.throttled_events) !== null && _x !== void 0 ? _x : [],\n },\n };\n case Status.Timeout:\n default:\n return {\n status: status,\n statusCode: statusCode,\n };\n }\n };\n BaseTransport.prototype.buildStatus = function (code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n if (code === 429) {\n return Status.RateLimit;\n }\n if (code === 413) {\n return Status.PayloadTooLarge;\n }\n if (code === 408) {\n return Status.Timeout;\n }\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n if (code >= 500) {\n return Status.Failed;\n }\n return Status.Unknown;\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","/* eslint-disable no-restricted-globals */\n/* Only file allowed to access to globalThis, window, self */\nexport var getGlobalScope = function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n return undefined;\n};\n//# sourceMappingURL=global-scope.js.map","import { getGlobalScope } from './global-scope';\nexport var getQueryParams = function () {\n var _a;\n var globalScope = getGlobalScope();\n /* istanbul ignore if */\n if (!((_a = globalScope === null || globalScope === void 0 ? void 0 : globalScope.location) === null || _a === void 0 ? void 0 : _a.search)) {\n return {};\n }\n var pairs = globalScope.location.search.substring(1).split('&').filter(Boolean);\n var params = pairs.reduce(function (acc, curr) {\n var query = curr.split('=', 2);\n var key = tryDecodeURIComponent(query[0]);\n var value = tryDecodeURIComponent(query[1]);\n if (!value) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n return params;\n};\nexport var tryDecodeURIComponent = function (value) {\n if (value === void 0) { value = ''; }\n try {\n return decodeURIComponent(value);\n }\n catch (_a) {\n return '';\n }\n};\n//# sourceMappingURL=query-params.js.map","export var UTM_CAMPAIGN = 'utm_campaign';\nexport var UTM_CONTENT = 'utm_content';\nexport var UTM_ID = 'utm_id';\nexport var UTM_MEDIUM = 'utm_medium';\nexport var UTM_SOURCE = 'utm_source';\nexport var UTM_TERM = 'utm_term';\nexport var DCLID = 'dclid';\nexport var FBCLID = 'fbclid';\nexport var GBRAID = 'gbraid';\nexport var GCLID = 'gclid';\nexport var KO_CLICK_ID = 'ko_click_id';\nexport var LI_FAT_ID = 'li_fat_id';\nexport var MSCLKID = 'msclkid';\nexport var RDT_CID = 'rtd_cid';\nexport var TTCLID = 'ttclid';\nexport var TWCLID = 'twclid';\nexport var WBRAID = 'wbraid';\nexport var EMPTY_VALUE = 'EMPTY';\nexport var BASE_CAMPAIGN = {\n utm_campaign: undefined,\n utm_content: undefined,\n utm_id: undefined,\n utm_medium: undefined,\n utm_source: undefined,\n utm_term: undefined,\n referrer: undefined,\n referring_domain: undefined,\n dclid: undefined,\n gbraid: undefined,\n gclid: undefined,\n fbclid: undefined,\n ko_click_id: undefined,\n li_fat_id: undefined,\n msclkid: undefined,\n rtd_cid: undefined,\n ttclid: undefined,\n twclid: undefined,\n wbraid: undefined,\n};\nexport var MKTG = 'MKTG';\n//# sourceMappingURL=constants.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { getQueryParams } from '../query-params';\nimport { UTM_CAMPAIGN, UTM_CONTENT, UTM_MEDIUM, UTM_SOURCE, UTM_TERM, GCLID, FBCLID, BASE_CAMPAIGN, DCLID, MSCLKID, RDT_CID, TWCLID, TTCLID, KO_CLICK_ID, LI_FAT_ID, GBRAID, WBRAID, UTM_ID, } from './constants';\nvar CampaignParser = /** @class */ (function () {\n function CampaignParser() {\n }\n CampaignParser.prototype.parse = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, __assign(__assign(__assign(__assign({}, BASE_CAMPAIGN), this.getUtmParam()), this.getReferrer()), this.getClickIds())];\n });\n });\n };\n CampaignParser.prototype.getUtmParam = function () {\n var params = getQueryParams();\n var utmCampaign = params[UTM_CAMPAIGN];\n var utmContent = params[UTM_CONTENT];\n var utmId = params[UTM_ID];\n var utmMedium = params[UTM_MEDIUM];\n var utmSource = params[UTM_SOURCE];\n var utmTerm = params[UTM_TERM];\n return {\n utm_campaign: utmCampaign,\n utm_content: utmContent,\n utm_id: utmId,\n utm_medium: utmMedium,\n utm_source: utmSource,\n utm_term: utmTerm,\n };\n };\n CampaignParser.prototype.getReferrer = function () {\n var _a, _b;\n var data = {\n referrer: undefined,\n referring_domain: undefined,\n };\n try {\n data.referrer = document.referrer || undefined;\n data.referring_domain = (_b = (_a = data.referrer) === null || _a === void 0 ? void 0 : _a.split('/')[2]) !== null && _b !== void 0 ? _b : undefined;\n }\n catch (_c) {\n // nothing to track\n }\n return data;\n };\n CampaignParser.prototype.getClickIds = function () {\n var _a;\n var params = getQueryParams();\n return _a = {},\n _a[DCLID] = params[DCLID],\n _a[FBCLID] = params[FBCLID],\n _a[GBRAID] = params[GBRAID],\n _a[GCLID] = params[GCLID],\n _a[KO_CLICK_ID] = params[KO_CLICK_ID],\n _a[LI_FAT_ID] = params[LI_FAT_ID],\n _a[MSCLKID] = params[MSCLKID],\n _a[RDT_CID] = params[RDT_CID],\n _a[TTCLID] = params[TTCLID],\n _a[TWCLID] = params[TWCLID],\n _a[WBRAID] = params[WBRAID],\n _a;\n };\n return CampaignParser;\n}());\nexport { CampaignParser };\n//# sourceMappingURL=campaign-parser.js.map","import { AMPLITUDE_PREFIX } from '@amplitude/analytics-core';\nexport var getCookieName = function (apiKey, postKey, limit) {\n if (postKey === void 0) { postKey = ''; }\n if (limit === void 0) { limit = 10; }\n return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_');\n};\nexport var getOldCookieName = function (apiKey) {\n return \"\".concat(AMPLITUDE_PREFIX.toLowerCase(), \"_\").concat(apiKey.substring(0, 6));\n};\n//# sourceMappingURL=cookie-name.js.map","export var isNewSession = function (sessionTimeout, lastEventTime) {\n if (lastEventTime === void 0) { lastEventTime = Date.now(); }\n var currentTime = Date.now();\n var timeSinceLastEvent = currentTime - lastEventTime;\n return timeSinceLastEvent > sessionTimeout;\n};\n//# sourceMappingURL=session.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { getGlobalScope } from '../global-scope';\nvar CookieStorage = /** @class */ (function () {\n function CookieStorage(options) {\n this.options = __assign({}, options);\n }\n CookieStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n var testStrorage, testKey, value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n /* istanbul ignore if */\n if (!getGlobalScope()) {\n return [2 /*return*/, false];\n }\n CookieStorage.testValue = String(Date.now());\n testStrorage = new CookieStorage(this.options);\n testKey = 'AMP_TEST';\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4, 5, 7]);\n return [4 /*yield*/, testStrorage.set(testKey, CookieStorage.testValue)];\n case 2:\n _b.sent();\n return [4 /*yield*/, testStrorage.get(testKey)];\n case 3:\n value = _b.sent();\n return [2 /*return*/, value === CookieStorage.testValue];\n case 4:\n _a = _b.sent();\n /* istanbul ignore next */\n return [2 /*return*/, false];\n case 5: return [4 /*yield*/, testStrorage.remove(testKey)];\n case 6:\n _b.sent();\n return [7 /*endfinally*/];\n case 7: return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.getRaw(key)];\n case 1:\n value = _a.sent();\n if (!value) {\n return [2 /*return*/, undefined];\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n }\n catch (_b) {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return [2 /*return*/, JSON.parse(value)];\n }\n catch (_c) {\n /* istanbul ignore next */\n return [2 /*return*/, undefined];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.getRaw = function (key) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var globalScope, cookie, match;\n return __generator(this, function (_c) {\n globalScope = getGlobalScope();\n cookie = (_b = (_a = globalScope === null || globalScope === void 0 ? void 0 : globalScope.document) === null || _a === void 0 ? void 0 : _a.cookie.split('; ')) !== null && _b !== void 0 ? _b : [];\n match = cookie.find(function (c) { return c.indexOf(key + '=') === 0; });\n if (!match) {\n return [2 /*return*/, undefined];\n }\n return [2 /*return*/, match.substring(key.length + 1)];\n });\n });\n };\n CookieStorage.prototype.set = function (key, value) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var expirationDays, expires, expireDate, date, str, globalScope;\n return __generator(this, function (_b) {\n try {\n expirationDays = (_a = this.options.expirationDays) !== null && _a !== void 0 ? _a : 0;\n expires = value !== null ? expirationDays : -1;\n expireDate = undefined;\n if (expires) {\n date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n str = \"\".concat(key, \"=\").concat(btoa(encodeURIComponent(JSON.stringify(value))));\n if (expireDate) {\n str += \"; expires=\".concat(expireDate.toUTCString());\n }\n str += '; path=/';\n if (this.options.domain) {\n str += \"; domain=\".concat(this.options.domain);\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += \"; SameSite=\".concat(this.options.sameSite);\n }\n globalScope = getGlobalScope();\n if (globalScope) {\n globalScope.document.cookie = str;\n }\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n CookieStorage.prototype.remove = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.set(key, null)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.reset = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/];\n });\n });\n };\n return CookieStorage;\n}());\nexport { CookieStorage };\n//# sourceMappingURL=cookie.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FetchTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var options, response, responsePayload;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n /* istanbul ignore if */\n if (typeof fetch === 'undefined') {\n throw new Error('FetchTransport is not supported');\n }\n options = {\n headers: {\n 'Content-Type': 'application/json',\n Accept: '*/*',\n },\n body: JSON.stringify(payload),\n method: 'POST',\n };\n return [4 /*yield*/, fetch(serverUrl, options)];\n case 1:\n response = _a.sent();\n return [4 /*yield*/, response.json()];\n case 2:\n responsePayload = _a.sent();\n return [2 /*return*/, this.buildResponse(responsePayload)];\n }\n });\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","var ApplicationContextProviderImpl = /** @class */ (function () {\n function ApplicationContextProviderImpl() {\n }\n ApplicationContextProviderImpl.prototype.getApplicationContext = function () {\n return {\n versionName: this.versionName,\n language: getLanguage(),\n platform: 'Web',\n os: undefined,\n deviceModel: undefined,\n };\n };\n return ApplicationContextProviderImpl;\n}());\nvar getLanguage = function () {\n return ((typeof navigator !== 'undefined' &&\n ((navigator.languages && navigator.languages[0]) ||\n navigator.language)) ||\n '');\n};\n\nvar EventBridgeImpl = /** @class */ (function () {\n function EventBridgeImpl() {\n this.queue = [];\n }\n EventBridgeImpl.prototype.logEvent = function (event) {\n if (!this.receiver) {\n if (this.queue.length < 512) {\n this.queue.push(event);\n }\n }\n else {\n this.receiver(event);\n }\n };\n EventBridgeImpl.prototype.setEventReceiver = function (receiver) {\n this.receiver = receiver;\n if (this.queue.length > 0) {\n this.queue.forEach(function (event) {\n receiver(event);\n });\n this.queue = [];\n }\n };\n return EventBridgeImpl;\n}());\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar isEqual = function (obj1, obj2) {\n var primitive = ['string', 'number', 'boolean', 'undefined'];\n var typeA = typeof obj1;\n var typeB = typeof obj2;\n if (typeA !== typeB) {\n return false;\n }\n for (var _i = 0, primitive_1 = primitive; _i < primitive_1.length; _i++) {\n var p = primitive_1[_i];\n if (p === typeA) {\n return obj1 === obj2;\n }\n }\n // check null\n if (obj1 == null && obj2 == null) {\n return true;\n }\n else if (obj1 == null || obj2 == null) {\n return false;\n }\n // if got here - objects\n if (obj1.length !== obj2.length) {\n return false;\n }\n //check if arrays\n var isArrayA = Array.isArray(obj1);\n var isArrayB = Array.isArray(obj2);\n if (isArrayA !== isArrayB) {\n return false;\n }\n if (isArrayA && isArrayB) {\n //arrays\n for (var i = 0; i < obj1.length; i++) {\n if (!isEqual(obj1[i], obj2[i])) {\n return false;\n }\n }\n }\n else {\n //objects\n var sorted1 = Object.keys(obj1).sort();\n var sorted2 = Object.keys(obj2).sort();\n if (!isEqual(sorted1, sorted2)) {\n return false;\n }\n //compare object values\n var result_1 = true;\n Object.keys(obj1).forEach(function (key) {\n if (!isEqual(obj1[key], obj2[key])) {\n result_1 = false;\n }\n });\n return result_1;\n }\n return true;\n};\n\nvar ID_OP_SET = '$set';\nvar ID_OP_UNSET = '$unset';\nvar ID_OP_CLEAR_ALL = '$clearAll';\n// Polyfill for Object.entries\nif (!Object.entries) {\n Object.entries = function (obj) {\n var ownProps = Object.keys(obj);\n var i = ownProps.length;\n var resArray = new Array(i);\n while (i--) {\n resArray[i] = [ownProps[i], obj[ownProps[i]]];\n }\n return resArray;\n };\n}\nvar IdentityStoreImpl = /** @class */ (function () {\n function IdentityStoreImpl() {\n this.identity = { userProperties: {} };\n this.listeners = new Set();\n }\n IdentityStoreImpl.prototype.editIdentity = function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var self = this;\n var actingUserProperties = __assign({}, this.identity.userProperties);\n var actingIdentity = __assign(__assign({}, this.identity), { userProperties: actingUserProperties });\n return {\n setUserId: function (userId) {\n actingIdentity.userId = userId;\n return this;\n },\n setDeviceId: function (deviceId) {\n actingIdentity.deviceId = deviceId;\n return this;\n },\n setUserProperties: function (userProperties) {\n actingIdentity.userProperties = userProperties;\n return this;\n },\n setOptOut: function (optOut) {\n actingIdentity.optOut = optOut;\n return this;\n },\n updateUserProperties: function (actions) {\n var actingProperties = actingIdentity.userProperties || {};\n for (var _i = 0, _a = Object.entries(actions); _i < _a.length; _i++) {\n var _b = _a[_i], action = _b[0], properties = _b[1];\n switch (action) {\n case ID_OP_SET:\n for (var _c = 0, _d = Object.entries(properties); _c < _d.length; _c++) {\n var _e = _d[_c], key = _e[0], value = _e[1];\n actingProperties[key] = value;\n }\n break;\n case ID_OP_UNSET:\n for (var _f = 0, _g = Object.keys(properties); _f < _g.length; _f++) {\n var key = _g[_f];\n delete actingProperties[key];\n }\n break;\n case ID_OP_CLEAR_ALL:\n actingProperties = {};\n break;\n }\n }\n actingIdentity.userProperties = actingProperties;\n return this;\n },\n commit: function () {\n self.setIdentity(actingIdentity);\n return this;\n },\n };\n };\n IdentityStoreImpl.prototype.getIdentity = function () {\n return __assign({}, this.identity);\n };\n IdentityStoreImpl.prototype.setIdentity = function (identity) {\n var originalIdentity = __assign({}, this.identity);\n this.identity = __assign({}, identity);\n if (!isEqual(originalIdentity, this.identity)) {\n this.listeners.forEach(function (listener) {\n listener(identity);\n });\n }\n };\n IdentityStoreImpl.prototype.addIdentityListener = function (listener) {\n this.listeners.add(listener);\n };\n IdentityStoreImpl.prototype.removeIdentityListener = function (listener) {\n this.listeners.delete(listener);\n };\n return IdentityStoreImpl;\n}());\n\nvar safeGlobal = typeof globalThis !== 'undefined'\n ? globalThis\n : typeof global !== 'undefined'\n ? global\n : self;\n\nvar AnalyticsConnector = /** @class */ (function () {\n function AnalyticsConnector() {\n this.identityStore = new IdentityStoreImpl();\n this.eventBridge = new EventBridgeImpl();\n this.applicationContextProvider = new ApplicationContextProviderImpl();\n }\n AnalyticsConnector.getInstance = function (instanceName) {\n if (!safeGlobal['analyticsConnectorInstances']) {\n safeGlobal['analyticsConnectorInstances'] = {};\n }\n if (!safeGlobal['analyticsConnectorInstances'][instanceName]) {\n safeGlobal['analyticsConnectorInstances'][instanceName] =\n new AnalyticsConnector();\n }\n return safeGlobal['analyticsConnectorInstances'][instanceName];\n };\n return AnalyticsConnector;\n}());\n\nexport { AnalyticsConnector };\n","import { AnalyticsConnector } from '@amplitude/analytics-connector';\nexport var getAnalyticsConnector = function (instanceName) {\n if (instanceName === void 0) { instanceName = '$default_instance'; }\n return AnalyticsConnector.getInstance(instanceName);\n};\nexport var setConnectorUserId = function (userId, instanceName) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n getAnalyticsConnector(instanceName).identityStore.editIdentity().setUserId(userId).commit();\n};\nexport var setConnectorDeviceId = function (deviceId, instanceName) {\n getAnalyticsConnector(instanceName).identityStore.editIdentity().setDeviceId(deviceId).commit();\n};\n//# sourceMappingURL=analytics-connector.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { getAnalyticsConnector } from '../analytics-connector';\nvar IdentityEventSender = /** @class */ (function () {\n function IdentityEventSender() {\n this.name = 'identity';\n this.type = 'before';\n this.identityStore = getAnalyticsConnector().identityStore;\n }\n IdentityEventSender.prototype.execute = function (context) {\n return __awaiter(this, void 0, void 0, function () {\n var userProperties;\n return __generator(this, function (_a) {\n userProperties = context.user_properties;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return [2 /*return*/, context];\n });\n });\n };\n IdentityEventSender.prototype.setup = function (config) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (config.instanceName) {\n this.identityStore = getAnalyticsConnector(config.instanceName).identityStore;\n }\n return [2 /*return*/];\n });\n });\n };\n return IdentityEventSender;\n}());\nexport { IdentityEventSender };\n//# sourceMappingURL=identity.js.map","export var getLanguage = function () {\n var _a, _b, _c, _d;\n if (typeof navigator === 'undefined')\n return '';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var userLanguage = navigator.userLanguage;\n return (_d = (_c = (_b = (_a = navigator.languages) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : navigator.language) !== null && _c !== void 0 ? _c : userLanguage) !== null && _d !== void 0 ? _d : '';\n};\n//# sourceMappingURL=language.js.map","import { __assign } from \"tslib\";\n/**\n * Returns false if defaultTracking === false or if defaultTracking[event],\n * otherwise returns true\n */\nvar isTrackingEnabled = function (defaultTracking, event) {\n if (typeof defaultTracking === 'boolean') {\n return defaultTracking;\n }\n if ((defaultTracking === null || defaultTracking === void 0 ? void 0 : defaultTracking[event]) === false) {\n return false;\n }\n return true;\n};\nexport var isAttributionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'attribution');\n};\nexport var isFileDownloadTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'fileDownloads');\n};\nexport var isFormInteractionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'formInteractions');\n};\nexport var isPageViewTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'pageViews');\n};\nexport var isSessionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'sessions');\n};\nexport var getPageViewTrackingConfig = function (config) {\n var trackOn = function () { return false; };\n var trackHistoryChanges = undefined;\n var eventType;\n var isDefaultPageViewTrackingEnabled = isPageViewTrackingEnabled(config.defaultTracking);\n if (isDefaultPageViewTrackingEnabled) {\n trackOn = undefined;\n eventType = undefined;\n if (config.defaultTracking &&\n typeof config.defaultTracking === 'object' &&\n config.defaultTracking.pageViews &&\n typeof config.defaultTracking.pageViews === 'object') {\n if ('trackOn' in config.defaultTracking.pageViews) {\n trackOn = config.defaultTracking.pageViews.trackOn;\n }\n if ('trackHistoryChanges' in config.defaultTracking.pageViews) {\n trackHistoryChanges = config.defaultTracking.pageViews.trackHistoryChanges;\n }\n if ('eventType' in config.defaultTracking.pageViews && config.defaultTracking.pageViews.eventType) {\n eventType = config.defaultTracking.pageViews.eventType;\n }\n }\n }\n return {\n trackOn: trackOn,\n trackHistoryChanges: trackHistoryChanges,\n eventType: eventType,\n };\n};\nexport var getAttributionTrackingConfig = function (config) {\n if (isAttributionTrackingEnabled(config.defaultTracking) &&\n config.defaultTracking &&\n typeof config.defaultTracking === 'object' &&\n config.defaultTracking.attribution &&\n typeof config.defaultTracking.attribution === 'object') {\n return __assign({}, config.defaultTracking.attribution);\n }\n return {};\n};\n//# sourceMappingURL=default-tracking.js.map","/**\n * Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.\n * @ignore\n */\nexport var runQueuedFunctions = function (instance, queue) {\n convertProxyObjectToRealObject(instance, queue);\n};\n/**\n * Applies the proxied functions on the proxied object to an instance of the real object.\n * Used to convert proxied Identify and Revenue objects.\n */\nexport var convertProxyObjectToRealObject = function (instance, queue) {\n for (var i = 0; i < queue.length; i++) {\n var _a = queue[i], name_1 = _a.name, args = _a.args, resolve = _a.resolve;\n var fn = instance && instance[name_1];\n if (typeof fn === 'function') {\n var result = fn.apply(instance, args);\n if (typeof resolve === 'function') {\n resolve(result === null || result === void 0 ? void 0 : result.promise);\n }\n }\n }\n return instance;\n};\n/**\n * Check if the param is snippet proxy\n */\nexport var isInstanceProxy = function (instance) {\n var instanceProxy = instance;\n return instanceProxy && instanceProxy._q !== undefined;\n};\n//# sourceMappingURL=snippet-helper.js.map","export var VERSION = '2.3.3';\n//# sourceMappingURL=version.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { UUID } from '@amplitude/analytics-core';\nimport { getLanguage } from '@amplitude/analytics-client-common';\nimport { VERSION } from '../version';\nvar BROWSER_PLATFORM = 'Web';\nvar IP_ADDRESS = '$remote';\nvar Context = /** @class */ (function () {\n function Context() {\n this.name = '@amplitude/plugin-context-browser';\n this.type = 'before';\n this.library = \"amplitude-ts/\".concat(VERSION);\n /* istanbul ignore else */\n if (typeof navigator !== 'undefined') {\n this.userAgent = navigator.userAgent;\n }\n }\n Context.prototype.setup = function (config) {\n this.config = config;\n return Promise.resolve(undefined);\n };\n Context.prototype.execute = function (context) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var time, lastEventId, nextEventId, event;\n return __generator(this, function (_c) {\n time = new Date().getTime();\n lastEventId = (_a = this.config.lastEventId) !== null && _a !== void 0 ? _a : -1;\n nextEventId = (_b = context.event_id) !== null && _b !== void 0 ? _b : lastEventId + 1;\n this.config.lastEventId = nextEventId;\n if (!context.time) {\n this.config.lastEventTime = time;\n }\n event = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ user_id: this.config.userId, device_id: this.config.deviceId, session_id: this.config.sessionId, time: time }, (this.config.appVersion && { app_version: this.config.appVersion })), (this.config.trackingOptions.platform && { platform: BROWSER_PLATFORM })), (this.config.trackingOptions.language && { language: getLanguage() })), (this.config.trackingOptions.ipAddress && { ip: IP_ADDRESS })), { insert_id: UUID(), partner_id: this.config.partnerId, plan: this.config.plan }), (this.config.ingestionMetadata && {\n ingestion_metadata: {\n source_name: this.config.ingestionMetadata.sourceName,\n source_version: this.config.ingestionMetadata.sourceVersion,\n },\n })), context), { event_id: nextEventId, library: this.library, user_agent: this.userAgent });\n return [2 /*return*/, event];\n });\n });\n };\n return Context;\n}());\nexport { Context };\n//# sourceMappingURL=context.js.map","import { __awaiter, __generator } from \"tslib\";\nvar BrowserStorage = /** @class */ (function () {\n function BrowserStorage(storage) {\n this.storage = storage;\n }\n BrowserStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n var random, testStorage, testKey, value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n /* istanbul ignore if */\n if (!this.storage) {\n return [2 /*return*/, false];\n }\n random = String(Date.now());\n testStorage = new BrowserStorage(this.storage);\n testKey = 'AMP_TEST';\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4, 5, 7]);\n return [4 /*yield*/, testStorage.set(testKey, random)];\n case 2:\n _b.sent();\n return [4 /*yield*/, testStorage.get(testKey)];\n case 3:\n value = _b.sent();\n return [2 /*return*/, value === random];\n case 4:\n _a = _b.sent();\n /* istanbul ignore next */\n return [2 /*return*/, false];\n case 5: return [4 /*yield*/, testStorage.remove(testKey)];\n case 6:\n _b.sent();\n return [7 /*endfinally*/];\n case 7: return [2 /*return*/];\n }\n });\n });\n };\n BrowserStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.getRaw(key)];\n case 1:\n value = _b.sent();\n if (!value) {\n return [2 /*return*/, undefined];\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return [2 /*return*/, JSON.parse(value)];\n case 2:\n _a = _b.sent();\n console.error(\"[Amplitude] Error: Could not get value from storage\");\n return [2 /*return*/, undefined];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n BrowserStorage.prototype.getRaw = function (key) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n return [2 /*return*/, ((_a = this.storage) === null || _a === void 0 ? void 0 : _a.getItem(key)) || undefined];\n });\n });\n };\n BrowserStorage.prototype.set = function (key, value) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = this.storage) === null || _a === void 0 ? void 0 : _a.setItem(key, JSON.stringify(value));\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n BrowserStorage.prototype.remove = function (key) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = this.storage) === null || _a === void 0 ? void 0 : _a.removeItem(key);\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n BrowserStorage.prototype.reset = function () {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = this.storage) === null || _a === void 0 ? void 0 : _a.clear();\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n return BrowserStorage;\n}());\nexport { BrowserStorage };\n//# sourceMappingURL=browser-storage.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { getGlobalScope } from '@amplitude/analytics-client-common';\nimport { BrowserStorage } from './browser-storage';\nvar MAX_ARRAY_LENGTH = 1000;\nvar LocalStorage = /** @class */ (function (_super) {\n __extends(LocalStorage, _super);\n function LocalStorage(config) {\n var _this = this;\n var _a;\n _this = _super.call(this, (_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.localStorage) || this;\n _this.loggerProvider = config === null || config === void 0 ? void 0 : config.loggerProvider;\n return _this;\n }\n LocalStorage.prototype.set = function (key, value) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var droppedEventsCount;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!(Array.isArray(value) && value.length > MAX_ARRAY_LENGTH)) return [3 /*break*/, 2];\n droppedEventsCount = value.length - MAX_ARRAY_LENGTH;\n return [4 /*yield*/, _super.prototype.set.call(this, key, value.slice(0, MAX_ARRAY_LENGTH))];\n case 1:\n _b.sent();\n (_a = this.loggerProvider) === null || _a === void 0 ? void 0 : _a.error(\"Failed to save \".concat(droppedEventsCount, \" events because the queue length exceeded \").concat(MAX_ARRAY_LENGTH, \".\"));\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, _super.prototype.set.call(this, key, value)];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n return LocalStorage;\n}(BrowserStorage));\nexport { LocalStorage };\n//# sourceMappingURL=local-storage.js.map","import { __extends } from \"tslib\";\nimport { getGlobalScope } from '@amplitude/analytics-client-common';\nimport { BrowserStorage } from './browser-storage';\nvar SessionStorage = /** @class */ (function (_super) {\n __extends(SessionStorage, _super);\n function SessionStorage() {\n var _a;\n return _super.call(this, (_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.sessionStorage) || this;\n }\n return SessionStorage;\n}(BrowserStorage));\nexport { SessionStorage };\n//# sourceMappingURL=session-storage.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n done: 4,\n };\n return _this;\n }\n XHRTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n /* istanbul ignore if */\n if (typeof XMLHttpRequest === 'undefined') {\n reject(new Error('XHRTransport is not supported.'));\n }\n var xhr = new XMLHttpRequest();\n xhr.open('POST', serverUrl, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === _this.state.done) {\n try {\n var responsePayload = xhr.responseText;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var parsedResponsePayload = JSON.parse(responsePayload);\n var result = _this.buildResponse(parsedResponsePayload);\n resolve(result);\n }\n catch (e) {\n reject(e);\n }\n }\n };\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.setRequestHeader('Accept', '*/*');\n xhr.send(JSON.stringify(payload));\n })];\n });\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { getGlobalScope } from '@amplitude/analytics-client-common';\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar SendBeaconTransport = /** @class */ (function (_super) {\n __extends(SendBeaconTransport, _super);\n function SendBeaconTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SendBeaconTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var globalScope = getGlobalScope();\n /* istanbul ignore if */\n if (!(globalScope === null || globalScope === void 0 ? void 0 : globalScope.navigator.sendBeacon)) {\n throw new Error('SendBeaconTransport is not supported');\n }\n try {\n var data = JSON.stringify(payload);\n var success = globalScope.navigator.sendBeacon(serverUrl, JSON.stringify(payload));\n if (success) {\n return resolve(_this.buildResponse({\n code: 200,\n events_ingested: payload.events.length,\n payload_size_bytes: data.length,\n server_upload_time: Date.now(),\n }));\n }\n return resolve(_this.buildResponse({ code: 500 }));\n }\n catch (e) {\n reject(e);\n }\n })];\n });\n });\n };\n return SendBeaconTransport;\n}(BaseTransport));\nexport { SendBeaconTransport };\n//# sourceMappingURL=send-beacon.js.map","import { __awaiter, __generator, __read } from \"tslib\";\nimport { getOldCookieName } from '@amplitude/analytics-client-common';\nexport var parseLegacyCookies = function (apiKey, cookieStorage, deleteLegacyCookies) {\n if (deleteLegacyCookies === void 0) { deleteLegacyCookies = true; }\n return __awaiter(void 0, void 0, void 0, function () {\n var cookieName, cookies, _a, deviceId, userId, optOut, sessionId, lastEventTime, lastEventId;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n cookieName = getOldCookieName(apiKey);\n return [4 /*yield*/, cookieStorage.getRaw(cookieName)];\n case 1:\n cookies = _b.sent();\n if (!cookies) {\n return [2 /*return*/, {\n optOut: false,\n }];\n }\n if (!deleteLegacyCookies) return [3 /*break*/, 3];\n return [4 /*yield*/, cookieStorage.remove(cookieName)];\n case 2:\n _b.sent();\n _b.label = 3;\n case 3:\n _a = __read(cookies.split('.'), 6), deviceId = _a[0], userId = _a[1], optOut = _a[2], sessionId = _a[3], lastEventTime = _a[4], lastEventId = _a[5];\n return [2 /*return*/, {\n deviceId: deviceId,\n userId: decode(userId),\n sessionId: parseTime(sessionId),\n lastEventId: parseTime(lastEventId),\n lastEventTime: parseTime(lastEventTime),\n optOut: Boolean(optOut),\n }];\n }\n });\n });\n};\nexport var parseTime = function (num) {\n var integer = parseInt(num, 32);\n if (isNaN(integer)) {\n return undefined;\n }\n return integer;\n};\nexport var decode = function (value) {\n if (!atob || !escape || !value) {\n return undefined;\n }\n try {\n return decodeURIComponent(escape(atob(value)));\n }\n catch (_a) {\n return undefined;\n }\n};\n//# sourceMappingURL=index.js.map","export var DEFAULT_EVENT_PREFIX = '[Amplitude]';\nexport var DEFAULT_PAGE_VIEW_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Page Viewed\");\nexport var DEFAULT_FORM_START_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Started\");\nexport var DEFAULT_FORM_SUBMIT_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Submitted\");\nexport var DEFAULT_FILE_DOWNLOAD_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Downloaded\");\nexport var DEFAULT_SESSION_START_EVENT = 'session_start';\nexport var DEFAULT_SESSION_END_EVENT = 'session_end';\nexport var FILE_EXTENSION = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Extension\");\nexport var FILE_NAME = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Name\");\nexport var LINK_ID = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link ID\");\nexport var LINK_TEXT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link Text\");\nexport var LINK_URL = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link URL\");\nexport var FORM_ID = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form ID\");\nexport var FORM_NAME = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Name\");\nexport var FORM_DESTINATION = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Destination\");\nexport var DEFAULT_IDENTITY_STORAGE = 'cookie';\nexport var DEFAULT_SERVER_ZONE = 'US';\n//# sourceMappingURL=constants.js.map","import { __assign, __awaiter, __extends, __generator } from \"tslib\";\nimport { LogLevel, } from '@amplitude/analytics-types';\nimport { Config, Logger, MemoryStorage, UUID } from '@amplitude/analytics-core';\nimport { CookieStorage, getCookieName, FetchTransport, getQueryParams } from '@amplitude/analytics-client-common';\nimport { LocalStorage } from './storage/local-storage';\nimport { SessionStorage } from './storage/session-storage';\nimport { XHRTransport } from './transports/xhr';\nimport { SendBeaconTransport } from './transports/send-beacon';\nimport { parseLegacyCookies } from './cookie-migration';\nimport { DEFAULT_IDENTITY_STORAGE, DEFAULT_SERVER_ZONE } from './constants';\n// Exported for testing purposes only. Do not expose to public interface.\nvar BrowserConfig = /** @class */ (function (_super) {\n __extends(BrowserConfig, _super);\n function BrowserConfig(apiKey, appVersion, cookieStorage, cookieOptions, defaultTracking, deviceId, flushIntervalMillis, flushMaxRetries, flushQueueSize, identityStorage, ingestionMetadata, instanceName, lastEventId, lastEventTime, loggerProvider, logLevel, minIdLength, optOut, partnerId, plan, serverUrl, serverZone, sessionId, sessionTimeout, storageProvider, trackingOptions, transport, useBatch, userId) {\n if (cookieStorage === void 0) { cookieStorage = new MemoryStorage(); }\n if (cookieOptions === void 0) { cookieOptions = {\n domain: '',\n expiration: 365,\n sameSite: 'Lax',\n secure: false,\n upgrade: true,\n }; }\n if (flushIntervalMillis === void 0) { flushIntervalMillis = 1000; }\n if (flushMaxRetries === void 0) { flushMaxRetries = 5; }\n if (flushQueueSize === void 0) { flushQueueSize = 30; }\n if (identityStorage === void 0) { identityStorage = DEFAULT_IDENTITY_STORAGE; }\n if (loggerProvider === void 0) { loggerProvider = new Logger(); }\n if (logLevel === void 0) { logLevel = LogLevel.Warn; }\n if (optOut === void 0) { optOut = false; }\n if (serverUrl === void 0) { serverUrl = ''; }\n if (serverZone === void 0) { serverZone = DEFAULT_SERVER_ZONE; }\n if (sessionTimeout === void 0) { sessionTimeout = 30 * 60 * 1000; }\n if (storageProvider === void 0) { storageProvider = new LocalStorage({ loggerProvider: loggerProvider }); }\n if (trackingOptions === void 0) { trackingOptions = {\n ipAddress: true,\n language: true,\n platform: true,\n }; }\n if (transport === void 0) { transport = 'fetch'; }\n if (useBatch === void 0) { useBatch = false; }\n var _this = _super.call(this, { apiKey: apiKey, storageProvider: storageProvider, transportProvider: createTransport(transport) }) || this;\n _this.apiKey = apiKey;\n _this.appVersion = appVersion;\n _this.cookieOptions = cookieOptions;\n _this.defaultTracking = defaultTracking;\n _this.flushIntervalMillis = flushIntervalMillis;\n _this.flushMaxRetries = flushMaxRetries;\n _this.flushQueueSize = flushQueueSize;\n _this.identityStorage = identityStorage;\n _this.ingestionMetadata = ingestionMetadata;\n _this.instanceName = instanceName;\n _this.loggerProvider = loggerProvider;\n _this.logLevel = logLevel;\n _this.minIdLength = minIdLength;\n _this.partnerId = partnerId;\n _this.plan = plan;\n _this.serverUrl = serverUrl;\n _this.serverZone = serverZone;\n _this.sessionTimeout = sessionTimeout;\n _this.storageProvider = storageProvider;\n _this.trackingOptions = trackingOptions;\n _this.transport = transport;\n _this.useBatch = useBatch;\n _this._optOut = false;\n _this._cookieStorage = cookieStorage;\n _this.deviceId = deviceId;\n _this.lastEventId = lastEventId;\n _this.lastEventTime = lastEventTime;\n _this.optOut = optOut;\n _this.sessionId = sessionId;\n _this.userId = userId;\n _this.loggerProvider.enable(_this.logLevel);\n return _this;\n }\n Object.defineProperty(BrowserConfig.prototype, \"cookieStorage\", {\n get: function () {\n return this._cookieStorage;\n },\n set: function (cookieStorage) {\n if (this._cookieStorage !== cookieStorage) {\n this._cookieStorage = cookieStorage;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"deviceId\", {\n get: function () {\n return this._deviceId;\n },\n set: function (deviceId) {\n if (this._deviceId !== deviceId) {\n this._deviceId = deviceId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"userId\", {\n get: function () {\n return this._userId;\n },\n set: function (userId) {\n if (this._userId !== userId) {\n this._userId = userId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"sessionId\", {\n get: function () {\n return this._sessionId;\n },\n set: function (sessionId) {\n if (this._sessionId !== sessionId) {\n this._sessionId = sessionId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"optOut\", {\n get: function () {\n return this._optOut;\n },\n set: function (optOut) {\n if (this._optOut !== optOut) {\n this._optOut = optOut;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"lastEventTime\", {\n get: function () {\n return this._lastEventTime;\n },\n set: function (lastEventTime) {\n if (this._lastEventTime !== lastEventTime) {\n this._lastEventTime = lastEventTime;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"lastEventId\", {\n get: function () {\n return this._lastEventId;\n },\n set: function (lastEventId) {\n if (this._lastEventId !== lastEventId) {\n this._lastEventId = lastEventId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n BrowserConfig.prototype.updateStorage = function () {\n var cache = {\n deviceId: this._deviceId,\n userId: this._userId,\n sessionId: this._sessionId,\n optOut: this._optOut,\n lastEventTime: this._lastEventTime,\n lastEventId: this._lastEventId,\n };\n void this.cookieStorage.set(getCookieName(this.apiKey), cache);\n };\n return BrowserConfig;\n}(Config));\nexport { BrowserConfig };\nexport var useBrowserConfig = function (apiKey, options, amplitudeInstance) {\n if (options === void 0) { options = {}; }\n return __awaiter(void 0, void 0, void 0, function () {\n var identityStorage, cookieOptions, _a, _b, cookieStorage, legacyCookies, previousCookies, queryParams, deviceId, lastEventId, lastEventTime, optOut, sessionId, userId, trackingOptions;\n var _c;\n var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;\n return __generator(this, function (_2) {\n switch (_2.label) {\n case 0:\n identityStorage = options.identityStorage || DEFAULT_IDENTITY_STORAGE;\n _c = {};\n if (!(identityStorage !== DEFAULT_IDENTITY_STORAGE)) return [3 /*break*/, 1];\n _a = '';\n return [3 /*break*/, 5];\n case 1:\n if (!((_e = (_d = options.cookieOptions) === null || _d === void 0 ? void 0 : _d.domain) !== null && _e !== void 0)) return [3 /*break*/, 2];\n _b = _e;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, getTopLevelDomain()];\n case 3:\n _b = (_2.sent());\n _2.label = 4;\n case 4:\n _a = _b;\n _2.label = 5;\n case 5:\n cookieOptions = __assign.apply(void 0, [(_c.domain = _a, _c.expiration = 365, _c.sameSite = 'Lax', _c.secure = false, _c.upgrade = true, _c), options.cookieOptions]);\n cookieStorage = createCookieStorage(options.identityStorage, cookieOptions);\n return [4 /*yield*/, parseLegacyCookies(apiKey, cookieStorage, (_g = (_f = options.cookieOptions) === null || _f === void 0 ? void 0 : _f.upgrade) !== null && _g !== void 0 ? _g : true)];\n case 6:\n legacyCookies = _2.sent();\n return [4 /*yield*/, cookieStorage.get(getCookieName(apiKey))];\n case 7:\n previousCookies = _2.sent();\n queryParams = getQueryParams();\n deviceId = (_l = (_k = (_j = (_h = options.deviceId) !== null && _h !== void 0 ? _h : queryParams.deviceId) !== null && _j !== void 0 ? _j : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.deviceId) !== null && _k !== void 0 ? _k : legacyCookies.deviceId) !== null && _l !== void 0 ? _l : UUID();\n lastEventId = (_m = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventId) !== null && _m !== void 0 ? _m : legacyCookies.lastEventId;\n lastEventTime = (_o = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventTime) !== null && _o !== void 0 ? _o : legacyCookies.lastEventTime;\n optOut = (_q = (_p = options.optOut) !== null && _p !== void 0 ? _p : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.optOut) !== null && _q !== void 0 ? _q : legacyCookies.optOut;\n sessionId = (_r = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.sessionId) !== null && _r !== void 0 ? _r : legacyCookies.sessionId;\n userId = (_t = (_s = options.userId) !== null && _s !== void 0 ? _s : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _t !== void 0 ? _t : legacyCookies.userId;\n amplitudeInstance.previousSessionDeviceId = (_u = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.deviceId) !== null && _u !== void 0 ? _u : legacyCookies.deviceId;\n amplitudeInstance.previousSessionUserId = (_v = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _v !== void 0 ? _v : legacyCookies.userId;\n trackingOptions = {\n ipAddress: (_x = (_w = options.trackingOptions) === null || _w === void 0 ? void 0 : _w.ipAddress) !== null && _x !== void 0 ? _x : true,\n language: (_z = (_y = options.trackingOptions) === null || _y === void 0 ? void 0 : _y.language) !== null && _z !== void 0 ? _z : true,\n platform: (_1 = (_0 = options.trackingOptions) === null || _0 === void 0 ? void 0 : _0.platform) !== null && _1 !== void 0 ? _1 : true,\n };\n return [2 /*return*/, new BrowserConfig(apiKey, options.appVersion, cookieStorage, cookieOptions, options.defaultTracking, deviceId, options.flushIntervalMillis, options.flushMaxRetries, options.flushQueueSize, identityStorage, options.ingestionMetadata, options.instanceName, lastEventId, lastEventTime, options.loggerProvider, options.logLevel, options.minIdLength, optOut, options.partnerId, options.plan, options.serverUrl, options.serverZone, sessionId, options.sessionTimeout, options.storageProvider, trackingOptions, options.transport, options.useBatch, userId)];\n }\n });\n });\n};\nexport var createCookieStorage = function (identityStorage, cookieOptions) {\n if (identityStorage === void 0) { identityStorage = DEFAULT_IDENTITY_STORAGE; }\n if (cookieOptions === void 0) { cookieOptions = {}; }\n switch (identityStorage) {\n case 'localStorage':\n return new LocalStorage();\n case 'sessionStorage':\n return new SessionStorage();\n case 'none':\n return new MemoryStorage();\n case 'cookie':\n default:\n return new CookieStorage(__assign(__assign({}, cookieOptions), { expirationDays: cookieOptions.expiration }));\n }\n};\nexport var createTransport = function (transport) {\n if (transport === 'xhr') {\n return new XHRTransport();\n }\n if (transport === 'beacon') {\n return new SendBeaconTransport();\n }\n return new FetchTransport();\n};\nexport var getTopLevelDomain = function (url) { return __awaiter(void 0, void 0, void 0, function () {\n var host, parts, levels, storageKey, i, i, domain, options, storage, value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new CookieStorage().isEnabled()];\n case 1:\n if (!(_a.sent()) || (!url && typeof location === 'undefined')) {\n return [2 /*return*/, ''];\n }\n host = url !== null && url !== void 0 ? url : location.hostname;\n parts = host.split('.');\n levels = [];\n storageKey = 'AMP_TLDTEST';\n for (i = parts.length - 2; i >= 0; --i) {\n levels.push(parts.slice(i).join('.'));\n }\n i = 0;\n _a.label = 2;\n case 2:\n if (!(i < levels.length)) return [3 /*break*/, 7];\n domain = levels[i];\n options = { domain: '.' + domain };\n storage = new CookieStorage(options);\n return [4 /*yield*/, storage.set(storageKey, 1)];\n case 3:\n _a.sent();\n return [4 /*yield*/, storage.get(storageKey)];\n case 4:\n value = _a.sent();\n if (!value) return [3 /*break*/, 6];\n return [4 /*yield*/, storage.remove(storageKey)];\n case 5:\n _a.sent();\n return [2 /*return*/, '.' + domain];\n case 6:\n i++;\n return [3 /*break*/, 2];\n case 7: return [2 /*return*/, ''];\n }\n });\n}); };\n//# sourceMappingURL=config.js.map","import { __assign, __read, __rest } from \"tslib\";\nimport { BASE_CAMPAIGN } from '@amplitude/analytics-client-common';\nimport { AMPLITUDE_PREFIX, createIdentifyEvent, Identify } from '@amplitude/analytics-core';\nexport var getStorageKey = function (apiKey, postKey, limit) {\n if (postKey === void 0) { postKey = ''; }\n if (limit === void 0) { limit = 10; }\n return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_');\n};\nvar domainWithoutSubdomain = function (domain) {\n var parts = domain.split('.');\n if (parts.length <= 2) {\n return domain;\n }\n return parts.slice(parts.length - 2, parts.length).join('.');\n};\n//Direct traffic mean no external referral, no UTMs, no click-ids, and no other customer identified marketing campaign url params.\nvar isDirectTraffic = function (current) {\n return Object.values(current).every(function (value) { return !value; });\n};\nexport var isNewCampaign = function (current, previous, options, isNewSession) {\n if (isNewSession === void 0) { isNewSession = true; }\n var referrer = current.referrer, referring_domain = current.referring_domain, currentCampaign = __rest(current, [\"referrer\", \"referring_domain\"]);\n var _a = previous || {}, _previous_referrer = _a.referrer, prevReferringDomain = _a.referring_domain, previousCampaign = __rest(_a, [\"referrer\", \"referring_domain\"]);\n if (isExcludedReferrer(options.excludeReferrers, current.referring_domain)) {\n return false;\n }\n //In the same session, direct traffic should not override or unset any persisting query params\n if (!isNewSession && isDirectTraffic(current) && previous) {\n return false;\n }\n var hasNewCampaign = JSON.stringify(currentCampaign) !== JSON.stringify(previousCampaign);\n var hasNewDomain = domainWithoutSubdomain(referring_domain || '') !== domainWithoutSubdomain(prevReferringDomain || '');\n return !previous || hasNewCampaign || hasNewDomain;\n};\nexport var isExcludedReferrer = function (excludeReferrers, referringDomain) {\n if (excludeReferrers === void 0) { excludeReferrers = []; }\n if (referringDomain === void 0) { referringDomain = ''; }\n return excludeReferrers.some(function (value) {\n return value instanceof RegExp ? value.test(referringDomain) : value === referringDomain;\n });\n};\nexport var createCampaignEvent = function (campaign, options) {\n var campaignParameters = __assign(__assign({}, BASE_CAMPAIGN), campaign);\n var identifyEvent = Object.entries(campaignParameters).reduce(function (identify, _a) {\n var _b;\n var _c = __read(_a, 2), key = _c[0], value = _c[1];\n identify.setOnce(\"initial_\".concat(key), (_b = value !== null && value !== void 0 ? value : options.initialEmptyValue) !== null && _b !== void 0 ? _b : 'EMPTY');\n if (value) {\n return identify.set(key, value);\n }\n return identify.unset(key);\n }, new Identify());\n return createIdentifyEvent(identifyEvent);\n};\nexport var getDefaultExcludedReferrers = function (cookieDomain) {\n var domain = cookieDomain;\n if (domain) {\n if (domain.startsWith('.')) {\n domain = domain.substring(1);\n }\n return [new RegExp(\"\".concat(domain.replace('.', '\\\\.'), \"$\"))];\n }\n return [];\n};\n//# sourceMappingURL=helpers.js.map","import { __assign, __awaiter, __generator, __read } from \"tslib\";\nimport { CampaignParser } from '@amplitude/analytics-client-common';\nimport { createCampaignEvent, getDefaultExcludedReferrers, getStorageKey, isNewCampaign } from './helpers';\nimport { isNewSession } from '@amplitude/analytics-client-common';\nexport var webAttributionPlugin = function (options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var plugin = {\n name: '@amplitude/plugin-web-attribution-browser',\n type: 'before',\n setup: function (config, amplitude) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var pluginConfig, storage, storageKey, _b, currentCampaign, previousCampaign, isEventInNewSession, campaignEvent;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n pluginConfig = __assign({ initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: false, excludeReferrers: getDefaultExcludedReferrers((_a = config.cookieOptions) === null || _a === void 0 ? void 0 : _a.domain) }, options);\n config.loggerProvider.log('Installing @amplitude/plugin-web-attribution-browser.');\n storage = config.cookieStorage;\n storageKey = getStorageKey(config.apiKey, 'MKTG');\n return [4 /*yield*/, Promise.all([\n new CampaignParser().parse(),\n storage.get(storageKey),\n ])];\n case 1:\n _b = __read.apply(void 0, [_c.sent(), 2]), currentCampaign = _b[0], previousCampaign = _b[1];\n isEventInNewSession = isNewSession(config.sessionTimeout, config.lastEventTime);\n if (isNewCampaign(currentCampaign, previousCampaign, pluginConfig, isEventInNewSession)) {\n if (pluginConfig.resetSessionOnNewCampaign) {\n amplitude.setSessionId(Date.now());\n config.loggerProvider.log('Created a new session for new campaign.');\n }\n config.loggerProvider.log('Tracking attribution.');\n campaignEvent = createCampaignEvent(currentCampaign, pluginConfig);\n amplitude.track(campaignEvent);\n void storage.set(storageKey, currentCampaign);\n }\n return [2 /*return*/];\n }\n });\n });\n },\n execute: function (event) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); },\n };\n return plugin;\n};\n//# sourceMappingURL=web-attribution.js.map","export var omitUndefined = function (input) {\n var obj = {};\n for (var key in input) {\n var val = input[key];\n if (val) {\n obj[key] = val;\n }\n }\n return obj;\n};\n//# sourceMappingURL=utils.js.map","import { __assign, __awaiter, __generator, __read, __spreadArray } from \"tslib\";\nimport { CampaignParser, getGlobalScope } from '@amplitude/analytics-client-common';\nimport { IdentifyOperation, } from '@amplitude/analytics-types';\nimport { BASE_CAMPAIGN } from '@amplitude/analytics-client-common';\nimport { omitUndefined } from './utils';\nexport var pageViewTrackingPlugin = function (options) {\n if (options === void 0) { options = {}; }\n var amplitude;\n var globalScope = getGlobalScope();\n var loggerProvider = undefined;\n var pushState;\n var createPageViewEvent = function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a;\n var _b;\n var _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n _b = {\n event_type: (_c = options.eventType) !== null && _c !== void 0 ? _c : '[Amplitude] Page Viewed'\n };\n _a = [{}];\n return [4 /*yield*/, getCampaignParams()];\n case 1: return [2 /*return*/, (_b.event_properties = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), { '[Amplitude] Page Domain': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.hostname) || '', '[Amplitude] Page Location': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.href) || '', '[Amplitude] Page Path': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.pathname) || '', '[Amplitude] Page Title': /* istanbul ignore next */ (typeof document !== 'undefined' && document.title) || '', '[Amplitude] Page URL': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.href.split('?')[0]) || '' }]),\n _b)];\n }\n });\n }); };\n var shouldTrackOnPageLoad = function () {\n return typeof options.trackOn === 'undefined' || (typeof options.trackOn === 'function' && options.trackOn());\n };\n /* istanbul ignore next */\n var previousURL = typeof location !== 'undefined' ? location.href : null;\n var trackHistoryPageView = function () { return __awaiter(void 0, void 0, void 0, function () {\n var newURL, shouldTrackPageView, _a, _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n newURL = location.href;\n shouldTrackPageView = shouldTrackHistoryPageView(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad();\n // Note: Update `previousURL` in the same clock tick as `shouldTrackHistoryPageView()`\n // This was previously done after `amplitude?.track(await createPageViewEvent());` and\n // causes a concurrency issue where app triggers `pushState` twice with the same URL target\n // but `previousURL` is only updated after the second `pushState` producing two page viewed events\n previousURL = newURL;\n if (!shouldTrackPageView) return [3 /*break*/, 4];\n /* istanbul ignore next */\n loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Tracking page view event');\n if (!(amplitude === null || amplitude === void 0)) return [3 /*break*/, 1];\n _a = void 0;\n return [3 /*break*/, 3];\n case 1:\n _c = (_b = amplitude).track;\n return [4 /*yield*/, createPageViewEvent()];\n case 2:\n _a = _c.apply(_b, [_d.sent()]);\n _d.label = 3;\n case 3:\n _a;\n _d.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n }); };\n /* istanbul ignore next */\n var trackHistoryPageViewWrapper = function () {\n void trackHistoryPageView();\n };\n var plugin = {\n name: '@amplitude/plugin-page-view-tracking-browser',\n type: 'enrichment',\n setup: function (config, client) { return __awaiter(void 0, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n amplitude = client;\n loggerProvider = config.loggerProvider;\n loggerProvider.log('Installing @amplitude/plugin-page-view-tracking-browser');\n if (globalScope) {\n globalScope.addEventListener('popstate', trackHistoryPageViewWrapper);\n // Save reference to original push state, to be used in teardown\n // eslint-disable-next-line @typescript-eslint/unbound-method\n pushState = globalScope.history.pushState;\n /* istanbul ignore next */\n // There is no global browser listener for changes to history, so we have\n // to modify pushState directly.\n // https://stackoverflow.com/a/64927639\n // eslint-disable-next-line @typescript-eslint/unbound-method\n globalScope.history.pushState = new Proxy(globalScope.history.pushState, {\n apply: function (target, thisArg, _a) {\n var _b = __read(_a, 3), state = _b[0], unused = _b[1], url = _b[2];\n target.apply(thisArg, [state, unused, url]);\n void trackHistoryPageView();\n },\n });\n }\n if (!shouldTrackOnPageLoad()) return [3 /*break*/, 2];\n loggerProvider.log('Tracking page view event');\n _b = (_a = amplitude).track;\n return [4 /*yield*/, createPageViewEvent()];\n case 1:\n _b.apply(_a, [_c.sent()]);\n _c.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); },\n execute: function (event) { return __awaiter(void 0, void 0, void 0, function () {\n var pageViewEvent;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(options.trackOn === 'attribution' && isCampaignEvent(event))) return [3 /*break*/, 2];\n /* istanbul ignore next */ // loggerProvider should be defined by the time execute is invoked\n loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Enriching campaign event to page view event with campaign parameters');\n return [4 /*yield*/, createPageViewEvent()];\n case 1:\n pageViewEvent = _a.sent();\n event.event_type = pageViewEvent.event_type;\n event.event_properties = __assign(__assign({}, event.event_properties), pageViewEvent.event_properties);\n _a.label = 2;\n case 2: return [2 /*return*/, event];\n }\n });\n }); },\n teardown: function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (globalScope) {\n globalScope.removeEventListener('popstate', trackHistoryPageViewWrapper);\n if (pushState) {\n globalScope.history.pushState = pushState;\n }\n }\n return [2 /*return*/];\n });\n }); },\n };\n return plugin;\n};\nvar getCampaignParams = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = omitUndefined;\n return [4 /*yield*/, new CampaignParser().parse()];\n case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];\n }\n}); }); };\nvar isCampaignEvent = function (event) {\n if (event.event_type === '$identify' && event.user_properties) {\n var properties = event.user_properties;\n var $set = properties[IdentifyOperation.SET] || {};\n var $unset = properties[IdentifyOperation.UNSET] || {};\n var userProperties_1 = __spreadArray(__spreadArray([], __read(Object.keys($set)), false), __read(Object.keys($unset)), false);\n return Object.keys(BASE_CAMPAIGN).every(function (value) { return userProperties_1.includes(value); });\n }\n return false;\n};\nexport var shouldTrackHistoryPageView = function (trackingOption, newURL, oldURL) {\n switch (trackingOption) {\n case 'pathOnly':\n return newURL.split('?')[0] !== oldURL.split('?')[0];\n default:\n return newURL !== oldURL;\n }\n};\n//# sourceMappingURL=page-view-tracking.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { DEFAULT_FORM_START_EVENT, DEFAULT_FORM_SUBMIT_EVENT, FORM_ID, FORM_NAME, FORM_DESTINATION, } from '../constants';\nexport var formInteractionTracking = function () {\n var observer;\n var eventListeners = [];\n var addEventListener = function (element, type, handler) {\n element.addEventListener(type, handler);\n eventListeners.push({\n element: element,\n type: type,\n handler: handler,\n });\n };\n var removeClickListeners = function () {\n eventListeners.forEach(function (_a) {\n var element = _a.element, type = _a.type, handler = _a.handler;\n /* istanbul ignore next */\n element === null || element === void 0 ? void 0 : element.removeEventListener(type, handler);\n });\n eventListeners = [];\n };\n var name = '@amplitude/plugin-form-interaction-tracking-browser';\n var type = 'enrichment';\n var setup = function (config, amplitude) { return __awaiter(void 0, void 0, void 0, function () {\n var addFormInteractionListener, forms;\n return __generator(this, function (_a) {\n /* istanbul ignore if */\n if (!amplitude) {\n // TODO: Add required minimum version of @amplitude/analytics-browser\n config.loggerProvider.warn('Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.');\n return [2 /*return*/];\n }\n /* istanbul ignore if */\n if (typeof document === 'undefined') {\n return [2 /*return*/];\n }\n addFormInteractionListener = function (form) {\n var hasFormChanged = false;\n addEventListener(form, 'change', function () {\n var _a;\n if (!hasFormChanged) {\n amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},\n _a[FORM_ID] = form.id,\n _a[FORM_NAME] = stringOrUndefined(form.name),\n _a[FORM_DESTINATION] = form.action,\n _a));\n }\n hasFormChanged = true;\n });\n addEventListener(form, 'submit', function () {\n var _a, _b;\n if (!hasFormChanged) {\n amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},\n _a[FORM_ID] = form.id,\n _a[FORM_NAME] = stringOrUndefined(form.name),\n _a[FORM_DESTINATION] = form.action,\n _a));\n }\n amplitude.track(DEFAULT_FORM_SUBMIT_EVENT, (_b = {},\n _b[FORM_ID] = form.id,\n _b[FORM_NAME] = stringOrUndefined(form.name),\n _b[FORM_DESTINATION] = form.action,\n _b));\n hasFormChanged = false;\n });\n };\n forms = Array.from(document.getElementsByTagName('form'));\n forms.forEach(addFormInteractionListener);\n // Adds listener to anchor tags added after initial load\n /* istanbul ignore else */\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n mutation.addedNodes.forEach(function (node) {\n if (node.nodeName === 'FORM') {\n addFormInteractionListener(node);\n }\n if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') {\n Array.from(node.querySelectorAll('form')).map(addFormInteractionListener);\n }\n });\n });\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true,\n });\n }\n return [2 /*return*/];\n });\n }); };\n var execute = function (event) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); };\n var teardown = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n observer === null || observer === void 0 ? void 0 : observer.disconnect();\n removeClickListeners();\n return [2 /*return*/];\n });\n }); };\n return {\n name: name,\n type: type,\n setup: setup,\n execute: execute,\n teardown: teardown,\n };\n};\nexport var stringOrUndefined = function (name) {\n /* istanbul ignore if */\n if (typeof name !== 'string') {\n // We found instances where the value of `name` is an Element and not a string.\n // Elements may have circular references and would throw an error when passed to `JSON.stringify(...)`.\n // If a non-string value is seen, assume there is no value.\n return undefined;\n }\n return name;\n};\n//# sourceMappingURL=form-interaction-tracking.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { DEFAULT_FILE_DOWNLOAD_EVENT, FILE_EXTENSION, FILE_NAME, LINK_ID, LINK_TEXT, LINK_URL } from '../constants';\nexport var fileDownloadTracking = function () {\n var observer;\n var eventListeners = [];\n var addEventListener = function (element, type, handler) {\n element.addEventListener(type, handler);\n eventListeners.push({\n element: element,\n type: type,\n handler: handler,\n });\n };\n var removeClickListeners = function () {\n eventListeners.forEach(function (_a) {\n var element = _a.element, type = _a.type, handler = _a.handler;\n /* istanbul ignore next */\n element === null || element === void 0 ? void 0 : element.removeEventListener(type, handler);\n });\n eventListeners = [];\n };\n var name = '@amplitude/plugin-file-download-tracking-browser';\n var type = 'enrichment';\n var setup = function (config, amplitude) { return __awaiter(void 0, void 0, void 0, function () {\n var addFileDownloadListener, ext, links;\n return __generator(this, function (_a) {\n /* istanbul ignore if */\n if (!amplitude) {\n // TODO: Add required minimum version of @amplitude/analytics-browser\n config.loggerProvider.warn('File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.');\n return [2 /*return*/];\n }\n /* istanbul ignore if */\n if (typeof document === 'undefined') {\n return [2 /*return*/];\n }\n addFileDownloadListener = function (a) {\n var url;\n try {\n // eslint-disable-next-line no-restricted-globals\n url = new URL(a.href, window.location.href);\n }\n catch (_a) {\n /* istanbul ignore next */\n return;\n }\n var result = ext.exec(url.href);\n var fileExtension = result === null || result === void 0 ? void 0 : result[1];\n if (fileExtension) {\n addEventListener(a, 'click', function () {\n var _a;\n if (fileExtension) {\n amplitude.track(DEFAULT_FILE_DOWNLOAD_EVENT, (_a = {},\n _a[FILE_EXTENSION] = fileExtension,\n _a[FILE_NAME] = url.pathname,\n _a[LINK_ID] = a.id,\n _a[LINK_TEXT] = a.text,\n _a[LINK_URL] = a.href,\n _a));\n }\n });\n }\n };\n ext = /\\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/;\n links = Array.from(document.getElementsByTagName('a'));\n links.forEach(addFileDownloadListener);\n // Adds listener to anchor tags added after initial load\n /* istanbul ignore else */\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n mutation.addedNodes.forEach(function (node) {\n if (node.nodeName === 'A') {\n addFileDownloadListener(node);\n }\n if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') {\n Array.from(node.querySelectorAll('a')).map(addFileDownloadListener);\n }\n });\n });\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true,\n });\n }\n return [2 /*return*/];\n });\n }); };\n var execute = function (event) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); };\n var teardown = function () { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n observer === null || observer === void 0 ? void 0 : observer.disconnect();\n removeClickListeners();\n return [2 /*return*/];\n });\n }); };\n return {\n name: name,\n type: type,\n setup: setup,\n execute: execute,\n teardown: teardown,\n };\n};\n//# sourceMappingURL=file-download-tracking.js.map","var notified = false;\nexport var detNotify = function (config) {\n if (notified || config.defaultTracking !== undefined) {\n return;\n }\n var message = \"`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\\n\\namplitude.init(, {\\n defaultTracking: true,\\n});\\n\\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.\";\n config.loggerProvider.warn(message);\n notified = true;\n};\n/**\n * @private\n * This function is meant for testing purposes only\n */\nexport var resetNotify = function () {\n notified = false;\n};\n//# sourceMappingURL=det-notification.js.map","import { __assign, __awaiter, __extends, __generator } from \"tslib\";\nimport { AmplitudeCore, Destination, Identify, returnWrapper, Revenue, UUID } from '@amplitude/analytics-core';\nimport { getAnalyticsConnector, getAttributionTrackingConfig, getPageViewTrackingConfig, IdentityEventSender, isAttributionTrackingEnabled, isSessionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, setConnectorDeviceId, setConnectorUserId, isNewSession, } from '@amplitude/analytics-client-common';\nimport { convertProxyObjectToRealObject, isInstanceProxy } from './utils/snippet-helper';\nimport { Context } from './plugins/context';\nimport { useBrowserConfig, createTransport } from './config';\nimport { webAttributionPlugin } from '@amplitude/plugin-web-attribution-browser';\nimport { pageViewTrackingPlugin } from '@amplitude/plugin-page-view-tracking-browser';\nimport { formInteractionTracking } from './plugins/form-interaction-tracking';\nimport { fileDownloadTracking } from './plugins/file-download-tracking';\nimport { DEFAULT_SESSION_END_EVENT, DEFAULT_SESSION_START_EVENT } from './constants';\nimport { detNotify } from './det-notification';\nvar AmplitudeBrowser = /** @class */ (function (_super) {\n __extends(AmplitudeBrowser, _super);\n function AmplitudeBrowser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AmplitudeBrowser.prototype.init = function (apiKey, userIdOrOptions, maybeOptions) {\n if (apiKey === void 0) { apiKey = ''; }\n var userId;\n var options;\n if (arguments.length > 2) {\n userId = userIdOrOptions;\n options = maybeOptions;\n }\n else {\n if (typeof userIdOrOptions === 'string') {\n userId = userIdOrOptions;\n options = undefined;\n }\n else {\n userId = userIdOrOptions === null || userIdOrOptions === void 0 ? void 0 : userIdOrOptions.userId;\n options = userIdOrOptions;\n }\n }\n return returnWrapper(this._init(__assign(__assign({}, options), { userId: userId, apiKey: apiKey })));\n };\n AmplitudeBrowser.prototype._init = function (options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var browserOptions, connector, attributionTrackingOptions, webAttribution;\n var _this = this;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n // Step 1: Block concurrent initialization\n if (this.initializing) {\n return [2 /*return*/];\n }\n this.initializing = true;\n return [4 /*yield*/, useBrowserConfig(options.apiKey, options, this)];\n case 1:\n browserOptions = _c.sent();\n return [4 /*yield*/, _super.prototype._init.call(this, browserOptions)];\n case 2:\n _c.sent();\n // Step 3: Set session ID\n // Priority 1: `options.sessionId`\n // Priority 2: last known sessionId from user identity storage\n // Default: `Date.now()`\n // Session ID is handled differently than device ID and user ID due to session events\n this.setSessionId((_b = (_a = options.sessionId) !== null && _a !== void 0 ? _a : this.config.sessionId) !== null && _b !== void 0 ? _b : Date.now());\n connector = getAnalyticsConnector(options.instanceName);\n connector.identityStore.setIdentity({\n userId: this.config.userId,\n deviceId: this.config.deviceId,\n });\n // Step 4: Install plugins\n // Do not track any events before this\n return [4 /*yield*/, this.add(new Destination()).promise];\n case 3:\n // Step 4: Install plugins\n // Do not track any events before this\n _c.sent();\n return [4 /*yield*/, this.add(new Context()).promise];\n case 4:\n _c.sent();\n return [4 /*yield*/, this.add(new IdentityEventSender()).promise];\n case 5:\n _c.sent();\n // Notify if DET is enabled\n detNotify(this.config);\n if (!isFileDownloadTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 7];\n return [4 /*yield*/, this.add(fileDownloadTracking()).promise];\n case 6:\n _c.sent();\n _c.label = 7;\n case 7:\n if (!isFormInteractionTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 9];\n return [4 /*yield*/, this.add(formInteractionTracking()).promise];\n case 8:\n _c.sent();\n _c.label = 9;\n case 9:\n if (!isAttributionTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 11];\n attributionTrackingOptions = getAttributionTrackingConfig(this.config);\n webAttribution = webAttributionPlugin(attributionTrackingOptions);\n return [4 /*yield*/, this.add(webAttribution).promise];\n case 10:\n _c.sent();\n _c.label = 11;\n case 11: \n // Add page view plugin\n return [4 /*yield*/, this.add(pageViewTrackingPlugin(getPageViewTrackingConfig(this.config))).promise];\n case 12:\n // Add page view plugin\n _c.sent();\n this.initializing = false;\n // Step 6: Run queued dispatch functions\n return [4 /*yield*/, this.runQueuedFunctions('dispatchQ')];\n case 13:\n // Step 6: Run queued dispatch functions\n _c.sent();\n // Step 7: Add the event receiver after running remaining queued functions.\n connector.eventBridge.setEventReceiver(function (event) {\n void _this.track(event.eventType, event.eventProperties);\n });\n return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeBrowser.prototype.getUserId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.userId;\n };\n AmplitudeBrowser.prototype.setUserId = function (userId) {\n if (!this.config) {\n this.q.push(this.setUserId.bind(this, userId));\n return;\n }\n if (userId !== this.config.userId || userId === undefined) {\n this.config.userId = userId;\n setConnectorUserId(userId, this.config.instanceName);\n }\n };\n AmplitudeBrowser.prototype.getDeviceId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.deviceId;\n };\n AmplitudeBrowser.prototype.setDeviceId = function (deviceId) {\n if (!this.config) {\n this.q.push(this.setDeviceId.bind(this, deviceId));\n return;\n }\n this.config.deviceId = deviceId;\n setConnectorDeviceId(deviceId, this.config.instanceName);\n };\n AmplitudeBrowser.prototype.reset = function () {\n this.setDeviceId(UUID());\n this.setUserId(undefined);\n };\n AmplitudeBrowser.prototype.getSessionId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionId;\n };\n AmplitudeBrowser.prototype.setSessionId = function (sessionId) {\n var _a;\n if (!this.config) {\n this.q.push(this.setSessionId.bind(this, sessionId));\n return;\n }\n // Prevents starting a new session with the same session ID\n if (sessionId === this.config.sessionId) {\n return;\n }\n var previousSessionId = this.getSessionId();\n var lastEventTime = this.config.lastEventTime;\n var lastEventId = (_a = this.config.lastEventId) !== null && _a !== void 0 ? _a : -1;\n this.config.sessionId = sessionId;\n this.config.lastEventTime = undefined;\n if (isSessionTrackingEnabled(this.config.defaultTracking)) {\n if (previousSessionId && lastEventTime) {\n this.track(DEFAULT_SESSION_END_EVENT, undefined, {\n device_id: this.previousSessionDeviceId,\n event_id: ++lastEventId,\n session_id: previousSessionId,\n time: lastEventTime + 1,\n user_id: this.previousSessionUserId,\n });\n }\n this.config.lastEventTime = this.config.sessionId;\n this.track(DEFAULT_SESSION_START_EVENT, undefined, {\n event_id: ++lastEventId,\n session_id: this.config.sessionId,\n time: this.config.lastEventTime,\n });\n }\n this.previousSessionDeviceId = this.config.deviceId;\n this.previousSessionUserId = this.config.userId;\n };\n AmplitudeBrowser.prototype.extendSession = function () {\n if (!this.config) {\n this.q.push(this.extendSession.bind(this));\n return;\n }\n this.config.lastEventTime = Date.now();\n };\n AmplitudeBrowser.prototype.setTransport = function (transport) {\n if (!this.config) {\n this.q.push(this.setTransport.bind(this, transport));\n return;\n }\n this.config.transportProvider = createTransport(transport);\n };\n AmplitudeBrowser.prototype.identify = function (identify, eventOptions) {\n if (isInstanceProxy(identify)) {\n var queue = identify._q;\n identify._q = [];\n identify = convertProxyObjectToRealObject(new Identify(), queue);\n }\n if (eventOptions === null || eventOptions === void 0 ? void 0 : eventOptions.user_id) {\n this.setUserId(eventOptions.user_id);\n }\n if (eventOptions === null || eventOptions === void 0 ? void 0 : eventOptions.device_id) {\n this.setDeviceId(eventOptions.device_id);\n }\n return _super.prototype.identify.call(this, identify, eventOptions);\n };\n AmplitudeBrowser.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {\n if (isInstanceProxy(identify)) {\n var queue = identify._q;\n identify._q = [];\n identify = convertProxyObjectToRealObject(new Identify(), queue);\n }\n return _super.prototype.groupIdentify.call(this, groupType, groupName, identify, eventOptions);\n };\n AmplitudeBrowser.prototype.revenue = function (revenue, eventOptions) {\n if (isInstanceProxy(revenue)) {\n var queue = revenue._q;\n revenue._q = [];\n revenue = convertProxyObjectToRealObject(new Revenue(), queue);\n }\n return _super.prototype.revenue.call(this, revenue, eventOptions);\n };\n AmplitudeBrowser.prototype.process = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var currentTime, isEventInNewSession;\n return __generator(this, function (_a) {\n currentTime = Date.now();\n isEventInNewSession = isNewSession(this.config.sessionTimeout, this.config.lastEventTime);\n if (event.event_type !== DEFAULT_SESSION_START_EVENT &&\n event.event_type !== DEFAULT_SESSION_END_EVENT &&\n (!event.session_id || event.session_id === this.getSessionId()) &&\n isEventInNewSession) {\n this.setSessionId(currentTime);\n }\n return [2 /*return*/, _super.prototype.process.call(this, event)];\n });\n });\n };\n return AmplitudeBrowser;\n}(AmplitudeCore));\nexport { AmplitudeBrowser };\n//# sourceMappingURL=browser-client.js.map","import { debugWrapper, getClientLogConfig, getClientStates } from '@amplitude/analytics-core';\nimport { AmplitudeBrowser } from './browser-client';\nexport var createInstance = function () {\n var client = new AmplitudeBrowser();\n return {\n init: debugWrapper(client.init.bind(client), 'init', getClientLogConfig(client), getClientStates(client, ['config'])),\n add: debugWrapper(client.add.bind(client), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),\n remove: debugWrapper(client.remove.bind(client), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),\n track: debugWrapper(client.track.bind(client), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n logEvent: debugWrapper(client.logEvent.bind(client), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n identify: debugWrapper(client.identify.bind(client), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n groupIdentify: debugWrapper(client.groupIdentify.bind(client), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n setGroup: debugWrapper(client.setGroup.bind(client), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n revenue: debugWrapper(client.revenue.bind(client), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n flush: debugWrapper(client.flush.bind(client), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n getUserId: debugWrapper(client.getUserId.bind(client), 'getUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId'])),\n setUserId: debugWrapper(client.setUserId.bind(client), 'setUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId'])),\n getDeviceId: debugWrapper(client.getDeviceId.bind(client), 'getDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId'])),\n setDeviceId: debugWrapper(client.setDeviceId.bind(client), 'setDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId'])),\n reset: debugWrapper(client.reset.bind(client), 'reset', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId'])),\n getSessionId: debugWrapper(client.getSessionId.bind(client), 'getSessionId', getClientLogConfig(client), getClientStates(client, ['config'])),\n setSessionId: debugWrapper(client.setSessionId.bind(client), 'setSessionId', getClientLogConfig(client), getClientStates(client, ['config'])),\n extendSession: debugWrapper(client.extendSession.bind(client), 'extendSession', getClientLogConfig(client), getClientStates(client, ['config'])),\n setOptOut: debugWrapper(client.setOptOut.bind(client), 'setOptOut', getClientLogConfig(client), getClientStates(client, ['config'])),\n setTransport: debugWrapper(client.setTransport.bind(client), 'setTransport', getClientLogConfig(client), getClientStates(client, ['config'])),\n };\n};\nexport default createInstance();\n//# sourceMappingURL=browser-client-factory.js.map","/* tslint:disable */\n/* eslint-disable */\n// @ts-nocheck\n/**\n * Ampli - A strong typed wrapper for your Analytics\n *\n * This file is generated by Amplitude.\n * To update run 'ampli pull web'\n *\n * Required dependencies: @amplitude/analytics-browser@^1.3.0\n * Tracking Plan Version: 1\n * Build: 1.0.0\n * Runtime: browser:typescript-ampli-v2\n *\n * [View Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest)\n *\n * [Full Setup Instructions](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/implementation/web)\n */\n\nimport * as amplitude from '@amplitude/analytics-browser';\n\nexport type Environment = 'default' | 'staging' | 'production';\n\nexport const ApiKey: Record = {\n default: 'b2a9eac126066c35b0d2086f4f7c516e',\n staging: '5c2b5ef4a1ee15d8ea9af291465eacaf',\n production: '18077301e3cefffe1379b82aaf3af3ee'\n};\n\n/**\n * Default Amplitude configuration options. Contains tracking plan information.\n */\nexport const DefaultConfiguration: BrowserOptions = {\n plan: {\n version: '1',\n branch: 'main',\n source: 'web',\n versionId: '801aa336-9a7f-40bb-be74-26850f4e9738'\n },\n ...{\n ingestionMetadata: {\n sourceName: 'browser-typescript-ampli',\n sourceVersion: '2.0.0'\n }\n },\n serverZone: amplitude.Types.ServerZone.EU\n};\n\nexport interface LoadOptionsBase { disabled?: boolean }\n\nexport type LoadOptionsWithEnvironment = LoadOptionsBase & { environment: Environment; client?: { configuration?: BrowserOptions; }; };\nexport type LoadOptionsWithApiKey = LoadOptionsBase & { client: { apiKey: string; configuration?: BrowserOptions; } };\nexport type LoadOptionsWithClientInstance = LoadOptionsBase & { client: { instance: BrowserClient; } };\n\nexport type LoadOptions = LoadOptionsWithEnvironment | LoadOptionsWithApiKey | LoadOptionsWithClientInstance;\n\nexport interface BackButtonClickedProperties {\n active_step: string;\n organization: string;\n}\n\nexport interface BookingConfirmedProperties {\n organization: string;\n}\n\nexport interface BranchSelectedProperties {\n organization: string;\n}\n\nexport interface DataEnteredProperties {\n organization: string;\n}\n\nexport interface ServicesSelectedProperties {\n organization: string;\n}\n\nexport interface TimeSelectedProperties {\n organization: string;\n}\n\nexport class BackButtonClicked implements BaseEvent {\n event_type = 'backButtonClicked';\n\n constructor(\n public event_properties: BackButtonClickedProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport class BookingConfirmed implements BaseEvent {\n event_type = 'bookingConfirmed';\n\n constructor(\n public event_properties: BookingConfirmedProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport class BranchSelected implements BaseEvent {\n event_type = 'branchSelected';\n\n constructor(\n public event_properties: BranchSelectedProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport class DataEntered implements BaseEvent {\n event_type = 'dataEntered';\n\n constructor(\n public event_properties: DataEnteredProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport class ServicesSelected implements BaseEvent {\n event_type = 'servicesSelected';\n\n constructor(\n public event_properties: ServicesSelectedProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport class TimeSelected implements BaseEvent {\n event_type = 'timeSelected';\n\n constructor(\n public event_properties: TimeSelectedProperties,\n ) {\n this.event_properties = event_properties;\n }\n}\n\nexport type PromiseResult = { promise: Promise };\n\nconst getVoidPromiseResult = () => ({ promise: Promise.resolve() });\n\n// prettier-ignore\nexport class Ampli {\n private disabled: boolean = false;\n private amplitude?: BrowserClient;\n\n get client(): BrowserClient {\n this.isInitializedAndEnabled();\n return this.amplitude!;\n }\n\n get isLoaded(): boolean {\n return this.amplitude != null;\n }\n\n private isInitializedAndEnabled(): boolean {\n if (!this.amplitude) {\n console.error('ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?');\n return false;\n }\n return !this.disabled;\n }\n\n /**\n * Initialize the Ampli SDK. Call once when your application starts.\n *\n * @param options Configuration options to initialize the Ampli SDK with.\n */\n load(options: LoadOptions): PromiseResult {\n this.disabled = options.disabled ?? false;\n\n if (this.amplitude) {\n console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.');\n return getVoidPromiseResult();\n }\n\n let apiKey: string | null = null;\n if (options.client && 'apiKey' in options.client) {\n apiKey = options.client.apiKey;\n } else if ('environment' in options) {\n apiKey = ApiKey[options.environment];\n }\n\n if (options.client && 'instance' in options.client) {\n this.amplitude = options.client.instance;\n } else if (apiKey) {\n this.amplitude = amplitude.createInstance();\n const configuration = (options.client && 'configuration' in options.client) ? options.client.configuration : {};\n return this.amplitude.init(apiKey, undefined, { ...DefaultConfiguration, ...configuration });\n } else {\n console.error(\"ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'\");\n }\n\n return getVoidPromiseResult();\n }\n\n /**\n * Identify a user and set user properties.\n *\n * @param userId The user's id.\n * @param options Optional event options.\n */\n identify(\n userId: string | undefined,\n options?: EventOptions,\n ): PromiseResult {\n if (!this.isInitializedAndEnabled()) {\n return getVoidPromiseResult();\n }\n\n if (userId) {\n options = {...options, user_id: userId};\n }\n\n const amplitudeIdentify = new amplitude.Identify();\n return this.amplitude!.identify(\n amplitudeIdentify,\n options,\n );\n }\n\n /**\n * Flush the event.\n */\n flush() : PromiseResult {\n if (!this.isInitializedAndEnabled()) {\n return getVoidPromiseResult();\n }\n\n return this.amplitude!.flush();\n }\n\n /**\n * Track event\n *\n * @param event The event to track.\n * @param options Optional event options.\n */\n track(event: Event, options?: EventOptions): PromiseResult {\n if (!this.isInitializedAndEnabled()) {\n return getVoidPromiseResult();\n }\n\n return this.amplitude!.track(event, undefined, options);\n }\n\n /**\n * backButtonClicked\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/backButtonClicked)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. active_step)\n * @param options Amplitude event options.\n */\n backButtonClicked(\n properties: BackButtonClickedProperties,\n options?: EventOptions,\n ) {\n return this.track(new BackButtonClicked(properties), options);\n }\n\n /**\n * bookingConfirmed\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/bookingConfirmed)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. organization)\n * @param options Amplitude event options.\n */\n bookingConfirmed(\n properties: BookingConfirmedProperties,\n options?: EventOptions,\n ) {\n return this.track(new BookingConfirmed(properties), options);\n }\n\n /**\n * branchSelected\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/branchSelected)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. organization)\n * @param options Amplitude event options.\n */\n branchSelected(\n properties: BranchSelectedProperties,\n options?: EventOptions,\n ) {\n return this.track(new BranchSelected(properties), options);\n }\n\n /**\n * dataEntered\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/dataEntered)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. organization)\n * @param options Amplitude event options.\n */\n dataEntered(\n properties: DataEnteredProperties,\n options?: EventOptions,\n ) {\n return this.track(new DataEntered(properties), options);\n }\n\n /**\n * servicesSelected\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/servicesSelected)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. organization)\n * @param options Amplitude event options.\n */\n servicesSelected(\n properties: ServicesSelectedProperties,\n options?: EventOptions,\n ) {\n return this.track(new ServicesSelected(properties), options);\n }\n\n /**\n * timeSelected\n *\n * [View in Tracking Plan](https://data.eu.amplitude.com/unzer/Tillhub%20Online%20Booking/events/main/latest/timeSelected)\n *\n * Event has no description in tracking plan.\n *\n * @param properties The event's properties (e.g. organization)\n * @param options Amplitude event options.\n */\n timeSelected(\n properties: TimeSelectedProperties,\n options?: EventOptions,\n ) {\n return this.track(new TimeSelected(properties), options);\n }\n}\n\nexport const ampli = new Ampli();\n\n// BASE TYPES\ntype BrowserOptions = amplitude.Types.BrowserOptions;\n\nexport type BrowserClient = amplitude.Types.BrowserClient;\nexport type BaseEvent = amplitude.Types.BaseEvent;\nexport type IdentifyEvent = amplitude.Types.IdentifyEvent;\nexport type GroupEvent = amplitude.Types.GroupIdentifyEvent;\nexport type Event = amplitude.Types.Event;\nexport type EventOptions = amplitude.Types.EventOptions;\nexport type Result = amplitude.Types.Result;\n","import { useConfigurationStore } from '@/stores/useConfigurationStore'\nimport { ampli, type Environment } from '../ampli'\nimport type { Plugin } from 'vue'\nimport { Env } from '@/env'\n\ntype Ampli = typeof ampli\ntype NonEventMethods = 'load' | 'track' | 'flush' | 'identify'\n\ntype AmpliMethodNames = {\n [K in keyof Ampli]: Ampli[K] extends (...args: any[]) => any ? K : never\n}[keyof Ampli]\n\ntype AmpliEvents = Exclude\n\ninterface BaseEventProperties {\n organization: string\n}\n\ntype ExcludeBaseEventProps = T extends BaseEventProperties\n ? Omit\n : T\n\n/**\n * Returns a type safe `track` proxy for usage in application code\n */\nexport function useAmpli() {\n const store = useConfigurationStore()\n\n return {\n track>(\n event: T,\n ...args: [ExcludeBaseEventProps?, U[1]?]\n ) {\n const baseProperties: BaseEventProperties = {\n organization: store.organization\n }\n\n const eventProperties = {\n ...baseProperties,\n ...args[0]\n }\n\n const eventOptions = args[1]\n\n if (!isEnabled) {\n // If the plugin is not enabled, log it for debugging\n return console.info(`[Ampli Event: ${event}]`, {\n properties: eventProperties,\n options: eventOptions\n })\n }\n\n return ampli[event].apply(ampli, [eventProperties, eventOptions] as any) // eslint-disable-line\n }\n }\n}\n\nlet isEnabled = false\n\nfunction userAgreedToTracking() {\n if (!window.CookieScript?.instance) {\n return false\n }\n\n const state = window.CookieScript.instance.currentState()\n\n return state.categories?.includes('targeting')\n}\n\nasync function loadAmpliIfAllowed() {\n if (ampli.isLoaded) {\n return\n }\n\n if (!userAgreedToTracking()) {\n return\n }\n\n isEnabled = true\n\n console.info('[ampli]: Plugin loaded!')\n\n let environment: Environment = 'default'\n\n if (Env.PROD) {\n environment = window.location.origin.includes('staging-online-booking.tillhub.com')\n ? 'staging'\n : 'production'\n }\n\n await ampli.load({\n environment,\n client: {\n configuration: {\n defaultTracking: true,\n trackingOptions: {\n // Copied from dashboard, its important\n ipAddress: false\n }\n }\n }\n })\n}\n\n/**\n * Creates the amplitude plugin. We listen for the Cookie Policy events\n * and if the user has agreed to be tracked, we enable the plugin.\n */\nexport function createAmpli(): Plugin {\n return {\n install() {\n if (window.CookieScript?.instance) {\n loadAmpliIfAllowed()\n }\n\n const events = ['CookieScriptLoaded', 'CookieScriptAccept', 'CookieScriptAcceptAll']\n\n events.forEach((event) => {\n window.addEventListener(event, async () => {\n await loadAmpliIfAllowed()\n })\n })\n }\n }\n}\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n\n if (!elem) {\n return '';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\nexport { getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","import { logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n /** Display name of this error instance. */\n\n constructor( message, logLevel = 'warn') {\n super(message);this.message = message;\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","import { node } from './node-stack-trace.js';\nexport { filenameIsInApp } from './node-stack-trace.js';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, node(getModule)];\n}\n\nexport { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { getGlobalObject } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW ).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n//# sourceMappingURL=supportsHistory.js.map\n","import { isString } from './is.js';\nimport { logger, CONSOLE_LEVELS, originalConsoleMethods } from './logger.js';\nimport { fill, addNonEnumerableProperty } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\nimport { supportsNativeFetch } from './supports.js';\nimport { getGlobalObject, GLOBAL_OBJ } from './worldwide.js';\nimport { supportsHistory } from './vendor/supportsHistory.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v2__';\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers = {};\nconst instrumented = {};\n\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n triggerHandlers('console', { args, level });\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\n/** JSDoc */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n const url = args[1];\n const xhrInfo = (this[SENTRY_XHR_DATA_KEY] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {},\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args ,\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n } );\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs ;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n if (sentryXhrData && args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref;\n\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID;\nlet lastCapturedEvent;\n\n/**\n * Check whether two DOM events are similar to eachother. For example, two click events on the same button.\n */\nfunction areSimilarDomEvents(a, b) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (a.type !== b.type) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (a.target !== b.target) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(event) {\n // We are only interested in filtering `keypress` events for now.\n if (event.type !== 'keypress') {\n return false;\n }\n\n try {\n const target = event.target ;\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener = false) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (lastCapturedEvent === undefined || !areSimilarDomEvents(lastCapturedEvent, event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEvent = event;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEvent = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\n/** JSDoc */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW )[target] && (WINDOW )[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nlet _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addInstrumentationHandler, instrumentDOM, instrumentXHR, parseFetchArgs, resetInstrumentationHandlers };\n//# sourceMappingURL=instrument.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isNodeEnv } from './node.js';\n\n/**\n * Returns true if we are in the browser.\n */\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer() {\n return typeof process !== 'undefined' && (process ).type === 'renderer';\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n//# sourceMappingURL=memo.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => crypto.getRandomValues(new Uint8Array(1))[0];\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '';\n }\n return eventId || '';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { isNaN, isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\nexport { normalize, normalizeToSize, visit as walk };\n//# sourceMappingURL=normalize.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task:\n * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(':80', '')\n .replace(':443', '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nfunction severityFromString(level) {\n return severityLevelFromString(level) ;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ;\n}\n\nexport { severityFromString, severityLevelFromString, validSeverityLevels };\n//# sourceMappingURL=severity.js.map\n","import { isNodeEnv, dynamicRequire } from './node.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') ;\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nconst dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nconst usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI };\n//# sourceMappingURL=time.js.map\n","import { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject,\n };\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { uuid4 } from './misc.js';\n\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n */\nfunction tracingContextFromHeaders(\n sentryTrace,\n baggage,\n)\n\n {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n const propagationContext = {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n };\n\n if (parentSpanId) {\n propagationContext.parentSpanId = parentSpanId;\n }\n\n if (dynamicSamplingContext) {\n propagationContext.dsc = dynamicSamplingContext ;\n }\n\n return {\n traceparentData,\n dynamicSamplingContext,\n propagationContext,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = uuid4(),\n spanId = uuid4().substring(16),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, tracingContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, category, now = Date.now()) {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n *
,
,..\n * where each
is of the form\n * : : : \n * where\n * is a delay in seconds\n * is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * ;;...\n * is what's being limited (org, project, or key) - ignored by SDK\n * is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { getGlobalSingleton, SyncPromise, logger, isThenable } from '@sentry/utils';\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nfunction addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { isPlainObject, dateTimestampInSeconds, arrayify, uuid4 } from '@sentry/utils';\nimport { notifyEventProcessors, getGlobalEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /** Transaction Name */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n static clone(scope) {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext )(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext ;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getAttachments() {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors,\n ) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [...(event.breadcrumbs || []), ...scopeBreadcrumbs];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n return notifyEventProcessors(\n [...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],\n event,\n hint,\n );\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Get the breadcrumbs for this scope.\n */\n _getBreadcrumbs() {\n return this._breadcrumbs;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n _applyFingerprint(event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n constructor(client, scope = new Scope(), _version = API_VERSION) {this._version = _version;\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n bindClient(client) {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n pushScope() {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n popScope() {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n withScope(callback) {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /** Returns the scope of the top stack. */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n getStack() {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, hint) {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n configureScope(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n run(callback) {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n endSession() {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n startSession(context) {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n shouldSendDefaultPii() {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n _withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nfunction getHubFromCarrier(carrier) {\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n","import { getCurrentHub } from '../hub.js';\nexport { TRACEPARENT_REGEXP, extractTraceparentData, stripUrlQueryAndFragment } from '@sentry/utils';\n\n/** Grabs active transaction off scope, if any */\nfunction getActiveTransaction(maybeHub) {\n const hub = maybeHub || getCurrentHub();\n const scope = hub.getScope();\n return scope.getTransaction() ;\n}\n\nexport { getActiveTransaction };\n//# sourceMappingURL=utils.js.map\n","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { getActiveTransaction } from './utils.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status = 'internal_error';\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { uuid4, timestampInSeconds, logger, generateSentryTraceHeader, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nclass SpanRecorder {\n\n constructor(maxlen = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n add(span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nclass Span {\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Internal keeper of the status\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Timestamp in seconds when the span was created.\n */\n\n /**\n * Timestamp in seconds when the span ended.\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * The instrumenter that created this span.\n */\n\n /**\n * The origin of the span, giving context about what created the span.\n */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this.traceId = spanContext.traceId || uuid4();\n this.spanId = spanContext.spanId || uuid4().substring(16);\n this.startTimestamp = spanContext.startTimestamp || timestampInSeconds();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this.origin = spanContext.origin || 'manual';\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.name) {\n this.description = spanContext.name;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n\n /** An alias for `description` of the Span. */\n get name() {\n return this.description || '';\n }\n /** Update the name of the span. */\n set name(name) {\n this.setName(name);\n }\n\n /**\n * @inheritDoc\n */\n startChild(\n spanContext,\n ) {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId,\n });\n\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && childSpan.transaction) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = childSpan.transaction.name || '< unknown name >';\n const idStr = childSpan.transaction.spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage };\n logger.log(logMessage);\n }\n\n return childSpan;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n setData(key, value) {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this.status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setHttpStatus(httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n this.setData('http.response.status_code', httpStatus);\n const spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setName(name) {\n this.description = name;\n }\n\n /**\n * @inheritDoc\n */\n isSuccess() {\n return this.status === 'ok';\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n if (\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n // Don't call this for transactions\n this.transaction &&\n this.transaction.spanId !== this.spanId\n ) {\n const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) {\n logger.log((logMessage ).replace('Starting', 'Finishing'));\n }\n }\n\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n }\n\n /**\n * @inheritDoc\n */\n toTraceparent() {\n return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(spanContext) {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getTraceContext() {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n toJSON()\n\n {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n}\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nfunction spanStatusfromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n\nexport { Span, SpanRecorder, spanStatusfromHttpCode };\n//# sourceMappingURL=span.js.map\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexport { getDynamicSamplingContextFromClient };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { dropUndefinedKeys, logger } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\nimport { getDynamicSamplingContextFromClient } from './dynamicSamplingContext.js';\nimport { Span, SpanRecorder } from './span.js';\n\n/** JSDoc */\nclass Transaction extends Span {\n\n /**\n * The reference to the current hub.\n */\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(transactionContext, hub) {\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n\n this._measurements = {};\n this._contexts = {};\n\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this.metadata = {\n source: 'custom',\n ...transactionContext.metadata,\n spanMetadata: {},\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n /** Getter for `name` property */\n get name() {\n return this._name;\n }\n\n /** Setter for `name` property, which also sets `source` as custom */\n set name(newName) {\n this.setName(newName);\n }\n\n /**\n * JSDoc\n */\n setName(name, source = 'custom') {\n this._name = name;\n this.metadata.source = source;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n initSpanRecorder(maxlen = 1000) {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n */\n setMeasurement(name, value, unit = '') {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * @inheritDoc\n */\n setMetadata(newMetadata) {\n this.metadata = { ...this.metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) {\n return undefined;\n }\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(transactionContext) {\n super.updateWithContext(transactionContext);\n\n this.name = transactionContext.name || '';\n\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n */\n getDynamicSamplingContext() {\n if (this._frozenDynamicSamplingContext) {\n return this._frozenDynamicSamplingContext;\n }\n\n const hub = this._hub || getCurrentHub();\n const client = hub.getClient();\n\n if (!client) return {};\n\n const scope = hub.getScope();\n const dsc = getDynamicSamplingContextFromClient(this.traceId, client, scope);\n\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== 'url') {\n dsc.transaction = this.name;\n }\n\n if (this.sampled !== undefined) {\n dsc.sampled = String(this.sampled);\n }\n\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n\n return dsc;\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n setHub(hub) {\n this._hub = hub;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Transaction has no name, falling back to ``.');\n this.name = '';\n }\n\n // just sets the end timestamp\n super.finish(endTimestamp);\n\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce((prev, current) => {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n\n const metadata = this.metadata;\n\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext(),\n },\n ...(metadata.source && {\n transaction_info: {\n source: metadata.source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n\n return transaction;\n }\n}\n\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map\n","import { logger, timestampInSeconds } from '@sentry/utils';\nimport { SpanRecorder } from './span.js';\nimport { Transaction } from './transaction.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nclass IdleTransactionSpanRecorder extends SpanRecorder {\n constructor(\n _pushActivity,\n _popActivity,\n transactionSpanId,\n maxlen,\n ) {\n super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; }\n\n /**\n * @inheritDoc\n */\n add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp) => {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n this._popActivity(span.spanId);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n super.add(span);\n }\n}\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nclass IdleTransaction extends Transaction {\n // Activities store a list of active spans\n\n // Track state of activities in previous heartbeat\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n // We should not use heartbeat if we finished a transaction\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n\n constructor(\n transactionContext,\n _idleHub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n _idleTimeout = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n _finalTimeout = TRACING_DEFAULTS.finalTimeout,\n _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false,\n ) {\n super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope(scope => scope.setSpan(this));\n }\n\n this._restartIdleTimeout();\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n finish(endTimestamp = timestampInSeconds()) {\n this._finished = true;\n this.activities = {};\n\n if (this.op === 'ui.action.click') {\n this.setTag(FINISH_REASON_TAG, this._finishReason);\n }\n\n if (this.spanRecorder) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestamp);\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) {\n scope.setSpan(undefined);\n }\n }\n\n return super.finish(endTimestamp);\n }\n\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n initSpanRecorder(maxlen) {\n if (!this.spanRecorder) {\n const pushActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n cancelIdleTimeout(\n endTimestamp,\n {\n restartOnChildSpanChange,\n }\n\n = {\n restartOnChildSpanChange: true,\n },\n ) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n setFinishReason(reason) {\n this._finishReason = reason;\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n _popActivity(spanId) {\n if (this.activities[spanId]) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n _pingHeartbeat() {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\nexport { IdleTransaction, IdleTransactionSpanRecorder, TRACING_DEFAULTS };\n//# sourceMappingURL=idletransaction.js.map\n","import { getCurrentHub } from '../hub.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","import { logger, isNaN } from '@sentry/utils';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nfunction sampleTransaction(\n transaction,\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled),\n });\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate,\n });\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < (sampleRate );\n\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nexport { sampleTransaction };\n//# sourceMappingURL=sampling.js.map\n","import { logger } from '@sentry/utils';\nimport { getMainCarrier } from '../hub.js';\nimport { registerErrorInstrumentation } from './errors.js';\nimport { IdleTransaction } from './idletransaction.js';\nimport { sampleTransaction } from './sampling.js';\nimport { Transaction } from './transaction.js';\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n const scope = this.getScope();\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': span.toTraceparent(),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n\n transactionContext,\n customSamplingContext,\n) {\n const client = this.getClient();\n const options = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n transactionContext.sampled = false;\n }\n\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nfunction startIdleTransaction(\n hub,\n transactionContext,\n idleTimeout,\n finalTimeout,\n onScope,\n customSamplingContext,\n heartbeatInterval,\n) {\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {};\n\n let transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nfunction addTracingExtensions() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n\nexport { addTracingExtensions, startIdleTransaction };\n//# sourceMappingURL=hubextensions.js.map\n","import { isThenable, tracingContextFromHeaders, logger, dropUndefinedKeys } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n *\n * This function is meant to be used internally and may break at any time. Use at your own risk.\n *\n * @internal\n * @private\n */\nfunction trace(\n context,\n callback,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onError = () => {},\n) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n e => {\n activeSpan && activeSpan.setStatus('internal_error');\n onError(e);\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Wraps a function with a transaction/span and finishes the span after the function is done.\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active.\n *\n * If you want to create a span that is not set as active, use {@link startInactiveSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpan(context, callback) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishAndSetSpan();\n },\n () => {\n activeSpan && activeSpan.setStatus('internal_error');\n finishAndSetSpan();\n },\n );\n } else {\n finishAndSetSpan();\n }\n\n return maybePromiseResult;\n}\n\n/**\n * @deprecated Use {@link startSpan} instead.\n */\nconst startActiveSpan = startSpan;\n\n/**\n * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span\n * after the function is done automatically.\n *\n * The created span is the active span and will be used as parent by other spans created inside the function\n * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startSpanManual(\n context,\n callback,\n) {\n const ctx = normalizeContext(context);\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx);\n scope.setSpan(activeSpan);\n\n function finishAndSetSpan() {\n activeSpan && activeSpan.finish();\n hub.getScope().setSpan(parentSpan);\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(activeSpan, finishAndSetSpan);\n } catch (e) {\n activeSpan && activeSpan.setStatus('internal_error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(undefined, () => {\n activeSpan && activeSpan.setStatus('internal_error');\n });\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Creates a span. This span is not set as active, so will not get automatic instrumentation spans\n * as children or be able to be accessed via `Sentry.getSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * Note that if you have not enabled tracing extensions via `addTracingExtensions`\n * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans\n * and the `span` returned from the callback will be undefined.\n */\nfunction startInactiveSpan(context) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n const hub = getCurrentHub();\n const parentSpan = getActiveSpan();\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n return getCurrentHub().getScope().getSpan();\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers,\n * or in the browser from `` and `` HTML tags.\n *\n * It also takes an optional `request` option, which if provided will also be added to the scope & transaction metadata.\n * The callback receives a transactionContext that may be used for `startTransaction` or `startSpan`.\n */\nfunction continueTrace(\n {\n sentryTrace,\n baggage,\n }\n\n,\n callback,\n) {\n const hub = getCurrentHub();\n const currentScope = hub.getScope();\n\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n currentScope.setPropagationContext(propagationContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && traceparentData) {\n logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`);\n }\n\n const transactionContext = {\n ...traceparentData,\n metadata: dropUndefinedKeys({\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n }),\n };\n\n return callback(transactionContext);\n}\n\nfunction createChildSpanOrTransaction(\n hub,\n parentSpan,\n ctx,\n) {\n if (!hasTracingEnabled()) {\n return undefined;\n }\n return parentSpan ? parentSpan.startChild(ctx) : hub.startTransaction(ctx);\n}\n\nfunction normalizeContext(context) {\n const ctx = { ...context };\n // If a name is set and a description is not, set the description to the name.\n if (ctx.name !== undefined && ctx.description === undefined) {\n ctx.description = ctx.name;\n }\n\n return ctx;\n}\n\nexport { continueTrace, getActiveSpan, startActiveSpan, startInactiveSpan, startSpan, startSpanManual, trace };\n//# sourceMappingURL=trace.js.map\n","import { getActiveTransaction } from './utils.js';\n\n/**\n * Adds a measurement to the current active transaction.\n */\nfunction setMeasurement(name, value, unit) {\n const transaction = getActiveTransaction();\n if (transaction) {\n transaction.setMeasurement(name, value, unit);\n }\n}\n\nexport { setMeasurement };\n//# sourceMappingURL=measurement.js.map\n","import { logger, uuid4 } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n// Note: All functions in this file are typed with a return value of `ReturnType`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction captureException(exception, captureContext) {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nfunction captureEvent(event, hint) {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nfunction configureScope(callback) {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nfunction addBreadcrumb(breadcrumb) {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setContext(name, context) {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nfunction withScope(callback) {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n) {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n return getCurrentHub().lastEventId();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope };\n//# sourceMappingURL=exports.js.map\n","import { makeDsn, dsnToString, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(\n dsn,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions = {} ,\n) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n dsnLike,\n dialogOptions\n\n,\n) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getSdkMetadataForEnvelopeHeader, dsnToString, createEnvelope, createEventEnvelopeHeaders } from '@sentry/utils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\nexport { createEventEnvelope, createSessionEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { arrayify, logger } from '@sentry/utils';\nimport { addGlobalEventProcessor } from './eventProcessors.js';\nimport { getCurrentHub } from './hub.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nfunction addIntegration(integration) {\n const client = getCurrentHub().getClient();\n\n if (!client || !client.addIntegration) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr, callback) {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n\nexport { addIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import { uuid4, dateTimestampInSeconds, resolvedSyncPromise, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { notifyEventProcessors, getGlobalEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else {\n // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) {\n span.data = normalize(span.data, depth, maxBreadth);\n }\n return span;\n });\n }\n\n return normalized;\n}\n\nexport { applyDebugIds, applyDebugMeta, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegrations, setupIntegration } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass BaseClient {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Indicates whether this client's integrations have been set up. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n scope,\n ) {\n let eventId = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureSession(session) {\n if (!(typeof session.release === 'string')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /** Get all installed event processors. */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n setupIntegrations(forceInitialize) {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n try {\n return (this._integrations[integration.id] ) || null;\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n addIntegration(integration) {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendSession(session) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n void this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n recordDroppedEvent(reason, category, _event) {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n on(hook, callback) {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n emit(hook, ...rest) {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, scope) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext ;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n _sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Error while sending event:', reason);\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map\n","import { logger } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n\nexport { initAndBind };\n//# sourceMappingURL=sdk.js.map\n","import { makePromiseBuffer, forEachEnvelopeItem, envelopeItemTypeToDataCategory, isRateLimited, resolvedSyncPromise, createEnvelope, SentryError, logger, serializeEnvelope, updateRateLimits } from '@sentry/utils';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import { parseRetryAfterHeader, logger, envelopeContainsItemType } from '@sentry/utils';\n\nconst MIN_DELAY = 100; // 100 ms\nconst START_DELAY = 5000; // 5 seconds\nconst MAX_DELAY = 3.6e6; // 1 hour\n\nfunction log(msg, error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.info(`[Offline]: ${msg}`, error);\n}\n\n/**\n * Wraps a transport and stores and retries events when they fail to send.\n *\n * @param createTransport The transport to wrap.\n */\nfunction makeOfflineTransport(\n createTransport,\n) {\n return options => {\n const transport = createTransport(options);\n const store = options.createStore ? options.createStore(options) : undefined;\n\n let retryDelay = START_DELAY;\n let flushTimer;\n\n function shouldQueue(env, error, retryDelay) {\n // We don't queue Session Replay envelopes because they are:\n // - Ordered and Replay relies on the response status to know when they're successfully sent.\n // - Likely to fill the queue quickly and block other events from being sent.\n // We also want to drop client reports because they can be generated when we retry sending events while offline.\n if (envelopeContainsItemType(env, ['replay_event', 'replay_recording', 'client_report'])) {\n return false;\n }\n\n if (options.shouldStore) {\n return options.shouldStore(env, error, retryDelay);\n }\n\n return true;\n }\n\n function flushIn(delay) {\n if (!store) {\n return;\n }\n\n if (flushTimer) {\n clearTimeout(flushTimer );\n }\n\n flushTimer = setTimeout(async () => {\n flushTimer = undefined;\n\n const found = await store.pop();\n if (found) {\n log('Attempting to send previously queued event');\n void send(found).catch(e => {\n log('Failed to retry sending', e);\n });\n }\n }, delay) ;\n\n // We need to unref the timer in node.js, otherwise the node process never exit.\n if (typeof flushTimer !== 'number' && flushTimer.unref) {\n flushTimer.unref();\n }\n }\n\n function flushWithBackOff() {\n if (flushTimer) {\n return;\n }\n\n flushIn(retryDelay);\n\n retryDelay = Math.min(retryDelay * 2, MAX_DELAY);\n }\n\n async function send(envelope) {\n try {\n const result = await transport.send(envelope);\n\n let delay = MIN_DELAY;\n\n if (result) {\n // If there's a retry-after header, use that as the next delay.\n if (result.headers && result.headers['retry-after']) {\n delay = parseRetryAfterHeader(result.headers['retry-after']);\n } // If we have a server error, return now so we don't flush the queue.\n else if ((result.statusCode || 0) >= 400) {\n return result;\n }\n }\n\n flushIn(delay);\n retryDelay = START_DELAY;\n return result;\n } catch (e) {\n if (store && (await shouldQueue(envelope, e , retryDelay))) {\n await store.insert(envelope);\n flushWithBackOff();\n log('Error sending. Event queued', e );\n return {};\n } else {\n throw e;\n }\n }\n }\n\n if (options.flushAtStartup) {\n flushWithBackOff();\n }\n\n return {\n send,\n flush: t => transport.flush(t),\n };\n };\n}\n\nexport { MIN_DELAY, START_DELAY, makeOfflineTransport };\n//# sourceMappingURL=offline.js.map\n","import { dsnFromString, forEachEnvelopeItem } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from '../api.js';\n\n/**\n * Gets an event from an envelope.\n *\n * This is only exported for use in the tests\n */\nfunction eventFromEnvelope(env, types) {\n let event;\n\n forEachEnvelopeItem(env, (item, type) => {\n if (types.includes(type)) {\n event = Array.isArray(item) ? (item )[1] : undefined;\n }\n // bail out if we found an event\n return !!event;\n });\n\n return event;\n}\n\n/**\n * Creates a transport that overrides the release on all events.\n */\nfunction makeOverrideReleaseTransport(\n createTransport,\n release,\n) {\n return options => {\n const transport = createTransport(options);\n\n return {\n send: async (envelope) => {\n const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']);\n\n if (event) {\n event.release = release;\n }\n return transport.send(envelope);\n },\n flush: timeout => transport.flush(timeout),\n };\n };\n}\n\n/**\n * Creates a transport that can send events to different DSNs depending on the envelope contents.\n */\nfunction makeMultiplexedTransport(\n createTransport,\n matcher,\n) {\n return options => {\n const fallbackTransport = createTransport(options);\n const otherTransports = {};\n\n function getTransport(dsn, release) {\n // We create a transport for every unique dsn/release combination as there may be code from multiple releases in\n // use at the same time\n const key = release ? `${dsn}:${release}` : dsn;\n\n if (!otherTransports[key]) {\n const validatedDsn = dsnFromString(dsn);\n if (!validatedDsn) {\n return undefined;\n }\n const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn);\n\n otherTransports[key] = release\n ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url })\n : createTransport({ ...options, url });\n }\n\n return otherTransports[key];\n }\n\n async function send(envelope) {\n function getEvent(types) {\n const eventTypes = types && types.length ? types : ['event'];\n return eventFromEnvelope(envelope, eventTypes);\n }\n\n const transports = matcher({ envelope, getEvent })\n .map(result => {\n if (typeof result === 'string') {\n return getTransport(result, undefined);\n } else {\n return getTransport(result.dsn, result.release);\n }\n })\n .filter((t) => !!t);\n\n // If we have no transports to send to, use the fallback transport\n if (transports.length === 0) {\n transports.push(fallbackTransport);\n }\n\n const results = await Promise.all(transports.map(transport => transport.send(envelope)));\n\n return results[0];\n }\n\n async function flush(timeout) {\n const allTransports = [...Object.keys(otherTransports).map(dsn => otherTransports[dsn]), fallbackTransport];\n const results = await Promise.all(allTransports.map(transport => transport.flush(timeout)));\n return results.every(r => r);\n }\n\n return {\n send,\n flush,\n };\n };\n}\n\nexport { eventFromEnvelope, makeMultiplexedTransport };\n//# sourceMappingURL=multiplexed.js.map\n","const SDK_VERSION = '7.75.1';\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString;\n\n/** Patch toString calls to return proper name for wrapped functions */\nclass FunctionToString {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'FunctionToString';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = FunctionToString.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function ( ...args) {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n }\n} FunctionToString.__initStatic();\n\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map\n","import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\n\n/** Inbound filters configurable by the user */\nclass InboundFilters {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'InboundFilters';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = InboundFilters.id;\n this._options = options;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /** @inheritDoc */\n processEvent(event, _eventHint, client) {\n const clientOptions = client.getOptions();\n const options = _mergeOptions(this._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n} InboundFilters.__initStatic();\n\n/** JSDoc */\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && possibleMessages.length === 0) {\n logger.error(`Could not extract message for event ${getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nexport { InboundFilters, _mergeOptions, _shouldDropEvent };\n//# sourceMappingURL=inboundfilters.js.map\n","/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n */\nfunction isSentryRequestUrl(url, hub) {\n const client = hub.getClient();\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\n/** Keys are source filename/url, values are metadata objects. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst filenameMetadataMap = new Map();\n/** Set of stack strings that have already been parsed. */\nconst parsedStacks = new Set();\n\nfunction ensureMetadataStacksAreParsed(parser) {\n if (!GLOBAL_OBJ._sentryModuleMetadata) {\n return;\n }\n\n for (const stack of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) {\n const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack];\n\n if (parsedStacks.has(stack)) {\n continue;\n }\n\n // Ensure this stack doesn't get parsed again\n parsedStacks.add(stack);\n\n const frames = parser(stack);\n\n // Go through the frames starting from the top of the stack and find the first one with a filename\n for (const frame of frames.reverse()) {\n if (frame.filename) {\n // Save the metadata for this filename\n filenameMetadataMap.set(frame.filename, metadata);\n break;\n }\n }\n }\n}\n\n/**\n * Retrieve metadata for a specific JavaScript file URL.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getMetadataForUrl(parser, filename) {\n ensureMetadataStacksAreParsed(parser);\n return filenameMetadataMap.get(filename);\n}\n\n/**\n * Adds metadata to stack frames.\n *\n * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n */\nfunction addMetadataToStackFrames(parser, event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n if (!exception.stacktrace) {\n return;\n }\n\n for (const frame of exception.stacktrace.frames || []) {\n if (!frame.filename) {\n continue;\n }\n\n const metadata = getMetadataForUrl(parser, frame.filename);\n\n if (metadata) {\n frame.module_metadata = metadata;\n }\n }\n });\n } catch (_) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Strips metadata from stack frames.\n */\nfunction stripMetadataFromStackFrames(event) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n if (!exception.stacktrace) {\n return;\n }\n\n for (const frame of exception.stacktrace.frames || []) {\n delete frame.module_metadata;\n }\n });\n } catch (_) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\nexport { addMetadataToStackFrames, getMetadataForUrl, stripMetadataFromStackFrames };\n//# sourceMappingURL=metadata.js.map\n","import { forEachEnvelopeItem } from '@sentry/utils';\nimport { stripMetadataFromStackFrames, addMetadataToStackFrames } from '../metadata.js';\n\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n */\nclass ModuleMetadata {\n /*\n * @inheritDoc\n */\n static __initStatic() {this.id = 'ModuleMetadata';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = ModuleMetadata.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(addGlobalEventProcessor, getCurrentHub) {\n const client = getCurrentHub().getClient();\n\n if (!client || typeof client.on !== 'function') {\n return;\n }\n\n // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n client.on('beforeEnvelope', envelope => {\n forEachEnvelopeItem(envelope, (item, type) => {\n if (type === 'event') {\n const event = Array.isArray(item) ? (item )[1] : undefined;\n\n if (event) {\n stripMetadataFromStackFrames(event);\n item[1] = event;\n }\n }\n });\n });\n\n const stackParser = client.getOptions().stackParser;\n\n addGlobalEventProcessor(event => {\n addMetadataToStackFrames(stackParser, event);\n return event;\n });\n }\n} ModuleMetadata.__initStatic();\n\nexport { ModuleMetadata };\n//# sourceMappingURL=metadata.js.map\n","import { withScope, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, addExceptionTypeValue, addExceptionMechanism } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n before,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function () {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope) => {\n scope.addEventProcessor((event) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/utils';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n },\n };\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n (event.exception ).values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const popSize = getPopSize(ex);\n\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n\n return 0;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception )) {\n const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromString(\n stackParser,\n input,\n syntheticException,\n attachStacktrace,\n) {\n const event = {\n message: input,\n };\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: input, stacktrace: { frames } }],\n };\n }\n }\n\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\nexport { eventFromError, eventFromException, eventFromMessage, eventFromPlainObject, eventFromString, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import { dsnToString, createEnvelope } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nfunction createUserFeedbackEnvelope(\n feedback,\n {\n metadata,\n tunnel,\n dsn,\n }\n\n,\n) {\n const headers = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n const feedbackHeaders = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };\n//# sourceMappingURL=userfeedback.js.map\n","import { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getSDKSource, logger, createClientReportEnvelope, dsnToString } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n void this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, scope) {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n void this._sendEnvelope(envelope);\n }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","import { isNativeFetch, logger } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\nlet cachedFetchImpl = undefined;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nfunction clearCachedFetchImplementation() {\n cachedFetchImpl = undefined;\n}\n\nexport { clearCachedFetchImplementation, getNativeFetchImplementation };\n//# sourceMappingURL=utils.js.map\n","import { createTransport } from '@sentry/core';\nimport { rejectedSyncPromise } from '@sentry/utils';\nimport { getNativeFetchImplementation, clearCachedFetchImplementation } from './utils.js';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeFetchImplementation(),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createTransport } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nfunction makeXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeXHRTransport };\n//# sourceMappingURL=xhr.js.map\n","import { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, isString, isPrimitive, isErrorEvent, getLocationHref, logger, addExceptionMechanism } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** Global handlers */\nclass GlobalHandlers {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GlobalHandlers';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n\n /** JSDoc */\n constructor(options) {\n this.name = GlobalHandlers.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n }\n /**\n * @inheritDoc\n */\n setupOnce() {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key ];\n if (installFunc && options[key ]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key ] = undefined;\n }\n }\n }\n} GlobalHandlers.__initStatic();\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndOptions() {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return [hub, options.stackParser, options.attachStacktrace];\n}\n\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map\n","import { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nclass TryCatch {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'TryCatch';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = TryCatch.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n setupOnce() {\n if (this._options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n} TryCatch.__initStatic();\n\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = WINDOW ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n try {\n if (typeof fn.handleEvent === 'function') {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn , {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn ;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, getEventDescription, severityLevelFromString, safeJoin, SENTRY_XHR_DATA_KEY, parseUrl, logger, htmlTreeAsString } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nclass Breadcrumbs {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Breadcrumbs';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options of the breadcrumbs integration.\n */\n // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = Breadcrumbs.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n setupOnce() {\n if (this.options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this.options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this.options.dom));\n }\n if (this.options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this.options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this.options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n if (this.options.sentry) {\n const client = getCurrentHub().getClient();\n client && client.on && client.on('beforeSendEvent', addSentryBreadcrumb);\n }\n }\n} Breadcrumbs.__initStatic();\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction addSentryBreadcrumb(event) {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _domBreadcrumb(dom) {\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n target = _isEvent(event)\n ? htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _consoleBreadcrumb(handlerData) {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _xhrBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _fetchBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { applyAggregateErrorsToEvent } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nclass LinkedErrors {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'LinkedErrors';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /** @inheritdoc */\n setupOnce() {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n} LinkedErrors.__initStatic();\n\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map\n","import { WINDOW } from '../helpers.js';\n\n/** HttpContext integration collects information about HTTP request headers */\nclass HttpContext {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'HttpContext';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = HttpContext.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // noop\n }\n\n /** @inheritDoc */\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n }\n} HttpContext.__initStatic();\n\nexport { HttpContext };\n//# sourceMappingURL=httpcontext.js.map\n","import { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nclass Dedupe {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Dedupe';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Dedupe.id;\n }\n\n /** @inheritDoc */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, this._previousEvent)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (this._previousEvent = currentEvent);\n }\n} Dedupe.__initStatic();\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n\nexport { Dedupe };\n//# sourceMappingURL=dedupe.js.map\n","import { Integrations, getIntegrationsToSetup, initAndBind, getReportDialogEndpoint, getCurrentHub } from '@sentry/core';\nimport { stackParserFromStackParserOptions, supportsFetch, logger, addInstrumentationHandler } from '@sentry/utils';\nimport { BrowserClient } from './client.js';\nimport { WINDOW, wrap as wrap$1 } from './helpers.js';\nimport { GlobalHandlers } from './integrations/globalhandlers.js';\nimport { TryCatch } from './integrations/trycatch.js';\nimport { Breadcrumbs } from './integrations/breadcrumbs.js';\nimport { LinkedErrors } from './integrations/linkederrors.js';\nimport { HttpContext } from './integrations/httpcontext.js';\nimport { Dedupe } from './integrations/dedupe.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\nimport { makeXHRTransport } from './transports/xhr.js';\n\nconst defaultIntegrations = [\n new Integrations.InboundFilters(),\n new Integrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(options = {}) {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}, hub = getCurrentHub()) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction wrap(fn) {\n return wrap$1(fn)();\n}\n\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n if (typeof WINDOW.document === 'undefined') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nfunction captureUserFeedback(feedback) {\n const client = getCurrentHub().getClient();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n\nexport { captureUserFeedback, defaultIntegrations, forceLoad, init, onLoad, showReportDialog, wrap };\n//# sourceMappingURL=sdk.js.map\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","import { getActiveTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = getActiveTransaction() ;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","const bindReporter = (\n callback,\n metric,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getNavigationEntryFromPerformanceTiming = () => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);\n }\n }\n return navigationEntry ;\n};\n\nconst getNavigationEntry = () => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() );\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst onHidden = (cb, once) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport) => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n handleEntries(po.takeRecords() );\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { WINDOW } from '../../types.js';\nimport { onHidden } from './onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = () => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nconst getVisibilityWatcher = (\n\n) => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }, true);\n }\n};\n\nexport { onFID };\n//# sourceMappingURL=getFID.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nconst onLCP = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n const lastEntry = entries[entries.length - 1] ;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { logger, getFunctionName } from '@sentry/utils';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addClsInstrumentationHandler(callback) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addLcpInstrumentationHandler(callback) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid() {\n onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(type, callback) {\n return () => {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler };\n//# sourceMappingURL=instrument.js.map\n","/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction _startChild(transaction, { startTimestamp, ...ctx }) {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n\nexport { _startChild, isMeasurementValue };\n//# sourceMappingURL=utils.js.map\n","import { getActiveTransaction } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, logger } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler } from '../instrument.js';\nimport { WINDOW } from '../types.js';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher.js';\nimport { _startChild, isMeasurementValue } from './utils.js';\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return () => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n }\n });\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry ;\n });\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n });\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(transaction) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp;\n let requestStartTimestamp;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n const resourceName = (entry.name ).replace(WINDOW.location.origin, '');\n _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n transaction.setMeasurement(\n measurementName,\n _measurements[measurementName].value,\n _measurements[measurementName].unit,\n );\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nfunction _addMeasureSpans(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name ,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType ,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n event,\n timeOrigin,\n description,\n eventEnd,\n) {\n const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] );\n const start = entry[`${event}Start`] ;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n}\n\n/** Create resource-related spans */\nfunction _addResourceSpans(\n transaction,\n entry,\n resourceName,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n if ('transferSize' in entry) {\n data['http.response_transfer_size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['http.response_content_length'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['http.decoded_response_content_length'] = entry.decodedBodySize;\n }\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction) {\n if (_lcpEntry) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=index.js.map\n","import { hasTracingEnabled, getCurrentHub, getDynamicSamplingContextFromClient } from '@sentry/core';\nimport { addInstrumentationHandler, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, isInstanceOf, BAGGAGE_HEADER_NAME, SENTRY_XHR_DATA_KEY, browserPerformanceTimeOrigin, stringMatchesSomePattern } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler } from './instrument.js';\n\n/* eslint-disable max-lines */\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(_options) {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url) =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans = {};\n\n if (traceFetch) {\n addInstrumentationHandler('fetch', (handlerData) => {\n const createdSpan = fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler('xhr', (handlerData) => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const url = span.data.url;\n\n if (!url) {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nfunction shouldAttachHeaders(url, tracePropagationTargets) {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction fetchCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n\n const contentLength =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setData('http.response_content_length', contentLengthNum);\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n\n const { method, url } = handlerData.fetchData;\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n url,\n type: 'fetch',\n 'http.method': method,\n },\n description: `${method} ${url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nfunction addTracingHeadersToFetchRequest(\n request, // unknown is actually type Request but we can't export DOM types from this package,\n client,\n scope,\n options\n\n,\n requestSpan,\n) {\n const span = requestSpan || scope.getSpan();\n\n const transaction = span && span.transaction;\n\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n\n const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction\n ? transaction.getDynamicSamplingContext()\n : dsc\n ? dsc\n : getDynamicSamplingContextFromClient(traceId, client, scope);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n const headers =\n typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request ).headers : options.headers;\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers );\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders ;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n const sentryTraceHeader = generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext =\n dsc || (client ? getDynamicSamplingContextFromClient(traceId, client, scope) : undefined);\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nexport { DEFAULT_TRACE_PROPAGATION_TARGETS, addTracingHeadersToFetchRequest, defaultRequestInstrumentationOptions, extractNetworkProtocol, fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { logger, browserPerformanceTimeOrigin, addInstrumentationHandler } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nfunction instrumentRoutingWithDefaults(\n customStartTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n if (!WINDOW || !WINDOW.location) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl = WINDOW.location.href;\n\n let activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', ({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n\nexport { instrumentRoutingWithDefaults };\n//# sourceMappingURL=router.js.map\n","import { TRACING_DEFAULTS, addTracingExtensions, startIdleTransaction, getActiveTransaction } from '@sentry/core';\nimport { logger, tracingContextFromHeaders, getDomElement } from '@sentry/utils';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { startTrackingWebVitals, startTrackingLongTasks, startTrackingInteractions, addPerformanceEntries } from './metrics/index.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\nimport { instrumentRoutingWithDefaults } from './router.js';\nimport { WINDOW } from './types.js';\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nclass BrowserTracing {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n\n /**\n * @inheritDoc\n */\n\n constructor(_options) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : '';\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n const expandedContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n trimEnd: true,\n };\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? { ...finalContext.metadata, source: 'custom' }\n : finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n\n if (finalContext.sampled === false) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n\n const scope = hub.getScope();\n\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) {\n scope.setPropagationContext(propagationContext);\n } else {\n // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled,\n });\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n /** Start listener for interaction transactions */\n _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing, getMetaContent };\n//# sourceMappingURL=browsertracing.js.map\n","import { getCurrentHub, isSentryRequestUrl, addGlobalEventProcessor, prepareEvent, setContext, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger, uuid4, SENTRY_XHR_DATA_KEY, dropUndefinedKeys, stringMatchesSomePattern, addInstrumentationHandler, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, isBrowser } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addLcpInstrumentationHandler } from '@sentry-internal/tracing';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\nconst WINDOW = GLOBAL_OBJ ;\n\nconst REPLAY_SESSION_KEY = 'sentryReplaySession';\nconst REPLAY_EVENT_NAME = 'replay_event';\nconst UNABLE_TO_SEND_REPLAY = 'Unable to send Replay';\n\n// The idle limit for a session after which recording is paused.\nconst SESSION_IDLE_PAUSE_DURATION = 300000; // 5 minutes in ms\n\n// The idle limit for a session after which the session expires.\nconst SESSION_IDLE_EXPIRE_DURATION = 900000; // 15 minutes in ms\n\n/** Default flush delays */\nconst DEFAULT_FLUSH_MIN_DELAY = 5000;\n// XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\nconst DEFAULT_FLUSH_MAX_DELAY = 5500;\n\n/* How long to wait for error checkouts */\nconst BUFFER_CHECKOUT_TIME = 60000;\n\nconst RETRY_BASE_INTERVAL = 5000;\nconst RETRY_MAX_COUNT = 3;\n\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\nconst NETWORK_BODY_MAX_SIZE = 150000;\n\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\nconst CONSOLE_ARG_MAX_SIZE = 5000;\n\n/* Min. time to wait before we consider something a slow click. */\nconst SLOW_CLICK_THRESHOLD = 3000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\nconst SLOW_CLICK_SCROLL_TIMEOUT = 300;\n\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\nconst REPLAY_MAX_EVENT_BUFFER_SIZE = 20000000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\nconst MIN_REPLAY_DURATION = 4999;\n/* The max. allowed value that the minReplayDuration can be set to. */\nconst MIN_REPLAY_DURATION_LIMIT = 15000;\n\n/** The max. length of a replay. */\nconst MAX_REPLAY_DURATION = 3600000; // 60 minutes in ms;\n\nvar NodeType$1;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType$1 || (NodeType$1 = {}));\n\nfunction isElement$1(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n const host = n === null || n === void 0 ? void 0 : n.host;\n return Boolean((host === null || host === void 0 ? void 0 : 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;') &&\n !cssText.includes(' -webkit-background-clip: text;')) {\n cssText = cssText.replace(' background-clip: text;', ' -webkit-background-clip: text; background-clip: text;');\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3)\n return cssText;\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n }\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\n ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules, stringifyRule).join(''))\n : null;\n }\n catch (error) {\n return null;\n }\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified =\n stringifyStylesheet(rule.styleSheet) ||\n escapeImportStatement(rule);\n }\n catch (error) {\n }\n }\n else if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n return fixSafariColons(rule.cssText);\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 this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n getId(n) {\n var _a;\n if (!n)\n return -1;\n const id = (_a = this.getMeta(n)) === null || _a === void 0 ? void 0 : _a.id;\n return id !== null && id !== void 0 ? 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 removeNodeFromMap(n) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n if (n.childNodes) {\n n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\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)\n this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\nfunction createMirror() {\n return new Mirror();\n}\nfunction shouldMaskInput({ maskInputOptions, tagName, type, }) {\n if (tagName === 'OPTION') {\n tagName = 'SELECT';\n }\n return Boolean(maskInputOptions[tagName.toLowerCase()] ||\n (type && maskInputOptions[type]) ||\n type === 'password' ||\n (tagName === 'INPUT' && !type && maskInputOptions['text']));\n}\nfunction maskInputValue({ isMasked, element, value, maskInputFn, }) {\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)\n 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\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer);\n if (pixelBuffer.some((pixel) => pixel !== 0))\n return false;\n }\n }\n return true;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ?\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}\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 }\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 absoluteToStylesheet(cssText, href) {\n return (cssText || '').replace(URL_IN_CSS_REF, (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 }\n else if (part === '..') {\n stack.pop();\n }\n else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\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 chars;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars = match[0];\n pos += chars.length;\n return chars;\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 }\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 }\n else if (!inParens) {\n if (c === ',') {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n }\n else if (c === '(') {\n inParens = true;\n }\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}\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === '') {\n return attributeValue;\n }\n const a = doc.createElement('a');\n a.href = attributeValue;\n return a.href;\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\n}\nfunction getHref() {\n const a = document.createElement('a');\n a.href = '';\n return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\n if (!value) {\n return value;\n }\n if (name === 'src' ||\n (name === 'href' && !(tagName === 'use' && value[0] === '#'))) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'xlink:href' && value[0] !== '#') {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'background' &&\n (tagName === 'table' || tagName === 'td' || tagName === 'th')) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'srcset') {\n return getAbsoluteSrcsetString(doc, value);\n }\n else if (name === 'style') {\n return absoluteToStylesheet(value, getHref());\n }\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 }\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 }\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)\n return -1;\n if (node.nodeType !== node.ELEMENT_NODE)\n return -1;\n if (distance > limit)\n return -1;\n if (matchPredicate(node))\n 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)\n return false;\n if (className) {\n if (typeof className === 'string') {\n if (el.matches(`.${className}`))\n return true;\n }\n else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector))\n return true;\n return false;\n };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n if (el === null)\n return false;\n let maskDistance = -1;\n let unmaskDistance = -1;\n if (maskAllText) {\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector));\n if (unmaskDistance < 0) {\n return true;\n }\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector), unmaskDistance >= 0 ? unmaskDistance : Infinity);\n }\n else {\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector));\n if (maskDistance < 0) {\n return false;\n }\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector), maskDistance >= 0 ? maskDistance : Infinity);\n }\n return maskDistance >= 0\n ? unmaskDistance >= 0\n ? maskDistance <= unmaskDistance\n : true\n : unmaskDistance >= 0\n ? false\n : !!maskAllText;\n }\n catch (e) {\n }\n return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = iframeEl.contentWindow;\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n }\n catch (error) {\n return;\n }\n if (readyState !== 'complete') {\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener('load', () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = 'about:blank';\n if (win.location.href !== blankUrl ||\n iframeEl.src === blankUrl ||\n iframeEl.src === '') {\n setTimeout(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 }\n catch (error) {\n return;\n }\n if (styleSheetLoaded)\n return;\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener('load', () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskAttributeFn, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, inlineStylesheet, maskInputOptions = {}, maskTextFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, } = 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 };\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 maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n });\n case n.TEXT_NODE:\n return serializeTextNode(n, {\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))\n return undefined;\n const docId = mirror.getId(doc);\n return docId === 1 ? undefined : docId;\n}\nfunction serializeTextNode(n, options) {\n var _a;\n const { maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, maskTextFn, maskInputOptions, maskInputFn, rootId, } = options;\n const parentTagName = n.parentNode && n.parentNode.tagName;\n let textContent = n.textContent;\n const isStyle = parentTagName === 'STYLE' ? true : undefined;\n const isScript = parentTagName === 'SCRIPT' ? true : undefined;\n const isTextarea = parentTagName === 'TEXTAREA' ? true : undefined;\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {\n }\n else if ((_a = n.parentNode.sheet) === null || _a === void 0 ? void 0 : _a.cssRules) {\n textContent = stringifyStylesheet(n.parentNode.sheet);\n }\n }\n catch (err) {\n console.warn(`Cannot get CSS styles from text's parentNode. Error: ${err}`, n);\n }\n textContent = absoluteToStylesheet(textContent, getHref());\n }\n if (isScript) {\n textContent = 'SCRIPT_PLACEHOLDER';\n }\n const forceMask = needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText);\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn\n ? maskTextFn(textContent)\n : textContent.replace(/[\\S]/g, '*');\n }\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn\n ? maskInputFn(textContent, n.parentNode)\n : 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, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked),\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 { doc, blockClass, blockSelector, unblockSelector, inlineStylesheet, maskInputOptions = {}, maskAttributeFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, rootId, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, } = options;\n const needBlock = _isBlockedElement(n, blockClass, blockSelector, unblockSelector);\n const tagName = getValidTagName(n);\n let attributes = {};\n const len = n.attributes.length;\n for (let i = 0; i < len; i++) {\n const attr = n.attributes[i];\n if (!ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);\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 delete attributes.rel;\n delete attributes.href;\n attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === 'style' &&\n n.sheet &&\n !(n.innerText || n.textContent || '').trim().length) {\n const cssText = stringifyStylesheet(n.sheet);\n if (cssText) {\n attributes._cssText = absoluteToStylesheet(cssText, getHref());\n }\n }\n if (tagName === 'input' ||\n tagName === 'textarea' ||\n tagName === 'select' ||\n 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(el, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, shouldMaskInput({\n type,\n tagName: toUpperCase(tagName),\n maskInputOptions,\n }));\n attributes.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value,\n maskInputFn,\n });\n }\n if (checked) {\n attributes.checked = checked;\n }\n }\n if (tagName === 'option') {\n if (n.selected && !maskInputOptions['select']) {\n attributes.selected = true;\n }\n else {\n delete attributes.selected;\n }\n }\n if (tagName === 'canvas' && recordCanvas) {\n if (n.__context === '2d') {\n if (!is2DCanvasBlank(n)) {\n attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n }\n else if (!('__context' in n)) {\n const canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n const blankCanvas = document.createElement('canvas');\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes.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 oldValue = image.crossOrigin;\n image.crossOrigin = 'anonymous';\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 attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n catch (err) {\n console.warn(`Cannot inline img src=${image.currentSrc}! Error: ${err}`);\n }\n oldValue\n ? (attributes.crossOrigin = oldValue)\n : image.removeAttribute('crossorigin');\n };\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener('load', recordInlineImage);\n }\n if (tagName === 'audio' || tagName === 'video') {\n attributes.rr_mediaState = n.paused\n ? 'paused'\n : 'played';\n attributes.rr_mediaCurrentTime = n.currentTime;\n }\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes.rr_scrollLeft = n.scrollLeft;\n }\n if (n.scrollTop) {\n attributes.rr_scrollTop = n.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n.getBoundingClientRect();\n attributes = {\n class: attributes.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`,\n };\n }\n if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {\n if (!n.contentDocument) {\n attributes.rr_src = attributes.src;\n }\n delete attributes.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName))\n isCustomElement = true;\n }\n catch (e) {\n }\n return {\n type: NodeType$1.Element,\n tagName,\n attributes,\n childNodes: [],\n isSVG: isSVGElement(n) || undefined,\n needBlock,\n rootId,\n isCustom: isCustomElement,\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === undefined || maybeAttr === null) {\n return '';\n }\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 }\n else if (sn.type === NodeType$1.Element) {\n if (slimDOMOptions.script &&\n (sn.tagName === 'script' ||\n (sn.tagName === 'link' &&\n (sn.attributes.rel === 'preload' ||\n sn.attributes.rel === 'modulepreload') &&\n sn.attributes.as === 'script') ||\n (sn.tagName === 'link' &&\n sn.attributes.rel === 'prefetch' &&\n typeof sn.attributes.href === 'string' &&\n sn.attributes.href.endsWith('.js')))) {\n return true;\n }\n else if (slimDOMOptions.headFavicon &&\n ((sn.tagName === 'link' && sn.attributes.rel === 'shortcut icon') ||\n (sn.tagName === 'meta' &&\n (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) ||\n lowerIfExists(sn.attributes.name) === 'application-name' ||\n lowerIfExists(sn.attributes.rel) === 'icon' ||\n lowerIfExists(sn.attributes.rel) === 'apple-touch-icon' ||\n lowerIfExists(sn.attributes.rel) === 'shortcut icon')))) {\n return true;\n }\n else if (sn.tagName === 'meta') {\n if (slimDOMOptions.headMetaDescKeywords &&\n lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n }\n else if (slimDOMOptions.headMetaSocial &&\n (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) ||\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) ||\n lowerIfExists(sn.attributes.name) === 'pinterest')) {\n return true;\n }\n else if (slimDOMOptions.headMetaRobots &&\n (lowerIfExists(sn.attributes.name) === 'robots' ||\n lowerIfExists(sn.attributes.name) === 'googlebot' ||\n lowerIfExists(sn.attributes.name) === 'bingbot')) {\n return true;\n }\n else if (slimDOMOptions.headMetaHttpEquiv &&\n sn.attributes['http-equiv'] !== undefined) {\n return true;\n }\n else if (slimDOMOptions.headMetaAuthorship &&\n (lowerIfExists(sn.attributes.name) === 'author' ||\n lowerIfExists(sn.attributes.name) === 'generator' ||\n lowerIfExists(sn.attributes.name) === 'framework' ||\n lowerIfExists(sn.attributes.name) === 'publisher' ||\n lowerIfExists(sn.attributes.name) === 'progid' ||\n lowerIfExists(sn.attributes.property).match(/^article:/) ||\n lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n }\n else if (slimDOMOptions.headMetaVerification &&\n (lowerIfExists(sn.attributes.name) === 'google-site-verification' ||\n lowerIfExists(sn.attributes.name) === 'yandex-verification' ||\n lowerIfExists(sn.attributes.name) === 'csrf-token' ||\n lowerIfExists(sn.attributes.name) === 'p:domain_verify' ||\n lowerIfExists(sn.attributes.name) === 'verify-v1' ||\n lowerIfExists(sn.attributes.name) === 'verification' ||\n lowerIfExists(sn.attributes.name) === 'shopify-checkout-api-token')) {\n return true;\n }\n }\n }\n return false;\n}\nfunction serializeNodeWithId(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, skipChild = false, inlineStylesheet = true, maskInputOptions = {}, maskAttributeFn, maskTextFn, maskInputFn, slimDOMOptions, dataURLOptions = {}, inlineImages = false, recordCanvas = false, onSerialize, onIframeLoad, iframeLoadTimeout = 5000, onStylesheetLoad, stylesheetLoadTimeout = 5000, keepIframeSrcFn = () => false, newlyAddedElement = false, } = 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 });\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 }\n else if (slimDOMExcluded(_serializedNode, slimDOMOptions) ||\n (!preserveWhiteSpace &&\n _serializedNode.type === NodeType$1.Text &&\n !_serializedNode.isStyle &&\n !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, '').length)) {\n id = IGNORED_NODE;\n }\n else {\n id = genId();\n }\n const serializedNode = Object.assign(_serializedNode, { id });\n mirror.add(n, serializedNode);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n);\n }\n let recordChild = !skipChild;\n if (serializedNode.type === NodeType$1.Element) {\n recordChild = recordChild && !serializedNode.needBlock;\n delete serializedNode.needBlock;\n const shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode.isShadowHost = true;\n }\n if ((serializedNode.type === NodeType$1.Document ||\n serializedNode.type === NodeType$1.Element) &&\n recordChild) {\n if (slimDOMOptions.headWhitespace &&\n serializedNode.type === NodeType$1.Element &&\n serializedNode.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 onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n };\n for (const childN of Array.from(n.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode.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) &&\n (serializedChildNode.isShadow = true);\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n.parentNode &&\n isShadowRoot(n.parentNode) &&\n isNativeShadowDom(n.parentNode)) {\n serializedNode.isShadow = true;\n }\n if (serializedNode.type === NodeType$1.Element &&\n serializedNode.tagName === 'iframe') {\n onceIframeLoaded(n, () => {\n const iframeDoc = n.contentDocument;\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 });\n if (serializedIframeNode) {\n onIframeLoad(n, serializedIframeNode);\n }\n }\n }, iframeLoadTimeout);\n }\n if (serializedNode.type === NodeType$1.Element &&\n serializedNode.tagName === 'link' &&\n serializedNode.attributes.rel === 'stylesheet') {\n onceStylesheetLoaded(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 });\n if (serializedLinkNode) {\n onStylesheetLoad(n, serializedLinkNode);\n }\n }\n }, stylesheetLoadTimeout);\n }\n return serializedNode;\n}\nfunction snapshot(n, options) {\n const { mirror = new Mirror(), blockClass = 'rr-block', blockSelector = null, unblockSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, inlineImages = false, recordCanvas = false, maskAllInputs = false, maskAttributeFn, maskTextFn, maskInputFn, slimDOM = false, dataURLOptions, preserveWhiteSpace, onSerialize, onIframeLoad, iframeLoadTimeout, onStylesheetLoad, stylesheetLoadTimeout, keepIframeSrcFn = () => false, } = options || {};\n const maskInputOptions = maskAllInputs === true\n ? {\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 }\n : maskAllInputs === false\n ? {}\n : maskAllInputs;\n const slimDOMOptions = slimDOM === true || slimDOM === 'all'\n ?\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === 'all',\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true,\n }\n : slimDOM === false\n ? {}\n : 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 onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false,\n });\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,' +\n '\\r\\n' +\n 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +\n '\\r\\n' +\n 'or 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(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(() => {\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(target, key, isRevoked\n ? d\n : {\n set(value) {\n setTimeout(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\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 }\n catch (_a) {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!(/[1-9][0-9]{12}/.test(Date.now().toString()))) {\n nowTimestamp = () => new Date().getTime();\n}\nfunction getWindowScroll(win) {\n var _a, _b, _c, _d, _e, _f;\n const doc = win.document;\n return {\n left: doc.scrollingElement\n ? doc.scrollingElement.scrollLeft\n : win.pageXOffset !== undefined\n ? win.pageXOffset\n : (doc === null || doc === void 0 ? void 0 : doc.documentElement.scrollLeft) ||\n ((_b = (_a = doc === null || doc === void 0 ? void 0 : doc.body) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.scrollLeft) ||\n ((_c = doc === null || doc === void 0 ? void 0 : doc.body) === null || _c === void 0 ? void 0 : _c.scrollLeft) ||\n 0,\n top: doc.scrollingElement\n ? doc.scrollingElement.scrollTop\n : win.pageYOffset !== undefined\n ? win.pageYOffset\n : (doc === null || doc === void 0 ? void 0 : doc.documentElement.scrollTop) ||\n ((_e = (_d = doc === null || doc === void 0 ? void 0 : doc.body) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.scrollTop) ||\n ((_f = doc === null || doc === void 0 ? void 0 : doc.body) === null || _f === void 0 ? void 0 : _f.scrollTop) ||\n 0,\n };\n}\nfunction getWindowHeight() {\n return (window.innerHeight ||\n (document.documentElement && document.documentElement.clientHeight) ||\n (document.body && document.body.clientHeight));\n}\nfunction getWindowWidth() {\n return (window.innerWidth ||\n (document.documentElement && document.documentElement.clientWidth) ||\n (document.body && document.body.clientWidth));\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n if (!el)\n return false;\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(el, createMatchPredicate(null, unblockSelector));\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 &&\n 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\n .forEach;\n }\n if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype\n .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.nodeName === 'LINK' &&\n n.nodeType === n.ELEMENT_NODE &&\n n.getAttribute &&\n n.getAttribute('rel') === 'stylesheet' &&\n mirror.getMeta(n));\n}\nfunction hasShadowRoot(n) {\n return Boolean(n === null || n === void 0 ? void 0 : n.shadowRoot);\n}\nclass StyleSheetMirror {\n constructor() {\n this.id = 1;\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n }\n getId(stylesheet) {\n var _a;\n return (_a = this.styleIDMap.get(stylesheet)) !== null && _a !== void 0 ? _a : -1;\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n add(stylesheet, id) {\n if (this.has(stylesheet))\n return this.getId(stylesheet);\n let newId;\n if (id === undefined) {\n newId = this.id++;\n }\n else\n 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 = new WeakMap();\n this.idStyleMap = new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n) {\n var _a, _b;\n let shadowHost = null;\n if (((_b = (_a = n.getRootNode) === null || _a === void 0 ? void 0 : _a.call(n)) === null || _b === void 0 ? void 0 : _b.nodeType) === Node.DOCUMENT_FRAGMENT_NODE &&\n 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)\n return false;\n const shadowHost = getRootShadowHost(n);\n return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n const doc = n.ownerDocument;\n if (!doc)\n return false;\n return doc.contains(n) || shadowHostInDom(n);\n}\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 CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\n\nfunction isNodeInLinkedList(n) {\n return '__ln' in n;\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 === null || current === void 0 ? void 0 : current.next) || null;\n }\n return current;\n }\n addNode(n) {\n const node = {\n value: n,\n previous: null,\n next: null,\n };\n n.__ln = node;\n if (n.previousSibling && isNodeInLinkedList(n.previousSibling)) {\n const current = n.previousSibling.__ln.next;\n node.next = current;\n node.previous = n.previousSibling.__ln;\n n.previousSibling.__ln.next = node;\n if (current) {\n current.previous = node;\n }\n }\n else if (n.nextSibling &&\n isNodeInLinkedList(n.nextSibling) &&\n n.nextSibling.__ln.previous) {\n const current = n.nextSibling.__ln.previous;\n node.previous = current;\n node.next = n.nextSibling.__ln;\n n.nextSibling.__ln.previous = node;\n if (current) {\n current.next = node;\n }\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(n) {\n const current = n.__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 }\n else {\n this.tail = null;\n }\n }\n else {\n current.previous.next = current.next;\n if (current.next) {\n current.next.previous = current.previous;\n }\n else {\n this.tail = current.previous;\n }\n }\n if (n.__ln) {\n delete n.__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.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = 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 = new Set();\n const addList = new DoubleLinkedList();\n const getNextId = (n) => {\n let ns = n;\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 = (n) => {\n if (!n.parentNode || !inDom(n)) {\n return;\n }\n const parentId = isShadowRoot(n.parentNode)\n ? this.mirror.getId(getShadowHost(n))\n : this.mirror.getId(n.parentNode);\n const nextId = getNextId(n);\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n);\n }\n const sn = serializeNodeWithId(n, {\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)) {\n this.iframeManager.addIframe(currentN);\n }\n if (isSerializedStylesheet(currentN, this.mirror)) {\n this.stylesheetManager.trackLinkElement(currentN);\n }\n if (hasShadowRoot(n)) {\n this.shadowDomManager.addShadowRoot(n.shadowRoot, this.doc);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n this.iframeManager.attachIframe(iframe, childSn);\n this.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (link, childSn) => {\n this.stylesheetManager.attachLinkElement(link, childSn);\n },\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 n of this.movedSet) {\n if (isParentRemoved(this.removes, n, this.mirror) &&\n !this.movedSet.has(n.parentNode)) {\n continue;\n }\n pushAdd(n);\n }\n for (const n of this.addedSet) {\n if (!isAncestorInSet(this.droppedSet, n) &&\n !isParentRemoved(this.removes, n, this.mirror)) {\n pushAdd(n);\n }\n else if (isAncestorInSet(this.movedSet, n)) {\n pushAdd(n);\n }\n else {\n this.droppedSet.add(n);\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)\n continue;\n else if (parentId !== -1) {\n node = _node;\n break;\n }\n else {\n const unhandledNode = _node.value;\n if (unhandledNode.parentNode &&\n unhandledNode.parentNode.nodeType ===\n Node.DOCUMENT_FRAGMENT_NODE) {\n const shadowHost = unhandledNode.parentNode\n .host;\n const parentId = this.mirror.getId(shadowHost);\n if (parentId !== -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\n .map((text) => ({\n id: this.mirror.getId(text.node),\n value: text.value,\n }))\n .filter((text) => !addedIds.has(text.id))\n .filter((text) => this.mirror.has(text.id)),\n attributes: this.attributes\n .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 ===\n attributes.style.split('var(').length) {\n attributes.style = attribute.styleDiff;\n }\n }\n }\n return {\n id: this.mirror.getId(attribute.node),\n attributes: attributes,\n };\n })\n .filter((attribute) => !addedIds.has(attribute.id))\n .filter((attribute) => this.mirror.has(attribute.id)),\n removes: this.removes,\n adds,\n };\n if (!payload.texts.length &&\n !payload.attributes.length &&\n !payload.removes.length &&\n !payload.adds.length) {\n return;\n }\n this.texts = [];\n this.attributes = [];\n this.removes = [];\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = 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 let unattachedDoc;\n try {\n unattachedDoc = document.implementation.createHTMLDocument();\n }\n catch (e) {\n unattachedDoc = this.doc;\n }\n switch (m.type) {\n case 'characterData': {\n const value = m.target.textContent;\n if (!isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) &&\n value !== m.oldValue) {\n this.texts.push({\n value: needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, this.maskAllText) && value\n ? this.maskTextFn\n ? this.maskTextFn(value)\n : value.replace(/[\\S]/g, '*')\n : 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(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, isInputMasked);\n value = maskInputValue({\n isMasked: forceMask,\n element: target,\n value,\n maskInputFn: this.maskInputFn,\n });\n }\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n value === m.oldValue) {\n return;\n }\n let item = this.attributes.find((a) => a.node === m.target);\n if (target.tagName === 'IFRAME' &&\n attributeName === 'src' &&\n !this.keepIframeSrcFn(value)) {\n if (!target.contentDocument) {\n attributeName = 'rr_src';\n }\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 }\n if (attributeName === 'type' &&\n target.tagName === 'INPUT' &&\n (m.oldValue || '').toLowerCase() === 'password') {\n target.setAttribute('data-rr-is-password', 'true');\n }\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target.tagName), toLowerCase(attributeName), value, target, this.maskAttributeFn);\n if (attributeName === 'style') {\n const old = unattachedDoc.createElement('span');\n if (m.oldValue) {\n old.setAttribute('style', m.oldValue);\n }\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 !== old.style.getPropertyValue(pname) ||\n newPriority !== old.style.getPropertyPriority(pname)) {\n if (newPriority === '') {\n item.styleDiff[pname] = newValue;\n }\n else {\n item.styleDiff[pname] = [newValue, newPriority];\n }\n }\n else {\n item._unchangedStyles[pname] = [newValue, newPriority];\n }\n }\n for (const pname of Array.from(old.style)) {\n if (target.style.getPropertyValue(pname) === '') {\n item.styleDiff[pname] = false;\n }\n }\n }\n }\n break;\n }\n case 'childList': {\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, true)) {\n return;\n }\n m.addedNodes.forEach((n) => this.genAdds(n, m.target));\n m.removedNodes.forEach((n) => {\n const nodeId = this.mirror.getId(n);\n const parentId = isShadowRoot(m.target)\n ? this.mirror.getId(m.target.host)\n : this.mirror.getId(m.target);\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n isIgnored(n, this.mirror) ||\n !isSerialized(n, this.mirror)) {\n return;\n }\n if (this.addedSet.has(n)) {\n deepDelete(this.addedSet, n);\n this.droppedSet.add(n);\n }\n else if (this.addedSet.has(m.target) && nodeId === -1) ;\n else if (isAncestorRemoved(m.target, this.mirror)) ;\n else if (this.movedSet.has(n) &&\n this.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(this.movedSet, n);\n }\n else {\n this.removes.push({\n parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target)\n ? true\n : undefined,\n });\n }\n this.mapRemoves.push(n);\n });\n break;\n }\n }\n };\n this.genAdds = (n, target) => {\n if (this.processedNodeManager.inOtherBuffer(n, this))\n return;\n if (this.addedSet.has(n) || this.movedSet.has(n))\n return;\n if (this.mirror.hasNode(n)) {\n if (isIgnored(n, this.mirror)) {\n return;\n }\n this.movedSet.add(n);\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(n), targetId)] = true;\n }\n }\n else {\n this.addedSet.add(n);\n this.droppedSet.delete(n);\n }\n if (!isBlocked(n, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n n.childNodes.forEach((childN) => this.genAdds(childN));\n if (hasShadowRoot(n)) {\n n.shadowRoot.childNodes.forEach((childN) => {\n this.processedNodeManager.add(childN, this);\n this.genAdds(childN, n);\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 ].forEach((key) => {\n this[key] = options[key];\n });\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, n) {\n addsSet.delete(n);\n n.childNodes.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n, mirror) {\n if (removes.length === 0)\n return false;\n return _isParentRemoved(removes, n, mirror);\n}\nfunction _isParentRemoved(removes, n, mirror) {\n const { parentNode } = n;\n if (!parentNode) {\n return false;\n }\n const parentId = mirror.getId(parentNode);\n if (removes.some((r) => r.id === parentId)) {\n return true;\n }\n return _isParentRemoved(removes, parentNode, mirror);\n}\nfunction isAncestorInSet(set, n) {\n if (set.size === 0)\n return false;\n return _isAncestorInSet(set, n);\n}\nfunction _isAncestorInSet(set, n) {\n const { parentNode } = n;\n if (!parentNode) {\n return false;\n }\n if (set.has(parentNode)) {\n return true;\n }\n return _isAncestorInSet(set, parentNode);\n}\n\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n errorHandler = undefined;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = ((...rest) => {\n try {\n return cb(...rest);\n }\n catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n });\n return rrwebWrapped;\n};\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 }\n else if ('path' in event && event.path.length) {\n return event.path[0];\n }\n }\n catch (_a) {\n }\n return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n var _a, _b;\n const mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n let mutationObserverCtor = window.MutationObserver ||\n window.__rrMutationObserver;\n const angularZoneSymbol = (_b = (_a = window === null || window === void 0 ? void 0 : window.Zone) === null || _a === void 0 ? void 0 : _a.__symbol__) === null || _b === void 0 ? void 0 : _b.call(_a, 'MutationObserver');\n if (angularZoneSymbol &&\n window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n const observer = new mutationObserverCtor(callbackWrapper((mutations) => {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n }));\n observer.observe(rootEl, {\n attributes: true,\n attributeOldValue: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n });\n return observer;\n}\nfunction initMoveObserver({ mousemoveCb, sampling, doc, mirror, }) {\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'\n ? sampling.mousemoveCallback\n : 500;\n let positions = [];\n let timeBaseline;\n const wrappedCb = throttle$1(callbackWrapper((source) => {\n const totalOffset = Date.now() - timeBaseline;\n mousemoveCb(positions.map((p) => {\n p.timeOffset -= totalOffset;\n return p;\n }), source);\n positions = [];\n timeBaseline = null;\n }), callbackThreshold);\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n const { clientX, clientY } = legacy_isTouchEvent(evt)\n ? evt.changedTouches[0]\n : evt;\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror.getId(target),\n timeOffset: nowTimestamp() - timeBaseline,\n });\n wrappedCb(typeof DragEvent !== 'undefined' && evt instanceof DragEvent\n ? IncrementalSource.Drag\n : evt instanceof MouseEvent\n ? IncrementalSource.MouseMove\n : IncrementalSource.TouchMove);\n }), threshold, {\n trailing: false,\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({ mouseInteractionCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n if (sampling.mouseInteraction === false) {\n return () => {\n };\n }\n const disableMap = sampling.mouseInteraction === true ||\n sampling.mouseInteraction === undefined\n ? {}\n : 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 }\n else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n thisEventKey = 'TouchEnd';\n }\n }\n else if (pointerType === PointerTypes.Pen) ;\n }\n else if (legacy_isTouchEvent(event)) {\n pointerType = PointerTypes.Touch;\n }\n if (pointerType !== null) {\n currentPointerType = pointerType;\n if ((thisEventKey.startsWith('Touch') &&\n pointerType === PointerTypes.Touch) ||\n (thisEventKey.startsWith('Mouse') &&\n pointerType === PointerTypes.Mouse)) {\n pointerType = null;\n }\n }\n else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n pointerType = currentPointerType;\n currentPointerType = null;\n }\n const e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n if (!e) {\n return;\n }\n const id = mirror.getId(target);\n const { clientX, clientY } = e;\n callbackWrapper(mouseInteractionCb)(Object.assign({ type: MouseInteractions[thisEventKey], id, x: clientX, y: clientY }, (pointerType !== null && { pointerType })));\n };\n };\n Object.keys(MouseInteractions)\n .filter((key) => Number.isNaN(Number(key)) &&\n !key.endsWith('_Departed') &&\n 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('mouse', 'pointer');\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({ scrollCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const id = mirror.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 }\n else {\n scrollCb({\n id,\n x: target.scrollLeft,\n y: target.scrollTop,\n });\n }\n }), sampling.scroll || 100));\n return on('scroll', updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n let lastH = -1;\n let lastW = -1;\n const updateDimension = callbackWrapper(throttle$1(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 }), 200));\n return on('resize', updateDimension, win);\n}\nfunction wrapEventWithUserTriggeredFlag(v, enable) {\n const value = Object.assign({}, v);\n if (!enable)\n delete value.userTriggered;\n return value;\n}\nconst INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\nconst lastInputValueMap = new WeakMap();\nfunction initInputObserver({ inputCb, doc, mirror, blockClass, blockSelector, unblockSelector, ignoreClass, ignoreSelector, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, }) {\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')\n target = target.parentElement;\n if (!target ||\n !tagName ||\n INPUT_TAGS.indexOf(tagName) < 0 ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const el = target;\n if (el.classList.contains(ignoreClass) ||\n (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(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked);\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(target, callbackWrapper(wrapEventWithUserTriggeredFlag)({ text, isChecked, userTriggered }, userTriggeredOnInput));\n const name = target.name;\n if (type === 'radio' && name && isChecked) {\n doc\n .querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`)\n .forEach((el) => {\n if (el !== target) {\n const text = maskInputValue({\n isMasked: forceMask,\n element: el,\n value: getInputValue(el, tagName, type),\n maskInputFn,\n });\n cbWithDedup(el, callbackWrapper(wrapEventWithUserTriggeredFlag)({\n text,\n isChecked: !isChecked,\n userTriggered: false,\n }, userTriggeredOnInput));\n }\n });\n }\n }\n function cbWithDedup(target, v) {\n const lastInputValue = lastInputValueMap.get(target);\n if (!lastInputValue ||\n lastInputValue.text !== v.text ||\n lastInputValue.isChecked !== v.isChecked) {\n lastInputValueMap.set(target, v);\n const id = mirror.getId(target);\n callbackWrapper(inputCb)(Object.assign(Object.assign({}, v), { id }));\n }\n }\n const events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\n const handlers = events.map((eventName) => on(eventName, callbackWrapper(eventHandler), doc));\n const currentWindow = doc.defaultView;\n if (!currentWindow) {\n return () => {\n handlers.forEach((h) => h());\n };\n }\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, 'value');\n const hookProperties = [\n [currentWindow.HTMLInputElement.prototype, 'value'],\n [currentWindow.HTMLInputElement.prototype, 'checked'],\n [currentWindow.HTMLSelectElement.prototype, 'value'],\n [currentWindow.HTMLTextAreaElement.prototype, 'value'],\n [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'],\n [currentWindow.HTMLOptionElement.prototype, 'selected'],\n ];\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push(...hookProperties.map((p) => hookSetter(p[0], p[1], {\n set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false,\n });\n },\n }, false, currentWindow)));\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') &&\n childRule.parentRule instanceof CSSGroupingRule) ||\n (hasNestedCSSRule('CSSMediaRule') &&\n childRule.parentRule instanceof CSSMediaRule) ||\n (hasNestedCSSRule('CSSSupportsRule') &&\n childRule.parentRule instanceof CSSSupportsRule) ||\n (hasNestedCSSRule('CSSConditionRule') &&\n childRule.parentRule instanceof CSSConditionRule)) {\n const rules = Array.from(childRule.parentRule.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n else if (childRule.parentStyleSheet) {\n const rules = Array.from(childRule.parentStyleSheet.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n return pos;\n }\n return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror, styleMirror) {\n let id, styleId;\n if (!sheet)\n return {};\n if (sheet.ownerNode)\n id = mirror.getId(sheet.ownerNode);\n else\n styleId = styleMirror.getId(sheet);\n return {\n styleId,\n id,\n };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror, 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((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\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 const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\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 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((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\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 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((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\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 const supportedNestedCSSRuleTypes = {};\n if (canMonkeyPatchNestedCSSRule('CSSGroupingRule')) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n }\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 insertRule: type.prototype.insertRule,\n deleteRule: type.prototype.deleteRule,\n };\n type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\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 ],\n },\n ],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\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 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({ mirror, stylesheetManager, }, host) {\n var _a, _b, _c;\n let hostId = null;\n if (host.nodeName === '#document')\n hostId = mirror.getId(host);\n else\n hostId = mirror.getId(host.host);\n const patchTarget = host.nodeName === '#document'\n ? (_a = host.defaultView) === null || _a === void 0 ? void 0 : _a.Document\n : (_c = (_b = host.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView) === null || _c === void 0 ? void 0 : _c.ShadowRoot;\n const originalPropertyDescriptor = (patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype)\n ? Object.getOwnPropertyDescriptor(patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype, 'adoptedStyleSheets')\n : undefined;\n if (hostId === null ||\n hostId === -1 ||\n !patchTarget ||\n !originalPropertyDescriptor)\n return () => {\n };\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get() {\n var _a;\n return (_a = originalPropertyDescriptor.get) === null || _a === void 0 ? void 0 : _a.call(this);\n },\n set(sheets) {\n var _a;\n const result = (_a = originalPropertyDescriptor.set) === null || _a === void 0 ? void 0 : _a.call(this, sheets);\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n }\n catch (e) {\n }\n }\n return result;\n },\n });\n return callbackWrapper(() => {\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get: originalPropertyDescriptor.get,\n set: originalPropertyDescriptor.set,\n });\n });\n}\nfunction initStyleDeclarationObserver({ styleDeclarationCb, mirror, ignoreCSSAttributes, stylesheetManager, }, { win }) {\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n var _a;\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((_a = thisArg.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n set: {\n property,\n value,\n priority,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n var _a;\n const [property] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n const { id, styleId } = getIdAndStyleId((_a = thisArg.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n remove: {\n property,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n return callbackWrapper(() => {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\nfunction initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, unblockSelector, mirror, sampling, doc, }) {\n const handler = callbackWrapper((type) => throttle$1(callbackWrapper((event) => {\n const target = getEventTarget(event);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const { currentTime, volume, muted, playbackRate } = target;\n mediaInteractionCb({\n type,\n id: mirror.getId(target),\n currentTime,\n volume,\n muted,\n playbackRate,\n });\n }), sampling.media || 500));\n const handlers = [\n on('play', handler(0), doc),\n on('pause', handler(1), doc),\n on('seeked', handler(2), doc),\n on('volumechange', handler(3), doc),\n on('ratechange', handler(4), 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 = new WeakMap();\n const originalFontFace = win.FontFace;\n win.FontFace = function FontFace(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'\n ? source\n : JSON.stringify(Array.from(new Uint8Array(source))),\n });\n return fontFace;\n };\n const restoreHandler = patch(doc.fonts, 'add', function (original) {\n return function (fontFace) {\n setTimeout(callbackWrapper(() => {\n const p = fontMap.get(fontFace);\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }), 0);\n return original.apply(this, [fontFace]);\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 { doc, mirror, blockClass, blockSelector, unblockSelector, selectionCb, } = param;\n let collapsed = true;\n const updateSelection = callbackWrapper(() => {\n const selection = doc.getSelection();\n if (!selection || (collapsed && (selection === null || selection === void 0 ? void 0 : selection.isCollapsed)))\n return;\n collapsed = selection.isCollapsed || false;\n const ranges = [];\n const count = selection.rangeCount || 0;\n for (let i = 0; i < count; i++) {\n const range = selection.getRangeAt(i);\n const { startContainer, startOffset, endContainer, endOffset } = range;\n const blocked = isBlocked(startContainer, blockClass, blockSelector, unblockSelector, true) ||\n isBlocked(endContainer, blockClass, blockSelector, unblockSelector, true);\n if (blocked)\n continue;\n ranges.push({\n start: mirror.getId(startContainer),\n startOffset,\n end: mirror.getId(endContainer),\n endOffset,\n });\n }\n selectionCb({ ranges });\n });\n updateSelection();\n return on('selectionchange', updateSelection);\n}\nfunction initCustomElementObserver({ doc, customElementCb, }) {\n const win = doc.defaultView;\n if (!win || !win.customElements) {\n return () => {\n };\n }\n const restoreHandler = patch(win.customElements, 'define', function (original) {\n return function (name, constructor, options) {\n try {\n customElementCb({\n define: {\n name,\n },\n });\n }\n catch (e) {\n }\n return original.apply(this, [name, constructor, options]);\n };\n });\n return restoreHandler;\n}\nfunction mergeHooks(o, hooks) {\n const { mutationCb, mousemoveCb, mouseInteractionCb, scrollCb, viewportResizeCb, inputCb, mediaInteractionCb, styleSheetRuleCb, styleDeclarationCb, canvasMutationCb, fontCb, selectionCb, customElementCb, } = o;\n o.mutationCb = (...p) => {\n if (hooks.mutation) {\n hooks.mutation(...p);\n }\n mutationCb(...p);\n };\n o.mousemoveCb = (...p) => {\n if (hooks.mousemove) {\n hooks.mousemove(...p);\n }\n mousemoveCb(...p);\n };\n o.mouseInteractionCb = (...p) => {\n if (hooks.mouseInteraction) {\n hooks.mouseInteraction(...p);\n }\n mouseInteractionCb(...p);\n };\n o.scrollCb = (...p) => {\n if (hooks.scroll) {\n hooks.scroll(...p);\n }\n scrollCb(...p);\n };\n o.viewportResizeCb = (...p) => {\n if (hooks.viewportResize) {\n hooks.viewportResize(...p);\n }\n viewportResizeCb(...p);\n };\n o.inputCb = (...p) => {\n if (hooks.input) {\n hooks.input(...p);\n }\n inputCb(...p);\n };\n o.mediaInteractionCb = (...p) => {\n if (hooks.mediaInteaction) {\n hooks.mediaInteaction(...p);\n }\n mediaInteractionCb(...p);\n };\n o.styleSheetRuleCb = (...p) => {\n if (hooks.styleSheetRule) {\n hooks.styleSheetRule(...p);\n }\n styleSheetRuleCb(...p);\n };\n o.styleDeclarationCb = (...p) => {\n if (hooks.styleDeclaration) {\n hooks.styleDeclaration(...p);\n }\n styleDeclarationCb(...p);\n };\n o.canvasMutationCb = (...p) => {\n if (hooks.canvasMutation) {\n hooks.canvasMutation(...p);\n }\n canvasMutationCb(...p);\n };\n o.fontCb = (...p) => {\n if (hooks.font) {\n hooks.font(...p);\n }\n fontCb(...p);\n };\n o.selectionCb = (...p) => {\n if (hooks.selection) {\n hooks.selection(...p);\n }\n selectionCb(...p);\n };\n o.customElementCb = (...c) => {\n if (hooks.customElement) {\n hooks.customElement(...c);\n }\n customElementCb(...c);\n };\n}\nfunction initObservers(o, hooks = {}) {\n const currentWindow = o.doc.defaultView;\n if (!currentWindow) {\n return () => {\n };\n }\n mergeHooks(o, hooks);\n const mutationObserver = initMutationObserver(o, o.doc);\n const mousemoveHandler = initMoveObserver(o);\n const mouseInteractionHandler = initMouseInteractionObserver(o);\n const scrollHandler = initScrollObserver(o);\n const viewportResizeHandler = initViewportResizeObserver(o, {\n win: currentWindow,\n });\n const inputHandler = initInputObserver(o);\n const mediaInteractionHandler = initMediaInteractionObserver(o);\n const styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\n const adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n const styleDeclarationObserver = initStyleDeclarationObserver(o, {\n win: currentWindow,\n });\n const fontObserver = o.collectFonts\n ? initFontObserver(o)\n : () => {\n };\n const selectionObserver = initSelectionObserver(o);\n const customElementObserver = initCustomElementObserver(o);\n const pluginHandlers = [];\n for (const plugin of o.plugins) {\n pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));\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(typeof window[prop] !== 'undefined' &&\n window[prop].prototype &&\n 'insertRule' in window[prop].prototype &&\n 'deleteRule' in window[prop].prototype);\n}\n\nclass CrossOriginIframeMirror {\n constructor(generateIdFn) {\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = 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((id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap));\n }\n getRemoteId(iframe, id, map) {\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== 'number')\n return id;\n const remoteId = remoteIdToIdMap.get(id);\n if (!remoteId)\n 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 = new WeakMap();\n this.iframeRemoteIdToIdMap = 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 = 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 = new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n return remoteIdToIdMap;\n }\n}\n\nclass IframeManagerNoop {\n constructor() {\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n }\n addIframe() {\n }\n addLoadListener() {\n }\n attachIframe() {\n }\n}\nclass IframeManager {\n constructor(options) {\n this.iframes = new WeakMap();\n this.crossOriginIframeMap = new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n this.mutationCb = options.mutationCb;\n this.wrappedEmit = options.wrappedEmit;\n this.stylesheetManager = options.stylesheetManager;\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));\n this.mirror = options.mirror;\n if (this.recordCrossOriginIframes) {\n window.addEventListener('message', this.handleMessage.bind(this));\n }\n }\n addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n if (iframeEl.contentWindow)\n this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n }\n addLoadListener(cb) {\n this.loadListener = cb;\n }\n attachIframe(iframeEl, childSn) {\n var _a;\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 (_a = this.loadListener) === null || _a === void 0 ? void 0 : _a.call(this, iframeEl);\n if (iframeEl.contentDocument &&\n iframeEl.contentDocument.adoptedStyleSheets &&\n iframeEl.contentDocument.adoptedStyleSheets.length > 0)\n this.stylesheetManager.adoptStyleSheets(iframeEl.contentDocument.adoptedStyleSheets, this.mirror.getId(iframeEl.contentDocument));\n }\n handleMessage(message) {\n const crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== 'rrweb' ||\n crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n return;\n const iframeSourceWindow = message.source;\n if (!iframeSourceWindow)\n return;\n const iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl)\n return;\n const transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event);\n if (transformedEvent)\n this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);\n }\n transformCrossOriginEvent(iframeEl, e) {\n var _a;\n switch (e.type) {\n case EventType.FullSnapshot: {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e.data.node, iframeEl);\n const rootId = e.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e.data.node, rootId);\n return {\n timestamp: e.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e.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 e;\n }\n case EventType.Custom: {\n this.replaceIds(e.data.payload, iframeEl, ['id', 'parentId', 'previousId', 'nextId']);\n return e;\n }\n case EventType.IncrementalSnapshot: {\n switch (e.data.source) {\n case IncrementalSource.Mutation: {\n e.data.adds.forEach((n) => {\n this.replaceIds(n, iframeEl, [\n 'parentId',\n 'nextId',\n 'previousId',\n ]);\n this.replaceIdOnNode(n.node, iframeEl);\n const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n rootId && this.patchRootIdOnNode(n.node, rootId);\n });\n e.data.removes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['parentId', 'id']);\n });\n e.data.attributes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n e.data.texts.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n return e;\n }\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove: {\n e.data.positions.forEach((p) => {\n this.replaceIds(p, iframeEl, ['id']);\n });\n return e;\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(e.data, iframeEl, ['id']);\n return e;\n }\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleId']);\n return e;\n }\n case IncrementalSource.Font: {\n return e;\n }\n case IncrementalSource.Selection: {\n e.data.ranges.forEach((range) => {\n this.replaceIds(range, iframeEl, ['start', 'end']);\n });\n return e;\n }\n case IncrementalSource.AdoptedStyleSheet: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\n (_a = e.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {\n this.replaceStyleIds(style, iframeEl, ['styleId']);\n });\n return e;\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')\n continue;\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(iframeEl, 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)\n node.rootId = rootId;\n if ('childNodes' in node) {\n node.childNodes.forEach((child) => {\n this.patchRootIdOnNode(child, rootId);\n });\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 = 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))\n return;\n if (this.shadowDoms.has(shadowRoot))\n return;\n this.shadowDoms.add(shadowRoot);\n const observer = initMutationObserver(Object.assign(Object.assign({}, this.bypassOptions), { doc, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), shadowRoot);\n this.restoreHandlers.push(() => observer.disconnect());\n this.restoreHandlers.push(initScrollObserver(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: shadowRoot, mirror: this.mirror })));\n setTimeout(() => {\n if (shadowRoot.adoptedStyleSheets &&\n shadowRoot.adoptedStyleSheets.length > 0)\n this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, this.mirror.getId(shadowRoot.host));\n this.restoreHandlers.push(initAdoptedStyleSheetObserver({\n mirror: this.mirror,\n stylesheetManager: this.bypassOptions.stylesheetManager,\n }, shadowRoot));\n }, 0);\n }\n observeAttachShadow(iframeElement) {\n if (!iframeElement.contentWindow || !iframeElement.contentDocument)\n return;\n this.patchAttachShadow(iframeElement.contentWindow.Element, iframeElement.contentDocument);\n }\n patchAttachShadow(element, doc) {\n const manager = this;\n this.restoreHandlers.push(patch(element.prototype, 'attachShadow', 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 reset() {\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n }\n catch (e) {\n }\n });\n this.restoreHandlers = [];\n this.shadowDoms = new WeakSet();\n }\n}\n\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\n/*\n * base64-arraybuffer 1.0.1 \n * Copyright (c) 2021 Niklas von Hertzen \n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\n\nconst canvasVarMap = new Map();\nfunction variableListFor(ctx, ctor) {\n let contextMap = canvasVarMap.get(ctx);\n if (!contextMap) {\n contextMap = new Map();\n canvasVarMap.set(ctx, contextMap);\n }\n if (!contextMap.has(ctor)) {\n contextMap.set(ctor, []);\n }\n return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n if (!value ||\n !(isInstanceOfWebGLObject(value, win) || typeof value === 'object'))\n return;\n const name = value.constructor.name;\n const list = variableListFor(ctx, name);\n let index = list.indexOf(value);\n if (index === -1) {\n index = list.length;\n list.push(value);\n }\n return index;\n};\nfunction serializeArg(value, win, ctx) {\n if (value instanceof Array) {\n return value.map((arg) => serializeArg(arg, win, ctx));\n }\n else if (value === null) {\n return value;\n }\n else if (value instanceof Float32Array ||\n value instanceof Float64Array ||\n value instanceof Int32Array ||\n value instanceof Uint32Array ||\n value instanceof Uint8Array ||\n value instanceof Uint16Array ||\n value instanceof Int16Array ||\n value instanceof Int8Array ||\n value instanceof Uint8ClampedArray) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [Object.values(value)],\n };\n }\n else if (value instanceof ArrayBuffer) {\n const name = value.constructor.name;\n const base64 = encode(value);\n return {\n rr_type: name,\n base64,\n };\n }\n else if (value instanceof DataView) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [\n serializeArg(value.buffer, win, ctx),\n value.byteOffset,\n value.byteLength,\n ],\n };\n }\n else if (value instanceof HTMLImageElement) {\n const name = value.constructor.name;\n const { src } = value;\n return {\n rr_type: name,\n src,\n };\n }\n else if (value instanceof HTMLCanvasElement) {\n const name = 'HTMLImageElement';\n const src = value.toDataURL();\n return {\n rr_type: name,\n src,\n };\n }\n else if (value instanceof ImageData) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [serializeArg(value.data, win, ctx), value.width, value.height],\n };\n }\n else if (isInstanceOfWebGLObject(value, win) || typeof value === 'object') {\n const name = value.constructor.name;\n const index = saveWebGLVar(value, win, ctx);\n return {\n rr_type: name,\n index: index,\n };\n }\n return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n return [...args].map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n const webGLConstructorNames = [\n 'WebGLActiveInfo',\n 'WebGLBuffer',\n 'WebGLFramebuffer',\n 'WebGLProgram',\n 'WebGLRenderbuffer',\n 'WebGLShader',\n 'WebGLShaderPrecisionFormat',\n 'WebGLTexture',\n 'WebGLUniformLocation',\n 'WebGLVertexArrayObject',\n 'WebGLVertexArrayObjectOES',\n ];\n const supportedWebGLConstructorNames = webGLConstructorNames.filter((name) => typeof win[name] === 'function');\n return Boolean(supportedWebGLConstructorNames.find((name) => value instanceof win[name]));\n};\n\nfunction initCanvas2DMutationObserver(cb, win, blockClass, blockSelector, unblockSelector) {\n const handlers = [];\n const props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype);\n for (const prop of props2D) {\n try {\n if (typeof win.CanvasRenderingContext2D.prototype[prop] !== 'function') {\n continue;\n }\n const restoreHandler = patch(win.CanvasRenderingContext2D.prototype, prop, function (original) {\n return function (...args) {\n if (!isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n setTimeout(() => {\n const recordArgs = serializeArgs([...args], win, this);\n cb(this.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: recordArgs,\n });\n }, 0);\n }\n return original.apply(this, args);\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n const hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop, {\n set(v) {\n cb(this.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: [v],\n setter: true,\n });\n },\n });\n handlers.push(hookHandler);\n }\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction getNormalizedContextName(contextType) {\n return contextType === 'experimental-webgl' ? 'webgl' : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n const handlers = [];\n try {\n const restoreHandler = patch(win.HTMLCanvasElement.prototype, 'getContext', function (original) {\n return function (contextType, ...args) {\n if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n const ctxName = getNormalizedContextName(contextType);\n if (!('__context' in this))\n this.__context = ctxName;\n if (setPreserveDrawingBufferToTrue &&\n ['webgl', 'webgl2'].includes(ctxName)) {\n if (args[0] && typeof args[0] === 'object') {\n const contextAttributes = args[0];\n if (!contextAttributes.preserveDrawingBuffer) {\n contextAttributes.preserveDrawingBuffer = true;\n }\n }\n else {\n args.splice(0, 1, {\n preserveDrawingBuffer: true,\n });\n }\n }\n }\n return original.apply(this, [contextType, ...args]);\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n console.error('failed to patch HTMLCanvasElement.prototype.getContext');\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction patchGLPrototype(prototype, type, cb, blockClass, blockSelector, unblockSelector, mirror, win) {\n const handlers = [];\n const props = Object.getOwnPropertyNames(prototype);\n for (const prop of props) {\n if ([\n 'isContextLost',\n 'canvas',\n 'drawingBufferWidth',\n 'drawingBufferHeight',\n ].includes(prop)) {\n continue;\n }\n try {\n if (typeof prototype[prop] !== 'function') {\n continue;\n }\n const restoreHandler = patch(prototype, prop, function (original) {\n return function (...args) {\n const result = original.apply(this, args);\n saveWebGLVar(result, win, this);\n if ('tagName' in this.canvas &&\n !isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n const recordArgs = serializeArgs([...args], win, this);\n const mutation = {\n type,\n property: prop,\n args: recordArgs,\n };\n cb(this.canvas, mutation);\n }\n return result;\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n const hookHandler = hookSetter(prototype, prop, {\n set(v) {\n cb(this.canvas, {\n type,\n property: prop,\n args: [v],\n setter: true,\n });\n },\n });\n handlers.push(hookHandler);\n }\n }\n return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector, unblockSelector, mirror) {\n const handlers = [];\n handlers.push(...patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, unblockSelector, mirror, win));\n if (typeof win.WebGL2RenderingContext !== 'undefined') {\n handlers.push(...patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, unblockSelector, mirror, win));\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction decodeBase64(base64, enableUnicode) {\n var binaryString = atob(base64);\n if (enableUnicode) {\n var binaryView = new Uint8Array(binaryString.length);\n for (var i = 0, n = binaryString.length; i < n; ++i) {\n binaryView[i] = binaryString.charCodeAt(i);\n }\n return String.fromCharCode.apply(null, new Uint16Array(binaryView.buffer));\n }\n return binaryString;\n}\n\nfunction createURL(base64, sourcemapArg, enableUnicodeArg) {\n var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;\n var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;\n var source = decodeBase64(base64, enableUnicode);\n var start = source.indexOf('\\n', 10) + 1;\n var body = source.substring(start) + (sourcemap ? '\\/\\/# sourceMappingURL=' + sourcemap : '');\n var blob = new Blob([body], { type: 'application/javascript' });\n return URL.createObjectURL(blob);\n}\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n var url;\n return function WorkerFactory(options) {\n url = url || createURL(base64, sourcemapArg, enableUnicodeArg);\n return new Worker(url, options);\n };\n}\n\nvar WorkerFactory = createBase64WorkerFactory('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQ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QgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgp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Hdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=', null, false);\n\nclass CanvasManagerNoop {\n reset() {\n }\n freeze() {\n }\n unfreeze() {\n }\n lock() {\n }\n unlock() {\n }\n}\nclass CanvasManager {\n reset() {\n this.pendingCanvasMutations.clear();\n this.resetObservers && this.resetObservers();\n }\n freeze() {\n this.frozen = true;\n }\n unfreeze() {\n this.frozen = false;\n }\n lock() {\n this.locked = true;\n }\n unlock() {\n this.locked = false;\n }\n constructor(options) {\n this.pendingCanvasMutations = new Map();\n this.rafStamps = { latestId: 0, invokeId: null };\n this.frozen = false;\n this.locked = false;\n this.processMutation = (target, mutation) => {\n const newFrame = this.rafStamps.invokeId &&\n this.rafStamps.latestId !== this.rafStamps.invokeId;\n if (newFrame || !this.rafStamps.invokeId)\n this.rafStamps.invokeId = this.rafStamps.latestId;\n if (!this.pendingCanvasMutations.has(target)) {\n this.pendingCanvasMutations.set(target, []);\n }\n this.pendingCanvasMutations.get(target).push(mutation);\n };\n const { sampling = 'all', win, blockClass, blockSelector, unblockSelector, recordCanvas, dataURLOptions, } = options;\n this.mutationCb = options.mutationCb;\n this.mirror = options.mirror;\n if (recordCanvas && sampling === 'all')\n this.initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector);\n if (recordCanvas && typeof sampling === 'number')\n this.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, unblockSelector, {\n dataURLOptions,\n });\n }\n initCanvasFPSObserver(fps, win, blockClass, blockSelector, unblockSelector, options) {\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, true);\n const snapshotInProgressMap = new Map();\n const worker = new WorkerFactory();\n worker.onmessage = (e) => {\n const { id } = e.data;\n snapshotInProgressMap.set(id, false);\n if (!('base64' in e.data))\n return;\n const { base64, type, width, height } = e.data;\n this.mutationCb({\n id,\n type: CanvasContext['2D'],\n commands: [\n {\n property: 'clearRect',\n args: [0, 0, width, height],\n },\n {\n property: 'drawImage',\n args: [\n {\n rr_type: 'ImageBitmap',\n args: [\n {\n rr_type: 'Blob',\n data: [{ rr_type: 'ArrayBuffer', base64 }],\n type,\n },\n ],\n },\n 0,\n 0,\n ],\n },\n ],\n });\n };\n const timeBetweenSnapshots = 1000 / fps;\n let lastSnapshotTime = 0;\n let rafId;\n const getCanvas = () => {\n const matchedCanvas = [];\n win.document.querySelectorAll('canvas').forEach((canvas) => {\n if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n matchedCanvas.push(canvas);\n }\n });\n return matchedCanvas;\n };\n const takeCanvasSnapshots = (timestamp) => {\n if (lastSnapshotTime &&\n timestamp - lastSnapshotTime < timeBetweenSnapshots) {\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n return;\n }\n lastSnapshotTime = timestamp;\n getCanvas()\n .forEach((canvas) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n const id = this.mirror.getId(canvas);\n if (snapshotInProgressMap.get(id))\n return;\n snapshotInProgressMap.set(id, true);\n if (['webgl', 'webgl2'].includes(canvas.__context)) {\n const context = canvas.getContext(canvas.__context);\n if (((_a = context === null || context === void 0 ? void 0 : context.getContextAttributes()) === null || _a === void 0 ? void 0 : _a.preserveDrawingBuffer) === false) {\n context.clear(context.COLOR_BUFFER_BIT);\n }\n }\n const bitmap = yield createImageBitmap(canvas);\n worker.postMessage({\n id,\n bitmap,\n width: canvas.width,\n height: canvas.height,\n dataURLOptions: options.dataURLOptions,\n }, [bitmap]);\n }));\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n };\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n this.resetObservers = () => {\n canvasContextReset();\n cancelAnimationFrame(rafId);\n };\n }\n initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n this.startRAFTimestamping();\n this.startPendingCanvasMutationFlusher();\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, false);\n const canvas2DReset = initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector);\n const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector, this.mirror);\n this.resetObservers = () => {\n canvasContextReset();\n canvas2DReset();\n canvasWebGL1and2Reset();\n };\n }\n startPendingCanvasMutationFlusher() {\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n startRAFTimestamping() {\n const setLatestRAFTimestamp = (timestamp) => {\n this.rafStamps.latestId = timestamp;\n requestAnimationFrame(setLatestRAFTimestamp);\n };\n requestAnimationFrame(setLatestRAFTimestamp);\n }\n flushPendingCanvasMutations() {\n this.pendingCanvasMutations.forEach((values, canvas) => {\n const id = this.mirror.getId(canvas);\n this.flushPendingCanvasMutationFor(canvas, id);\n });\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n flushPendingCanvasMutationFor(canvas, id) {\n if (this.frozen || this.locked) {\n return;\n }\n const valuesWithType = this.pendingCanvasMutations.get(canvas);\n if (!valuesWithType || id === -1)\n return;\n const values = valuesWithType.map((value) => {\n const rest = __rest(value, [\"type\"]);\n return rest;\n });\n const { type } = valuesWithType[0];\n this.mutationCb({ id, type, commands: values });\n this.pendingCanvasMutations.delete(canvas);\n }\n}\n\nclass StylesheetManager {\n constructor(options) {\n this.trackedLinkElements = 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\n .attributes,\n },\n ],\n });\n this.trackLinkElement(linkEl);\n }\n trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl))\n return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0)\n 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, (r, index) => ({\n rule: stringifyRule(r),\n index,\n })),\n });\n }\n else\n styleId = this.styleMirror.getId(sheet);\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n if (styles.length > 0)\n adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = new WeakSet();\n }\n trackStylesheetInLinkElement(linkEl) {\n }\n}\n\nclass ProcessedNodeManager {\n constructor() {\n this.nodeMap = new WeakMap();\n this.loop = true;\n this.periodicallyClear();\n }\n periodicallyClear() {\n requestAnimationFrame(() => {\n this.clear();\n if (this.loop)\n this.periodicallyClear();\n });\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 this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n }\n clear() {\n this.nodeMap = new WeakMap();\n }\n destroy() {\n this.loop = false;\n }\n}\n\nfunction wrapEvent(e) {\n return Object.assign(Object.assign({}, e), { timestamp: nowTimestamp() });\n}\nlet wrappedEmit;\nlet takeFullSnapshot;\nlet canvasManager;\nlet recording = false;\nconst mirror = createMirror();\nfunction record(options = {}) {\n const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'rr-block', blockSelector = null, unblockSelector = null, ignoreClass = 'rr-ignore', ignoreSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskAttributeFn, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordCanvas = false, recordCrossOriginIframes = false, recordAfter = options.recordAfter === 'DOMContentLoaded'\n ? options.recordAfter\n : 'load', userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, ignoreCSSAttributes = new Set([]), errorHandler, onMutation, } = options;\n registerErrorHandler(errorHandler);\n const inEmittingFrame = recordCrossOriginIframes\n ? window.parent === window\n : true;\n let passEmitsToParent = false;\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n }\n catch (e) {\n passEmitsToParent = true;\n }\n }\n if (inEmittingFrame && !emit) {\n throw new Error('emit function is required');\n }\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n sampling.mousemove = mousemoveWait;\n }\n mirror.reset();\n const maskInputOptions = maskAllInputs === true\n ? {\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 }\n : _maskInputOptions !== undefined\n ? _maskInputOptions\n : {};\n const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === 'all'\n ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaVerification: true,\n headMetaAuthorship: _slimDOMOptions === 'all',\n headMetaDescKeywords: _slimDOMOptions === 'all',\n }\n : _slimDOMOptions\n ? _slimDOMOptions\n : {};\n polyfill();\n let lastFullSnapshotEvent;\n let incrementalSnapshotCount = 0;\n const eventProcessor = (e) => {\n for (const plugin of plugins || []) {\n if (plugin.eventProcessor) {\n e = plugin.eventProcessor(e);\n }\n }\n if (packFn &&\n !passEmitsToParent) {\n e = packFn(e);\n }\n return e;\n };\n wrappedEmit = (e, isCheckout) => {\n var _a;\n if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) &&\n e.type !== EventType.FullSnapshot &&\n !(e.type === EventType.IncrementalSnapshot &&\n e.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach((buf) => buf.unfreeze());\n }\n if (inEmittingFrame) {\n emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e), isCheckout);\n }\n else if (passEmitsToParent) {\n const message = {\n type: 'rrweb',\n event: eventProcessor(e),\n origin: window.location.origin,\n isCheckout,\n };\n window.parent.postMessage(message, '*');\n }\n if (e.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e;\n incrementalSnapshotCount = 0;\n }\n else if (e.type === EventType.IncrementalSnapshot) {\n if (e.data.source === IncrementalSource.Mutation &&\n e.data.isAttachIframe) {\n return;\n }\n incrementalSnapshotCount++;\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n const exceedTime = checkoutEveryNms &&\n e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n if (exceedCount || exceedTime) {\n takeFullSnapshot(true);\n }\n }\n };\n const wrappedMutationEmit = (m) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Mutation }, m),\n }));\n };\n const wrappedScrollEmit = (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Scroll }, p),\n }));\n const wrappedCanvasMutationEmit = (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.CanvasMutation }, p),\n }));\n const wrappedAdoptedStyleSheetEmit = (a) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.AdoptedStyleSheet }, a),\n }));\n const stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\n });\n const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__\n ? new IframeManagerNoop()\n : new IframeManager({\n mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager: 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 canvasManager =\n typeof __RRWEB_EXCLUDE_CANVAS__ === 'boolean' && __RRWEB_EXCLUDE_CANVAS__\n ? new CanvasManagerNoop()\n : new CanvasManager({\n recordCanvas,\n mutationCb: wrappedCanvasMutationEmit,\n win: window,\n blockClass,\n blockSelector,\n unblockSelector,\n mirror,\n sampling: sampling.canvas,\n dataURLOptions,\n });\n const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&\n __RRWEB_EXCLUDE_SHADOW_DOM__\n ? new ShadowDomManagerNoop()\n : 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 },\n mirror,\n });\n takeFullSnapshot = (isCheckout = false) => {\n wrappedEmit(wrapEvent({\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight(),\n },\n }), isCheckout);\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach((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: (n) => {\n if (isSerializedIframe(n, mirror)) {\n iframeManager.addIframe(n);\n }\n if (isSerializedStylesheet(n, mirror)) {\n stylesheetManager.trackLinkElement(n);\n }\n if (hasShadowRoot(n)) {\n shadowDomManager.addShadowRoot(n.shadowRoot, document);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n iframeManager.attachIframe(iframe, childSn);\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (linkEl, childSn) => {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n keepIframeSrcFn,\n });\n if (!node) {\n return console.warn('Failed to snapshot the document');\n }\n wrappedEmit(wrapEvent({\n type: EventType.FullSnapshot,\n data: {\n node,\n initialOffset: getWindowScroll(window),\n },\n }), isCheckout);\n mutationBuffers.forEach((buf) => buf.unlock());\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\n };\n try {\n const handlers = [];\n const observe = (doc) => {\n var _a;\n return callbackWrapper(initObservers)({\n onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: (positions, source) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: {\n source,\n positions,\n },\n })),\n mouseInteractionCb: (d) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.MouseInteraction }, d),\n })),\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: (d) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.ViewportResize }, d),\n })),\n inputCb: (v) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Input }, v),\n })),\n mediaInteractionCb: (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.MediaInteraction }, p),\n })),\n styleSheetRuleCb: (r) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.StyleSheetRule }, r),\n })),\n styleDeclarationCb: (r) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.StyleDeclaration }, r),\n })),\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Font }, p),\n })),\n selectionCb: (p) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Selection }, p),\n }));\n },\n customElementCb: (c) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.CustomElement }, c),\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 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: ((_a = plugins === null || plugins === void 0 ? void 0 : plugins.filter((p) => p.observer)) === null || _a === void 0 ? void 0 : _a.map((p) => ({\n observer: p.observer,\n options: p.options,\n callback: (payload) => wrappedEmit(wrapEvent({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload,\n },\n })),\n }))) || [],\n }, hooks);\n };\n iframeManager.addLoadListener((iframeEl) => {\n try {\n handlers.push(observe(iframeEl.contentDocument));\n }\n catch (error) {\n console.warn(error);\n }\n });\n const init = () => {\n takeFullSnapshot();\n handlers.push(observe(document));\n recording = true;\n };\n if (document.readyState === 'interactive' ||\n document.readyState === 'complete') {\n init();\n }\n else {\n handlers.push(on('DOMContentLoaded', () => {\n wrappedEmit(wrapEvent({\n type: EventType.DomContentLoaded,\n data: {},\n }));\n if (recordAfter === 'DOMContentLoaded')\n init();\n }));\n handlers.push(on('load', () => {\n wrappedEmit(wrapEvent({\n type: EventType.Load,\n data: {},\n }));\n if (recordAfter === 'load')\n init();\n }, window));\n }\n return () => {\n handlers.forEach((h) => h());\n processedNodeManager.destroy();\n recording = false;\n unregisterErrorHandler();\n };\n }\n catch (error) {\n console.warn(error);\n }\n}\nrecord.addCustomEvent = (tag, payload) => {\n if (!recording) {\n throw new Error('please add custom event after start recording');\n }\n wrappedEmit(wrapEvent({\n type: EventType.Custom,\n data: {\n tag,\n payload,\n },\n }));\n};\nrecord.freezePage = () => {\n mutationBuffers.forEach((buf) => buf.freeze());\n};\nrecord.takeFullSnapshot = (isCheckout) => {\n if (!recording) {\n throw new Error('please take full snapshot after start recording');\n }\n takeFullSnapshot(isCheckout);\n};\nrecord.mirror = mirror;\n\n/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nfunction timestampToMs(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nfunction timestampToS(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Add a breadcrumb event to replay.\n */\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (['ui.click', 'ui.input'].includes(breadcrumb.category )) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n void replay.throttledAddEvent({\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1000),\n },\n });\n\n // Do not flush after console log messages\n return breadcrumb.category === 'console';\n });\n}\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in ,\n * The target will be the image, not the button, which we don't want here\n */\nfunction getClickTargetNode(event) {\n const target = getTargetNode(event);\n\n if (!target || !(target instanceof Element)) {\n return target;\n }\n\n const closestInteractive = target.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || target;\n}\n\n/** Get the event target node. */\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target ;\n }\n\n return event;\n}\n\nfunction isEventWithTarget(event) {\n return typeof event === 'object' && !!event && 'target' in event;\n}\n\nlet handlers;\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nfunction onWindowOpen(cb) {\n // Ensure to only register this once\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n\n handlers.push(cb);\n\n return () => {\n const pos = handlers ? handlers.indexOf(cb) : -1;\n if (pos > -1) {\n (handlers ).splice(pos, 1);\n }\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 (e) {\n // ignore errors in here\n }\n }\n\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n\n/** Handle a click. */\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nclass ClickDetector {\n // protected for testing\n\n constructor(\n replay,\n slowClickConfig,\n // Just for easier testing\n _addBreadcrumbEvent = addBreadcrumbEvent,\n ) {\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = [];\n\n // We want everything in s, but options are in ms\n this._timeout = slowClickConfig.timeout / 1000;\n this._threshold = slowClickConfig.threshold / 1000;\n this._scollTimeout = slowClickConfig.scrollTimeout / 1000;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n\n /** Register click detection handlers on mutation or scroll. */\n addListeners() {\n const mutationHandler = () => {\n this._lastMutation = nowInSeconds();\n };\n\n const scrollHandler = () => {\n this._lastScroll = nowInSeconds();\n };\n\n const cleanupWindowOpen = onWindowOpen(() => {\n // Treat window.open as mutation\n this._lastMutation = nowInSeconds();\n });\n\n const clickHandler = (event) => {\n if (!event.target) {\n return;\n }\n\n const node = getClickTargetNode(event);\n if (node) {\n this._handleMultiClick(node );\n }\n };\n\n const obs = new MutationObserver(mutationHandler);\n\n obs.observe(WINDOW.document.documentElement, {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n });\n\n WINDOW.addEventListener('scroll', scrollHandler, { passive: true });\n WINDOW.addEventListener('click', clickHandler, { passive: true });\n\n this._teardown = () => {\n WINDOW.removeEventListener('scroll', scrollHandler);\n WINDOW.removeEventListener('click', clickHandler);\n cleanupWindowOpen();\n\n obs.disconnect();\n this._clicks = [];\n this._lastMutation = 0;\n this._lastScroll = 0;\n };\n }\n\n /** Clean up listeners. */\n removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n\n /** Handle a click */\n handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\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\n // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n if (\n this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n ) {\n return;\n }\n\n this._clicks.push(newClick);\n\n // If this is the first new click, set a timeout to check for multi clicks\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n\n /** Count multiple clicks on elements. */\n _handleMultiClick(node) {\n this._getClicks(node).forEach(click => {\n click.clickCount++;\n });\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\n /** Check the clicks that happened. */\n _checkClicks() {\n const timedOutClicks = [];\n\n const now = nowInSeconds();\n\n this._clicks.forEach(click => {\n if (!click.mutationAfter && this._lastMutation) {\n click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n }\n if (!click.scrollAfter && this._lastScroll) {\n click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n }\n\n // All of these are in seconds!\n if (click.timestamp + this._timeout <= now) {\n timedOutClicks.push(click);\n }\n });\n\n // Remove \"old\" clicks\n for (const click of timedOutClicks) {\n const pos = this._clicks.indexOf(click);\n\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n this._clicks.splice(pos, 1);\n }\n }\n\n // Trigger new check, unless no clicks left\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\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._scollTimeout;\n const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n const isSlowClick = !hadScroll && !hadMutation;\n const { clickCount, clickBreadcrumb } = click;\n\n // Slow click\n if (isSlowClick) {\n // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n // If not, it means we just timed out without scroll & mutation\n const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\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\n this._addBreadcrumbEvent(replay, breadcrumb);\n return;\n }\n\n // Multi click\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\n this._addBreadcrumbEvent(replay, breadcrumb);\n }\n }\n\n /** Schedule to check current clicks. */\n _scheduleCheckClicks() {\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n\n this._checkClickTimeout = setTimeout(() => this._checkClicks(), 1000);\n }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n }\n\n // If tag, we only want to consider input[type='submit'] & input[type='button']\n if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n return true;\n }\n\n // If tag, detect special variants that may not lead to an action\n // If target !== _self, we may open the link somewhere else, which would lead to no action\n // Also, when downloading a file, we may not leave the page, but still not trigger an action\n if (\n node.tagName === 'A' &&\n (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n ) {\n return true;\n }\n\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n\n return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds() {\n return Date.now() / 1000;\n}\n\n/**\n * Create a breadcrumb for a replay.\n */\nfunction createBreadcrumb(\n breadcrumb,\n) {\n return {\n timestamp: Date.now() / 1000,\n type: 'default',\n ...breadcrumb,\n };\n}\n\nvar NodeType;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType || (NodeType = {}));\n\n// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = 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]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nfunction getAttributesToRecord(attributes) {\n const obj = {};\n for (const key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n let normalizedKey = key;\n\n if (key === 'data-testid' || key === 'data-test-id') {\n normalizedKey = 'testId';\n }\n\n obj[normalizedKey] = attributes[key];\n }\n }\n\n return obj;\n}\n\nconst handleDomListener = (\n replay,\n) => {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleDom(handlerData);\n\n if (!result) {\n return;\n }\n\n const isClick = handlerData.name === 'click';\n const event = isClick && (handlerData.event );\n // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n if (\n isClick &&\n replay.clickDetector &&\n event &&\n !event.altKey &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey\n ) {\n handleClick(\n replay.clickDetector,\n result ,\n getClickTargetNode(handlerData.event) ,\n );\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n\n/** Get the base DOM breadcrumb. */\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\n return {\n message,\n data: element\n ? {\n nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes)\n .map((node) => node.type === NodeType.Text && node.textContent)\n .filter(Boolean) // filter out empty values\n .map(text => (text ).trim())\n .join(''),\n attributes: getAttributesToRecord(element.attributes),\n },\n }\n : {},\n };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nfunction handleDom(handlerData) {\n const { target, message } = getDomTarget(handlerData);\n\n return createBreadcrumb({\n category: `ui.${handlerData.name}`,\n ...getBaseDomBreadcrumb(target, message),\n });\n}\n\nfunction getDomTarget(handlerData) {\n const isClick = handlerData.name === 'click';\n\n let message;\n let target = null;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event);\n message = htmlTreeAsString(target, { maxStringLength: 200 }) || '';\n } catch (e) {\n message = '';\n }\n\n return { target, message };\n}\n\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n\n/** Handle keyboard events & create breadcrumbs. */\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n }\n\n // Update user activity, but do not restart recording as it can create\n // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n // session with a single \"keydown\" breadcrumb is created)\n replay.updateUserActivity();\n\n const breadcrumb = getKeyboardBreadcrumb(event);\n\n if (!breadcrumb) {\n return;\n }\n\n addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nfunction getKeyboardBreadcrumb(event) {\n const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n // never capture for input fields\n if (!target || isInputElement(target ) || !key) {\n return null;\n }\n\n // Note: We do not consider shift here, as that means \"uppercase\"\n const hasModifierKey = metaKey || ctrlKey || altKey;\n const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n // Do not capture breadcrumb if only a word key is pressed\n // This could leak e.g. user input\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n\n const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '';\n const baseBreadcrumb = getBaseDomBreadcrumb(target , message);\n\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}\n\nfunction isInputElement(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES\n\n = {\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n resource: createResourceEntry,\n paint: createPaintEntry,\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n navigation: createNavigationEntry,\n};\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nfunction createPerformanceEntries(\n entries,\n) {\n return entries.map(createPerformanceEntry).filter(Boolean) ;\n}\n\nfunction createPerformanceEntry(entry) {\n if (!ENTRY_TYPES[entry.entryType]) {\n return null;\n }\n\n return ENTRY_TYPES[entry.entryType](entry);\n}\n\nfunction getAbsoluteTime(time) {\n // browserPerformanceTimeOrigin can be undefined if `performance` or\n // `performance.now` doesn't exist, but this is already checked by this integration\n return ((browserPerformanceTimeOrigin || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry) {\n const { duration, entryType, name, startTime } = entry;\n\n const start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name,\n start,\n end: start + duration,\n data: undefined,\n };\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\n // Ignore entries with no duration, they do not seem to be useful and cause dupes\n if (duration === 0) {\n return null;\n }\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}\n\nfunction createResourceEntry(\n entry,\n) {\n const {\n entryType,\n initiatorType,\n name,\n responseEnd,\n startTime,\n decodedBodySize,\n encodedBodySize,\n responseStatus,\n transferSize,\n } = entry;\n\n // Core SDK handles these\n if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n return null;\n }\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}\n\n/**\n * Add a LCP event to the replay based on an LCP metric.\n */\nfunction getLargestContentfulPaint(metric\n\n) {\n const entries = metric.entries;\n const lastEntry = entries[entries.length - 1] ;\n const element = lastEntry ? lastEntry.element : undefined;\n\n const value = metric.value;\n\n const end = getAbsoluteTime(value);\n\n const data = {\n type: 'largest-contentful-paint',\n name: 'largest-contentful-paint',\n start: end,\n end,\n data: {\n value,\n size: value,\n nodeId: element ? record.mirror.getId(element) : undefined,\n },\n };\n\n return data;\n}\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n // It is possible for entries to come up multiple times\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n\n function onEntries({ entries }) {\n entries.forEach(addPerformanceEntry);\n }\n\n const clearCallbacks = [];\n\n (['navigation', 'paint', 'resource'] ).forEach(type => {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n\n clearCallbacks.push(\n addLcpInstrumentationHandler(({ metric }) => {\n replay.replayPerformanceEntries.push(getLargestContentfulPaint(metric));\n }),\n );\n\n // A callback to cleanup all handlers\n return () => {\n clearCallbacks.forEach(clearCallback => clearCallback());\n };\n}\n\nconst r = `/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},I={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_outi+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watern&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindexi&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:\"pako deflate (from Nodeca project)\"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if(\"object\"!=typeof a)throw new TypeError(a+\"must be non-object\");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if(\"function\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if(\"function\"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a=\"\";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t=\"string\"==typeof e.dictionary?Nt(e.dictionary):\"[object ArrayBuffer]\"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,\"string\"==typeof t?a.input=Nt(t):\"[object ArrayBuffer]\"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<>>=p,c-=p),c<15&&(f+=z[a++]<>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<o){t.msg=\"invalid distance too far back\",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg=\"invalid distance too far back\",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg=\"\",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whavexe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg=\"incorrect header check\",a.mode=me;break}if((15&h)!==we){t.msg=\"unknown compression method\",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg=\"invalid window size\",a.mode=me;break}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg=\"invalid block type\",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<>>16^65535)){t.msg=\"invalid stored block lengths\",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg=\"too many length or distance symbols\",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg=\"invalid code lengths set\",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d>>=m,d-=m,0===a.have){t.msg=\"invalid bit length repeat\",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg=\"invalid bit length repeat\",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg=\"invalid code -- missing end-of-block\",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg=\"invalid literal/lengths set\",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg=\"invalid distances set\",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg=\"invalid literal/length code\",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg=\"invalid distance code\",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg=\"invalid distance too far back\",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg=\"invalid distance too far back\",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:\"pako inflate (from Nodeca project)\"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:\"\"},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&(\"string\"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):\"[object ArrayBuffer]\"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,\"[object ArrayBuffer]\"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if(\"string\"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const e=this._hasEvents?\",\":\"\";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push(\"]\",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push(\"[\",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener(\"message\",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&\"function\"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n\nfunction e(){const e=new Blob([r]);return URL.createObjectURL(e)}\n\n/**\n * Log a message in debug mode, and add a breadcrumb when _experiment.traceInternals is enabled.\n */\nfunction logInfo(message, shouldAddBreadcrumb) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n addBreadcrumb(message);\n }\n}\n\n/**\n * Log a message, and add a breadcrumb in the next tick.\n * This is necessary when the breadcrumb may be added before the replay is initialized.\n */\nfunction logInfoNextTick(message, shouldAddBreadcrumb) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n // Wait a tick here to avoid race conditions for some initial logs\n // which may be added before replay is initialized\n setTimeout(() => {\n addBreadcrumb(message);\n }, 0);\n }\n}\n\nfunction addBreadcrumb(message) {\n const hub = getCurrentHub();\n hub.addBreadcrumb(\n {\n category: 'console',\n data: {\n logger: 'replay',\n },\n level: 'info',\n message,\n },\n { level: 'info' },\n );\n}\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nclass EventBufferSizeExceededError extends Error {\n constructor() {\n super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n }\n}\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nclass EventBufferArray {\n /** All the events that are buffered to be sent. */\n\n /** @inheritdoc */\n\n constructor() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return this.events.length > 0;\n }\n\n /** @inheritdoc */\n get type() {\n return 'sync';\n }\n\n /** @inheritdoc */\n destroy() {\n this.events = [];\n }\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\n this.events.push(event);\n }\n\n /** @inheritdoc */\n finish() {\n return new Promise(resolve => {\n // Make a copy of the events array reference and immediately clear the\n // events member so that we do not lose new events while uploading\n // attachment.\n const eventsRet = this.events;\n this.clear();\n resolve(JSON.stringify(eventsRet));\n });\n }\n\n /** @inheritdoc */\n clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n const timestamp = this.events.map(event => event.timestamp).sort()[0];\n\n if (!timestamp) {\n return null;\n }\n\n return timestampToMs(timestamp);\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass WorkerHandler {\n\n constructor(worker) {\n this._worker = worker;\n this._id = 0;\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n ensureReady() {\n // Ensure we only check once\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\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 reject();\n }\n },\n { once: true },\n );\n\n this._worker.addEventListener(\n 'error',\n error => {\n reject(error);\n },\n { once: true },\n );\n });\n\n return this._ensureReadyPromise;\n }\n\n /**\n * Destroy the worker.\n */\n destroy() {\n logInfo('[Replay] Destroying compression worker');\n this._worker.terminate();\n }\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\n return new Promise((resolve, reject) => {\n const listener = ({ data }) => {\n const response = data ;\n if (response.method !== method) {\n return;\n }\n\n // There can be multiple listeners for a single method, the id ensures\n // that the response matches the caller.\n if (response.id !== id) {\n return;\n }\n\n // At this point, we'll always want to remove listener regardless of result status\n this._worker.removeEventListener('message', listener);\n\n if (!response.success) {\n // TODO: Do some error handling, not sure what\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', response.response);\n\n reject(new Error('Error in compression worker'));\n return;\n }\n\n resolve(response.response );\n };\n\n // Note: we can't use `once` option because it's possible it needs to\n // listen to multiple messages\n this._worker.addEventListener('message', listener);\n this._worker.postMessage({ id, method, arg });\n });\n }\n\n /** Get the current ID and increment it for the next call. */\n _getAndIncrementId() {\n return this._id++;\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass EventBufferCompressionWorker {\n /** @inheritdoc */\n\n constructor(worker) {\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return !!this._earliestTimestamp;\n }\n\n /** @inheritdoc */\n get type() {\n return 'worker';\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n ensureReady() {\n return this._worker.ensureReady();\n }\n\n /**\n * Destroy the event buffer.\n */\n destroy() {\n this._worker.destroy();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfuly received and processed by worker.\n */\n addEvent(event) {\n const timestamp = timestampToMs(event.timestamp);\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n\n const data = JSON.stringify(event);\n this._totalSize += data.length;\n\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n\n return this._sendEventToWorker(data);\n }\n\n /**\n * Finish the event buffer and return the compressed data.\n */\n finish() {\n return this._finishRequest();\n }\n\n /** @inheritdoc */\n clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n\n // We do not wait on this, as we assume the order of messages is consistent for the worker\n void this._worker.postMessage('clear');\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n\n /**\n * Send the event to the worker.\n */\n _sendEventToWorker(data) {\n return this._worker.postMessage('addEvent', data);\n }\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\n this._earliestTimestamp = null;\n this._totalSize = 0;\n\n return response;\n }\n}\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nclass EventBufferProxy {\n\n constructor(worker) {\n this._fallback = new EventBufferArray();\n this._compression = new EventBufferCompressionWorker(worker);\n this._used = this._fallback;\n\n this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n }\n\n /** @inheritdoc */\n get type() {\n return this._used.type;\n }\n\n /** @inheritDoc */\n get hasEvents() {\n return this._used.hasEvents;\n }\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\n /** @inheritDoc */\n destroy() {\n this._fallback.destroy();\n this._compression.destroy();\n }\n\n /** @inheritdoc */\n clear() {\n return this._used.clear();\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._used.getEarliestTimestamp();\n }\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\n /** @inheritDoc */\n async finish() {\n // Ensure the worker is loaded, so the sent event is compressed\n await this.ensureWorkerIsLoaded();\n\n return this._used.finish();\n }\n\n /** Ensure the worker has loaded. */\n ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n\n /** Actually check if the worker has been loaded. */\n async _ensureWorkerIsLoaded() {\n try {\n await this._compression.ensureReady();\n } catch (error) {\n // If the worker fails to load, we fall back to the simple buffer.\n // Nothing more to do from our side here\n logInfo('[Replay] Failed to load the compression worker, falling back to simple buffer');\n return;\n }\n\n // Now we need to switch over the array buffer to the compression worker\n await this._switchToCompressionWorker();\n }\n\n /** Switch the used buffer to the compression worker. */\n async _switchToCompressionWorker() {\n const { events, hasCheckout } = this._fallback;\n\n const addEventPromises = [];\n for (const event of events) {\n addEventPromises.push(this._compression.addEvent(event));\n }\n\n this._compression.hasCheckout = hasCheckout;\n\n // We switch over to the new buffer immediately - any further events will be added\n // after the previously buffered ones\n this._used = this._compression;\n\n // Wait for original events to be re-added before resolving\n try {\n await Promise.all(addEventPromises);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Replay] Failed to add events when switching buffers.', error);\n }\n }\n}\n\n/**\n * Create an event buffer for replays.\n */\nfunction createEventBuffer({ useCompression }) {\n // eslint-disable-next-line no-restricted-globals\n if (useCompression && window.Worker) {\n try {\n const workerUrl = e();\n\n logInfo('[Replay] Using compression worker');\n const worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n logInfo('[Replay] Failed to create compression worker');\n // Fall back to use simple event buffer array\n }\n }\n\n logInfo('[Replay] Using simple buffer');\n return new EventBufferArray();\n}\n\n/** If sessionStorage is available. */\nfunction hasSessionStorage() {\n try {\n // This can throw, e.g. when being accessed in a sandboxed iframe\n return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nfunction clearSession(replay) {\n deleteSession();\n replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nfunction isSampled(sampleRate) {\n if (sampleRate === undefined) {\n return false;\n }\n\n // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n return Math.random() < sampleRate;\n}\n\n/**\n * Save a session to session storage.\n */\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Get a session with defaults & applied sampling.\n */\nfunction makeSession(session) {\n const now = Date.now();\n const id = session.id || uuid4();\n // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\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\n return {\n id,\n started,\n lastActivity,\n segmentId,\n sampled,\n previousSessionId,\n };\n}\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nfunction createSession(\n { sessionSampleRate, allowBuffering, stickySession = false },\n { previousSessionId } = {},\n) {\n const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n const session = makeSession({\n sampled,\n previousSessionId,\n });\n\n if (stickySession) {\n saveSession(session);\n }\n\n return session;\n}\n\n/**\n * Fetches a session from storage\n */\nfunction fetchSession(traceInternals) {\n if (!hasSessionStorage()) {\n return null;\n }\n\n try {\n // This can throw if cookies are disabled\n const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n if (!sessionStringFromStorage) {\n return null;\n }\n\n const sessionObj = JSON.parse(sessionStringFromStorage) ;\n\n logInfoNextTick('[Replay] Loading existing session', traceInternals);\n\n return makeSession(sessionObj);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nfunction isExpired(\n initialTime,\n expiry,\n targetTime = +new Date(),\n) {\n // Always expired if < 0\n if (initialTime === null || expiry === undefined || expiry < 0) {\n return true;\n }\n\n // Never expires if == 0\n if (expiry === 0) {\n return false;\n }\n\n return initialTime + expiry <= targetTime;\n}\n\n/**\n * Checks to see if session is expired\n */\nfunction isSessionExpired(\n session,\n {\n maxReplayDuration,\n sessionIdleExpire,\n targetTime = Date.now(),\n },\n) {\n return (\n // First, check that maximum session length has not been exceeded\n isExpired(session.started, maxReplayDuration, targetTime) ||\n // 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\n/** If the session should be refreshed or not. */\nfunction shouldRefreshSession(\n session,\n { sessionIdleExpire, maxReplayDuration },\n) {\n // If not expired, all good, just keep the session\n if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n return false;\n }\n\n // If we are buffering & haven't ever flushed yet, always continue\n if (session.sampled === 'buffer' && session.segmentId === 0) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nfunction loadOrCreateSession(\n {\n traceInternals,\n sessionIdleExpire,\n maxReplayDuration,\n previousSessionId,\n }\n\n,\n sessionOptions,\n) {\n const existingSession = sessionOptions.stickySession && fetchSession(traceInternals);\n\n // No session exists yet, just create a new one\n if (!existingSession) {\n logInfoNextTick('[Replay] Creating new session', traceInternals);\n return createSession(sessionOptions, { previousSessionId });\n }\n\n if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n return existingSession;\n }\n\n logInfoNextTick('[Replay] Session in sessionStorage is expired, creating new one...');\n return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nconst ReplayEventTypeCustom = 5;\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n }\n\n void _addEvent(replay, event, isCheckout);\n\n return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n\n return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!replay.eventBuffer) {\n return null;\n }\n\n try {\n if (isCheckout && replay.recordingMode === 'buffer') {\n replay.eventBuffer.clear();\n }\n\n if (isCheckout) {\n replay.eventBuffer.hasCheckout = true;\n }\n\n const replayOptions = replay.getOptions();\n\n const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n if (!eventAfterPossibleCallback) {\n return;\n }\n\n return await replay.eventBuffer.addEvent(eventAfterPossibleCallback);\n } catch (error) {\n const reason = error && error instanceof EventBufferSizeExceededError ? 'addEventSizeExceeded' : 'addEvent';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(error);\n await replay.stop({ reason });\n\n const client = getCurrentHub().getClient();\n\n if (client) {\n client.recordDroppedEvent('internal_sdk_error', 'replay');\n }\n }\n}\n\n/** Exported only for tests. */\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n\n const timestampInMs = timestampToMs(event.timestamp);\n\n // Throw out events that happen more than 5 minutes ago. This can happen if\n // page has been left open and idle for a long period of time and user\n // comes back to trigger a new session. The performance entries rely on\n // `performance.timeOrigin`, which is when the page first opened.\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n }\n\n // Throw out events that are +60min from the initial timestamp\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n logInfo(\n `[Replay] Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`,\n replay.getOptions()._experiments.traceInternals,\n );\n return false;\n }\n\n return true;\n}\n\nfunction maybeApplyCallback(\n event,\n callback,\n) {\n try {\n if (typeof callback === 'function' && isCustomEvent(event)) {\n return callback(event);\n }\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error('[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...', error);\n return null;\n }\n\n return event;\n}\n\n/** If the event is an error event */\nfunction isErrorEvent(event) {\n return !event.type;\n}\n\n/** If the event is a transaction event */\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nfunction isReplayEvent(event) {\n return event.type === 'replay_event';\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleAfterSendEvent(replay) {\n // Custom transports may still be returning `Promise`, which means we cannot expect the status code to be available there\n // TODO (v8): remove this check as it will no longer be necessary\n const enforceStatusCode = isBaseTransportSend();\n\n return (event, sendResponse) => {\n if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n return;\n }\n\n const statusCode = sendResponse && sendResponse.statusCode;\n\n // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n // If not using the base transport, we allow `undefined` response (as a custom transport may not implement this correctly yet)\n // If we do use the base transport, we skip if we encountered an non-OK status code\n if (enforceStatusCode && (!statusCode || statusCode < 200 || statusCode >= 300)) {\n return;\n }\n\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n\n handleErrorEvent(replay, event);\n };\n}\n\nfunction handleTransactionEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Collect traceIds in _context regardless of `recordingMode`\n // In error mode, _context gets cleared on every checkout\n // We limit to max. 100 transactions linked\n if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) {\n replayContext.traceIds.add(event.contexts.trace.trace_id );\n }\n}\n\nfunction handleErrorEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Add error to list of errorIds of replay. This is ok to do even if not\n // sampled because context will get reset at next checkout.\n // XXX: There is also a race condition where it's possible to capture an\n // error to Sentry before Replay SDK has loaded, but response returns after\n // it was loaded, and this gets called.\n // We limit to max. 100 errors linked\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n }\n\n // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n // Need to be very careful that this does not cause an infinite loop\n if (replay.recordingMode === 'buffer' && event.tags && event.tags.replayId) {\n setTimeout(() => {\n // Capture current event buffer as new replay\n void replay.sendBufferedReplayOrFlush();\n });\n }\n}\n\nfunction isBaseTransportSend() {\n const client = getCurrentHub().getClient();\n if (!client) {\n return false;\n }\n\n const transport = client.getTransport();\n if (!transport) {\n return false;\n }\n\n return (\n (transport.send ).__sentry__baseTransport__ || false\n );\n}\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) {\n return false;\n }\n\n // @ts-expect-error this may be set by rrweb when it finds errors\n if (hint.originalException && hint.originalException.__rrweb__) {\n return true;\n }\n\n // Check if any exception originates from rrweb\n return event.exception.values.some(exception => {\n if (!exception.stacktrace || !exception.stacktrace.frames || !exception.stacktrace.frames.length) {\n return false;\n }\n\n return exception.stacktrace.frames.some(frame => frame.filename && frame.filename.includes('/rrweb/src/'));\n });\n}\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `hanldleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== 'buffer') {\n return false;\n }\n\n // ignore this error because otherwise we could loop indefinitely with\n // trying to capture replay and failing\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n }\n\n // Require the event to be an error event & to have an exception\n if (!event.exception || event.type) {\n return false;\n }\n\n return isSampled(replay.getOptions().errorSampleRate);\n}\n\n/**\n * Returns a listener to be added to `addGlobalEventProcessor(listener)`.\n */\nfunction handleGlobalEventListener(\n replay,\n includeAfterSendEventHandling = false,\n) {\n const afterSendHandler = includeAfterSendEventHandling ? handleAfterSendEvent(replay) : undefined;\n\n return Object.assign(\n (event, hint) => {\n // Do nothing if replay has been disabled\n if (!replay.isEnabled()) {\n return event;\n }\n\n if (isReplayEvent(event)) {\n // Replays have separate set of breadcrumbs, do not include breadcrumbs\n // from core SDK\n delete event.breadcrumbs;\n return event;\n }\n\n // We only want to handle errors & transactions, nothing else\n if (!isErrorEvent(event) && !isTransactionEvent(event)) {\n return event;\n }\n\n // Ensure we do not add replay_id if the session is expired\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n return event;\n }\n\n // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Replay] Ignoring error from rrweb internals', event);\n return null;\n }\n\n // When in buffer mode, we decide to sample here.\n // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n // And convert the buffer session to a full session\n const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n // Tag errors if it has been sampled in buffer mode, or if it is session mode\n // Only tag transactions if in session mode\n const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n if (shouldTagReplayId) {\n event.tags = { ...event.tags, replayId: replay.getSessionId() };\n }\n\n // In cases where a custom client is used that does not support the new hooks (yet),\n // we manually call this hook method here\n if (afterSendHandler) {\n // Pretend the error had a 200 response so we always capture it\n afterSendHandler(event, { statusCode: 200 });\n }\n\n return event;\n },\n { id: 'Replay' },\n );\n}\n\n/**\n * Create a \"span\" for each performance entry.\n */\nfunction createPerformanceSpans(\n replay,\n entries,\n) {\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\n // If response is a string, it means its either THROTTLED or SKIPPED\n return typeof response === 'string' ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n const { from, to } = handlerData;\n\n const now = Date.now() / 1000;\n\n return {\n type: 'navigation.push',\n start: now,\n end: now,\n name: to,\n data: {\n previous: from,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('history', listener)`.\n */\nfunction handleHistorySpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleHistory(handlerData);\n\n if (result === null) {\n return;\n }\n\n // Need to collect visited URLs\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning false to flush\n return false;\n });\n };\n}\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nfunction shouldFilterRequest(replay, url) {\n // If we enabled the `traceInternals` experiment, we want to trace everything\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n\n return isSentryRequestUrl(url, getCurrentHub());\n}\n\n/** Add a performance entry breadcrumb */\nfunction addNetworkBreadcrumb(\n replay,\n result,\n) {\n if (!replay.isEnabled()) {\n return;\n }\n\n if (result === null) {\n return;\n }\n\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning true will cause `addUpdate` to not flush\n // We do not want network requests to cause a flush. This will prevent\n // recurring/polling requests from keeping the replay session alive.\n return true;\n });\n}\n\n/** only exported for tests */\nfunction handleFetch(handlerData) {\n const { startTimestamp, endTimestamp, fetchData, response } = handlerData;\n\n if (!endTimestamp) {\n return null;\n }\n\n // This is only used as a fallback, so we know the body sizes are never set here\n const { method, url } = fetchData;\n\n return {\n type: 'resource.fetch',\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: {\n method,\n statusCode: response ? (response ).status : undefined,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('fetch', listener)`.\n */\nfunction handleFetchSpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleFetch(handlerData);\n\n addNetworkBreadcrumb(replay, result);\n };\n}\n\n/** only exported for tests */\nfunction handleXhr(handlerData) {\n const { startTimestamp, endTimestamp, xhr } = handlerData;\n\n const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return null;\n }\n\n // This is only used as a fallback, so we know the body sizes are never set here\n const { method, url, status_code: statusCode } = sentryXhrData;\n\n if (url === undefined) {\n return null;\n }\n\n return {\n type: 'resource.xhr',\n name: url,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n data: {\n method,\n statusCode,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('xhr', listener)`.\n */\nfunction handleXhrSpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleXhr(handlerData);\n\n addNetworkBreadcrumb(replay, result);\n };\n}\n\nconst OBJ = 10;\nconst OBJ_KEY = 11;\nconst OBJ_KEY_STR = 12;\nconst OBJ_VAL = 13;\nconst OBJ_VAL_STR = 14;\nconst OBJ_VAL_COMPLETED = 15;\n\nconst ARR = 20;\nconst ARR_VAL = 21;\nconst ARR_VAL_STR = 22;\nconst ARR_VAL_COMPLETED = 23;\n\nconst ALLOWED_PRIMITIVES = ['true', 'false', 'null'];\n\n/**\n * Complete an incomplete JSON string.\n * This will ensure that the last element always has a `\"~~\"` to indicate it was truncated.\n * For example, `[1,2,` will be completed to `[1,2,\"~~\"]`\n * and `{\"aa\":\"b` will be completed to `{\"aa\":\"b~~\"}`\n */\nfunction completeJson(incompleteJson, stack) {\n if (!stack.length) {\n return incompleteJson;\n }\n\n let json = incompleteJson;\n\n // Most checks are only needed for the last step in the stack\n const lastPos = stack.length - 1;\n const lastStep = stack[lastPos];\n\n json = _fixLastStep(json, lastStep);\n\n // Complete remaining steps - just add closing brackets\n for (let i = lastPos; i >= 0; i--) {\n const step = stack[i];\n\n switch (step) {\n case OBJ:\n json = `${json}}`;\n break;\n case ARR:\n json = `${json}]`;\n break;\n }\n }\n\n return json;\n}\n\nfunction _fixLastStep(json, lastStep) {\n switch (lastStep) {\n // Object cases\n case OBJ:\n return `${json}\"~~\":\"~~\"`;\n case OBJ_KEY:\n return `${json}:\"~~\"`;\n case OBJ_KEY_STR:\n return `${json}~~\":\"~~\"`;\n case OBJ_VAL:\n return _maybeFixIncompleteObjValue(json);\n case OBJ_VAL_STR:\n return `${json}~~\"`;\n case OBJ_VAL_COMPLETED:\n return `${json},\"~~\":\"~~\"`;\n\n // Array cases\n case ARR:\n return `${json}\"~~\"`;\n case ARR_VAL:\n return _maybeFixIncompleteArrValue(json);\n case ARR_VAL_STR:\n return `${json}~~\"`;\n case ARR_VAL_COMPLETED:\n return `${json},\"~~\"`;\n }\n\n return json;\n}\n\nfunction _maybeFixIncompleteArrValue(json) {\n const pos = _findLastArrayDelimiter(json);\n\n if (pos > -1) {\n const part = json.slice(pos + 1);\n\n if (ALLOWED_PRIMITIVES.includes(part.trim())) {\n return `${json},\"~~\"`;\n }\n\n // Everything else is replaced with `\"~~\"`\n return `${json.slice(0, pos + 1)}\"~~\"`;\n }\n\n // fallback, this shouldn't happen, to be save\n return json;\n}\n\nfunction _findLastArrayDelimiter(json) {\n for (let i = json.length - 1; i >= 0; i--) {\n const char = json[i];\n\n if (char === ',' || char === '[') {\n return i;\n }\n }\n\n return -1;\n}\n\nfunction _maybeFixIncompleteObjValue(json) {\n const startPos = json.lastIndexOf(':');\n\n const part = json.slice(startPos + 1);\n\n if (ALLOWED_PRIMITIVES.includes(part.trim())) {\n return `${json},\"~~\":\"~~\"`;\n }\n\n // Everything else is replaced with `\"~~\"`\n // This also means we do not have incomplete numbers, e.g `[1` is replaced with `[\"~~\"]`\n return `${json.slice(0, startPos + 1)}\"~~\"`;\n}\n\n/**\n * Evaluate an (incomplete) JSON string.\n */\nfunction evaluateJson(json) {\n const stack = [];\n\n for (let pos = 0; pos < json.length; pos++) {\n _evaluateJsonPos(stack, json, pos);\n }\n\n return stack;\n}\n\nfunction _evaluateJsonPos(stack, json, pos) {\n const curStep = stack[stack.length - 1];\n\n const char = json[pos];\n\n const whitespaceRegex = /\\s/;\n\n if (whitespaceRegex.test(char)) {\n return;\n }\n\n if (char === '\"' && !_isEscaped(json, pos)) {\n _handleQuote(stack, curStep);\n return;\n }\n\n switch (char) {\n case '{':\n _handleObj(stack, curStep);\n break;\n case '[':\n _handleArr(stack, curStep);\n break;\n case ':':\n _handleColon(stack, curStep);\n break;\n case ',':\n _handleComma(stack, curStep);\n break;\n case '}':\n _handleObjClose(stack, curStep);\n break;\n case ']':\n _handleArrClose(stack, curStep);\n break;\n }\n}\n\nfunction _handleQuote(stack, curStep) {\n // End of obj value\n if (curStep === OBJ_VAL_STR) {\n stack.pop();\n stack.push(OBJ_VAL_COMPLETED);\n return;\n }\n\n // End of arr value\n if (curStep === ARR_VAL_STR) {\n stack.pop();\n stack.push(ARR_VAL_COMPLETED);\n return;\n }\n\n // Start of obj value\n if (curStep === OBJ_VAL) {\n stack.push(OBJ_VAL_STR);\n return;\n }\n\n // Start of arr value\n if (curStep === ARR_VAL) {\n stack.push(ARR_VAL_STR);\n return;\n }\n\n // Start of obj key\n if (curStep === OBJ) {\n stack.push(OBJ_KEY_STR);\n return;\n }\n\n // End of obj key\n if (curStep === OBJ_KEY_STR) {\n stack.pop();\n stack.push(OBJ_KEY);\n return;\n }\n}\n\nfunction _handleObj(stack, curStep) {\n // Initial object\n if (!curStep) {\n stack.push(OBJ);\n return;\n }\n\n // New object as obj value\n if (curStep === OBJ_VAL) {\n stack.push(OBJ);\n return;\n }\n\n // New object as array element\n if (curStep === ARR_VAL) {\n stack.push(OBJ);\n }\n\n // New object as first array element\n if (curStep === ARR) {\n stack.push(OBJ);\n return;\n }\n}\n\nfunction _handleArr(stack, curStep) {\n // Initial array\n if (!curStep) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n\n // New array as obj value\n if (curStep === OBJ_VAL) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n\n // New array as array element\n if (curStep === ARR_VAL) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n }\n\n // New array as first array element\n if (curStep === ARR) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n}\n\nfunction _handleColon(stack, curStep) {\n if (curStep === OBJ_KEY) {\n stack.pop();\n stack.push(OBJ_VAL);\n }\n}\n\nfunction _handleComma(stack, curStep) {\n // Comma after obj value\n if (curStep === OBJ_VAL) {\n stack.pop();\n return;\n }\n if (curStep === OBJ_VAL_COMPLETED) {\n // Pop OBJ_VAL_COMPLETED & OBJ_VAL\n stack.pop();\n stack.pop();\n return;\n }\n\n // Comma after arr value\n if (curStep === ARR_VAL) {\n // do nothing - basically we'd pop ARR_VAL but add it right back\n return;\n }\n\n if (curStep === ARR_VAL_COMPLETED) {\n // Pop ARR_VAL_COMPLETED\n stack.pop();\n\n // basically we'd pop ARR_VAL but add it right back\n return;\n }\n}\n\nfunction _handleObjClose(stack, curStep) {\n // Empty object {}\n if (curStep === OBJ) {\n stack.pop();\n }\n\n // Object with element\n if (curStep === OBJ_VAL) {\n // Pop OBJ_VAL, OBJ\n stack.pop();\n stack.pop();\n }\n\n // Obj with element\n if (curStep === OBJ_VAL_COMPLETED) {\n // Pop OBJ_VAL_COMPLETED, OBJ_VAL, OBJ\n stack.pop();\n stack.pop();\n stack.pop();\n }\n\n // if was obj value, complete it\n if (stack[stack.length - 1] === OBJ_VAL) {\n stack.push(OBJ_VAL_COMPLETED);\n }\n\n // if was arr value, complete it\n if (stack[stack.length - 1] === ARR_VAL) {\n stack.push(ARR_VAL_COMPLETED);\n }\n}\n\nfunction _handleArrClose(stack, curStep) {\n // Empty array []\n if (curStep === ARR) {\n stack.pop();\n }\n\n // Array with element\n if (curStep === ARR_VAL) {\n // Pop ARR_VAL, ARR\n stack.pop();\n stack.pop();\n }\n\n // Array with element\n if (curStep === ARR_VAL_COMPLETED) {\n // Pop ARR_VAL_COMPLETED, ARR_VAL, ARR\n stack.pop();\n stack.pop();\n stack.pop();\n }\n\n // if was obj value, complete it\n if (stack[stack.length - 1] === OBJ_VAL) {\n stack.push(OBJ_VAL_COMPLETED);\n }\n\n // if was arr value, complete it\n if (stack[stack.length - 1] === ARR_VAL) {\n stack.push(ARR_VAL_COMPLETED);\n }\n}\n\nfunction _isEscaped(str, pos) {\n const previousChar = str[pos - 1];\n\n return previousChar === '\\\\' && !_isEscaped(str, pos - 1);\n}\n\n/* eslint-disable max-lines */\n\n/**\n * Takes an incomplete JSON string, and returns a hopefully valid JSON string.\n * Note that this _can_ fail, so you should check the return value is valid JSON.\n */\nfunction fixJson(incompleteJson) {\n const stack = evaluateJson(incompleteJson);\n\n return completeJson(incompleteJson, stack);\n}\n\n/** Get the size of a body. */\nfunction getBodySize(\n body,\n textEncoder,\n) {\n if (!body) {\n return undefined;\n }\n\n try {\n if (typeof body === 'string') {\n return textEncoder.encode(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = _serializeFormData(body);\n return textEncoder.encode(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch (e) {\n // just return undefined\n }\n\n return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined. */\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\n/** Get the string representation of a body. */\nfunction getBodyString(body) {\n if (typeof body === 'string') {\n return body;\n }\n\n if (body instanceof URLSearchParams) {\n return body.toString();\n }\n\n if (body instanceof FormData) {\n return _serializeFormData(body);\n }\n\n return undefined;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nfunction makeNetworkReplayBreadcrumb(\n type,\n data,\n) {\n if (!data) {\n return null;\n }\n\n const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n const result = {\n type,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: dropUndefinedKeys({\n method,\n statusCode,\n request,\n response,\n }),\n };\n\n return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: ['URL_SKIPPED'],\n },\n };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nfunction buildNetworkRequestOrResponse(\n headers,\n bodySize,\n body,\n) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return undefined;\n }\n\n if (!bodySize) {\n return {\n headers,\n };\n }\n\n if (!body) {\n return {\n headers,\n size: bodySize,\n };\n }\n\n const info = {\n headers,\n size: bodySize,\n };\n\n const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n info.body = normalizedBody;\n if (warnings.length > 0) {\n info._meta = {\n warnings,\n };\n }\n\n return info;\n}\n\n/** Filter a set of headers */\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.keys(headers).reduce((filteredHeaders, key) => {\n const normalizedKey = key.toLowerCase();\n // Avoid putting empty strings into the headers\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = headers[key];\n }\n return filteredHeaders;\n }, {});\n}\n\nfunction _serializeFormData(formData) {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams actually works\n return new URLSearchParams(formData).toString();\n}\n\nfunction normalizeNetworkBody(body)\n\n {\n if (!body || typeof body !== 'string') {\n return {\n body,\n warnings: [],\n };\n }\n\n const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n\n if (_strIsProbablyJson(body)) {\n try {\n const json = exceedsSizeLimit ? fixJson(body.slice(0, NETWORK_BODY_MAX_SIZE)) : body;\n const normalizedBody = JSON.parse(json);\n return {\n body: normalizedBody,\n warnings: exceedsSizeLimit ? ['JSON_TRUNCATED'] : [],\n };\n } catch (e3) {\n return {\n body: exceedsSizeLimit ? `${body.slice(0, NETWORK_BODY_MAX_SIZE)}…` : body,\n warnings: exceedsSizeLimit ? ['INVALID_JSON', 'TEXT_TRUNCATED'] : ['INVALID_JSON'],\n };\n }\n }\n\n return {\n body: exceedsSizeLimit ? `${body.slice(0, NETWORK_BODY_MAX_SIZE)}…` : body,\n warnings: exceedsSizeLimit ? ['TEXT_TRUNCATED'] : [],\n };\n}\n\nfunction _strIsProbablyJson(str) {\n const first = str[0];\n const last = str[str.length - 1];\n\n // Simple check: If this does not start & end with {} or [], it's not JSON\n return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nfunction urlMatches(url, urls) {\n const fullUrl = getFullUrl(url);\n\n return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nfunction getFullUrl(url, baseURI = WINDOW.document.baseURI) {\n // Short circuit for common cases:\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\n // If these do not match, we are not dealing with a relative URL, so just return it\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n\n const fullUrl = fixedUrl.href;\n\n // Remove trailing slashes, if they don't match the original URL\n if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n return fullUrl.slice(0, -1);\n }\n\n return fullUrl;\n}\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\nasync function captureFetchBreadcrumbToReplay(\n breadcrumb,\n hint,\n options\n\n,\n) {\n try {\n const data = await _prepareFetchData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Failed to capture fetch breadcrumb', error);\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichFetchBreadcrumb(\n breadcrumb,\n hint,\n options,\n) {\n const { input, response } = hint;\n\n const body = _getFetchRequestArgBody(input);\n const reqSize = getBodySize(body, options.textEncoder);\n\n const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nasync function _prepareFetchData(\n breadcrumb,\n hint,\n options\n\n,\n) {\n const { startTimestamp, endTimestamp } = hint;\n\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\n const captureDetails =\n urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n const request = captureDetails\n ? _getRequestInfo(options, hint.input, requestBodySize)\n : buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction _getRequestInfo(\n { networkCaptureBodies, networkRequestHeaders },\n input,\n requestBodySize,\n) {\n const headers = getRequestHeaders(input, networkRequestHeaders);\n\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n }\n\n // We only want to transmit string or string-like bodies\n const requestBody = _getFetchRequestArgBody(input);\n const bodyStr = getBodyString(requestBody);\n return buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n}\n\nasync function _getResponseInfo(\n captureDetails,\n {\n networkCaptureBodies,\n textEncoder,\n networkResponseHeaders,\n }\n\n,\n response,\n responseBodySize,\n) {\n if (!captureDetails && responseBodySize !== undefined) {\n return buildSkippedNetworkRequestOrResponse(responseBodySize);\n }\n\n const headers = getAllHeaders(response.headers, networkResponseHeaders);\n\n if (!networkCaptureBodies && responseBodySize !== undefined) {\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n\n // Only clone the response if we need to\n try {\n // We have to clone this, as the body can only be read once\n const res = response.clone();\n const bodyText = await _parseFetchBody(res);\n\n const size =\n bodyText && bodyText.length && responseBodySize === undefined\n ? getBodySize(bodyText, textEncoder)\n : responseBodySize;\n\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n\n return buildNetworkRequestOrResponse(headers, size, undefined);\n } catch (e) {\n // fallback\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n}\n\nasync function _parseFetchBody(response) {\n try {\n return await response.text();\n } catch (e2) {\n return undefined;\n }\n}\n\nfunction _getFetchRequestArgBody(fetchArgs = []) {\n // We only support getting the body from the fetch options\n if (fetchArgs.length !== 2 || typeof fetchArgs[1] !== 'object') {\n return undefined;\n }\n\n return (fetchArgs[1] ).body;\n}\n\nfunction getAllHeaders(headers, allowedHeaders) {\n const allHeaders = {};\n\n allowedHeaders.forEach(header => {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header) ;\n }\n });\n\n return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n return getHeadersFromOptions(fetchArgs[0] , allowedHeaders);\n }\n\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1] , allowedHeaders);\n }\n\n return {};\n}\n\nfunction getHeadersFromOptions(\n input,\n allowedHeaders,\n) {\n if (!input) {\n return {};\n }\n\n const headers = input.headers;\n\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n }\n\n // We do not support this, as it is not really documented (anymore?)\n if (Array.isArray(headers)) {\n return {};\n }\n\n return getAllowedHeaders(headers, allowedHeaders);\n}\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\nasync function captureXhrBreadcrumbToReplay(\n breadcrumb,\n hint,\n options,\n) {\n try {\n const data = _prepareXhrData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Failed to capture fetch breadcrumb', error);\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichXhrBreadcrumb(\n breadcrumb,\n hint,\n options,\n) {\n const { xhr, input } = hint;\n\n const reqSize = getBodySize(input, options.textEncoder);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : getBodySize(xhr.response, options.textEncoder);\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareXhrData(\n breadcrumb,\n hint,\n options,\n) {\n const { startTimestamp, endTimestamp, input, xhr } = hint;\n\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\n if (!url) {\n return null;\n }\n\n if (!urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n }\n\n const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n const networkRequestHeaders = xhrInfo\n ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n : {};\n const networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options.networkResponseHeaders);\n\n const request = buildNetworkRequestOrResponse(\n networkRequestHeaders,\n requestBodySize,\n options.networkCaptureBodies ? getBodyString(input) : undefined,\n );\n const response = buildNetworkRequestOrResponse(\n networkResponseHeaders,\n responseBodySize,\n options.networkCaptureBodies ? hint.xhr.responseText : undefined,\n );\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction getResponseHeaders(xhr) {\n const headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce((acc, line) => {\n const [key, value] = line.split(': ');\n acc[key.toLowerCase()] = value;\n return acc;\n }, {});\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n * (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nfunction handleNetworkBreadcrumbs(replay) {\n const client = getCurrentHub().getClient();\n\n try {\n const textEncoder = new TextEncoder();\n\n const {\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n } = replay.getOptions();\n\n const options = {\n replay,\n textEncoder,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n };\n\n if (client && client.on) {\n client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n } else {\n // Fallback behavior\n addInstrumentationHandler('fetch', handleFetchSpanListener(replay));\n addInstrumentationHandler('xhr', handleXhrSpanListener(replay));\n }\n } catch (e2) {\n // Do nothing\n }\n}\n\n/** just exported for tests */\nfunction beforeAddNetworkBreadcrumb(\n options,\n breadcrumb,\n hint,\n) {\n if (!breadcrumb.data) {\n return;\n }\n\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichXhrBreadcrumb(breadcrumb, hint, options);\n\n void captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichFetchBreadcrumb(breadcrumb, hint, options);\n\n void captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Error when enriching network breadcrumb');\n }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint) {\n return hint && hint.xhr;\n}\n\nfunction _isFetchHint(hint) {\n return hint && hint.response;\n}\n\nlet _LAST_BREADCRUMB = null;\n\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\nconst handleScopeListener =\n (replay) =>\n (scope) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleScope(scope);\n\n if (!result) {\n return;\n }\n\n addBreadcrumbEvent(replay, result);\n };\n\n/**\n * An event handler to handle scope changes.\n */\nfunction handleScope(scope) {\n // TODO (v8): Remove this guard. This was put in place because we introduced\n // Scope.getLastBreadcrumb mid-v7 which caused incompatibilities with older SDKs.\n // For now, we'll just return null if the method doesn't exist but we should eventually\n // get rid of this guard.\n const newBreadcrumb = scope.getLastBreadcrumb && scope.getLastBreadcrumb();\n\n // Listener can be called when breadcrumbs have not changed, so we store the\n // reference to the last crumb and only return a crumb if it has changed\n if (_LAST_BREADCRUMB === newBreadcrumb || !newBreadcrumb) {\n return null;\n }\n\n _LAST_BREADCRUMB = newBreadcrumb;\n\n if (\n !isBreadcrumbWithCategory(newBreadcrumb) ||\n ['fetch', 'xhr', 'sentry.event', 'sentry.transaction'].includes(newBreadcrumb.category) ||\n newBreadcrumb.category.startsWith('ui.')\n ) {\n return null;\n }\n\n if (newBreadcrumb.category === 'console') {\n return normalizeConsoleBreadcrumb(newBreadcrumb);\n }\n\n return createBreadcrumb(newBreadcrumb);\n}\n\n/** exported for tests only */\nfunction normalizeConsoleBreadcrumb(\n breadcrumb,\n) {\n const args = breadcrumb.data && breadcrumb.data.arguments;\n\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n\n let isTruncated = false;\n\n // Avoid giant args captures\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)}…`;\n }\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 const fixedJson = fixJson(stringified.slice(0, CONSOLE_ARG_MAX_SIZE));\n const json = JSON.parse(fixedJson);\n // We only set this after JSON.parse() was successfull, so we know we didn't run into `catch`\n isTruncated = true;\n return json;\n }\n return normalizedArg;\n } catch (e) {\n // fall back to default\n }\n }\n\n return arg;\n });\n\n return createBreadcrumb({\n ...breadcrumb,\n data: {\n ...breadcrumb.data,\n arguments: normalizedArgs,\n ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n },\n });\n}\n\n/**\n * Add global listeners that cannot be removed.\n */\nfunction addGlobalListeners(replay) {\n // Listeners from core SDK //\n const scope = getCurrentHub().getScope();\n const client = getCurrentHub().getClient();\n\n scope.addScopeListener(handleScopeListener(replay));\n addInstrumentationHandler('dom', handleDomListener(replay));\n addInstrumentationHandler('history', handleHistorySpanListener(replay));\n handleNetworkBreadcrumbs(replay);\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n const eventProcessor = handleGlobalEventListener(replay, !hasHooks(client));\n if (client && client.addEventProcessor) {\n client.addEventProcessor(eventProcessor);\n } else {\n addGlobalEventProcessor(eventProcessor);\n }\n\n // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n if (hasHooks(client)) {\n client.on('afterSendEvent', handleAfterSendEvent(replay));\n client.on('createDsc', (dsc) => {\n const replayId = replay.getSessionId();\n // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n dsc.replay_id = replayId;\n }\n });\n\n client.on('startTransaction', transaction => {\n replay.lastTransaction = transaction;\n });\n\n // We may be missing the initial startTransaction due to timing issues,\n // so we capture it on finish again.\n client.on('finishTransaction', transaction => {\n replay.lastTransaction = transaction;\n });\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction hasHooks(client) {\n return !!(client && client.on);\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nasync function addMemoryEntry(replay) {\n // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\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 (error) {\n // Do nothing\n return [];\n }\n}\n\nfunction createMemoryEntry(memoryEntry) {\n const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n // we don't want to use `getAbsoluteTime` because it adds the event time to the\n // time origin, so we get the current timestamp instead\n const time = Date.now() / 1000;\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\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n * debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n * was already invoked in the meantime, return @param func's return value.\n * The debounced function has two additional properties:\n * - `flush`: Invokes the debounced function immediately and returns its return value\n * - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nfunction debounce(func, wait, options) {\n let callbackReturnValue;\n\n let timerId;\n let maxTimerId;\n\n const maxWait = options && options.maxWait ? Math.max(options.maxWait, wait) : 0;\n\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n\n function cancelTimers() {\n timerId !== undefined && clearTimeout(timerId);\n maxTimerId !== undefined && clearTimeout(maxTimerId);\n timerId = maxTimerId = undefined;\n }\n\n function flush() {\n if (timerId !== undefined || maxTimerId !== undefined) {\n return invokeFunc();\n }\n return callbackReturnValue;\n }\n\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(invokeFunc, wait);\n\n if (maxWait && maxTimerId === undefined) {\n maxTimerId = setTimeout(invokeFunc, maxWait);\n }\n\n return callbackReturnValue;\n }\n\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nfunction getHandleRecordingEmit(replay) {\n let hadFirstEvent = false;\n\n return (event, _isCheckout) => {\n // If this is false, it means session is expired, create and a new session and wait for checkout\n if (!replay.checkAndHandleExpiredSession()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Replay] Received replay event after session expired.');\n\n return;\n }\n\n // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n // We also want to treat the first event as a checkout, so we handle this specifically here\n const isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n\n // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n replay.addUpdate(() => {\n // The session is always started immediately on pageload/init, but for\n // error-only replays, it should reflect the most recent checkout\n // when an error occurs. Clear any state that happens before this current\n // checkout. This needs to happen before `addEvent()` which updates state\n // dependent on this reset.\n if (replay.recordingMode === 'buffer' && isCheckout) {\n replay.setInitialState();\n }\n\n // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n // Skip all further steps\n if (!addEventSync(replay, event, isCheckout)) {\n // Return true to skip scheduling a debounced flush\n return true;\n }\n\n // Different behavior for full snapshots (type=2), ignore other event types\n // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n if (!isCheckout) {\n return false;\n }\n\n // Additionally, create a meta event that will capture certain SDK settings.\n // In order to handle buffer mode, this needs to either be done when we\n // receive checkout events or at flush time.\n //\n // `isCheckout` is always true, but want to be explicit that it should\n // only be added for checkouts\n addSettingsEvent(replay, isCheckout);\n\n // If there is a previousSessionId after a full snapshot occurs, then\n // the replay session was started due to session expiration. The new session\n // is started before triggering a new checkout and contains the id\n // of the previous session. Do not immediately flush in this case\n // to avoid capturing only the checkout and instead the replay will\n // be captured if they perform any follow-up actions.\n if (replay.session && replay.session.previousSessionId) {\n return true;\n }\n\n // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n // this should usually be the timestamp of the checkout event, but to be safe...\n if (replay.recordingMode === 'buffer' && replay.session && replay.eventBuffer) {\n const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n if (earliestEvent) {\n logInfo(\n `[Replay] Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`,\n replay.getOptions()._experiments.traceInternals,\n );\n\n replay.session.started = earliestEvent;\n\n if (replay.getOptions().stickySession) {\n saveSession(replay.session);\n }\n }\n }\n\n if (replay.recordingMode === 'session') {\n // If the full snapshot is due to an initial load, we will not have\n // a previous session ID. In this case, we want to buffer events\n // for a set amount of time before flushing. This can help avoid\n // capturing replays of users that immediately close the window.\n void replay.flush();\n }\n\n return true;\n });\n };\n}\n\n/**\n * Exported for tests\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 sessionSampleRate: options.sessionSampleRate,\n errorSampleRate: options.errorSampleRate,\n useCompressionOption: options.useCompression,\n blockAllMedia: options.blockAllMedia,\n maskAllText: options.maskAllText,\n maskAllInputs: options.maskAllInputs,\n useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n networkCaptureBodies: options.networkCaptureBodies,\n networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n },\n },\n };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay, isCheckout) {\n // Only need to add this event when sending the first segment\n if (!isCheckout || !replay.session || replay.session.segmentId !== 0) {\n return;\n }\n\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nfunction createReplayEnvelope(\n replayEvent,\n recordingData,\n dsn,\n tunnel,\n) {\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:\n typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n },\n recordingData,\n ],\n ],\n );\n}\n\n/**\n * Prepare the recording data ready to be sent.\n */\nfunction prepareRecordingData({\n recordingData,\n headers,\n}\n\n) {\n let payloadWithSequence;\n\n // XXX: newline is needed to separate sequence id from events\n const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n if (typeof recordingData === 'string') {\n payloadWithSequence = `${replayHeaders}${recordingData}`;\n } else {\n const enc = new TextEncoder();\n // XXX: newline is needed to separate sequence id from events\n const sequence = enc.encode(replayHeaders);\n // Merge the two Uint8Arrays\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n\n return payloadWithSequence;\n}\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nasync function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event,\n}\n\n) {\n const integrations =\n typeof client._integrations === 'object' && client._integrations !== null && !Array.isArray(client._integrations)\n ? Object.keys(client._integrations)\n : undefined;\n\n const eventHint = { event_id, integrations };\n\n if (client.emit) {\n client.emit('preprocessEvent', event, eventHint);\n }\n\n const preparedEvent = (await prepareEvent(\n client.getOptions(),\n event,\n eventHint,\n scope,\n client,\n )) ;\n\n // If e.g. a global event processor returned null\n if (!preparedEvent) {\n return null;\n }\n\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n const metadata = client.getSdkMetadata && client.getSdkMetadata();\n const { name, version } = (metadata && metadata.sdk) || {};\n\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0',\n };\n\n return preparedEvent;\n}\n\n/**\n * Send replay attachment using `fetch()`\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\n const { urls, errorIds, traceIds, initialTimestamp } = eventContext;\n\n const hub = getCurrentHub();\n const client = hub.getClient();\n const scope = hub.getScope();\n const transport = client && client.getTransport();\n const dsn = client && client.getDsn();\n\n if (!client || !transport || !dsn || !session.sampled) {\n return;\n }\n\n const baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1000,\n timestamp: timestamp / 1000,\n error_ids: errorIds,\n trace_ids: traceIds,\n urls,\n replay_id: replayId,\n segment_id,\n replay_type: session.sampled,\n };\n\n const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n if (!replayEvent) {\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'replay', baseEvent);\n logInfo('An event processor returned `null`, will not send event.');\n return;\n }\n\n /*\n For reference, the fully built event looks something like this:\n {\n \"type\": \"replay_event\",\n \"timestamp\": 1670837008.634,\n \"error_ids\": [\n \"errorId\"\n ],\n \"trace_ids\": [\n \"traceId\"\n ],\n \"urls\": [\n \"https://example.com\"\n ],\n \"replay_id\": \"eventId\",\n \"segment_id\": 3,\n \"replay_type\": \"error\",\n \"platform\": \"javascript\",\n \"event_id\": \"eventId\",\n \"environment\": \"production\",\n \"sdk\": {\n \"integrations\": [\n \"BrowserTracing\",\n \"Replay\"\n ],\n \"name\": \"sentry.javascript.browser\",\n \"version\": \"7.25.0\"\n },\n \"sdkProcessingMetadata\": {},\n \"contexts\": {\n },\n }\n */\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete replayEvent.sdkProcessingMetadata;\n\n const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n let response;\n\n try {\n response = await transport.send(envelope);\n } catch (err) {\n const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n throw error;\n }\n\n // TODO (v8): we can remove this guard once transport.send's type signature doesn't include void anymore\n if (!response) {\n return response;\n }\n\n // If the status code is invalid, we want to immediately stop & not retry\n if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n throw new TransportStatusCodeError(response.statusCode);\n }\n\n return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nclass TransportStatusCodeError extends Error {\n constructor(statusCode) {\n super(`Transport returned status code ${statusCode}`);\n }\n}\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nasync function sendReplay(\n replayData,\n retryConfig = {\n count: 0,\n interval: RETRY_BASE_INTERVAL,\n },\n) {\n const { recordingData, options } = replayData;\n\n // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n if (!recordingData.length) {\n return;\n }\n\n try {\n await sendReplayRequest(replayData);\n return true;\n } catch (err) {\n if (err instanceof TransportStatusCodeError) {\n throw err;\n }\n\n // Capture error for every failed replay\n setContext('Replays', {\n _retryCount: retryConfig.count,\n });\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && options._experiments && options._experiments.captureExceptions) {\n captureException(err);\n }\n\n // If an error happened here, it's likely that uploading the attachment\n // failed, we'll can retry with the same events payload\n if (retryConfig.count >= RETRY_MAX_COUNT) {\n const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n\n throw error;\n }\n\n // will retry in intervals of 5, 10, 30\n retryConfig.interval *= ++retryConfig.count;\n\n return new Promise((resolve, reject) => {\n setTimeout(async () => {\n try {\n await sendReplay(replayData, retryConfig);\n resolve(true);\n } catch (err) {\n reject(err);\n }\n }, retryConfig.interval);\n });\n }\n}\n\nconst THROTTLED = '__THROTTLED';\nconst SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction throttle(\n fn,\n maxCount,\n durationSeconds,\n) {\n const counter = new Map();\n\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\n const _getTotalCount = () => {\n return [...counter.values()].reduce((a, b) => a + b, 0);\n };\n\n let isThrottled = false;\n\n return (...rest) => {\n // Date in second-precision, which we use as basis for the throttling\n const now = Math.floor(Date.now() / 1000);\n\n // First, make sure to delete any old entries\n _cleanup(now);\n\n // If already over limit, do nothing\n if (_getTotalCount() >= maxCount) {\n const wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n\n isThrottled = false;\n const count = counter.get(now) || 0;\n counter.set(now, count + 1);\n\n return fn(...rest);\n };\n}\n\n/* eslint-disable max-lines */ // TODO: We might want to split this file up\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nclass ReplayContainer {\n\n /**\n * Recording can happen in one of three modes:\n * - session: Record the whole session, sending it continuously\n * - buffer: Always keep the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n\n /**\n * The current or last active transcation.\n * This is only available when performance is enabled.\n */\n\n /**\n * These are here so we can overwrite them in tests etc.\n * @hidden\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Timestamp of the last user activity. This lives across sessions.\n */\n\n /**\n * Is the integration currently active?\n */\n\n /**\n * Paused is a state where:\n * - DOM Recording is not listening at all\n * - Nothing will be added to event buffer (e.g. core SDK events)\n */\n\n /**\n * Have we attached listeners to the core SDK?\n * Note we have to track this as there is no way to remove instrumentation handlers.\n */\n\n /**\n * Function to stop recording\n */\n\n constructor({\n options,\n recordingOptions,\n }\n\n) {ReplayContainer.prototype.__init.call(this);ReplayContainer.prototype.__init2.call(this);ReplayContainer.prototype.__init3.call(this);ReplayContainer.prototype.__init4.call(this);ReplayContainer.prototype.__init5.call(this);ReplayContainer.prototype.__init6.call(this);\n this.eventBuffer = null;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this.recordingMode = 'session';\n this.timeouts = {\n sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n } ;\n this._lastActivity = Date.now();\n this._isEnabled = false;\n this._isPaused = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: new Set(),\n traceIds: new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: '',\n };\n\n this._recordingOptions = recordingOptions;\n this._options = options;\n\n this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay,\n });\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\n const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n const slowClickConfig = slowClickTimeout\n ? {\n threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n timeout: slowClickTimeout,\n scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n }\n : undefined;\n\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n }\n\n /** Get the event context. */\n getContext() {\n return this._context;\n }\n\n /** If recording is currently enabled. */\n isEnabled() {\n return this._isEnabled;\n }\n\n /** If recording is currently paused. */\n isPaused() {\n return this._isPaused;\n }\n\n /** Get the replay integration options. */\n getOptions() {\n return this._options;\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\n // If neither sample rate is > 0, then do nothing - user will need to call one of\n // `start()` or `startBuffering` themselves.\n if (errorSampleRate <= 0 && sessionSampleRate <= 0) {\n return;\n }\n\n // Otherwise if there is _any_ sample rate set, try to load an existing\n // session, or create a new one.\n this._initializeSessionForSampling(previousSessionId);\n\n if (!this.session) {\n // This should not happen, something wrong has occurred\n this._handleException(new Error('Unable to initialize and create session'));\n return;\n }\n\n if (this.session.sampled === false) {\n // This should only occur if `errorSampleRate` is 0 and was unsampled for\n // session-based replay. In this case there is nothing to do.\n return;\n }\n\n // If segmentId > 0, it means we've previously already captured this session\n // In this case, we still want to continue in `session` recording mode\n this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n logInfoNextTick(\n `[Replay] Starting replay in ${this.recordingMode} mode`,\n this._options._experiments.traceInternals,\n );\n\n this._initializeRecording();\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * _performanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (this._isEnabled && this.recordingMode === 'session') {\n throw new Error('Replay recording is already in progress');\n }\n\n if (this._isEnabled && this.recordingMode === 'buffer') {\n throw new Error('Replay buffering is in progress, call `flush()` to save the replay');\n }\n\n logInfoNextTick('[Replay] Starting replay in session mode', this._options._experiments.traceInternals);\n\n const session = loadOrCreateSession(\n {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n traceInternals: this._options._experiments.traceInternals,\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\n this.session = session;\n\n this._initializeRecording();\n }\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 throw new Error('Replay recording is already in progress');\n }\n\n logInfoNextTick('[Replay] Starting replay in buffer mode', this._options._experiments.traceInternals);\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true,\n },\n );\n\n this.session = session;\n\n this.recordingMode = 'buffer';\n this._initializeRecording();\n }\n\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n startRecording() {\n try {\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 emit: getHandleRecordingEmit(this),\n onMutation: this._onMutationHandler,\n });\n } catch (err) {\n this._handleException(err);\n }\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 = undefined;\n }\n\n return true;\n } catch (err) {\n this._handleException(err);\n return false;\n }\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({ forceFlush = false, reason } = {}) {\n if (!this._isEnabled) {\n return;\n }\n\n // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n // enter into an infinite loop when `stop()` is called while flushing.\n this._isEnabled = false;\n\n try {\n logInfo(\n `[Replay] Stopping Replay${reason ? ` triggered by ${reason}` : ''}`,\n this._options._experiments.traceInternals,\n );\n\n this._removeListeners();\n this.stopRecording();\n\n this._debouncedFlush.cancel();\n // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n // `_isEnabled` state of the plugin since it was disabled above.\n if (forceFlush) {\n await this._flush({ force: true });\n }\n\n // After flush, destroy event buffer\n this.eventBuffer && this.eventBuffer.destroy();\n this.eventBuffer = null;\n\n // Clear session from session storage, note this means if a new session\n // is started after, it will not have `previousSessionId`\n clearSession(this);\n } catch (err) {\n this._handleException(err);\n }\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\n this._isPaused = true;\n this.stopRecording();\n\n logInfo('[Replay] Pausing replay', this._options._experiments.traceInternals);\n }\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\n this._isPaused = false;\n this.startRecording();\n\n logInfo('[Replay] Resuming replay', this._options._experiments.traceInternals);\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n async sendBufferedReplayOrFlush({ continueRecording = true } = {}) {\n if (this.recordingMode === 'session') {\n return this.flushImmediate();\n }\n\n const activityTime = Date.now();\n\n logInfo('[Replay] Converting buffer to session', this._options._experiments.traceInternals);\n\n // Allow flush to complete before resuming as a session recording, otherwise\n // the checkout from `startRecording` may be included in the payload.\n // Prefer to keep the error replay as a separate (and smaller) segment\n // than the session replay.\n await this.flushImmediate();\n\n const hasStoppedRecording = this.stopRecording();\n\n if (!continueRecording || !hasStoppedRecording) {\n return;\n }\n\n // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n if ((this.recordingMode ) === 'session') {\n return;\n }\n\n // Re-start recording in session-mode\n this.recordingMode = 'session';\n\n // Once this session ends, we do not want to refresh it\n if (this.session) {\n this._updateUserActivity(activityTime);\n this._updateSessionActivity(activityTime);\n this._maybeSaveSession();\n }\n\n this.startRecording();\n }\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 // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n const cbResult = cb();\n\n // If this option is turned on then we will only want to call `flush`\n // explicitly\n if (this.recordingMode === 'buffer') {\n return;\n }\n\n // If callback is true, we do not want to continue with flushing -- the\n // caller will need to handle it.\n if (cbResult === true) {\n return;\n }\n\n // addUpdate is called quite frequently - use _debouncedFlush so that it\n // respects the flush delays and does not flush immediately\n this._debouncedFlush();\n }\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\n // This case means that recording was once stopped due to inactivity.\n // Ensure that recording is resumed.\n if (!this._stopRecording) {\n // Create a new session, otherwise when the user action is flushed, it\n // will get rejected due to an expired session.\n if (!this._checkSession()) {\n return;\n }\n\n // Note: This will cause a new DOM checkout\n this.resume();\n return;\n }\n\n // Otherwise... recording was never suspended, continue as normalish\n this.checkAndHandleExpiredSession();\n\n this._updateSessionActivity();\n }\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 /**\n * Only flush if `this.recordingMode === 'session'`\n */\n conditionalFlush() {\n if (this.recordingMode === 'buffer') {\n return Promise.resolve();\n }\n\n return this.flushImmediate();\n }\n\n /**\n * Flush using debounce flush\n */\n flush() {\n return this._debouncedFlush() ;\n }\n\n /**\n * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n * cases of mulitple flushes happening closely together.\n */\n flushImmediate() {\n this._debouncedFlush();\n // `.flush` is provided by the debounced function, analogously to lodash.debounce\n return this._debouncedFlush.flush() ;\n }\n\n /**\n * Cancels queued up flushes.\n */\n cancelFlush() {\n this._debouncedFlush.cancel();\n }\n\n /** Get the current sesion (=replay) ID */\n getSessionId() {\n return this.session && this.session.id;\n }\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 // Prevent starting a new session if the last user activity is older than\n // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n // session+recording. This creates noisy replays that do not have much\n // content in them.\n if (\n this._lastActivity &&\n isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n this.session &&\n this.session.sampled === 'session'\n ) {\n // Pause recording only for session-based replays. Otherwise, resuming\n // will create a new replay and will conflict with users who only choose\n // to record error-based replays only. (e.g. the resumed replay will not\n // contain a reference to an error)\n this.pause();\n return;\n }\n\n // --- There is recent user activity --- //\n // This will create a new session if expired, based on expiry length\n if (!this._checkSession()) {\n // Check session handles the refreshing itself\n return false;\n }\n\n return true;\n }\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\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // Reset _context as well\n this._clearContext();\n\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\n this._context.urls.push(url);\n }\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(\n event,\n isCheckout,\n ) {\n const res = this._throttledAddEvent(event, isCheckout);\n\n // If this is THROTTLED, it means we have throttled the event for the first time\n // In this case, we want to add a breadcrumb indicating that something was skipped\n if (res === THROTTLED) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.throttled',\n });\n\n this.addUpdate(() => {\n // Return `false` if the event _was_ added, as that means we schedule a flush\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\n return res;\n }\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 lastTransaction = this.lastTransaction || getCurrentHub().getScope().getTransaction();\n if (!lastTransaction || !['route', 'custom'].includes(lastTransaction.metadata.source)) {\n return undefined;\n }\n\n return lastTransaction.name;\n }\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\n // this method is generally called on page load or manually - in both cases\n // we should treat it as an activity\n this._updateSessionActivity();\n\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n });\n\n this._removeListeners();\n this._addListeners();\n\n // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n this._isEnabled = true;\n this._isPaused = false;\n\n this.startRecording();\n }\n\n /** A wrapper to conditionally capture exceptions. */\n _handleException(error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', error);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions) {\n captureException(error);\n }\n }\n\n /**\n * Loads (or refreshes) the current session.\n */\n _initializeSessionForSampling(previousSessionId) {\n // Whenever there is _any_ error sample rate, we always allow buffering\n // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n const allowBuffering = this._options.errorSampleRate > 0;\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals,\n previousSessionId,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering,\n },\n );\n\n this.session = session;\n }\n\n /**\n * Checks and potentially refreshes the current session.\n * Returns false if session is not recorded.\n */\n _checkSession() {\n // If there is no session yet, we do not want to refresh anything\n // This should generally not happen, but to be safe....\n if (!this.session) {\n return false;\n }\n\n const currentSession = this.session;\n\n if (\n shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n })\n ) {\n void this._refreshSession(currentSession);\n return false;\n }\n\n return true;\n }\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: 'refresh session' });\n this.initializeSampling(session.id);\n }\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\n if (this.clickDetector) {\n this.clickDetector.addListeners();\n }\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this._handleException(err);\n }\n\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n _removeListeners() {\n try {\n WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW.removeEventListener('blur', this._handleWindowBlur);\n WINDOW.removeEventListener('focus', this._handleWindowFocus);\n WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this._handleException(err);\n }\n }\n\n /**\n * Handle when visibility of the page content changes. Opening a new tab will\n * cause the state to change to hidden because of content of current page will\n * be hidden. Likewise, moving a different window to cover the contents of the\n * page will also trigger a change to a hidden state.\n */\n __init() {this._handleVisibilityChange = () => {\n if (WINDOW.document.visibilityState === 'visible') {\n this._doChangeToForegroundTasks();\n } else {\n this._doChangeToBackgroundTasks();\n }\n };}\n\n /**\n * Handle when page is blurred\n */\n __init2() {this._handleWindowBlur = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.blur',\n });\n\n // Do not count blur as a user action -- it's part of the process of them\n // leaving the page\n this._doChangeToBackgroundTasks(breadcrumb);\n };}\n\n /**\n * Handle when page is focused\n */\n __init3() {this._handleWindowFocus = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.focus',\n });\n\n // Do not count focus as a user action -- instead wait until they focus and\n // interactive with page\n this._doChangeToForegroundTasks(breadcrumb);\n };}\n\n /** Ensure page remains active when a key is pressed. */\n __init4() {this._handleKeyboardEvent = (event) => {\n handleKeyboardEvent(this, event);\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\n const expired = isSessionExpired(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n });\n\n if (expired) {\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n void this.conditionalFlush();\n }\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\n const isSessionActive = this.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n // ms, we will re-use the existing session, otherwise create a new\n // session\n logInfo('[Replay] Document has become active, but session has expired');\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n\n /**\n * Trigger rrweb to take a full snapshot which will cause this plugin to\n * create a new Replay event.\n */\n _triggerFullSnapshot(checkout = true) {\n try {\n logInfo('[Replay] Taking full rrweb snapshot');\n record.takeFullSnapshot(checkout);\n } catch (err) {\n this._handleException(err);\n }\n }\n\n /**\n * Update user activity (across session lifespans)\n */\n _updateUserActivity(_lastActivity = Date.now()) {\n this._lastActivity = _lastActivity;\n }\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 /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n _createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n void 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 /**\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 const performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n\n /**\n * Clear _context\n */\n _clearContext() {\n // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n this._context.errorIds.clear();\n this._context.traceIds.clear();\n this._context.urls = [];\n }\n\n /** Update the initial timestamp based on the buffer content. */\n _updateInitialTimestampFromEventBuffer() {\n const { session, eventBuffer } = this;\n if (!session || !eventBuffer) {\n return;\n }\n\n // we only ever update this on the initial segment\n if (session.segmentId) {\n return;\n }\n\n const earliestEvent = eventBuffer.getEarliestTimestamp();\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\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 urls: this._context.urls,\n };\n\n this._clearContext();\n\n return _context;\n }\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\n if (!this.session || !this.eventBuffer || !replayId) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] No session or eventBuffer found to flush.');\n return;\n }\n\n await this._addPerformanceEntries();\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer || !this.eventBuffer.hasEvents) {\n return;\n }\n\n // Only attach memory event if eventBuffer is not empty\n await addMemoryEntry(this);\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer) {\n return;\n }\n\n // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n if (replayId !== this.getSessionId()) {\n return;\n }\n\n try {\n // This uses the data from the eventBuffer, so we need to call this before `finish()\n this._updateInitialTimestampFromEventBuffer();\n\n const timestamp = Date.now();\n\n // Check total duration again, to avoid sending outdated stuff\n // We leave 30s wiggle room to accomodate late flushing etc.\n // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30000) {\n throw new Error('Session is too long, not sending replay');\n }\n\n const eventContext = this._popEventContext();\n // Always increment segmentId regardless of outcome of sending replay\n const segmentId = this.session.segmentId++;\n this._maybeSaveSession();\n\n // Note this empties the event buffer regardless of outcome of sending replay\n const recordingData = await this.eventBuffer.finish();\n\n await sendReplay({\n replayId,\n recordingData,\n segmentId,\n eventContext,\n session: this.session,\n options: this.getOptions(),\n timestamp,\n });\n } catch (err) {\n this._handleException(err);\n\n // This means we retried 3 times and all of them failed,\n // or we ran into a problem we don't want to retry, like rate limiting.\n // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n void this.stop({ reason: 'sendReplay' });\n\n const client = getCurrentHub().getClient();\n\n if (client) {\n client.recordDroppedEvent('send_error', 'replay');\n }\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 __init5() {this._flush = async ({\n force = false,\n }\n\n = {}) => {\n if (!this._isEnabled && !force) {\n // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n return;\n }\n\n if (!this.checkAndHandleExpiredSession()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Attempting to finish replay event after session expired.');\n return;\n }\n\n if (!this.session) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] No session found to flush.');\n return;\n }\n\n const start = this.session.started;\n const now = Date.now();\n const duration = now - start;\n\n // A flush is about to happen, cancel any queued flushes\n this._debouncedFlush.cancel();\n\n // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n const tooShort = duration < this._options.minReplayDuration;\n const tooLong = duration > this._options.maxReplayDuration + 5000;\n if (tooShort || tooLong) {\n logInfo(\n `[Replay] Session duration (${Math.floor(duration / 1000)}s) is too ${\n tooShort ? 'short' : 'long'\n }, not sending replay.`,\n this._options._experiments.traceInternals,\n );\n\n if (tooShort) {\n this._debouncedFlush();\n }\n return;\n }\n\n const eventBuffer = this.eventBuffer;\n if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n logInfo('[Replay] Flushing initial segment without checkout.', this._options._experiments.traceInternals);\n // TODO FN: Evaluate if we want to stop here, or remove this again?\n }\n\n // this._flushLock acts as a lock so that future calls to `_flush()`\n // will be blocked until this promise resolves\n if (!this._flushLock) {\n this._flushLock = this._runFlush();\n await this._flushLock;\n this._flushLock = undefined;\n return;\n }\n\n // Wait for previous flush to finish, then call the debounced `_flush()`.\n // It's possible there are other flush requests queued and waiting for it\n // to resolve. We want to reduce all outstanding requests (as well as any\n // new flush requests that occur within a second of the locked flush\n // completing) into a single flush.\n\n try {\n await this._flushLock;\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(err);\n } finally {\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\n /** Handler for rrweb.record.onMutation */\n __init6() {this._onMutationHandler = (mutations) => {\n const count = mutations.length;\n\n const mutationLimit = this._options.mutationLimit;\n const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n const overMutationLimit = mutationLimit && count > mutationLimit;\n\n // Create a breadcrumb if a lot of mutations happen at the same time\n // We can show this in the UI as an information with potential performance improvements\n 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\n // Stop replay if over the mutation limit\n if (overMutationLimit) {\n void this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n return false;\n }\n\n // `true` means we use the regular mutation handling by rrweb\n return true;\n };}\n}\n\nfunction getOption(\n selectors,\n defaultSelectors,\n deprecatedClassOption,\n deprecatedSelectorOption,\n) {\n const deprecatedSelectors = typeof deprecatedSelectorOption === 'string' ? deprecatedSelectorOption.split(',') : [];\n\n const allSelectors = [\n ...selectors,\n // @deprecated\n ...deprecatedSelectors,\n\n // sentry defaults\n ...defaultSelectors,\n ];\n\n // @deprecated\n if (typeof deprecatedClassOption !== 'undefined') {\n // NOTE: No support for RegExp\n if (typeof deprecatedClassOption === 'string') {\n allSelectors.push(`.${deprecatedClassOption}`);\n }\n\n // eslint-disable-next-line no-console\n console.warn(\n '[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.',\n );\n }\n\n return allSelectors.join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nfunction getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n\n // eslint-disable-next-line deprecation/deprecation\n blockClass,\n // eslint-disable-next-line deprecation/deprecation\n blockSelector,\n // eslint-disable-next-line deprecation/deprecation\n maskTextClass,\n // eslint-disable-next-line deprecation/deprecation\n maskTextSelector,\n // eslint-disable-next-line deprecation/deprecation\n ignoreClass,\n}) {\n const defaultBlockedElements = ['base[href=\"/\"]'];\n\n const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]'], maskTextClass, maskTextSelector);\n const unmaskSelector = getOption(unmask, ['.sentry-unmask', '[data-sentry-unmask]']);\n\n const options = {\n // We are making the decision to make text and input selectors the same\n maskTextSelector: maskSelector,\n unmaskTextSelector: unmaskSelector,\n\n blockSelector: getOption(\n block,\n ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements],\n blockClass,\n blockSelector,\n ),\n unblockSelector: getOption(unblock, ['.sentry-unblock', '[data-sentry-unblock]']),\n ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]'], ignoreClass),\n };\n\n if (blockClass instanceof RegExp) {\n options.blockClass = blockClass;\n }\n\n if (maskTextClass instanceof RegExp) {\n options.maskTextClass = maskTextClass;\n }\n\n return options;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n */\nfunction maskAttribute({\n el,\n key,\n maskAttributes,\n maskAllText,\n privacyOptions,\n value,\n}) {\n // We only mask attributes if `maskAllText` is true\n if (!maskAllText) {\n return value;\n }\n\n // unmaskTextSelector takes precendence\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n\n if (\n maskAttributes.includes(key) ||\n // Need to mask `value` attribute for `` if it's a button-like\n // type\n (key === 'value' && el.tagName === 'INPUT' && ['submit', 'button'].includes(el.getAttribute('type') || ''))\n ) {\n return value.replace(/[\\S]/g, '*');\n }\n\n return value;\n}\n\nconst MEDIA_SELECTORS =\n 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\n\nconst DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\n\nlet _initialized = false;\n\n/**\n * The main replay integration class, to be passed to `init({ integrations: [] })`.\n */\nclass Replay {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Replay';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Initial options passed to the replay integration, merged with default values.\n * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n * can only be finally set when setupOnce() is called.\n *\n * @private\n */\n\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 _experiments = {},\n sessionSampleRate,\n errorSampleRate,\n maskAllText = true,\n maskAllInputs = true,\n blockAllMedia = true,\n\n mutationBreadcrumbLimit = 750,\n mutationLimit = 10000,\n\n slowClickTimeout = 7000,\n slowClickIgnoreSelectors = [],\n\n networkDetailAllowUrls = [],\n networkDetailDenyUrls = [],\n networkCaptureBodies = true,\n networkRequestHeaders = [],\n networkResponseHeaders = [],\n\n mask = [],\n maskAttributes = ['title', 'placeholder'],\n unmask = [],\n block = [],\n unblock = [],\n ignore = [],\n maskFn,\n\n beforeAddRecordingEvent,\n\n // eslint-disable-next-line deprecation/deprecation\n blockClass,\n // eslint-disable-next-line deprecation/deprecation\n blockSelector,\n // eslint-disable-next-line deprecation/deprecation\n maskInputOptions,\n // eslint-disable-next-line deprecation/deprecation\n maskTextClass,\n // eslint-disable-next-line deprecation/deprecation\n maskTextSelector,\n // eslint-disable-next-line deprecation/deprecation\n ignoreClass,\n } = {}) {\n this.name = Replay.id;\n\n const privacyOptions = getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n blockClass,\n blockSelector,\n maskTextClass,\n maskTextSelector,\n ignoreClass,\n });\n\n this._recordingOptions = {\n maskAllInputs,\n maskAllText,\n maskInputOptions: { ...(maskInputOptions || {}), password: true },\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: (key, value, el) =>\n maskAttribute({\n maskAttributes,\n maskAllText,\n privacyOptions,\n key,\n value,\n el,\n }),\n\n ...privacyOptions,\n\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 (error) {\n // ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n },\n };\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 sessionSampleRate,\n errorSampleRate,\n useCompression,\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\n _experiments,\n };\n\n if (typeof sessionSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\n `[Replay] You are passing \\`sessionSampleRate\\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \\`replaysSessionSampleRate\\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${sessionSampleRate} })`,\n );\n\n this._initialOptions.sessionSampleRate = sessionSampleRate;\n }\n\n if (typeof errorSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\n `[Replay] You are passing \\`errorSampleRate\\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \\`replaysOnErrorSampleRate\\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,\n );\n\n this._initialOptions.errorSampleRate = errorSampleRate;\n }\n\n if (this._initialOptions.blockAllMedia) {\n // `blockAllMedia` is a more user friendly option to configure blocking\n // embedded media elements\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector\n ? MEDIA_SELECTORS\n : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n }\n\n if (this._isInitialized && isBrowser()) {\n throw new Error('Multiple Sentry Session Replay instances are not supported');\n }\n\n this._isInitialized = true;\n }\n\n /** If replay has already been initialized */\n get _isInitialized() {\n return _initialized;\n }\n\n /** Update _isInitialized */\n set _isInitialized(value) {\n _initialized = value;\n }\n\n /**\n * Setup and initialize replay container\n */\n setupOnce() {\n if (!isBrowser()) {\n return;\n }\n\n this._setup();\n\n // Once upon a time, we tried to create a transaction in `setupOnce` and it would\n // potentially create a transaction before some native SDK integrations have run\n // and applied their own global event processor. An example is:\n // https://github.com/getsentry/sentry-javascript/blob/b47ceafbdac7f8b99093ce6023726ad4687edc48/packages/browser/src/integrations/useragent.ts\n //\n // So we call `this._initialize()` in next event loop as a workaround to wait for other\n // global event processors to finish. This is no longer needed, but keeping it\n // here to avoid any future issues.\n setTimeout(() => this._initialize());\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * PerformanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (!this._replay) {\n return;\n }\n\n this._replay.start();\n }\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\n this._replay.startBuffering();\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 stop() {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n return this._replay.stop({ forceFlush: this._replay.recordingMode === 'session' });\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n flush(options) {\n if (!this._replay || !this._replay.isEnabled()) {\n return Promise.resolve();\n }\n\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n\n /**\n * Get the current session ID.\n */\n getReplayId() {\n if (!this._replay || !this._replay.isEnabled()) {\n return;\n }\n\n return this._replay.getSessionId();\n }\n /**\n * Initializes replay.\n */\n _initialize() {\n if (!this._replay) {\n return;\n }\n\n this._replay.initializeSampling();\n }\n\n /** Setup the integration. */\n _setup() {\n // Client is not available in constructor, so we need to wait until setupOnce\n const finalOptions = loadReplayOptionsFromClient(this._initialOptions);\n\n this._replay = new ReplayContainer({\n options: finalOptions,\n recordingOptions: this._recordingOptions,\n });\n }\n} Replay.__initStatic();\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions) {\n const client = getCurrentHub().getClient();\n const opt = client && (client.getOptions() );\n\n const finalOptions = { sessionSampleRate: 0, errorSampleRate: 0, ...dropUndefinedKeys(initialOptions) };\n\n if (!opt) {\n // eslint-disable-next-line no-console\n console.warn('SDK client is not available.');\n return finalOptions;\n }\n\n if (\n initialOptions.sessionSampleRate == null && // TODO remove once deprecated rates are removed\n initialOptions.errorSampleRate == null && // TODO remove once deprecated rates are removed\n opt.replaysSessionSampleRate == null &&\n opt.replaysOnErrorSampleRate == null\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.',\n );\n }\n\n if (typeof opt.replaysSessionSampleRate === 'number') {\n finalOptions.sessionSampleRate = opt.replaysSessionSampleRate;\n }\n\n if (typeof opt.replaysOnErrorSampleRate === 'number') {\n finalOptions.errorSampleRate = opt.replaysOnErrorSampleRate;\n }\n\n return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n\nexport { Replay };\n//# sourceMappingURL=index.js.map\n","import { makeOfflineTransport } from '@sentry/core';\nimport { serializeEnvelope, parseEnvelope } from '@sentry/utils';\n\n// 'Store', 'promisifyRequest' and 'createStore' were originally copied from the 'idb-keyval' package before being\n// modified and simplified: https://github.com/jakearchibald/idb-keyval\n//\n// At commit: 0420a704fd6cbb4225429c536b1f61112d012fca\n// Original licence:\n\n// Copyright 2016, Jake Archibald\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nfunction promisifyRequest(request) {\n return new Promise((resolve, reject) => {\n // @ts-expect-error - file size hacks\n request.oncomplete = request.onsuccess = () => resolve(request.result);\n // @ts-expect-error - file size hacks\n request.onabort = request.onerror = () => reject(request.error);\n });\n}\n\n/** Create or open an IndexedDb store */\nfunction createStore(dbName, storeName) {\n const request = indexedDB.open(dbName);\n request.onupgradeneeded = () => request.result.createObjectStore(storeName);\n const dbp = promisifyRequest(request);\n\n return callback => dbp.then(db => callback(db.transaction(storeName, 'readwrite').objectStore(storeName)));\n}\n\nfunction keys(store) {\n return promisifyRequest(store.getAllKeys() );\n}\n\n/** Insert into the store */\nfunction insert(store, value, maxQueueSize) {\n return store(store => {\n return keys(store).then(keys => {\n if (keys.length >= maxQueueSize) {\n return;\n }\n\n // We insert with an incremented key so that the entries are popped in order\n store.put(value, Math.max(...keys, 0) + 1);\n return promisifyRequest(store.transaction);\n });\n });\n}\n\n/** Pop the oldest value from the store */\nfunction pop(store) {\n return store(store => {\n return keys(store).then(keys => {\n if (keys.length === 0) {\n return undefined;\n }\n\n return promisifyRequest(store.get(keys[0])).then(value => {\n store.delete(keys[0]);\n return promisifyRequest(store.transaction).then(() => value);\n });\n });\n });\n}\n\nfunction createIndexedDbStore(options) {\n let store;\n\n // Lazily create the store only when it's needed\n function getStore() {\n if (store == undefined) {\n store = createStore(options.dbName || 'sentry-offline', options.storeName || 'queue');\n }\n\n return store;\n }\n\n return {\n insert: async (env) => {\n try {\n const serialized = await serializeEnvelope(env, options.textEncoder);\n await insert(getStore(), serialized, options.maxQueueSize || 30);\n } catch (_) {\n //\n }\n },\n pop: async () => {\n try {\n const deserialized = await pop(getStore());\n if (deserialized) {\n return parseEnvelope(\n deserialized,\n options.textEncoder || new TextEncoder(),\n options.textDecoder || new TextDecoder(),\n );\n }\n } catch (_) {\n //\n }\n\n return undefined;\n },\n };\n}\n\nfunction makeIndexedDbOfflineTransport(\n createTransport,\n) {\n return options => createTransport({ ...options, createStore: createIndexedDbStore });\n}\n\n/**\n * Creates a transport that uses IndexedDb to store events when offline.\n */\nfunction makeBrowserOfflineTransport(\n createTransport,\n) {\n return makeIndexedDbOfflineTransport(makeOfflineTransport(createTransport));\n}\n\nexport { createStore, insert, makeBrowserOfflineTransport, pop };\n//# sourceMappingURL=offline.js.map\n","import { getCurrentHub, DEFAULT_ENVIRONMENT } from '@sentry/core';\nimport { forEachEnvelopeItem, logger, uuid4, GLOBAL_OBJ, browserPerformanceTimeOrigin } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\nconst MS_TO_NS = 1e6;\n// Use 0 as main thread id which is identical to threadId in node:worker_threads\n// where main logs 0 and workers seem to log in increments of 1\nconst THREAD_ID_STRING = String(0);\nconst THREAD_NAME = 'main';\n\n// Machine properties (eval only once)\nlet OS_PLATFORM = '';\nlet OS_PLATFORM_VERSION = '';\nlet OS_ARCH = '';\nlet OS_BROWSER = (WINDOW.navigator && WINDOW.navigator.userAgent) || '';\nlet OS_MODEL = '';\nconst OS_LOCALE =\n (WINDOW.navigator && WINDOW.navigator.language) ||\n (WINDOW.navigator && WINDOW.navigator.languages && WINDOW.navigator.languages[0]) ||\n '';\n\nfunction isUserAgentData(data) {\n return typeof data === 'object' && data !== null && 'getHighEntropyValues' in data;\n}\n\n// @ts-expect-error userAgentData is not part of the navigator interface yet\nconst userAgentData = WINDOW.navigator && WINDOW.navigator.userAgentData;\n\nif (isUserAgentData(userAgentData)) {\n userAgentData\n .getHighEntropyValues(['architecture', 'model', 'platform', 'platformVersion', 'fullVersionList'])\n .then((ua) => {\n OS_PLATFORM = ua.platform || '';\n OS_ARCH = ua.architecture || '';\n OS_MODEL = ua.model || '';\n OS_PLATFORM_VERSION = ua.platformVersion || '';\n\n if (ua.fullVersionList && ua.fullVersionList.length > 0) {\n const firstUa = ua.fullVersionList[ua.fullVersionList.length - 1];\n OS_BROWSER = `${firstUa.brand} ${firstUa.version}`;\n }\n })\n .catch(e => void e);\n}\n\nfunction isProcessedJSSelfProfile(profile) {\n return !('thread_metadata' in profile);\n}\n\n// Enriches the profile with threadId of the current thread.\n// This is done in node as we seem to not be able to get the info from C native code.\n/**\n *\n */\nfunction enrichWithThreadInformation(profile) {\n if (!isProcessedJSSelfProfile(profile)) {\n return profile;\n }\n\n return convertJSSelfProfileToSampledFormat(profile);\n}\n\n// Profile is marked as optional because it is deleted from the metadata\n// by the integration before the event is processed by other integrations.\n\nfunction getTraceId(event) {\n const traceId = event && event.contexts && event.contexts['trace'] && event.contexts['trace']['trace_id'];\n // Log a warning if the profile has an invalid traceId (should be uuidv4).\n // All profiles and transactions are rejected if this is the case and we want to\n // warn users that this is happening if they enable debug flag\n if (typeof traceId === 'string' && traceId.length !== 32) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(`[Profiling] Invalid traceId: ${traceId} on profiled event`);\n }\n }\n if (typeof traceId !== 'string') {\n return '';\n }\n\n return traceId;\n}\n/**\n * Creates a profiling event envelope from a Sentry event. If profile does not pass\n * validation, returns null.\n * @param event\n * @param dsn\n * @param metadata\n * @param tunnel\n * @returns {EventEnvelope | null}\n */\n\n/**\n * Creates a profiling event envelope from a Sentry event.\n */\nfunction createProfilePayload(\n profile_id,\n start_timestamp,\n processed_profile,\n event,\n) {\n if (event.type !== 'transaction') {\n // createProfilingEventEnvelope should only be called for transactions,\n // we type guard this behavior with isProfiledTransactionEvent.\n throw new TypeError('Profiling events may only be attached to transactions, this should never occur.');\n }\n\n if (processed_profile === undefined || processed_profile === null) {\n throw new TypeError(\n `Cannot construct profiling event envelope without a valid profile. Got ${processed_profile} instead.`,\n );\n }\n\n const traceId = getTraceId(event);\n const enrichedThreadProfile = enrichWithThreadInformation(processed_profile);\n const transactionStartMs = start_timestamp\n ? start_timestamp\n : typeof event.start_timestamp === 'number'\n ? event.start_timestamp * 1000\n : Date.now();\n const transactionEndMs = typeof event.timestamp === 'number' ? event.timestamp * 1000 : Date.now();\n\n const profile = {\n event_id: profile_id,\n timestamp: new Date(transactionStartMs).toISOString(),\n platform: 'javascript',\n version: '1',\n release: event.release || '',\n environment: event.environment || DEFAULT_ENVIRONMENT,\n runtime: {\n name: 'javascript',\n version: WINDOW.navigator.userAgent,\n },\n os: {\n name: OS_PLATFORM,\n version: OS_PLATFORM_VERSION,\n build_number: OS_BROWSER,\n },\n device: {\n locale: OS_LOCALE,\n model: OS_MODEL,\n manufacturer: OS_BROWSER,\n architecture: OS_ARCH,\n is_emulator: false,\n },\n debug_meta: {\n images: applyDebugMetadata(processed_profile.resources),\n },\n profile: enrichedThreadProfile,\n transactions: [\n {\n name: event.transaction || '',\n id: event.event_id || uuid4(),\n trace_id: traceId,\n active_thread_id: THREAD_ID_STRING,\n relative_start_ns: '0',\n relative_end_ns: ((transactionEndMs - transactionStartMs) * 1e6).toFixed(0),\n },\n ],\n };\n\n return profile;\n}\n\n/*\n See packages/tracing-internal/src/browser/router.ts\n*/\n/**\n *\n */\nfunction isAutomatedPageLoadTransaction(transaction) {\n return transaction.op === 'pageload';\n}\n\n/**\n * Converts a JSSelfProfile to a our sampled format.\n * Does not currently perform stack indexing.\n */\nfunction convertJSSelfProfileToSampledFormat(input) {\n let EMPTY_STACK_ID = undefined;\n let STACK_ID = 0;\n\n // Initialize the profile that we will fill with data\n const profile = {\n samples: [],\n stacks: [],\n frames: [],\n thread_metadata: {\n [THREAD_ID_STRING]: { name: THREAD_NAME },\n },\n };\n\n if (!input.samples.length) {\n return profile;\n }\n\n // We assert samples.length > 0 above and timestamp should always be present\n const start = input.samples[0].timestamp;\n // The JS SDK might change it's time origin based on some heuristic (see See packages/utils/src/time.ts)\n // when that happens, we need to ensure we are correcting the profile timings so the two timelines stay in sync.\n // Since JS self profiling time origin is always initialized to performance.timeOrigin, we need to adjust for\n // the drift between the SDK selected value and our profile time origin.\n const origin =\n typeof performance.timeOrigin === 'number' ? performance.timeOrigin : browserPerformanceTimeOrigin || 0;\n const adjustForOriginChange = origin - (browserPerformanceTimeOrigin || origin);\n\n for (let i = 0; i < input.samples.length; i++) {\n const jsSample = input.samples[i];\n\n // If sample has no stack, add an empty sample\n if (jsSample.stackId === undefined) {\n if (EMPTY_STACK_ID === undefined) {\n EMPTY_STACK_ID = STACK_ID;\n profile.stacks[EMPTY_STACK_ID] = [];\n STACK_ID++;\n }\n\n profile['samples'][i] = {\n // convert ms timestamp to ns\n elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n stack_id: EMPTY_STACK_ID,\n thread_id: THREAD_ID_STRING,\n };\n continue;\n }\n\n let stackTop = input.stacks[jsSample.stackId];\n\n // Functions in top->down order (root is last)\n // We follow the stackTop.parentId trail and collect each visited frameId\n const stack = [];\n\n while (stackTop) {\n stack.push(stackTop.frameId);\n\n const frame = input.frames[stackTop.frameId];\n\n // If our frame has not been indexed yet, index it\n if (profile.frames[stackTop.frameId] === undefined) {\n profile.frames[stackTop.frameId] = {\n function: frame.name,\n abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,\n lineno: frame.line,\n colno: frame.column,\n };\n }\n\n stackTop = stackTop.parentId === undefined ? undefined : input.stacks[stackTop.parentId];\n }\n\n const sample = {\n // convert ms timestamp to ns\n elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),\n stack_id: STACK_ID,\n thread_id: THREAD_ID_STRING,\n };\n\n profile['stacks'][STACK_ID] = stack;\n profile['samples'][i] = sample;\n STACK_ID++;\n }\n\n return profile;\n}\n\n/**\n * Adds items to envelope if they are not already present - mutates the envelope.\n * @param envelope\n */\nfunction addProfilesToEnvelope(envelope, profiles) {\n if (!profiles.length) {\n return envelope;\n }\n\n for (const profile of profiles) {\n // @ts-expect-error untyped envelope\n envelope[1].push([{ type: 'profile' }, profile]);\n }\n return envelope;\n}\n\n/**\n * Finds transactions with profile_id context in the envelope\n * @param envelope\n * @returns\n */\nfunction findProfiledTransactionsFromEnvelope(envelope) {\n const events = [];\n\n forEachEnvelopeItem(envelope, (item, type) => {\n if (type !== 'transaction') {\n return;\n }\n\n for (let j = 1; j < item.length; j++) {\n const event = item[j] ;\n\n if (event && event.contexts && event.contexts['profile'] && event.contexts['profile']['profile_id']) {\n events.push(item[j] );\n }\n }\n });\n\n return events;\n}\n\nconst debugIdStackParserCache = new WeakMap();\n/**\n * Applies debug meta data to an event from a list of paths to resources (sourcemaps)\n */\nfunction applyDebugMetadata(resource_paths) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return [];\n }\n\n const hub = getCurrentHub();\n if (!hub) {\n return [];\n }\n const client = hub.getClient();\n if (!client) {\n return [];\n }\n const options = client.getOptions();\n if (!options) {\n return [];\n }\n const stackParser = options.stackParser;\n if (!stackParser) {\n return [];\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n const file = stackFrame && stackFrame.filename;\n\n if (stackFrame && file) {\n acc[file] = debugIdMap[debugIdStackTrace] ;\n break;\n }\n }\n return acc;\n }, {});\n\n const images = [];\n for (const path of resource_paths) {\n if (path && filenameDebugIdMap[path]) {\n images.push({\n type: 'sourcemap',\n code_file: path,\n debug_id: filenameDebugIdMap[path] ,\n });\n }\n }\n\n return images;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n if ((typeof rate !== 'number' && typeof rate !== 'boolean') || (typeof rate === 'number' && isNaN(rate))) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // Boolean sample rates are always valid\n if (rate === true || rate === false) {\n return true;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nfunction isValidProfile(profile) {\n if (profile.samples.length < 2) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // Log a warning if the profile has less than 2 samples so users can know why\n // they are not seeing any profiling data and we cant avoid the back and forth\n // of asking them to provide us with a dump of the profile data.\n logger.log('[Profiling] Discarding profile because it contains less than 2 samples');\n }\n return false;\n }\n\n if (!profile.frames.length) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log('[Profiling] Discarding profile because it contains no frames');\n }\n return false;\n }\n\n return true;\n}\n\n// Keep a flag value to avoid re-initializing the profiler constructor. If it fails\n// once, it will always fail and this allows us to early return.\nlet PROFILING_CONSTRUCTOR_FAILED = false;\nconst MAX_PROFILE_DURATION_MS = 30000;\n\n/**\n * Check if profiler constructor is available.\n * @param maybeProfiler\n */\nfunction isJSProfilerSupported(maybeProfiler) {\n return typeof maybeProfiler === 'function';\n}\n\n/**\n * Starts the profiler and returns the profiler instance.\n */\nfunction startJSSelfProfile() {\n // Feature support check first\n const JSProfilerConstructor = WINDOW.Profiler;\n\n if (!isJSProfilerSupported(JSProfilerConstructor)) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(\n '[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.',\n );\n }\n return;\n }\n\n // From initial testing, it seems that the minimum value for sampleInterval is 10ms.\n const samplingIntervalMS = 10;\n // Start the profiler\n const maxSamples = Math.floor(MAX_PROFILE_DURATION_MS / samplingIntervalMS);\n\n // Attempt to initialize the profiler constructor, if it fails, we disable profiling for the current user session.\n // This is likely due to a missing 'Document-Policy': 'js-profiling' header. We do not want to throw an error if this happens\n // as we risk breaking the user's application, so just disable profiling and log an error.\n try {\n return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples });\n } catch (e) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(\n \"[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.\",\n );\n logger.log('[Profiling] Disabling profiling for current user session.');\n }\n PROFILING_CONSTRUCTOR_FAILED = true;\n }\n\n return;\n}\n\n/**\n * Determine if a profile should be profiled.\n */\nfunction shouldProfileTransaction(transaction) {\n // If constructor failed once, it will always fail, so we can early return.\n if (PROFILING_CONSTRUCTOR_FAILED) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log('[Profiling] Profiling has been disabled for the duration of the current user session.');\n }\n return false;\n }\n\n if (!transaction.sampled) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log('[Profiling] Discarding profile because transaction was not sampled.');\n }\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = client && client.getOptions();\n if (!options) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Profiling] Profiling disabled, no options found.');\n return false;\n }\n\n // @ts-expect-error profilesSampleRate is not part of the browser options yet\n const profilesSampleRate = options.profilesSampleRate;\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(profilesSampleRate)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Profiling] Discarding profile because of invalid sample rate.');\n return false;\n }\n\n // if the function returned 0 (or false), or if `profileSampleRate` is 0, it's a sign the profile should be dropped\n if (!profilesSampleRate) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n '[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0',\n );\n return false;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate;\n // Check if we should sample this profile\n if (!sampled) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(\n profilesSampleRate,\n )})`,\n );\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a profiling envelope item, if the profile does not pass validation, returns null.\n * @param event\n * @returns {Profile | null}\n */\nfunction createProfilingEvent(\n profile_id,\n start_timestamp,\n profile,\n event,\n) {\n if (!isValidProfile(profile)) {\n return null;\n }\n\n return createProfilePayload(profile_id, start_timestamp, profile, event);\n}\n\nconst PROFILE_MAP = new Map();\n/**\n *\n */\nfunction getActiveProfilesCount() {\n return PROFILE_MAP.size;\n}\n\n/**\n * Retrieves profile from global cache and removes it.\n */\nfunction takeProfileFromGlobalCache(profile_id) {\n const profile = PROFILE_MAP.get(profile_id);\n if (profile) {\n PROFILE_MAP.delete(profile_id);\n }\n return profile;\n}\n/**\n * Adds profile to global cache and evicts the oldest profile if the cache is full.\n */\nfunction addProfileToGlobalCache(profile_id, profile) {\n PROFILE_MAP.set(profile_id, profile);\n\n if (PROFILE_MAP.size > 30) {\n const last = PROFILE_MAP.keys().next().value;\n PROFILE_MAP.delete(last);\n }\n}\n\nexport { MAX_PROFILE_DURATION_MS, addProfileToGlobalCache, addProfilesToEnvelope, applyDebugMetadata, convertJSSelfProfileToSampledFormat, createProfilePayload, createProfilingEvent, enrichWithThreadInformation, findProfiledTransactionsFromEnvelope, getActiveProfilesCount, isAutomatedPageLoadTransaction, isValidSampleRate, shouldProfileTransaction, startJSSelfProfile, takeProfileFromGlobalCache };\n//# sourceMappingURL=utils.js.map\n","import { logger, timestampInSeconds, uuid4 } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\nimport { shouldProfileTransaction, isAutomatedPageLoadTransaction, startJSSelfProfile, MAX_PROFILE_DURATION_MS, addProfileToGlobalCache } from './utils.js';\n\n/**\n * Safety wrapper for startTransaction for the unlikely case that transaction starts before tracing is imported -\n * if that happens we want to avoid throwing an error from profiling code.\n * see https://github.com/getsentry/sentry-javascript/issues/4731.\n *\n * @experimental\n */\nfunction onProfilingStartRouteTransaction(transaction) {\n if (!transaction) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log('[Profiling] Transaction is undefined, skipping profiling');\n }\n return transaction;\n }\n\n if (shouldProfileTransaction(transaction)) {\n return startProfileForTransaction(transaction);\n }\n\n return transaction;\n}\n\n/**\n * Wraps startTransaction and stopTransaction with profiling related logic.\n * startProfileForTransaction is called after the call to startTransaction in order to avoid our own code from\n * being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.\n */\nfunction startProfileForTransaction(transaction) {\n // Start the profiler and get the profiler instance.\n let startTimestamp;\n if (isAutomatedPageLoadTransaction(transaction)) {\n startTimestamp = timestampInSeconds() * 1000;\n }\n\n const profiler = startJSSelfProfile();\n\n // We failed to construct the profiler, fallback to original transaction.\n // No need to log anything as this has already been logged in startProfile.\n if (!profiler) {\n return transaction;\n }\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(`[Profiling] started profiling transaction: ${transaction.name || transaction.description}`);\n }\n\n // We create \"unique\" transaction names to avoid concurrent transactions with same names\n // from being ignored by the profiler. From here on, only this transaction name should be used when\n // calling the profiler methods. Note: we log the original name to the user to avoid confusion.\n const profileId = uuid4();\n\n /**\n * Idempotent handler for profile stop\n */\n async function onProfileHandler() {\n // Check if the profile exists and return it the behavior has to be idempotent as users may call transaction.finish multiple times.\n if (!transaction) {\n return null;\n }\n // Satisfy the type checker, but profiler will always be defined here.\n if (!profiler) {\n return null;\n }\n\n return profiler\n .stop()\n .then((profile) => {\n if (maxDurationTimeoutID) {\n WINDOW.clearTimeout(maxDurationTimeoutID);\n maxDurationTimeoutID = undefined;\n }\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(`[Profiling] stopped profiling of transaction: ${transaction.name || transaction.description}`);\n }\n\n // In case of an overlapping transaction, stopProfiling may return null and silently ignore the overlapping profile.\n if (!profile) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(\n `[Profiling] profiler returned null profile for: ${transaction.name || transaction.description}`,\n 'this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started',\n );\n }\n return null;\n }\n\n addProfileToGlobalCache(profileId, profile);\n return null;\n })\n .catch(error => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log('[Profiling] error while stopping profiler:', error);\n }\n return null;\n });\n }\n\n // Enqueue a timeout to prevent profiles from running over max duration.\n let maxDurationTimeoutID = WINDOW.setTimeout(() => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.log(\n '[Profiling] max profile duration elapsed, stopping profiling for:',\n transaction.name || transaction.description,\n );\n }\n // If the timeout exceeds, we want to stop profiling, but not finish the transaction\n void onProfileHandler();\n }, MAX_PROFILE_DURATION_MS);\n\n // We need to reference the original finish call to avoid creating an infinite loop\n const originalFinish = transaction.finish.bind(transaction);\n\n /**\n * Wraps startTransaction and stopTransaction with profiling related logic.\n * startProfiling is called after the call to startTransaction in order to avoid our own code from\n * being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.\n */\n function profilingWrappedTransactionFinish() {\n if (!transaction) {\n return originalFinish();\n }\n // onProfileHandler should always return the same profile even if this is called multiple times.\n // Always call onProfileHandler to ensure stopProfiling is called and the timeout is cleared.\n void onProfileHandler().then(\n () => {\n transaction.setContext('profile', { profile_id: profileId, start_timestamp: startTimestamp });\n originalFinish();\n },\n () => {\n // If onProfileHandler fails, we still want to call the original finish method.\n originalFinish();\n },\n );\n\n return transaction;\n }\n\n transaction.finish = profilingWrappedTransactionFinish;\n return transaction;\n}\n\nexport { onProfilingStartRouteTransaction, startProfileForTransaction };\n//# sourceMappingURL=hubextensions.js.map\n","import { logger } from '@sentry/utils';\nimport { startProfileForTransaction } from './hubextensions.js';\nimport { isAutomatedPageLoadTransaction, shouldProfileTransaction, getActiveProfilesCount, findProfiledTransactionsFromEnvelope, takeProfileFromGlobalCache, createProfilingEvent, addProfilesToEnvelope } from './utils.js';\n\n/**\n * Browser profiling integration. Stores any event that has contexts[\"profile\"][\"profile_id\"]\n * This exists because we do not want to await async profiler.stop calls as transaction.finish is called\n * in a synchronous context. Instead, we handle sending the profile async from the promise callback and\n * rely on being able to pull the event from the cache when we need to construct the envelope. This makes the\n * integration less reliable as we might be dropping profiles when the cache is full.\n *\n * @experimental\n */\nclass BrowserProfilingIntegration {\n static __initStatic() {this.id = 'BrowserProfilingIntegration';}\n\n constructor() {\n this.name = BrowserProfilingIntegration.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobalEventProcessor, getCurrentHub) {\n this.getCurrentHub = getCurrentHub;\n\n const hub = this.getCurrentHub();\n const client = hub.getClient();\n const scope = hub.getScope();\n\n const transaction = scope.getTransaction();\n\n if (transaction && isAutomatedPageLoadTransaction(transaction)) {\n if (shouldProfileTransaction(transaction)) {\n startProfileForTransaction(transaction);\n }\n }\n\n if (client && typeof client.on === 'function') {\n client.on('startTransaction', (transaction) => {\n if (shouldProfileTransaction(transaction)) {\n startProfileForTransaction(transaction);\n }\n });\n\n client.on('beforeEnvelope', (envelope) => {\n // if not profiles are in queue, there is nothing to add to the envelope.\n if (!getActiveProfilesCount()) {\n return;\n }\n\n const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope);\n if (!profiledTransactionEvents.length) {\n return;\n }\n\n const profilesToAddToEnvelope = [];\n\n for (const profiledTransaction of profiledTransactionEvents) {\n const context = profiledTransaction && profiledTransaction.contexts;\n const profile_id = context && context['profile'] && context['profile']['profile_id'];\n const start_timestamp = context && context['profile'] && context['profile']['start_timestamp'];\n\n if (typeof profile_id !== 'string') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Profiling] cannot find profile for a transaction without a profile context');\n continue;\n }\n\n if (!profile_id) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Profiling] cannot find profile for a transaction without a profile context');\n continue;\n }\n\n // Remove the profile from the transaction context before sending, relay will take care of the rest.\n if (context && context['profile']) {\n delete context.profile;\n }\n\n const profile = takeProfileFromGlobalCache(profile_id);\n if (!profile) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Profiling] Could not retrieve profile for transaction: ${profile_id}`);\n continue;\n }\n\n const profileEvent = createProfilingEvent(\n profile_id,\n start_timestamp ,\n profile,\n profiledTransaction ,\n );\n if (profileEvent) {\n profilesToAddToEnvelope.push(profileEvent);\n }\n }\n\n addProfilesToEnvelope(envelope, profilesToAddToEnvelope);\n });\n } else {\n logger.warn('[Profiling] Client does not support hooks, profiling will be disabled');\n }\n }\n} BrowserProfilingIntegration.__initStatic();\n\nexport { BrowserProfilingIntegration };\n//# sourceMappingURL=integration.js.map\n","import { Integrations } from '@sentry/core';\nexport { FunctionToString, Hub, InboundFilters, ModuleMetadata, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addIntegration, addTracingExtensions, captureEvent, captureException, captureMessage, close, configureScope, continueTrace, createTransport, extractTraceparentData, flush, getActiveSpan, getActiveTransaction, getCurrentHub, getHubFromCarrier, lastEventId, makeMain, makeMultiplexedTransport, setContext, setExtra, setExtras, setMeasurement, setTag, setTags, setUser, spanStatusfromHttpCode, startInactiveSpan, startSpan, startSpanManual, startTransaction, trace, withScope } from '@sentry/core';\nimport { WINDOW } from './helpers.js';\nexport { WINDOW } from './helpers.js';\nexport { BrowserClient } from './client.js';\nexport { makeFetchTransport } from './transports/fetch.js';\nexport { makeXHRTransport } from './transports/xhr.js';\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser } from './stack-parsers.js';\nexport { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder.js';\nexport { createUserFeedbackEnvelope } from './userfeedback.js';\nexport { captureUserFeedback, defaultIntegrations, forceLoad, init, onLoad, showReportDialog, wrap } from './sdk.js';\nimport * as index from './integrations/index.js';\nexport { Replay } from '@sentry/replay';\nexport { BrowserTracing, defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from '@sentry-internal/tracing';\nexport { makeBrowserOfflineTransport } from './transports/offline.js';\nexport { onProfilingStartRouteTransaction } from './profiling/hubextensions.js';\nexport { BrowserProfilingIntegration } from './profiling/integration.js';\nexport { GlobalHandlers } from './integrations/globalhandlers.js';\nexport { TryCatch } from './integrations/trycatch.js';\nexport { Breadcrumbs } from './integrations/breadcrumbs.js';\nexport { LinkedErrors } from './integrations/linkederrors.js';\nexport { HttpContext } from './integrations/httpcontext.js';\nexport { Dedupe } from './integrations/dedupe.js';\n\nlet windowIntegrations = {};\n\n// This block is needed to add compatibility with the integrations packages when used with a CDN\nif (WINDOW.Sentry && WINDOW.Sentry.Integrations) {\n windowIntegrations = WINDOW.Sentry.Integrations;\n}\n\nconst INTEGRATIONS = {\n ...windowIntegrations,\n ...Integrations,\n ...index,\n};\n\nexport { INTEGRATIONS as Integrations };\n//# sourceMappingURL=index.js.map\n","const DEFAULT_HOOKS = ['activate', 'mount', 'update'];\n\nexport { DEFAULT_HOOKS };\n//# sourceMappingURL=constants.js.map\n","// Vendored from https://github.com/vuejs/vue/blob/612fb89547711cacb030a3893a0065b785802860/src/core/util/debug.js\n// with types only changes.\n\n// The MIT License (MIT)\n\n// Copyright (c) 2013-present, Yuxi (Evan) You\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');\n\nconst ROOT_COMPONENT_NAME = '';\nconst ANONYMOUS_COMPONENT_NAME = '';\n\nconst repeat = (str, n) => {\n // string.repeat() is not supported by IE11, we fall back to just using the string in that case\n // eslint-disable-next-line @sentry-internal/sdk/no-unsupported-es6-methods\n return str.repeat ? str.repeat(n) : str;\n};\n\nconst formatComponentName = (vm, includeFile) => {\n if (!vm) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n if (vm.$root === vm) {\n return ROOT_COMPONENT_NAME;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5204 $options can be undefined\n if (!vm.$options) {\n return ANONYMOUS_COMPONENT_NAME;\n }\n\n const options = vm.$options;\n\n let name = options.name || options._componentTag;\n const file = options.__file;\n if (!name && file) {\n const match = file.match(/([^/\\\\]+)\\.vue$/);\n if (match) {\n name = match[1];\n }\n }\n\n return (\n (name ? `<${classify(name)}>` : ANONYMOUS_COMPONENT_NAME) + (file && includeFile !== false ? ` at ${file}` : '')\n );\n};\n\nconst generateComponentTrace = (vm) => {\n if (vm && (vm._isVue || vm.__isVue) && vm.$parent) {\n const tree = [];\n let currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const last = tree[tree.length - 1] ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent; // eslint-disable-line no-param-reassign\n continue;\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent; // eslint-disable-line no-param-reassign\n }\n\n const formattedTree = tree\n .map(\n (vm, i) =>\n `${\n (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) +\n (Array.isArray(vm)\n ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n : formatComponentName(vm))\n }`,\n )\n .join('\\n');\n\n return `\\n\\nfound in\\n\\n${formattedTree}`;\n }\n\n return `\\n\\n(found in ${formatComponentName(vm)})`;\n};\n\nexport { formatComponentName, generateComponentTrace };\n//# sourceMappingURL=components.js.map\n","import { getCurrentHub } from '@sentry/browser';\nimport { addExceptionMechanism } from '@sentry/utils';\nimport { formatComponentName, generateComponentTrace } from './vendor/components.js';\n\nconst attachErrorHandler = (app, options) => {\n const { errorHandler, warnHandler, silent } = app.config;\n\n app.config.errorHandler = (error, vm, lifecycleHook) => {\n const componentName = formatComponentName(vm, false);\n const trace = vm ? generateComponentTrace(vm) : '';\n const metadata = {\n componentName,\n lifecycleHook,\n trace,\n };\n\n if (options.attachProps && vm) {\n // Vue2 - $options.propsData\n // Vue3 - $props\n if (vm.$options && vm.$options.propsData) {\n metadata.propsData = vm.$options.propsData;\n } else if (vm.$props) {\n metadata.propsData = vm.$props;\n }\n }\n\n // Capture exception in the next event loop, to make sure that all breadcrumbs are recorded in time.\n setTimeout(() => {\n getCurrentHub().withScope(scope => {\n scope.setContext('vue', metadata);\n\n scope.addEventProcessor(event => {\n addExceptionMechanism(event, {\n handled: false,\n });\n return event;\n });\n\n getCurrentHub().captureException(error);\n });\n });\n\n if (typeof errorHandler === 'function') {\n (errorHandler ).call(app, error, vm, lifecycleHook);\n }\n\n if (options.logErrors) {\n const hasConsole = typeof console !== 'undefined';\n const message = `Error in ${lifecycleHook}: \"${error && error.toString()}\"`;\n\n if (warnHandler) {\n (warnHandler ).call(null, message, vm, trace);\n } else if (hasConsole && !silent) {\n // eslint-disable-next-line no-console\n console.error(`[Vue warn]: ${message}${trace}`);\n }\n }\n };\n};\n\nexport { attachErrorHandler };\n//# sourceMappingURL=errorhandler.js.map\n","import { getCurrentHub } from '@sentry/browser';\nimport { logger, timestampInSeconds } from '@sentry/utils';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { formatComponentName } from './vendor/components.js';\n\nconst VUE_OP = 'ui.vue';\n\n// Mappings from operation to corresponding lifecycle hook.\nconst HOOKS = {\n activate: ['activated', 'deactivated'],\n create: ['beforeCreate', 'created'],\n destroy: ['beforeDestroy', 'destroyed'],\n mount: ['beforeMount', 'mounted'],\n update: ['beforeUpdate', 'updated'],\n};\n\n/** Grabs active transaction off scope, if any */\nfunction getActiveTransaction() {\n return getCurrentHub().getScope().getTransaction();\n}\n\n/** Finish top-level span and activity with a debounce configured using `timeout` option */\nfunction finishRootSpan(vm, timestamp, timeout) {\n if (vm.$_sentryRootSpanTimer) {\n clearTimeout(vm.$_sentryRootSpanTimer);\n }\n\n vm.$_sentryRootSpanTimer = setTimeout(() => {\n if (vm.$root && vm.$root.$_sentryRootSpan) {\n vm.$root.$_sentryRootSpan.finish(timestamp);\n vm.$root.$_sentryRootSpan = undefined;\n }\n }, timeout);\n}\n\nconst createTracingMixins = (options) => {\n const hooks = (options.hooks || [])\n .concat(DEFAULT_HOOKS)\n // Removing potential duplicates\n .filter((value, index, self) => self.indexOf(value) === index);\n\n const mixins = {};\n\n for (const operation of hooks) {\n // Retrieve corresponding hooks from Vue lifecycle.\n // eg. mount => ['beforeMount', 'mounted']\n const internalHooks = HOOKS[operation];\n if (!internalHooks) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Unknown hook: ${operation}`);\n continue;\n }\n\n for (const internalHook of internalHooks) {\n mixins[internalHook] = function () {\n const isRoot = this.$root === this;\n\n if (isRoot) {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n this.$_sentryRootSpan =\n this.$_sentryRootSpan ||\n activeTransaction.startChild({\n description: 'Application Render',\n op: `${VUE_OP}.render`,\n origin: 'auto.ui.vue',\n });\n }\n }\n\n // Skip components that we don't want to track to minimize the noise and give a more granular control to the user\n const name = formatComponentName(this, false);\n const shouldTrack = Array.isArray(options.trackComponents)\n ? options.trackComponents.indexOf(name) > -1\n : options.trackComponents;\n\n // We always want to track root component\n if (!isRoot && !shouldTrack) {\n return;\n }\n\n this.$_sentrySpans = this.$_sentrySpans || {};\n\n // Start a new span if current hook is a 'before' hook.\n // Otherwise, retrieve the current span and finish it.\n if (internalHook == internalHooks[0]) {\n const activeTransaction = (this.$root && this.$root.$_sentryRootSpan) || getActiveTransaction();\n if (activeTransaction) {\n // Cancel old span for this hook operation in case it didn't get cleaned up. We're not actually sure if it\n // will ever be the case that cleanup hooks re not called, but we had users report that spans didn't get\n // finished so we finish the span before starting a new one, just to be sure.\n const oldSpan = this.$_sentrySpans[operation];\n if (oldSpan && !oldSpan.endTimestamp) {\n oldSpan.finish();\n }\n\n this.$_sentrySpans[operation] = activeTransaction.startChild({\n description: `Vue <${name}>`,\n op: `${VUE_OP}.${operation}`,\n origin: 'auto.ui.vue',\n });\n }\n } else {\n // The span should already be added via the first handler call (in the 'before' hook)\n const span = this.$_sentrySpans[operation];\n // The before hook did not start the tracking span, so the span was not added.\n // This is probably because it happened before there is an active transaction\n if (!span) return;\n span.finish();\n\n finishRootSpan(this, timestampInSeconds(), options.timeout);\n }\n };\n }\n }\n\n return mixins;\n};\n\nexport { createTracingMixins, getActiveTransaction };\n//# sourceMappingURL=tracing.js.map\n","import { hasTracingEnabled } from '@sentry/core';\nimport { GLOBAL_OBJ, arrayify } from '@sentry/utils';\nimport { DEFAULT_HOOKS } from './constants.js';\nimport { attachErrorHandler } from './errorhandler.js';\nimport { createTracingMixins } from './tracing.js';\n\nconst globalWithVue = GLOBAL_OBJ ;\n\nconst DEFAULT_CONFIG = {\n Vue: globalWithVue.Vue,\n attachProps: true,\n logErrors: true,\n hooks: DEFAULT_HOOKS,\n timeout: 2000,\n trackComponents: false,\n};\n\n/**\n * Initialize Vue error & performance tracking.\n */\nclass VueIntegration {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Vue';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = VueIntegration.id;\n this._options = options;\n }\n\n /** @inheritDoc */\n setupOnce(_addGlobaleventProcessor, getCurrentHub) {\n this._setupIntegration(getCurrentHub());\n }\n\n /** Just here for easier testing */\n _setupIntegration(hub) {\n const client = hub.getClient();\n const options = { ...DEFAULT_CONFIG, ...(client && client.getOptions()), ...this._options };\n\n if (!options.Vue && !options.app) {\n // eslint-disable-next-line no-console\n console.warn(\n `[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your \\`Sentry.init\\` call with an appropriate config option:\n\\`app\\` (Application Instance - Vue 3) or \\`Vue\\` (Vue Constructor - Vue 2).`,\n );\n return;\n }\n\n if (options.app) {\n const apps = arrayify(options.app);\n apps.forEach(app => vueInit(app, options));\n } else if (options.Vue) {\n vueInit(options.Vue, options);\n }\n }\n} VueIntegration.__initStatic();\n\nconst vueInit = (app, options) => {\n // Check app is not mounted yet - should be mounted _after_ init()!\n // This is _somewhat_ private, but in the case that this doesn't exist we simply ignore it\n // See: https://github.com/vuejs/core/blob/eb2a83283caa9de0a45881d860a3cbd9d0bdd279/packages/runtime-core/src/component.ts#L394\n const appWithInstance = app\n\n;\n\n const isMounted = appWithInstance._instance && appWithInstance._instance.isMounted;\n if (isMounted === true) {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.',\n );\n }\n\n attachErrorHandler(app, options);\n\n if (hasTracingEnabled(options)) {\n app.mixin(\n createTracingMixins({\n ...options,\n ...options.tracingOptions,\n }),\n );\n }\n};\n\nexport { VueIntegration };\n//# sourceMappingURL=integration.js.map\n","import { SDK_VERSION, defaultIntegrations, init as init$1 } from '@sentry/browser';\nimport { VueIntegration } from './integration.js';\n\n/**\n * Inits the Vue SDK\n */\nfunction init(\n config = {},\n) {\n const options = {\n _metadata: {\n sdk: {\n name: 'sentry.javascript.vue',\n packages: [\n {\n name: 'npm:@sentry/vue',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n },\n },\n defaultIntegrations: [...defaultIntegrations, new VueIntegration()],\n ...config,\n };\n\n init$1(options);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","import { WINDOW, captureException } from '@sentry/browser';\nimport { addExceptionMechanism } from '@sentry/utils';\nimport { getActiveTransaction } from './tracing.js';\n\n/**\n * Creates routing instrumentation for Vue Router v2, v3 and v4\n *\n * You can optionally pass in an options object with the available option:\n * * `routeLabel`: Set this to `route` to opt-out of using `route.name` for transaction names.\n *\n * @param router The Vue Router instance that is used\n */\nfunction vueRouterInstrumentation(\n router,\n options = {},\n) {\n return (\n startTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n ) => {\n const tags = {\n 'routing.instrumentation': 'vue-router',\n };\n\n // We have to start the pageload transaction as early as possible (before the router's `beforeEach` hook\n // is called) to not miss child spans of the pageload.\n // We check that window & window.location exists in order to not run this code in SSR environments.\n if (startTransactionOnPageLoad && WINDOW && WINDOW.location) {\n startTransaction({\n name: WINDOW.location.pathname,\n op: 'pageload',\n origin: 'auto.pageload.vue',\n tags,\n metadata: {\n source: 'url',\n },\n });\n }\n\n router.onError(error =>\n captureException(error, scope => {\n scope.addEventProcessor(event => {\n addExceptionMechanism(event, { handled: false });\n return event;\n });\n\n return scope;\n }),\n );\n\n router.beforeEach((to, from, next) => {\n // According to docs we could use `from === VueRouter.START_LOCATION` but I couldnt get it working for Vue 2\n // https://router.vuejs.org/api/#router-start-location\n // https://next.router.vuejs.org/api/#start-location\n\n // from.name:\n // - Vue 2: null\n // - Vue 3: undefined\n // hence only '==' instead of '===', because `undefined == null` evaluates to `true`\n const isPageLoadNavigation = from.name == null && from.matched.length === 0;\n\n const data = {\n params: to.params,\n query: to.query,\n };\n\n // Determine a name for the routing transaction and where that name came from\n let transactionName = to.path;\n let transactionSource = 'url';\n if (to.name && options.routeLabel !== 'path') {\n transactionName = to.name.toString();\n transactionSource = 'custom';\n } else if (to.matched[0] && to.matched[0].path) {\n transactionName = to.matched[0].path;\n transactionSource = 'route';\n }\n\n if (startTransactionOnPageLoad && isPageLoadNavigation) {\n const pageloadTransaction = getActiveTransaction();\n if (pageloadTransaction) {\n if (pageloadTransaction.metadata.source !== 'custom') {\n pageloadTransaction.setName(transactionName, transactionSource);\n }\n pageloadTransaction.setData('params', data.params);\n pageloadTransaction.setData('query', data.query);\n }\n }\n\n if (startTransactionOnLocationChange && !isPageLoadNavigation) {\n startTransaction({\n name: transactionName,\n op: 'navigation',\n origin: 'auto.navigation.vue',\n tags,\n data,\n metadata: {\n source: transactionSource,\n },\n });\n }\n\n // Vue Router 4 no longer exposes the `next` function, so we need to\n // check if it's available before calling it.\n // `next` needs to be called in Vue Router 3 so that the hook is resolved.\n if (next) {\n next();\n }\n });\n };\n}\n\nexport { vueRouterInstrumentation };\n//# sourceMappingURL=router.js.map\n","import { Env } from '@/env'\nimport router from '@/router'\nimport * as Sentry from '@sentry/vue'\nimport type { App } from 'vue'\n\nexport function useSentry() {\n return Sentry\n}\n\n/**\n * These errors tend to occur when a new release is deployed and the client has cached files locally\n * which have references to files that no longer exist.\n * Since these errors do not require fixing, we do not care to report them.\n */\nconst ignoreErrorPatterns = [\n 'Failed to fetch dynamically imported module',\n 'Unable to preload CSS for',\n 'Importing a module script failed.'\n]\n\nfunction isErrorIgnored(error: unknown) {\n if (error instanceof Error) {\n return ignoreErrorPatterns.some(\n (pattern) => error.message?.toLowerCase().includes(pattern.toLowerCase())\n )\n }\n\n return false\n}\n\nexport function createSentry() {\n return {\n install(app: App) {\n Sentry.init({\n app,\n enabled: Env.PROD,\n dsn: Env.VITE_SENTRY_DSN,\n environment: Env.MODE,\n beforeSend(event, hint) {\n if (isErrorIgnored(hint.originalException)) {\n return null\n }\n\n return event\n },\n integrations: [\n new Sentry.BrowserTracing({\n routingInstrumentation: Sentry.vueRouterInstrumentation(router)\n })\n ]\n })\n }\n }\n}\n","import type { Plugin } from 'vue'\n\ndeclare global {\n interface Window {\n CookieScript?: {\n instance?: {\n currentState(): {\n categories: string[]\n }\n }\n }\n }\n}\n\n/**\n * This plugin injects the script for the cookie policy modal.\n * https://cookie-script.com/\n */\nexport function createCookiePolicy(): Plugin {\n return {\n install() {\n const url = '//cdn.cookie-script.com/s/a895bc34a48888cee5d82a82ca1c48fe.js'\n const scriptNode = document.createElement('script')\n scriptNode.setAttribute('src', url)\n document.body.appendChild(scriptNode)\n }\n }\n}\n","import type { App } from 'vue'\nimport { createI18n } from './i18n'\nimport { createPinia } from './pinia'\nimport { createDayjs } from './dayjs'\nimport { createAmpli } from './ampli'\nimport { createSentry } from './sentry'\nimport { createCookiePolicy } from './cookiePolicy'\n\nexport async function createPlugins(app: App) {\n app.use(createSentry())\n app.use(createCookiePolicy())\n app.use(createI18n())\n app.use(createPinia())\n app.use(await createDayjs())\n app.use(createAmpli())\n}\n","import './assets/main.css'\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport router from './router'\nimport { createPlugins } from './plugins'\n\nasync function initialize() {\n const app = createApp(App)\n\n await createPlugins(app)\n\n app.use(router)\n\n app.mount('#app')\n}\n\ninitialize()\n"],"file":"assets/index-87e89cdd.js"}