{"version":3,"file":"index-B6wC_FGA.mjs","sources":["../../../../../node_modules/react/cjs/react.development.js","../../../../../node_modules/react/index.js","../../../../../node_modules/scheduler/cjs/scheduler.development.js","../../../../../node_modules/scheduler/index.js","../../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../../node_modules/react-dom/index.js","../../../../../node_modules/react-dom/client.js","../../../node_modules/redux/dist/redux.mjs","../../../node_modules/immer/dist/immer.mjs","../../../node_modules/redux-thunk/dist/redux-thunk.mjs","../../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.mjs","../../../node_modules/jwt-decode/build/esm/index.js","../../../../../node_modules/moment/dist/moment.js","../../../src/data/auth-cookies/auth-cookies.ts","../../../src/data/redux/slices/auth/auth-slice.mts","../../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js","../../../../../node_modules/use-sync-external-store/with-selector.js","../../../node_modules/react-redux/dist/react-redux.mjs","../../../src/data/redux/slices/event-bus/event-bus-slice.mts","../../../../../node_modules/lodash/lodash.js","../../../src/data/initial-state/intial-state-accessors.mts","../../../src/data/redux/slices/offers/offers-slice.mts","../../../src/data/redux/slices/address/address-slice.ts","../../../src/data/redux/slices/modal/modal-slice.mts","../../../src/data/redux/createStore.mts","../../../src/data/redux/slices/event-bus/event-bus-utils.mts","../../../src/data/redux/slices/event-bus/event-bus-selectors.mts","../../../src/data/redux/slices/auth/auth-utils.mts","../../../../../node_modules/@remix-run/router/dist/router.js","../../../../../node_modules/react-router/dist/index.js","../../../node_modules/@stripe/stripe-js/dist/index.mjs","../../../../../node_modules/dlv/dist/dlv.es.js","../../../../../node_modules/@analytics/type-utils/dist/analytics-util-types.module.js","../../../../../node_modules/analytics-utils/dist/analytics-utils.module.js","../../../../../node_modules/@analytics/global-storage-utils/dist/analytics-util-global-storage.module.js","../../../../../node_modules/@analytics/core/dist/client/core.module.js","../../../../../node_modules/@analytics/cookie-utils/dist/analytics-util-cookie.module.js","../../../../../node_modules/@analytics/localstorage-utils/dist/analytics-util-localstorage.module.js","../../../../../node_modules/@analytics/session-storage-utils/dist/analytics-util-session-storage.module.js","../../../../../node_modules/@analytics/storage-utils/dist/analytics-util-storage.module.js","../../../../../node_modules/analytics/lib/analytics.browser.es.js","../../../../../node_modules/analytics-plugin-google-tag-manager/lib/analytics-plugin-google-tag-manager.browser.es.js","../../../../../node_modules/tslib/tslib.es6.mjs","../../../../../node_modules/@snowplow/tracker-core/node_modules/uuid/lib/rng-browser.js","../../../../../node_modules/@snowplow/tracker-core/node_modules/uuid/lib/bytesToUuid.js","../../../../../node_modules/@snowplow/tracker-core/node_modules/uuid/v1.js","../../../../../node_modules/@snowplow/tracker-core/node_modules/uuid/v4.js","../../../../../node_modules/@snowplow/tracker-core/node_modules/uuid/index.js","../../../../../node_modules/@snowplow/tracker-core/dist/index.module.js","../../../../../node_modules/crypt/crypt.js","../../../../../node_modules/charenc/charenc.js","../../../../../node_modules/sha1/sha1.js","../../../../../node_modules/@snowplow/browser-tracker-core/node_modules/uuid/lib/rng-browser.js","../../../../../node_modules/@snowplow/browser-tracker-core/node_modules/uuid/lib/bytesToUuid.js","../../../../../node_modules/@snowplow/browser-tracker-core/node_modules/uuid/v1.js","../../../../../node_modules/@snowplow/browser-tracker-core/node_modules/uuid/v4.js","../../../../../node_modules/@snowplow/browser-tracker-core/node_modules/uuid/index.js","../../../../../node_modules/@snowplow/browser-tracker-core/dist/index.module.js","../../../../../node_modules/@snowplow/browser-tracker/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-ad-tracking/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-client-hints/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-consent/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-ecommerce/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-enhanced-ecommerce/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-error-tracking/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-form-tracking/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-ga-cookies/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-geolocation/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-link-click-tracking/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-optimizely-x/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-performance-timing/dist/index.module.js","../../../../../node_modules/@snowplow/browser-plugin-site-tracking/dist/index.module.js","../../../../../node_modules/jstimezonedetect/dist/jstz.min.js","../../../../../node_modules/@snowplow/browser-plugin-timezone/dist/index.module.js","../../../../../node_modules/@analytics/snowplow/lib/analytics-plugin-snowplow.browser.es.js","../../../../../node_modules/react-router-dom/dist/index.js","../../../src/data/url/query-params.mts","../../../src/util/partner-selectors.mts","../../../src/util/navigation.mts","../../../../../node_modules/fbq/dist/index.js","../../../node_modules/@snowplow/browser-plugin-button-click-tracking/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-client-hints/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-error-tracking/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-ga-cookies/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-link-click-tracking/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-performance-navigation-timing/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-timezone/dist/index.module.js","../../../node_modules/@snowplow/browser-plugin-web-vitals/dist/index.module.js","../../../../../node_modules/@sentry/core/build/esm/debug-build.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/version.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/worldwide.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/debug-build.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/logger.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/stacktrace.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/handlers.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalError.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/globalUnhandledRejection.js","../../../../../node_modules/@sentry/core/build/esm/carrier.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/is.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/browser.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/string.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/object.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/time.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/misc.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/syncpromise.js","../../../../../node_modules/@sentry/core/build/esm/session.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/propagationContext.js","../../../../../node_modules/@sentry/core/build/esm/utils/merge.js","../../../../../node_modules/@sentry/core/build/esm/utils/spanOnScope.js","../../../../../node_modules/@sentry/core/build/esm/scope.js","../../../../../node_modules/@sentry/core/build/esm/defaultScopes.js","../../../../../node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js","../../../../../node_modules/@sentry/core/build/esm/asyncContext/index.js","../../../../../node_modules/@sentry/core/build/esm/currentScopes.js","../../../../../node_modules/@sentry/core/build/esm/metrics/metric-summary.js","../../../../../node_modules/@sentry/core/build/esm/semanticAttributes.js","../../../../../node_modules/@sentry/core/build/esm/tracing/spanstatus.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/baggage.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/tracing.js","../../../../../node_modules/@sentry/core/build/esm/utils/spanUtils.js","../../../../../node_modules/@sentry/core/build/esm/tracing/errors.js","../../../../../node_modules/@sentry/core/build/esm/tracing/utils.js","../../../../../node_modules/@sentry/core/build/esm/utils/hasTracingEnabled.js","../../../../../node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js","../../../../../node_modules/@sentry/core/build/esm/constants.js","../../../../../node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js","../../../../../node_modules/@sentry/core/build/esm/tracing/logSpans.js","../../../../../node_modules/@sentry/core/build/esm/utils/parseSampleRate.js","../../../../../node_modules/@sentry/core/build/esm/tracing/sampling.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/dsn.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/memo.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/normalize.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/envelope.js","../../../../../node_modules/@sentry/core/build/esm/envelope.js","../../../../../node_modules/@sentry/core/build/esm/tracing/measurement.js","../../../../../node_modules/@sentry/core/build/esm/tracing/sentrySpan.js","../../../../../node_modules/@sentry/core/build/esm/tracing/trace.js","../../../../../node_modules/@sentry/core/build/esm/tracing/idleSpan.js","../../../../../node_modules/@sentry/core/build/esm/eventProcessors.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/debug-ids.js","../../../../../node_modules/@sentry/core/build/esm/utils/applyScopeDataToEvent.js","../../../../../node_modules/@sentry/core/build/esm/utils/prepareEvent.js","../../../../../node_modules/@sentry/core/build/esm/exports.js","../../../../../node_modules/@sentry/core/build/esm/api.js","../../../../../node_modules/@sentry/core/build/esm/integration.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/clientreport.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/error.js","../../../../../node_modules/@sentry/core/build/esm/baseclient.js","../../../../../node_modules/@sentry/core/build/esm/sdk.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/promisebuffer.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/ratelimit.js","../../../../../node_modules/@sentry/core/build/esm/transports/base.js","../../../../../node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js","../../../../../node_modules/@sentry/core/build/esm/utils/sdkMetadata.js","../../../../../node_modules/@sentry/core/build/esm/utils/traceData.js","../../../../../node_modules/@sentry/core/build/esm/breadcrumbs.js","../../../../../node_modules/@sentry/core/build/esm/integrations/functiontostring.js","../../../../../node_modules/@sentry/core/build/esm/integrations/inboundfilters.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/aggregate-errors.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/url.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/console.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/severity.js","../../../../../node_modules/@sentry/core/build/esm/integrations/dedupe.js","../../../../../node_modules/@sentry/core/build/esm/integrations/extraerrordata.js","../../../../../node_modules/@sentry/core/build/esm/integrations/sessiontiming.js","../../../../../node_modules/@sentry/core/build/esm/fetch.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/breadcrumb-log-level.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/supports.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/instrument/fetch.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/env.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/node.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/isBrowser.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/vendor/supportsHistory.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/buildPolyfills/_nullishCoalesce.js","../../../../../node_modules/@sentry/core/build/esm/utils-hoist/buildPolyfills/_optionalChain.js","../../../../../node_modules/@sentry/browser/build/npm/esm/helpers.js","../../../../../node_modules/@sentry/browser/build/npm/esm/debug-build.js","../../../../../node_modules/@sentry/browser/build/npm/esm/eventbuilder.js","../../../../../node_modules/@sentry/browser/build/npm/esm/userfeedback.js","../../../../../node_modules/@sentry/browser/build/npm/esm/client.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/bindReporter.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/types.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/generateUniqueID.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getNavigationEntry.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getActivationStart.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/initMetric.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/observe.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/onHidden.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/runOnce.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/getVisibilityWatcher.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenActivated.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onFCP.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getCLS.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getFID.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/interactions.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/lib/whenIdle.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getINP.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/getLCP.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/web-vitals/onTTFB.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/instrument.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/utils.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/cls.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/browserMetrics.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/dom.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/history.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/getNativeImplementation.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/instrument/xhr.js","../../../../../node_modules/@sentry-internal/browser-utils/build/esm/metrics/inp.js","../../../../../node_modules/@sentry/browser/build/npm/esm/transports/fetch.js","../../../../../node_modules/@sentry/browser/build/npm/esm/stack-parsers.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/breadcrumbs.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/browserapierrors.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/browsersession.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/globalhandlers.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/httpcontext.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/linkederrors.js","../../../../../node_modules/@sentry/browser/build/npm/esm/sdk.js","../../../../../node_modules/@sentry/browser/build/npm/esm/integrations/contextlines.js","../../../../../node_modules/@sentry-internal/replay/build/npm/esm/index.js","../../../../../node_modules/@sentry/browser/build/npm/esm/tracing/request.js","../../../../../node_modules/@sentry/browser/build/npm/esm/tracing/backgroundtab.js","../../../../../node_modules/@sentry/browser/build/npm/esm/tracing/browserTracingIntegration.js","../../../../../node_modules/@sentry/react/build/esm/sdk.js","../../../src/data/local-storage/local-storage.mts","../../../../../node_modules/react-use/esm/factory/createMemo.js","../../../../../node_modules/react-use/esm/factory/createReducerContext.js","../../../../../node_modules/react-use/esm/useFirstMountState.js","../../../../../node_modules/react-use/esm/useUpdateEffect.js","../../../../../node_modules/react-use/esm/factory/createReducer.js","../../../../../node_modules/react-use/esm/factory/createStateContext.js","../../../../../node_modules/react-use/esm/useMountedState.js","../../../../../node_modules/react-use/esm/useAsyncFn.js","../../../../../node_modules/react-use/esm/useAsync.js","../../../../../node_modules/react-use/esm/useAsyncRetry.js","../../../../../node_modules/react-use/esm/useSetState.js","../../../../../node_modules/react-use/esm/misc/parseTimeRanges.js","../../../../../node_modules/react-use/esm/factory/createHTMLMediaHook.js","../../../../../node_modules/react-use/esm/useAudio.js","../../../../../node_modules/react-use/esm/misc/util.js","../../../../../node_modules/fast-deep-equal/react.js","../../../../../node_modules/react-use/esm/useBattery.js","../../../../../node_modules/react-use/esm/useBeforeUnload.js","../../../../../node_modules/react-use/esm/useToggle.js","../../../../../node_modules/react-use/esm/useClickAway.js","../../../../../node_modules/js-cookie/src/js.cookie.js","../../../../../node_modules/react-use/esm/useCookie.js","../../../../../node_modules/toggle-selection/index.js","../../../../../node_modules/copy-to-clipboard/index.js","../../../../../node_modules/react-use/esm/useCopyToClipboard.js","../../../../../node_modules/react-use/esm/useUpdate.js","../../../../../node_modules/react-use/esm/misc/hookState.js","../../../../../node_modules/react-use/esm/useGetSet.js","../../../../../node_modules/react-use/esm/useCounter.js","../../../../../node_modules/nano-css/index.js","../../../../../node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js","../../../../../node_modules/nano-css/addon/cssom.js","../../../../../node_modules/nano-css/addon/vcssom/removeRule.js","../../../../../node_modules/nano-css/addon/vcssom.js","../../../../../node_modules/nano-css/addon/vcssom/cssToTree.js","../../../../../node_modules/react-use/esm/useIsomorphicLayoutEffect.js","../../../../../node_modules/react-use/esm/useCss.js","../../../../../node_modules/react-use/esm/useCustomCompareEffect.js","../../../../../node_modules/react-use/esm/useTimeoutFn.js","../../../../../node_modules/react-use/esm/useDebounce.js","../../../../../node_modules/react-use/esm/useDeepCompareEffect.js","../../../../../node_modules/react-use/esm/useDefault.js","../../../../../node_modules/react-use/esm/useDrop.js","../../../../../node_modules/react-use/esm/useDropArea.js","../../../../../node_modules/react-use/esm/useEffectOnce.js","../../../../../node_modules/react-use/esm/useEnsuredForwardedRef.js","../../../../../node_modules/react-use/esm/useEvent.js","../../../../../node_modules/react-use/esm/useError.js","../../../../../node_modules/react-use/esm/useFavicon.js","../../../../../node_modules/screenfull/dist/screenfull.js","../../../../../node_modules/react-use/esm/useFullscreen.js","../../../../../node_modules/react-use/esm/useGeolocation.js","../../../../../node_modules/react-use/esm/useGetSetState.js","../../../../../node_modules/set-harmonic-interval/lib/index.esm.js","../../../../../node_modules/react-use/esm/useHarmonicIntervalFn.js","../../../../../node_modules/react-use/esm/useHover.js","../../../../../node_modules/react-use/esm/useHoverDirty.js","../../../../../node_modules/throttle-debounce/esm/index.js","../../../../../node_modules/react-use/esm/useIdle.js","../../../../../node_modules/react-use/esm/useIntersection.js","../../../../../node_modules/react-use/esm/useInterval.js","../../../../../node_modules/react-use/esm/useKey.js","../../../../../node_modules/react-use/esm/factory/createBreakpoint.js","../../../../../node_modules/react-use/esm/useKeyPress.js","../../../../../node_modules/react-use/esm/useKeyPressEvent.js","../../../../../node_modules/react-use/esm/useLatest.js","../../../../../node_modules/react-use/esm/useLifecycles.js","../../../../../node_modules/react-use/esm/useList.js","../../../../../node_modules/react-use/esm/useLocalStorage.js","../../../../../node_modules/react-use/esm/useLocation.js","../../../../../node_modules/react-use/esm/useLockBodyScroll.js","../../../../../node_modules/react-use/esm/useLogger.js","../../../../../node_modules/react-use/esm/useLongPress.js","../../../../../node_modules/react-use/esm/useMap.js","../../../../../node_modules/react-use/esm/useMedia.js","../../../../../node_modules/react-use/esm/useMediaDevices.js","../../../../../node_modules/react-use/esm/useMediatedState.js","../../../../../node_modules/react-use/esm/useMethods.js","../../../../../node_modules/react-use/esm/useMotion.js","../../../../../node_modules/react-use/esm/useMount.js","../../../../../node_modules/react-use/esm/useUnmount.js","../../../../../node_modules/react-use/esm/useRafState.js","../../../../../node_modules/react-use/esm/useMouse.js","../../../../../node_modules/react-use/esm/useMouseHovered.js","../../../../../node_modules/react-use/esm/useMouseWheel.js","../../../../../node_modules/react-use/esm/useNetworkState.js","../../../../../node_modules/react-use/esm/useObservable.js","../../../../../node_modules/react-use/esm/useOrientation.js","../../../../../node_modules/react-use/esm/usePageLeave.js","../../../../../node_modules/react-use/esm/usePermission.js","../../../../../node_modules/react-use/esm/usePrevious.js","../../../../../node_modules/react-use/esm/usePreviousDistinct.js","../../../../../node_modules/react-use/esm/usePromise.js","../../../../../node_modules/react-use/esm/useQueue.js","../../../../../node_modules/react-use/esm/useRaf.js","../../../../../node_modules/react-use/esm/useRafLoop.js","../../../../../node_modules/react-use/esm/useSearchParam.js","../../../../../node_modules/react-universal-interface/lib/render.js","../../../../../node_modules/react-universal-interface/lib/wrapInStatefulComponent.js","../../../../../node_modules/react-universal-interface/lib/addClassDecoratorSupport.js","../../../../../node_modules/react-universal-interface/lib/createEnhancer.js","../../../../../node_modules/react-universal-interface/lib/hookToRenderProp.js","../../../../../node_modules/react-universal-interface/lib/index.js","../../../../../node_modules/react-use/esm/useScratch.js","../../../../../node_modules/react-use/esm/useScroll.js","../../../../../node_modules/react-use/esm/useScrolling.js","../../../../../node_modules/react-use/esm/useSessionStorage.js","../../../../../node_modules/fast-shallow-equal/index.js","../../../../../node_modules/react-use/esm/useShallowCompareEffect.js","../../../../../node_modules/react-use/esm/useSize.js","../../../../../node_modules/react-use/esm/useSlider.js","../../../../../node_modules/react-use/esm/useSpeech.js","../../../../../node_modules/react-use/esm/useStartTyping.js","../../../../../node_modules/react-use/esm/useStateWithHistory.js","../../../../../node_modules/react-use/esm/useStateList.js","../../../../../node_modules/react-use/esm/useThrottle.js","../../../../../node_modules/react-use/esm/useThrottleFn.js","../../../../../node_modules/react-use/esm/useTimeout.js","../../../../../node_modules/react-use/esm/useTitle.js","../../../../../node_modules/ts-easing/lib/index.js","../../../../../node_modules/react-use/esm/useTween.js","../../../../../node_modules/react-use/esm/useUnmountPromise.js","../../../../../node_modules/react-use/esm/useUpsert.js","../../../../../node_modules/react-use/esm/useVibrate.js","../../../../../node_modules/react-use/esm/useVideo.js","../../../../../node_modules/react-use/esm/useStateValidator.js","../../../../../node_modules/@xobotyi/scrollbar-width/dist/index.esm.js","../../../../../node_modules/react-use/esm/useScrollbarWidth.js","../../../../../node_modules/react-use/esm/useMultiStateValidator.js","../../../../../node_modules/react-use/esm/useWindowScroll.js","../../../../../node_modules/react-use/esm/useWindowSize.js","../../../../../node_modules/react-use/esm/useMeasure.js","../../../../../node_modules/react-use/esm/usePinchZoom.js","../../../../../node_modules/react-use/esm/useRendersCount.js","../../../../../node_modules/react-use/esm/useSet.js","../../../../../node_modules/react-use/esm/factory/createGlobalState.js","../../../../../node_modules/react-use/esm/useHash.js","../../../src/data/statsig/statsig-client-ref.mts","../../../src/analytics/analytics.mts","../../../src/data/redux/slices/auth/auth-selectors.mts","../../../src/lang/localized-content.mts","../../../src/util/arccos-error.mts","../../../src/data/api/arccos/arccos-api-auth.mts","../../../../../node_modules/@tanstack/query-core/build/modern/subscribable.js","../../../../../node_modules/@tanstack/query-core/build/modern/timeoutManager.js","../../../../../node_modules/@tanstack/query-core/build/modern/utils.js","../../../../../node_modules/@tanstack/query-core/build/modern/focusManager.js","../../../../../node_modules/@tanstack/query-core/build/modern/thenable.js","../../../../../node_modules/@tanstack/query-core/build/modern/hydration.js","../../../../../node_modules/@tanstack/query-core/build/modern/notifyManager.js","../../../../../node_modules/@tanstack/query-core/build/modern/onlineManager.js","../../../../../node_modules/@tanstack/query-core/build/modern/retryer.js","../../../../../node_modules/@tanstack/query-core/build/modern/removable.js","../../../../../node_modules/@tanstack/query-core/build/modern/query.js","../../../../../node_modules/@tanstack/query-core/build/modern/queryObserver.js","../../../../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../../../node_modules/@tanstack/query-core/build/modern/mutation.js","../../../../../node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../../../node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../../../node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../../node_modules/react/jsx-runtime.js","../../../../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js","../../../../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js","../../../../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js","../../../../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js","../../../../../node_modules/@tanstack/react-query/build/modern/suspense.js","../../../../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js","../../../../../node_modules/@tanstack/react-query/build/modern/useQuery.js","../../../src/data/api/arccos/arccos-api.mts","../../../node_modules/uuid/dist/esm-browser/stringify.js","../../../node_modules/uuid/dist/esm-browser/rng.js","../../../node_modules/uuid/dist/esm-browser/native.js","../../../node_modules/uuid/dist/esm-browser/v4.js","../../../src/util/alps-experiment.mts","../../../../../node_modules/@statsig/client-core/src/Log.js","../../../../../node_modules/@statsig/client-core/src/$_StatsigGlobal.js","../../../../../node_modules/@statsig/client-core/src/Diagnostics.js","../../../../../node_modules/@statsig/client-core/src/TypingUtils.js","../../../../../node_modules/@statsig/client-core/src/Hashing.js","../../../../../node_modules/@statsig/client-core/src/CacheKey.js","../../../../../node_modules/@statsig/client-core/src/NetworkConfig.js","../../../../../node_modules/@statsig/client-core/src/SafeJs.js","../../../../../node_modules/@statsig/client-core/src/StatsigEvent.js","../../../../../node_modules/@statsig/client-core/src/StatsigOptionsCommon.js","../../../../../node_modules/@statsig/client-core/src/StorageProvider.js","../../../../../node_modules/@statsig/client-core/src/UrlConfiguration.js","../../../../../node_modules/@statsig/client-core/src/VisibilityObserving.js","../../../../../node_modules/@statsig/client-core/src/EventLogger.js","../../../../../node_modules/@statsig/client-core/src/StatsigMetadata.js","../../../../../node_modules/@statsig/client-core/src/ClientInterfaces.js","../../../../../node_modules/@statsig/client-core/src/UUID.js","../../../../../node_modules/@statsig/client-core/src/StableID.js","../../../../../node_modules/@statsig/client-core/src/StatsigUser.js","../../../../../node_modules/@statsig/client-core/src/TypedJsonParse.js","../../../../../node_modules/@statsig/client-core/src/DataAdapterCore.js","../../../../../node_modules/@statsig/client-core/src/DownloadConfigSpecsResponse.js","../../../../../node_modules/@statsig/client-core/src/SDKType.js","../../../../../node_modules/@statsig/client-core/src/ErrorBoundary.js","../../../../../node_modules/@statsig/client-core/src/EvaluationOptions.js","../../../../../node_modules/@statsig/client-core/src/EvaluationTypes.js","../../../../../node_modules/@statsig/client-core/src/InitializeResponse.js","../../../../../node_modules/@statsig/client-core/src/MemoKey.js","../../../../../node_modules/@statsig/client-core/src/DnsTxtQuery.js","../../../../../node_modules/@statsig/client-core/src/NetworkFallbackResolver.js","../../../../../node_modules/@statsig/client-core/src/SDKFlags.js","../../../../../node_modules/@statsig/client-core/src/SessionID.js","../../../../../node_modules/@statsig/client-core/src/StatsigClientEventEmitter.js","../../../../../node_modules/@statsig/client-core/src/NetworkCore.js","../../../../../node_modules/@statsig/client-core/src/OverrideAdapter.js","../../../../../node_modules/@statsig/client-core/src/ParamStoreTypes.js","../../../../../node_modules/@statsig/client-core/src/SizeOf.js","../../../../../node_modules/@statsig/client-core/src/StatsigClientBase.js","../../../../../node_modules/@statsig/client-core/src/StatsigDataAdapter.js","../../../../../node_modules/@statsig/client-core/src/StatsigPlugin.js","../../../../../node_modules/@statsig/client-core/src/StatsigTypeFactories.js","../../../../../node_modules/@statsig/client-core/src/StatsigTypes.js","../../../../../node_modules/@statsig/client-core/src/StatsigUpdateDetails.js","../../../../../node_modules/@statsig/client-core/src/index.js","../../../../../node_modules/@statsig/react-bindings/src/NoopEvaluationsClient.js","../../../../../node_modules/@statsig/react-bindings/src/StatsigContext.js","../../../../../node_modules/@statsig/js-client/src/V1InitializeContainer.js","../../../../../node_modules/@statsig/js-client/src/V2InitializeContainer.js","../../../../../node_modules/@statsig/js-client/src/EvaluationStore.js","../../../../../node_modules/@statsig/js-client/src/EvaluationResponseDeltas.js","../../../../../node_modules/@statsig/js-client/src/Network.js","../../../../../node_modules/@statsig/js-client/src/ParamStoreGetterFactory.js","../../../../../node_modules/@statsig/js-client/src/StatsigEvaluationsDataAdapter.js","../../../../../node_modules/@statsig/js-client/src/StatsigClient.js","../../../../../node_modules/@statsig/js-client/src/index.js","../../../../../node_modules/@statsig/react-bindings/src/useStatsigInternalClientFactoryAsync.js","../../../../../node_modules/@statsig/react-bindings/src/useClientAsyncInit.js","../../../../../node_modules/@statsig/react-bindings/src/StatsigProvider.js","../../../../../node_modules/@statsig/react-bindings/src/useStatsigInternalClientFactoryBootstrap.js","../../../../../node_modules/@statsig/react-bindings/src/useClientBootstrapInit.js","../../../../../node_modules/@statsig/react-bindings/src/useDynamicConfig.js","../../../../../node_modules/@statsig/react-bindings/src/useExperiment.js","../../../../../node_modules/@statsig/react-bindings/src/useFeatureGate.js","../../../../../node_modules/@statsig/react-bindings/src/useGateValue.js","../../../../../node_modules/@statsig/react-bindings/src/useLayer.js","../../../../../node_modules/@statsig/react-bindings/src/useParameterStore.js","../../../../../node_modules/@statsig/react-bindings/src/useStatsigClient.js","../../../../../node_modules/@statsig/react-bindings/src/useStatsigUser.js","../../../../../node_modules/@statsig/react-bindings/src/index.js","../../../src/util/stripe-experiment.mts","../../../src/util/url-params.mts","../../../src/util/stripe-prefetch-utils.ts","../../../src/data/server-analytics/fire-mid-funnel.mts","../../../src/util/conversion-event-id.mts","../../../src/data/api/query/offers.mts","../../../../../node_modules/logrocket/dist/build.umd.js","../../../src/util/logrocket-hook.mts","../../../src/app/common-components/svg-components/circled-exclamation.tsx","../../../src/app/error/error-display.tsx","../../../src/app/no-offers/no-offers-available.tsx","../../../src/util/input-validation-utils.ts","../../../src/app/common-components/loading/loading.tsx","../../../src/app/pages/nucap-landing-page/main-section/nucap-main-section.tsx","../../../src/app/pages/alps-landing-page/link-pro-section.tsx","../../../src/app/pages/smart-laser/sections/features-section/features-section-card-backs.tsx","../../../src/app/pages/nucap-landing-page/review-section/card-carousel/dot-container/dot-container.tsx","../../../src/app/pages/nucap-landing-page/review-section/testimonial-card.tsx","../../../src/app/pages/nucap-landing-page/review-section/card-carousel/card-carousel.tsx","../../../src/app/common-components/mmg_content.tsx","../../../src/app/pages/nucap-landing-page/review-section/review-section.tsx","../../../src/app/pages/nucap-landing-page/billion-shots-section/billion-shots-section.tsx","../../../../../node_modules/lodash/_listCacheClear.js","../../../../../node_modules/lodash/eq.js","../../../../../node_modules/lodash/_assocIndexOf.js","../../../../../node_modules/lodash/_listCacheDelete.js","../../../../../node_modules/lodash/_listCacheGet.js","../../../../../node_modules/lodash/_listCacheHas.js","../../../../../node_modules/lodash/_listCacheSet.js","../../../../../node_modules/lodash/_ListCache.js","../../../../../node_modules/lodash/_stackClear.js","../../../../../node_modules/lodash/_stackDelete.js","../../../../../node_modules/lodash/_stackGet.js","../../../../../node_modules/lodash/_stackHas.js","../../../../../node_modules/lodash/_freeGlobal.js","../../../../../node_modules/lodash/_root.js","../../../../../node_modules/lodash/_Symbol.js","../../../../../node_modules/lodash/_getRawTag.js","../../../../../node_modules/lodash/_objectToString.js","../../../../../node_modules/lodash/_baseGetTag.js","../../../../../node_modules/lodash/isObject.js","../../../../../node_modules/lodash/isFunction.js","../../../../../node_modules/lodash/_coreJsData.js","../../../../../node_modules/lodash/_isMasked.js","../../../../../node_modules/lodash/_toSource.js","../../../../../node_modules/lodash/_baseIsNative.js","../../../../../node_modules/lodash/_getValue.js","../../../../../node_modules/lodash/_getNative.js","../../../../../node_modules/lodash/_Map.js","../../../../../node_modules/lodash/_nativeCreate.js","../../../../../node_modules/lodash/_hashClear.js","../../../../../node_modules/lodash/_hashDelete.js","../../../../../node_modules/lodash/_hashGet.js","../../../../../node_modules/lodash/_hashHas.js","../../../../../node_modules/lodash/_hashSet.js","../../../../../node_modules/lodash/_Hash.js","../../../../../node_modules/lodash/_mapCacheClear.js","../../../../../node_modules/lodash/_isKeyable.js","../../../../../node_modules/lodash/_getMapData.js","../../../../../node_modules/lodash/_mapCacheDelete.js","../../../../../node_modules/lodash/_mapCacheGet.js","../../../../../node_modules/lodash/_mapCacheHas.js","../../../../../node_modules/lodash/_mapCacheSet.js","../../../../../node_modules/lodash/_MapCache.js","../../../../../node_modules/lodash/_stackSet.js","../../../../../node_modules/lodash/_Stack.js","../../../../../node_modules/lodash/_setCacheAdd.js","../../../../../node_modules/lodash/_setCacheHas.js","../../../../../node_modules/lodash/_SetCache.js","../../../../../node_modules/lodash/_Uint8Array.js","../../../../../node_modules/lodash/_equalByTag.js","../../../../../node_modules/lodash/isObjectLike.js","../../../../../node_modules/lodash/_baseIsArguments.js","../../../../../node_modules/lodash/isArguments.js","../../../../../node_modules/lodash/stubFalse.js","../../../../../node_modules/lodash/isBuffer.js","../../../../../node_modules/lodash/_nodeUtil.js","../../../../../node_modules/lodash/isTypedArray.js","../../../../../node_modules/lodash/_DataView.js","../../../../../node_modules/lodash/_Promise.js","../../../../../node_modules/lodash/_Set.js","../../../../../node_modules/lodash/_WeakMap.js","../../../../../node_modules/lodash/_getTag.js","../../../src/app/pages/nucap-landing-page/animation-section/utils.ts","../../../src/util/view-utils.mts","../../../src/app/pages/nucap-landing-page/animation-section/animation-carousel.tsx","../../../src/app/pages/nucap-landing-page/animation-section/animation-section.tsx","../../../src/app/pages/nucap-landing-page/v2/phone-screen-section/phone-screen-section.tsx","../../../src/app/pages/full-content-landing-page/sections/skillest-giveaway/skillest-giveaway.tsx","../../../src/app/pages/nucap-landing-page/nucap-landing-page.tsx","../../../src/app/pages/smart-laser/sections/features-section/features-section.tsx","../../../src/app/pages/smart-laser/audio-manager.tsx","../../../src/app/pages/smart-laser/sections/inline-video-section/inline-video-section.tsx","../../../src/app/pages/alps-landing-page/sensor-link-comparison-section/comparison-column.tsx","../../../src/app/pages/alps-landing-page/sensor-link-comparison-section/sensor-link-comparison-section.tsx","../../../src/app/pages/smart-laser/sections/testimonials-section/testimonial-card.tsx","../../../src/app/pages/smart-laser/sections/testimonials-section/testimonials-section.tsx","../../../src/app/pages/alps-landing-page/wrap-up-section/wrap-up-section.tsx","../../../src/app/pages/alps-landing-page/alps-landing-page.tsx","../../../src/app/pages/alps-landing-page/alps-landing-page-generic.tsx","../../../src/app/pages/alps-next/components/primary-button/primary-button.tsx","../../../src/app/pages/alps-next/components/hero-section/hero-section.tsx","../../../../../node_modules/react-fast-marquee/dist/index.js","../../../src/app/pages/alps-next/components/marquee-section/marquee-section.tsx","../../../src/app/pages/alps-next/components/linkpro-section/linkpro-section.tsx","../../../src/app/pages/alps-next/components/caption-card/caption-card.tsx","../../../src/app/pages/alps-next/components/captions-section/captions-section.tsx","../../../src/app/pages/alps-next/components/pre-footer-section/pre-footer-section.tsx","../../../src/app/pages/alps-next/components/floating-primary-cta/floating-primary-cta.tsx","../../../src/app/pages/alps-next/components/testimonial-card/testimonial-card.tsx","../../../src/app/pages/alps-next/components/pros-section/pros-section.tsx","../../../src/app/pages/alps-next/components/member-spotlight/custom-playbutton.svg","../../../src/app/pages/alps-next/components/member-spotlight/member-spotlight.tsx","../../../src/util/air-seo.mts","../../../src/app/pages/alps-next/spotlight-configs.tsx","../../../src/app/pages/alps-next/components/faq-section/faq-section.tsx","../../../src/app/pages/alps-next/alps-next.tsx","../../../src/app/pages/alps-next/components/success/appstore-links/appstore-links.tsx","../../../src/data/impact/send-impact-conversion.mts","../../../src/data/server-analytics/fire-server-analytics.mts","../../../src/app/pages/alps-next/components/success/alps-next-success.tsx","../../../src/app/common-components/client-only/client-only.tsx","../../../src/app/common-components/video-buttons/large-video-button.tsx","../../../src/app/common-components/forms/create-account-form.tsx","../../../src/app/pages/nucap-landing-page/v2/hero-section/hero-section.tsx","../../../src/app/pages/nucap-landing-page/v2/nucap-landing-page-v2.tsx","../../../../web-subscriptions/src/models/CountryCodes.ts","../../../../web-subscriptions/src/models/USStateCodes.ts","../../../src/app/pages/payment/shipping-utils.ts","../../../src/app/pages/alps-next/components/checkout-icon/checkout-icon.tsx","../../../src/app/pages/payment/link/link-offer.tsx","../../../src/app/pages/payment/sensor-addon.tsx","../../../../../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../../../../../node_modules/prop-types/node_modules/react-is/index.js","../../../../../node_modules/object-assign/index.js","../../../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../node_modules/prop-types/lib/has.js","../../../../../node_modules/prop-types/checkPropTypes.js","../../../../../node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../node_modules/prop-types/index.js","../../../node_modules/@stripe/react-stripe-js/dist/react-stripe.esm.mjs","../../../node_modules/@snowplow/browser-tracker/node_modules/@snowplow/tracker-core/dist/index.module.js","../../../node_modules/@snowplow/browser-tracker/node_modules/@snowplow/browser-tracker-core/dist/index.module.js","../../../node_modules/@snowplow/browser-tracker/dist/index.module.js","../../../src/app/pages/payment/sensorless-popup/sensorless-popup.tsx","../../../src/app/pages/payment/link/link-pro-popup.tsx","../../../src/util/link-pro-price-utils.mts","../../../src/app/pages/payment/link/link-pro-trial-popup/link-pro-trial-popup.tsx","../../../src/app/pages/payment/payment-components/payment-page-modals.tsx","../../../src/app/common-components/svg-components/circled-arccos-crown.tsx","../../../src/app/pages/payment/line-item.tsx","../../../src/app/pages/payment/payment-components/product-details.tsx","../../../src/app/pages/payment/payment-components/ck14-product-details.tsx","../../../src/app/pages/payment/payment-components/license-agreement-link.tsx","../../../src/app/pages/payment/payment-components/privacy-policy-link.tsx","../../../src/app/pages/payment/payment-components/disclaimer.tsx","../../../src/app/pages/payment/payment-components/age-disclaimer.tsx","../../../src/app/pages/payment/payment-components/titleist-privacy-notice-link.tsx","../../../src/app/pages/payment/payment-methods/credit-card/credit-card-mark.tsx","../../../src/app/pages/payment/payment-methods/stripe/stripe.tsx","../../../src/app/pages/payment/payment-components/alps-next-line-item.tsx","../../../src/app/pages/payment/payment-components/alps-next-product-details.tsx","../../../src/app/pages/payment/payment.tsx","../../../src/app/pages/success/success.tsx","../../../src/app/main/routes/routes.tsx","../../../src/app/main/transition-context.tsx","../../../src/app/mask/mask.tsx","../../../src/analytics/shared-analytics.mts","../../../src/app/common-components/svg-components/carat.tsx","../../../src/app/common-components/footer/footer.tsx","../../../src/app/pages/alps-next/components/footer/footer.tsx","../../../src/app/main/conditional-footer-manager.tsx","../../../src/data/redux/slices/modal/modal-selectors.mts","../../../src/app/common-components/modal/modal.tsx","../../../src/app/cookie-consent/cookie-consent.tsx","../../../src/app/common-components/header/partner-header.tsx","../../../src/app/common-components/header/header.tsx","../../../src/app/pages/alps-next/components/header/crown-lockup.tsx","../../../src/app/pages/alps-next/components/header/partner-logo.tsx","../../../src/app/pages/alps-next/components/header/header.tsx","../../../src/app/main/conditional-header-manager.tsx","../../../src/app/main/main.tsx","../../../../../node_modules/react-error-boundary/dist/react-error-boundary.development.esm.js","../../../src/app/error/error-boundary.tsx","../../../../../node_modules/@tanstack/query-sync-storage-persister/build/modern/utils.js","../../../../../node_modules/@tanstack/query-sync-storage-persister/build/modern/index.js","../../../../../node_modules/@tanstack/query-persist-client-core/build/modern/persist.js","../../../src/app/app.tsx","../../../src/io/client/arccos-event-bus.mts","../../../src/entry-client.tsx"],"sourcesContent":["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var ReactVersion = '18.3.1';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n  /**\n   * @internal\n   * @type {ReactComponent}\n   */\n  current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n  transition: null\n};\n\nvar ReactCurrentActQueue = {\n  current: null,\n  // Used to reproduce behavior of `batchedUpdates` in legacy mode.\n  isBatchingLegacy: false,\n  didScheduleLegacyUpdate: false\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n  /**\n   * @internal\n   * @type {ReactComponent}\n   */\n  current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n  {\n    currentExtraStackFrame = stack;\n  }\n}\n\n{\n  ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n    {\n      currentExtraStackFrame = stack;\n    }\n  }; // Stack implementation injected by the current renderer.\n\n\n  ReactDebugCurrentFrame.getCurrentStack = null;\n\n  ReactDebugCurrentFrame.getStackAddendum = function () {\n    var stack = ''; // Add an extra top frame while an element is being validated\n\n    if (currentExtraStackFrame) {\n      stack += currentExtraStackFrame;\n    } // Delegate to the injected renderer-specific implementation\n\n\n    var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n    if (impl) {\n      stack += impl() || '';\n    }\n\n    return stack;\n  };\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar ReactSharedInternals = {\n  ReactCurrentDispatcher: ReactCurrentDispatcher,\n  ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n  ReactCurrentOwner: ReactCurrentOwner\n};\n\n{\n  ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n  ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n  {\n    {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      printWarning('warn', format, args);\n    }\n  }\n}\nfunction error(format) {\n  {\n    {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n  {\n    var _constructor = publicInstance.constructor;\n    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n    var warningKey = componentName + \".\" + callerName;\n\n    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n      return;\n    }\n\n    error(\"Can't call %s on a component that is not yet mounted. \" + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);\n\n    didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n  }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n  /**\n   * Checks whether or not this composite component is mounted.\n   * @param {ReactClass} publicInstance The instance we want to test.\n   * @return {boolean} True if mounted, false otherwise.\n   * @protected\n   * @final\n   */\n  isMounted: function (publicInstance) {\n    return false;\n  },\n\n  /**\n   * Forces an update. This should only be invoked when it is known with\n   * certainty that we are **not** in a DOM transaction.\n   *\n   * You may want to call this when you know that some deeper aspect of the\n   * component's state has changed but `setState` was not called.\n   *\n   * This will not invoke `shouldComponentUpdate`, but it will invoke\n   * `componentWillUpdate` and `componentDidUpdate`.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} callerName name of the calling function in the public API.\n   * @internal\n   */\n  enqueueForceUpdate: function (publicInstance, callback, callerName) {\n    warnNoop(publicInstance, 'forceUpdate');\n  },\n\n  /**\n   * Replaces all of the state. Always use this or `setState` to mutate state.\n   * You should treat `this.state` as immutable.\n   *\n   * There is no guarantee that `this.state` will be immediately updated, so\n   * accessing `this.state` after calling this method may return the old value.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {object} completeState Next state.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} callerName name of the calling function in the public API.\n   * @internal\n   */\n  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n    warnNoop(publicInstance, 'replaceState');\n  },\n\n  /**\n   * Sets a subset of the state. This only exists because _pendingState is\n   * internal. This provides a merging strategy that is not available to deep\n   * properties which is confusing. TODO: Expose pendingState or don't use it\n   * during the merge.\n   *\n   * @param {ReactClass} publicInstance The instance that should rerender.\n   * @param {object} partialState Next partial state to be merged with state.\n   * @param {?function} callback Called after component is updated.\n   * @param {?string} Name of the calling function in the public API.\n   * @internal\n   */\n  enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n    warnNoop(publicInstance, 'setState');\n  }\n};\n\nvar assign = Object.assign;\n\nvar emptyObject = {};\n\n{\n  Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n  this.props = props;\n  this.context = context; // If a component has string refs, we will assign a different object later.\n\n  this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n  // renderer.\n\n  this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together.  You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n *        produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n  if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {\n    throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');\n  }\n\n  this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n  var deprecatedAPIs = {\n    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n  };\n\n  var defineDeprecationWarning = function (methodName, info) {\n    Object.defineProperty(Component.prototype, methodName, {\n      get: function () {\n        warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n        return undefined;\n      }\n    });\n  };\n\n  for (var fnName in deprecatedAPIs) {\n    if (deprecatedAPIs.hasOwnProperty(fnName)) {\n      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n    }\n  }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n  this.props = props;\n  this.context = context; // If a component has string refs, we will assign a different object later.\n\n  this.refs = emptyObject;\n  this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n  var refObject = {\n    current: null\n  };\n\n  {\n    Object.seal(refObject);\n  }\n\n  return refObject;\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar RESERVED_PROPS = {\n  key: true,\n  ref: true,\n  __self: true,\n  __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n  didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n  {\n    if (hasOwnProperty.call(config, 'ref')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n  {\n    if (hasOwnProperty.call(config, 'key')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n  var warnAboutAccessingKey = function () {\n    {\n      if (!specialPropKeyWarningShown) {\n        specialPropKeyWarningShown = true;\n\n        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    }\n  };\n\n  warnAboutAccessingKey.isReactWarning = true;\n  Object.defineProperty(props, 'key', {\n    get: warnAboutAccessingKey,\n    configurable: true\n  });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n  var warnAboutAccessingRef = function () {\n    {\n      if (!specialPropRefWarningShown) {\n        specialPropRefWarningShown = true;\n\n        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    }\n  };\n\n  warnAboutAccessingRef.isReactWarning = true;\n  Object.defineProperty(props, 'ref', {\n    get: warnAboutAccessingRef,\n    configurable: true\n  });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n  {\n    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n      var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n      if (!didWarnAboutStringRefs[componentName]) {\n        error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);\n\n        didWarnAboutStringRefs[componentName] = true;\n      }\n    }\n  }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n  var element = {\n    // This tag allows us to uniquely identify this as a React Element\n    $$typeof: REACT_ELEMENT_TYPE,\n    // Built-in properties that belong on the element\n    type: type,\n    key: key,\n    ref: ref,\n    props: props,\n    // Record the component responsible for creating this element.\n    _owner: owner\n  };\n\n  {\n    // The validation flag is currently mutative. We put it on\n    // an external backing store so that we can freeze the whole object.\n    // This can be replaced with a WeakMap once they are implemented in\n    // commonly used development environments.\n    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n    // the validation flag non-enumerable (where possible, which should\n    // include every environment we run tests in), so the test framework\n    // ignores it.\n\n    Object.defineProperty(element._store, 'validated', {\n      configurable: false,\n      enumerable: false,\n      writable: true,\n      value: false\n    }); // self and source are DEV only properties.\n\n    Object.defineProperty(element, '_self', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: self\n    }); // Two elements created in two different places should be considered\n    // equal for testing purposes and therefore we hide it from enumeration.\n\n    Object.defineProperty(element, '_source', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: source\n    });\n\n    if (Object.freeze) {\n      Object.freeze(element.props);\n      Object.freeze(element);\n    }\n  }\n\n  return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n  var propName; // Reserved names are extracted\n\n  var props = {};\n  var key = null;\n  var ref = null;\n  var self = null;\n  var source = null;\n\n  if (config != null) {\n    if (hasValidRef(config)) {\n      ref = config.ref;\n\n      {\n        warnIfStringRefCannotBeAutoConverted(config);\n      }\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    }\n\n    self = config.__self === undefined ? null : config.__self;\n    source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        props[propName] = config[propName];\n      }\n    }\n  } // Children can be more than one argument, and those are transferred onto\n  // the newly allocated props object.\n\n\n  var childrenLength = arguments.length - 2;\n\n  if (childrenLength === 1) {\n    props.children = children;\n  } else if (childrenLength > 1) {\n    var childArray = Array(childrenLength);\n\n    for (var i = 0; i < childrenLength; i++) {\n      childArray[i] = arguments[i + 2];\n    }\n\n    {\n      if (Object.freeze) {\n        Object.freeze(childArray);\n      }\n    }\n\n    props.children = childArray;\n  } // Resolve default props\n\n\n  if (type && type.defaultProps) {\n    var defaultProps = type.defaultProps;\n\n    for (propName in defaultProps) {\n      if (props[propName] === undefined) {\n        props[propName] = defaultProps[propName];\n      }\n    }\n  }\n\n  {\n    if (key || ref) {\n      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n      if (key) {\n        defineKeyPropWarningGetter(props, displayName);\n      }\n\n      if (ref) {\n        defineRefPropWarningGetter(props, displayName);\n      }\n    }\n  }\n\n  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n  return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n  if (element === null || element === undefined) {\n    throw new Error(\"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\");\n  }\n\n  var propName; // Original props are copied\n\n  var props = assign({}, element.props); // Reserved names are extracted\n\n  var key = element.key;\n  var ref = element.ref; // Self is preserved since the owner is preserved.\n\n  var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n  // transpiler, and the original source is probably a better indicator of the\n  // true owner.\n\n  var source = element._source; // Owner will be preserved, unless ref is overridden\n\n  var owner = element._owner;\n\n  if (config != null) {\n    if (hasValidRef(config)) {\n      // Silently steal the ref from the parent.\n      ref = config.ref;\n      owner = ReactCurrentOwner.current;\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    } // Remaining properties override existing props\n\n\n    var defaultProps;\n\n    if (element.type && element.type.defaultProps) {\n      defaultProps = element.type.defaultProps;\n    }\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        if (config[propName] === undefined && defaultProps !== undefined) {\n          // Resolve default props\n          props[propName] = defaultProps[propName];\n        } else {\n          props[propName] = config[propName];\n        }\n      }\n    }\n  } // Children can be more than one argument, and those are transferred onto\n  // the newly allocated props object.\n\n\n  var childrenLength = arguments.length - 2;\n\n  if (childrenLength === 1) {\n    props.children = children;\n  } else if (childrenLength > 1) {\n    var childArray = Array(childrenLength);\n\n    for (var i = 0; i < childrenLength; i++) {\n      childArray[i] = arguments[i + 2];\n    }\n\n    props.children = childArray;\n  }\n\n  return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n  var escapeRegex = /[=:]/g;\n  var escaperLookup = {\n    '=': '=0',\n    ':': '=2'\n  };\n  var escapedString = key.replace(escapeRegex, function (match) {\n    return escaperLookup[match];\n  });\n  return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n  return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n  // Do some typechecking here since we call this blindly. We want to ensure\n  // that we don't block potential future ES APIs.\n  if (typeof element === 'object' && element !== null && element.key != null) {\n    // Explicit key\n    {\n      checkKeyStringCoercion(element.key);\n    }\n\n    return escape('' + element.key);\n  } // Implicit key determined by the index in the set\n\n\n  return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n  var type = typeof children;\n\n  if (type === 'undefined' || type === 'boolean') {\n    // All of the above are perceived as null.\n    children = null;\n  }\n\n  var invokeCallback = false;\n\n  if (children === null) {\n    invokeCallback = true;\n  } else {\n    switch (type) {\n      case 'string':\n      case 'number':\n        invokeCallback = true;\n        break;\n\n      case 'object':\n        switch (children.$$typeof) {\n          case REACT_ELEMENT_TYPE:\n          case REACT_PORTAL_TYPE:\n            invokeCallback = true;\n        }\n\n    }\n  }\n\n  if (invokeCallback) {\n    var _child = children;\n    var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n    // so that it's consistent if the number of children grows:\n\n    var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n    if (isArray(mappedChild)) {\n      var escapedChildKey = '';\n\n      if (childKey != null) {\n        escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n      }\n\n      mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n        return c;\n      });\n    } else if (mappedChild != null) {\n      if (isValidElement(mappedChild)) {\n        {\n          // The `if` statement here prevents auto-disabling of the safe\n          // coercion ESLint rule, so we must manually disable it below.\n          // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n          if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {\n            checkKeyStringCoercion(mappedChild.key);\n          }\n        }\n\n        mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n        // traverseAllChildren used to do for objects as children\n        escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n        mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n        // eslint-disable-next-line react-internal/safe-string-coercion\n        escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n      }\n\n      array.push(mappedChild);\n    }\n\n    return 1;\n  }\n\n  var child;\n  var nextName;\n  var subtreeCount = 0; // Count of children found in the current subtree.\n\n  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n  if (isArray(children)) {\n    for (var i = 0; i < children.length; i++) {\n      child = children[i];\n      nextName = nextNamePrefix + getElementKey(child, i);\n      subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n    }\n  } else {\n    var iteratorFn = getIteratorFn(children);\n\n    if (typeof iteratorFn === 'function') {\n      var iterableChildren = children;\n\n      {\n        // Warn about using Maps as children\n        if (iteratorFn === iterableChildren.entries) {\n          if (!didWarnAboutMaps) {\n            warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n          }\n\n          didWarnAboutMaps = true;\n        }\n      }\n\n      var iterator = iteratorFn.call(iterableChildren);\n      var step;\n      var ii = 0;\n\n      while (!(step = iterator.next()).done) {\n        child = step.value;\n        nextName = nextNamePrefix + getElementKey(child, ii++);\n        subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n      }\n    } else if (type === 'object') {\n      // eslint-disable-next-line react-internal/safe-string-coercion\n      var childrenString = String(children);\n      throw new Error(\"Objects are not valid as a React child (found: \" + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n    }\n  }\n\n  return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n  if (children == null) {\n    return children;\n  }\n\n  var result = [];\n  var count = 0;\n  mapIntoArray(children, result, '', '', function (child) {\n    return func.call(context, child, count++);\n  });\n  return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n  var n = 0;\n  mapChildren(children, function () {\n    n++; // Don't return anything\n  });\n  return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n  mapChildren(children, function () {\n    forEachFunc.apply(this, arguments); // Don't return anything.\n  }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n  return mapChildren(children, function (child) {\n    return child;\n  }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n  if (!isValidElement(children)) {\n    throw new Error('React.Children.only expected to receive a single React element child.');\n  }\n\n  return children;\n}\n\nfunction createContext(defaultValue) {\n  // TODO: Second argument used to be an optional `calculateChangedBits`\n  // function. Warn to reserve for future use?\n  var context = {\n    $$typeof: REACT_CONTEXT_TYPE,\n    // As a workaround to support multiple concurrent renderers, we categorize\n    // some renderers as primary and others as secondary. We only expect\n    // there to be two concurrent renderers at most: React Native (primary) and\n    // Fabric (secondary); React DOM (primary) and React ART (secondary).\n    // Secondary renderers store their context values on separate fields.\n    _currentValue: defaultValue,\n    _currentValue2: defaultValue,\n    // Used to track how many concurrent renderers this context currently\n    // supports within in a single renderer. Such as parallel server rendering.\n    _threadCount: 0,\n    // These are circular\n    Provider: null,\n    Consumer: null,\n    // Add these to use same hidden class in VM as ServerContext\n    _defaultValue: null,\n    _globalName: null\n  };\n  context.Provider = {\n    $$typeof: REACT_PROVIDER_TYPE,\n    _context: context\n  };\n  var hasWarnedAboutUsingNestedContextConsumers = false;\n  var hasWarnedAboutUsingConsumerProvider = false;\n  var hasWarnedAboutDisplayNameOnConsumer = false;\n\n  {\n    // A separate object, but proxies back to the original context object for\n    // backwards compatibility. It has a different $$typeof, so we can properly\n    // warn for the incorrect usage of Context as a Consumer.\n    var Consumer = {\n      $$typeof: REACT_CONTEXT_TYPE,\n      _context: context\n    }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n    Object.defineProperties(Consumer, {\n      Provider: {\n        get: function () {\n          if (!hasWarnedAboutUsingConsumerProvider) {\n            hasWarnedAboutUsingConsumerProvider = true;\n\n            error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n          }\n\n          return context.Provider;\n        },\n        set: function (_Provider) {\n          context.Provider = _Provider;\n        }\n      },\n      _currentValue: {\n        get: function () {\n          return context._currentValue;\n        },\n        set: function (_currentValue) {\n          context._currentValue = _currentValue;\n        }\n      },\n      _currentValue2: {\n        get: function () {\n          return context._currentValue2;\n        },\n        set: function (_currentValue2) {\n          context._currentValue2 = _currentValue2;\n        }\n      },\n      _threadCount: {\n        get: function () {\n          return context._threadCount;\n        },\n        set: function (_threadCount) {\n          context._threadCount = _threadCount;\n        }\n      },\n      Consumer: {\n        get: function () {\n          if (!hasWarnedAboutUsingNestedContextConsumers) {\n            hasWarnedAboutUsingNestedContextConsumers = true;\n\n            error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n          }\n\n          return context.Consumer;\n        }\n      },\n      displayName: {\n        get: function () {\n          return context.displayName;\n        },\n        set: function (displayName) {\n          if (!hasWarnedAboutDisplayNameOnConsumer) {\n            warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n            hasWarnedAboutDisplayNameOnConsumer = true;\n          }\n        }\n      }\n    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n    context.Consumer = Consumer;\n  }\n\n  {\n    context._currentRenderer = null;\n    context._currentRenderer2 = null;\n  }\n\n  return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n  if (payload._status === Uninitialized) {\n    var ctor = payload._result;\n    var thenable = ctor(); // Transition to the next state.\n    // This might throw either because it's missing or throws. If so, we treat it\n    // as still uninitialized and try again next time. Which is the same as what\n    // happens if the ctor or any wrappers processing the ctor throws. This might\n    // end up fixing it if the resolution was a concurrency bug.\n\n    thenable.then(function (moduleObject) {\n      if (payload._status === Pending || payload._status === Uninitialized) {\n        // Transition to the next state.\n        var resolved = payload;\n        resolved._status = Resolved;\n        resolved._result = moduleObject;\n      }\n    }, function (error) {\n      if (payload._status === Pending || payload._status === Uninitialized) {\n        // Transition to the next state.\n        var rejected = payload;\n        rejected._status = Rejected;\n        rejected._result = error;\n      }\n    });\n\n    if (payload._status === Uninitialized) {\n      // In case, we're still uninitialized, then we're waiting for the thenable\n      // to resolve. Set it as pending in the meantime.\n      var pending = payload;\n      pending._status = Pending;\n      pending._result = thenable;\n    }\n  }\n\n  if (payload._status === Resolved) {\n    var moduleObject = payload._result;\n\n    {\n      if (moduleObject === undefined) {\n        error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n  ' + // Break up imports to avoid accidentally parsing them as dependencies.\n        'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\\n\\n\" + 'Did you accidentally put curly braces around the import?', moduleObject);\n      }\n    }\n\n    {\n      if (!('default' in moduleObject)) {\n        error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n  ' + // Break up imports to avoid accidentally parsing them as dependencies.\n        'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n      }\n    }\n\n    return moduleObject.default;\n  } else {\n    throw payload._result;\n  }\n}\n\nfunction lazy(ctor) {\n  var payload = {\n    // We use these fields to store the result.\n    _status: Uninitialized,\n    _result: ctor\n  };\n  var lazyType = {\n    $$typeof: REACT_LAZY_TYPE,\n    _payload: payload,\n    _init: lazyInitializer\n  };\n\n  {\n    // In production, this would just set it on the object.\n    var defaultProps;\n    var propTypes; // $FlowFixMe\n\n    Object.defineProperties(lazyType, {\n      defaultProps: {\n        configurable: true,\n        get: function () {\n          return defaultProps;\n        },\n        set: function (newDefaultProps) {\n          error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n          defaultProps = newDefaultProps; // Match production behavior more closely:\n          // $FlowFixMe\n\n          Object.defineProperty(lazyType, 'defaultProps', {\n            enumerable: true\n          });\n        }\n      },\n      propTypes: {\n        configurable: true,\n        get: function () {\n          return propTypes;\n        },\n        set: function (newPropTypes) {\n          error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');\n\n          propTypes = newPropTypes; // Match production behavior more closely:\n          // $FlowFixMe\n\n          Object.defineProperty(lazyType, 'propTypes', {\n            enumerable: true\n          });\n        }\n      }\n    });\n  }\n\n  return lazyType;\n}\n\nfunction forwardRef(render) {\n  {\n    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n    } else if (typeof render !== 'function') {\n      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n    } else {\n      if (render.length !== 0 && render.length !== 2) {\n        error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');\n      }\n    }\n\n    if (render != null) {\n      if (render.defaultProps != null || render.propTypes != null) {\n        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n      }\n    }\n  }\n\n  var elementType = {\n    $$typeof: REACT_FORWARD_REF_TYPE,\n    render: render\n  };\n\n  {\n    var ownName;\n    Object.defineProperty(elementType, 'displayName', {\n      enumerable: false,\n      configurable: true,\n      get: function () {\n        return ownName;\n      },\n      set: function (name) {\n        ownName = name; // The inner component shouldn't inherit this display name in most cases,\n        // because the component may be used elsewhere.\n        // But it's nice for anonymous functions to inherit the name,\n        // so that our component-stack generation logic will display their frames.\n        // An anonymous function generally suggests a pattern like:\n        //   React.forwardRef((props, ref) => {...});\n        // This kind of inner function is not used elsewhere so the side effect is okay.\n\n        if (!render.name && !render.displayName) {\n          render.displayName = name;\n        }\n      }\n    });\n  }\n\n  return elementType;\n}\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction memo(type, compare) {\n  {\n    if (!isValidElementType(type)) {\n      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n    }\n  }\n\n  var elementType = {\n    $$typeof: REACT_MEMO_TYPE,\n    type: type,\n    compare: compare === undefined ? null : compare\n  };\n\n  {\n    var ownName;\n    Object.defineProperty(elementType, 'displayName', {\n      enumerable: false,\n      configurable: true,\n      get: function () {\n        return ownName;\n      },\n      set: function (name) {\n        ownName = name; // The inner component shouldn't inherit this display name in most cases,\n        // because the component may be used elsewhere.\n        // But it's nice for anonymous functions to inherit the name,\n        // so that our component-stack generation logic will display their frames.\n        // An anonymous function generally suggests a pattern like:\n        //   React.memo((props) => {...});\n        // This kind of inner function is not used elsewhere so the side effect is okay.\n\n        if (!type.name && !type.displayName) {\n          type.displayName = name;\n        }\n      }\n    });\n  }\n\n  return elementType;\n}\n\nfunction resolveDispatcher() {\n  var dispatcher = ReactCurrentDispatcher.current;\n\n  {\n    if (dispatcher === null) {\n      error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n    }\n  } // Will result in a null access error if accessed outside render phase. We\n  // intentionally don't throw our own error because this is in a hot path.\n  // Also helps ensure this is inlined.\n\n\n  return dispatcher;\n}\nfunction useContext(Context) {\n  var dispatcher = resolveDispatcher();\n\n  {\n    // TODO: add a more generic warning for invalid values.\n    if (Context._context !== undefined) {\n      var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n      // and nobody should be using this in existing code.\n\n      if (realContext.Consumer === Context) {\n        error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');\n      } else if (realContext.Provider === Context) {\n        error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n      }\n    }\n  }\n\n  return dispatcher.useContext(Context);\n}\nfunction useState(initialState) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useEffect(create, deps);\n}\nfunction useInsertionEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useInsertionEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n  {\n    var dispatcher = resolveDispatcher();\n    return dispatcher.useDebugValue(value, formatterFn);\n  }\n}\nfunction useTransition() {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useTransition();\n}\nfunction useDeferredValue(value) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useDeferredValue(value);\n}\nfunction useId() {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useId();\n}\nfunction useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var dispatcher = resolveDispatcher();\n  return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher$1.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher$1.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      setExtraStackFrame(stack);\n    } else {\n      setExtraStackFrame(null);\n    }\n  }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n  propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n  if (ReactCurrentOwner.current) {\n    var name = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n    if (name) {\n      return '\\n\\nCheck the render method of `' + name + '`.';\n    }\n  }\n\n  return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n  if (source !== undefined) {\n    var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n    var lineNumber = source.lineNumber;\n    return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n  }\n\n  return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n  if (elementProps !== null && elementProps !== undefined) {\n    return getSourceInfoErrorAddendum(elementProps.__source);\n  }\n\n  return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  var info = getDeclarationErrorAddendum();\n\n  if (!info) {\n    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n    if (parentName) {\n      info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n    }\n  }\n\n  return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n  if (!element._store || element._store.validated || element.key != null) {\n    return;\n  }\n\n  element._store.validated = true;\n  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n    return;\n  }\n\n  ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n  // property, it may be the creator of the child that's responsible for\n  // assigning it a key.\n\n  var childOwner = '';\n\n  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n    // Give the component that originally created this child.\n    childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n  }\n\n  {\n    setCurrentlyValidatingElement$1(element);\n\n    error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n    setCurrentlyValidatingElement$1(null);\n  }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n  if (typeof node !== 'object') {\n    return;\n  }\n\n  if (isArray(node)) {\n    for (var i = 0; i < node.length; i++) {\n      var child = node[i];\n\n      if (isValidElement(child)) {\n        validateExplicitKey(child, parentType);\n      }\n    }\n  } else if (isValidElement(node)) {\n    // This element was passed in a valid location.\n    if (node._store) {\n      node._store.validated = true;\n    }\n  } else if (node) {\n    var iteratorFn = getIteratorFn(node);\n\n    if (typeof iteratorFn === 'function') {\n      // Entry iterators used to provide implicit keys,\n      // but now we print a separate warning for them later.\n      if (iteratorFn !== node.entries) {\n        var iterator = iteratorFn.call(node);\n        var step;\n\n        while (!(step = iterator.next()).done) {\n          if (isValidElement(step.value)) {\n            validateExplicitKey(step.value, parentType);\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n  {\n    var type = element.type;\n\n    if (type === null || type === undefined || typeof type === 'string') {\n      return;\n    }\n\n    var propTypes;\n\n    if (typeof type === 'function') {\n      propTypes = type.propTypes;\n    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n    // Inner props are checked in the reconciler.\n    type.$$typeof === REACT_MEMO_TYPE)) {\n      propTypes = type.propTypes;\n    } else {\n      return;\n    }\n\n    if (propTypes) {\n      // Intentionally inside to avoid triggering lazy initializers:\n      var name = getComponentNameFromType(type);\n      checkPropTypes(propTypes, element.props, 'prop', name, element);\n    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n      var _name = getComponentNameFromType(type);\n\n      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n    }\n\n    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n    }\n  }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n  {\n    var keys = Object.keys(fragment.props);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key !== 'children' && key !== 'key') {\n        setCurrentlyValidatingElement$1(fragment);\n\n        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n        setCurrentlyValidatingElement$1(null);\n        break;\n      }\n    }\n\n    if (fragment.ref !== null) {\n      setCurrentlyValidatingElement$1(fragment);\n\n      error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n      setCurrentlyValidatingElement$1(null);\n    }\n  }\n}\nfunction createElementWithValidation(type, props, children) {\n  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n  // succeed and there will likely be errors in render.\n\n  if (!validType) {\n    var info = '';\n\n    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n      info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n    }\n\n    var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n    if (sourceInfo) {\n      info += sourceInfo;\n    } else {\n      info += getDeclarationErrorAddendum();\n    }\n\n    var typeString;\n\n    if (type === null) {\n      typeString = 'null';\n    } else if (isArray(type)) {\n      typeString = 'array';\n    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n      typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n      info = ' Did you accidentally export a JSX literal instead of a component?';\n    } else {\n      typeString = typeof type;\n    }\n\n    {\n      error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n    }\n  }\n\n  var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n  // TODO: Drop this when these are no longer allowed as the type argument.\n\n  if (element == null) {\n    return element;\n  } // Skip key warning if the type isn't valid since our key validation logic\n  // doesn't expect a non-string/function type and can throw confusing errors.\n  // We don't want exception behavior to differ between dev and prod.\n  // (Rendering will throw with a helpful message and as soon as the type is\n  // fixed, the key warnings will appear.)\n\n\n  if (validType) {\n    for (var i = 2; i < arguments.length; i++) {\n      validateChildKeys(arguments[i], type);\n    }\n  }\n\n  if (type === REACT_FRAGMENT_TYPE) {\n    validateFragmentProps(element);\n  } else {\n    validatePropTypes(element);\n  }\n\n  return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n  var validatedFactory = createElementWithValidation.bind(null, type);\n  validatedFactory.type = type;\n\n  {\n    if (!didWarnAboutDeprecatedCreateFactory) {\n      didWarnAboutDeprecatedCreateFactory = true;\n\n      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n    } // Legacy hook: remove it\n\n\n    Object.defineProperty(validatedFactory, 'type', {\n      enumerable: false,\n      get: function () {\n        warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n        Object.defineProperty(this, 'type', {\n          value: type\n        });\n        return type;\n      }\n    });\n  }\n\n  return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n  var newElement = cloneElement.apply(this, arguments);\n\n  for (var i = 2; i < arguments.length; i++) {\n    validateChildKeys(arguments[i], newElement.type);\n  }\n\n  validatePropTypes(newElement);\n  return newElement;\n}\n\nfunction startTransition(scope, options) {\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = {};\n  var currentTransition = ReactCurrentBatchConfig.transition;\n\n  {\n    ReactCurrentBatchConfig.transition._updatedFibers = new Set();\n  }\n\n  try {\n    scope();\n  } finally {\n    ReactCurrentBatchConfig.transition = prevTransition;\n\n    {\n      if (prevTransition === null && currentTransition._updatedFibers) {\n        var updatedFibersCount = currentTransition._updatedFibers.size;\n\n        if (updatedFibersCount > 10) {\n          warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n        }\n\n        currentTransition._updatedFibers.clear();\n      }\n    }\n  }\n}\n\nvar didWarnAboutMessageChannel = false;\nvar enqueueTaskImpl = null;\nfunction enqueueTask(task) {\n  if (enqueueTaskImpl === null) {\n    try {\n      // read require off the module object to get around the bundlers.\n      // we don't want them to detect a require and bundle a Node polyfill.\n      var requireString = ('require' + Math.random()).slice(0, 7);\n      var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's\n      // version of setImmediate, bypassing fake timers if any.\n\n      enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;\n    } catch (_err) {\n      // we're in a browser\n      // we can't use regular timers because they may still be faked\n      // so we try MessageChannel+postMessage instead\n      enqueueTaskImpl = function (callback) {\n        {\n          if (didWarnAboutMessageChannel === false) {\n            didWarnAboutMessageChannel = true;\n\n            if (typeof MessageChannel === 'undefined') {\n              error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');\n            }\n          }\n        }\n\n        var channel = new MessageChannel();\n        channel.port1.onmessage = callback;\n        channel.port2.postMessage(undefined);\n      };\n    }\n  }\n\n  return enqueueTaskImpl(task);\n}\n\nvar actScopeDepth = 0;\nvar didWarnNoAwaitAct = false;\nfunction act(callback) {\n  {\n    // `act` calls can be nested, so we track the depth. This represents the\n    // number of `act` scopes on the stack.\n    var prevActScopeDepth = actScopeDepth;\n    actScopeDepth++;\n\n    if (ReactCurrentActQueue.current === null) {\n      // This is the outermost `act` scope. Initialize the queue. The reconciler\n      // will detect the queue and use it instead of Scheduler.\n      ReactCurrentActQueue.current = [];\n    }\n\n    var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;\n    var result;\n\n    try {\n      // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only\n      // set to `true` while the given callback is executed, not for updates\n      // triggered during an async event, because this is how the legacy\n      // implementation of `act` behaved.\n      ReactCurrentActQueue.isBatchingLegacy = true;\n      result = callback(); // Replicate behavior of original `act` implementation in legacy mode,\n      // which flushed updates immediately after the scope function exits, even\n      // if it's an async function.\n\n      if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {\n        var queue = ReactCurrentActQueue.current;\n\n        if (queue !== null) {\n          ReactCurrentActQueue.didScheduleLegacyUpdate = false;\n          flushActQueue(queue);\n        }\n      }\n    } catch (error) {\n      popActScope(prevActScopeDepth);\n      throw error;\n    } finally {\n      ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;\n    }\n\n    if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n      var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait\n      // for it to resolve before exiting the current scope.\n\n      var wasAwaited = false;\n      var thenable = {\n        then: function (resolve, reject) {\n          wasAwaited = true;\n          thenableResult.then(function (returnValue) {\n            popActScope(prevActScopeDepth);\n\n            if (actScopeDepth === 0) {\n              // We've exited the outermost act scope. Recursively flush the\n              // queue until there's no remaining work.\n              recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            } else {\n              resolve(returnValue);\n            }\n          }, function (error) {\n            // The callback threw an error.\n            popActScope(prevActScopeDepth);\n            reject(error);\n          });\n        }\n      };\n\n      {\n        if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {\n          // eslint-disable-next-line no-undef\n          Promise.resolve().then(function () {}).then(function () {\n            if (!wasAwaited) {\n              didWarnNoAwaitAct = true;\n\n              error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');\n            }\n          });\n        }\n      }\n\n      return thenable;\n    } else {\n      var returnValue = result; // The callback is not an async function. Exit the current scope\n      // immediately, without awaiting.\n\n      popActScope(prevActScopeDepth);\n\n      if (actScopeDepth === 0) {\n        // Exiting the outermost act scope. Flush the queue.\n        var _queue = ReactCurrentActQueue.current;\n\n        if (_queue !== null) {\n          flushActQueue(_queue);\n          ReactCurrentActQueue.current = null;\n        } // Return a thenable. If the user awaits it, we'll flush again in\n        // case additional work was scheduled by a microtask.\n\n\n        var _thenable = {\n          then: function (resolve, reject) {\n            // Confirm we haven't re-entered another `act` scope, in case\n            // the user does something weird like await the thenable\n            // multiple times.\n            if (ReactCurrentActQueue.current === null) {\n              // Recursively flush the queue until there's no remaining work.\n              ReactCurrentActQueue.current = [];\n              recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n            } else {\n              resolve(returnValue);\n            }\n          }\n        };\n        return _thenable;\n      } else {\n        // Since we're inside a nested `act` scope, the returned thenable\n        // immediately resolves. The outer scope will flush the queue.\n        var _thenable2 = {\n          then: function (resolve, reject) {\n            resolve(returnValue);\n          }\n        };\n        return _thenable2;\n      }\n    }\n  }\n}\n\nfunction popActScope(prevActScopeDepth) {\n  {\n    if (prevActScopeDepth !== actScopeDepth - 1) {\n      error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');\n    }\n\n    actScopeDepth = prevActScopeDepth;\n  }\n}\n\nfunction recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n  {\n    var queue = ReactCurrentActQueue.current;\n\n    if (queue !== null) {\n      try {\n        flushActQueue(queue);\n        enqueueTask(function () {\n          if (queue.length === 0) {\n            // No additional work was scheduled. Finish.\n            ReactCurrentActQueue.current = null;\n            resolve(returnValue);\n          } else {\n            // Keep flushing work until there's none left.\n            recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n          }\n        });\n      } catch (error) {\n        reject(error);\n      }\n    } else {\n      resolve(returnValue);\n    }\n  }\n}\n\nvar isFlushing = false;\n\nfunction flushActQueue(queue) {\n  {\n    if (!isFlushing) {\n      // Prevent re-entrance.\n      isFlushing = true;\n      var i = 0;\n\n      try {\n        for (; i < queue.length; i++) {\n          var callback = queue[i];\n\n          do {\n            callback = callback(true);\n          } while (callback !== null);\n        }\n\n        queue.length = 0;\n      } catch (error) {\n        // If something throws, leave the remaining callbacks on the queue.\n        queue = queue.slice(i + 1);\n        throw error;\n      } finally {\n        isFlushing = false;\n      }\n    }\n  }\n}\n\nvar createElement$1 =  createElementWithValidation ;\nvar cloneElement$1 =  cloneElementWithValidation ;\nvar createFactory =  createFactoryWithValidation ;\nvar Children = {\n  map: mapChildren,\n  forEach: forEachChildren,\n  count: countChildren,\n  toArray: toArray,\n  only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.act = act;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.startTransition = startTransition;\nexports.unstable_act = act;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useDeferredValue = useDeferredValue;\nexports.useEffect = useEffect;\nexports.useId = useId;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useInsertionEffect = useInsertionEffect;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.useSyncExternalStore = useSyncExternalStore;\nexports.useTransition = useTransition;\nexports.version = ReactVersion;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react.production.min.js');\n} else {\n  module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * scheduler.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var enableSchedulerDebugging = false;\nvar enableProfiling = false;\nvar frameYieldMs = 5;\n\nfunction push(heap, node) {\n  var index = heap.length;\n  heap.push(node);\n  siftUp(heap, node, index);\n}\nfunction peek(heap) {\n  return heap.length === 0 ? null : heap[0];\n}\nfunction pop(heap) {\n  if (heap.length === 0) {\n    return null;\n  }\n\n  var first = heap[0];\n  var last = heap.pop();\n\n  if (last !== first) {\n    heap[0] = last;\n    siftDown(heap, last, 0);\n  }\n\n  return first;\n}\n\nfunction siftUp(heap, node, i) {\n  var index = i;\n\n  while (index > 0) {\n    var parentIndex = index - 1 >>> 1;\n    var parent = heap[parentIndex];\n\n    if (compare(parent, node) > 0) {\n      // The parent is larger. Swap positions.\n      heap[parentIndex] = node;\n      heap[index] = parent;\n      index = parentIndex;\n    } else {\n      // The parent is smaller. Exit.\n      return;\n    }\n  }\n}\n\nfunction siftDown(heap, node, i) {\n  var index = i;\n  var length = heap.length;\n  var halfLength = length >>> 1;\n\n  while (index < halfLength) {\n    var leftIndex = (index + 1) * 2 - 1;\n    var left = heap[leftIndex];\n    var rightIndex = leftIndex + 1;\n    var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n    if (compare(left, node) < 0) {\n      if (rightIndex < length && compare(right, left) < 0) {\n        heap[index] = right;\n        heap[rightIndex] = node;\n        index = rightIndex;\n      } else {\n        heap[index] = left;\n        heap[leftIndex] = node;\n        index = leftIndex;\n      }\n    } else if (rightIndex < length && compare(right, node) < 0) {\n      heap[index] = right;\n      heap[rightIndex] = node;\n      index = rightIndex;\n    } else {\n      // Neither child is smaller. Exit.\n      return;\n    }\n  }\n}\n\nfunction compare(a, b) {\n  // Compare sort index first, then task id.\n  var diff = a.sortIndex - b.sortIndex;\n  return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\n\nvar hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n  var localPerformance = performance;\n\n  exports.unstable_now = function () {\n    return localPerformance.now();\n  };\n} else {\n  var localDate = Date;\n  var initialTime = localDate.now();\n\n  exports.unstable_now = function () {\n    return localDate.now() - initialTime;\n  };\n} // Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\n\nvar maxSigned31BitInt = 1073741823; // Times out immediately\n\nvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\nvar USER_BLOCKING_PRIORITY_TIMEOUT = 250;\nvar NORMAL_PRIORITY_TIMEOUT = 5000;\nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\nvar IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them.\n\nvar localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null;\nvar localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null;\nvar localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom\n\nvar isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;\n\nfunction advanceTimers(currentTime) {\n  // Check for tasks that are no longer delayed and add them to the queue.\n  var timer = peek(timerQueue);\n\n  while (timer !== null) {\n    if (timer.callback === null) {\n      // Timer was cancelled.\n      pop(timerQueue);\n    } else if (timer.startTime <= currentTime) {\n      // Timer fired. Transfer to the task queue.\n      pop(timerQueue);\n      timer.sortIndex = timer.expirationTime;\n      push(taskQueue, timer);\n    } else {\n      // Remaining timers are pending.\n      return;\n    }\n\n    timer = peek(timerQueue);\n  }\n}\n\nfunction handleTimeout(currentTime) {\n  isHostTimeoutScheduled = false;\n  advanceTimers(currentTime);\n\n  if (!isHostCallbackScheduled) {\n    if (peek(taskQueue) !== null) {\n      isHostCallbackScheduled = true;\n      requestHostCallback(flushWork);\n    } else {\n      var firstTimer = peek(timerQueue);\n\n      if (firstTimer !== null) {\n        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n      }\n    }\n  }\n}\n\nfunction flushWork(hasTimeRemaining, initialTime) {\n\n\n  isHostCallbackScheduled = false;\n\n  if (isHostTimeoutScheduled) {\n    // We scheduled a timeout but it's no longer needed. Cancel it.\n    isHostTimeoutScheduled = false;\n    cancelHostTimeout();\n  }\n\n  isPerformingWork = true;\n  var previousPriorityLevel = currentPriorityLevel;\n\n  try {\n    if (enableProfiling) {\n      try {\n        return workLoop(hasTimeRemaining, initialTime);\n      } catch (error) {\n        if (currentTask !== null) {\n          var currentTime = exports.unstable_now();\n          markTaskErrored(currentTask, currentTime);\n          currentTask.isQueued = false;\n        }\n\n        throw error;\n      }\n    } else {\n      // No catch in prod code path.\n      return workLoop(hasTimeRemaining, initialTime);\n    }\n  } finally {\n    currentTask = null;\n    currentPriorityLevel = previousPriorityLevel;\n    isPerformingWork = false;\n  }\n}\n\nfunction workLoop(hasTimeRemaining, initialTime) {\n  var currentTime = initialTime;\n  advanceTimers(currentTime);\n  currentTask = peek(taskQueue);\n\n  while (currentTask !== null && !(enableSchedulerDebugging )) {\n    if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n      // This currentTask hasn't expired, and we've reached the deadline.\n      break;\n    }\n\n    var callback = currentTask.callback;\n\n    if (typeof callback === 'function') {\n      currentTask.callback = null;\n      currentPriorityLevel = currentTask.priorityLevel;\n      var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n      var continuationCallback = callback(didUserCallbackTimeout);\n      currentTime = exports.unstable_now();\n\n      if (typeof continuationCallback === 'function') {\n        currentTask.callback = continuationCallback;\n      } else {\n\n        if (currentTask === peek(taskQueue)) {\n          pop(taskQueue);\n        }\n      }\n\n      advanceTimers(currentTime);\n    } else {\n      pop(taskQueue);\n    }\n\n    currentTask = peek(taskQueue);\n  } // Return whether there's additional work\n\n\n  if (currentTask !== null) {\n    return true;\n  } else {\n    var firstTimer = peek(timerQueue);\n\n    if (firstTimer !== null) {\n      requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n    }\n\n    return false;\n  }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n  switch (priorityLevel) {\n    case ImmediatePriority:\n    case UserBlockingPriority:\n    case NormalPriority:\n    case LowPriority:\n    case IdlePriority:\n      break;\n\n    default:\n      priorityLevel = NormalPriority;\n  }\n\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n}\n\nfunction unstable_next(eventHandler) {\n  var priorityLevel;\n\n  switch (currentPriorityLevel) {\n    case ImmediatePriority:\n    case UserBlockingPriority:\n    case NormalPriority:\n      // Shift down to normal priority\n      priorityLevel = NormalPriority;\n      break;\n\n    default:\n      // Anything lower than normal priority should remain at the current level.\n      priorityLevel = currentPriorityLevel;\n      break;\n  }\n\n  var previousPriorityLevel = currentPriorityLevel;\n  currentPriorityLevel = priorityLevel;\n\n  try {\n    return eventHandler();\n  } finally {\n    currentPriorityLevel = previousPriorityLevel;\n  }\n}\n\nfunction unstable_wrapCallback(callback) {\n  var parentPriorityLevel = currentPriorityLevel;\n  return function () {\n    // This is a fork of runWithPriority, inlined for performance.\n    var previousPriorityLevel = currentPriorityLevel;\n    currentPriorityLevel = parentPriorityLevel;\n\n    try {\n      return callback.apply(this, arguments);\n    } finally {\n      currentPriorityLevel = previousPriorityLevel;\n    }\n  };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n  var currentTime = exports.unstable_now();\n  var startTime;\n\n  if (typeof options === 'object' && options !== null) {\n    var delay = options.delay;\n\n    if (typeof delay === 'number' && delay > 0) {\n      startTime = currentTime + delay;\n    } else {\n      startTime = currentTime;\n    }\n  } else {\n    startTime = currentTime;\n  }\n\n  var timeout;\n\n  switch (priorityLevel) {\n    case ImmediatePriority:\n      timeout = IMMEDIATE_PRIORITY_TIMEOUT;\n      break;\n\n    case UserBlockingPriority:\n      timeout = USER_BLOCKING_PRIORITY_TIMEOUT;\n      break;\n\n    case IdlePriority:\n      timeout = IDLE_PRIORITY_TIMEOUT;\n      break;\n\n    case LowPriority:\n      timeout = LOW_PRIORITY_TIMEOUT;\n      break;\n\n    case NormalPriority:\n    default:\n      timeout = NORMAL_PRIORITY_TIMEOUT;\n      break;\n  }\n\n  var expirationTime = startTime + timeout;\n  var newTask = {\n    id: taskIdCounter++,\n    callback: callback,\n    priorityLevel: priorityLevel,\n    startTime: startTime,\n    expirationTime: expirationTime,\n    sortIndex: -1\n  };\n\n  if (startTime > currentTime) {\n    // This is a delayed task.\n    newTask.sortIndex = startTime;\n    push(timerQueue, newTask);\n\n    if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n      // All tasks are delayed, and this is the task with the earliest delay.\n      if (isHostTimeoutScheduled) {\n        // Cancel an existing timeout.\n        cancelHostTimeout();\n      } else {\n        isHostTimeoutScheduled = true;\n      } // Schedule a timeout.\n\n\n      requestHostTimeout(handleTimeout, startTime - currentTime);\n    }\n  } else {\n    newTask.sortIndex = expirationTime;\n    push(taskQueue, newTask);\n    // wait until the next time we yield.\n\n\n    if (!isHostCallbackScheduled && !isPerformingWork) {\n      isHostCallbackScheduled = true;\n      requestHostCallback(flushWork);\n    }\n  }\n\n  return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n  if (!isHostCallbackScheduled && !isPerformingWork) {\n    isHostCallbackScheduled = true;\n    requestHostCallback(flushWork);\n  }\n}\n\nfunction unstable_getFirstCallbackNode() {\n  return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n  // remove from the queue because you can't remove arbitrary nodes from an\n  // array based heap, only the first one.)\n\n\n  task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n  return currentPriorityLevel;\n}\n\nvar isMessageLoopRunning = false;\nvar scheduledHostCallback = null;\nvar taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n// thread, like user events. By default, it yields multiple times per frame.\n// It does not attempt to align with frame boundaries, since most tasks don't\n// need to be frame aligned; for those that do, use requestAnimationFrame.\n\nvar frameInterval = frameYieldMs;\nvar startTime = -1;\n\nfunction shouldYieldToHost() {\n  var timeElapsed = exports.unstable_now() - startTime;\n\n  if (timeElapsed < frameInterval) {\n    // The main thread has only been blocked for a really short amount of time;\n    // smaller than a single frame. Don't yield yet.\n    return false;\n  } // The main thread has been blocked for a non-negligible amount of time. We\n\n\n  return true;\n}\n\nfunction requestPaint() {\n\n}\n\nfunction forceFrameRate(fps) {\n  if (fps < 0 || fps > 125) {\n    // Using console['error'] to evade Babel and ESLint\n    console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n    return;\n  }\n\n  if (fps > 0) {\n    frameInterval = Math.floor(1000 / fps);\n  } else {\n    // reset the framerate\n    frameInterval = frameYieldMs;\n  }\n}\n\nvar performWorkUntilDeadline = function () {\n  if (scheduledHostCallback !== null) {\n    var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread\n    // has been blocked.\n\n    startTime = currentTime;\n    var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the\n    // error can be observed.\n    //\n    // Intentionally not using a try-catch, since that makes some debugging\n    // techniques harder. Instead, if `scheduledHostCallback` errors, then\n    // `hasMoreWork` will remain true, and we'll continue the work loop.\n\n    var hasMoreWork = true;\n\n    try {\n      hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n    } finally {\n      if (hasMoreWork) {\n        // If there's more work, schedule the next message event at the end\n        // of the preceding one.\n        schedulePerformWorkUntilDeadline();\n      } else {\n        isMessageLoopRunning = false;\n        scheduledHostCallback = null;\n      }\n    }\n  } else {\n    isMessageLoopRunning = false;\n  } // Yielding to the browser will give it a chance to paint, so we can\n};\n\nvar schedulePerformWorkUntilDeadline;\n\nif (typeof localSetImmediate === 'function') {\n  // Node.js and old IE.\n  // There's a few reasons for why we prefer setImmediate.\n  //\n  // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting.\n  // (Even though this is a DOM fork of the Scheduler, you could get here\n  // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.)\n  // https://github.com/facebook/react/issues/20756\n  //\n  // But also, it runs earlier which is the semantic we want.\n  // If other browsers ever implement it, it's better to use it.\n  // Although both of these would be inferior to native scheduling.\n  schedulePerformWorkUntilDeadline = function () {\n    localSetImmediate(performWorkUntilDeadline);\n  };\n} else if (typeof MessageChannel !== 'undefined') {\n  // DOM and Worker environments.\n  // We prefer MessageChannel because of the 4ms setTimeout clamping.\n  var channel = new MessageChannel();\n  var port = channel.port2;\n  channel.port1.onmessage = performWorkUntilDeadline;\n\n  schedulePerformWorkUntilDeadline = function () {\n    port.postMessage(null);\n  };\n} else {\n  // We should only fallback here in non-browser environments.\n  schedulePerformWorkUntilDeadline = function () {\n    localSetTimeout(performWorkUntilDeadline, 0);\n  };\n}\n\nfunction requestHostCallback(callback) {\n  scheduledHostCallback = callback;\n\n  if (!isMessageLoopRunning) {\n    isMessageLoopRunning = true;\n    schedulePerformWorkUntilDeadline();\n  }\n}\n\nfunction requestHostTimeout(callback, ms) {\n  taskTimeoutID = localSetTimeout(function () {\n    callback(exports.unstable_now());\n  }, ms);\n}\n\nfunction cancelHostTimeout() {\n  localClearTimeout(taskTimeoutID);\n  taskTimeoutID = -1;\n}\n\nvar unstable_requestPaint = requestPaint;\nvar unstable_Profiling =  null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_forceFrameRate = forceFrameRate;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = unstable_requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n  module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n\n          'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n          var React = require('react');\nvar Scheduler = require('scheduler');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar suppressWarning = false;\nfunction setSuppressWarning(newSuppressWarning) {\n  {\n    suppressWarning = newSuppressWarning;\n  }\n} // In DEV, calls to console.warn and console.error get replaced\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n  {\n    if (!suppressWarning) {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      printWarning('warn', format, args);\n    }\n  }\n}\nfunction error(format) {\n  {\n    if (!suppressWarning) {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar ScopeComponent = 21;\nvar OffscreenComponent = 22;\nvar LegacyHiddenComponent = 23;\nvar CacheComponent = 24;\nvar TracingMarkerComponent = 25;\n\n// -----------------------------------------------------------------------------\n\nvar enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing\n// the react-reconciler package.\n\nvar enableNewReconciler = false; // Support legacy Primer support on internal FB www\n\nvar enableLazyContextPropagation = false; // FB-only usage. The new API has different semantics.\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n\nvar enableSuspenseAvoidThisFallback = false; // Enables unstable_avoidThisFallback feature in Fizz\n// React DOM Chopping Block\n//\n// Similar to main Chopping Block but only flags related to React DOM. These are\n// grouped because we will likely batch all of them into a single major release.\n// -----------------------------------------------------------------------------\n// Disable support for comment nodes as React DOM containers. Already disabled\n// in open source, but www codebase still relies on it. Need to remove.\n\nvar disableCommentsAsDOMContainers = true; // Disable javascript: URL strings in href for XSS protection.\n// and client rendering, mostly to allow JSX attributes to apply to the custom\n// element's object properties instead of only HTML attributes.\n// https://github.com/facebook/react/issues/11347\n\nvar enableCustomElementPropertySupport = false; // Disables children for <textarea> elements\nvar warnAboutStringRefs = true; // -----------------------------------------------------------------------------\n// Debugging and DevTools\n// -----------------------------------------------------------------------------\n// Adds user timing marks for e.g. state updates, suspense, and work loop stuff,\n// for an experimental timeline tool.\n\nvar enableSchedulingProfiler = true; // Helps identify side effects in render-phase lifecycle hooks and setState\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableProfilerCommitHooks = true; // Phase param passed to onRender callback differentiates between an \"update\" and a \"cascading-update\".\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames =  {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n  registerDirectEvent(registrationName, dependencies);\n  registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n  {\n    if (registrationNameDependencies[registrationName]) {\n      error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n    }\n  }\n\n  registrationNameDependencies[registrationName] = dependencies;\n\n  {\n    var lowerCasedName = registrationName.toLowerCase();\n    possibleRegistrationNames[lowerCasedName] = registrationName;\n\n    if (registrationName === 'onDoubleClick') {\n      possibleRegistrationNames.ondblclick = registrationName;\n    }\n  }\n\n  for (var i = 0; i < dependencies.length; i++) {\n    allNativeEvents.add(dependencies[i]);\n  }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\n\nfunction checkAttributeStringCoercion(value, attributeName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkPropStringCoercion(value, propName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` prop is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkCSSPropertyStringCoercion(value, propName) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkHtmlStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\nfunction checkFormFieldValueStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('Form field values (value, checked, defaultValue, or defaultChecked props)' + ' must be strings, not %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n    return true;\n  }\n\n  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n    return false;\n  }\n\n  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n    validatedAttributeNameCache[attributeName] = true;\n    return true;\n  }\n\n  illegalAttributeNameCache[attributeName] = true;\n\n  {\n    error('Invalid attribute name: `%s`', attributeName);\n  }\n\n  return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n  if (propertyInfo !== null) {\n    return propertyInfo.type === RESERVED;\n  }\n\n  if (isCustomComponentTag) {\n    return false;\n  }\n\n  if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n    return true;\n  }\n\n  return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n  if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n    return false;\n  }\n\n  switch (typeof value) {\n    case 'function': // $FlowIssue symbol is perfectly valid here\n\n    case 'symbol':\n      // eslint-disable-line\n      return true;\n\n    case 'boolean':\n      {\n        if (isCustomComponentTag) {\n          return false;\n        }\n\n        if (propertyInfo !== null) {\n          return !propertyInfo.acceptsBooleans;\n        } else {\n          var prefix = name.toLowerCase().slice(0, 5);\n          return prefix !== 'data-' && prefix !== 'aria-';\n        }\n      }\n\n    default:\n      return false;\n  }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n  if (value === null || typeof value === 'undefined') {\n    return true;\n  }\n\n  if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n    return true;\n  }\n\n  if (isCustomComponentTag) {\n\n    return false;\n  }\n\n  if (propertyInfo !== null) {\n\n    switch (propertyInfo.type) {\n      case BOOLEAN:\n        return !value;\n\n      case OVERLOADED_BOOLEAN:\n        return value === false;\n\n      case NUMERIC:\n        return isNaN(value);\n\n      case POSITIVE_NUMERIC:\n        return isNaN(value) || value < 1;\n    }\n  }\n\n  return false;\n}\nfunction getPropertyInfo(name) {\n  return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n  this.attributeName = attributeName;\n  this.attributeNamespace = attributeNamespace;\n  this.mustUseProperty = mustUseProperty;\n  this.propertyName = name;\n  this.type = type;\n  this.sanitizeURL = sanitizeURL;\n  this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n  var name = _ref[0],\n      attributeName = _ref[1];\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n  name, // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n  name.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n  return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n  false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n  var name = attributeName.replace(CAMELIZE, capitalize);\n  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n  attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n  false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n  attributeName.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  false, // sanitizeURL\n  false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n  attributeName.toLowerCase(), // attributeName\n  null, // attributeNamespace\n  true, // sanitizeURL\n  true);\n});\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n  {\n    if (!didWarn && isJavaScriptProtocol.test(url)) {\n      didWarn = true;\n\n      error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n    }\n  }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n  {\n    if (propertyInfo.mustUseProperty) {\n      var propertyName = propertyInfo.propertyName;\n      return node[propertyName];\n    } else {\n      // This check protects multiple uses of `expected`, which is why the\n      // react-internal/safe-string-coercion rule is disabled in several spots\n      // below.\n      {\n        checkAttributeStringCoercion(expected, name);\n      }\n\n      if ( propertyInfo.sanitizeURL) {\n        // If we haven't fully disabled javascript: URLs, and if\n        // the hydration is successful of a javascript: URL, we\n        // still want to warn on the client.\n        // eslint-disable-next-line react-internal/safe-string-coercion\n        sanitizeURL('' + expected);\n      }\n\n      var attributeName = propertyInfo.attributeName;\n      var stringValue = null;\n\n      if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n        if (node.hasAttribute(attributeName)) {\n          var value = node.getAttribute(attributeName);\n\n          if (value === '') {\n            return true;\n          }\n\n          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n            return value;\n          } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n          if (value === '' + expected) {\n            return expected;\n          }\n\n          return value;\n        }\n      } else if (node.hasAttribute(attributeName)) {\n        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n          // We had an attribute but shouldn't have had one, so read it\n          // for the error message.\n          return node.getAttribute(attributeName);\n        }\n\n        if (propertyInfo.type === BOOLEAN) {\n          // If this was a boolean, it doesn't matter what the value is\n          // the fact that we have it is the same as the expected.\n          return expected;\n        } // Even if this property uses a namespace we use getAttribute\n        // because we assume its namespaced name is the same as our config.\n        // To use getAttributeNS we need the local name which we don't have\n        // in our config atm.\n\n\n        stringValue = node.getAttribute(attributeName);\n      }\n\n      if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n        return stringValue === null ? expected : stringValue; // eslint-disable-next-line react-internal/safe-string-coercion\n      } else if (stringValue === '' + expected) {\n        return expected;\n      } else {\n        return stringValue;\n      }\n    }\n  }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected, isCustomComponentTag) {\n  {\n    if (!isAttributeNameSafe(name)) {\n      return;\n    }\n\n    if (!node.hasAttribute(name)) {\n      return expected === undefined ? undefined : null;\n    }\n\n    var value = node.getAttribute(name);\n\n    {\n      checkAttributeStringCoercion(expected, name);\n    }\n\n    if (value === '' + expected) {\n      return expected;\n    }\n\n    return value;\n  }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n  var propertyInfo = getPropertyInfo(name);\n\n  if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n    return;\n  }\n\n  if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n    value = null;\n  }\n\n\n  if (isCustomComponentTag || propertyInfo === null) {\n    if (isAttributeNameSafe(name)) {\n      var _attributeName = name;\n\n      if (value === null) {\n        node.removeAttribute(_attributeName);\n      } else {\n        {\n          checkAttributeStringCoercion(value, name);\n        }\n\n        node.setAttribute(_attributeName,  '' + value);\n      }\n    }\n\n    return;\n  }\n\n  var mustUseProperty = propertyInfo.mustUseProperty;\n\n  if (mustUseProperty) {\n    var propertyName = propertyInfo.propertyName;\n\n    if (value === null) {\n      var type = propertyInfo.type;\n      node[propertyName] = type === BOOLEAN ? false : '';\n    } else {\n      // Contrary to `setAttribute`, object properties are properly\n      // `toString`ed by IE8/9.\n      node[propertyName] = value;\n    }\n\n    return;\n  } // The rest are treated as attributes with special cases.\n\n\n  var attributeName = propertyInfo.attributeName,\n      attributeNamespace = propertyInfo.attributeNamespace;\n\n  if (value === null) {\n    node.removeAttribute(attributeName);\n  } else {\n    var _type = propertyInfo.type;\n    var attributeValue;\n\n    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n      // If attribute type is boolean, we know for sure it won't be an execution sink\n      // and we won't require Trusted Type here.\n      attributeValue = '';\n    } else {\n      // `setAttribute` with objects becomes only `[object]` in IE8/9,\n      // ('' + value) makes it output the correct toString()-value.\n      {\n        {\n          checkAttributeStringCoercion(value, attributeName);\n        }\n\n        attributeValue = '' + value;\n      }\n\n      if (propertyInfo.sanitizeURL) {\n        sanitizeURL(attributeValue.toString());\n      }\n    }\n\n    if (attributeNamespace) {\n      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n    } else {\n      node.setAttribute(attributeName, attributeValue);\n    }\n  }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_SCOPE_TYPE = Symbol.for('react.scope');\nvar REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');\nvar REACT_CACHE_TYPE = Symbol.for('react.cache');\nvar REACT_TRACING_MARKER_TYPE = Symbol.for('react.tracing_marker');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(ctor, true);\n  }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nfunction describeFiber(fiber) {\n  var owner =  fiber._debugOwner ? fiber._debugOwner.type : null ;\n  var source =  fiber._debugSource ;\n\n  switch (fiber.tag) {\n    case HostComponent:\n      return describeBuiltInComponentFrame(fiber.type);\n\n    case LazyComponent:\n      return describeBuiltInComponentFrame('Lazy');\n\n    case SuspenseComponent:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case SuspenseListComponent:\n      return describeBuiltInComponentFrame('SuspenseList');\n\n    case FunctionComponent:\n    case IndeterminateComponent:\n    case SimpleMemoComponent:\n      return describeFunctionComponentFrame(fiber.type);\n\n    case ForwardRef:\n      return describeFunctionComponentFrame(fiber.type.render);\n\n    case ClassComponent:\n      return describeClassComponentFrame(fiber.type);\n\n    default:\n      return '';\n  }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n  try {\n    var info = '';\n    var node = workInProgress;\n\n    do {\n      info += describeFiber(node);\n      node = node.return;\n    } while (node);\n\n    return info;\n  } catch (x) {\n    return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n  }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nfunction getWrappedName$1(outerType, innerType, wrapperName) {\n  var functionName = innerType.displayName || innerType.name || '';\n  return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n} // Keep in sync with shared/getComponentNameFromType\n\n\nfunction getContextName$1(type) {\n  return type.displayName || 'Context';\n}\n\nfunction getComponentNameFromFiber(fiber) {\n  var tag = fiber.tag,\n      type = fiber.type;\n\n  switch (tag) {\n    case CacheComponent:\n      return 'Cache';\n\n    case ContextConsumer:\n      var context = type;\n      return getContextName$1(context) + '.Consumer';\n\n    case ContextProvider:\n      var provider = type;\n      return getContextName$1(provider._context) + '.Provider';\n\n    case DehydratedFragment:\n      return 'DehydratedFragment';\n\n    case ForwardRef:\n      return getWrappedName$1(type, type.render, 'ForwardRef');\n\n    case Fragment:\n      return 'Fragment';\n\n    case HostComponent:\n      // Host component type is the display name (e.g. \"div\", \"View\")\n      return type;\n\n    case HostPortal:\n      return 'Portal';\n\n    case HostRoot:\n      return 'Root';\n\n    case HostText:\n      return 'Text';\n\n    case LazyComponent:\n      // Name comes from the type in this case; we don't have a tag.\n      return getComponentNameFromType(type);\n\n    case Mode:\n      if (type === REACT_STRICT_MODE_TYPE) {\n        // Don't be less specific than shared/getComponentNameFromType\n        return 'StrictMode';\n      }\n\n      return 'Mode';\n\n    case OffscreenComponent:\n      return 'Offscreen';\n\n    case Profiler:\n      return 'Profiler';\n\n    case ScopeComponent:\n      return 'Scope';\n\n    case SuspenseComponent:\n      return 'Suspense';\n\n    case SuspenseListComponent:\n      return 'SuspenseList';\n\n    case TracingMarkerComponent:\n      return 'TracingMarker';\n    // The display name for this tags come from the user-provided type:\n\n    case ClassComponent:\n    case FunctionComponent:\n    case IncompleteClassComponent:\n    case IndeterminateComponent:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      if (typeof type === 'function') {\n        return type.displayName || type.name || null;\n      }\n\n      if (typeof type === 'string') {\n        return type;\n      }\n\n      break;\n\n  }\n\n  return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n  {\n    if (current === null) {\n      return null;\n    }\n\n    var owner = current._debugOwner;\n\n    if (owner !== null && typeof owner !== 'undefined') {\n      return getComponentNameFromFiber(owner);\n    }\n  }\n\n  return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n  {\n    if (current === null) {\n      return '';\n    } // Safe because if current fiber exists, we are reconciling,\n    // and it is guaranteed to be the work-in-progress version.\n\n\n    return getStackByFiberInDevAndProd(current);\n  }\n}\n\nfunction resetCurrentFiber() {\n  {\n    ReactDebugCurrentFrame.getCurrentStack = null;\n    current = null;\n    isRendering = false;\n  }\n}\nfunction setCurrentFiber(fiber) {\n  {\n    ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;\n    current = fiber;\n    isRendering = false;\n  }\n}\nfunction getCurrentFiber() {\n  {\n    return current;\n  }\n}\nfunction setIsRendering(rendering) {\n  {\n    isRendering = rendering;\n  }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n  // The coercion safety check is performed in getToStringValue().\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction getToStringValue(value) {\n  switch (typeof value) {\n    case 'boolean':\n    case 'number':\n    case 'string':\n    case 'undefined':\n      return value;\n\n    case 'object':\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      return value;\n\n    default:\n      // function, symbol are assigned as empty strings\n      return '';\n  }\n}\n\nvar hasReadOnlyValue = {\n  button: true,\n  checkbox: true,\n  image: true,\n  hidden: true,\n  radio: true,\n  reset: true,\n  submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n  {\n    if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n      error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n    }\n\n    if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n      error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n    }\n  }\n}\n\nfunction isCheckable(elem) {\n  var type = elem.type;\n  var nodeName = elem.nodeName;\n  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n  return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n  node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n  var value = '';\n\n  if (!node) {\n    return value;\n  }\n\n  if (isCheckable(node)) {\n    value = node.checked ? 'true' : 'false';\n  } else {\n    value = node.value;\n  }\n\n  return value;\n}\n\nfunction trackValueOnNode(node) {\n  var valueField = isCheckable(node) ? 'checked' : 'value';\n  var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n  {\n    checkFormFieldValueStringCoercion(node[valueField]);\n  }\n\n  var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n  // and don't track value will cause over reporting of changes,\n  // but it's better then a hard failure\n  // (needed for certain tests that spyOn input values and Safari)\n\n  if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n    return;\n  }\n\n  var get = descriptor.get,\n      set = descriptor.set;\n  Object.defineProperty(node, valueField, {\n    configurable: true,\n    get: function () {\n      return get.call(this);\n    },\n    set: function (value) {\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      currentValue = '' + value;\n      set.call(this, value);\n    }\n  }); // We could've passed this the first time\n  // but it triggers a bug in IE11 and Edge 14/15.\n  // Calling defineProperty() again should be equivalent.\n  // https://github.com/facebook/react/issues/11768\n\n  Object.defineProperty(node, valueField, {\n    enumerable: descriptor.enumerable\n  });\n  var tracker = {\n    getValue: function () {\n      return currentValue;\n    },\n    setValue: function (value) {\n      {\n        checkFormFieldValueStringCoercion(value);\n      }\n\n      currentValue = '' + value;\n    },\n    stopTracking: function () {\n      detachTracker(node);\n      delete node[valueField];\n    }\n  };\n  return tracker;\n}\n\nfunction track(node) {\n  if (getTracker(node)) {\n    return;\n  } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n  node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n  if (!node) {\n    return false;\n  }\n\n  var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n  // that trying again will succeed\n\n  if (!tracker) {\n    return true;\n  }\n\n  var lastValue = tracker.getValue();\n  var nextValue = getValueFromNode(node);\n\n  if (nextValue !== lastValue) {\n    tracker.setValue(nextValue);\n    return true;\n  }\n\n  return false;\n}\n\nfunction getActiveElement(doc) {\n  doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n  if (typeof doc === 'undefined') {\n    return null;\n  }\n\n  try {\n    return doc.activeElement || doc.body;\n  } catch (e) {\n    return doc.body;\n  }\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n  var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n  return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n  var node = element;\n  var checked = props.checked;\n  var hostProps = assign({}, props, {\n    defaultChecked: undefined,\n    defaultValue: undefined,\n    value: undefined,\n    checked: checked != null ? checked : node._wrapperState.initialChecked\n  });\n  return hostProps;\n}\nfunction initWrapperState(element, props) {\n  {\n    checkControlledValueProps('input', props);\n\n    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n      error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n      didWarnCheckedDefaultChecked = true;\n    }\n\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n      error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n      didWarnValueDefaultValue = true;\n    }\n  }\n\n  var node = element;\n  var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n  node._wrapperState = {\n    initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n    initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n    controlled: isControlled(props)\n  };\n}\nfunction updateChecked(element, props) {\n  var node = element;\n  var checked = props.checked;\n\n  if (checked != null) {\n    setValueForProperty(node, 'checked', checked, false);\n  }\n}\nfunction updateWrapper(element, props) {\n  var node = element;\n\n  {\n    var controlled = isControlled(props);\n\n    if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n      error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n      didWarnUncontrolledToControlled = true;\n    }\n\n    if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n      error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');\n\n      didWarnControlledToUncontrolled = true;\n    }\n  }\n\n  updateChecked(element, props);\n  var value = getToStringValue(props.value);\n  var type = props.type;\n\n  if (value != null) {\n    if (type === 'number') {\n      if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n      // eslint-disable-next-line\n      node.value != value) {\n        node.value = toString(value);\n      }\n    } else if (node.value !== toString(value)) {\n      node.value = toString(value);\n    }\n  } else if (type === 'submit' || type === 'reset') {\n    // Submit/reset inputs need the attribute removed completely to avoid\n    // blank-text buttons.\n    node.removeAttribute('value');\n    return;\n  }\n\n  {\n    // When syncing the value attribute, the value comes from a cascade of\n    // properties:\n    //  1. The value React property\n    //  2. The defaultValue React property\n    //  3. Otherwise there should be no change\n    if (props.hasOwnProperty('value')) {\n      setDefaultValue(node, props.type, value);\n    } else if (props.hasOwnProperty('defaultValue')) {\n      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n    }\n  }\n\n  {\n    // When syncing the checked attribute, it only changes when it needs\n    // to be removed, such as transitioning from a checkbox into a text input\n    if (props.checked == null && props.defaultChecked != null) {\n      node.defaultChecked = !!props.defaultChecked;\n    }\n  }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n  var node = element; // Do not assign value if it is already set. This prevents user text input\n  // from being lost during SSR hydration.\n\n  if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n    var type = props.type;\n    var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n    // default value provided by the browser. See: #12872\n\n    if (isButton && (props.value === undefined || props.value === null)) {\n      return;\n    }\n\n    var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n    // from being lost during SSR hydration.\n\n    if (!isHydrating) {\n      {\n        // When syncing the value attribute, the value property should use\n        // the wrapperState._initialValue property. This uses:\n        //\n        //   1. The value React property when present\n        //   2. The defaultValue React property when present\n        //   3. An empty string\n        if (initialValue !== node.value) {\n          node.value = initialValue;\n        }\n      }\n    }\n\n    {\n      // Otherwise, the value attribute is synchronized to the property,\n      // so we assign defaultValue to the same thing as the value property\n      // assignment step above.\n      node.defaultValue = initialValue;\n    }\n  } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n  // this is needed to work around a chrome bug where setting defaultChecked\n  // will sometimes influence the value of checked (even after detachment).\n  // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n  // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n  var name = node.name;\n\n  if (name !== '') {\n    node.name = '';\n  }\n\n  {\n    // When syncing the checked attribute, both the checked property and\n    // attribute are assigned at the same time using defaultChecked. This uses:\n    //\n    //   1. The checked React property when present\n    //   2. The defaultChecked React property when present\n    //   3. Otherwise, false\n    node.defaultChecked = !node.defaultChecked;\n    node.defaultChecked = !!node._wrapperState.initialChecked;\n  }\n\n  if (name !== '') {\n    node.name = name;\n  }\n}\nfunction restoreControlledState(element, props) {\n  var node = element;\n  updateWrapper(node, props);\n  updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n  var name = props.name;\n\n  if (props.type === 'radio' && name != null) {\n    var queryRoot = rootNode;\n\n    while (queryRoot.parentNode) {\n      queryRoot = queryRoot.parentNode;\n    } // If `rootNode.form` was non-null, then we could try `form.elements`,\n    // but that sometimes behaves strangely in IE8. We could also try using\n    // `form.getElementsByName`, but that will only return direct children\n    // and won't include inputs that use the HTML5 `form=` attribute. Since\n    // the input might not even be in a form. It might not even be in the\n    // document. Let's just use the local `querySelectorAll` to ensure we don't\n    // miss anything.\n\n\n    {\n      checkAttributeStringCoercion(name, 'name');\n    }\n\n    var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n    for (var i = 0; i < group.length; i++) {\n      var otherNode = group[i];\n\n      if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n        continue;\n      } // This will throw if radio buttons rendered by different copies of React\n      // and the same name are rendered into the same form (same as #1939).\n      // That's probably okay; we don't support it just as we don't support\n      // mixing React radio buttons with non-React ones.\n\n\n      var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n      if (!otherProps) {\n        throw new Error('ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.');\n      } // We need update the tracked value on the named cousin since the value\n      // was changed but the input saw no event or value set\n\n\n      updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n      // was previously checked to update will cause it to be come re-checked\n      // as appropriate.\n\n      updateWrapper(otherNode, otherProps);\n    }\n  }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n  if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n  type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n    if (value == null) {\n      node.defaultValue = toString(node._wrapperState.initialValue);\n    } else if (node.defaultValue !== toString(value)) {\n      node.defaultValue = toString(value);\n    }\n  }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\nvar didWarnInvalidInnerHTML = false;\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\nfunction validateProps(element, props) {\n  {\n    // If a value is not provided, then the children must be simple.\n    if (props.value == null) {\n      if (typeof props.children === 'object' && props.children !== null) {\n        React.Children.forEach(props.children, function (child) {\n          if (child == null) {\n            return;\n          }\n\n          if (typeof child === 'string' || typeof child === 'number') {\n            return;\n          }\n\n          if (!didWarnInvalidChild) {\n            didWarnInvalidChild = true;\n\n            error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');\n          }\n        });\n      } else if (props.dangerouslySetInnerHTML != null) {\n        if (!didWarnInvalidInnerHTML) {\n          didWarnInvalidInnerHTML = true;\n\n          error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');\n        }\n      }\n    } // TODO: Remove support for `selected` in <option>.\n\n\n    if (props.selected != null && !didWarnSelectedSetOnOption) {\n      error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n      didWarnSelectedSetOnOption = true;\n    }\n  }\n}\nfunction postMountWrapper$1(element, props) {\n  // value=\"\" should make a value attribute (#6219)\n  if (props.value != null) {\n    element.setAttribute('value', toString(getToStringValue(props.value)));\n  }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n  didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n  var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n  if (ownerName) {\n    return '\\n\\nCheck the render method of `' + ownerName + '`.';\n  }\n\n  return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n  {\n    checkControlledValueProps('select', props);\n\n    for (var i = 0; i < valuePropNames.length; i++) {\n      var propName = valuePropNames[i];\n\n      if (props[propName] == null) {\n        continue;\n      }\n\n      var propNameIsArray = isArray(props[propName]);\n\n      if (props.multiple && !propNameIsArray) {\n        error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n      } else if (!props.multiple && propNameIsArray) {\n        error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n      }\n    }\n  }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n  var options = node.options;\n\n  if (multiple) {\n    var selectedValues = propValue;\n    var selectedValue = {};\n\n    for (var i = 0; i < selectedValues.length; i++) {\n      // Prefix to avoid chaos with special keys.\n      selectedValue['$' + selectedValues[i]] = true;\n    }\n\n    for (var _i = 0; _i < options.length; _i++) {\n      var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n      if (options[_i].selected !== selected) {\n        options[_i].selected = selected;\n      }\n\n      if (selected && setDefaultSelected) {\n        options[_i].defaultSelected = true;\n      }\n    }\n  } else {\n    // Do not set `select.value` as exact behavior isn't consistent across all\n    // browsers for all cases.\n    var _selectedValue = toString(getToStringValue(propValue));\n\n    var defaultSelected = null;\n\n    for (var _i2 = 0; _i2 < options.length; _i2++) {\n      if (options[_i2].value === _selectedValue) {\n        options[_i2].selected = true;\n\n        if (setDefaultSelected) {\n          options[_i2].defaultSelected = true;\n        }\n\n        return;\n      }\n\n      if (defaultSelected === null && !options[_i2].disabled) {\n        defaultSelected = options[_i2];\n      }\n    }\n\n    if (defaultSelected !== null) {\n      defaultSelected.selected = true;\n    }\n  }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$1(element, props) {\n  return assign({}, props, {\n    value: undefined\n  });\n}\nfunction initWrapperState$1(element, props) {\n  var node = element;\n\n  {\n    checkSelectPropTypes(props);\n  }\n\n  node._wrapperState = {\n    wasMultiple: !!props.multiple\n  };\n\n  {\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n      error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n      didWarnValueDefaultValue$1 = true;\n    }\n  }\n}\nfunction postMountWrapper$2(element, props) {\n  var node = element;\n  node.multiple = !!props.multiple;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  } else if (props.defaultValue != null) {\n    updateOptions(node, !!props.multiple, props.defaultValue, true);\n  }\n}\nfunction postUpdateWrapper(element, props) {\n  var node = element;\n  var wasMultiple = node._wrapperState.wasMultiple;\n  node._wrapperState.wasMultiple = !!props.multiple;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  } else if (wasMultiple !== !!props.multiple) {\n    // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n    if (props.defaultValue != null) {\n      updateOptions(node, !!props.multiple, props.defaultValue, true);\n    } else {\n      // Revert the select back to its default unselected state.\n      updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n    }\n  }\n}\nfunction restoreControlledState$1(element, props) {\n  var node = element;\n  var value = props.value;\n\n  if (value != null) {\n    updateOptions(node, !!props.multiple, value, false);\n  }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$2(element, props) {\n  var node = element;\n\n  if (props.dangerouslySetInnerHTML != null) {\n    throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');\n  } // Always set children to the same thing. In IE9, the selection range will\n  // get reset if `textContent` is mutated.  We could add a check in setTextContent\n  // to only set the value if/when the value differs from the node value (which would\n  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n  // solution. The value can be a boolean or object so that's why it's forced\n  // to be a string.\n\n\n  var hostProps = assign({}, props, {\n    value: undefined,\n    defaultValue: undefined,\n    children: toString(node._wrapperState.initialValue)\n  });\n\n  return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n  var node = element;\n\n  {\n    checkControlledValueProps('textarea', props);\n\n    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n      error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n      didWarnValDefaultVal = true;\n    }\n  }\n\n  var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n  if (initialValue == null) {\n    var children = props.children,\n        defaultValue = props.defaultValue;\n\n    if (children != null) {\n      {\n        error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n      }\n\n      {\n        if (defaultValue != null) {\n          throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');\n        }\n\n        if (isArray(children)) {\n          if (children.length > 1) {\n            throw new Error('<textarea> can only have at most one child.');\n          }\n\n          children = children[0];\n        }\n\n        defaultValue = children;\n      }\n    }\n\n    if (defaultValue == null) {\n      defaultValue = '';\n    }\n\n    initialValue = defaultValue;\n  }\n\n  node._wrapperState = {\n    initialValue: getToStringValue(initialValue)\n  };\n}\nfunction updateWrapper$1(element, props) {\n  var node = element;\n  var value = getToStringValue(props.value);\n  var defaultValue = getToStringValue(props.defaultValue);\n\n  if (value != null) {\n    // Cast `value` to a string to ensure the value is set correctly. While\n    // browsers typically do this as necessary, jsdom doesn't.\n    var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n    if (newValue !== node.value) {\n      node.value = newValue;\n    }\n\n    if (props.defaultValue == null && node.defaultValue !== newValue) {\n      node.defaultValue = newValue;\n    }\n  }\n\n  if (defaultValue != null) {\n    node.defaultValue = toString(defaultValue);\n  }\n}\nfunction postMountWrapper$3(element, props) {\n  var node = element; // This is in postMount because we need access to the DOM node, which is not\n  // available until after the component has mounted.\n\n  var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n  // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n  // will populate textContent as well.\n  // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n  if (textContent === node._wrapperState.initialValue) {\n    if (textContent !== '' && textContent !== null) {\n      node.value = textContent;\n    }\n  }\n}\nfunction restoreControlledState$2(element, props) {\n  // DOM component is still mounted; update\n  updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n  switch (type) {\n    case 'svg':\n      return SVG_NAMESPACE;\n\n    case 'math':\n      return MATH_NAMESPACE;\n\n    default:\n      return HTML_NAMESPACE;\n  }\n}\nfunction getChildNamespace(parentNamespace, type) {\n  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n    // No (or default) parent namespace: potential entry point.\n    return getIntrinsicNamespace(type);\n  }\n\n  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n    // We're leaving SVG.\n    return HTML_NAMESPACE;\n  } // By default, pass namespace below.\n\n\n  return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n    return function (arg0, arg1, arg2, arg3) {\n      MSApp.execUnsafeLocalFunction(function () {\n        return func(arg0, arg1, arg2, arg3);\n      });\n    };\n  } else {\n    return func;\n  }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n  if (node.namespaceURI === SVG_NAMESPACE) {\n\n    if (!('innerHTML' in node)) {\n      // IE does not have innerHTML for SVG nodes, so instead we inject the\n      // new markup in a temp node and then move the child nodes across into\n      // the target node\n      reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n      var svgNode = reusableSVGContainer.firstChild;\n\n      while (node.firstChild) {\n        node.removeChild(node.firstChild);\n      }\n\n      while (svgNode.firstChild) {\n        node.appendChild(svgNode.firstChild);\n      }\n\n      return;\n    }\n  }\n\n  node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n  if (text) {\n    var firstChild = node.firstChild;\n\n    if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n      firstChild.nodeValue = text;\n      return;\n    }\n  }\n\n  node.textContent = text;\n};\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n  animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n  background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n  backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n  border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n  borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n  borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n  borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n  borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n  borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n  borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n  borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n  borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n  borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n  borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n  borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n  borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n  borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n  columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n  columns: ['columnCount', 'columnWidth'],\n  flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n  flexFlow: ['flexDirection', 'flexWrap'],\n  font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n  fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n  gap: ['columnGap', 'rowGap'],\n  grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n  gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n  gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n  gridColumnGap: ['columnGap'],\n  gridGap: ['columnGap', 'rowGap'],\n  gridRow: ['gridRowEnd', 'gridRowStart'],\n  gridRowGap: ['rowGap'],\n  gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n  listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n  margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n  marker: ['markerEnd', 'markerMid', 'markerStart'],\n  mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n  maskPosition: ['maskPositionX', 'maskPositionY'],\n  outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n  overflow: ['overflowX', 'overflowY'],\n  padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n  placeContent: ['alignContent', 'justifyContent'],\n  placeItems: ['alignItems', 'justifyItems'],\n  placeSelf: ['alignSelf', 'justifySelf'],\n  textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n  textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n  transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n  wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n  animationIterationCount: true,\n  aspectRatio: true,\n  borderImageOutset: true,\n  borderImageSlice: true,\n  borderImageWidth: true,\n  boxFlex: true,\n  boxFlexGroup: true,\n  boxOrdinalGroup: true,\n  columnCount: true,\n  columns: true,\n  flex: true,\n  flexGrow: true,\n  flexPositive: true,\n  flexShrink: true,\n  flexNegative: true,\n  flexOrder: true,\n  gridArea: true,\n  gridRow: true,\n  gridRowEnd: true,\n  gridRowSpan: true,\n  gridRowStart: true,\n  gridColumn: true,\n  gridColumnEnd: true,\n  gridColumnSpan: true,\n  gridColumnStart: true,\n  fontWeight: true,\n  lineClamp: true,\n  lineHeight: true,\n  opacity: true,\n  order: true,\n  orphans: true,\n  tabSize: true,\n  widows: true,\n  zIndex: true,\n  zoom: true,\n  // SVG-related properties\n  fillOpacity: true,\n  floodOpacity: true,\n  stopOpacity: true,\n  strokeDasharray: true,\n  strokeDashoffset: true,\n  strokeMiterlimit: true,\n  strokeOpacity: true,\n  strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n  return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n  prefixes.forEach(function (prefix) {\n    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n  });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n  // Note that we've removed escapeTextForBrowser() calls here since the\n  // whole string will be escaped when the attribute is injected into\n  // the markup. If you provide unsafe user data here they can inject\n  // arbitrary CSS which may be problematic (I couldn't repro this):\n  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n  // This is not an XSS hole but instead a potential CSS injection issue\n  // which has lead to a greater discussion about how we're going to\n  // trust URLs moving forward. See #2115901\n  var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n  if (isEmpty) {\n    return '';\n  }\n\n  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n  }\n\n  {\n    checkCSSPropertyStringCoercion(value, name);\n  }\n\n  return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n *   > hyphenateStyleName('backgroundColor')\n *   < \"background-color\"\n *   > hyphenateStyleName('MozTransition')\n *   < \"-moz-transition\"\n *   > hyphenateStyleName('msTransition')\n *   < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n  return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n  // 'msTransform' is correct, but the other prefixes should be capitalized\n  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n  var msPattern$1 = /^-ms-/;\n  var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n  var badStyleValueWithSemicolonPattern = /;\\s*$/;\n  var warnedStyleNames = {};\n  var warnedStyleValues = {};\n  var warnedForNaNValue = false;\n  var warnedForInfinityValue = false;\n\n  var camelize = function (string) {\n    return string.replace(hyphenPattern, function (_, character) {\n      return character.toUpperCase();\n    });\n  };\n\n  var warnHyphenatedStyleName = function (name) {\n    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n      return;\n    }\n\n    warnedStyleNames[name] = true;\n\n    error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n    // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n    // is converted to lowercase `ms`.\n    camelize(name.replace(msPattern$1, 'ms-')));\n  };\n\n  var warnBadVendoredStyleName = function (name) {\n    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n      return;\n    }\n\n    warnedStyleNames[name] = true;\n\n    error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n  };\n\n  var warnStyleValueWithSemicolon = function (name, value) {\n    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n      return;\n    }\n\n    warnedStyleValues[value] = true;\n\n    error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n  };\n\n  var warnStyleValueIsNaN = function (name, value) {\n    if (warnedForNaNValue) {\n      return;\n    }\n\n    warnedForNaNValue = true;\n\n    error('`NaN` is an invalid value for the `%s` css style property.', name);\n  };\n\n  var warnStyleValueIsInfinity = function (name, value) {\n    if (warnedForInfinityValue) {\n      return;\n    }\n\n    warnedForInfinityValue = true;\n\n    error('`Infinity` is an invalid value for the `%s` css style property.', name);\n  };\n\n  warnValidStyle = function (name, value) {\n    if (name.indexOf('-') > -1) {\n      warnHyphenatedStyleName(name);\n    } else if (badVendoredStyleNamePattern.test(name)) {\n      warnBadVendoredStyleName(name);\n    } else if (badStyleValueWithSemicolonPattern.test(value)) {\n      warnStyleValueWithSemicolon(name, value);\n    }\n\n    if (typeof value === 'number') {\n      if (isNaN(value)) {\n        warnStyleValueIsNaN(name, value);\n      } else if (!isFinite(value)) {\n        warnStyleValueIsInfinity(name, value);\n      }\n    }\n  };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n  {\n    var serialized = '';\n    var delimiter = '';\n\n    for (var styleName in styles) {\n      if (!styles.hasOwnProperty(styleName)) {\n        continue;\n      }\n\n      var styleValue = styles[styleName];\n\n      if (styleValue != null) {\n        var isCustomProperty = styleName.indexOf('--') === 0;\n        serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n        serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n        delimiter = ';';\n      }\n    }\n\n    return serialized || null;\n  }\n}\n/**\n * Sets the value for multiple styles on a node.  If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n  var style = node.style;\n\n  for (var styleName in styles) {\n    if (!styles.hasOwnProperty(styleName)) {\n      continue;\n    }\n\n    var isCustomProperty = styleName.indexOf('--') === 0;\n\n    {\n      if (!isCustomProperty) {\n        warnValidStyle$1(styleName, styles[styleName]);\n      }\n    }\n\n    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n    if (styleName === 'float') {\n      styleName = 'cssFloat';\n    }\n\n    if (isCustomProperty) {\n      style.setProperty(styleName, styleValue);\n    } else {\n      style[styleName] = styleValue;\n    }\n  }\n}\n\nfunction isValueEmpty(value) {\n  return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n *   color: 'color',\n *   overflowX: 'overflow',\n *   overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n  var expanded = {};\n\n  for (var key in styles) {\n    var longhands = shorthandToLonghand[key] || [key];\n\n    for (var i = 0; i < longhands.length; i++) {\n      expanded[longhands[i]] = key;\n    }\n  }\n\n  return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n *   becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n *   becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n *   becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n  {\n    if (!nextStyles) {\n      return;\n    }\n\n    var expandedUpdates = expandShorthandMap(styleUpdates);\n    var expandedStyles = expandShorthandMap(nextStyles);\n    var warnedAbout = {};\n\n    for (var key in expandedUpdates) {\n      var originalKey = expandedUpdates[key];\n      var correctOriginalKey = expandedStyles[key];\n\n      if (correctOriginalKey && originalKey !== correctOriginalKey) {\n        var warningKey = originalKey + ',' + correctOriginalKey;\n\n        if (warnedAbout[warningKey]) {\n          continue;\n        }\n\n        warnedAbout[warningKey] = true;\n\n        error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n      }\n    }\n  }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a list for\n// those special-case tags.\nvar omittedCloseTags = {\n  area: true,\n  base: true,\n  br: true,\n  col: true,\n  embed: true,\n  hr: true,\n  img: true,\n  input: true,\n  keygen: true,\n  link: true,\n  meta: true,\n  param: true,\n  source: true,\n  track: true,\n  wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = assign({\n  menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\n\nfunction assertValidProps(tag, props) {\n  if (!props) {\n    return;\n  } // Note the use of `==` which checks for null or undefined.\n\n\n  if (voidElementTags[tag]) {\n    if (props.children != null || props.dangerouslySetInnerHTML != null) {\n      throw new Error(tag + \" is a void element tag and must neither have `children` nor \" + 'use `dangerouslySetInnerHTML`.');\n    }\n  }\n\n  if (props.dangerouslySetInnerHTML != null) {\n    if (props.children != null) {\n      throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');\n    }\n\n    if (typeof props.dangerouslySetInnerHTML !== 'object' || !(HTML in props.dangerouslySetInnerHTML)) {\n      throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');\n    }\n  }\n\n  {\n    if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n      error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n    }\n  }\n\n  if (props.style != null && typeof props.style !== 'object') {\n    throw new Error('The `style` prop expects a mapping from style properties to values, ' + \"not a string. For example, style={{marginRight: spacing + 'em'}} when \" + 'using JSX.');\n  }\n}\n\nfunction isCustomComponent(tagName, props) {\n  if (tagName.indexOf('-') === -1) {\n    return typeof props.is === 'string';\n  }\n\n  switch (tagName) {\n    // These are reserved SVG and MathML elements.\n    // We don't mind this list too much because we expect it to never grow.\n    // The alternative is to track the namespace in a few places which is convoluted.\n    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n    case 'annotation-xml':\n    case 'color-profile':\n    case 'font-face':\n    case 'font-face-src':\n    case 'font-face-uri':\n    case 'font-face-format':\n    case 'font-face-name':\n    case 'missing-glyph':\n      return false;\n\n    default:\n      return true;\n  }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n  // HTML\n  accept: 'accept',\n  acceptcharset: 'acceptCharset',\n  'accept-charset': 'acceptCharset',\n  accesskey: 'accessKey',\n  action: 'action',\n  allowfullscreen: 'allowFullScreen',\n  alt: 'alt',\n  as: 'as',\n  async: 'async',\n  autocapitalize: 'autoCapitalize',\n  autocomplete: 'autoComplete',\n  autocorrect: 'autoCorrect',\n  autofocus: 'autoFocus',\n  autoplay: 'autoPlay',\n  autosave: 'autoSave',\n  capture: 'capture',\n  cellpadding: 'cellPadding',\n  cellspacing: 'cellSpacing',\n  challenge: 'challenge',\n  charset: 'charSet',\n  checked: 'checked',\n  children: 'children',\n  cite: 'cite',\n  class: 'className',\n  classid: 'classID',\n  classname: 'className',\n  cols: 'cols',\n  colspan: 'colSpan',\n  content: 'content',\n  contenteditable: 'contentEditable',\n  contextmenu: 'contextMenu',\n  controls: 'controls',\n  controlslist: 'controlsList',\n  coords: 'coords',\n  crossorigin: 'crossOrigin',\n  dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n  data: 'data',\n  datetime: 'dateTime',\n  default: 'default',\n  defaultchecked: 'defaultChecked',\n  defaultvalue: 'defaultValue',\n  defer: 'defer',\n  dir: 'dir',\n  disabled: 'disabled',\n  disablepictureinpicture: 'disablePictureInPicture',\n  disableremoteplayback: 'disableRemotePlayback',\n  download: 'download',\n  draggable: 'draggable',\n  enctype: 'encType',\n  enterkeyhint: 'enterKeyHint',\n  for: 'htmlFor',\n  form: 'form',\n  formmethod: 'formMethod',\n  formaction: 'formAction',\n  formenctype: 'formEncType',\n  formnovalidate: 'formNoValidate',\n  formtarget: 'formTarget',\n  frameborder: 'frameBorder',\n  headers: 'headers',\n  height: 'height',\n  hidden: 'hidden',\n  high: 'high',\n  href: 'href',\n  hreflang: 'hrefLang',\n  htmlfor: 'htmlFor',\n  httpequiv: 'httpEquiv',\n  'http-equiv': 'httpEquiv',\n  icon: 'icon',\n  id: 'id',\n  imagesizes: 'imageSizes',\n  imagesrcset: 'imageSrcSet',\n  innerhtml: 'innerHTML',\n  inputmode: 'inputMode',\n  integrity: 'integrity',\n  is: 'is',\n  itemid: 'itemID',\n  itemprop: 'itemProp',\n  itemref: 'itemRef',\n  itemscope: 'itemScope',\n  itemtype: 'itemType',\n  keyparams: 'keyParams',\n  keytype: 'keyType',\n  kind: 'kind',\n  label: 'label',\n  lang: 'lang',\n  list: 'list',\n  loop: 'loop',\n  low: 'low',\n  manifest: 'manifest',\n  marginwidth: 'marginWidth',\n  marginheight: 'marginHeight',\n  max: 'max',\n  maxlength: 'maxLength',\n  media: 'media',\n  mediagroup: 'mediaGroup',\n  method: 'method',\n  min: 'min',\n  minlength: 'minLength',\n  multiple: 'multiple',\n  muted: 'muted',\n  name: 'name',\n  nomodule: 'noModule',\n  nonce: 'nonce',\n  novalidate: 'noValidate',\n  open: 'open',\n  optimum: 'optimum',\n  pattern: 'pattern',\n  placeholder: 'placeholder',\n  playsinline: 'playsInline',\n  poster: 'poster',\n  preload: 'preload',\n  profile: 'profile',\n  radiogroup: 'radioGroup',\n  readonly: 'readOnly',\n  referrerpolicy: 'referrerPolicy',\n  rel: 'rel',\n  required: 'required',\n  reversed: 'reversed',\n  role: 'role',\n  rows: 'rows',\n  rowspan: 'rowSpan',\n  sandbox: 'sandbox',\n  scope: 'scope',\n  scoped: 'scoped',\n  scrolling: 'scrolling',\n  seamless: 'seamless',\n  selected: 'selected',\n  shape: 'shape',\n  size: 'size',\n  sizes: 'sizes',\n  span: 'span',\n  spellcheck: 'spellCheck',\n  src: 'src',\n  srcdoc: 'srcDoc',\n  srclang: 'srcLang',\n  srcset: 'srcSet',\n  start: 'start',\n  step: 'step',\n  style: 'style',\n  summary: 'summary',\n  tabindex: 'tabIndex',\n  target: 'target',\n  title: 'title',\n  type: 'type',\n  usemap: 'useMap',\n  value: 'value',\n  width: 'width',\n  wmode: 'wmode',\n  wrap: 'wrap',\n  // SVG\n  about: 'about',\n  accentheight: 'accentHeight',\n  'accent-height': 'accentHeight',\n  accumulate: 'accumulate',\n  additive: 'additive',\n  alignmentbaseline: 'alignmentBaseline',\n  'alignment-baseline': 'alignmentBaseline',\n  allowreorder: 'allowReorder',\n  alphabetic: 'alphabetic',\n  amplitude: 'amplitude',\n  arabicform: 'arabicForm',\n  'arabic-form': 'arabicForm',\n  ascent: 'ascent',\n  attributename: 'attributeName',\n  attributetype: 'attributeType',\n  autoreverse: 'autoReverse',\n  azimuth: 'azimuth',\n  basefrequency: 'baseFrequency',\n  baselineshift: 'baselineShift',\n  'baseline-shift': 'baselineShift',\n  baseprofile: 'baseProfile',\n  bbox: 'bbox',\n  begin: 'begin',\n  bias: 'bias',\n  by: 'by',\n  calcmode: 'calcMode',\n  capheight: 'capHeight',\n  'cap-height': 'capHeight',\n  clip: 'clip',\n  clippath: 'clipPath',\n  'clip-path': 'clipPath',\n  clippathunits: 'clipPathUnits',\n  cliprule: 'clipRule',\n  'clip-rule': 'clipRule',\n  color: 'color',\n  colorinterpolation: 'colorInterpolation',\n  'color-interpolation': 'colorInterpolation',\n  colorinterpolationfilters: 'colorInterpolationFilters',\n  'color-interpolation-filters': 'colorInterpolationFilters',\n  colorprofile: 'colorProfile',\n  'color-profile': 'colorProfile',\n  colorrendering: 'colorRendering',\n  'color-rendering': 'colorRendering',\n  contentscripttype: 'contentScriptType',\n  contentstyletype: 'contentStyleType',\n  cursor: 'cursor',\n  cx: 'cx',\n  cy: 'cy',\n  d: 'd',\n  datatype: 'datatype',\n  decelerate: 'decelerate',\n  descent: 'descent',\n  diffuseconstant: 'diffuseConstant',\n  direction: 'direction',\n  display: 'display',\n  divisor: 'divisor',\n  dominantbaseline: 'dominantBaseline',\n  'dominant-baseline': 'dominantBaseline',\n  dur: 'dur',\n  dx: 'dx',\n  dy: 'dy',\n  edgemode: 'edgeMode',\n  elevation: 'elevation',\n  enablebackground: 'enableBackground',\n  'enable-background': 'enableBackground',\n  end: 'end',\n  exponent: 'exponent',\n  externalresourcesrequired: 'externalResourcesRequired',\n  fill: 'fill',\n  fillopacity: 'fillOpacity',\n  'fill-opacity': 'fillOpacity',\n  fillrule: 'fillRule',\n  'fill-rule': 'fillRule',\n  filter: 'filter',\n  filterres: 'filterRes',\n  filterunits: 'filterUnits',\n  floodopacity: 'floodOpacity',\n  'flood-opacity': 'floodOpacity',\n  floodcolor: 'floodColor',\n  'flood-color': 'floodColor',\n  focusable: 'focusable',\n  fontfamily: 'fontFamily',\n  'font-family': 'fontFamily',\n  fontsize: 'fontSize',\n  'font-size': 'fontSize',\n  fontsizeadjust: 'fontSizeAdjust',\n  'font-size-adjust': 'fontSizeAdjust',\n  fontstretch: 'fontStretch',\n  'font-stretch': 'fontStretch',\n  fontstyle: 'fontStyle',\n  'font-style': 'fontStyle',\n  fontvariant: 'fontVariant',\n  'font-variant': 'fontVariant',\n  fontweight: 'fontWeight',\n  'font-weight': 'fontWeight',\n  format: 'format',\n  from: 'from',\n  fx: 'fx',\n  fy: 'fy',\n  g1: 'g1',\n  g2: 'g2',\n  glyphname: 'glyphName',\n  'glyph-name': 'glyphName',\n  glyphorientationhorizontal: 'glyphOrientationHorizontal',\n  'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n  glyphorientationvertical: 'glyphOrientationVertical',\n  'glyph-orientation-vertical': 'glyphOrientationVertical',\n  glyphref: 'glyphRef',\n  gradienttransform: 'gradientTransform',\n  gradientunits: 'gradientUnits',\n  hanging: 'hanging',\n  horizadvx: 'horizAdvX',\n  'horiz-adv-x': 'horizAdvX',\n  horizoriginx: 'horizOriginX',\n  'horiz-origin-x': 'horizOriginX',\n  ideographic: 'ideographic',\n  imagerendering: 'imageRendering',\n  'image-rendering': 'imageRendering',\n  in2: 'in2',\n  in: 'in',\n  inlist: 'inlist',\n  intercept: 'intercept',\n  k1: 'k1',\n  k2: 'k2',\n  k3: 'k3',\n  k4: 'k4',\n  k: 'k',\n  kernelmatrix: 'kernelMatrix',\n  kernelunitlength: 'kernelUnitLength',\n  kerning: 'kerning',\n  keypoints: 'keyPoints',\n  keysplines: 'keySplines',\n  keytimes: 'keyTimes',\n  lengthadjust: 'lengthAdjust',\n  letterspacing: 'letterSpacing',\n  'letter-spacing': 'letterSpacing',\n  lightingcolor: 'lightingColor',\n  'lighting-color': 'lightingColor',\n  limitingconeangle: 'limitingConeAngle',\n  local: 'local',\n  markerend: 'markerEnd',\n  'marker-end': 'markerEnd',\n  markerheight: 'markerHeight',\n  markermid: 'markerMid',\n  'marker-mid': 'markerMid',\n  markerstart: 'markerStart',\n  'marker-start': 'markerStart',\n  markerunits: 'markerUnits',\n  markerwidth: 'markerWidth',\n  mask: 'mask',\n  maskcontentunits: 'maskContentUnits',\n  maskunits: 'maskUnits',\n  mathematical: 'mathematical',\n  mode: 'mode',\n  numoctaves: 'numOctaves',\n  offset: 'offset',\n  opacity: 'opacity',\n  operator: 'operator',\n  order: 'order',\n  orient: 'orient',\n  orientation: 'orientation',\n  origin: 'origin',\n  overflow: 'overflow',\n  overlineposition: 'overlinePosition',\n  'overline-position': 'overlinePosition',\n  overlinethickness: 'overlineThickness',\n  'overline-thickness': 'overlineThickness',\n  paintorder: 'paintOrder',\n  'paint-order': 'paintOrder',\n  panose1: 'panose1',\n  'panose-1': 'panose1',\n  pathlength: 'pathLength',\n  patterncontentunits: 'patternContentUnits',\n  patterntransform: 'patternTransform',\n  patternunits: 'patternUnits',\n  pointerevents: 'pointerEvents',\n  'pointer-events': 'pointerEvents',\n  points: 'points',\n  pointsatx: 'pointsAtX',\n  pointsaty: 'pointsAtY',\n  pointsatz: 'pointsAtZ',\n  prefix: 'prefix',\n  preservealpha: 'preserveAlpha',\n  preserveaspectratio: 'preserveAspectRatio',\n  primitiveunits: 'primitiveUnits',\n  property: 'property',\n  r: 'r',\n  radius: 'radius',\n  refx: 'refX',\n  refy: 'refY',\n  renderingintent: 'renderingIntent',\n  'rendering-intent': 'renderingIntent',\n  repeatcount: 'repeatCount',\n  repeatdur: 'repeatDur',\n  requiredextensions: 'requiredExtensions',\n  requiredfeatures: 'requiredFeatures',\n  resource: 'resource',\n  restart: 'restart',\n  result: 'result',\n  results: 'results',\n  rotate: 'rotate',\n  rx: 'rx',\n  ry: 'ry',\n  scale: 'scale',\n  security: 'security',\n  seed: 'seed',\n  shaperendering: 'shapeRendering',\n  'shape-rendering': 'shapeRendering',\n  slope: 'slope',\n  spacing: 'spacing',\n  specularconstant: 'specularConstant',\n  specularexponent: 'specularExponent',\n  speed: 'speed',\n  spreadmethod: 'spreadMethod',\n  startoffset: 'startOffset',\n  stddeviation: 'stdDeviation',\n  stemh: 'stemh',\n  stemv: 'stemv',\n  stitchtiles: 'stitchTiles',\n  stopcolor: 'stopColor',\n  'stop-color': 'stopColor',\n  stopopacity: 'stopOpacity',\n  'stop-opacity': 'stopOpacity',\n  strikethroughposition: 'strikethroughPosition',\n  'strikethrough-position': 'strikethroughPosition',\n  strikethroughthickness: 'strikethroughThickness',\n  'strikethrough-thickness': 'strikethroughThickness',\n  string: 'string',\n  stroke: 'stroke',\n  strokedasharray: 'strokeDasharray',\n  'stroke-dasharray': 'strokeDasharray',\n  strokedashoffset: 'strokeDashoffset',\n  'stroke-dashoffset': 'strokeDashoffset',\n  strokelinecap: 'strokeLinecap',\n  'stroke-linecap': 'strokeLinecap',\n  strokelinejoin: 'strokeLinejoin',\n  'stroke-linejoin': 'strokeLinejoin',\n  strokemiterlimit: 'strokeMiterlimit',\n  'stroke-miterlimit': 'strokeMiterlimit',\n  strokewidth: 'strokeWidth',\n  'stroke-width': 'strokeWidth',\n  strokeopacity: 'strokeOpacity',\n  'stroke-opacity': 'strokeOpacity',\n  suppresscontenteditablewarning: 'suppressContentEditableWarning',\n  suppresshydrationwarning: 'suppressHydrationWarning',\n  surfacescale: 'surfaceScale',\n  systemlanguage: 'systemLanguage',\n  tablevalues: 'tableValues',\n  targetx: 'targetX',\n  targety: 'targetY',\n  textanchor: 'textAnchor',\n  'text-anchor': 'textAnchor',\n  textdecoration: 'textDecoration',\n  'text-decoration': 'textDecoration',\n  textlength: 'textLength',\n  textrendering: 'textRendering',\n  'text-rendering': 'textRendering',\n  to: 'to',\n  transform: 'transform',\n  typeof: 'typeof',\n  u1: 'u1',\n  u2: 'u2',\n  underlineposition: 'underlinePosition',\n  'underline-position': 'underlinePosition',\n  underlinethickness: 'underlineThickness',\n  'underline-thickness': 'underlineThickness',\n  unicode: 'unicode',\n  unicodebidi: 'unicodeBidi',\n  'unicode-bidi': 'unicodeBidi',\n  unicoderange: 'unicodeRange',\n  'unicode-range': 'unicodeRange',\n  unitsperem: 'unitsPerEm',\n  'units-per-em': 'unitsPerEm',\n  unselectable: 'unselectable',\n  valphabetic: 'vAlphabetic',\n  'v-alphabetic': 'vAlphabetic',\n  values: 'values',\n  vectoreffect: 'vectorEffect',\n  'vector-effect': 'vectorEffect',\n  version: 'version',\n  vertadvy: 'vertAdvY',\n  'vert-adv-y': 'vertAdvY',\n  vertoriginx: 'vertOriginX',\n  'vert-origin-x': 'vertOriginX',\n  vertoriginy: 'vertOriginY',\n  'vert-origin-y': 'vertOriginY',\n  vhanging: 'vHanging',\n  'v-hanging': 'vHanging',\n  videographic: 'vIdeographic',\n  'v-ideographic': 'vIdeographic',\n  viewbox: 'viewBox',\n  viewtarget: 'viewTarget',\n  visibility: 'visibility',\n  vmathematical: 'vMathematical',\n  'v-mathematical': 'vMathematical',\n  vocab: 'vocab',\n  widths: 'widths',\n  wordspacing: 'wordSpacing',\n  'word-spacing': 'wordSpacing',\n  writingmode: 'writingMode',\n  'writing-mode': 'writingMode',\n  x1: 'x1',\n  x2: 'x2',\n  x: 'x',\n  xchannelselector: 'xChannelSelector',\n  xheight: 'xHeight',\n  'x-height': 'xHeight',\n  xlinkactuate: 'xlinkActuate',\n  'xlink:actuate': 'xlinkActuate',\n  xlinkarcrole: 'xlinkArcrole',\n  'xlink:arcrole': 'xlinkArcrole',\n  xlinkhref: 'xlinkHref',\n  'xlink:href': 'xlinkHref',\n  xlinkrole: 'xlinkRole',\n  'xlink:role': 'xlinkRole',\n  xlinkshow: 'xlinkShow',\n  'xlink:show': 'xlinkShow',\n  xlinktitle: 'xlinkTitle',\n  'xlink:title': 'xlinkTitle',\n  xlinktype: 'xlinkType',\n  'xlink:type': 'xlinkType',\n  xmlbase: 'xmlBase',\n  'xml:base': 'xmlBase',\n  xmllang: 'xmlLang',\n  'xml:lang': 'xmlLang',\n  xmlns: 'xmlns',\n  'xml:space': 'xmlSpace',\n  xmlnsxlink: 'xmlnsXlink',\n  'xmlns:xlink': 'xmlnsXlink',\n  xmlspace: 'xmlSpace',\n  y1: 'y1',\n  y2: 'y2',\n  y: 'y',\n  ychannelselector: 'yChannelSelector',\n  z: 'z',\n  zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n  'aria-current': 0,\n  // state\n  'aria-description': 0,\n  'aria-details': 0,\n  'aria-disabled': 0,\n  // state\n  'aria-hidden': 0,\n  // state\n  'aria-invalid': 0,\n  // state\n  'aria-keyshortcuts': 0,\n  'aria-label': 0,\n  'aria-roledescription': 0,\n  // Widget Attributes\n  'aria-autocomplete': 0,\n  'aria-checked': 0,\n  'aria-expanded': 0,\n  'aria-haspopup': 0,\n  'aria-level': 0,\n  'aria-modal': 0,\n  'aria-multiline': 0,\n  'aria-multiselectable': 0,\n  'aria-orientation': 0,\n  'aria-placeholder': 0,\n  'aria-pressed': 0,\n  'aria-readonly': 0,\n  'aria-required': 0,\n  'aria-selected': 0,\n  'aria-sort': 0,\n  'aria-valuemax': 0,\n  'aria-valuemin': 0,\n  'aria-valuenow': 0,\n  'aria-valuetext': 0,\n  // Live Region Attributes\n  'aria-atomic': 0,\n  'aria-busy': 0,\n  'aria-live': 0,\n  'aria-relevant': 0,\n  // Drag-and-Drop Attributes\n  'aria-dropeffect': 0,\n  'aria-grabbed': 0,\n  // Relationship Attributes\n  'aria-activedescendant': 0,\n  'aria-colcount': 0,\n  'aria-colindex': 0,\n  'aria-colspan': 0,\n  'aria-controls': 0,\n  'aria-describedby': 0,\n  'aria-errormessage': 0,\n  'aria-flowto': 0,\n  'aria-labelledby': 0,\n  'aria-owns': 0,\n  'aria-posinset': 0,\n  'aria-rowcount': 0,\n  'aria-rowindex': 0,\n  'aria-rowspan': 0,\n  'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\nfunction validateProperty(tagName, name) {\n  {\n    if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {\n      return true;\n    }\n\n    if (rARIACamel.test(name)) {\n      var ariaName = 'aria-' + name.slice(4).toLowerCase();\n      var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n      // DOM properties, then it is an invalid aria-* attribute.\n\n      if (correctName == null) {\n        error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n        warnedProperties[name] = true;\n        return true;\n      } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n      if (name !== correctName) {\n        error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n        warnedProperties[name] = true;\n        return true;\n      }\n    }\n\n    if (rARIA.test(name)) {\n      var lowerCasedName = name.toLowerCase();\n      var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n      // DOM properties, then it is an invalid aria-* attribute.\n\n      if (standardName == null) {\n        warnedProperties[name] = true;\n        return false;\n      } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n      if (name !== standardName) {\n        error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n        warnedProperties[name] = true;\n        return true;\n      }\n    }\n  }\n\n  return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n  {\n    var invalidProps = [];\n\n    for (var key in props) {\n      var isValid = validateProperty(type, key);\n\n      if (!isValid) {\n        invalidProps.push(key);\n      }\n    }\n\n    var unknownPropString = invalidProps.map(function (prop) {\n      return '`' + prop + '`';\n    }).join(', ');\n\n    if (invalidProps.length === 1) {\n      error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n    } else if (invalidProps.length > 1) {\n      error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n    }\n  }\n}\n\nfunction validateProperties(type, props) {\n  if (isCustomComponent(type, props)) {\n    return;\n  }\n\n  warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n  {\n    if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n      return;\n    }\n\n    if (props != null && props.value === null && !didWarnValueNull) {\n      didWarnValueNull = true;\n\n      if (type === 'select' && props.multiple) {\n        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n      } else {\n        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n      }\n    }\n  }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n  var warnedProperties$1 = {};\n  var EVENT_NAME_REGEX = /^on./;\n  var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n  validateProperty$1 = function (tagName, name, value, eventRegistry) {\n    if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n      return true;\n    }\n\n    var lowerCasedName = name.toLowerCase();\n\n    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n      error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // We can't rely on the event system being injected on the server.\n\n\n    if (eventRegistry != null) {\n      var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n          possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n      if (registrationNameDependencies.hasOwnProperty(name)) {\n        return true;\n      }\n\n      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n      if (registrationName != null) {\n        error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n\n      if (EVENT_NAME_REGEX.test(name)) {\n        error('Unknown event handler property `%s`. It will be ignored.', name);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n    } else if (EVENT_NAME_REGEX.test(name)) {\n      // If no event plugins have been injected, we are in a server environment.\n      // So we can't tell if the event name is correct for sure, but we can filter\n      // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n      if (INVALID_EVENT_NAME_REGEX.test(name)) {\n        error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n      }\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // Let the ARIA attribute hook validate ARIA attributes\n\n\n    if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n      return true;\n    }\n\n    if (lowerCasedName === 'innerhtml') {\n      error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (lowerCasedName === 'aria') {\n      error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n      error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (typeof value === 'number' && isNaN(value)) {\n      error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    var propertyInfo = getPropertyInfo(name);\n    var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n    if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n      var standardName = possibleStandardNames[lowerCasedName];\n\n      if (standardName !== name) {\n        error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n        warnedProperties$1[name] = true;\n        return true;\n      }\n    } else if (!isReserved && name !== lowerCasedName) {\n      // Unknown attributes should have lowercase casing since that's how they\n      // will be cased anyway with server rendering.\n      error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n      if (value) {\n        error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n      } else {\n        error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n      }\n\n      warnedProperties$1[name] = true;\n      return true;\n    } // Now that we've validated casing, do not validate\n    // data types for reserved props\n\n\n    if (isReserved) {\n      return true;\n    } // Warn when a known attribute is a bad type\n\n\n    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n      warnedProperties$1[name] = true;\n      return false;\n    } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n    if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n      error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n      warnedProperties$1[name] = true;\n      return true;\n    }\n\n    return true;\n  };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n  {\n    var unknownProps = [];\n\n    for (var key in props) {\n      var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n      if (!isValid) {\n        unknownProps.push(key);\n      }\n    }\n\n    var unknownPropString = unknownProps.map(function (prop) {\n      return '`' + prop + '`';\n    }).join(', ');\n\n    if (unknownProps.length === 1) {\n      error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n    } else if (unknownProps.length > 1) {\n      error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n    }\n  }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n  if (isCustomComponent(type, props)) {\n    return;\n  }\n\n  warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n// This exists to avoid circular dependency between ReactDOMEventReplaying\n// and DOMPluginEventSystem.\nvar currentReplayingEvent = null;\nfunction setReplayingEvent(event) {\n  {\n    if (currentReplayingEvent !== null) {\n      error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  currentReplayingEvent = event;\n}\nfunction resetReplayingEvent() {\n  {\n    if (currentReplayingEvent === null) {\n      error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  currentReplayingEvent = null;\n}\nfunction isReplayingEvent(event) {\n  return event === currentReplayingEvent;\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n  // Fallback to nativeEvent.srcElement for IE9\n  // https://github.com/facebook/react/issues/12506\n  var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n  if (target.correspondingUseElement) {\n    target = target.correspondingUseElement;\n  } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n  // @see http://www.quirksmode.org/js/events_properties.html\n\n\n  return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n  // We perform this translation at the end of the event loop so that we\n  // always receive the correct fiber here\n  var internalInstance = getInstanceFromNode(target);\n\n  if (!internalInstance) {\n    // Unmounted\n    return;\n  }\n\n  if (typeof restoreImpl !== 'function') {\n    throw new Error('setRestoreImplementation() needs to be called to handle a target for controlled ' + 'events. This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n  if (stateNode) {\n    var _props = getFiberCurrentPropsFromNode(stateNode);\n\n    restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n  }\n}\n\nfunction setRestoreImplementation(impl) {\n  restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n  if (restoreTarget) {\n    if (restoreQueue) {\n      restoreQueue.push(target);\n    } else {\n      restoreQueue = [target];\n    }\n  } else {\n    restoreTarget = target;\n  }\n}\nfunction needsStateRestore() {\n  return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n  if (!restoreTarget) {\n    return;\n  }\n\n  var target = restoreTarget;\n  var queuedTargets = restoreQueue;\n  restoreTarget = null;\n  restoreQueue = null;\n  restoreStateOfTarget(target);\n\n  if (queuedTargets) {\n    for (var i = 0; i < queuedTargets.length; i++) {\n      restoreStateOfTarget(queuedTargets[i]);\n    }\n  }\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n  return fn(bookkeeping);\n};\n\nvar flushSyncImpl = function () {};\n\nvar isInsideEventHandler = false;\n\nfunction finishEventHandler() {\n  // Here we wait until all updates have propagated, which is important\n  // when using controlled components within layers:\n  // https://github.com/facebook/react/issues/1698\n  // Then we restore state of any controlled component.\n  var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n  if (controlledComponentsHavePendingUpdates) {\n    // If a controlled event was fired, we may need to restore the state of\n    // the DOM node back to the controlled value. This is necessary when React\n    // bails out of the update without touching the DOM.\n    // TODO: Restore state in the microtask, after the discrete updates flush,\n    // instead of early flushing them here.\n    flushSyncImpl();\n    restoreStateIfNeeded();\n  }\n}\n\nfunction batchedUpdates(fn, a, b) {\n  if (isInsideEventHandler) {\n    // If we are currently inside another batch, we need to wait until it\n    // fully completes before restoring state.\n    return fn(a, b);\n  }\n\n  isInsideEventHandler = true;\n\n  try {\n    return batchedUpdatesImpl(fn, a, b);\n  } finally {\n    isInsideEventHandler = false;\n    finishEventHandler();\n  }\n} // TODO: Replace with flushSync\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {\n  batchedUpdatesImpl = _batchedUpdatesImpl;\n  flushSyncImpl = _flushSyncImpl;\n}\n\nfunction isInteractive(tag) {\n  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n  switch (name) {\n    case 'onClick':\n    case 'onClickCapture':\n    case 'onDoubleClick':\n    case 'onDoubleClickCapture':\n    case 'onMouseDown':\n    case 'onMouseDownCapture':\n    case 'onMouseMove':\n    case 'onMouseMoveCapture':\n    case 'onMouseUp':\n    case 'onMouseUpCapture':\n    case 'onMouseEnter':\n      return !!(props.disabled && isInteractive(type));\n\n    default:\n      return false;\n  }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n  var stateNode = inst.stateNode;\n\n  if (stateNode === null) {\n    // Work in progress (ex: onload events in incremental mode).\n    return null;\n  }\n\n  var props = getFiberCurrentPropsFromNode(stateNode);\n\n  if (props === null) {\n    // Work in progress.\n    return null;\n  }\n\n  var listener = props[registrationName];\n\n  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n    return null;\n  }\n\n  if (listener && typeof listener !== 'function') {\n    throw new Error(\"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\");\n  }\n\n  return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n  try {\n    var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n    Object.defineProperty(options, 'passive', {\n      get: function () {\n        passiveBrowserEventsSupported = true;\n      }\n    });\n    window.addEventListener('test', options, options);\n    window.removeEventListener('test', options, options);\n  } catch (e) {\n    passiveBrowserEventsSupported = false;\n  }\n}\n\nfunction invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n  var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n  try {\n    func.apply(context, funcArgs);\n  } catch (error) {\n    this.onError(error);\n  }\n}\n\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n\n{\n  // In DEV mode, we swap out invokeGuardedCallback for a special version\n  // that plays more nicely with the browser's DevTools. The idea is to preserve\n  // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n  // functions in invokeGuardedCallback, and the production version of\n  // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n  // like caught exceptions, and the DevTools won't pause unless the developer\n  // takes the extra step of enabling pause on caught exceptions. This is\n  // unintuitive, though, because even though React has caught the error, from\n  // the developer's perspective, the error is uncaught.\n  //\n  // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n  // DOM node, and call the user-provided callback from inside an event handler\n  // for that fake event. If the callback throws, the error is \"captured\" using\n  // a global event handler. But because the error happens in a different\n  // event loop context, it does not interrupt the normal program flow.\n  // Effectively, this gives us try-catch behavior without actually using\n  // try-catch. Neat!\n  // Check that the browser supports the APIs we need to implement our special\n  // DEV version of invokeGuardedCallback\n  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n    var fakeNode = document.createElement('react');\n\n    invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n      // If document doesn't exist we know for sure we will crash in this method\n      // when we call document.createEvent(). However this can cause confusing\n      // errors: https://github.com/facebook/create-react-app/issues/3482\n      // So we preemptively throw with a better message instead.\n      if (typeof document === 'undefined' || document === null) {\n        throw new Error('The `document` global was defined when React was initialized, but is not ' + 'defined anymore. This can happen in a test environment if a component ' + 'schedules an update from an asynchronous callback, but the test has already ' + 'finished running. To solve this, you can either unmount the component at ' + 'the end of your test (and ensure that any asynchronous operations get ' + 'canceled in `componentWillUnmount`), or you can change the test itself ' + 'to be asynchronous.');\n      }\n\n      var evt = document.createEvent('Event');\n      var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n      // set this to true at the beginning, then set it to false right after\n      // calling the function. If the function errors, `didError` will never be\n      // set to false. This strategy works even if the browser is flaky and\n      // fails to call our global error handler, because it doesn't rely on\n      // the error event at all.\n\n      var didError = true; // Keeps track of the value of window.event so that we can reset it\n      // during the callback to let user code access window.event in the\n      // browsers that support it.\n\n      var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n      // dispatching: https://github.com/facebook/react/issues/13688\n\n      var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n      function restoreAfterDispatch() {\n        // We immediately remove the callback from event listeners so that\n        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n        // nested call would trigger the fake event handlers of any call higher\n        // in the stack.\n        fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n        // window.event assignment in both IE <= 10 as they throw an error\n        // \"Member not found\" in strict mode, and in Firefox which does not\n        // support window.event.\n\n        if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n          window.event = windowEvent;\n        }\n      } // Create an event handler for our fake event. We will synchronously\n      // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n      // call the user-provided callback.\n\n\n      var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n      function callCallback() {\n        didCall = true;\n        restoreAfterDispatch();\n        func.apply(context, funcArgs);\n        didError = false;\n      } // Create a global error event handler. We use this to capture the value\n      // that was thrown. It's possible that this error handler will fire more\n      // than once; for example, if non-React code also calls `dispatchEvent`\n      // and a handler for that event throws. We should be resilient to most of\n      // those cases. Even if our error event handler fires more than once, the\n      // last error event is always used. If the callback actually does error,\n      // we know that the last error event is the correct one, because it's not\n      // possible for anything else to have happened in between our callback\n      // erroring and the code that follows the `dispatchEvent` call below. If\n      // the callback doesn't error, but the error event was fired, we know to\n      // ignore it because `didError` will be false, as described above.\n\n\n      var error; // Use this to track whether the error event is ever called.\n\n      var didSetError = false;\n      var isCrossOriginError = false;\n\n      function handleWindowError(event) {\n        error = event.error;\n        didSetError = true;\n\n        if (error === null && event.colno === 0 && event.lineno === 0) {\n          isCrossOriginError = true;\n        }\n\n        if (event.defaultPrevented) {\n          // Some other error handler has prevented default.\n          // Browsers silence the error report if this happens.\n          // We'll remember this to later decide whether to log it or not.\n          if (error != null && typeof error === 'object') {\n            try {\n              error._suppressLogging = true;\n            } catch (inner) {// Ignore.\n            }\n          }\n        }\n      } // Create a fake event type.\n\n\n      var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n      window.addEventListener('error', handleWindowError);\n      fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n      // errors, it will trigger our global error handler.\n\n      evt.initEvent(evtType, false, false);\n      fakeNode.dispatchEvent(evt);\n\n      if (windowEventDescriptor) {\n        Object.defineProperty(window, 'event', windowEventDescriptor);\n      }\n\n      if (didCall && didError) {\n        if (!didSetError) {\n          // The callback errored, but the error event never fired.\n          // eslint-disable-next-line react-internal/prod-error-codes\n          error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n        } else if (isCrossOriginError) {\n          // eslint-disable-next-line react-internal/prod-error-codes\n          error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n        }\n\n        this.onError(error);\n      } // Remove our event listeners\n\n\n      window.removeEventListener('error', handleWindowError);\n\n      if (!didCall) {\n        // Something went really wrong, and our event was not dispatched.\n        // https://github.com/facebook/react/issues/16734\n        // https://github.com/facebook/react/issues/16585\n        // Fall back to the production implementation.\n        restoreAfterDispatch();\n        return invokeGuardedCallbackProd.apply(this, arguments);\n      }\n    };\n  }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n  onError: function (error) {\n    hasError = true;\n    caughtError = error;\n  }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n  hasError = false;\n  caughtError = null;\n  invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n  invokeGuardedCallback.apply(this, arguments);\n\n  if (hasError) {\n    var error = clearCaughtError();\n\n    if (!hasRethrowError) {\n      hasRethrowError = true;\n      rethrowError = error;\n    }\n  }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n  if (hasRethrowError) {\n    var error = rethrowError;\n    hasRethrowError = false;\n    rethrowError = null;\n    throw error;\n  }\n}\nfunction hasCaughtError() {\n  return hasError;\n}\nfunction clearCaughtError() {\n  if (hasError) {\n    var error = caughtError;\n    hasError = false;\n    caughtError = null;\n    return error;\n  } else {\n    throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');\n  }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n  return key._reactInternals;\n}\nfunction has(key) {\n  return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n  key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/*                      */\n0;\nvar PerformedWork =\n/*                */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/*                    */\n2;\nvar Update =\n/*                       */\n4;\nvar ChildDeletion =\n/*                */\n16;\nvar ContentReset =\n/*                 */\n32;\nvar Callback =\n/*                     */\n64;\nvar DidCapture =\n/*                   */\n128;\nvar ForceClientRender =\n/*            */\n256;\nvar Ref =\n/*                          */\n512;\nvar Snapshot =\n/*                     */\n1024;\nvar Passive =\n/*                      */\n2048;\nvar Hydrating =\n/*                    */\n4096;\nvar Visibility =\n/*                   */\n8192;\nvar StoreConsistency =\n/*             */\n16384;\nvar LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency; // Union of all commit flags (flags with the lifetime of a particular commit)\n\nvar HostEffectMask =\n/*               */\n32767; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/*                   */\n32768;\nvar ShouldCapture =\n/*                */\n65536;\nvar ForceUpdateForLegacySuspense =\n/* */\n131072;\nvar Forked =\n/*                       */\n1048576; // Static tags describe aspects of a fiber that are not specific to a render,\n// e.g. a fiber uses a passive effect (even if there are no updates on this particular render).\n// This enables us to defer more work in the unmount case,\n// since we can defer traversing the tree during layout to look for Passive effects,\n// and instead rely on the static flag as a signal that there may be cleanup work.\n\nvar RefStatic =\n/*                    */\n2097152;\nvar LayoutStatic =\n/*                 */\n4194304;\nvar PassiveStatic =\n/*                */\n8388608; // These flags allow us to traverse to fibers that have effects on mount\n// without traversing the entire tree after every commit for\n// double invoking\n\nvar MountLayoutDev =\n/*               */\n16777216;\nvar MountPassiveDev =\n/*              */\n33554432; // Groups of flags that are used in the commit phase to skip over trees that\n// don't contain effects, by checking subtreeFlags.\n\nvar BeforeMutationMask = // TODO: Remove Update flag from before mutation phase by re-landing Visibility\n// flag logic (see #20043)\nUpdate | Snapshot | ( 0);\nvar MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;\nvar LayoutMask = Update | Callback | Ref | Visibility; // TODO: Split into PassiveMountMask and PassiveUnmountMask\n\nvar PassiveMask = Passive | ChildDeletion; // Union of tags that don't get reset on clones.\n// This allows certain concepts to persist without recalculating them,\n// e.g. whether a subtree contains passive effects or portals.\n\nvar StaticMask = LayoutStatic | PassiveStatic | RefStatic;\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n  var node = fiber;\n  var nearestMounted = fiber;\n\n  if (!fiber.alternate) {\n    // If there is no alternate, this might be a new tree that isn't inserted\n    // yet. If it is, then it will have a pending insertion effect on it.\n    var nextNode = node;\n\n    do {\n      node = nextNode;\n\n      if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n        // This is an insertion or in-progress hydration. The nearest possible\n        // mounted fiber is the parent but we need to continue to figure out\n        // if that one is still mounted.\n        nearestMounted = node.return;\n      }\n\n      nextNode = node.return;\n    } while (nextNode);\n  } else {\n    while (node.return) {\n      node = node.return;\n    }\n  }\n\n  if (node.tag === HostRoot) {\n    // TODO: Check if this was a nested HostRoot when used with\n    // renderContainerIntoSubtree.\n    return nearestMounted;\n  } // If we didn't hit the root, that means that we're in an disconnected tree\n  // that has been unmounted.\n\n\n  return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n  if (fiber.tag === SuspenseComponent) {\n    var suspenseState = fiber.memoizedState;\n\n    if (suspenseState === null) {\n      var current = fiber.alternate;\n\n      if (current !== null) {\n        suspenseState = current.memoizedState;\n      }\n    }\n\n    if (suspenseState !== null) {\n      return suspenseState.dehydrated;\n    }\n  }\n\n  return null;\n}\nfunction getContainerFromFiber(fiber) {\n  return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n  return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n  {\n    var owner = ReactCurrentOwner.current;\n\n    if (owner !== null && owner.tag === ClassComponent) {\n      var ownerFiber = owner;\n      var instance = ownerFiber.stateNode;\n\n      if (!instance._warnedAboutRefsInRender) {\n        error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromFiber(ownerFiber) || 'A component');\n      }\n\n      instance._warnedAboutRefsInRender = true;\n    }\n  }\n\n  var fiber = get(component);\n\n  if (!fiber) {\n    return false;\n  }\n\n  return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n  if (getNearestMountedFiber(fiber) !== fiber) {\n    throw new Error('Unable to find node on an unmounted component.');\n  }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n  var alternate = fiber.alternate;\n\n  if (!alternate) {\n    // If there is no alternate, then we only need to check if it is mounted.\n    var nearestMounted = getNearestMountedFiber(fiber);\n\n    if (nearestMounted === null) {\n      throw new Error('Unable to find node on an unmounted component.');\n    }\n\n    if (nearestMounted !== fiber) {\n      return null;\n    }\n\n    return fiber;\n  } // If we have two possible branches, we'll walk backwards up to the root\n  // to see what path the root points to. On the way we may hit one of the\n  // special cases and we'll deal with them.\n\n\n  var a = fiber;\n  var b = alternate;\n\n  while (true) {\n    var parentA = a.return;\n\n    if (parentA === null) {\n      // We're at the root.\n      break;\n    }\n\n    var parentB = parentA.alternate;\n\n    if (parentB === null) {\n      // There is no alternate. This is an unusual case. Currently, it only\n      // happens when a Suspense component is hidden. An extra fragment fiber\n      // is inserted in between the Suspense fiber and its children. Skip\n      // over this extra fragment fiber and proceed to the next parent.\n      var nextParent = parentA.return;\n\n      if (nextParent !== null) {\n        a = b = nextParent;\n        continue;\n      } // If there's no parent, we're at the root.\n\n\n      break;\n    } // If both copies of the parent fiber point to the same child, we can\n    // assume that the child is current. This happens when we bailout on low\n    // priority: the bailed out fiber's child reuses the current child.\n\n\n    if (parentA.child === parentB.child) {\n      var child = parentA.child;\n\n      while (child) {\n        if (child === a) {\n          // We've determined that A is the current branch.\n          assertIsMounted(parentA);\n          return fiber;\n        }\n\n        if (child === b) {\n          // We've determined that B is the current branch.\n          assertIsMounted(parentA);\n          return alternate;\n        }\n\n        child = child.sibling;\n      } // We should never have an alternate for any mounting node. So the only\n      // way this could possibly happen is if this was unmounted, if at all.\n\n\n      throw new Error('Unable to find node on an unmounted component.');\n    }\n\n    if (a.return !== b.return) {\n      // The return pointer of A and the return pointer of B point to different\n      // fibers. We assume that return pointers never criss-cross, so A must\n      // belong to the child set of A.return, and B must belong to the child\n      // set of B.return.\n      a = parentA;\n      b = parentB;\n    } else {\n      // The return pointers point to the same fiber. We'll have to use the\n      // default, slow path: scan the child sets of each parent alternate to see\n      // which child belongs to which set.\n      //\n      // Search parent A's child set\n      var didFindChild = false;\n      var _child = parentA.child;\n\n      while (_child) {\n        if (_child === a) {\n          didFindChild = true;\n          a = parentA;\n          b = parentB;\n          break;\n        }\n\n        if (_child === b) {\n          didFindChild = true;\n          b = parentA;\n          a = parentB;\n          break;\n        }\n\n        _child = _child.sibling;\n      }\n\n      if (!didFindChild) {\n        // Search parent B's child set\n        _child = parentB.child;\n\n        while (_child) {\n          if (_child === a) {\n            didFindChild = true;\n            a = parentB;\n            b = parentA;\n            break;\n          }\n\n          if (_child === b) {\n            didFindChild = true;\n            b = parentB;\n            a = parentA;\n            break;\n          }\n\n          _child = _child.sibling;\n        }\n\n        if (!didFindChild) {\n          throw new Error('Child was not found in either parent set. This indicates a bug ' + 'in React related to the return pointer. Please file an issue.');\n        }\n      }\n    }\n\n    if (a.alternate !== b) {\n      throw new Error(\"Return fibers should always be each others' alternates. \" + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n  } // If the root is not a host container, we're in a disconnected tree. I.e.\n  // unmounted.\n\n\n  if (a.tag !== HostRoot) {\n    throw new Error('Unable to find node on an unmounted component.');\n  }\n\n  if (a.stateNode.current === a) {\n    // We've determined that A is the current branch.\n    return fiber;\n  } // Otherwise B has to be current branch.\n\n\n  return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n  var currentParent = findCurrentFiberUsingSlowPath(parent);\n  return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberImpl(node) {\n  // Next we'll drill down this component to find the first HostComponent/Text.\n  if (node.tag === HostComponent || node.tag === HostText) {\n    return node;\n  }\n\n  var child = node.child;\n\n  while (child !== null) {\n    var match = findCurrentHostFiberImpl(child);\n\n    if (match !== null) {\n      return match;\n    }\n\n    child = child.sibling;\n  }\n\n  return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n  var currentParent = findCurrentFiberUsingSlowPath(parent);\n  return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;\n}\n\nfunction findCurrentHostFiberWithNoPortalsImpl(node) {\n  // Next we'll drill down this component to find the first HostComponent/Text.\n  if (node.tag === HostComponent || node.tag === HostText) {\n    return node;\n  }\n\n  var child = node.child;\n\n  while (child !== null) {\n    if (child.tag !== HostPortal) {\n      var match = findCurrentHostFiberWithNoPortalsImpl(child);\n\n      if (match !== null) {\n        return match;\n      }\n    }\n\n    child = child.sibling;\n  }\n\n  return null;\n}\n\n// This module only exists as an ESM wrapper around the external CommonJS\nvar scheduleCallback = Scheduler.unstable_scheduleCallback;\nvar cancelCallback = Scheduler.unstable_cancelCallback;\nvar shouldYield = Scheduler.unstable_shouldYield;\nvar requestPaint = Scheduler.unstable_requestPaint;\nvar now = Scheduler.unstable_now;\nvar getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;\nvar ImmediatePriority = Scheduler.unstable_ImmediatePriority;\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;\nvar NormalPriority = Scheduler.unstable_NormalPriority;\nvar LowPriority = Scheduler.unstable_LowPriority;\nvar IdlePriority = Scheduler.unstable_IdlePriority;\n// this doesn't actually exist on the scheduler, but it *does*\n// on scheduler/unstable_mock, which we'll need for internal testing\nvar unstable_yieldValue = Scheduler.unstable_yieldValue;\nvar unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar injectedProfilingHooks = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n    // No DevTools\n    return false;\n  }\n\n  var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n  if (hook.isDisabled) {\n    // This isn't a real property on the hook, but it can be set to opt out\n    // of DevTools integration and associated warnings and logs.\n    // https://github.com/facebook/react/issues/3877\n    return true;\n  }\n\n  if (!hook.supportsFiber) {\n    {\n      error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');\n    } // DevTools exists, even though it doesn't support Fiber.\n\n\n    return true;\n  }\n\n  try {\n    if (enableSchedulingProfiler) {\n      // Conditionally inject these hooks only if Timeline profiler is supported by this build.\n      // This gives DevTools a way to feature detect that isn't tied to version number\n      // (since profiling and timeline are controlled by different feature flags).\n      internals = assign({}, internals, {\n        getLaneLabelMap: getLaneLabelMap,\n        injectProfilingHooks: injectProfilingHooks\n      });\n    }\n\n    rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n    injectedHook = hook;\n  } catch (err) {\n    // Catch all errors because it is unsafe to throw during initialization.\n    {\n      error('React instrumentation encountered an error: %s.', err);\n    }\n  }\n\n  if (hook.checkDCE) {\n    // This is the real DevTools.\n    return true;\n  } else {\n    // This is likely a hook installed by Fast Refresh runtime.\n    return false;\n  }\n}\nfunction onScheduleRoot(root, children) {\n  {\n    if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n      try {\n        injectedHook.onScheduleFiberRoot(rendererID, root, children);\n      } catch (err) {\n        if ( !hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onCommitRoot(root, eventPriority) {\n  if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n    try {\n      var didError = (root.current.flags & DidCapture) === DidCapture;\n\n      if (enableProfilerTimer) {\n        var schedulerPriority;\n\n        switch (eventPriority) {\n          case DiscreteEventPriority:\n            schedulerPriority = ImmediatePriority;\n            break;\n\n          case ContinuousEventPriority:\n            schedulerPriority = UserBlockingPriority;\n            break;\n\n          case DefaultEventPriority:\n            schedulerPriority = NormalPriority;\n            break;\n\n          case IdleEventPriority:\n            schedulerPriority = IdlePriority;\n            break;\n\n          default:\n            schedulerPriority = NormalPriority;\n            break;\n        }\n\n        injectedHook.onCommitFiberRoot(rendererID, root, schedulerPriority, didError);\n      } else {\n        injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n      }\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onPostCommitRoot(root) {\n  if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {\n    try {\n      injectedHook.onPostCommitFiberRoot(rendererID, root);\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction onCommitUnmount(fiber) {\n  if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n    try {\n      injectedHook.onCommitFiberUnmount(rendererID, fiber);\n    } catch (err) {\n      {\n        if (!hasLoggedError) {\n          hasLoggedError = true;\n\n          error('React instrumentation encountered an error: %s', err);\n        }\n      }\n    }\n  }\n}\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n  {\n    if (typeof unstable_yieldValue === 'function') {\n      // We're in a test because Scheduler.unstable_yieldValue only exists\n      // in SchedulerMock. To reduce the noise in strict mode tests,\n      // suppress warnings and disable scheduler yielding during the double render\n      unstable_setDisableYieldValue(newIsStrictMode);\n      setSuppressWarning(newIsStrictMode);\n    }\n\n    if (injectedHook && typeof injectedHook.setStrictMode === 'function') {\n      try {\n        injectedHook.setStrictMode(rendererID, newIsStrictMode);\n      } catch (err) {\n        {\n          if (!hasLoggedError) {\n            hasLoggedError = true;\n\n            error('React instrumentation encountered an error: %s', err);\n          }\n        }\n      }\n    }\n  }\n} // Profiler API hooks\n\nfunction injectProfilingHooks(profilingHooks) {\n  injectedProfilingHooks = profilingHooks;\n}\n\nfunction getLaneLabelMap() {\n  {\n    var map = new Map();\n    var lane = 1;\n\n    for (var index = 0; index < TotalLanes; index++) {\n      var label = getLabelForLane(lane);\n      map.set(lane, label);\n      lane *= 2;\n    }\n\n    return map;\n  }\n}\n\nfunction markCommitStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {\n      injectedProfilingHooks.markCommitStarted(lanes);\n    }\n  }\n}\nfunction markCommitStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {\n      injectedProfilingHooks.markCommitStopped();\n    }\n  }\n}\nfunction markComponentRenderStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {\n      injectedProfilingHooks.markComponentRenderStarted(fiber);\n    }\n  }\n}\nfunction markComponentRenderStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {\n      injectedProfilingHooks.markComponentRenderStopped();\n    }\n  }\n}\nfunction markComponentPassiveEffectMountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);\n    }\n  }\n}\nfunction markComponentPassiveEffectMountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectMountStopped();\n    }\n  }\n}\nfunction markComponentPassiveEffectUnmountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);\n    }\n  }\n}\nfunction markComponentPassiveEffectUnmountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {\n      injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();\n    }\n  }\n}\nfunction markComponentLayoutEffectMountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);\n    }\n  }\n}\nfunction markComponentLayoutEffectMountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectMountStopped();\n    }\n  }\n}\nfunction markComponentLayoutEffectUnmountStarted(fiber) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);\n    }\n  }\n}\nfunction markComponentLayoutEffectUnmountStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {\n      injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();\n    }\n  }\n}\nfunction markComponentErrored(fiber, thrownValue, lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {\n      injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);\n    }\n  }\n}\nfunction markComponentSuspended(fiber, wakeable, lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {\n      injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);\n    }\n  }\n}\nfunction markLayoutEffectsStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {\n      injectedProfilingHooks.markLayoutEffectsStarted(lanes);\n    }\n  }\n}\nfunction markLayoutEffectsStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {\n      injectedProfilingHooks.markLayoutEffectsStopped();\n    }\n  }\n}\nfunction markPassiveEffectsStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {\n      injectedProfilingHooks.markPassiveEffectsStarted(lanes);\n    }\n  }\n}\nfunction markPassiveEffectsStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {\n      injectedProfilingHooks.markPassiveEffectsStopped();\n    }\n  }\n}\nfunction markRenderStarted(lanes) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {\n      injectedProfilingHooks.markRenderStarted(lanes);\n    }\n  }\n}\nfunction markRenderYielded() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {\n      injectedProfilingHooks.markRenderYielded();\n    }\n  }\n}\nfunction markRenderStopped() {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {\n      injectedProfilingHooks.markRenderStopped();\n    }\n  }\n}\nfunction markRenderScheduled(lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {\n      injectedProfilingHooks.markRenderScheduled(lane);\n    }\n  }\n}\nfunction markForceUpdateScheduled(fiber, lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {\n      injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);\n    }\n  }\n}\nfunction markStateUpdateScheduled(fiber, lane) {\n  {\n    if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {\n      injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);\n    }\n  }\n}\n\nvar NoMode =\n/*                         */\n0; // TODO: Remove ConcurrentMode by reading from the root tag instead\n\nvar ConcurrentMode =\n/*                 */\n1;\nvar ProfileMode =\n/*                    */\n2;\nvar StrictLegacyMode =\n/*               */\n8;\nvar StrictEffectsMode =\n/*              */\n16;\n\n// TODO: This is pretty well supported by browsers. Maybe we can drop it.\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(x) {\n  var asUint = x >>> 0;\n\n  if (asUint === 0) {\n    return 32;\n  }\n\n  return 31 - (log(asUint) / LN2 | 0) | 0;\n}\n\n// If those values are changed that package should be rebuilt and redeployed.\n\nvar TotalLanes = 31;\nvar NoLanes =\n/*                        */\n0;\nvar NoLane =\n/*                          */\n0;\nvar SyncLane =\n/*                        */\n1;\nvar InputContinuousHydrationLane =\n/*    */\n2;\nvar InputContinuousLane =\n/*             */\n4;\nvar DefaultHydrationLane =\n/*            */\n8;\nvar DefaultLane =\n/*                     */\n16;\nvar TransitionHydrationLane =\n/*                */\n32;\nvar TransitionLanes =\n/*                       */\n4194240;\nvar TransitionLane1 =\n/*                        */\n64;\nvar TransitionLane2 =\n/*                        */\n128;\nvar TransitionLane3 =\n/*                        */\n256;\nvar TransitionLane4 =\n/*                        */\n512;\nvar TransitionLane5 =\n/*                        */\n1024;\nvar TransitionLane6 =\n/*                        */\n2048;\nvar TransitionLane7 =\n/*                        */\n4096;\nvar TransitionLane8 =\n/*                        */\n8192;\nvar TransitionLane9 =\n/*                        */\n16384;\nvar TransitionLane10 =\n/*                       */\n32768;\nvar TransitionLane11 =\n/*                       */\n65536;\nvar TransitionLane12 =\n/*                       */\n131072;\nvar TransitionLane13 =\n/*                       */\n262144;\nvar TransitionLane14 =\n/*                       */\n524288;\nvar TransitionLane15 =\n/*                       */\n1048576;\nvar TransitionLane16 =\n/*                       */\n2097152;\nvar RetryLanes =\n/*                            */\n130023424;\nvar RetryLane1 =\n/*                             */\n4194304;\nvar RetryLane2 =\n/*                             */\n8388608;\nvar RetryLane3 =\n/*                             */\n16777216;\nvar RetryLane4 =\n/*                             */\n33554432;\nvar RetryLane5 =\n/*                             */\n67108864;\nvar SomeRetryLane = RetryLane1;\nvar SelectiveHydrationLane =\n/*          */\n134217728;\nvar NonIdleLanes =\n/*                          */\n268435455;\nvar IdleHydrationLane =\n/*               */\n268435456;\nvar IdleLane =\n/*                        */\n536870912;\nvar OffscreenLane =\n/*                   */\n1073741824; // This function is used for the experimental timeline (react-devtools-timeline)\n// It should be kept in sync with the Lanes values above.\n\nfunction getLabelForLane(lane) {\n  {\n    if (lane & SyncLane) {\n      return 'Sync';\n    }\n\n    if (lane & InputContinuousHydrationLane) {\n      return 'InputContinuousHydration';\n    }\n\n    if (lane & InputContinuousLane) {\n      return 'InputContinuous';\n    }\n\n    if (lane & DefaultHydrationLane) {\n      return 'DefaultHydration';\n    }\n\n    if (lane & DefaultLane) {\n      return 'Default';\n    }\n\n    if (lane & TransitionHydrationLane) {\n      return 'TransitionHydration';\n    }\n\n    if (lane & TransitionLanes) {\n      return 'Transition';\n    }\n\n    if (lane & RetryLanes) {\n      return 'Retry';\n    }\n\n    if (lane & SelectiveHydrationLane) {\n      return 'SelectiveHydration';\n    }\n\n    if (lane & IdleHydrationLane) {\n      return 'IdleHydration';\n    }\n\n    if (lane & IdleLane) {\n      return 'Idle';\n    }\n\n    if (lane & OffscreenLane) {\n      return 'Offscreen';\n    }\n  }\n}\nvar NoTimestamp = -1;\nvar nextTransitionLane = TransitionLane1;\nvar nextRetryLane = RetryLane1;\n\nfunction getHighestPriorityLanes(lanes) {\n  switch (getHighestPriorityLane(lanes)) {\n    case SyncLane:\n      return SyncLane;\n\n    case InputContinuousHydrationLane:\n      return InputContinuousHydrationLane;\n\n    case InputContinuousLane:\n      return InputContinuousLane;\n\n    case DefaultHydrationLane:\n      return DefaultHydrationLane;\n\n    case DefaultLane:\n      return DefaultLane;\n\n    case TransitionHydrationLane:\n      return TransitionHydrationLane;\n\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n      return lanes & TransitionLanes;\n\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      return lanes & RetryLanes;\n\n    case SelectiveHydrationLane:\n      return SelectiveHydrationLane;\n\n    case IdleHydrationLane:\n      return IdleHydrationLane;\n\n    case IdleLane:\n      return IdleLane;\n\n    case OffscreenLane:\n      return OffscreenLane;\n\n    default:\n      {\n        error('Should have found matching lanes. This is a bug in React.');\n      } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n      return lanes;\n  }\n}\n\nfunction getNextLanes(root, wipLanes) {\n  // Early bailout if there's no pending work left.\n  var pendingLanes = root.pendingLanes;\n\n  if (pendingLanes === NoLanes) {\n    return NoLanes;\n  }\n\n  var nextLanes = NoLanes;\n  var suspendedLanes = root.suspendedLanes;\n  var pingedLanes = root.pingedLanes; // Do not work on any idle work until all the non-idle work has finished,\n  // even if the work is suspended.\n\n  var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n  if (nonIdlePendingLanes !== NoLanes) {\n    var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n    if (nonIdleUnblockedLanes !== NoLanes) {\n      nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n    } else {\n      var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n      if (nonIdlePingedLanes !== NoLanes) {\n        nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n      }\n    }\n  } else {\n    // The only remaining work is Idle.\n    var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n    if (unblockedLanes !== NoLanes) {\n      nextLanes = getHighestPriorityLanes(unblockedLanes);\n    } else {\n      if (pingedLanes !== NoLanes) {\n        nextLanes = getHighestPriorityLanes(pingedLanes);\n      }\n    }\n  }\n\n  if (nextLanes === NoLanes) {\n    // This should only be reachable if we're suspended\n    // TODO: Consider warning in this path if a fallback timer is not scheduled.\n    return NoLanes;\n  } // If we're already in the middle of a render, switching lanes will interrupt\n  // it and we'll lose our progress. We should only do this if the new lanes are\n  // higher priority.\n\n\n  if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n  // bother waiting until the root is complete.\n  (wipLanes & suspendedLanes) === NoLanes) {\n    var nextLane = getHighestPriorityLane(nextLanes);\n    var wipLane = getHighestPriorityLane(wipLanes);\n\n    if ( // Tests whether the next lane is equal or lower priority than the wip\n    // one. This works because the bits decrease in priority as you go left.\n    nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The\n    // only difference between default updates and transition updates is that\n    // default updates do not support refresh transitions.\n    nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) {\n      // Keep working on the existing in-progress tree. Do not interrupt.\n      return wipLanes;\n    }\n  }\n\n  if ((nextLanes & InputContinuousLane) !== NoLanes) {\n    // When updates are sync by default, we entangle continuous priority updates\n    // and default updates, so they render in the same batch. The only reason\n    // they use separate lanes is because continuous updates should interrupt\n    // transitions, but default updates should not.\n    nextLanes |= pendingLanes & DefaultLane;\n  } // Check for entangled lanes and add them to the batch.\n  //\n  // A lane is said to be entangled with another when it's not allowed to render\n  // in a batch that does not also include the other lane. Typically we do this\n  // when multiple updates have the same source, and we only want to respond to\n  // the most recent event from that source.\n  //\n  // Note that we apply entanglements *after* checking for partial work above.\n  // This means that if a lane is entangled during an interleaved event while\n  // it's already rendering, we won't interrupt it. This is intentional, since\n  // entanglement is usually \"best effort\": we'll try our best to render the\n  // lanes in the same batch, but it's not worth throwing out partially\n  // completed work in order to do it.\n  // TODO: Reconsider this. The counter-argument is that the partial work\n  // represents an intermediate state, which we don't want to show to the user.\n  // And by spending extra time finishing it, we're increasing the amount of\n  // time it takes to show the final state, which is what they are actually\n  // waiting for.\n  //\n  // For those exceptions where entanglement is semantically important, like\n  // useMutableSource, we should ensure that there is no partial work at the\n  // time we apply the entanglement.\n\n\n  var entangledLanes = root.entangledLanes;\n\n  if (entangledLanes !== NoLanes) {\n    var entanglements = root.entanglements;\n    var lanes = nextLanes & entangledLanes;\n\n    while (lanes > 0) {\n      var index = pickArbitraryLaneIndex(lanes);\n      var lane = 1 << index;\n      nextLanes |= entanglements[index];\n      lanes &= ~lane;\n    }\n  }\n\n  return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n  var eventTimes = root.eventTimes;\n  var mostRecentEventTime = NoTimestamp;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    var eventTime = eventTimes[index];\n\n    if (eventTime > mostRecentEventTime) {\n      mostRecentEventTime = eventTime;\n    }\n\n    lanes &= ~lane;\n  }\n\n  return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n  switch (lane) {\n    case SyncLane:\n    case InputContinuousHydrationLane:\n    case InputContinuousLane:\n      // User interactions should expire slightly more quickly.\n      //\n      // NOTE: This is set to the corresponding constant as in Scheduler.js.\n      // When we made it larger, a product metric in www regressed, suggesting\n      // there's a user interaction that's being starved by a series of\n      // synchronous updates. If that theory is correct, the proper solution is\n      // to fix the starvation. However, this scenario supports the idea that\n      // expiration times are an important safeguard when starvation\n      // does happen.\n      return currentTime + 250;\n\n    case DefaultHydrationLane:\n    case DefaultLane:\n    case TransitionHydrationLane:\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n      return currentTime + 5000;\n\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      // TODO: Retries should be allowed to expire if they are CPU bound for\n      // too long, but when I made this change it caused a spike in browser\n      // crashes. There must be some other underlying bug; not super urgent but\n      // ideally should figure out why and fix it. Unfortunately we don't have\n      // a repro for the crashes, only detected via production metrics.\n      return NoTimestamp;\n\n    case SelectiveHydrationLane:\n    case IdleHydrationLane:\n    case IdleLane:\n    case OffscreenLane:\n      // Anything idle priority or lower should never expire.\n      return NoTimestamp;\n\n    default:\n      {\n        error('Should have found matching lanes. This is a bug in React.');\n      }\n\n      return NoTimestamp;\n  }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n  // TODO: This gets called every time we yield. We can optimize by storing\n  // the earliest expiration time on the root. Then use that to quickly bail out\n  // of this function.\n  var pendingLanes = root.pendingLanes;\n  var suspendedLanes = root.suspendedLanes;\n  var pingedLanes = root.pingedLanes;\n  var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n  // expiration time. If so, we'll assume the update is being starved and mark\n  // it as expired to force it to finish.\n\n  var lanes = pendingLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    var expirationTime = expirationTimes[index];\n\n    if (expirationTime === NoTimestamp) {\n      // Found a pending lane with no expiration time. If it's not suspended, or\n      // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n      // using the current time.\n      if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n        // Assumes timestamps are monotonically increasing.\n        expirationTimes[index] = computeExpirationTime(lane, currentTime);\n      }\n    } else if (expirationTime <= currentTime) {\n      // This lane expired\n      root.expiredLanes |= lane;\n    }\n\n    lanes &= ~lane;\n  }\n} // This returns the highest priority pending lanes regardless of whether they\n// are suspended.\n\nfunction getHighestPriorityPendingLanes(root) {\n  return getHighestPriorityLanes(root.pendingLanes);\n}\nfunction getLanesToRetrySynchronouslyOnError(root) {\n  var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n  if (everythingButOffscreen !== NoLanes) {\n    return everythingButOffscreen;\n  }\n\n  if (everythingButOffscreen & OffscreenLane) {\n    return OffscreenLane;\n  }\n\n  return NoLanes;\n}\nfunction includesSyncLane(lanes) {\n  return (lanes & SyncLane) !== NoLanes;\n}\nfunction includesNonIdleWork(lanes) {\n  return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n  return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyNonUrgentLanes(lanes) {\n  var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;\n  return (lanes & UrgentLanes) === NoLanes;\n}\nfunction includesOnlyTransitions(lanes) {\n  return (lanes & TransitionLanes) === lanes;\n}\nfunction includesBlockingLane(root, lanes) {\n\n  var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;\n  return (lanes & SyncDefaultLanes) !== NoLanes;\n}\nfunction includesExpiredLane(root, lanes) {\n  // This is a separate check from includesBlockingLane because a lane can\n  // expire after a render has already started.\n  return (lanes & root.expiredLanes) !== NoLanes;\n}\nfunction isTransitionLane(lane) {\n  return (lane & TransitionLanes) !== NoLanes;\n}\nfunction claimNextTransitionLane() {\n  // Cycle through the lanes, assigning each new transition to the next lane.\n  // In most cases, this means every transition gets its own lane, until we\n  // run out of lanes and cycle back to the beginning.\n  var lane = nextTransitionLane;\n  nextTransitionLane <<= 1;\n\n  if ((nextTransitionLane & TransitionLanes) === NoLanes) {\n    nextTransitionLane = TransitionLane1;\n  }\n\n  return lane;\n}\nfunction claimNextRetryLane() {\n  var lane = nextRetryLane;\n  nextRetryLane <<= 1;\n\n  if ((nextRetryLane & RetryLanes) === NoLanes) {\n    nextRetryLane = RetryLane1;\n  }\n\n  return lane;\n}\nfunction getHighestPriorityLane(lanes) {\n  return lanes & -lanes;\n}\nfunction pickArbitraryLane(lanes) {\n  // This wrapper function gets inlined. Only exists so to communicate that it\n  // doesn't matter which bit is selected; you can pick any bit without\n  // affecting the algorithms where its used. Here I'm using\n  // getHighestPriorityLane because it requires the fewest operations.\n  return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n  return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n  return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n  return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n  return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n  return a | b;\n}\nfunction removeLanes(set, subset) {\n  return set & ~subset;\n}\nfunction intersectLanes(a, b) {\n  return a & b;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n  return lane;\n}\nfunction higherPriorityLane(a, b) {\n  // This works because the bit ranges decrease in priority as you go left.\n  return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n  // Intentionally pushing one by one.\n  // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n  var laneMap = [];\n\n  for (var i = 0; i < TotalLanes; i++) {\n    laneMap.push(initial);\n  }\n\n  return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n  root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update\n  // could unblock them. Clear the suspended lanes so that we can try rendering\n  // them again.\n  //\n  // TODO: We really only need to unsuspend only lanes that are in the\n  // `subtreeLanes` of the updated fiber, or the update lanes of the return\n  // path. This would exclude suspended updates in an unrelated sibling tree,\n  // since there's no way for this update to unblock it.\n  //\n  // We don't do this if the incoming update is idle, because we never process\n  // idle updates until after all the regular updates have finished; there's no\n  // way it could unblock a transition.\n\n  if (updateLane !== IdleLane) {\n    root.suspendedLanes = NoLanes;\n    root.pingedLanes = NoLanes;\n  }\n\n  var eventTimes = root.eventTimes;\n  var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n  // recent event, and we assume time is monotonically increasing.\n\n  eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n  root.suspendedLanes |= suspendedLanes;\n  root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n  var expirationTimes = root.expirationTimes;\n  var lanes = suspendedLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    expirationTimes[index] = NoTimestamp;\n    lanes &= ~lane;\n  }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n  root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n  var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n  root.pendingLanes = remainingLanes; // Let's try everything again\n\n  root.suspendedLanes = NoLanes;\n  root.pingedLanes = NoLanes;\n  root.expiredLanes &= remainingLanes;\n  root.mutableReadLanes &= remainingLanes;\n  root.entangledLanes &= remainingLanes;\n  var entanglements = root.entanglements;\n  var eventTimes = root.eventTimes;\n  var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n  var lanes = noLongerPendingLanes;\n\n  while (lanes > 0) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n    entanglements[index] = NoLanes;\n    eventTimes[index] = NoTimestamp;\n    expirationTimes[index] = NoTimestamp;\n    lanes &= ~lane;\n  }\n}\nfunction markRootEntangled(root, entangledLanes) {\n  // In addition to entangling each of the given lanes with each other, we also\n  // have to consider _transitive_ entanglements. For each lane that is already\n  // entangled with *any* of the given lanes, that lane is now transitively\n  // entangled with *all* the given lanes.\n  //\n  // Translated: If C is entangled with A, then entangling A with B also\n  // entangles C with B.\n  //\n  // If this is hard to grasp, it might help to intentionally break this\n  // function and look at the tests that fail in ReactTransition-test.js. Try\n  // commenting out one of the conditions below.\n  var rootEntangledLanes = root.entangledLanes |= entangledLanes;\n  var entanglements = root.entanglements;\n  var lanes = rootEntangledLanes;\n\n  while (lanes) {\n    var index = pickArbitraryLaneIndex(lanes);\n    var lane = 1 << index;\n\n    if ( // Is this one of the newly entangled lanes?\n    lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?\n    entanglements[index] & entangledLanes) {\n      entanglements[index] |= entangledLanes;\n    }\n\n    lanes &= ~lane;\n  }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n  var renderLane = getHighestPriorityLane(renderLanes);\n  var lane;\n\n  switch (renderLane) {\n    case InputContinuousLane:\n      lane = InputContinuousHydrationLane;\n      break;\n\n    case DefaultLane:\n      lane = DefaultHydrationLane;\n      break;\n\n    case TransitionLane1:\n    case TransitionLane2:\n    case TransitionLane3:\n    case TransitionLane4:\n    case TransitionLane5:\n    case TransitionLane6:\n    case TransitionLane7:\n    case TransitionLane8:\n    case TransitionLane9:\n    case TransitionLane10:\n    case TransitionLane11:\n    case TransitionLane12:\n    case TransitionLane13:\n    case TransitionLane14:\n    case TransitionLane15:\n    case TransitionLane16:\n    case RetryLane1:\n    case RetryLane2:\n    case RetryLane3:\n    case RetryLane4:\n    case RetryLane5:\n      lane = TransitionHydrationLane;\n      break;\n\n    case IdleLane:\n      lane = IdleHydrationLane;\n      break;\n\n    default:\n      // Everything else is already either a hydration lane, or shouldn't\n      // be retried at a hydration lane.\n      lane = NoLane;\n      break;\n  } // Check if the lane we chose is suspended. If so, that indicates that we\n  // already attempted and failed to hydrate at that level. Also check if we're\n  // already rendering that lane, which is rare but could happen.\n\n\n  if ((lane & (root.suspendedLanes | renderLanes)) !== NoLane) {\n    // Give up trying to hydrate and fall back to client render.\n    return NoLane;\n  }\n\n  return lane;\n}\nfunction addFiberToLanesMap(root, fiber, lanes) {\n\n  if (!isDevToolsPresent) {\n    return;\n  }\n\n  var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n\n  while (lanes > 0) {\n    var index = laneToIndex(lanes);\n    var lane = 1 << index;\n    var updaters = pendingUpdatersLaneMap[index];\n    updaters.add(fiber);\n    lanes &= ~lane;\n  }\n}\nfunction movePendingFibersToMemoized(root, lanes) {\n\n  if (!isDevToolsPresent) {\n    return;\n  }\n\n  var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;\n  var memoizedUpdaters = root.memoizedUpdaters;\n\n  while (lanes > 0) {\n    var index = laneToIndex(lanes);\n    var lane = 1 << index;\n    var updaters = pendingUpdatersLaneMap[index];\n\n    if (updaters.size > 0) {\n      updaters.forEach(function (fiber) {\n        var alternate = fiber.alternate;\n\n        if (alternate === null || !memoizedUpdaters.has(alternate)) {\n          memoizedUpdaters.add(fiber);\n        }\n      });\n      updaters.clear();\n    }\n\n    lanes &= ~lane;\n  }\n}\nfunction getTransitionsForLanes(root, lanes) {\n  {\n    return null;\n  }\n}\n\nvar DiscreteEventPriority = SyncLane;\nvar ContinuousEventPriority = InputContinuousLane;\nvar DefaultEventPriority = DefaultLane;\nvar IdleEventPriority = IdleLane;\nvar currentUpdatePriority = NoLane;\nfunction getCurrentUpdatePriority() {\n  return currentUpdatePriority;\n}\nfunction setCurrentUpdatePriority(newPriority) {\n  currentUpdatePriority = newPriority;\n}\nfunction runWithPriority(priority, fn) {\n  var previousPriority = currentUpdatePriority;\n\n  try {\n    currentUpdatePriority = priority;\n    return fn();\n  } finally {\n    currentUpdatePriority = previousPriority;\n  }\n}\nfunction higherEventPriority(a, b) {\n  return a !== 0 && a < b ? a : b;\n}\nfunction lowerEventPriority(a, b) {\n  return a === 0 || a > b ? a : b;\n}\nfunction isHigherEventPriority(a, b) {\n  return a !== 0 && a < b;\n}\nfunction lanesToEventPriority(lanes) {\n  var lane = getHighestPriorityLane(lanes);\n\n  if (!isHigherEventPriority(DiscreteEventPriority, lane)) {\n    return DiscreteEventPriority;\n  }\n\n  if (!isHigherEventPriority(ContinuousEventPriority, lane)) {\n    return ContinuousEventPriority;\n  }\n\n  if (includesNonIdleWork(lane)) {\n    return DefaultEventPriority;\n  }\n\n  return IdleEventPriority;\n}\n\n// This is imported by the event replaying implementation in React DOM. It's\n// in a separate file to break a circular dependency between the renderer and\n// the reconciler.\nfunction isRootDehydrated(root) {\n  var currentState = root.current.memoizedState;\n  return currentState.isDehydrated;\n}\n\nvar _attemptSynchronousHydration;\n\nfunction setAttemptSynchronousHydration(fn) {\n  _attemptSynchronousHydration = fn;\n}\nfunction attemptSynchronousHydration(fiber) {\n  _attemptSynchronousHydration(fiber);\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n  attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n  attemptHydrationAtCurrentPriority = fn;\n}\nvar getCurrentUpdatePriority$1;\nfunction setGetCurrentUpdatePriority(fn) {\n  getCurrentUpdatePriority$1 = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n  attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\n// has this definition built-in.\n\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isDiscreteEventThatRequiresHydration(eventType) {\n  return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  return {\n    blockedOn: blockedOn,\n    domEventName: domEventName,\n    eventSystemFlags: eventSystemFlags,\n    nativeEvent: nativeEvent,\n    targetContainers: [targetContainer]\n  };\n}\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'focusin':\n    case 'focusout':\n      queuedFocus = null;\n      break;\n\n    case 'dragenter':\n    case 'dragleave':\n      queuedDrag = null;\n      break;\n\n    case 'mouseover':\n    case 'mouseout':\n      queuedMouse = null;\n      break;\n\n    case 'pointerover':\n    case 'pointerout':\n      {\n        var pointerId = nativeEvent.pointerId;\n        queuedPointers.delete(pointerId);\n        break;\n      }\n\n    case 'gotpointercapture':\n    case 'lostpointercapture':\n      {\n        var _pointerId = nativeEvent.pointerId;\n        queuedPointerCaptures.delete(_pointerId);\n        break;\n      }\n  }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n    var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n    if (blockedOn !== null) {\n      var _fiber2 = getInstanceFromNode(blockedOn);\n\n      if (_fiber2 !== null) {\n        // Attempt to increase the priority of this target.\n        attemptContinuousHydration(_fiber2);\n      }\n    }\n\n    return queuedEvent;\n  } // If we have already queued this exact event, then it's because\n  // the different event systems have different DOM event listeners.\n  // We can accumulate the flags, and the targetContainers, and\n  // store a single event to be replayed.\n\n\n  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n  var targetContainers = existingQueuedEvent.targetContainers;\n\n  if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n    targetContainers.push(targetContainer);\n  }\n\n  return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  // These set relatedTarget to null because the replayed event will be treated as if we\n  // moved from outside the window (no target) onto the target once it hydrates.\n  // Instead of mutating we could clone the event.\n  switch (domEventName) {\n    case 'focusin':\n      {\n        var focusEvent = nativeEvent;\n        queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n        return true;\n      }\n\n    case 'dragenter':\n      {\n        var dragEvent = nativeEvent;\n        queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n        return true;\n      }\n\n    case 'mouseover':\n      {\n        var mouseEvent = nativeEvent;\n        queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n        return true;\n      }\n\n    case 'pointerover':\n      {\n        var pointerEvent = nativeEvent;\n        var pointerId = pointerEvent.pointerId;\n        queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n        return true;\n      }\n\n    case 'gotpointercapture':\n      {\n        var _pointerEvent = nativeEvent;\n        var _pointerId2 = _pointerEvent.pointerId;\n        queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n        return true;\n      }\n  }\n\n  return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n  // TODO: This function shares a lot of logic with findInstanceBlockingEvent.\n  // Try to unify them. It's a bit tricky since it would require two return\n  // values.\n  var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n  if (targetInst !== null) {\n    var nearestMounted = getNearestMountedFiber(targetInst);\n\n    if (nearestMounted !== null) {\n      var tag = nearestMounted.tag;\n\n      if (tag === SuspenseComponent) {\n        var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n        if (instance !== null) {\n          // We're blocked on hydrating this boundary.\n          // Increase its priority.\n          queuedTarget.blockedOn = instance;\n          attemptHydrationAtPriority(queuedTarget.priority, function () {\n            attemptHydrationAtCurrentPriority(nearestMounted);\n          });\n          return;\n        }\n      } else if (tag === HostRoot) {\n        var root = nearestMounted.stateNode;\n\n        if (isRootDehydrated(root)) {\n          queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n          // a root other than sync.\n\n          return;\n        }\n      }\n    }\n  }\n\n  queuedTarget.blockedOn = null;\n}\n\nfunction queueExplicitHydrationTarget(target) {\n  // TODO: This will read the priority if it's dispatched by the React\n  // event system but not native events. Should read window.event.type, like\n  // we do for updates (getCurrentEventPriority).\n  var updatePriority = getCurrentUpdatePriority$1();\n  var queuedTarget = {\n    blockedOn: null,\n    target: target,\n    priority: updatePriority\n  };\n  var i = 0;\n\n  for (; i < queuedExplicitHydrationTargets.length; i++) {\n    // Stop once we hit the first target with lower priority than\n    if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {\n      break;\n    }\n  }\n\n  queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);\n\n  if (i === 0) {\n    attemptExplicitHydrationTarget(queuedTarget);\n  }\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n  if (queuedEvent.blockedOn !== null) {\n    return false;\n  }\n\n  var targetContainers = queuedEvent.targetContainers;\n\n  while (targetContainers.length > 0) {\n    var targetContainer = targetContainers[0];\n    var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n    if (nextBlockedOn === null) {\n      {\n        var nativeEvent = queuedEvent.nativeEvent;\n        var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n        setReplayingEvent(nativeEventClone);\n        nativeEvent.target.dispatchEvent(nativeEventClone);\n        resetReplayingEvent();\n      }\n    } else {\n      // We're still blocked. Try again later.\n      var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n      if (_fiber3 !== null) {\n        attemptContinuousHydration(_fiber3);\n      }\n\n      queuedEvent.blockedOn = nextBlockedOn;\n      return false;\n    } // This target container was successfully dispatched. Try the next.\n\n\n    targetContainers.shift();\n  }\n\n  return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n  if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n    map.delete(key);\n  }\n}\n\nfunction replayUnblockedEvents() {\n  hasScheduledReplayAttempt = false;\n\n\n  if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n    queuedFocus = null;\n  }\n\n  if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n    queuedDrag = null;\n  }\n\n  if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n    queuedMouse = null;\n  }\n\n  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n  if (queuedEvent.blockedOn === unblocked) {\n    queuedEvent.blockedOn = null;\n\n    if (!hasScheduledReplayAttempt) {\n      hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n      // now unblocked. This first might not actually be unblocked yet.\n      // We could check it early to avoid scheduling an unnecessary callback.\n\n      Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n    }\n  }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n  // Mark anything that was blocked on this as no longer blocked\n  // and eligible for a replay.\n  if (queuedDiscreteEvents.length > 0) {\n    scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n    // worth it because we expect very few discrete events to queue up and once\n    // we are actually fully unblocked it will be fast to replay them.\n\n    for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n      var queuedEvent = queuedDiscreteEvents[i];\n\n      if (queuedEvent.blockedOn === unblocked) {\n        queuedEvent.blockedOn = null;\n      }\n    }\n  }\n\n  if (queuedFocus !== null) {\n    scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n  }\n\n  if (queuedDrag !== null) {\n    scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n  }\n\n  if (queuedMouse !== null) {\n    scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n  }\n\n  var unblock = function (queuedEvent) {\n    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n  };\n\n  queuedPointers.forEach(unblock);\n  queuedPointerCaptures.forEach(unblock);\n\n  for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n    var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n    if (queuedTarget.blockedOn === unblocked) {\n      queuedTarget.blockedOn = null;\n    }\n  }\n\n  while (queuedExplicitHydrationTargets.length > 0) {\n    var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n    if (nextExplicitTarget.blockedOn !== null) {\n      // We're still blocked.\n      break;\n    } else {\n      attemptExplicitHydrationTarget(nextExplicitTarget);\n\n      if (nextExplicitTarget.blockedOn === null) {\n        // We're unblocked.\n        queuedExplicitHydrationTargets.shift();\n      }\n    }\n  }\n}\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n  _enabled = !!enabled;\n}\nfunction isEnabled() {\n  return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n  var eventPriority = getEventPriority(domEventName);\n  var listenerWrapper;\n\n  switch (eventPriority) {\n    case DiscreteEventPriority:\n      listenerWrapper = dispatchDiscreteEvent;\n      break;\n\n    case ContinuousEventPriority:\n      listenerWrapper = dispatchContinuousEvent;\n      break;\n\n    case DefaultEventPriority:\n    default:\n      listenerWrapper = dispatchEvent;\n      break;\n  }\n\n  return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = null;\n\n  try {\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig.transition = prevTransition;\n  }\n}\n\nfunction dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig.transition;\n  ReactCurrentBatchConfig.transition = null;\n\n  try {\n    setCurrentUpdatePriority(ContinuousEventPriority);\n    dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig.transition = prevTransition;\n  }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  if (!_enabled) {\n    return;\n  }\n\n  {\n    dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n  }\n}\n\nfunction dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n  if (blockedOn === null) {\n    dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n    clearIfContinuousEvent(domEventName, nativeEvent);\n    return;\n  }\n\n  if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n    nativeEvent.stopPropagation();\n    return;\n  } // We need to clear only if we didn't queue because\n  // queueing is accumulative.\n\n\n  clearIfContinuousEvent(domEventName, nativeEvent);\n\n  if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {\n    while (blockedOn !== null) {\n      var fiber = getInstanceFromNode(blockedOn);\n\n      if (fiber !== null) {\n        attemptSynchronousHydration(fiber);\n      }\n\n      var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n      if (nextBlockedOn === null) {\n        dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);\n      }\n\n      if (nextBlockedOn === blockedOn) {\n        break;\n      }\n\n      blockedOn = nextBlockedOn;\n    }\n\n    if (blockedOn !== null) {\n      nativeEvent.stopPropagation();\n    }\n\n    return;\n  } // This is not replayable so we'll invoke it but without a target,\n  // in case the event system needs to trace it.\n\n\n  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n}\n\nvar return_targetInst = null; // Returns a SuspenseInstance or Container if it's blocked.\n// The return_targetInst field above is conceptually part of the return value.\n\nfunction findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n  // TODO: Warn if _enabled is false.\n  return_targetInst = null;\n  var nativeEventTarget = getEventTarget(nativeEvent);\n  var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n  if (targetInst !== null) {\n    var nearestMounted = getNearestMountedFiber(targetInst);\n\n    if (nearestMounted === null) {\n      // This tree has been unmounted already. Dispatch without a target.\n      targetInst = null;\n    } else {\n      var tag = nearestMounted.tag;\n\n      if (tag === SuspenseComponent) {\n        var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n        if (instance !== null) {\n          // Queue the event to be replayed later. Abort dispatching since we\n          // don't want this event dispatched twice through the event system.\n          // TODO: If this is the first discrete event in the queue. Schedule an increased\n          // priority for this boundary.\n          return instance;\n        } // This shouldn't happen, something went wrong but to avoid blocking\n        // the whole system, dispatch the event without a target.\n        // TODO: Warn.\n\n\n        targetInst = null;\n      } else if (tag === HostRoot) {\n        var root = nearestMounted.stateNode;\n\n        if (isRootDehydrated(root)) {\n          // If this happens during a replay something went wrong and it might block\n          // the whole system.\n          return getContainerFromFiber(nearestMounted);\n        }\n\n        targetInst = null;\n      } else if (nearestMounted !== targetInst) {\n        // If we get an event (ex: img onload) before committing that\n        // component's mount, ignore it for now (that is, treat it as if it was an\n        // event on a non-React tree). We might also consider queueing events and\n        // dispatching them after the mount.\n        targetInst = null;\n      }\n    }\n  }\n\n  return_targetInst = targetInst; // We're not blocked on anything.\n\n  return null;\n}\nfunction getEventPriority(domEventName) {\n  switch (domEventName) {\n    // Used by SimpleEventPlugin:\n    case 'cancel':\n    case 'click':\n    case 'close':\n    case 'contextmenu':\n    case 'copy':\n    case 'cut':\n    case 'auxclick':\n    case 'dblclick':\n    case 'dragend':\n    case 'dragstart':\n    case 'drop':\n    case 'focusin':\n    case 'focusout':\n    case 'input':\n    case 'invalid':\n    case 'keydown':\n    case 'keypress':\n    case 'keyup':\n    case 'mousedown':\n    case 'mouseup':\n    case 'paste':\n    case 'pause':\n    case 'play':\n    case 'pointercancel':\n    case 'pointerdown':\n    case 'pointerup':\n    case 'ratechange':\n    case 'reset':\n    case 'resize':\n    case 'seeked':\n    case 'submit':\n    case 'touchcancel':\n    case 'touchend':\n    case 'touchstart':\n    case 'volumechange': // Used by polyfills:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'change':\n    case 'selectionchange':\n    case 'textInput':\n    case 'compositionstart':\n    case 'compositionend':\n    case 'compositionupdate': // Only enableCreateEventHandleAPI:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'beforeblur':\n    case 'afterblur': // Not used by React but could be by user code:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'beforeinput':\n    case 'blur':\n    case 'fullscreenchange':\n    case 'focus':\n    case 'hashchange':\n    case 'popstate':\n    case 'select':\n    case 'selectstart':\n      return DiscreteEventPriority;\n\n    case 'drag':\n    case 'dragenter':\n    case 'dragexit':\n    case 'dragleave':\n    case 'dragover':\n    case 'mousemove':\n    case 'mouseout':\n    case 'mouseover':\n    case 'pointermove':\n    case 'pointerout':\n    case 'pointerover':\n    case 'scroll':\n    case 'toggle':\n    case 'touchmove':\n    case 'wheel': // Not used by React but could be by user code:\n    // eslint-disable-next-line no-fallthrough\n\n    case 'mouseenter':\n    case 'mouseleave':\n    case 'pointerenter':\n    case 'pointerleave':\n      return ContinuousEventPriority;\n\n    case 'message':\n      {\n        // We might be in the Scheduler callback.\n        // Eventually this mechanism will be replaced by a check\n        // of the current priority on the native scheduler.\n        var schedulerPriority = getCurrentPriorityLevel();\n\n        switch (schedulerPriority) {\n          case ImmediatePriority:\n            return DiscreteEventPriority;\n\n          case UserBlockingPriority:\n            return ContinuousEventPriority;\n\n          case NormalPriority:\n          case LowPriority:\n            // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n            return DefaultEventPriority;\n\n          case IdlePriority:\n            return IdleEventPriority;\n\n          default:\n            return DefaultEventPriority;\n        }\n      }\n\n    default:\n      return DefaultEventPriority;\n  }\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n  target.addEventListener(eventType, listener, false);\n  return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n  target.addEventListener(eventType, listener, true);\n  return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n  target.addEventListener(eventType, listener, {\n    capture: true,\n    passive: passive\n  });\n  return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n  target.addEventListener(eventType, listener, {\n    passive: passive\n  });\n  return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n  root = nativeEventTarget;\n  startText = getText();\n  return true;\n}\nfunction reset() {\n  root = null;\n  startText = null;\n  fallbackText = null;\n}\nfunction getData() {\n  if (fallbackText) {\n    return fallbackText;\n  }\n\n  var start;\n  var startValue = startText;\n  var startLength = startValue.length;\n  var end;\n  var endValue = getText();\n  var endLength = endValue.length;\n\n  for (start = 0; start < startLength; start++) {\n    if (startValue[start] !== endValue[start]) {\n      break;\n    }\n  }\n\n  var minEnd = startLength - start;\n\n  for (end = 1; end <= minEnd; end++) {\n    if (startValue[startLength - end] !== endValue[endLength - end]) {\n      break;\n    }\n  }\n\n  var sliceTail = end > 1 ? 1 - end : undefined;\n  fallbackText = endValue.slice(start, sliceTail);\n  return fallbackText;\n}\nfunction getText() {\n  if ('value' in root) {\n    return root.value;\n  }\n\n  return root.textContent;\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n  var charCode;\n  var keyCode = nativeEvent.keyCode;\n\n  if ('charCode' in nativeEvent) {\n    charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n    if (charCode === 0 && keyCode === 13) {\n      charCode = 13;\n    }\n  } else {\n    // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n    charCode = keyCode;\n  } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n  // report Enter as charCode 10 when ctrl is pressed.\n\n\n  if (charCode === 10) {\n    charCode = 13;\n  } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n  // Must not discard the (non-)printable Enter-key.\n\n\n  if (charCode >= 32 || charCode === 13) {\n    return charCode;\n  }\n\n  return 0;\n}\n\nfunction functionThatReturnsTrue() {\n  return true;\n}\n\nfunction functionThatReturnsFalse() {\n  return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n  /**\n   * Synthetic events are dispatched by event plugins, typically in response to a\n   * top-level event delegation handler.\n   *\n   * These systems should generally use pooling to reduce the frequency of garbage\n   * collection. The system should check `isPersistent` to determine whether the\n   * event should be released into the pool after being dispatched. Users that\n   * need a persisted event should invoke `persist`.\n   *\n   * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n   * normalizing browser quirks. Subclasses do not necessarily have to implement a\n   * DOM interface; custom application-specific events can also subclass this.\n   */\n  function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n    this._reactName = reactName;\n    this._targetInst = targetInst;\n    this.type = reactEventType;\n    this.nativeEvent = nativeEvent;\n    this.target = nativeEventTarget;\n    this.currentTarget = null;\n\n    for (var _propName in Interface) {\n      if (!Interface.hasOwnProperty(_propName)) {\n        continue;\n      }\n\n      var normalize = Interface[_propName];\n\n      if (normalize) {\n        this[_propName] = normalize(nativeEvent);\n      } else {\n        this[_propName] = nativeEvent[_propName];\n      }\n    }\n\n    var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n    if (defaultPrevented) {\n      this.isDefaultPrevented = functionThatReturnsTrue;\n    } else {\n      this.isDefaultPrevented = functionThatReturnsFalse;\n    }\n\n    this.isPropagationStopped = functionThatReturnsFalse;\n    return this;\n  }\n\n  assign(SyntheticBaseEvent.prototype, {\n    preventDefault: function () {\n      this.defaultPrevented = true;\n      var event = this.nativeEvent;\n\n      if (!event) {\n        return;\n      }\n\n      if (event.preventDefault) {\n        event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n      } else if (typeof event.returnValue !== 'unknown') {\n        event.returnValue = false;\n      }\n\n      this.isDefaultPrevented = functionThatReturnsTrue;\n    },\n    stopPropagation: function () {\n      var event = this.nativeEvent;\n\n      if (!event) {\n        return;\n      }\n\n      if (event.stopPropagation) {\n        event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n      } else if (typeof event.cancelBubble !== 'unknown') {\n        // The ChangeEventPlugin registers a \"propertychange\" event for\n        // IE. This event does not support bubbling or cancelling, and\n        // any references to cancelBubble throw \"Member not found\".  A\n        // typeof check of \"unknown\" circumvents this issue (and is also\n        // IE specific).\n        event.cancelBubble = true;\n      }\n\n      this.isPropagationStopped = functionThatReturnsTrue;\n    },\n\n    /**\n     * We release all dispatched `SyntheticEvent`s after each event loop, adding\n     * them back into the pool. This allows a way to hold onto a reference that\n     * won't be added back into the pool.\n     */\n    persist: function () {// Modern event system doesn't use pooling.\n    },\n\n    /**\n     * Checks if this event should be released back into the pool.\n     *\n     * @return {boolean} True if this should not be released, false otherwise.\n     */\n    isPersistent: functionThatReturnsTrue\n  });\n  return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n  eventPhase: 0,\n  bubbles: 0,\n  cancelable: 0,\n  timeStamp: function (event) {\n    return event.timeStamp || Date.now();\n  },\n  defaultPrevented: 0,\n  isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = assign({}, EventInterface, {\n  view: 0,\n  detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n  if (event !== lastMouseEvent) {\n    if (lastMouseEvent && event.type === 'mousemove') {\n      lastMovementX = event.screenX - lastMouseEvent.screenX;\n      lastMovementY = event.screenY - lastMouseEvent.screenY;\n    } else {\n      lastMovementX = 0;\n      lastMovementY = 0;\n    }\n\n    lastMouseEvent = event;\n  }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = assign({}, UIEventInterface, {\n  screenX: 0,\n  screenY: 0,\n  clientX: 0,\n  clientY: 0,\n  pageX: 0,\n  pageY: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  altKey: 0,\n  metaKey: 0,\n  getModifierState: getEventModifierState,\n  button: 0,\n  buttons: 0,\n  relatedTarget: function (event) {\n    if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n    return event.relatedTarget;\n  },\n  movementX: function (event) {\n    if ('movementX' in event) {\n      return event.movementX;\n    }\n\n    updateMouseMovementPolyfillState(event);\n    return lastMovementX;\n  },\n  movementY: function (event) {\n    if ('movementY' in event) {\n      return event.movementY;\n    } // Don't need to call updateMouseMovementPolyfillState() here\n    // because it's guaranteed to have already run when movementX\n    // was copied.\n\n\n    return lastMovementY;\n  }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = assign({}, MouseEventInterface, {\n  dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = assign({}, UIEventInterface, {\n  relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = assign({}, EventInterface, {\n  animationName: 0,\n  elapsedTime: 0,\n  pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = assign({}, EventInterface, {\n  clipboardData: function (event) {\n    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n  }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = assign({}, EventInterface, {\n  data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n *      /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n  Esc: 'Escape',\n  Spacebar: ' ',\n  Left: 'ArrowLeft',\n  Up: 'ArrowUp',\n  Right: 'ArrowRight',\n  Down: 'ArrowDown',\n  Del: 'Delete',\n  Win: 'OS',\n  Menu: 'ContextMenu',\n  Apps: 'ContextMenu',\n  Scroll: 'ScrollLock',\n  MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n  '8': 'Backspace',\n  '9': 'Tab',\n  '12': 'Clear',\n  '13': 'Enter',\n  '16': 'Shift',\n  '17': 'Control',\n  '18': 'Alt',\n  '19': 'Pause',\n  '20': 'CapsLock',\n  '27': 'Escape',\n  '32': ' ',\n  '33': 'PageUp',\n  '34': 'PageDown',\n  '35': 'End',\n  '36': 'Home',\n  '37': 'ArrowLeft',\n  '38': 'ArrowUp',\n  '39': 'ArrowRight',\n  '40': 'ArrowDown',\n  '45': 'Insert',\n  '46': 'Delete',\n  '112': 'F1',\n  '113': 'F2',\n  '114': 'F3',\n  '115': 'F4',\n  '116': 'F5',\n  '117': 'F6',\n  '118': 'F7',\n  '119': 'F8',\n  '120': 'F9',\n  '121': 'F10',\n  '122': 'F11',\n  '123': 'F12',\n  '144': 'NumLock',\n  '145': 'ScrollLock',\n  '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n  if (nativeEvent.key) {\n    // Normalize inconsistent values reported by browsers due to\n    // implementations of a working draft specification.\n    // FireFox implements `key` but returns `MozPrintableKey` for all\n    // printable characters (normalized to `Unidentified`), ignore it.\n    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n    if (key !== 'Unidentified') {\n      return key;\n    }\n  } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n  if (nativeEvent.type === 'keypress') {\n    var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n    // thus be captured by `keypress`, no other non-printable key should.\n\n    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n  }\n\n  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n    // While user keyboard layout determines the actual meaning of each\n    // `keyCode` value, almost all function keys have a universal value.\n    return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n  }\n\n  return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n  Alt: 'altKey',\n  Control: 'ctrlKey',\n  Meta: 'metaKey',\n  Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n  var syntheticEvent = this;\n  var nativeEvent = syntheticEvent.nativeEvent;\n\n  if (nativeEvent.getModifierState) {\n    return nativeEvent.getModifierState(keyArg);\n  }\n\n  var keyProp = modifierKeyToProp[keyArg];\n  return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n  return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n  key: getEventKey,\n  code: 0,\n  location: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  altKey: 0,\n  metaKey: 0,\n  repeat: 0,\n  locale: 0,\n  getModifierState: getEventModifierState,\n  // Legacy Interface\n  charCode: function (event) {\n    // `charCode` is the result of a KeyPress event and represents the value of\n    // the actual printable character.\n    // KeyPress is deprecated, but its replacement is not yet final and not\n    // implemented in any major browser. Only KeyPress has charCode.\n    if (event.type === 'keypress') {\n      return getEventCharCode(event);\n    }\n\n    return 0;\n  },\n  keyCode: function (event) {\n    // `keyCode` is the result of a KeyDown/Up event and represents the value of\n    // physical keyboard key.\n    // The actual meaning of the value depends on the users' keyboard layout\n    // which cannot be detected. Assuming that it is a US keyboard layout\n    // provides a surprisingly accurate mapping for US and European users.\n    // Due to this, it is left to the user to implement at this time.\n    if (event.type === 'keydown' || event.type === 'keyup') {\n      return event.keyCode;\n    }\n\n    return 0;\n  },\n  which: function (event) {\n    // `which` is an alias for either `keyCode` or `charCode` depending on the\n    // type of the event.\n    if (event.type === 'keypress') {\n      return getEventCharCode(event);\n    }\n\n    if (event.type === 'keydown' || event.type === 'keyup') {\n      return event.keyCode;\n    }\n\n    return 0;\n  }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = assign({}, MouseEventInterface, {\n  pointerId: 0,\n  width: 0,\n  height: 0,\n  pressure: 0,\n  tangentialPressure: 0,\n  tiltX: 0,\n  tiltY: 0,\n  twist: 0,\n  pointerType: 0,\n  isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = assign({}, UIEventInterface, {\n  touches: 0,\n  targetTouches: 0,\n  changedTouches: 0,\n  altKey: 0,\n  metaKey: 0,\n  ctrlKey: 0,\n  shiftKey: 0,\n  getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = assign({}, EventInterface, {\n  propertyName: 0,\n  elapsedTime: 0,\n  pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = assign({}, MouseEventInterface, {\n  deltaX: function (event) {\n    return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n    'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n  },\n  deltaY: function (event) {\n    return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n    'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n    'wheelDelta' in event ? -event.wheelDelta : 0;\n  },\n  deltaZ: 0,\n  // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n  // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n  deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n  documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents() {\n  registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n  registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n  registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n  registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n  return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n  !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n  switch (domEventName) {\n    case 'compositionstart':\n      return 'onCompositionStart';\n\n    case 'compositionend':\n      return 'onCompositionEnd';\n\n    case 'compositionupdate':\n      return 'onCompositionUpdate';\n  }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n  return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'keyup':\n      // Command keys insert or clear IME input.\n      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n    case 'keydown':\n      // Expect IME keyCode on each keydown. If we get any other\n      // code we must have exited earlier.\n      return nativeEvent.keyCode !== START_KEYCODE;\n\n    case 'keypress':\n    case 'mousedown':\n    case 'focusout':\n      // Events are not possible without cancelling IME.\n      return true;\n\n    default:\n      return false;\n  }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n  var detail = nativeEvent.detail;\n\n  if (typeof detail === 'object' && 'data' in detail) {\n    return detail.data;\n  }\n\n  return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n  return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n  var eventType;\n  var fallbackData;\n\n  if (canUseCompositionEvent) {\n    eventType = getCompositionEventType(domEventName);\n  } else if (!isComposing) {\n    if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n      eventType = 'onCompositionStart';\n    }\n  } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n    eventType = 'onCompositionEnd';\n  }\n\n  if (!eventType) {\n    return null;\n  }\n\n  if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n    // The current composition is stored statically and must not be\n    // overwritten while composition continues.\n    if (!isComposing && eventType === 'onCompositionStart') {\n      isComposing = initialize(nativeEventTarget);\n    } else if (eventType === 'onCompositionEnd') {\n      if (isComposing) {\n        fallbackData = getData();\n      }\n    }\n  }\n\n  var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n  if (listeners.length > 0) {\n    var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n\n    if (fallbackData) {\n      // Inject data generated from fallback path into the synthetic event.\n      // This matches the property of native CompositionEventInterface.\n      event.data = fallbackData;\n    } else {\n      var customData = getDataFromCustomEvent(nativeEvent);\n\n      if (customData !== null) {\n        event.data = customData;\n      }\n    }\n  }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n  switch (domEventName) {\n    case 'compositionend':\n      return getDataFromCustomEvent(nativeEvent);\n\n    case 'keypress':\n      /**\n       * If native `textInput` events are available, our goal is to make\n       * use of them. However, there is a special case: the spacebar key.\n       * In Webkit, preventing default on a spacebar `textInput` event\n       * cancels character insertion, but it *also* causes the browser\n       * to fall back to its default spacebar behavior of scrolling the\n       * page.\n       *\n       * Tracking at:\n       * https://code.google.com/p/chromium/issues/detail?id=355103\n       *\n       * To avoid this issue, use the keypress event as if no `textInput`\n       * event is available.\n       */\n      var which = nativeEvent.which;\n\n      if (which !== SPACEBAR_CODE) {\n        return null;\n      }\n\n      hasSpaceKeypress = true;\n      return SPACEBAR_CHAR;\n\n    case 'textInput':\n      // Record the characters to be added to the DOM.\n      var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n      // it at the keypress level and bail immediately. Android Chrome\n      // doesn't give us keycodes, so we need to ignore it.\n\n      if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n        return null;\n      }\n\n      return chars;\n\n    default:\n      // For other native event types, do nothing.\n      return null;\n  }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n  // If we are currently composing (IME) and using a fallback to do so,\n  // try to extract the composed characters from the fallback object.\n  // If composition event is available, we extract a string only at\n  // compositionevent, otherwise extract it at fallback events.\n  if (isComposing) {\n    if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n      var chars = getData();\n      reset();\n      isComposing = false;\n      return chars;\n    }\n\n    return null;\n  }\n\n  switch (domEventName) {\n    case 'paste':\n      // If a paste event occurs after a keypress, throw out the input\n      // chars. Paste events should not lead to BeforeInput events.\n      return null;\n\n    case 'keypress':\n      /**\n       * As of v27, Firefox may fire keypress events even when no character\n       * will be inserted. A few possibilities:\n       *\n       * - `which` is `0`. Arrow keys, Esc key, etc.\n       *\n       * - `which` is the pressed key code, but no char is available.\n       *   Ex: 'AltGr + d` in Polish. There is no modified character for\n       *   this key combination and no character is inserted into the\n       *   document, but FF fires the keypress for char code `100` anyway.\n       *   No `input` event will occur.\n       *\n       * - `which` is the pressed key code, but a command combination is\n       *   being used. Ex: `Cmd+C`. No character is inserted, and no\n       *   `input` event will occur.\n       */\n      if (!isKeypressCommand(nativeEvent)) {\n        // IE fires the `keypress` event when a user types an emoji via\n        // Touch keyboard of Windows.  In such a case, the `char` property\n        // holds an emoji character like `\\uD83D\\uDE0A`.  Because its length\n        // is 2, the property `which` does not represent an emoji correctly.\n        // In such a case, we directly return the `char` property instead of\n        // using `which`.\n        if (nativeEvent.char && nativeEvent.char.length > 1) {\n          return nativeEvent.char;\n        } else if (nativeEvent.which) {\n          return String.fromCharCode(nativeEvent.which);\n        }\n      }\n\n      return null;\n\n    case 'compositionend':\n      return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n    default:\n      return null;\n  }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n  var chars;\n\n  if (canUseTextInputEvent) {\n    chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n  } else {\n    chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n  } // If no characters are being inserted, no BeforeInput event should\n  // be fired.\n\n\n  if (!chars) {\n    return null;\n  }\n\n  var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n  if (listeners.length > 0) {\n    var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n    event.data = chars;\n  }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n  extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n  color: true,\n  date: true,\n  datetime: true,\n  'datetime-local': true,\n  email: true,\n  month: true,\n  number: true,\n  password: true,\n  range: true,\n  search: true,\n  tel: true,\n  text: true,\n  time: true,\n  url: true,\n  week: true\n};\n\nfunction isTextInputElement(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n  if (nodeName === 'input') {\n    return !!supportedInputTypes[elem.type];\n  }\n\n  if (nodeName === 'textarea') {\n    return true;\n  }\n\n  return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n  if (!canUseDOM) {\n    return false;\n  }\n\n  var eventName = 'on' + eventNameSuffix;\n  var isSupported = (eventName in document);\n\n  if (!isSupported) {\n    var element = document.createElement('div');\n    element.setAttribute(eventName, 'return;');\n    isSupported = typeof element[eventName] === 'function';\n  }\n\n  return isSupported;\n}\n\nfunction registerEvents$1() {\n  registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n  // Flag this event loop as needing state restore.\n  enqueueStateRestore(target);\n  var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n  if (listeners.length > 0) {\n    var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n  }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n  var dispatchQueue = [];\n  createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n  // other events and have it go through ReactBrowserEventEmitter. Since it\n  // doesn't, we manually listen for the events and so we have to enqueue and\n  // process the abstract event manually.\n  //\n  // Batching is necessary here in order to ensure that all event handlers run\n  // before the next rerender (including event handlers attached to ancestor\n  // elements instead of directly on the input). Without this, controlled\n  // components don't work properly in conjunction with event bubbling because\n  // the component is rerendered and the value reverted before all the event\n  // handlers can run. See https://github.com/facebook/react/issues/708.\n\n  batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n  processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n  var targetNode = getNodeFromInstance(targetInst);\n\n  if (updateValueIfChanged(targetNode)) {\n    return targetInst;\n  }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n  if (domEventName === 'change') {\n    return targetInst;\n  }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n  // IE9 claims to support the input event but fails to trigger it when\n  // deleting text, so we ignore its input events.\n  isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n  activeElement = target;\n  activeElementInst = targetInst;\n  activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n  if (!activeElement) {\n    return;\n  }\n\n  activeElement.detachEvent('onpropertychange', handlePropertyChange);\n  activeElement = null;\n  activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n  if (nativeEvent.propertyName !== 'value') {\n    return;\n  }\n\n  if (getInstIfValueChanged(activeElementInst)) {\n    manualDispatchChangeEvent(nativeEvent);\n  }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n  if (domEventName === 'focusin') {\n    // In IE9, propertychange fires for most input events but is buggy and\n    // doesn't fire when text is deleted, but conveniently, selectionchange\n    // appears to fire in all of the remaining cases so we catch those and\n    // forward the event if the value has changed\n    // In either case, we don't want to call the event handler if the value\n    // is changed from JS so we redefine a setter for `.value` that updates\n    // our activeElementValue variable, allowing us to ignore those changes\n    //\n    // stopWatching() should be a noop here but we call it just in case we\n    // missed a blur event somehow.\n    stopWatchingForValueChange();\n    startWatchingForValueChange(target, targetInst);\n  } else if (domEventName === 'focusout') {\n    stopWatchingForValueChange();\n  }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n  if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n    // On the selectionchange event, the target is just document which isn't\n    // helpful for us so just check activeElement instead.\n    //\n    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n    // propertychange on the first input event after setting `value` from a\n    // script and fires only keydown, keypress, keyup. Catching keyup usually\n    // gets it and catching keydown lets us fire an event for the first\n    // keystroke if user does a key repeat (it'll be a little delayed: right\n    // before the second keystroke). Other input methods (e.g., paste) seem to\n    // fire selectionchange normally.\n    return getInstIfValueChanged(activeElementInst);\n  }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n  // Use the `click` event to detect changes to checkbox and radio inputs.\n  // This approach works across all browsers, whereas `change` does not fire\n  // until `blur` in IE8.\n  var nodeName = elem.nodeName;\n  return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n  if (domEventName === 'click') {\n    return getInstIfValueChanged(targetInst);\n  }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n  if (domEventName === 'input' || domEventName === 'change') {\n    return getInstIfValueChanged(targetInst);\n  }\n}\n\nfunction handleControlledInputBlur(node) {\n  var state = node._wrapperState;\n\n  if (!state || !state.controlled || node.type !== 'number') {\n    return;\n  }\n\n  {\n    // If controlled, assign the value attribute to the current value on blur\n    setDefaultValue(node, 'number', node.value);\n  }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n  var getTargetInstFunc, handleEventFunc;\n\n  if (shouldUseChangeEvent(targetNode)) {\n    getTargetInstFunc = getTargetInstForChangeEvent;\n  } else if (isTextInputElement(targetNode)) {\n    if (isInputEventSupported) {\n      getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n    } else {\n      getTargetInstFunc = getTargetInstForInputEventPolyfill;\n      handleEventFunc = handleEventsForInputEventPolyfill;\n    }\n  } else if (shouldUseClickEvent(targetNode)) {\n    getTargetInstFunc = getTargetInstForClickEvent;\n  }\n\n  if (getTargetInstFunc) {\n    var inst = getTargetInstFunc(domEventName, targetInst);\n\n    if (inst) {\n      createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n      return;\n    }\n  }\n\n  if (handleEventFunc) {\n    handleEventFunc(domEventName, targetNode, targetInst);\n  } // When blurring, set the value attribute for number inputs\n\n\n  if (domEventName === 'focusout') {\n    handleControlledInputBlur(targetNode);\n  }\n}\n\nfunction registerEvents$2() {\n  registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n  registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n  registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n  registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n  var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n  if (isOverEvent && !isReplayingEvent(nativeEvent)) {\n    // If this is an over event with a target, we might have already dispatched\n    // the event in the out event of the other target. If this is replayed,\n    // then it's because we couldn't dispatch against this target previously\n    // so we have to do it now instead.\n    var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n    if (related) {\n      // If the related node is managed by React, we can assume that we have\n      // already dispatched the corresponding events during its mouseout.\n      if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n        return;\n      }\n    }\n  }\n\n  if (!isOutEvent && !isOverEvent) {\n    // Must not be a mouse or pointer in or out - ignoring.\n    return;\n  }\n\n  var win; // TODO: why is this nullable in the types but we read from it?\n\n  if (nativeEventTarget.window === nativeEventTarget) {\n    // `nativeEventTarget` is probably a window object.\n    win = nativeEventTarget;\n  } else {\n    // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n    var doc = nativeEventTarget.ownerDocument;\n\n    if (doc) {\n      win = doc.defaultView || doc.parentWindow;\n    } else {\n      win = window;\n    }\n  }\n\n  var from;\n  var to;\n\n  if (isOutEvent) {\n    var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n    from = targetInst;\n    to = _related ? getClosestInstanceFromNode(_related) : null;\n\n    if (to !== null) {\n      var nearestMounted = getNearestMountedFiber(to);\n\n      if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n        to = null;\n      }\n    }\n  } else {\n    // Moving to a node from outside the window.\n    from = null;\n    to = targetInst;\n  }\n\n  if (from === to) {\n    // Nothing pertains to our managed components.\n    return;\n  }\n\n  var SyntheticEventCtor = SyntheticMouseEvent;\n  var leaveEventType = 'onMouseLeave';\n  var enterEventType = 'onMouseEnter';\n  var eventTypePrefix = 'mouse';\n\n  if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n    SyntheticEventCtor = SyntheticPointerEvent;\n    leaveEventType = 'onPointerLeave';\n    enterEventType = 'onPointerEnter';\n    eventTypePrefix = 'pointer';\n  }\n\n  var fromNode = from == null ? win : getNodeFromInstance(from);\n  var toNode = to == null ? win : getNodeFromInstance(to);\n  var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n  leave.target = fromNode;\n  leave.relatedTarget = toNode;\n  var enter = null; // We should only process this nativeEvent if we are processing\n  // the first ancestor. Next time, we will ignore the event.\n\n  var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n  if (nativeTargetInst === targetInst) {\n    var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n    enterEvent.target = toNode;\n    enterEvent.relatedTarget = fromNode;\n    enter = enterEvent;\n  }\n\n  accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n  ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n  if (objectIs(objA, objB)) {\n    return true;\n  }\n\n  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n    return false;\n  }\n\n  var keysA = Object.keys(objA);\n  var keysB = Object.keys(objB);\n\n  if (keysA.length !== keysB.length) {\n    return false;\n  } // Test for A's keys different from B.\n\n\n  for (var i = 0; i < keysA.length; i++) {\n    var currentKey = keysA[i];\n\n    if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n  while (node && node.firstChild) {\n    node = node.firstChild;\n  }\n\n  return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n  while (node) {\n    if (node.nextSibling) {\n      return node.nextSibling;\n    }\n\n    node = node.parentNode;\n  }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n  var node = getLeafNode(root);\n  var nodeStart = 0;\n  var nodeEnd = 0;\n\n  while (node) {\n    if (node.nodeType === TEXT_NODE) {\n      nodeEnd = nodeStart + node.textContent.length;\n\n      if (nodeStart <= offset && nodeEnd >= offset) {\n        return {\n          node: node,\n          offset: offset - nodeStart\n        };\n      }\n\n      nodeStart = nodeEnd;\n    }\n\n    node = getLeafNode(getSiblingNode(node));\n  }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n  var ownerDocument = outerNode.ownerDocument;\n  var win = ownerDocument && ownerDocument.defaultView || window;\n  var selection = win.getSelection && win.getSelection();\n\n  if (!selection || selection.rangeCount === 0) {\n    return null;\n  }\n\n  var anchorNode = selection.anchorNode,\n      anchorOffset = selection.anchorOffset,\n      focusNode = selection.focusNode,\n      focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n  // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n  // expose properties, triggering a \"Permission denied error\" if any of its\n  // properties are accessed. The only seemingly possible way to avoid erroring\n  // is to access a property that typically works for non-anonymous divs and\n  // catch any error that may otherwise arise. See\n  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n  try {\n    /* eslint-disable no-unused-expressions */\n    anchorNode.nodeType;\n    focusNode.nodeType;\n    /* eslint-enable no-unused-expressions */\n  } catch (e) {\n    return null;\n  }\n\n  return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n  var length = 0;\n  var start = -1;\n  var end = -1;\n  var indexWithinAnchor = 0;\n  var indexWithinFocus = 0;\n  var node = outerNode;\n  var parentNode = null;\n\n  outer: while (true) {\n    var next = null;\n\n    while (true) {\n      if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n        start = length + anchorOffset;\n      }\n\n      if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n        end = length + focusOffset;\n      }\n\n      if (node.nodeType === TEXT_NODE) {\n        length += node.nodeValue.length;\n      }\n\n      if ((next = node.firstChild) === null) {\n        break;\n      } // Moving from `node` to its first child `next`.\n\n\n      parentNode = node;\n      node = next;\n    }\n\n    while (true) {\n      if (node === outerNode) {\n        // If `outerNode` has children, this is always the second time visiting\n        // it. If it has no children, this is still the first loop, and the only\n        // valid selection is anchorNode and focusNode both equal to this node\n        // and both offsets 0, in which case we will have handled above.\n        break outer;\n      }\n\n      if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n        start = length;\n      }\n\n      if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n        end = length;\n      }\n\n      if ((next = node.nextSibling) !== null) {\n        break;\n      }\n\n      node = parentNode;\n      parentNode = node.parentNode;\n    } // Moving from `node` to its next sibling `next`.\n\n\n    node = next;\n  }\n\n  if (start === -1 || end === -1) {\n    // This should never happen. (Would happen if the anchor/focus nodes aren't\n    // actually inside the passed-in node.)\n    return null;\n  }\n\n  return {\n    start: start,\n    end: end\n  };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n  var doc = node.ownerDocument || document;\n  var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n  // fails when pasting 100+ items)\n\n  if (!win.getSelection) {\n    return;\n  }\n\n  var selection = win.getSelection();\n  var length = node.textContent.length;\n  var start = Math.min(offsets.start, length);\n  var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n  // Flip backward selections, so we can set with a single range.\n\n  if (!selection.extend && start > end) {\n    var temp = end;\n    end = start;\n    start = temp;\n  }\n\n  var startMarker = getNodeForCharacterOffset(node, start);\n  var endMarker = getNodeForCharacterOffset(node, end);\n\n  if (startMarker && endMarker) {\n    if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n      return;\n    }\n\n    var range = doc.createRange();\n    range.setStart(startMarker.node, startMarker.offset);\n    selection.removeAllRanges();\n\n    if (start > end) {\n      selection.addRange(range);\n      selection.extend(endMarker.node, endMarker.offset);\n    } else {\n      range.setEnd(endMarker.node, endMarker.offset);\n      selection.addRange(range);\n    }\n  }\n}\n\nfunction isTextNode(node) {\n  return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n  if (!outerNode || !innerNode) {\n    return false;\n  } else if (outerNode === innerNode) {\n    return true;\n  } else if (isTextNode(outerNode)) {\n    return false;\n  } else if (isTextNode(innerNode)) {\n    return containsNode(outerNode, innerNode.parentNode);\n  } else if ('contains' in outerNode) {\n    return outerNode.contains(innerNode);\n  } else if (outerNode.compareDocumentPosition) {\n    return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n  } else {\n    return false;\n  }\n}\n\nfunction isInDocument(node) {\n  return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n  try {\n    // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n    // to throw, e.g. if it has a cross-origin src attribute.\n    // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n    // iframe.contentDocument.defaultView;\n    // A safety way is to access one of the cross origin properties: Window or Location\n    // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n    // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n    return typeof iframe.contentWindow.location.href === 'string';\n  } catch (err) {\n    return false;\n  }\n}\n\nfunction getActiveElementDeep() {\n  var win = window;\n  var element = getActiveElement();\n\n  while (element instanceof win.HTMLIFrameElement) {\n    if (isSameOriginFrame(element)) {\n      win = element.contentWindow;\n    } else {\n      return element;\n    }\n\n    element = getActiveElement(win.document);\n  }\n\n  return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n  return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n  var focusedElem = getActiveElementDeep();\n  return {\n    focusedElem: focusedElem,\n    selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n  };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n  var curFocusedElem = getActiveElementDeep();\n  var priorFocusedElem = priorSelectionInformation.focusedElem;\n  var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n    if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n      setSelection(priorFocusedElem, priorSelectionRange);\n    } // Focusing a node can change the scroll position, which is undesirable\n\n\n    var ancestors = [];\n    var ancestor = priorFocusedElem;\n\n    while (ancestor = ancestor.parentNode) {\n      if (ancestor.nodeType === ELEMENT_NODE) {\n        ancestors.push({\n          element: ancestor,\n          left: ancestor.scrollLeft,\n          top: ancestor.scrollTop\n        });\n      }\n    }\n\n    if (typeof priorFocusedElem.focus === 'function') {\n      priorFocusedElem.focus();\n    }\n\n    for (var i = 0; i < ancestors.length; i++) {\n      var info = ancestors[i];\n      info.element.scrollLeft = info.left;\n      info.element.scrollTop = info.top;\n    }\n  }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n  var selection;\n\n  if ('selectionStart' in input) {\n    // Modern browser with input or textarea.\n    selection = {\n      start: input.selectionStart,\n      end: input.selectionEnd\n    };\n  } else {\n    // Content editable or old IE textarea.\n    selection = getOffsets(input);\n  }\n\n  return selection || {\n    start: 0,\n    end: 0\n  };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input     Set selection bounds of this input or textarea\n * -@offsets   Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n  var start = offsets.start;\n  var end = offsets.end;\n\n  if (end === undefined) {\n    end = start;\n  }\n\n  if ('selectionStart' in input) {\n    input.selectionStart = start;\n    input.selectionEnd = Math.min(end, input.value.length);\n  } else {\n    setOffsets(input, offsets);\n  }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n  registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection$1(node) {\n  if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n    return {\n      start: node.selectionStart,\n      end: node.selectionEnd\n    };\n  } else {\n    var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n    var selection = win.getSelection();\n    return {\n      anchorNode: selection.anchorNode,\n      anchorOffset: selection.anchorOffset,\n      focusNode: selection.focusNode,\n      focusOffset: selection.focusOffset\n    };\n  }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n  return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n  // Ensure we have the right element, and that the user is not dragging a\n  // selection (this matches native `select` event behavior). In HTML5, select\n  // fires only on input and textarea thus if there's no focused element we\n  // won't dispatch.\n  var doc = getEventTargetDocument(nativeEventTarget);\n\n  if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n    return;\n  } // Only fire when selection has actually changed.\n\n\n  var currentSelection = getSelection$1(activeElement$1);\n\n  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n    lastSelection = currentSelection;\n    var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n    if (listeners.length > 0) {\n      var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n      dispatchQueue.push({\n        event: event,\n        listeners: listeners\n      });\n      event.target = activeElement$1;\n    }\n  }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n  switch (domEventName) {\n    // Track the input node that has focus.\n    case 'focusin':\n      if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n        activeElement$1 = targetNode;\n        activeElementInst$1 = targetInst;\n        lastSelection = null;\n      }\n\n      break;\n\n    case 'focusout':\n      activeElement$1 = null;\n      activeElementInst$1 = null;\n      lastSelection = null;\n      break;\n    // Don't fire the event while the user is dragging. This matches the\n    // semantics of the native select event.\n\n    case 'mousedown':\n      mouseDown = true;\n      break;\n\n    case 'contextmenu':\n    case 'mouseup':\n    case 'dragend':\n      mouseDown = false;\n      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n      break;\n    // Chrome and IE fire non-standard event when selection is changed (and\n    // sometimes when it hasn't). IE's event fires out of order with respect\n    // to key and input events on deletion, so we discard it.\n    //\n    // Firefox doesn't support selectionchange, so check selection status\n    // after each key entry. The selection changes after keydown and before\n    // keyup, but we check on keydown as well in the case of holding down a\n    // key, when multiple keydown events are fired but only one keyup is.\n    // This is also our approach for IE handling, for the reason above.\n\n    case 'selectionchange':\n      if (skipSelectionChangeEvent) {\n        break;\n      }\n\n    // falls through\n\n    case 'keydown':\n    case 'keyup':\n      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n  }\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n  var prefixes = {};\n  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n  prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n  prefixes['Moz' + styleProp] = 'moz' + eventName;\n  return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n  animationend: makePrefixMap('Animation', 'AnimationEnd'),\n  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n  animationstart: makePrefixMap('Animation', 'AnimationStart'),\n  transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n  style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n  // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n  // style object but the events that fire will still be prefixed, so we need\n  // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n  if (!('AnimationEvent' in window)) {\n    delete vendorPrefixes.animationend.animation;\n    delete vendorPrefixes.animationiteration.animation;\n    delete vendorPrefixes.animationstart.animation;\n  } // Same as above\n\n\n  if (!('TransitionEvent' in window)) {\n    delete vendorPrefixes.transitionend.transition;\n  }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n  if (prefixedEventNames[eventName]) {\n    return prefixedEventNames[eventName];\n  } else if (!vendorPrefixes[eventName]) {\n    return eventName;\n  }\n\n  var prefixMap = vendorPrefixes[eventName];\n\n  for (var styleProp in prefixMap) {\n    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n      return prefixedEventNames[eventName] = prefixMap[styleProp];\n    }\n  }\n\n  return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map(); // NOTE: Capitalization is important in this list!\n//\n// E.g. it needs \"pointerDown\", not \"pointerdown\".\n// This is because we derive both React name (\"onPointerDown\")\n// and DOM name (\"pointerdown\") from the same list.\n//\n// Exceptions that don't match this convention are listed separately.\n//\n// prettier-ignore\n\nvar simpleEventPluginEvents = ['abort', 'auxClick', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'pointerCancel', 'pointerDown', 'pointerMove', 'pointerOut', 'pointerOver', 'pointerUp', 'progress', 'rateChange', 'reset', 'resize', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'scroll', 'toggle', 'touchMove', 'waiting', 'wheel'];\n\nfunction registerSimpleEvent(domEventName, reactName) {\n  topLevelEventsToReactNames.set(domEventName, reactName);\n  registerTwoPhaseEvent(reactName, [domEventName]);\n}\n\nfunction registerSimpleEvents() {\n  for (var i = 0; i < simpleEventPluginEvents.length; i++) {\n    var eventName = simpleEventPluginEvents[i];\n    var domEventName = eventName.toLowerCase();\n    var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);\n    registerSimpleEvent(domEventName, 'on' + capitalizedEvent);\n  } // Special cases where event names don't match.\n\n\n  registerSimpleEvent(ANIMATION_END, 'onAnimationEnd');\n  registerSimpleEvent(ANIMATION_ITERATION, 'onAnimationIteration');\n  registerSimpleEvent(ANIMATION_START, 'onAnimationStart');\n  registerSimpleEvent('dblclick', 'onDoubleClick');\n  registerSimpleEvent('focusin', 'onFocus');\n  registerSimpleEvent('focusout', 'onBlur');\n  registerSimpleEvent(TRANSITION_END, 'onTransitionEnd');\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  var reactName = topLevelEventsToReactNames.get(domEventName);\n\n  if (reactName === undefined) {\n    return;\n  }\n\n  var SyntheticEventCtor = SyntheticEvent;\n  var reactEventType = domEventName;\n\n  switch (domEventName) {\n    case 'keypress':\n      // Firefox creates a keypress event for function keys too. This removes\n      // the unwanted keypress events. Enter is however both printable and\n      // non-printable. One would expect Tab to be as well (but it isn't).\n      if (getEventCharCode(nativeEvent) === 0) {\n        return;\n      }\n\n    /* falls through */\n\n    case 'keydown':\n    case 'keyup':\n      SyntheticEventCtor = SyntheticKeyboardEvent;\n      break;\n\n    case 'focusin':\n      reactEventType = 'focus';\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'focusout':\n      reactEventType = 'blur';\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'beforeblur':\n    case 'afterblur':\n      SyntheticEventCtor = SyntheticFocusEvent;\n      break;\n\n    case 'click':\n      // Firefox creates a click event on right mouse clicks. This removes the\n      // unwanted click events.\n      if (nativeEvent.button === 2) {\n        return;\n      }\n\n    /* falls through */\n\n    case 'auxclick':\n    case 'dblclick':\n    case 'mousedown':\n    case 'mousemove':\n    case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n    /* falls through */\n\n    case 'mouseout':\n    case 'mouseover':\n    case 'contextmenu':\n      SyntheticEventCtor = SyntheticMouseEvent;\n      break;\n\n    case 'drag':\n    case 'dragend':\n    case 'dragenter':\n    case 'dragexit':\n    case 'dragleave':\n    case 'dragover':\n    case 'dragstart':\n    case 'drop':\n      SyntheticEventCtor = SyntheticDragEvent;\n      break;\n\n    case 'touchcancel':\n    case 'touchend':\n    case 'touchmove':\n    case 'touchstart':\n      SyntheticEventCtor = SyntheticTouchEvent;\n      break;\n\n    case ANIMATION_END:\n    case ANIMATION_ITERATION:\n    case ANIMATION_START:\n      SyntheticEventCtor = SyntheticAnimationEvent;\n      break;\n\n    case TRANSITION_END:\n      SyntheticEventCtor = SyntheticTransitionEvent;\n      break;\n\n    case 'scroll':\n      SyntheticEventCtor = SyntheticUIEvent;\n      break;\n\n    case 'wheel':\n      SyntheticEventCtor = SyntheticWheelEvent;\n      break;\n\n    case 'copy':\n    case 'cut':\n    case 'paste':\n      SyntheticEventCtor = SyntheticClipboardEvent;\n      break;\n\n    case 'gotpointercapture':\n    case 'lostpointercapture':\n    case 'pointercancel':\n    case 'pointerdown':\n    case 'pointermove':\n    case 'pointerout':\n    case 'pointerover':\n    case 'pointerup':\n      SyntheticEventCtor = SyntheticPointerEvent;\n      break;\n  }\n\n  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n  {\n    // Some events don't bubble in the browser.\n    // In the past, React has always bubbled them, but this can be surprising.\n    // We're going to try aligning closer to the browser behavior by not bubbling\n    // them in React either. We'll start by not bubbling onScroll, and then expand.\n    var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n    // nonDelegatedEvents list in DOMPluginEventSystem.\n    // Then we can remove this special list.\n    // This is a breaking change that can wait until React 18.\n    domEventName === 'scroll';\n\n    var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n    if (_listeners.length > 0) {\n      // Intentionally create event lazily.\n      var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n      dispatchQueue.push({\n        event: _event,\n        listeners: _listeners\n      });\n    }\n  }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n  // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n  // This is the basic functionality of the event system. All\n  // the other plugins are essentially polyfills. So the plugin\n  // should probably be inlined somewhere and have its logic\n  // be core the to event system. This would potentially allow\n  // us to ship builds of React without the polyfilled plugins below.\n  extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n  var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n  // event's native \"bubble\" phase, which means that we're\n  // not in the capture phase. That's because we emulate\n  // the capture phase here still. This is a trade-off,\n  // because in an ideal world we would not emulate and use\n  // the phases properly, like we do with the SimpleEvent\n  // plugin. However, the plugins below either expect\n  // emulation (EnterLeave) or use state localized to that\n  // plugin (BeforeInput, Change, Select). The state in\n  // these modules complicates things, as you'll essentially\n  // get the case where the capture phase event might change\n  // state, only for the following bubble event to come in\n  // later and not trigger anything as the state now\n  // invalidates the heuristics of the event plugin. We\n  // could alter all these plugins to work in such ways, but\n  // that might cause other unknown side-effects that we\n  // can't foresee right now.\n\n  if (shouldProcessPolyfillPlugins) {\n    extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n    extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n  }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'resize', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n  var type = event.type || 'unknown-event';\n  event.currentTarget = currentTarget;\n  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n  event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n  var previousInstance;\n\n  if (inCapturePhase) {\n    for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n      var _dispatchListeners$i = dispatchListeners[i],\n          instance = _dispatchListeners$i.instance,\n          currentTarget = _dispatchListeners$i.currentTarget,\n          listener = _dispatchListeners$i.listener;\n\n      if (instance !== previousInstance && event.isPropagationStopped()) {\n        return;\n      }\n\n      executeDispatch(event, listener, currentTarget);\n      previousInstance = instance;\n    }\n  } else {\n    for (var _i = 0; _i < dispatchListeners.length; _i++) {\n      var _dispatchListeners$_i = dispatchListeners[_i],\n          _instance = _dispatchListeners$_i.instance,\n          _currentTarget = _dispatchListeners$_i.currentTarget,\n          _listener = _dispatchListeners$_i.listener;\n\n      if (_instance !== previousInstance && event.isPropagationStopped()) {\n        return;\n      }\n\n      executeDispatch(event, _listener, _currentTarget);\n      previousInstance = _instance;\n    }\n  }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n  for (var i = 0; i < dispatchQueue.length; i++) {\n    var _dispatchQueue$i = dispatchQueue[i],\n        event = _dispatchQueue$i.event,\n        listeners = _dispatchQueue$i.listeners;\n    processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); //  event system doesn't use pooling.\n  } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n  rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n  var nativeEventTarget = getEventTarget(nativeEvent);\n  var dispatchQueue = [];\n  extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n  processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n  {\n    if (!nonDelegatedEvents.has(domEventName)) {\n      error('Did not expect a listenToNonDelegatedEvent() call for \"%s\". ' + 'This is a bug in React. Please file an issue.', domEventName);\n    }\n  }\n\n  var isCapturePhaseListener = false;\n  var listenerSet = getEventListenerSet(targetElement);\n  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n  if (!listenerSet.has(listenerSetKey)) {\n    addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n    listenerSet.add(listenerSetKey);\n  }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n  {\n    if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {\n      error('Did not expect a listenToNativeEvent() call for \"%s\" in the bubble phase. ' + 'This is a bug in React. Please file an issue.', domEventName);\n    }\n  }\n\n  var eventSystemFlags = 0;\n\n  if (isCapturePhaseListener) {\n    eventSystemFlags |= IS_CAPTURE_PHASE;\n  }\n\n  addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n} // This is only used by createEventHandle when the\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n  if (!rootContainerElement[listeningMarker]) {\n    rootContainerElement[listeningMarker] = true;\n    allNativeEvents.forEach(function (domEventName) {\n      // We handle selectionchange separately because it\n      // doesn't bubble and needs to be on the document.\n      if (domEventName !== 'selectionchange') {\n        if (!nonDelegatedEvents.has(domEventName)) {\n          listenToNativeEvent(domEventName, false, rootContainerElement);\n        }\n\n        listenToNativeEvent(domEventName, true, rootContainerElement);\n      }\n    });\n    var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n\n    if (ownerDocument !== null) {\n      // The selectionchange event also needs deduplication\n      // but it is attached to the document.\n      if (!ownerDocument[listeningMarker]) {\n        ownerDocument[listeningMarker] = true;\n        listenToNativeEvent('selectionchange', false, ownerDocument);\n      }\n    }\n  }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n  var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n  // active and not passive.\n\n  var isPassiveListener = undefined;\n\n  if (passiveBrowserEventsSupported) {\n    // Browsers introduced an intervention, making these events\n    // passive by default on document. React doesn't bind them\n    // to document anymore, but changing this now would undo\n    // the performance wins from the change. So we emulate\n    // the existing behavior manually on the roots now.\n    // https://github.com/facebook/react/issues/19651\n    if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n      isPassiveListener = true;\n    }\n  }\n\n  targetContainer =  targetContainer;\n  var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n  if (isCapturePhaseListener) {\n    if (isPassiveListener !== undefined) {\n      unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n    } else {\n      unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n    }\n  } else {\n    if (isPassiveListener !== undefined) {\n      unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n    } else {\n      unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n    }\n  }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n  return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n  var ancestorInst = targetInst;\n\n  if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n    var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n    if (targetInst !== null) {\n      // The below logic attempts to work out if we need to change\n      // the target fiber to a different ancestor. We had similar logic\n      // in the legacy event system, except the big difference between\n      // systems is that the modern event system now has an event listener\n      // attached to each React Root and React Portal Root. Together,\n      // the DOM nodes representing these roots are the \"rootContainer\".\n      // To figure out which ancestor instance we should use, we traverse\n      // up the fiber tree from the target instance and attempt to find\n      // root boundaries that match that of our current \"rootContainer\".\n      // If we find that \"rootContainer\", we find the parent fiber\n      // sub-tree for that root and make that our ancestor instance.\n      var node = targetInst;\n\n      mainLoop: while (true) {\n        if (node === null) {\n          return;\n        }\n\n        var nodeTag = node.tag;\n\n        if (nodeTag === HostRoot || nodeTag === HostPortal) {\n          var container = node.stateNode.containerInfo;\n\n          if (isMatchingRootContainer(container, targetContainerNode)) {\n            break;\n          }\n\n          if (nodeTag === HostPortal) {\n            // The target is a portal, but it's not the rootContainer we're looking for.\n            // Normally portals handle their own events all the way down to the root.\n            // So we should be able to stop now. However, we don't know if this portal\n            // was part of *our* root.\n            var grandNode = node.return;\n\n            while (grandNode !== null) {\n              var grandTag = grandNode.tag;\n\n              if (grandTag === HostRoot || grandTag === HostPortal) {\n                var grandContainer = grandNode.stateNode.containerInfo;\n\n                if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n                  // This is the rootContainer we're looking for and we found it as\n                  // a parent of the Portal. That means we can ignore it because the\n                  // Portal will bubble through to us.\n                  return;\n                }\n              }\n\n              grandNode = grandNode.return;\n            }\n          } // Now we need to find it's corresponding host fiber in the other\n          // tree. To do this we can use getClosestInstanceFromNode, but we\n          // need to validate that the fiber is a host instance, otherwise\n          // we need to traverse up through the DOM till we find the correct\n          // node that is from the other tree.\n\n\n          while (container !== null) {\n            var parentNode = getClosestInstanceFromNode(container);\n\n            if (parentNode === null) {\n              return;\n            }\n\n            var parentTag = parentNode.tag;\n\n            if (parentTag === HostComponent || parentTag === HostText) {\n              node = ancestorInst = parentNode;\n              continue mainLoop;\n            }\n\n            container = container.parentNode;\n          }\n        }\n\n        node = node.return;\n      }\n    }\n  }\n\n  batchedUpdates(function () {\n    return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n  });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n  return {\n    instance: instance,\n    listener: listener,\n    currentTarget: currentTarget\n  };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {\n  var captureName = reactName !== null ? reactName + 'Capture' : null;\n  var reactEventName = inCapturePhase ? captureName : reactName;\n  var listeners = [];\n  var instance = targetFiber;\n  var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n  while (instance !== null) {\n    var _instance2 = instance,\n        stateNode = _instance2.stateNode,\n        tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n    if (tag === HostComponent && stateNode !== null) {\n      lastHostComponent = stateNode; // createEventHandle listeners\n\n\n      if (reactEventName !== null) {\n        var listener = getListener(instance, reactEventName);\n\n        if (listener != null) {\n          listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n        }\n      }\n    } // If we are only accumulating events for the target, then we don't\n    // continue to propagate through the React fiber tree to find other\n    // listeners.\n\n\n    if (accumulateTargetOnly) {\n      break;\n    } // If we are processing the onBeforeBlur event, then we need to take\n\n    instance = instance.return;\n  }\n\n  return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n  var captureName = reactName + 'Capture';\n  var listeners = [];\n  var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n  while (instance !== null) {\n    var _instance3 = instance,\n        stateNode = _instance3.stateNode,\n        tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n    if (tag === HostComponent && stateNode !== null) {\n      var currentTarget = stateNode;\n      var captureListener = getListener(instance, captureName);\n\n      if (captureListener != null) {\n        listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n      }\n\n      var bubbleListener = getListener(instance, reactName);\n\n      if (bubbleListener != null) {\n        listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n      }\n    }\n\n    instance = instance.return;\n  }\n\n  return listeners;\n}\n\nfunction getParent(inst) {\n  if (inst === null) {\n    return null;\n  }\n\n  do {\n    inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n    // That is depending on if we want nested subtrees (layers) to bubble\n    // events to their parent. We could also go through parentNode on the\n    // host node but that wouldn't work for React Native and doesn't let us\n    // do the portal feature.\n  } while (inst && inst.tag !== HostComponent);\n\n  if (inst) {\n    return inst;\n  }\n\n  return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n  var nodeA = instA;\n  var nodeB = instB;\n  var depthA = 0;\n\n  for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n    depthA++;\n  }\n\n  var depthB = 0;\n\n  for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n    depthB++;\n  } // If A is deeper, crawl up.\n\n\n  while (depthA - depthB > 0) {\n    nodeA = getParent(nodeA);\n    depthA--;\n  } // If B is deeper, crawl up.\n\n\n  while (depthB - depthA > 0) {\n    nodeB = getParent(nodeB);\n    depthB--;\n  } // Walk in lockstep until we find a match.\n\n\n  var depth = depthA;\n\n  while (depth--) {\n    if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n      return nodeA;\n    }\n\n    nodeA = getParent(nodeA);\n    nodeB = getParent(nodeB);\n  }\n\n  return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n  var registrationName = event._reactName;\n  var listeners = [];\n  var instance = target;\n\n  while (instance !== null) {\n    if (instance === common) {\n      break;\n    }\n\n    var _instance4 = instance,\n        alternate = _instance4.alternate,\n        stateNode = _instance4.stateNode,\n        tag = _instance4.tag;\n\n    if (alternate !== null && alternate === common) {\n      break;\n    }\n\n    if (tag === HostComponent && stateNode !== null) {\n      var currentTarget = stateNode;\n\n      if (inCapturePhase) {\n        var captureListener = getListener(instance, registrationName);\n\n        if (captureListener != null) {\n          listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n        }\n      } else if (!inCapturePhase) {\n        var bubbleListener = getListener(instance, registrationName);\n\n        if (bubbleListener != null) {\n          listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n        }\n      }\n    }\n\n    instance = instance.return;\n  }\n\n  if (listeners.length !== 0) {\n    dispatchQueue.push({\n      event: event,\n      listeners: listeners\n    });\n  }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n  var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n  if (from !== null) {\n    accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n  }\n\n  if (to !== null && enterEvent !== null) {\n    accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n  }\n}\nfunction getListenerSetKey(domEventName, capture) {\n  return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar warnedUnknownTags;\nvar validatePropertiesInDevelopment;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeHTML;\n\n{\n  warnedUnknownTags = {\n    // There are working polyfills for <dialog>. Let people use it.\n    dialog: true,\n    // Electron ships a custom <webview> tag to display external web content in\n    // an isolated frame and process.\n    // This tag is not present in non Electron environments such as JSDom which\n    // is often used for testing purposes.\n    // @see https://electronjs.org/docs/api/webview-tag\n    webview: true\n  };\n\n  validatePropertiesInDevelopment = function (type, props) {\n    validateProperties(type, props);\n    validateProperties$1(type, props);\n    validateProperties$2(type, props, {\n      registrationNameDependencies: registrationNameDependencies,\n      possibleRegistrationNames: possibleRegistrationNames\n    });\n  }; // IE 11 parses & normalizes the style attribute as opposed to other\n  // browsers. It adds spaces and sorts the properties in some\n  // non-alphabetical order. Handling that would require sorting CSS\n  // properties in the client & server versions or applying\n  // `expectedStyle` to a temporary DOM node to read its `style` attribute\n  // normalized. Since it only affects IE, we're skipping style warnings\n  // in that browser completely in favor of doing all that work.\n  // See https://github.com/facebook/react/issues/11807\n\n\n  canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;\n\n  warnForPropDifference = function (propName, serverValue, clientValue) {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n    var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n    if (normalizedServerValue === normalizedClientValue) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n  };\n\n  warnForExtraAttributes = function (attributeNames) {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n    var names = [];\n    attributeNames.forEach(function (name) {\n      names.push(name);\n    });\n\n    error('Extra attributes from the server: %s', names);\n  };\n\n  warnForInvalidEventListener = function (registrationName, listener) {\n    if (listener === false) {\n      error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n    } else {\n      error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n    }\n  }; // Parse the HTML and read it back to normalize the HTML string so that it\n  // can be used for comparison.\n\n\n  normalizeHTML = function (parent, html) {\n    // We could have created a separate document here to avoid\n    // re-initializing custom elements if they exist. But this breaks\n    // how <noscript> is being handled. So we use the same document.\n    // See the discussion in https://github.com/facebook/react/pull/11157.\n    var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n    testElement.innerHTML = html;\n    return testElement.innerHTML;\n  };\n} // HTML parsing normalizes CR and CRLF to LF.\n// It also can turn \\u0000 into \\uFFFD inside attributes.\n// https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n// If we have a mismatch, it might be caused by that.\n// We will still patch up in this case but not fire the warning.\n\n\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\nvar NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\nfunction normalizeMarkupForTextOrAttribute(markup) {\n  {\n    checkHtmlStringCoercion(markup);\n  }\n\n  var markupString = typeof markup === 'string' ? markup : '' + markup;\n  return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n}\n\nfunction checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {\n  var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n  var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n  if (normalizedServerText === normalizedClientText) {\n    return;\n  }\n\n  if (shouldWarnDev) {\n    {\n      if (!didWarnInvalidHydration) {\n        didWarnInvalidHydration = true;\n\n        error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n      }\n    }\n  }\n\n  if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {\n    // In concurrent roots, we throw when there's a text mismatch and revert to\n    // client rendering, up to the nearest Suspense boundary.\n    throw new Error('Text content does not match server-rendered HTML.');\n  }\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n  return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n  // Mobile Safari does not fire properly bubble click events on\n  // non-interactive elements, which means delegated click listeners do not\n  // fire. The workaround for this bug involves attaching an empty click\n  // listener on the target node.\n  // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n  // Just set it using the onclick property so that we don't have to manage any\n  // bookkeeping for it. Not sure if we need to clear it when the listener is\n  // removed.\n  // TODO: Only do this for the relevant Safaris maybe?\n  node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n  for (var propKey in nextProps) {\n    if (!nextProps.hasOwnProperty(propKey)) {\n      continue;\n    }\n\n    var nextProp = nextProps[propKey];\n\n    if (propKey === STYLE) {\n      {\n        if (nextProp) {\n          // Freeze the next style object so that we can assume it won't be\n          // mutated. We have already warned for this in the past.\n          Object.freeze(nextProp);\n        }\n      } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n      setValueForStyles(domElement, nextProp);\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n      if (nextHtml != null) {\n        setInnerHTML(domElement, nextHtml);\n      }\n    } else if (propKey === CHILDREN) {\n      if (typeof nextProp === 'string') {\n        // Avoid setting initial textContent when the text is empty. In IE11 setting\n        // textContent on a <textarea> will cause the placeholder to not\n        // show within the <textarea> until it has been focused and blurred again.\n        // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n        var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n        if (canSetTextContent) {\n          setTextContent(domElement, nextProp);\n        }\n      } else if (typeof nextProp === 'number') {\n        setTextContent(domElement, '' + nextProp);\n      }\n    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n    } else if (nextProp != null) {\n      setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n    }\n  }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n  // TODO: Handle wasCustomComponentTag\n  for (var i = 0; i < updatePayload.length; i += 2) {\n    var propKey = updatePayload[i];\n    var propValue = updatePayload[i + 1];\n\n    if (propKey === STYLE) {\n      setValueForStyles(domElement, propValue);\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      setInnerHTML(domElement, propValue);\n    } else if (propKey === CHILDREN) {\n      setTextContent(domElement, propValue);\n    } else {\n      setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n    }\n  }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n  var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n  // tags get no namespace.\n\n  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n  var domElement;\n  var namespaceURI = parentNamespace;\n\n  if (namespaceURI === HTML_NAMESPACE) {\n    namespaceURI = getIntrinsicNamespace(type);\n  }\n\n  if (namespaceURI === HTML_NAMESPACE) {\n    {\n      isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n      // allow <SVG> or <mATH>.\n\n      if (!isCustomComponentTag && type !== type.toLowerCase()) {\n        error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n      }\n    }\n\n    if (type === 'script') {\n      // Create the script via .innerHTML so its \"parser-inserted\" flag is\n      // set to true and it does not execute\n      var div = ownerDocument.createElement('div');\n\n      div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n      // This is guaranteed to yield a script element.\n\n      var firstChild = div.firstChild;\n      domElement = div.removeChild(firstChild);\n    } else if (typeof props.is === 'string') {\n      // $FlowIssue `createElement` should be updated for Web Components\n      domElement = ownerDocument.createElement(type, {\n        is: props.is\n      });\n    } else {\n      // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n      // See discussion in https://github.com/facebook/react/pull/6896\n      // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n      domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n      // attributes on `select`s needs to be added before `option`s are inserted.\n      // This prevents:\n      // - a bug where the `select` does not scroll to the correct option because singular\n      //  `select` elements automatically pick the first item #13222\n      // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n      // See https://github.com/facebook/react/issues/13222\n      // and https://github.com/facebook/react/issues/14239\n\n      if (type === 'select') {\n        var node = domElement;\n\n        if (props.multiple) {\n          node.multiple = true;\n        } else if (props.size) {\n          // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n          // it is possible that no option is selected.\n          //\n          // This is only necessary when a select in \"single selection mode\".\n          node.size = props.size;\n        }\n      }\n    }\n  } else {\n    domElement = ownerDocument.createElementNS(namespaceURI, type);\n  }\n\n  {\n    if (namespaceURI === HTML_NAMESPACE) {\n      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !hasOwnProperty.call(warnedUnknownTags, type)) {\n        warnedUnknownTags[type] = true;\n\n        error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n      }\n    }\n  }\n\n  return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n  return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n  var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n  {\n    validatePropertiesInDevelopment(tag, rawProps);\n  } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n  var props;\n\n  switch (tag) {\n    case 'dialog':\n      listenToNonDelegatedEvent('cancel', domElement);\n      listenToNonDelegatedEvent('close', domElement);\n      props = rawProps;\n      break;\n\n    case 'iframe':\n    case 'object':\n    case 'embed':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the load event.\n      listenToNonDelegatedEvent('load', domElement);\n      props = rawProps;\n      break;\n\n    case 'video':\n    case 'audio':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for all the media events.\n      for (var i = 0; i < mediaEventTypes.length; i++) {\n        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n      }\n\n      props = rawProps;\n      break;\n\n    case 'source':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the error event.\n      listenToNonDelegatedEvent('error', domElement);\n      props = rawProps;\n      break;\n\n    case 'img':\n    case 'image':\n    case 'link':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for error and load events.\n      listenToNonDelegatedEvent('error', domElement);\n      listenToNonDelegatedEvent('load', domElement);\n      props = rawProps;\n      break;\n\n    case 'details':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the toggle event.\n      listenToNonDelegatedEvent('toggle', domElement);\n      props = rawProps;\n      break;\n\n    case 'input':\n      initWrapperState(domElement, rawProps);\n      props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'option':\n      validateProps(domElement, rawProps);\n      props = rawProps;\n      break;\n\n    case 'select':\n      initWrapperState$1(domElement, rawProps);\n      props = getHostProps$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'textarea':\n      initWrapperState$2(domElement, rawProps);\n      props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    default:\n      props = rawProps;\n  }\n\n  assertValidProps(tag, props);\n  setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n  switch (tag) {\n    case 'input':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper(domElement, rawProps, false);\n      break;\n\n    case 'textarea':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper$3(domElement);\n      break;\n\n    case 'option':\n      postMountWrapper$1(domElement, rawProps);\n      break;\n\n    case 'select':\n      postMountWrapper$2(domElement, rawProps);\n      break;\n\n    default:\n      if (typeof props.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n  {\n    validatePropertiesInDevelopment(tag, nextRawProps);\n  }\n\n  var updatePayload = null;\n  var lastProps;\n  var nextProps;\n\n  switch (tag) {\n    case 'input':\n      lastProps = getHostProps(domElement, lastRawProps);\n      nextProps = getHostProps(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    case 'select':\n      lastProps = getHostProps$1(domElement, lastRawProps);\n      nextProps = getHostProps$1(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    case 'textarea':\n      lastProps = getHostProps$2(domElement, lastRawProps);\n      nextProps = getHostProps$2(domElement, nextRawProps);\n      updatePayload = [];\n      break;\n\n    default:\n      lastProps = lastRawProps;\n      nextProps = nextRawProps;\n\n      if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n\n  assertValidProps(tag, nextProps);\n  var propKey;\n  var styleName;\n  var styleUpdates = null;\n\n  for (propKey in lastProps) {\n    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n      continue;\n    }\n\n    if (propKey === STYLE) {\n      var lastStyle = lastProps[propKey];\n\n      for (styleName in lastStyle) {\n        if (lastStyle.hasOwnProperty(styleName)) {\n          if (!styleUpdates) {\n            styleUpdates = {};\n          }\n\n          styleUpdates[styleName] = '';\n        }\n      }\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      // This is a special case. If any listener updates we need to ensure\n      // that the \"current\" fiber pointer gets updated so we need a commit\n      // to update this element.\n      if (!updatePayload) {\n        updatePayload = [];\n      }\n    } else {\n      // For all other deleted properties we add it to the queue. We use\n      // the allowed property list in the commit phase instead.\n      (updatePayload = updatePayload || []).push(propKey, null);\n    }\n  }\n\n  for (propKey in nextProps) {\n    var nextProp = nextProps[propKey];\n    var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n    if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n      continue;\n    }\n\n    if (propKey === STYLE) {\n      {\n        if (nextProp) {\n          // Freeze the next style object so that we can assume it won't be\n          // mutated. We have already warned for this in the past.\n          Object.freeze(nextProp);\n        }\n      }\n\n      if (lastProp) {\n        // Unset styles on `lastProp` but not on `nextProp`.\n        for (styleName in lastProp) {\n          if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n            if (!styleUpdates) {\n              styleUpdates = {};\n            }\n\n            styleUpdates[styleName] = '';\n          }\n        } // Update styles that changed since `lastProp`.\n\n\n        for (styleName in nextProp) {\n          if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n            if (!styleUpdates) {\n              styleUpdates = {};\n            }\n\n            styleUpdates[styleName] = nextProp[styleName];\n          }\n        }\n      } else {\n        // Relies on `updateStylesByID` not mutating `styleUpdates`.\n        if (!styleUpdates) {\n          if (!updatePayload) {\n            updatePayload = [];\n          }\n\n          updatePayload.push(propKey, styleUpdates);\n        }\n\n        styleUpdates = nextProp;\n      }\n    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n      var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n      if (nextHtml != null) {\n        if (lastHtml !== nextHtml) {\n          (updatePayload = updatePayload || []).push(propKey, nextHtml);\n        }\n      }\n    } else if (propKey === CHILDREN) {\n      if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n      }\n    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        // We eagerly listen to this even though we haven't committed yet.\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n\n      if (!updatePayload && lastProp !== nextProp) {\n        // This is a special case. If any listener updates we need to ensure\n        // that the \"current\" props pointer gets updated so we need a commit\n        // to update this element.\n        updatePayload = [];\n      }\n    } else {\n      // For any other property we always add it to the queue and then we\n      // filter it out using the allowed property list during the commit.\n      (updatePayload = updatePayload || []).push(propKey, nextProp);\n    }\n  }\n\n  if (styleUpdates) {\n    {\n      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n    }\n\n    (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n  }\n\n  return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n  // Update checked *before* name.\n  // In the middle of an update, it is possible to have multiple checked.\n  // When a checked radio tries to change name, browser makes another radio's checked false.\n  if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n    updateChecked(domElement, nextRawProps);\n  }\n\n  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n  var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n  updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n  // changed.\n\n  switch (tag) {\n    case 'input':\n      // Update the wrapper around inputs *after* updating props. This has to\n      // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n      // raise warnings and prevent the new value from being assigned.\n      updateWrapper(domElement, nextRawProps);\n      break;\n\n    case 'textarea':\n      updateWrapper$1(domElement, nextRawProps);\n      break;\n\n    case 'select':\n      // <select> value update needs to occur after <option> children\n      // reconciliation\n      postUpdateWrapper(domElement, nextRawProps);\n      break;\n  }\n}\n\nfunction getPossibleStandardName(propName) {\n  {\n    var lowerCasedName = propName.toLowerCase();\n\n    if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n      return null;\n    }\n\n    return possibleStandardNames[lowerCasedName] || null;\n  }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {\n  var isCustomComponentTag;\n  var extraAttributeNames;\n\n  {\n    isCustomComponentTag = isCustomComponent(tag, rawProps);\n    validatePropertiesInDevelopment(tag, rawProps);\n  } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n  switch (tag) {\n    case 'dialog':\n      listenToNonDelegatedEvent('cancel', domElement);\n      listenToNonDelegatedEvent('close', domElement);\n      break;\n\n    case 'iframe':\n    case 'object':\n    case 'embed':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the load event.\n      listenToNonDelegatedEvent('load', domElement);\n      break;\n\n    case 'video':\n    case 'audio':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for all the media events.\n      for (var i = 0; i < mediaEventTypes.length; i++) {\n        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n      }\n\n      break;\n\n    case 'source':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the error event.\n      listenToNonDelegatedEvent('error', domElement);\n      break;\n\n    case 'img':\n    case 'image':\n    case 'link':\n      // We listen to these events in case to ensure emulated bubble\n      // listeners still fire for error and load events.\n      listenToNonDelegatedEvent('error', domElement);\n      listenToNonDelegatedEvent('load', domElement);\n      break;\n\n    case 'details':\n      // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the toggle event.\n      listenToNonDelegatedEvent('toggle', domElement);\n      break;\n\n    case 'input':\n      initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'option':\n      validateProps(domElement, rawProps);\n      break;\n\n    case 'select':\n      initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n\n    case 'textarea':\n      initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n      // listeners still fire for the invalid event.\n\n      listenToNonDelegatedEvent('invalid', domElement);\n      break;\n  }\n\n  assertValidProps(tag, rawProps);\n\n  {\n    extraAttributeNames = new Set();\n    var attributes = domElement.attributes;\n\n    for (var _i = 0; _i < attributes.length; _i++) {\n      var name = attributes[_i].name.toLowerCase();\n\n      switch (name) {\n        // Controlled attributes are not validated\n        // TODO: Only ignore them on controlled tags.\n        case 'value':\n          break;\n\n        case 'checked':\n          break;\n\n        case 'selected':\n          break;\n\n        default:\n          // Intentionally use the original name.\n          // See discussion in https://github.com/facebook/react/pull/10676.\n          extraAttributeNames.add(attributes[_i].name);\n      }\n    }\n  }\n\n  var updatePayload = null;\n\n  for (var propKey in rawProps) {\n    if (!rawProps.hasOwnProperty(propKey)) {\n      continue;\n    }\n\n    var nextProp = rawProps[propKey];\n\n    if (propKey === CHILDREN) {\n      // For text content children we compare against textContent. This\n      // might match additional HTML that is hidden when we read it using\n      // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n      // satisfies our requirement. Our requirement is not to produce perfect\n      // HTML and attributes. Ideally we should preserve structure but it's\n      // ok not to if the visible content is still enough to indicate what\n      // even listeners these nodes might be wired up to.\n      // TODO: Warn if there is more than a single textNode as a child.\n      // TODO: Should we use domElement.firstChild.nodeValue to compare?\n      if (typeof nextProp === 'string') {\n        if (domElement.textContent !== nextProp) {\n          if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n            checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n          }\n\n          updatePayload = [CHILDREN, nextProp];\n        }\n      } else if (typeof nextProp === 'number') {\n        if (domElement.textContent !== '' + nextProp) {\n          if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n            checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);\n          }\n\n          updatePayload = [CHILDREN, '' + nextProp];\n        }\n      }\n    } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n      if (nextProp != null) {\n        if ( typeof nextProp !== 'function') {\n          warnForInvalidEventListener(propKey, nextProp);\n        }\n\n        if (propKey === 'onScroll') {\n          listenToNonDelegatedEvent('scroll', domElement);\n        }\n      }\n    } else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)\n    typeof isCustomComponentTag === 'boolean') {\n      // Validate that the properties correspond to their expected values.\n      var serverValue = void 0;\n      var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);\n\n      if (rawProps[SUPPRESS_HYDRATION_WARNING] === true) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n      // TODO: Only ignore them on controlled tags.\n      propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n        var serverHTML = domElement.innerHTML;\n        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n        if (nextHtml != null) {\n          var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n          if (expectedHTML !== serverHTML) {\n            warnForPropDifference(propKey, serverHTML, expectedHTML);\n          }\n        }\n      } else if (propKey === STYLE) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        extraAttributeNames.delete(propKey);\n\n        if (canDiffStyleForHydrationWarning) {\n          var expectedStyle = createDangerousStringForStyles(nextProp);\n          serverValue = domElement.getAttribute('style');\n\n          if (expectedStyle !== serverValue) {\n            warnForPropDifference(propKey, serverValue, expectedStyle);\n          }\n        }\n      } else if (isCustomComponentTag && !enableCustomElementPropertySupport) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        extraAttributeNames.delete(propKey.toLowerCase());\n        serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n        if (nextProp !== serverValue) {\n          warnForPropDifference(propKey, serverValue, nextProp);\n        }\n      } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n        var isMismatchDueToBadCasing = false;\n\n        if (propertyInfo !== null) {\n          // $FlowFixMe - Should be inferred as not undefined.\n          extraAttributeNames.delete(propertyInfo.attributeName);\n          serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n        } else {\n          var ownNamespace = parentNamespace;\n\n          if (ownNamespace === HTML_NAMESPACE) {\n            ownNamespace = getIntrinsicNamespace(tag);\n          }\n\n          if (ownNamespace === HTML_NAMESPACE) {\n            // $FlowFixMe - Should be inferred as not undefined.\n            extraAttributeNames.delete(propKey.toLowerCase());\n          } else {\n            var standardName = getPossibleStandardName(propKey);\n\n            if (standardName !== null && standardName !== propKey) {\n              // If an SVG prop is supplied with bad casing, it will\n              // be successfully parsed from HTML, but will produce a mismatch\n              // (and would be incorrectly rendered on the client).\n              // However, we already warn about bad casing elsewhere.\n              // So we'll skip the misleading extra mismatch warning in this case.\n              isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n              extraAttributeNames.delete(standardName);\n            } // $FlowFixMe - Should be inferred as not undefined.\n\n\n            extraAttributeNames.delete(propKey);\n          }\n\n          serverValue = getValueForAttribute(domElement, propKey, nextProp);\n        }\n\n        var dontWarnCustomElement = enableCustomElementPropertySupport  ;\n\n        if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {\n          warnForPropDifference(propKey, serverValue, nextProp);\n        }\n      }\n    }\n  }\n\n  {\n    if (shouldWarnDev) {\n      if ( // $FlowFixMe - Should be inferred as not undefined.\n      extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {\n        // $FlowFixMe - Should be inferred as not undefined.\n        warnForExtraAttributes(extraAttributeNames);\n      }\n    }\n  }\n\n  switch (tag) {\n    case 'input':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper(domElement, rawProps, true);\n      break;\n\n    case 'textarea':\n      // TODO: Make sure we check if this is still unmounted or do any clean\n      // up necessary since we never stop tracking anymore.\n      track(domElement);\n      postMountWrapper$3(domElement);\n      break;\n\n    case 'select':\n    case 'option':\n      // For input and textarea we current always set the value property at\n      // post mount to force it to diverge from attributes. However, for\n      // option and select we don't quite do the same thing and select\n      // is not resilient to the DOM state changing so we don't do that here.\n      // TODO: Consider not doing this for input and textarea.\n      break;\n\n    default:\n      if (typeof rawProps.onClick === 'function') {\n        // TODO: This cast may not be sound for SVG, MathML or custom elements.\n        trapClickOnNonInteractiveElement(domElement);\n      }\n\n      break;\n  }\n\n  return updatePayload;\n}\nfunction diffHydratedText(textNode, text, isConcurrentMode) {\n  var isDifferent = textNode.nodeValue !== text;\n  return isDifferent;\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n  {\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n  {\n    if (text === '') {\n      // We expect to insert empty text nodes since they're not represented in\n      // the HTML.\n      // TODO: Remove this special case if we can just avoid inserting empty\n      // text nodes.\n      return;\n    }\n\n    if (didWarnInvalidHydration) {\n      return;\n    }\n\n    didWarnInvalidHydration = true;\n\n    error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n  }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n  switch (tag) {\n    case 'input':\n      restoreControlledState(domElement, props);\n      return;\n\n    case 'textarea':\n      restoreControlledState$2(domElement, props);\n      return;\n\n    case 'select':\n      restoreControlledState$1(domElement, props);\n      return;\n  }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n  // This validation code was written based on the HTML5 parsing spec:\n  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n  //\n  // Note: this does not catch all invalid nesting, nor does it try to (as it's\n  // not clear what practical benefit doing so provides); instead, we warn only\n  // for cases where the parser will give a parse tree differing from what React\n  // intended. For example, <b><div></div></b> is invalid but we don't warn\n  // because it still parses correctly; we do warn for other cases like nested\n  // <p> tags where the beginning of the second element implicitly closes the\n  // first, causing a confusing mess.\n  // https://html.spec.whatwg.org/multipage/syntax.html#special\n  var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n  var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n  // TODO: Distinguish by namespace here -- for <title>, including it here\n  // errs on the side of fewer warnings\n  'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n  var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n  var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n  var emptyAncestorInfo = {\n    current: null,\n    formTag: null,\n    aTagInScope: null,\n    buttonTagInScope: null,\n    nobrTagInScope: null,\n    pTagInButtonScope: null,\n    listItemTagAutoclosing: null,\n    dlItemTagAutoclosing: null\n  };\n\n  updatedAncestorInfo = function (oldInfo, tag) {\n    var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);\n\n    var info = {\n      tag: tag\n    };\n\n    if (inScopeTags.indexOf(tag) !== -1) {\n      ancestorInfo.aTagInScope = null;\n      ancestorInfo.buttonTagInScope = null;\n      ancestorInfo.nobrTagInScope = null;\n    }\n\n    if (buttonScopeTags.indexOf(tag) !== -1) {\n      ancestorInfo.pTagInButtonScope = null;\n    } // See rules for 'li', 'dd', 'dt' start tags in\n    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n    if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n      ancestorInfo.listItemTagAutoclosing = null;\n      ancestorInfo.dlItemTagAutoclosing = null;\n    }\n\n    ancestorInfo.current = info;\n\n    if (tag === 'form') {\n      ancestorInfo.formTag = info;\n    }\n\n    if (tag === 'a') {\n      ancestorInfo.aTagInScope = info;\n    }\n\n    if (tag === 'button') {\n      ancestorInfo.buttonTagInScope = info;\n    }\n\n    if (tag === 'nobr') {\n      ancestorInfo.nobrTagInScope = info;\n    }\n\n    if (tag === 'p') {\n      ancestorInfo.pTagInButtonScope = info;\n    }\n\n    if (tag === 'li') {\n      ancestorInfo.listItemTagAutoclosing = info;\n    }\n\n    if (tag === 'dd' || tag === 'dt') {\n      ancestorInfo.dlItemTagAutoclosing = info;\n    }\n\n    return ancestorInfo;\n  };\n  /**\n   * Returns whether\n   */\n\n\n  var isTagValidWithParent = function (tag, parentTag) {\n    // First, let's check if we're in an unusual parsing mode...\n    switch (parentTag) {\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n      case 'select':\n        return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n      case 'optgroup':\n        return tag === 'option' || tag === '#text';\n      // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n      // but\n\n      case 'option':\n        return tag === '#text';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n      // No special behavior since these rules fall back to \"in body\" mode for\n      // all except special table nodes which cause bad parsing behavior anyway.\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n      case 'tr':\n        return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n      case 'tbody':\n      case 'thead':\n      case 'tfoot':\n        return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n      case 'colgroup':\n        return tag === 'col' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n      case 'table':\n        return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n      case 'head':\n        return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n      // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n      case 'html':\n        return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n      case 'frameset':\n        return tag === 'frame';\n\n      case '#document':\n        return tag === 'html';\n    } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n    // where the parsing rules cause implicit opens or closes to be added.\n    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n    switch (tag) {\n      case 'h1':\n      case 'h2':\n      case 'h3':\n      case 'h4':\n      case 'h5':\n      case 'h6':\n        return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n      case 'rp':\n      case 'rt':\n        return impliedEndTags.indexOf(parentTag) === -1;\n\n      case 'body':\n      case 'caption':\n      case 'col':\n      case 'colgroup':\n      case 'frameset':\n      case 'frame':\n      case 'head':\n      case 'html':\n      case 'tbody':\n      case 'td':\n      case 'tfoot':\n      case 'th':\n      case 'thead':\n      case 'tr':\n        // These tags are only valid with a few parents that have special child\n        // parsing rules -- if we're down here, then none of those matched and\n        // so we allow it only if we don't know what the parent is, as all other\n        // cases are invalid.\n        return parentTag == null;\n    }\n\n    return true;\n  };\n  /**\n   * Returns whether\n   */\n\n\n  var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n    switch (tag) {\n      case 'address':\n      case 'article':\n      case 'aside':\n      case 'blockquote':\n      case 'center':\n      case 'details':\n      case 'dialog':\n      case 'dir':\n      case 'div':\n      case 'dl':\n      case 'fieldset':\n      case 'figcaption':\n      case 'figure':\n      case 'footer':\n      case 'header':\n      case 'hgroup':\n      case 'main':\n      case 'menu':\n      case 'nav':\n      case 'ol':\n      case 'p':\n      case 'section':\n      case 'summary':\n      case 'ul':\n      case 'pre':\n      case 'listing':\n      case 'table':\n      case 'hr':\n      case 'xmp':\n      case 'h1':\n      case 'h2':\n      case 'h3':\n      case 'h4':\n      case 'h5':\n      case 'h6':\n        return ancestorInfo.pTagInButtonScope;\n\n      case 'form':\n        return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n      case 'li':\n        return ancestorInfo.listItemTagAutoclosing;\n\n      case 'dd':\n      case 'dt':\n        return ancestorInfo.dlItemTagAutoclosing;\n\n      case 'button':\n        return ancestorInfo.buttonTagInScope;\n\n      case 'a':\n        // Spec says something about storing a list of markers, but it sounds\n        // equivalent to this check.\n        return ancestorInfo.aTagInScope;\n\n      case 'nobr':\n        return ancestorInfo.nobrTagInScope;\n    }\n\n    return null;\n  };\n\n  var didWarn$1 = {};\n\n  validateDOMNesting = function (childTag, childText, ancestorInfo) {\n    ancestorInfo = ancestorInfo || emptyAncestorInfo;\n    var parentInfo = ancestorInfo.current;\n    var parentTag = parentInfo && parentInfo.tag;\n\n    if (childText != null) {\n      if (childTag != null) {\n        error('validateDOMNesting: when childText is passed, childTag should be null');\n      }\n\n      childTag = '#text';\n    }\n\n    var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n    var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n    var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n    if (!invalidParentOrAncestor) {\n      return;\n    }\n\n    var ancestorTag = invalidParentOrAncestor.tag;\n    var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n    if (didWarn$1[warnKey]) {\n      return;\n    }\n\n    didWarn$1[warnKey] = true;\n    var tagDisplayName = childTag;\n    var whitespaceInfo = '';\n\n    if (childTag === '#text') {\n      if (/\\S/.test(childText)) {\n        tagDisplayName = 'Text nodes';\n      } else {\n        tagDisplayName = 'Whitespace text nodes';\n        whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n      }\n    } else {\n      tagDisplayName = '<' + childTag + '>';\n    }\n\n    if (invalidParent) {\n      var info = '';\n\n      if (ancestorTag === 'table' && childTag === 'tr') {\n        info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n      }\n\n      error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n    } else {\n      error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n    }\n  };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\nfunction getRootHostContext(rootContainerInstance) {\n  var type;\n  var namespace;\n  var nodeType = rootContainerInstance.nodeType;\n\n  switch (nodeType) {\n    case DOCUMENT_NODE:\n    case DOCUMENT_FRAGMENT_NODE:\n      {\n        type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n        var root = rootContainerInstance.documentElement;\n        namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n        break;\n      }\n\n    default:\n      {\n        var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n        var ownNamespace = container.namespaceURI || null;\n        type = container.tagName;\n        namespace = getChildNamespace(ownNamespace, type);\n        break;\n      }\n  }\n\n  {\n    var validatedTag = type.toLowerCase();\n    var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n    return {\n      namespace: namespace,\n      ancestorInfo: ancestorInfo\n    };\n  }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n  {\n    var parentHostContextDev = parentHostContext;\n    var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n    var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n    return {\n      namespace: namespace,\n      ancestorInfo: ancestorInfo\n    };\n  }\n}\nfunction getPublicInstance(instance) {\n  return instance;\n}\nfunction prepareForCommit(containerInfo) {\n  eventsEnabled = isEnabled();\n  selectionInformation = getSelectionInformation();\n  var activeInstance = null;\n\n  setEnabled(false);\n  return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n  restoreSelection(selectionInformation);\n  setEnabled(eventsEnabled);\n  eventsEnabled = null;\n  selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n  var parentNamespace;\n\n  {\n    // TODO: take namespace into account when validating.\n    var hostContextDev = hostContext;\n    validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n    if (typeof props.children === 'string' || typeof props.children === 'number') {\n      var string = '' + props.children;\n      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n      validateDOMNesting(null, string, ownAncestorInfo);\n    }\n\n    parentNamespace = hostContextDev.namespace;\n  }\n\n  var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n  precacheFiberNode(internalInstanceHandle, domElement);\n  updateFiberProps(domElement, props);\n  return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n  parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n  setInitialProperties(domElement, type, props, rootContainerInstance);\n\n  switch (type) {\n    case 'button':\n    case 'input':\n    case 'select':\n    case 'textarea':\n      return !!props.autoFocus;\n\n    case 'img':\n      return true;\n\n    default:\n      return false;\n  }\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n  {\n    var hostContextDev = hostContext;\n\n    if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n      var string = '' + newProps.children;\n      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n      validateDOMNesting(null, string, ownAncestorInfo);\n    }\n  }\n\n  return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n  return type === 'textarea' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n  {\n    var hostContextDev = hostContext;\n    validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n  }\n\n  var textNode = createTextNode(text, rootContainerInstance);\n  precacheFiberNode(internalInstanceHandle, textNode);\n  return textNode;\n}\nfunction getCurrentEventPriority() {\n  var currentEvent = window.event;\n\n  if (currentEvent === undefined) {\n    return DefaultEventPriority;\n  }\n\n  return getEventPriority(currentEvent.type);\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1;\nvar localPromise = typeof Promise === 'function' ? Promise : undefined; // -------------------\nvar scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : typeof localPromise !== 'undefined' ? function (callback) {\n  return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);\n} : scheduleTimeout; // TODO: Determine the best fallback here.\n\nfunction handleErrorInNextTick(error) {\n  setTimeout(function () {\n    throw error;\n  });\n} // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n  // Despite the naming that might imply otherwise, this method only\n  // fires if there is an `Update` effect scheduled during mounting.\n  // This happens if `finalizeInitialChildren` returns `true` (which it\n  // does to implement the `autoFocus` attribute on the client). But\n  // there are also other cases when this might happen (such as patching\n  // up text content during hydration mismatch). So we'll check this again.\n  switch (type) {\n    case 'button':\n    case 'input':\n    case 'select':\n    case 'textarea':\n      if (newProps.autoFocus) {\n        domElement.focus();\n      }\n\n      return;\n\n    case 'img':\n      {\n        if (newProps.src) {\n          domElement.src = newProps.src;\n        }\n\n        return;\n      }\n  }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n  // Apply the diff to the DOM node.\n  updateProperties(domElement, updatePayload, type, oldProps, newProps); // Update the props handle so that we know which props are the ones with\n  // with current event handlers.\n\n  updateFiberProps(domElement, newProps);\n}\nfunction resetTextContent(domElement) {\n  setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n  textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n  parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n  var parentNode;\n\n  if (container.nodeType === COMMENT_NODE) {\n    parentNode = container.parentNode;\n    parentNode.insertBefore(child, container);\n  } else {\n    parentNode = container;\n    parentNode.appendChild(child);\n  } // This container might be used for a portal.\n  // If something inside a portal is clicked, that click should bubble\n  // through the React tree. However, on Mobile Safari the click would\n  // never bubble through the *DOM* tree unless an ancestor with onclick\n  // event exists. So we wouldn't see it and dispatch it.\n  // This is why we ensure that non React root containers have inline onclick\n  // defined.\n  // https://github.com/facebook/react/issues/11918\n\n\n  var reactRootContainer = container._reactRootContainer;\n\n  if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n    // TODO: This cast may not be sound for SVG, MathML or custom elements.\n    trapClickOnNonInteractiveElement(parentNode);\n  }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n  parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n  if (container.nodeType === COMMENT_NODE) {\n    container.parentNode.insertBefore(child, beforeChild);\n  } else {\n    container.insertBefore(child, beforeChild);\n  }\n}\n\nfunction removeChild(parentInstance, child) {\n  parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n  if (container.nodeType === COMMENT_NODE) {\n    container.parentNode.removeChild(child);\n  } else {\n    container.removeChild(child);\n  }\n}\nfunction clearSuspenseBoundary(parentInstance, suspenseInstance) {\n  var node = suspenseInstance; // Delete all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  do {\n    var nextNode = node.nextSibling;\n    parentInstance.removeChild(node);\n\n    if (nextNode && nextNode.nodeType === COMMENT_NODE) {\n      var data = nextNode.data;\n\n      if (data === SUSPENSE_END_DATA) {\n        if (depth === 0) {\n          parentInstance.removeChild(nextNode); // Retry if any event replaying was blocked on this.\n\n          retryIfBlockedOn(suspenseInstance);\n          return;\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {\n        depth++;\n      }\n    }\n\n    node = nextNode;\n  } while (node); // TODO: Warn, we didn't find the end comment boundary.\n  // Retry if any event replaying was blocked on this.\n\n\n  retryIfBlockedOn(suspenseInstance);\n}\nfunction clearSuspenseBoundaryFromContainer(container, suspenseInstance) {\n  if (container.nodeType === COMMENT_NODE) {\n    clearSuspenseBoundary(container.parentNode, suspenseInstance);\n  } else if (container.nodeType === ELEMENT_NODE) {\n    clearSuspenseBoundary(container, suspenseInstance);\n  } // Retry if any event replaying was blocked on this.\n\n\n  retryIfBlockedOn(container);\n}\nfunction hideInstance(instance) {\n  // TODO: Does this work for all element types? What about MathML? Should we\n  // pass host context to this method?\n  instance = instance;\n  var style = instance.style;\n\n  if (typeof style.setProperty === 'function') {\n    style.setProperty('display', 'none', 'important');\n  } else {\n    style.display = 'none';\n  }\n}\nfunction hideTextInstance(textInstance) {\n  textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n  instance = instance;\n  var styleProp = props[STYLE$1];\n  var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n  instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n  textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n  if (container.nodeType === ELEMENT_NODE) {\n    container.textContent = '';\n  } else if (container.nodeType === DOCUMENT_NODE) {\n    if (container.documentElement) {\n      container.removeChild(container.documentElement);\n    }\n  }\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n  if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n    return null;\n  } // This has now been refined to an element node.\n\n\n  return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n  if (text === '' || instance.nodeType !== TEXT_NODE) {\n    // Empty strings are not parsed by HTML so there won't be a correct match here.\n    return null;\n  } // This has now been refined to a text node.\n\n\n  return instance;\n}\nfunction canHydrateSuspenseInstance(instance) {\n  if (instance.nodeType !== COMMENT_NODE) {\n    // Empty strings are not parsed by HTML so there won't be a correct match here.\n    return null;\n  } // This has now been refined to a suspense node.\n\n\n  return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n  return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n  return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\nfunction getSuspenseInstanceFallbackErrorDetails(instance) {\n  var dataset = instance.nextSibling && instance.nextSibling.dataset;\n  var digest, message, stack;\n\n  if (dataset) {\n    digest = dataset.dgst;\n\n    {\n      message = dataset.msg;\n      stack = dataset.stck;\n    }\n  }\n\n  {\n    return {\n      message: message,\n      digest: digest,\n      stack: stack\n    };\n  } // let value = {message: undefined, hash: undefined};\n  // const nextSibling = instance.nextSibling;\n  // if (nextSibling) {\n  //   const dataset = ((nextSibling: any): HTMLTemplateElement).dataset;\n  //   value.message = dataset.msg;\n  //   value.hash = dataset.hash;\n  //   if (true) {\n  //     value.stack = dataset.stack;\n  //   }\n  // }\n  // return value;\n\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n  instance._reactRetry = callback;\n}\n\nfunction getNextHydratable(node) {\n  // Skip non-hydratable nodes.\n  for (; node != null; node = node.nextSibling) {\n    var nodeType = node.nodeType;\n\n    if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n      break;\n    }\n\n    if (nodeType === COMMENT_NODE) {\n      var nodeData = node.data;\n\n      if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {\n        break;\n      }\n\n      if (nodeData === SUSPENSE_END_DATA) {\n        return null;\n      }\n    }\n  }\n\n  return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n  return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n  return getNextHydratable(parentInstance.firstChild);\n}\nfunction getFirstHydratableChildWithinContainer(parentContainer) {\n  return getNextHydratable(parentContainer.firstChild);\n}\nfunction getFirstHydratableChildWithinSuspenseInstance(parentInstance) {\n  return getNextHydratable(parentInstance.nextSibling);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {\n  precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n  // get attached.\n\n  updateFiberProps(instance, props);\n  var parentNamespace;\n\n  {\n    var hostContextDev = hostContext;\n    parentNamespace = hostContextDev.namespace;\n  } // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n  // when the legacy root API is removed.\n\n\n  var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n  return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {\n  precacheFiberNode(internalInstanceHandle, textInstance); // TODO: Temporary hack to check if we're in a concurrent root. We can delete\n  // when the legacy root API is removed.\n\n  var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;\n  return diffHydratedText(textInstance, text);\n}\nfunction hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {\n  precacheFiberNode(internalInstanceHandle, suspenseInstance);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n  var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  while (node) {\n    if (node.nodeType === COMMENT_NODE) {\n      var data = node.data;\n\n      if (data === SUSPENSE_END_DATA) {\n        if (depth === 0) {\n          return getNextHydratableSibling(node);\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n        depth++;\n      }\n    }\n\n    node = node.nextSibling;\n  } // TODO: Warn, we didn't find the end comment boundary.\n\n\n  return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n  var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n  // There might be nested nodes so we need to keep track of how\n  // deep we are and only break out when we're back on top.\n\n  var depth = 0;\n\n  while (node) {\n    if (node.nodeType === COMMENT_NODE) {\n      var data = node.data;\n\n      if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n        if (depth === 0) {\n          return node;\n        } else {\n          depth--;\n        }\n      } else if (data === SUSPENSE_END_DATA) {\n        depth++;\n      }\n    }\n\n    node = node.previousSibling;\n  }\n\n  return null;\n}\nfunction commitHydratedContainer(container) {\n  // Retry if any event replaying was blocked on this.\n  retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n  // Retry if any event replaying was blocked on this.\n  retryIfBlockedOn(suspenseInstance);\n}\nfunction shouldDeleteUnhydratedTailInstances(parentType) {\n  return parentType !== 'head' && parentType !== 'body';\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {\n  var shouldWarnDev = true;\n  checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {\n  if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n    var shouldWarnDev = true;\n    checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);\n  }\n}\nfunction didNotHydrateInstanceWithinContainer(parentContainer, instance) {\n  {\n    if (instance.nodeType === ELEMENT_NODE) {\n      warnForDeletedHydratableElement(parentContainer, instance);\n    } else if (instance.nodeType === COMMENT_NODE) ; else {\n      warnForDeletedHydratableText(parentContainer, instance);\n    }\n  }\n}\nfunction didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n\n    if (parentNode !== null) {\n      if (instance.nodeType === ELEMENT_NODE) {\n        warnForDeletedHydratableElement(parentNode, instance);\n      } else if (instance.nodeType === COMMENT_NODE) ; else {\n        warnForDeletedHydratableText(parentNode, instance);\n      }\n    }\n  }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      if (instance.nodeType === ELEMENT_NODE) {\n        warnForDeletedHydratableElement(parentInstance, instance);\n      } else if (instance.nodeType === COMMENT_NODE) ; else {\n        warnForDeletedHydratableText(parentInstance, instance);\n      }\n    }\n  }\n}\nfunction didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {\n  {\n    warnForInsertedHydratedElement(parentContainer, type);\n  }\n}\nfunction didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {\n  {\n    warnForInsertedHydratedText(parentContainer, text);\n  }\n}\nfunction didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n    if (parentNode !== null) warnForInsertedHydratedElement(parentNode, type);\n  }\n}\nfunction didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {\n  {\n    // $FlowFixMe: Only Element or Document can be parent nodes.\n    var parentNode = parentInstance.parentNode;\n    if (parentNode !== null) warnForInsertedHydratedText(parentNode, text);\n  }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      warnForInsertedHydratedElement(parentInstance, type);\n    }\n  }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {\n  {\n    if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n      warnForInsertedHydratedText(parentInstance, text);\n    }\n  }\n}\nfunction errorHydratingContainer(parentContainer) {\n  {\n    // TODO: This gets logged by onRecoverableError, too, so we should be\n    // able to remove it.\n    error('An error occurred during hydration. The server HTML was replaced with client content in <%s>.', parentContainer.nodeName.toLowerCase());\n  }\n}\nfunction preparePortalMount(portalInstance) {\n  listenToAllSupportedEvents(portalInstance);\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nvar internalEventHandlerListenersKey = '__reactListeners$' + randomKey;\nvar internalEventHandlesSetKey = '__reactHandles$' + randomKey;\nfunction detachDeletedInstance(node) {\n  // TODO: This function is only called on host components. I don't think all of\n  // these fields are relevant.\n  delete node[internalInstanceKey];\n  delete node[internalPropsKey];\n  delete node[internalEventHandlersKey];\n  delete node[internalEventHandlerListenersKey];\n  delete node[internalEventHandlesSetKey];\n}\nfunction precacheFiberNode(hostInst, node) {\n  node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n  node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n  node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n  return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n  var targetInst = targetNode[internalInstanceKey];\n\n  if (targetInst) {\n    // Don't return HostRoot or SuspenseComponent here.\n    return targetInst;\n  } // If the direct event target isn't a React owned DOM node, we need to look\n  // to see if one of its parents is a React owned DOM node.\n\n\n  var parentNode = targetNode.parentNode;\n\n  while (parentNode) {\n    // We'll check if this is a container root that could include\n    // React nodes in the future. We need to check this first because\n    // if we're a child of a dehydrated container, we need to first\n    // find that inner container before moving on to finding the parent\n    // instance. Note that we don't check this field on  the targetNode\n    // itself because the fibers are conceptually between the container\n    // node and the first child. It isn't surrounding the container node.\n    // If it's not a container, we check if it's an instance.\n    targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n    if (targetInst) {\n      // Since this wasn't the direct target of the event, we might have\n      // stepped past dehydrated DOM nodes to get here. However they could\n      // also have been non-React nodes. We need to answer which one.\n      // If we the instance doesn't have any children, then there can't be\n      // a nested suspense boundary within it. So we can use this as a fast\n      // bailout. Most of the time, when people add non-React children to\n      // the tree, it is using a ref to a child-less DOM node.\n      // Normally we'd only need to check one of the fibers because if it\n      // has ever gone from having children to deleting them or vice versa\n      // it would have deleted the dehydrated boundary nested inside already.\n      // However, since the HostRoot starts out with an alternate it might\n      // have one on the alternate so we need to check in case this was a\n      // root.\n      var alternate = targetInst.alternate;\n\n      if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n        // Next we need to figure out if the node that skipped past is\n        // nested within a dehydrated boundary and if so, which one.\n        var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n        while (suspenseInstance !== null) {\n          // We found a suspense instance. That means that we haven't\n          // hydrated it yet. Even though we leave the comments in the\n          // DOM after hydrating, and there are boundaries in the DOM\n          // that could already be hydrated, we wouldn't have found them\n          // through this pass since if the target is hydrated it would\n          // have had an internalInstanceKey on it.\n          // Let's get the fiber associated with the SuspenseComponent\n          // as the deepest instance.\n          var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n          if (targetSuspenseInst) {\n            return targetSuspenseInst;\n          } // If we don't find a Fiber on the comment, it might be because\n          // we haven't gotten to hydrate it yet. There might still be a\n          // parent boundary that hasn't above this one so we need to find\n          // the outer most that is known.\n\n\n          suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n          // host component also hasn't hydrated yet. We can return it\n          // below since it will bail out on the isMounted check later.\n        }\n      }\n\n      return targetInst;\n    }\n\n    targetNode = parentNode;\n    parentNode = targetNode.parentNode;\n  }\n\n  return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n  var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n  if (inst) {\n    if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n      return inst;\n    } else {\n      return null;\n    }\n  }\n\n  return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n  if (inst.tag === HostComponent || inst.tag === HostText) {\n    // In Fiber this, is just the state node right now. We assume it will be\n    // a host component or host text.\n    return inst.stateNode;\n  } // Without this first invariant, passing a non-DOM-component triggers the next\n  // invariant for a missing parent, which is super confusing.\n\n\n  throw new Error('getNodeFromInstance: Invalid argument.');\n}\nfunction getFiberCurrentPropsFromNode(node) {\n  return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n  node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n  var elementListenerSet = node[internalEventHandlersKey];\n\n  if (elementListenerSet === undefined) {\n    elementListenerSet = node[internalEventHandlersKey] = new Set();\n  }\n\n  return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n  fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n  return {\n    current: defaultValue\n  };\n}\n\nfunction pop(cursor, fiber) {\n  if (index < 0) {\n    {\n      error('Unexpected pop.');\n    }\n\n    return;\n  }\n\n  {\n    if (fiber !== fiberStack[index]) {\n      error('Unexpected Fiber popped.');\n    }\n  }\n\n  cursor.current = valueStack[index];\n  valueStack[index] = null;\n\n  {\n    fiberStack[index] = null;\n  }\n\n  index--;\n}\n\nfunction push(cursor, value, fiber) {\n  index++;\n  valueStack[index] = cursor.current;\n\n  {\n    fiberStack[index] = fiber;\n  }\n\n  cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n  warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n  Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n  {\n    if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n      // If the fiber is a context provider itself, when we read its context\n      // we may have already pushed its own child context on the stack. A context\n      // provider should not \"see\" its own child context. Therefore we read the\n      // previous (parent) context instead for a context provider.\n      return previousContext;\n    }\n\n    return contextStackCursor.current;\n  }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n  {\n    var instance = workInProgress.stateNode;\n    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n  }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n  {\n    var type = workInProgress.type;\n    var contextTypes = type.contextTypes;\n\n    if (!contextTypes) {\n      return emptyContextObject;\n    } // Avoid recreating masked context unless unmasked context has changed.\n    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n    // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n    var instance = workInProgress.stateNode;\n\n    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n      return instance.__reactInternalMemoizedMaskedChildContext;\n    }\n\n    var context = {};\n\n    for (var key in contextTypes) {\n      context[key] = unmaskedContext[key];\n    }\n\n    {\n      var name = getComponentNameFromFiber(workInProgress) || 'Unknown';\n      checkPropTypes(contextTypes, context, 'context', name);\n    } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n    // Context is created before the class component is instantiated so check for instance.\n\n\n    if (instance) {\n      cacheContext(workInProgress, unmaskedContext, context);\n    }\n\n    return context;\n  }\n}\n\nfunction hasContextChanged() {\n  {\n    return didPerformWorkStackCursor.current;\n  }\n}\n\nfunction isContextProvider(type) {\n  {\n    var childContextTypes = type.childContextTypes;\n    return childContextTypes !== null && childContextTypes !== undefined;\n  }\n}\n\nfunction popContext(fiber) {\n  {\n    pop(didPerformWorkStackCursor, fiber);\n    pop(contextStackCursor, fiber);\n  }\n}\n\nfunction popTopLevelContextObject(fiber) {\n  {\n    pop(didPerformWorkStackCursor, fiber);\n    pop(contextStackCursor, fiber);\n  }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n  {\n    if (contextStackCursor.current !== emptyContextObject) {\n      throw new Error('Unexpected context found on stack. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    push(contextStackCursor, context, fiber);\n    push(didPerformWorkStackCursor, didChange, fiber);\n  }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n  {\n    var instance = fiber.stateNode;\n    var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n    // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n    if (typeof instance.getChildContext !== 'function') {\n      {\n        var componentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n        if (!warnedAboutMissingGetChildContext[componentName]) {\n          warnedAboutMissingGetChildContext[componentName] = true;\n\n          error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n        }\n      }\n\n      return parentContext;\n    }\n\n    var childContext = instance.getChildContext();\n\n    for (var contextKey in childContext) {\n      if (!(contextKey in childContextTypes)) {\n        throw new Error((getComponentNameFromFiber(fiber) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\");\n      }\n    }\n\n    {\n      var name = getComponentNameFromFiber(fiber) || 'Unknown';\n      checkPropTypes(childContextTypes, childContext, 'child context', name);\n    }\n\n    return assign({}, parentContext, childContext);\n  }\n}\n\nfunction pushContextProvider(workInProgress) {\n  {\n    var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n    // If the instance does not exist yet, we will push null at first,\n    // and replace it on the stack later when invalidating the context.\n\n    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n    previousContext = contextStackCursor.current;\n    push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n    return true;\n  }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n  {\n    var instance = workInProgress.stateNode;\n\n    if (!instance) {\n      throw new Error('Expected to have an instance by this point. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    if (didChange) {\n      // Merge parent and own context.\n      // Skip this if we're not updating due to sCU.\n      // This avoids unnecessarily recomputing memoized values.\n      var mergedContext = processChildContext(workInProgress, type, previousContext);\n      instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n      // It is important to unwind the context in the reverse order.\n\n      pop(didPerformWorkStackCursor, workInProgress);\n      pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n      push(contextStackCursor, mergedContext, workInProgress);\n      push(didPerformWorkStackCursor, didChange, workInProgress);\n    } else {\n      pop(didPerformWorkStackCursor, workInProgress);\n      push(didPerformWorkStackCursor, didChange, workInProgress);\n    }\n  }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n  {\n    // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n    // makes sense elsewhere\n    if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {\n      throw new Error('Expected subtree parent to be a mounted class component. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    var node = fiber;\n\n    do {\n      switch (node.tag) {\n        case HostRoot:\n          return node.stateNode.context;\n\n        case ClassComponent:\n          {\n            var Component = node.type;\n\n            if (isContextProvider(Component)) {\n              return node.stateNode.__reactInternalMemoizedMergedChildContext;\n            }\n\n            break;\n          }\n      }\n\n      node = node.return;\n    } while (node !== null);\n\n    throw new Error('Found unexpected detached subtree parent. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n}\n\nvar LegacyRoot = 0;\nvar ConcurrentRoot = 1;\n\nvar syncQueue = null;\nvar includesLegacySyncCallbacks = false;\nvar isFlushingSyncQueue = false;\nfunction scheduleSyncCallback(callback) {\n  // Push this callback into an internal queue. We'll flush these either in\n  // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n  if (syncQueue === null) {\n    syncQueue = [callback];\n  } else {\n    // Push onto existing queue. Don't need to schedule a callback because\n    // we already scheduled one when we created the queue.\n    syncQueue.push(callback);\n  }\n}\nfunction scheduleLegacySyncCallback(callback) {\n  includesLegacySyncCallbacks = true;\n  scheduleSyncCallback(callback);\n}\nfunction flushSyncCallbacksOnlyInLegacyMode() {\n  // Only flushes the queue if there's a legacy sync callback scheduled.\n  // TODO: There's only a single type of callback: performSyncOnWorkOnRoot. So\n  // it might make more sense for the queue to be a list of roots instead of a\n  // list of generic callbacks. Then we can have two: one for legacy roots, one\n  // for concurrent roots. And this method would only flush the legacy ones.\n  if (includesLegacySyncCallbacks) {\n    flushSyncCallbacks();\n  }\n}\nfunction flushSyncCallbacks() {\n  if (!isFlushingSyncQueue && syncQueue !== null) {\n    // Prevent re-entrance.\n    isFlushingSyncQueue = true;\n    var i = 0;\n    var previousUpdatePriority = getCurrentUpdatePriority();\n\n    try {\n      var isSync = true;\n      var queue = syncQueue; // TODO: Is this necessary anymore? The only user code that runs in this\n      // queue is in the render or commit phases.\n\n      setCurrentUpdatePriority(DiscreteEventPriority);\n\n      for (; i < queue.length; i++) {\n        var callback = queue[i];\n\n        do {\n          callback = callback(isSync);\n        } while (callback !== null);\n      }\n\n      syncQueue = null;\n      includesLegacySyncCallbacks = false;\n    } catch (error) {\n      // If something throws, leave the remaining callbacks on the queue.\n      if (syncQueue !== null) {\n        syncQueue = syncQueue.slice(i + 1);\n      } // Resume flushing in the next tick\n\n\n      scheduleCallback(ImmediatePriority, flushSyncCallbacks);\n      throw error;\n    } finally {\n      setCurrentUpdatePriority(previousUpdatePriority);\n      isFlushingSyncQueue = false;\n    }\n  }\n\n  return null;\n}\n\n// TODO: Use the unified fiber stack module instead of this local one?\n// Intentionally not using it yet to derisk the initial implementation, because\n// the way we push/pop these values is a bit unusual. If there's a mistake, I'd\n// rather the ids be wrong than crash the whole reconciler.\nvar forkStack = [];\nvar forkStackIndex = 0;\nvar treeForkProvider = null;\nvar treeForkCount = 0;\nvar idStack = [];\nvar idStackIndex = 0;\nvar treeContextProvider = null;\nvar treeContextId = 1;\nvar treeContextOverflow = '';\nfunction isForkedChild(workInProgress) {\n  warnIfNotHydrating();\n  return (workInProgress.flags & Forked) !== NoFlags;\n}\nfunction getForksAtLevel(workInProgress) {\n  warnIfNotHydrating();\n  return treeForkCount;\n}\nfunction getTreeId() {\n  var overflow = treeContextOverflow;\n  var idWithLeadingBit = treeContextId;\n  var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);\n  return id.toString(32) + overflow;\n}\nfunction pushTreeFork(workInProgress, totalChildren) {\n  // This is called right after we reconcile an array (or iterator) of child\n  // fibers, because that's the only place where we know how many children in\n  // the whole set without doing extra work later, or storing addtional\n  // information on the fiber.\n  //\n  // That's why this function is separate from pushTreeId — it's called during\n  // the render phase of the fork parent, not the child, which is where we push\n  // the other context values.\n  //\n  // In the Fizz implementation this is much simpler because the child is\n  // rendered in the same callstack as the parent.\n  //\n  // It might be better to just add a `forks` field to the Fiber type. It would\n  // make this module simpler.\n  warnIfNotHydrating();\n  forkStack[forkStackIndex++] = treeForkCount;\n  forkStack[forkStackIndex++] = treeForkProvider;\n  treeForkProvider = workInProgress;\n  treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n  warnIfNotHydrating();\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextProvider = workInProgress;\n  var baseIdWithLeadingBit = treeContextId;\n  var baseOverflow = treeContextOverflow; // The leftmost 1 marks the end of the sequence, non-inclusive. It's not part\n  // of the id; we use it to account for leading 0s.\n\n  var baseLength = getBitLength(baseIdWithLeadingBit) - 1;\n  var baseId = baseIdWithLeadingBit & ~(1 << baseLength);\n  var slot = index + 1;\n  var length = getBitLength(totalChildren) + baseLength; // 30 is the max length we can store without overflowing, taking into\n  // consideration the leading 1 we use to mark the end of the sequence.\n\n  if (length > 30) {\n    // We overflowed the bitwise-safe range. Fall back to slower algorithm.\n    // This branch assumes the length of the base id is greater than 5; it won't\n    // work for smaller ids, because you need 5 bits per character.\n    //\n    // We encode the id in multiple steps: first the base id, then the\n    // remaining digits.\n    //\n    // Each 5 bit sequence corresponds to a single base 32 character. So for\n    // example, if the current id is 23 bits long, we can convert 20 of those\n    // bits into a string of 4 characters, with 3 bits left over.\n    //\n    // First calculate how many bits in the base id represent a complete\n    // sequence of characters.\n    var numberOfOverflowBits = baseLength - baseLength % 5; // Then create a bitmask that selects only those bits.\n\n    var newOverflowBits = (1 << numberOfOverflowBits) - 1; // Select the bits, and convert them to a base 32 string.\n\n    var newOverflow = (baseId & newOverflowBits).toString(32); // Now we can remove those bits from the base id.\n\n    var restOfBaseId = baseId >> numberOfOverflowBits;\n    var restOfBaseLength = baseLength - numberOfOverflowBits; // Finally, encode the rest of the bits using the normal algorithm. Because\n    // we made more room, this time it won't overflow.\n\n    var restOfLength = getBitLength(totalChildren) + restOfBaseLength;\n    var restOfNewBits = slot << restOfBaseLength;\n    var id = restOfNewBits | restOfBaseId;\n    var overflow = newOverflow + baseOverflow;\n    treeContextId = 1 << restOfLength | id;\n    treeContextOverflow = overflow;\n  } else {\n    // Normal path\n    var newBits = slot << baseLength;\n\n    var _id = newBits | baseId;\n\n    var _overflow = baseOverflow;\n    treeContextId = 1 << length | _id;\n    treeContextOverflow = _overflow;\n  }\n}\nfunction pushMaterializedTreeId(workInProgress) {\n  warnIfNotHydrating(); // This component materialized an id. This will affect any ids that appear\n  // in its children.\n\n  var returnFiber = workInProgress.return;\n\n  if (returnFiber !== null) {\n    var numberOfForks = 1;\n    var slotIndex = 0;\n    pushTreeFork(workInProgress, numberOfForks);\n    pushTreeId(workInProgress, numberOfForks, slotIndex);\n  }\n}\n\nfunction getBitLength(number) {\n  return 32 - clz32(number);\n}\n\nfunction getLeadingBit(id) {\n  return 1 << getBitLength(id) - 1;\n}\n\nfunction popTreeContext(workInProgress) {\n  // Restore the previous values.\n  // This is a bit more complicated than other context-like modules in Fiber\n  // because the same Fiber may appear on the stack multiple times and for\n  // different reasons. We have to keep popping until the work-in-progress is\n  // no longer at the top of the stack.\n  while (workInProgress === treeForkProvider) {\n    treeForkProvider = forkStack[--forkStackIndex];\n    forkStack[forkStackIndex] = null;\n    treeForkCount = forkStack[--forkStackIndex];\n    forkStack[forkStackIndex] = null;\n  }\n\n  while (workInProgress === treeContextProvider) {\n    treeContextProvider = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n    treeContextOverflow = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n    treeContextId = idStack[--idStackIndex];\n    idStack[idStackIndex] = null;\n  }\n}\nfunction getSuspendedTreeContext() {\n  warnIfNotHydrating();\n\n  if (treeContextProvider !== null) {\n    return {\n      id: treeContextId,\n      overflow: treeContextOverflow\n    };\n  } else {\n    return null;\n  }\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n  warnIfNotHydrating();\n  idStack[idStackIndex++] = treeContextId;\n  idStack[idStackIndex++] = treeContextOverflow;\n  idStack[idStackIndex++] = treeContextProvider;\n  treeContextId = suspendedContext.id;\n  treeContextOverflow = suspendedContext.overflow;\n  treeContextProvider = workInProgress;\n}\n\nfunction warnIfNotHydrating() {\n  {\n    if (!getIsHydrating()) {\n      error('Expected to be hydrating. This is a bug in React. Please file ' + 'an issue.');\n    }\n  }\n}\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false; // This flag allows for warning supression when we expect there to be mismatches\n// due to earlier mismatches or a suspended fiber.\n\nvar didSuspendOrErrorDEV = false; // Hydration errors that were thrown inside this boundary\n\nvar hydrationErrors = null;\n\nfunction warnIfHydrating() {\n  {\n    if (isHydrating) {\n      error('We should not be hydrating here. This is a bug in React. Please file a bug.');\n    }\n  }\n}\n\nfunction markDidThrowWhileHydratingDEV() {\n  {\n    didSuspendOrErrorDEV = true;\n  }\n}\nfunction didSuspendOrErrorWhileHydratingDEV() {\n  {\n    return didSuspendOrErrorDEV;\n  }\n}\n\nfunction enterHydrationState(fiber) {\n\n  var parentInstance = fiber.stateNode.containerInfo;\n  nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);\n  hydrationParentFiber = fiber;\n  isHydrating = true;\n  hydrationErrors = null;\n  didSuspendOrErrorDEV = false;\n  return true;\n}\n\nfunction reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {\n\n  nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);\n  hydrationParentFiber = fiber;\n  isHydrating = true;\n  hydrationErrors = null;\n  didSuspendOrErrorDEV = false;\n\n  if (treeContext !== null) {\n    restoreSuspendedTreeContext(fiber, treeContext);\n  }\n\n  return true;\n}\n\nfunction warnUnhydratedInstance(returnFiber, instance) {\n  {\n    switch (returnFiber.tag) {\n      case HostRoot:\n        {\n          didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);\n          break;\n        }\n\n      case HostComponent:\n        {\n          var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n          didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance, // TODO: Delete this argument when we remove the legacy root API.\n          isConcurrentMode);\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          var suspenseState = returnFiber.memoizedState;\n          if (suspenseState.dehydrated !== null) didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);\n          break;\n        }\n    }\n  }\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n  warnUnhydratedInstance(returnFiber, instance);\n  var childToDelete = createFiberFromHostInstanceForDeletion();\n  childToDelete.stateNode = instance;\n  childToDelete.return = returnFiber;\n  var deletions = returnFiber.deletions;\n\n  if (deletions === null) {\n    returnFiber.deletions = [childToDelete];\n    returnFiber.flags |= ChildDeletion;\n  } else {\n    deletions.push(childToDelete);\n  }\n}\n\nfunction warnNonhydratedInstance(returnFiber, fiber) {\n  {\n    if (didSuspendOrErrorDEV) {\n      // Inside a boundary that already suspended. We're currently rendering the\n      // siblings of a suspended node. The mismatch may be due to the missing\n      // data, so it's probably a false positive.\n      return;\n    }\n\n    switch (returnFiber.tag) {\n      case HostRoot:\n        {\n          var parentContainer = returnFiber.stateNode.containerInfo;\n\n          switch (fiber.tag) {\n            case HostComponent:\n              var type = fiber.type;\n              var props = fiber.pendingProps;\n              didNotFindHydratableInstanceWithinContainer(parentContainer, type);\n              break;\n\n            case HostText:\n              var text = fiber.pendingProps;\n              didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);\n              break;\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          var parentType = returnFiber.type;\n          var parentProps = returnFiber.memoizedProps;\n          var parentInstance = returnFiber.stateNode;\n\n          switch (fiber.tag) {\n            case HostComponent:\n              {\n                var _type = fiber.type;\n                var _props = fiber.pendingProps;\n                var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n                didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props, // TODO: Delete this argument when we remove the legacy root API.\n                isConcurrentMode);\n                break;\n              }\n\n            case HostText:\n              {\n                var _text = fiber.pendingProps;\n\n                var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n                didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text, // TODO: Delete this argument when we remove the legacy root API.\n                _isConcurrentMode);\n                break;\n              }\n          }\n\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          var suspenseState = returnFiber.memoizedState;\n          var _parentInstance = suspenseState.dehydrated;\n          if (_parentInstance !== null) switch (fiber.tag) {\n            case HostComponent:\n              var _type2 = fiber.type;\n              var _props2 = fiber.pendingProps;\n              didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);\n              break;\n\n            case HostText:\n              var _text2 = fiber.pendingProps;\n              didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);\n              break;\n          }\n          break;\n        }\n\n      default:\n        return;\n    }\n  }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n  fiber.flags = fiber.flags & ~Hydrating | Placement;\n  warnNonhydratedInstance(returnFiber, fiber);\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n  switch (fiber.tag) {\n    case HostComponent:\n      {\n        var type = fiber.type;\n        var props = fiber.pendingProps;\n        var instance = canHydrateInstance(nextInstance, type);\n\n        if (instance !== null) {\n          fiber.stateNode = instance;\n          hydrationParentFiber = fiber;\n          nextHydratableInstance = getFirstHydratableChild(instance);\n          return true;\n        }\n\n        return false;\n      }\n\n    case HostText:\n      {\n        var text = fiber.pendingProps;\n        var textInstance = canHydrateTextInstance(nextInstance, text);\n\n        if (textInstance !== null) {\n          fiber.stateNode = textInstance;\n          hydrationParentFiber = fiber; // Text Instances don't have children so there's nothing to hydrate.\n\n          nextHydratableInstance = null;\n          return true;\n        }\n\n        return false;\n      }\n\n    case SuspenseComponent:\n      {\n        var suspenseInstance = canHydrateSuspenseInstance(nextInstance);\n\n        if (suspenseInstance !== null) {\n          var suspenseState = {\n            dehydrated: suspenseInstance,\n            treeContext: getSuspendedTreeContext(),\n            retryLane: OffscreenLane\n          };\n          fiber.memoizedState = suspenseState; // Store the dehydrated fragment as a child fiber.\n          // This simplifies the code for getHostSibling and deleting nodes,\n          // since it doesn't have to consider all Suspense boundaries and\n          // check if they're dehydrated ones or not.\n\n          var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);\n          dehydratedFragment.return = fiber;\n          fiber.child = dehydratedFragment;\n          hydrationParentFiber = fiber; // While a Suspense Instance does have children, we won't step into\n          // it during the first pass. Instead, we'll reenter it later.\n\n          nextHydratableInstance = null;\n          return true;\n        }\n\n        return false;\n      }\n\n    default:\n      return false;\n  }\n}\n\nfunction shouldClientRenderOnMismatch(fiber) {\n  return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;\n}\n\nfunction throwOnHydrationMismatch(fiber) {\n  throw new Error('Hydration failed because the initial UI does not match what was ' + 'rendered on the server.');\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n  if (!isHydrating) {\n    return;\n  }\n\n  var nextInstance = nextHydratableInstance;\n\n  if (!nextInstance) {\n    if (shouldClientRenderOnMismatch(fiber)) {\n      warnNonhydratedInstance(hydrationParentFiber, fiber);\n      throwOnHydrationMismatch();\n    } // Nothing to hydrate. Make it an insertion.\n\n\n    insertNonHydratedInstance(hydrationParentFiber, fiber);\n    isHydrating = false;\n    hydrationParentFiber = fiber;\n    return;\n  }\n\n  var firstAttemptedInstance = nextInstance;\n\n  if (!tryHydrate(fiber, nextInstance)) {\n    if (shouldClientRenderOnMismatch(fiber)) {\n      warnNonhydratedInstance(hydrationParentFiber, fiber);\n      throwOnHydrationMismatch();\n    } // If we can't hydrate this instance let's try the next one.\n    // We use this as a heuristic. It's based on intuition and not data so it\n    // might be flawed or unnecessary.\n\n\n    nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n    var prevHydrationParentFiber = hydrationParentFiber;\n\n    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n      // Nothing to hydrate. Make it an insertion.\n      insertNonHydratedInstance(hydrationParentFiber, fiber);\n      isHydrating = false;\n      hydrationParentFiber = fiber;\n      return;\n    } // We matched the next one, we'll now assume that the first one was\n    // superfluous and we'll delete it. Since we can't eagerly delete it\n    // we'll have to schedule a deletion. To do that, this node needs a dummy\n    // fiber associated with it.\n\n\n    deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);\n  }\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n  var instance = fiber.stateNode;\n  var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;\n  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev); // TODO: Type this specific to this type of component.\n\n  fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n  // is a new ref we mark this as an update.\n\n  if (updatePayload !== null) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n  var textInstance = fiber.stateNode;\n  var textContent = fiber.memoizedProps;\n  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n  if (shouldUpdate) {\n    // We assume that prepareToHydrateHostTextInstance is called in a context where the\n    // hydration parent is the parent host component of this host text.\n    var returnFiber = hydrationParentFiber;\n\n    if (returnFiber !== null) {\n      switch (returnFiber.tag) {\n        case HostRoot:\n          {\n            var parentContainer = returnFiber.stateNode.containerInfo;\n            var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;\n            didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n            isConcurrentMode);\n            break;\n          }\n\n        case HostComponent:\n          {\n            var parentType = returnFiber.type;\n            var parentProps = returnFiber.memoizedProps;\n            var parentInstance = returnFiber.stateNode;\n\n            var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;\n\n            didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent, // TODO: Delete this argument when we remove the legacy root API.\n            _isConcurrentMode2);\n            break;\n          }\n      }\n    }\n  }\n\n  return shouldUpdate;\n}\n\nfunction prepareToHydrateHostSuspenseInstance(fiber) {\n\n  var suspenseState = fiber.memoizedState;\n  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n  if (!suspenseInstance) {\n    throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  hydrateSuspenseInstance(suspenseInstance, fiber);\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n  var suspenseState = fiber.memoizedState;\n  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n  if (!suspenseInstance) {\n    throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n  }\n\n  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n  var parent = fiber.return;\n\n  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n    parent = parent.return;\n  }\n\n  hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n  if (fiber !== hydrationParentFiber) {\n    // We're deeper than the current hydration context, inside an inserted\n    // tree.\n    return false;\n  }\n\n  if (!isHydrating) {\n    // If we're not currently hydrating but we're in a hydration context, then\n    // we were an insertion and now need to pop up reenter hydration of our\n    // siblings.\n    popToNextHostParent(fiber);\n    isHydrating = true;\n    return false;\n  } // If we have any remaining hydratable nodes, we need to delete them now.\n  // We only do this deeper than head and body since they tend to have random\n  // other nodes in them. We also ignore components with pure text content in\n  // side of them. We also don't delete anything inside the root container.\n\n\n  if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {\n    var nextInstance = nextHydratableInstance;\n\n    if (nextInstance) {\n      if (shouldClientRenderOnMismatch(fiber)) {\n        warnIfUnhydratedTailNodes(fiber);\n        throwOnHydrationMismatch();\n      } else {\n        while (nextInstance) {\n          deleteHydratableInstance(fiber, nextInstance);\n          nextInstance = getNextHydratableSibling(nextInstance);\n        }\n      }\n    }\n  }\n\n  popToNextHostParent(fiber);\n\n  if (fiber.tag === SuspenseComponent) {\n    nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n  } else {\n    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n  }\n\n  return true;\n}\n\nfunction hasUnhydratedTailNodes() {\n  return isHydrating && nextHydratableInstance !== null;\n}\n\nfunction warnIfUnhydratedTailNodes(fiber) {\n  var nextInstance = nextHydratableInstance;\n\n  while (nextInstance) {\n    warnUnhydratedInstance(fiber, nextInstance);\n    nextInstance = getNextHydratableSibling(nextInstance);\n  }\n}\n\nfunction resetHydrationState() {\n\n  hydrationParentFiber = null;\n  nextHydratableInstance = null;\n  isHydrating = false;\n  didSuspendOrErrorDEV = false;\n}\n\nfunction upgradeHydrationErrorsToRecoverable() {\n  if (hydrationErrors !== null) {\n    // Successfully completed a forced client render. The errors that occurred\n    // during the hydration attempt are now recovered. We will log them in\n    // commit phase, once the entire tree has finished.\n    queueRecoverableErrors(hydrationErrors);\n    hydrationErrors = null;\n  }\n}\n\nfunction getIsHydrating() {\n  return isHydrating;\n}\n\nfunction queueHydrationError(error) {\n  if (hydrationErrors === null) {\n    hydrationErrors = [error];\n  } else {\n    hydrationErrors.push(error);\n  }\n}\n\nvar ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = null;\nfunction requestCurrentTransition() {\n  return ReactCurrentBatchConfig$1.transition;\n}\n\nvar ReactStrictModeWarnings = {\n  recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n  flushPendingUnsafeLifecycleWarnings: function () {},\n  recordLegacyContextWarning: function (fiber, instance) {},\n  flushLegacyContextWarning: function () {},\n  discardPendingWarnings: function () {}\n};\n\n{\n  var findStrictRoot = function (fiber) {\n    var maybeStrictRoot = null;\n    var node = fiber;\n\n    while (node !== null) {\n      if (node.mode & StrictLegacyMode) {\n        maybeStrictRoot = node;\n      }\n\n      node = node.return;\n    }\n\n    return maybeStrictRoot;\n  };\n\n  var setToSortedString = function (set) {\n    var array = [];\n    set.forEach(function (value) {\n      array.push(value);\n    });\n    return array.sort().join(', ');\n  };\n\n  var pendingComponentWillMountWarnings = [];\n  var pendingUNSAFE_ComponentWillMountWarnings = [];\n  var pendingComponentWillReceivePropsWarnings = [];\n  var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n  var pendingComponentWillUpdateWarnings = [];\n  var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n  var didWarnAboutUnsafeLifecycles = new Set();\n\n  ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n    // Dedupe strategy: Warn once per component.\n    if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n      return;\n    }\n\n    if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n    instance.componentWillMount.__suppressDeprecationWarning !== true) {\n      pendingComponentWillMountWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n      pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n    }\n\n    if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n      pendingComponentWillReceivePropsWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n      pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n    }\n\n    if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n      pendingComponentWillUpdateWarnings.push(fiber);\n    }\n\n    if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n      pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n    }\n  };\n\n  ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n    // We do an initial pass to gather component names\n    var componentWillMountUniqueNames = new Set();\n\n    if (pendingComponentWillMountWarnings.length > 0) {\n      pendingComponentWillMountWarnings.forEach(function (fiber) {\n        componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillMountWarnings = [];\n    }\n\n    var UNSAFE_componentWillMountUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillMountWarnings = [];\n    }\n\n    var componentWillReceivePropsUniqueNames = new Set();\n\n    if (pendingComponentWillReceivePropsWarnings.length > 0) {\n      pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n        componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillReceivePropsWarnings = [];\n    }\n\n    var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n    }\n\n    var componentWillUpdateUniqueNames = new Set();\n\n    if (pendingComponentWillUpdateWarnings.length > 0) {\n      pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n        componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingComponentWillUpdateWarnings = [];\n    }\n\n    var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n    if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n      pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n        UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutUnsafeLifecycles.add(fiber.type);\n      });\n      pendingUNSAFE_ComponentWillUpdateWarnings = [];\n    } // Finally, we flush all the warnings\n    // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n    if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n      var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n      error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n    }\n\n    if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n      var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n      error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n    }\n\n    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n      error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n    }\n\n    if (componentWillMountUniqueNames.size > 0) {\n      var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n      warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n    }\n\n    if (componentWillReceivePropsUniqueNames.size > 0) {\n      var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n      warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n    }\n\n    if (componentWillUpdateUniqueNames.size > 0) {\n      var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n      warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n    }\n  };\n\n  var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n  var didWarnAboutLegacyContext = new Set();\n\n  ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n    var strictRoot = findStrictRoot(fiber);\n\n    if (strictRoot === null) {\n      error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n      return;\n    } // Dedup strategy: Warn once per component.\n\n\n    if (didWarnAboutLegacyContext.has(fiber.type)) {\n      return;\n    }\n\n    var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n    if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n      if (warningsForRoot === undefined) {\n        warningsForRoot = [];\n        pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n      }\n\n      warningsForRoot.push(fiber);\n    }\n  };\n\n  ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n    pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n      if (fiberArray.length === 0) {\n        return;\n      }\n\n      var firstFiber = fiberArray[0];\n      var uniqueNames = new Set();\n      fiberArray.forEach(function (fiber) {\n        uniqueNames.add(getComponentNameFromFiber(fiber) || 'Component');\n        didWarnAboutLegacyContext.add(fiber.type);\n      });\n      var sortedNames = setToSortedString(uniqueNames);\n\n      try {\n        setCurrentFiber(firstFiber);\n\n        error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);\n      } finally {\n        resetCurrentFiber();\n      }\n    });\n  };\n\n  ReactStrictModeWarnings.discardPendingWarnings = function () {\n    pendingComponentWillMountWarnings = [];\n    pendingUNSAFE_ComponentWillMountWarnings = [];\n    pendingComponentWillReceivePropsWarnings = [];\n    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n    pendingComponentWillUpdateWarnings = [];\n    pendingUNSAFE_ComponentWillUpdateWarnings = [];\n    pendingLegacyContextWarning = new Map();\n  };\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n  didWarnAboutMaps = false;\n  didWarnAboutGenerators = false;\n  didWarnAboutStringRefs = {};\n  /**\n   * Warn if there's no key explicitly set on dynamic arrays of children or\n   * object keys are not valid. This allows us to keep track of children between\n   * updates.\n   */\n\n  ownerHasKeyUseWarning = {};\n  ownerHasFunctionTypeWarning = {};\n\n  warnForMissingKey = function (child, returnFiber) {\n    if (child === null || typeof child !== 'object') {\n      return;\n    }\n\n    if (!child._store || child._store.validated || child.key != null) {\n      return;\n    }\n\n    if (typeof child._store !== 'object') {\n      throw new Error('React Component in warnForMissingKey should have a _store. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n\n    child._store.validated = true;\n    var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n    if (ownerHasKeyUseWarning[componentName]) {\n      return;\n    }\n\n    ownerHasKeyUseWarning[componentName] = true;\n\n    error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n  };\n}\n\nfunction isReactClass(type) {\n  return type.prototype && type.prototype.isReactComponent;\n}\n\nfunction coerceRef(returnFiber, current, element) {\n  var mixedRef = element.ref;\n\n  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n    {\n      // TODO: Clean this up once we turn on the string ref warning for\n      // everyone, because the strict mode case will no longer be relevant\n      if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n      // because these cannot be automatically converted to an arrow function\n      // using a codemod. Therefore, we don't have to warn about string refs again.\n      !(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with \"Function components cannot have string refs\"\n      !(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with \"Function components cannot be given refs\"\n      !(typeof element.type === 'function' && !isReactClass(element.type)) && // Will already throw with \"Element ref was specified as a string (someStringRef) but no owner was set\"\n      element._owner) {\n        var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n        if (!didWarnAboutStringRefs[componentName]) {\n          {\n            error('Component \"%s\" contains the string ref \"%s\". Support for string refs ' + 'will be removed in a future major release. We recommend using ' + 'useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);\n          }\n\n          didWarnAboutStringRefs[componentName] = true;\n        }\n      }\n    }\n\n    if (element._owner) {\n      var owner = element._owner;\n      var inst;\n\n      if (owner) {\n        var ownerFiber = owner;\n\n        if (ownerFiber.tag !== ClassComponent) {\n          throw new Error('Function components cannot have string refs. ' + 'We recommend using useRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref');\n        }\n\n        inst = ownerFiber.stateNode;\n      }\n\n      if (!inst) {\n        throw new Error(\"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a \" + 'bug in React. Please file an issue.');\n      } // Assigning this to a const so Flow knows it won't change in the closure\n\n\n      var resolvedInst = inst;\n\n      {\n        checkPropStringCoercion(mixedRef, 'ref');\n      }\n\n      var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n      if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n        return current.ref;\n      }\n\n      var ref = function (value) {\n        var refs = resolvedInst.refs;\n\n        if (value === null) {\n          delete refs[stringRef];\n        } else {\n          refs[stringRef] = value;\n        }\n      };\n\n      ref._stringRef = stringRef;\n      return ref;\n    } else {\n      if (typeof mixedRef !== 'string') {\n        throw new Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.');\n      }\n\n      if (!element._owner) {\n        throw new Error(\"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of\" + ' the following reasons:\\n' + '1. You may be adding a ref to a function component\\n' + \"2. You may be adding a ref to a component that was not created inside a component's render method\\n\" + '3. You have multiple copies of React loaded\\n' + 'See https://reactjs.org/link/refs-must-have-owner for more information.');\n      }\n    }\n  }\n\n  return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n  var childString = Object.prototype.toString.call(newChild);\n  throw new Error(\"Objects are not valid as a React child (found: \" + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + \"). \" + 'If you meant to render a collection of children, use an array ' + 'instead.');\n}\n\nfunction warnOnFunctionType(returnFiber) {\n  {\n    var componentName = getComponentNameFromFiber(returnFiber) || 'Component';\n\n    if (ownerHasFunctionTypeWarning[componentName]) {\n      return;\n    }\n\n    ownerHasFunctionTypeWarning[componentName] = true;\n\n    error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n  }\n}\n\nfunction resolveLazy(lazyType) {\n  var payload = lazyType._payload;\n  var init = lazyType._init;\n  return init(payload);\n} // This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n  function deleteChild(returnFiber, childToDelete) {\n    if (!shouldTrackSideEffects) {\n      // Noop.\n      return;\n    }\n\n    var deletions = returnFiber.deletions;\n\n    if (deletions === null) {\n      returnFiber.deletions = [childToDelete];\n      returnFiber.flags |= ChildDeletion;\n    } else {\n      deletions.push(childToDelete);\n    }\n  }\n\n  function deleteRemainingChildren(returnFiber, currentFirstChild) {\n    if (!shouldTrackSideEffects) {\n      // Noop.\n      return null;\n    } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n    // assuming that after the first child we've already added everything.\n\n\n    var childToDelete = currentFirstChild;\n\n    while (childToDelete !== null) {\n      deleteChild(returnFiber, childToDelete);\n      childToDelete = childToDelete.sibling;\n    }\n\n    return null;\n  }\n\n  function mapRemainingChildren(returnFiber, currentFirstChild) {\n    // Add the remaining children to a temporary map so that we can find them by\n    // keys quickly. Implicit (null) keys get added to this set with their index\n    // instead.\n    var existingChildren = new Map();\n    var existingChild = currentFirstChild;\n\n    while (existingChild !== null) {\n      if (existingChild.key !== null) {\n        existingChildren.set(existingChild.key, existingChild);\n      } else {\n        existingChildren.set(existingChild.index, existingChild);\n      }\n\n      existingChild = existingChild.sibling;\n    }\n\n    return existingChildren;\n  }\n\n  function useFiber(fiber, pendingProps) {\n    // We currently set sibling to null and index to 0 here because it is easy\n    // to forget to do before returning it. E.g. for the single child case.\n    var clone = createWorkInProgress(fiber, pendingProps);\n    clone.index = 0;\n    clone.sibling = null;\n    return clone;\n  }\n\n  function placeChild(newFiber, lastPlacedIndex, newIndex) {\n    newFiber.index = newIndex;\n\n    if (!shouldTrackSideEffects) {\n      // During hydration, the useId algorithm needs to know which fibers are\n      // part of a list of children (arrays, iterators).\n      newFiber.flags |= Forked;\n      return lastPlacedIndex;\n    }\n\n    var current = newFiber.alternate;\n\n    if (current !== null) {\n      var oldIndex = current.index;\n\n      if (oldIndex < lastPlacedIndex) {\n        // This is a move.\n        newFiber.flags |= Placement;\n        return lastPlacedIndex;\n      } else {\n        // This item can stay in place.\n        return oldIndex;\n      }\n    } else {\n      // This is an insertion.\n      newFiber.flags |= Placement;\n      return lastPlacedIndex;\n    }\n  }\n\n  function placeSingleChild(newFiber) {\n    // This is simpler for the single child case. We only need to do a\n    // placement for inserting new children.\n    if (shouldTrackSideEffects && newFiber.alternate === null) {\n      newFiber.flags |= Placement;\n    }\n\n    return newFiber;\n  }\n\n  function updateTextNode(returnFiber, current, textContent, lanes) {\n    if (current === null || current.tag !== HostText) {\n      // Insert\n      var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, textContent);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function updateElement(returnFiber, current, element, lanes) {\n    var elementType = element.type;\n\n    if (elementType === REACT_FRAGMENT_TYPE) {\n      return updateFragment(returnFiber, current, element.props.children, lanes, element.key);\n    }\n\n    if (current !== null) {\n      if (current.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n       isCompatibleFamilyForHotReloading(current, element) ) || // Lazy types should reconcile their resolved type.\n      // We need to do this after the Hot Reloading check above,\n      // because hot reloading has different semantics than prod because\n      // it doesn't resuspend. So we can't let the call below suspend.\n      typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current.type) {\n        // Move based on index\n        var existing = useFiber(current, element.props);\n        existing.ref = coerceRef(returnFiber, current, element);\n        existing.return = returnFiber;\n\n        {\n          existing._debugSource = element._source;\n          existing._debugOwner = element._owner;\n        }\n\n        return existing;\n      }\n    } // Insert\n\n\n    var created = createFiberFromElement(element, returnFiber.mode, lanes);\n    created.ref = coerceRef(returnFiber, current, element);\n    created.return = returnFiber;\n    return created;\n  }\n\n  function updatePortal(returnFiber, current, portal, lanes) {\n    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n      // Insert\n      var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, portal.children || []);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function updateFragment(returnFiber, current, fragment, lanes, key) {\n    if (current === null || current.tag !== Fragment) {\n      // Insert\n      var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n      created.return = returnFiber;\n      return created;\n    } else {\n      // Update\n      var existing = useFiber(current, fragment);\n      existing.return = returnFiber;\n      return existing;\n    }\n  }\n\n  function createChild(returnFiber, newChild, lanes) {\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys. If the previous node is implicitly keyed\n      // we can continue to replace it without aborting even if it is not a text\n      // node.\n      var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n      created.return = returnFiber;\n      return created;\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n            _created.ref = coerceRef(returnFiber, null, newChild);\n            _created.return = returnFiber;\n            return _created;\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n            _created2.return = returnFiber;\n            return _created2;\n          }\n\n        case REACT_LAZY_TYPE:\n          {\n            var payload = newChild._payload;\n            var init = newChild._init;\n            return createChild(returnFiber, init(payload), lanes);\n          }\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n        _created3.return = returnFiber;\n        return _created3;\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n\n  function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n    // Update the fiber if the keys match, otherwise return null.\n    var key = oldFiber !== null ? oldFiber.key : null;\n\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys. If the previous node is implicitly keyed\n      // we can continue to replace it without aborting even if it is not a text\n      // node.\n      if (key !== null) {\n        return null;\n      }\n\n      return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            if (newChild.key === key) {\n              return updateElement(returnFiber, oldFiber, newChild, lanes);\n            } else {\n              return null;\n            }\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            if (newChild.key === key) {\n              return updatePortal(returnFiber, oldFiber, newChild, lanes);\n            } else {\n              return null;\n            }\n          }\n\n        case REACT_LAZY_TYPE:\n          {\n            var payload = newChild._payload;\n            var init = newChild._init;\n            return updateSlot(returnFiber, oldFiber, init(payload), lanes);\n          }\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        if (key !== null) {\n          return null;\n        }\n\n        return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n\n  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      // Text nodes don't have keys, so we neither have to check the old nor\n      // new node for the key. If both are text nodes, they match.\n      var matchedFiber = existingChildren.get(newIdx) || null;\n      return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n    }\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          {\n            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n            return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n          }\n\n        case REACT_PORTAL_TYPE:\n          {\n            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n            return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n          }\n\n        case REACT_LAZY_TYPE:\n          var payload = newChild._payload;\n          var init = newChild._init;\n          return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);\n      }\n\n      if (isArray(newChild) || getIteratorFn(newChild)) {\n        var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n        return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    }\n\n    return null;\n  }\n  /**\n   * Warns if there is a duplicate or missing key\n   */\n\n\n  function warnOnInvalidKey(child, knownKeys, returnFiber) {\n    {\n      if (typeof child !== 'object' || child === null) {\n        return knownKeys;\n      }\n\n      switch (child.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n        case REACT_PORTAL_TYPE:\n          warnForMissingKey(child, returnFiber);\n          var key = child.key;\n\n          if (typeof key !== 'string') {\n            break;\n          }\n\n          if (knownKeys === null) {\n            knownKeys = new Set();\n            knownKeys.add(key);\n            break;\n          }\n\n          if (!knownKeys.has(key)) {\n            knownKeys.add(key);\n            break;\n          }\n\n          error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n          break;\n\n        case REACT_LAZY_TYPE:\n          var payload = child._payload;\n          var init = child._init;\n          warnOnInvalidKey(init(payload), knownKeys, returnFiber);\n          break;\n      }\n    }\n\n    return knownKeys;\n  }\n\n  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n    // This algorithm can't optimize by searching from both ends since we\n    // don't have backpointers on fibers. I'm trying to see how far we can get\n    // with that model. If it ends up not being worth the tradeoffs, we can\n    // add it later.\n    // Even with a two ended optimization, we'd want to optimize for the case\n    // where there are few changes and brute force the comparison instead of\n    // going for the Map. It'd like to explore hitting that path first in\n    // forward-only mode and only go for the Map once we notice that we need\n    // lots of look ahead. This doesn't handle reversal as well as two ended\n    // search but that's unusual. Besides, for the two ended optimization to\n    // work on Iterables, we'd need to copy the whole set.\n    // In this first iteration, we'll just live with hitting the bad case\n    // (adding everything to a Map) in for every insert/move.\n    // If you change this code, also update reconcileChildrenIterator() which\n    // uses the same algorithm.\n    {\n      // First, validate keys.\n      var knownKeys = null;\n\n      for (var i = 0; i < newChildren.length; i++) {\n        var child = newChildren[i];\n        knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n      }\n    }\n\n    var resultingFirstChild = null;\n    var previousNewFiber = null;\n    var oldFiber = currentFirstChild;\n    var lastPlacedIndex = 0;\n    var newIdx = 0;\n    var nextOldFiber = null;\n\n    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n      if (oldFiber.index > newIdx) {\n        nextOldFiber = oldFiber;\n        oldFiber = null;\n      } else {\n        nextOldFiber = oldFiber.sibling;\n      }\n\n      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n      if (newFiber === null) {\n        // TODO: This breaks on empty slots like null children. That's\n        // unfortunate because it triggers the slow path all the time. We need\n        // a better way to communicate whether this was a miss or null,\n        // boolean, undefined, etc.\n        if (oldFiber === null) {\n          oldFiber = nextOldFiber;\n        }\n\n        break;\n      }\n\n      if (shouldTrackSideEffects) {\n        if (oldFiber && newFiber.alternate === null) {\n          // We matched the slot, but we didn't reuse the existing fiber, so we\n          // need to delete the existing child.\n          deleteChild(returnFiber, oldFiber);\n        }\n      }\n\n      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n      if (previousNewFiber === null) {\n        // TODO: Move out of the loop. This only happens for the first run.\n        resultingFirstChild = newFiber;\n      } else {\n        // TODO: Defer siblings if we're not at the right index for this slot.\n        // I.e. if we had null values before, then we want to defer this\n        // for each null value. However, we also don't want to call updateSlot\n        // with the previous one.\n        previousNewFiber.sibling = newFiber;\n      }\n\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n\n    if (newIdx === newChildren.length) {\n      // We've reached the end of the new children. We can delete the rest.\n      deleteRemainingChildren(returnFiber, oldFiber);\n\n      if (getIsHydrating()) {\n        var numberOfForks = newIdx;\n        pushTreeFork(returnFiber, numberOfForks);\n      }\n\n      return resultingFirstChild;\n    }\n\n    if (oldFiber === null) {\n      // If we don't have any more existing children we can choose a fast path\n      // since the rest will all be insertions.\n      for (; newIdx < newChildren.length; newIdx++) {\n        var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n        if (_newFiber === null) {\n          continue;\n        }\n\n        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          // TODO: Move out of the loop. This only happens for the first run.\n          resultingFirstChild = _newFiber;\n        } else {\n          previousNewFiber.sibling = _newFiber;\n        }\n\n        previousNewFiber = _newFiber;\n      }\n\n      if (getIsHydrating()) {\n        var _numberOfForks = newIdx;\n        pushTreeFork(returnFiber, _numberOfForks);\n      }\n\n      return resultingFirstChild;\n    } // Add all children to a key map for quick lookups.\n\n\n    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n    for (; newIdx < newChildren.length; newIdx++) {\n      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n      if (_newFiber2 !== null) {\n        if (shouldTrackSideEffects) {\n          if (_newFiber2.alternate !== null) {\n            // The new fiber is a work in progress, but if there exists a\n            // current, that means that we reused the fiber. We need to delete\n            // it from the child list so that we don't add it to the deletion\n            // list.\n            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n          }\n        }\n\n        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          resultingFirstChild = _newFiber2;\n        } else {\n          previousNewFiber.sibling = _newFiber2;\n        }\n\n        previousNewFiber = _newFiber2;\n      }\n    }\n\n    if (shouldTrackSideEffects) {\n      // Any existing children that weren't consumed above were deleted. We need\n      // to add them to the deletion list.\n      existingChildren.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    }\n\n    if (getIsHydrating()) {\n      var _numberOfForks2 = newIdx;\n      pushTreeFork(returnFiber, _numberOfForks2);\n    }\n\n    return resultingFirstChild;\n  }\n\n  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n    // This is the same implementation as reconcileChildrenArray(),\n    // but using the iterator instead.\n    var iteratorFn = getIteratorFn(newChildrenIterable);\n\n    if (typeof iteratorFn !== 'function') {\n      throw new Error('An object is not an iterable. This error is likely caused by a bug in ' + 'React. Please file an issue.');\n    }\n\n    {\n      // We don't support rendering Generators because it's a mutation.\n      // See https://github.com/facebook/react/issues/12995\n      if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n      newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n        if (!didWarnAboutGenerators) {\n          error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n        }\n\n        didWarnAboutGenerators = true;\n      } // Warn about using Maps as children\n\n\n      if (newChildrenIterable.entries === iteratorFn) {\n        if (!didWarnAboutMaps) {\n          error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n        }\n\n        didWarnAboutMaps = true;\n      } // First, validate keys.\n      // We'll get a different iterator later for the main pass.\n\n\n      var _newChildren = iteratorFn.call(newChildrenIterable);\n\n      if (_newChildren) {\n        var knownKeys = null;\n\n        var _step = _newChildren.next();\n\n        for (; !_step.done; _step = _newChildren.next()) {\n          var child = _step.value;\n          knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n        }\n      }\n    }\n\n    var newChildren = iteratorFn.call(newChildrenIterable);\n\n    if (newChildren == null) {\n      throw new Error('An iterable object provided no iterator.');\n    }\n\n    var resultingFirstChild = null;\n    var previousNewFiber = null;\n    var oldFiber = currentFirstChild;\n    var lastPlacedIndex = 0;\n    var newIdx = 0;\n    var nextOldFiber = null;\n    var step = newChildren.next();\n\n    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n      if (oldFiber.index > newIdx) {\n        nextOldFiber = oldFiber;\n        oldFiber = null;\n      } else {\n        nextOldFiber = oldFiber.sibling;\n      }\n\n      var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n      if (newFiber === null) {\n        // TODO: This breaks on empty slots like null children. That's\n        // unfortunate because it triggers the slow path all the time. We need\n        // a better way to communicate whether this was a miss or null,\n        // boolean, undefined, etc.\n        if (oldFiber === null) {\n          oldFiber = nextOldFiber;\n        }\n\n        break;\n      }\n\n      if (shouldTrackSideEffects) {\n        if (oldFiber && newFiber.alternate === null) {\n          // We matched the slot, but we didn't reuse the existing fiber, so we\n          // need to delete the existing child.\n          deleteChild(returnFiber, oldFiber);\n        }\n      }\n\n      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n      if (previousNewFiber === null) {\n        // TODO: Move out of the loop. This only happens for the first run.\n        resultingFirstChild = newFiber;\n      } else {\n        // TODO: Defer siblings if we're not at the right index for this slot.\n        // I.e. if we had null values before, then we want to defer this\n        // for each null value. However, we also don't want to call updateSlot\n        // with the previous one.\n        previousNewFiber.sibling = newFiber;\n      }\n\n      previousNewFiber = newFiber;\n      oldFiber = nextOldFiber;\n    }\n\n    if (step.done) {\n      // We've reached the end of the new children. We can delete the rest.\n      deleteRemainingChildren(returnFiber, oldFiber);\n\n      if (getIsHydrating()) {\n        var numberOfForks = newIdx;\n        pushTreeFork(returnFiber, numberOfForks);\n      }\n\n      return resultingFirstChild;\n    }\n\n    if (oldFiber === null) {\n      // If we don't have any more existing children we can choose a fast path\n      // since the rest will all be insertions.\n      for (; !step.done; newIdx++, step = newChildren.next()) {\n        var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n        if (_newFiber3 === null) {\n          continue;\n        }\n\n        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          // TODO: Move out of the loop. This only happens for the first run.\n          resultingFirstChild = _newFiber3;\n        } else {\n          previousNewFiber.sibling = _newFiber3;\n        }\n\n        previousNewFiber = _newFiber3;\n      }\n\n      if (getIsHydrating()) {\n        var _numberOfForks3 = newIdx;\n        pushTreeFork(returnFiber, _numberOfForks3);\n      }\n\n      return resultingFirstChild;\n    } // Add all children to a key map for quick lookups.\n\n\n    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n    for (; !step.done; newIdx++, step = newChildren.next()) {\n      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n      if (_newFiber4 !== null) {\n        if (shouldTrackSideEffects) {\n          if (_newFiber4.alternate !== null) {\n            // The new fiber is a work in progress, but if there exists a\n            // current, that means that we reused the fiber. We need to delete\n            // it from the child list so that we don't add it to the deletion\n            // list.\n            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n          }\n        }\n\n        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n        if (previousNewFiber === null) {\n          resultingFirstChild = _newFiber4;\n        } else {\n          previousNewFiber.sibling = _newFiber4;\n        }\n\n        previousNewFiber = _newFiber4;\n      }\n    }\n\n    if (shouldTrackSideEffects) {\n      // Any existing children that weren't consumed above were deleted. We need\n      // to add them to the deletion list.\n      existingChildren.forEach(function (child) {\n        return deleteChild(returnFiber, child);\n      });\n    }\n\n    if (getIsHydrating()) {\n      var _numberOfForks4 = newIdx;\n      pushTreeFork(returnFiber, _numberOfForks4);\n    }\n\n    return resultingFirstChild;\n  }\n\n  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n    // There's no need to check for keys on text nodes since we don't have a\n    // way to define them.\n    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n      // We already have an existing node so let's just update it and delete\n      // the rest.\n      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n      var existing = useFiber(currentFirstChild, textContent);\n      existing.return = returnFiber;\n      return existing;\n    } // The existing first child is not a text node so we need to create one\n    // and delete the existing ones.\n\n\n    deleteRemainingChildren(returnFiber, currentFirstChild);\n    var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n    created.return = returnFiber;\n    return created;\n  }\n\n  function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n    var key = element.key;\n    var child = currentFirstChild;\n\n    while (child !== null) {\n      // TODO: If key === null and child.key === null, then this only applies to\n      // the first item in the list.\n      if (child.key === key) {\n        var elementType = element.type;\n\n        if (elementType === REACT_FRAGMENT_TYPE) {\n          if (child.tag === Fragment) {\n            deleteRemainingChildren(returnFiber, child.sibling);\n            var existing = useFiber(child, element.props.children);\n            existing.return = returnFiber;\n\n            {\n              existing._debugSource = element._source;\n              existing._debugOwner = element._owner;\n            }\n\n            return existing;\n          }\n        } else {\n          if (child.elementType === elementType || ( // Keep this check inline so it only runs on the false path:\n           isCompatibleFamilyForHotReloading(child, element) ) || // Lazy types should reconcile their resolved type.\n          // We need to do this after the Hot Reloading check above,\n          // because hot reloading has different semantics than prod because\n          // it doesn't resuspend. So we can't let the call below suspend.\n          typeof elementType === 'object' && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {\n            deleteRemainingChildren(returnFiber, child.sibling);\n\n            var _existing = useFiber(child, element.props);\n\n            _existing.ref = coerceRef(returnFiber, child, element);\n            _existing.return = returnFiber;\n\n            {\n              _existing._debugSource = element._source;\n              _existing._debugOwner = element._owner;\n            }\n\n            return _existing;\n          }\n        } // Didn't match.\n\n\n        deleteRemainingChildren(returnFiber, child);\n        break;\n      } else {\n        deleteChild(returnFiber, child);\n      }\n\n      child = child.sibling;\n    }\n\n    if (element.type === REACT_FRAGMENT_TYPE) {\n      var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n      created.return = returnFiber;\n      return created;\n    } else {\n      var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n      _created4.return = returnFiber;\n      return _created4;\n    }\n  }\n\n  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n    var key = portal.key;\n    var child = currentFirstChild;\n\n    while (child !== null) {\n      // TODO: If key === null and child.key === null, then this only applies to\n      // the first item in the list.\n      if (child.key === key) {\n        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n          deleteRemainingChildren(returnFiber, child.sibling);\n          var existing = useFiber(child, portal.children || []);\n          existing.return = returnFiber;\n          return existing;\n        } else {\n          deleteRemainingChildren(returnFiber, child);\n          break;\n        }\n      } else {\n        deleteChild(returnFiber, child);\n      }\n\n      child = child.sibling;\n    }\n\n    var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n    created.return = returnFiber;\n    return created;\n  } // This API will tag the children with the side-effect of the reconciliation\n  // itself. They will be added to the side-effect list as we pass through the\n  // children and the parent.\n\n\n  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n    // This function is not recursive.\n    // If the top level item is an array, we treat it as a set of children,\n    // not as a fragment. Nested arrays on the other hand will be treated as\n    // fragment nodes. Recursion happens at the normal flow.\n    // Handle top level unkeyed fragments as if they were arrays.\n    // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n    // We treat the ambiguous cases above the same.\n    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n    if (isUnkeyedTopLevelFragment) {\n      newChild = newChild.props.children;\n    } // Handle object types\n\n\n    if (typeof newChild === 'object' && newChild !== null) {\n      switch (newChild.$$typeof) {\n        case REACT_ELEMENT_TYPE:\n          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n        case REACT_PORTAL_TYPE:\n          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n        case REACT_LAZY_TYPE:\n          var payload = newChild._payload;\n          var init = newChild._init; // TODO: This function is supposed to be non-recursive.\n\n          return reconcileChildFibers(returnFiber, currentFirstChild, init(payload), lanes);\n      }\n\n      if (isArray(newChild)) {\n        return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n      }\n\n      if (getIteratorFn(newChild)) {\n        return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n      }\n\n      throwOnInvalidObjectType(returnFiber, newChild);\n    }\n\n    if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {\n      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n    }\n\n    {\n      if (typeof newChild === 'function') {\n        warnOnFunctionType(returnFiber);\n      }\n    } // Remaining cases are all treated as empty.\n\n\n    return deleteRemainingChildren(returnFiber, currentFirstChild);\n  }\n\n  return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n  if (current !== null && workInProgress.child !== current.child) {\n    throw new Error('Resuming work not yet implemented.');\n  }\n\n  if (workInProgress.child === null) {\n    return;\n  }\n\n  var currentChild = workInProgress.child;\n  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n  workInProgress.child = newChild;\n  newChild.return = workInProgress;\n\n  while (currentChild.sibling !== null) {\n    currentChild = currentChild.sibling;\n    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n    newChild.return = workInProgress;\n  }\n\n  newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n  var child = workInProgress.child;\n\n  while (child !== null) {\n    resetWorkInProgress(child, lanes);\n    child = child.sibling;\n  }\n}\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n  // Use this to detect multiple renderers using the same context\n  rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastFullyObservedContext = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n  // This is called right before React yields execution, to ensure `readContext`\n  // cannot be called outside the render phase.\n  currentlyRenderingFiber = null;\n  lastContextDependency = null;\n  lastFullyObservedContext = null;\n\n  {\n    isDisallowedContextReadInDEV = false;\n  }\n}\nfunction enterDisallowedContextReadInDEV() {\n  {\n    isDisallowedContextReadInDEV = true;\n  }\n}\nfunction exitDisallowedContextReadInDEV() {\n  {\n    isDisallowedContextReadInDEV = false;\n  }\n}\nfunction pushProvider(providerFiber, context, nextValue) {\n  {\n    push(valueCursor, context._currentValue, providerFiber);\n    context._currentValue = nextValue;\n\n    {\n      if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n        error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n      }\n\n      context._currentRenderer = rendererSigil;\n    }\n  }\n}\nfunction popProvider(context, providerFiber) {\n  var currentValue = valueCursor.current;\n  pop(valueCursor, providerFiber);\n\n  {\n    {\n      context._currentValue = currentValue;\n    }\n  }\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n  // Update the child lanes of all the ancestors, including the alternates.\n  var node = parent;\n\n  while (node !== null) {\n    var alternate = node.alternate;\n\n    if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n      node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n      if (alternate !== null) {\n        alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n      }\n    } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n      alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n    }\n\n    if (node === propagationRoot) {\n      break;\n    }\n\n    node = node.return;\n  }\n\n  {\n    if (node !== propagationRoot) {\n      error('Expected to find the propagation root when scheduling context work. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n    }\n  }\n}\nfunction propagateContextChange(workInProgress, context, renderLanes) {\n  {\n    propagateContextChange_eager(workInProgress, context, renderLanes);\n  }\n}\n\nfunction propagateContextChange_eager(workInProgress, context, renderLanes) {\n\n  var fiber = workInProgress.child;\n\n  if (fiber !== null) {\n    // Set the return pointer of the child to the work-in-progress fiber.\n    fiber.return = workInProgress;\n  }\n\n  while (fiber !== null) {\n    var nextFiber = void 0; // Visit this fiber.\n\n    var list = fiber.dependencies;\n\n    if (list !== null) {\n      nextFiber = fiber.child;\n      var dependency = list.firstContext;\n\n      while (dependency !== null) {\n        // Check if the context matches.\n        if (dependency.context === context) {\n          // Match! Schedule an update on this fiber.\n          if (fiber.tag === ClassComponent) {\n            // Schedule a force update on the work-in-progress.\n            var lane = pickArbitraryLane(renderLanes);\n            var update = createUpdate(NoTimestamp, lane);\n            update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n            // update to the current fiber, too, which means it will persist even if\n            // this render is thrown away. Since it's a race condition, not sure it's\n            // worth fixing.\n            // Inlined `enqueueUpdate` to remove interleaved update check\n\n            var updateQueue = fiber.updateQueue;\n\n            if (updateQueue === null) ; else {\n              var sharedQueue = updateQueue.shared;\n              var pending = sharedQueue.pending;\n\n              if (pending === null) {\n                // This is the first update. Create a circular list.\n                update.next = update;\n              } else {\n                update.next = pending.next;\n                pending.next = update;\n              }\n\n              sharedQueue.pending = update;\n            }\n          }\n\n          fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n          var alternate = fiber.alternate;\n\n          if (alternate !== null) {\n            alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n          }\n\n          scheduleContextWorkOnParentPath(fiber.return, renderLanes, workInProgress); // Mark the updated lanes on the list, too.\n\n          list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n          // dependency list.\n\n          break;\n        }\n\n        dependency = dependency.next;\n      }\n    } else if (fiber.tag === ContextProvider) {\n      // Don't scan deeper if this is a matching provider\n      nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n    } else if (fiber.tag === DehydratedFragment) {\n      // If a dehydrated suspense boundary is in this subtree, we don't know\n      // if it will have any context consumers in it. The best we can do is\n      // mark it as having updates.\n      var parentSuspense = fiber.return;\n\n      if (parentSuspense === null) {\n        throw new Error('We just came from a parent so we must have had a parent. This is a bug in React.');\n      }\n\n      parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes);\n      var _alternate = parentSuspense.alternate;\n\n      if (_alternate !== null) {\n        _alternate.lanes = mergeLanes(_alternate.lanes, renderLanes);\n      } // This is intentionally passing this fiber as the parent\n      // because we want to schedule this fiber as having work\n      // on its children. We'll use the childLanes on\n      // this fiber to indicate that a context has changed.\n\n\n      scheduleContextWorkOnParentPath(parentSuspense, renderLanes, workInProgress);\n      nextFiber = fiber.sibling;\n    } else {\n      // Traverse down.\n      nextFiber = fiber.child;\n    }\n\n    if (nextFiber !== null) {\n      // Set the return pointer of the child to the work-in-progress fiber.\n      nextFiber.return = fiber;\n    } else {\n      // No child. Traverse to next sibling.\n      nextFiber = fiber;\n\n      while (nextFiber !== null) {\n        if (nextFiber === workInProgress) {\n          // We're back to the root of this subtree. Exit.\n          nextFiber = null;\n          break;\n        }\n\n        var sibling = nextFiber.sibling;\n\n        if (sibling !== null) {\n          // Set the return pointer of the sibling to the work-in-progress fiber.\n          sibling.return = nextFiber.return;\n          nextFiber = sibling;\n          break;\n        } // No more siblings. Traverse up.\n\n\n        nextFiber = nextFiber.return;\n      }\n    }\n\n    fiber = nextFiber;\n  }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n  currentlyRenderingFiber = workInProgress;\n  lastContextDependency = null;\n  lastFullyObservedContext = null;\n  var dependencies = workInProgress.dependencies;\n\n  if (dependencies !== null) {\n    {\n      var firstContext = dependencies.firstContext;\n\n      if (firstContext !== null) {\n        if (includesSomeLane(dependencies.lanes, renderLanes)) {\n          // Context list has a pending update. Mark that this fiber performed work.\n          markWorkInProgressReceivedUpdate();\n        } // Reset the work-in-progress list\n\n\n        dependencies.firstContext = null;\n      }\n    }\n  }\n}\nfunction readContext(context) {\n  {\n    // This warning would fire if you read context inside a Hook like useMemo.\n    // Unlike the class check below, it's not enforced in production for perf.\n    if (isDisallowedContextReadInDEV) {\n      error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n    }\n  }\n\n  var value =  context._currentValue ;\n\n  if (lastFullyObservedContext === context) ; else {\n    var contextItem = {\n      context: context,\n      memoizedValue: value,\n      next: null\n    };\n\n    if (lastContextDependency === null) {\n      if (currentlyRenderingFiber === null) {\n        throw new Error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n      } // This is the first dependency for this component. Create a new list.\n\n\n      lastContextDependency = contextItem;\n      currentlyRenderingFiber.dependencies = {\n        lanes: NoLanes,\n        firstContext: contextItem\n      };\n    } else {\n      // Append a new context item.\n      lastContextDependency = lastContextDependency.next = contextItem;\n    }\n  }\n\n  return value;\n}\n\n// render. When this render exits, either because it finishes or because it is\n// interrupted, the interleaved updates will be transferred onto the main part\n// of the queue.\n\nvar concurrentQueues = null;\nfunction pushConcurrentUpdateQueue(queue) {\n  if (concurrentQueues === null) {\n    concurrentQueues = [queue];\n  } else {\n    concurrentQueues.push(queue);\n  }\n}\nfunction finishQueueingConcurrentUpdates() {\n  // Transfer the interleaved updates onto the main queue. Each queue has a\n  // `pending` field and an `interleaved` field. When they are not null, they\n  // point to the last node in a circular linked list. We need to append the\n  // interleaved list to the end of the pending list by joining them into a\n  // single, circular list.\n  if (concurrentQueues !== null) {\n    for (var i = 0; i < concurrentQueues.length; i++) {\n      var queue = concurrentQueues[i];\n      var lastInterleavedUpdate = queue.interleaved;\n\n      if (lastInterleavedUpdate !== null) {\n        queue.interleaved = null;\n        var firstInterleavedUpdate = lastInterleavedUpdate.next;\n        var lastPendingUpdate = queue.pending;\n\n        if (lastPendingUpdate !== null) {\n          var firstPendingUpdate = lastPendingUpdate.next;\n          lastPendingUpdate.next = firstInterleavedUpdate;\n          lastInterleavedUpdate.next = firstPendingUpdate;\n        }\n\n        queue.pending = lastInterleavedUpdate;\n      }\n    }\n\n    concurrentQueues = null;\n  }\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n  var interleaved = queue.interleaved;\n\n  if (interleaved === null) {\n    // This is the first update. Create a circular list.\n    update.next = update; // At the end of the current render, this queue's interleaved updates will\n    // be transferred to the pending queue.\n\n    pushConcurrentUpdateQueue(queue);\n  } else {\n    update.next = interleaved.next;\n    interleaved.next = update;\n  }\n\n  queue.interleaved = update;\n  return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {\n  var interleaved = queue.interleaved;\n\n  if (interleaved === null) {\n    // This is the first update. Create a circular list.\n    update.next = update; // At the end of the current render, this queue's interleaved updates will\n    // be transferred to the pending queue.\n\n    pushConcurrentUpdateQueue(queue);\n  } else {\n    update.next = interleaved.next;\n    interleaved.next = update;\n  }\n\n  queue.interleaved = update;\n}\nfunction enqueueConcurrentClassUpdate(fiber, queue, update, lane) {\n  var interleaved = queue.interleaved;\n\n  if (interleaved === null) {\n    // This is the first update. Create a circular list.\n    update.next = update; // At the end of the current render, this queue's interleaved updates will\n    // be transferred to the pending queue.\n\n    pushConcurrentUpdateQueue(queue);\n  } else {\n    update.next = interleaved.next;\n    interleaved.next = update;\n  }\n\n  queue.interleaved = update;\n  return markUpdateLaneFromFiberToRoot(fiber, lane);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n  return markUpdateLaneFromFiberToRoot(fiber, lane);\n} // Calling this function outside this module should only be done for backwards\n// compatibility and should always be accompanied by a warning.\n\nvar unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n  // Update the source fiber's lanes\n  sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n  var alternate = sourceFiber.alternate;\n\n  if (alternate !== null) {\n    alternate.lanes = mergeLanes(alternate.lanes, lane);\n  }\n\n  {\n    if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n      warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n    }\n  } // Walk the parent path to the root and update the child lanes.\n\n\n  var node = sourceFiber;\n  var parent = sourceFiber.return;\n\n  while (parent !== null) {\n    parent.childLanes = mergeLanes(parent.childLanes, lane);\n    alternate = parent.alternate;\n\n    if (alternate !== null) {\n      alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n    } else {\n      {\n        if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n          warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n        }\n      }\n    }\n\n    node = parent;\n    parent = parent.return;\n  }\n\n  if (node.tag === HostRoot) {\n    var root = node.stateNode;\n    return root;\n  } else {\n    return null;\n  }\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n  didWarnUpdateInsideUpdate = false;\n  currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n  var queue = {\n    baseState: fiber.memoizedState,\n    firstBaseUpdate: null,\n    lastBaseUpdate: null,\n    shared: {\n      pending: null,\n      interleaved: null,\n      lanes: NoLanes\n    },\n    effects: null\n  };\n  fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n  // Clone the update queue from current. Unless it's already a clone.\n  var queue = workInProgress.updateQueue;\n  var currentQueue = current.updateQueue;\n\n  if (queue === currentQueue) {\n    var clone = {\n      baseState: currentQueue.baseState,\n      firstBaseUpdate: currentQueue.firstBaseUpdate,\n      lastBaseUpdate: currentQueue.lastBaseUpdate,\n      shared: currentQueue.shared,\n      effects: currentQueue.effects\n    };\n    workInProgress.updateQueue = clone;\n  }\n}\nfunction createUpdate(eventTime, lane) {\n  var update = {\n    eventTime: eventTime,\n    lane: lane,\n    tag: UpdateState,\n    payload: null,\n    callback: null,\n    next: null\n  };\n  return update;\n}\nfunction enqueueUpdate(fiber, update, lane) {\n  var updateQueue = fiber.updateQueue;\n\n  if (updateQueue === null) {\n    // Only occurs if the fiber has been unmounted.\n    return null;\n  }\n\n  var sharedQueue = updateQueue.shared;\n\n  {\n    if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n      error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n      didWarnUpdateInsideUpdate = true;\n    }\n  }\n\n  if (isUnsafeClassRenderPhaseUpdate()) {\n    // This is an unsafe render phase update. Add directly to the update\n    // queue so we can process it immediately during the current render.\n    var pending = sharedQueue.pending;\n\n    if (pending === null) {\n      // This is the first update. Create a circular list.\n      update.next = update;\n    } else {\n      update.next = pending.next;\n      pending.next = update;\n    }\n\n    sharedQueue.pending = update; // Update the childLanes even though we're most likely already rendering\n    // this fiber. This is for backwards compatibility in the case where you\n    // update a different component during render phase than the one that is\n    // currently renderings (a pattern that is accompanied by a warning).\n\n    return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);\n  } else {\n    return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);\n  }\n}\nfunction entangleTransitions(root, fiber, lane) {\n  var updateQueue = fiber.updateQueue;\n\n  if (updateQueue === null) {\n    // Only occurs if the fiber has been unmounted.\n    return;\n  }\n\n  var sharedQueue = updateQueue.shared;\n\n  if (isTransitionLane(lane)) {\n    var queueLanes = sharedQueue.lanes; // If any entangled lanes are no longer pending on the root, then they must\n    // have finished. We can remove them from the shared queue, which represents\n    // a superset of the actually pending lanes. In some cases we may entangle\n    // more than we need to, but that's OK. In fact it's worse if we *don't*\n    // entangle when we should.\n\n    queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n    var newQueueLanes = mergeLanes(queueLanes, lane);\n    sharedQueue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n    // the lane finished since the last time we entangled it. So we need to\n    // entangle it again, just to be sure.\n\n    markRootEntangled(root, newQueueLanes);\n  }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n  // Captured updates are updates that are thrown by a child during the render\n  // phase. They should be discarded if the render is aborted. Therefore,\n  // we should only put them on the work-in-progress queue, not the current one.\n  var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n  var current = workInProgress.alternate;\n\n  if (current !== null) {\n    var currentQueue = current.updateQueue;\n\n    if (queue === currentQueue) {\n      // The work-in-progress queue is the same as current. This happens when\n      // we bail out on a parent fiber that then captures an error thrown by\n      // a child. Since we want to append the update only to the work-in\n      // -progress queue, we need to clone the updates. We usually clone during\n      // processUpdateQueue, but that didn't happen in this case because we\n      // skipped over the parent when we bailed out.\n      var newFirst = null;\n      var newLast = null;\n      var firstBaseUpdate = queue.firstBaseUpdate;\n\n      if (firstBaseUpdate !== null) {\n        // Loop through the updates and clone them.\n        var update = firstBaseUpdate;\n\n        do {\n          var clone = {\n            eventTime: update.eventTime,\n            lane: update.lane,\n            tag: update.tag,\n            payload: update.payload,\n            callback: update.callback,\n            next: null\n          };\n\n          if (newLast === null) {\n            newFirst = newLast = clone;\n          } else {\n            newLast.next = clone;\n            newLast = clone;\n          }\n\n          update = update.next;\n        } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n        if (newLast === null) {\n          newFirst = newLast = capturedUpdate;\n        } else {\n          newLast.next = capturedUpdate;\n          newLast = capturedUpdate;\n        }\n      } else {\n        // There are no base updates.\n        newFirst = newLast = capturedUpdate;\n      }\n\n      queue = {\n        baseState: currentQueue.baseState,\n        firstBaseUpdate: newFirst,\n        lastBaseUpdate: newLast,\n        shared: currentQueue.shared,\n        effects: currentQueue.effects\n      };\n      workInProgress.updateQueue = queue;\n      return;\n    }\n  } // Append the update to the end of the list.\n\n\n  var lastBaseUpdate = queue.lastBaseUpdate;\n\n  if (lastBaseUpdate === null) {\n    queue.firstBaseUpdate = capturedUpdate;\n  } else {\n    lastBaseUpdate.next = capturedUpdate;\n  }\n\n  queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n  switch (update.tag) {\n    case ReplaceState:\n      {\n        var payload = update.payload;\n\n        if (typeof payload === 'function') {\n          // Updater function\n          {\n            enterDisallowedContextReadInDEV();\n          }\n\n          var nextState = payload.call(instance, prevState, nextProps);\n\n          {\n            if ( workInProgress.mode & StrictLegacyMode) {\n              setIsStrictModeForDevtools(true);\n\n              try {\n                payload.call(instance, prevState, nextProps);\n              } finally {\n                setIsStrictModeForDevtools(false);\n              }\n            }\n\n            exitDisallowedContextReadInDEV();\n          }\n\n          return nextState;\n        } // State object\n\n\n        return payload;\n      }\n\n    case CaptureUpdate:\n      {\n        workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n      }\n    // Intentional fallthrough\n\n    case UpdateState:\n      {\n        var _payload = update.payload;\n        var partialState;\n\n        if (typeof _payload === 'function') {\n          // Updater function\n          {\n            enterDisallowedContextReadInDEV();\n          }\n\n          partialState = _payload.call(instance, prevState, nextProps);\n\n          {\n            if ( workInProgress.mode & StrictLegacyMode) {\n              setIsStrictModeForDevtools(true);\n\n              try {\n                _payload.call(instance, prevState, nextProps);\n              } finally {\n                setIsStrictModeForDevtools(false);\n              }\n            }\n\n            exitDisallowedContextReadInDEV();\n          }\n        } else {\n          // Partial state object\n          partialState = _payload;\n        }\n\n        if (partialState === null || partialState === undefined) {\n          // Null and undefined are treated as no-ops.\n          return prevState;\n        } // Merge the partial state and the previous state.\n\n\n        return assign({}, prevState, partialState);\n      }\n\n    case ForceUpdate:\n      {\n        hasForceUpdate = true;\n        return prevState;\n      }\n  }\n\n  return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n  // This is always non-null on a ClassComponent or HostRoot\n  var queue = workInProgress.updateQueue;\n  hasForceUpdate = false;\n\n  {\n    currentlyProcessingQueue = queue.shared;\n  }\n\n  var firstBaseUpdate = queue.firstBaseUpdate;\n  var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n  var pendingQueue = queue.shared.pending;\n\n  if (pendingQueue !== null) {\n    queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n    // and last so that it's non-circular.\n\n    var lastPendingUpdate = pendingQueue;\n    var firstPendingUpdate = lastPendingUpdate.next;\n    lastPendingUpdate.next = null; // Append pending updates to base queue\n\n    if (lastBaseUpdate === null) {\n      firstBaseUpdate = firstPendingUpdate;\n    } else {\n      lastBaseUpdate.next = firstPendingUpdate;\n    }\n\n    lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n    // we need to transfer the updates to that queue, too. Because the base\n    // queue is a singly-linked list with no cycles, we can append to both\n    // lists and take advantage of structural sharing.\n    // TODO: Pass `current` as argument\n\n    var current = workInProgress.alternate;\n\n    if (current !== null) {\n      // This is always non-null on a ClassComponent or HostRoot\n      var currentQueue = current.updateQueue;\n      var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n      if (currentLastBaseUpdate !== lastBaseUpdate) {\n        if (currentLastBaseUpdate === null) {\n          currentQueue.firstBaseUpdate = firstPendingUpdate;\n        } else {\n          currentLastBaseUpdate.next = firstPendingUpdate;\n        }\n\n        currentQueue.lastBaseUpdate = lastPendingUpdate;\n      }\n    }\n  } // These values may change as we process the queue.\n\n\n  if (firstBaseUpdate !== null) {\n    // Iterate through the list of updates to compute the result.\n    var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n    // from the original lanes.\n\n    var newLanes = NoLanes;\n    var newBaseState = null;\n    var newFirstBaseUpdate = null;\n    var newLastBaseUpdate = null;\n    var update = firstBaseUpdate;\n\n    do {\n      var updateLane = update.lane;\n      var updateEventTime = update.eventTime;\n\n      if (!isSubsetOfLanes(renderLanes, updateLane)) {\n        // Priority is insufficient. Skip this update. If this is the first\n        // skipped update, the previous update/state is the new base\n        // update/state.\n        var clone = {\n          eventTime: updateEventTime,\n          lane: updateLane,\n          tag: update.tag,\n          payload: update.payload,\n          callback: update.callback,\n          next: null\n        };\n\n        if (newLastBaseUpdate === null) {\n          newFirstBaseUpdate = newLastBaseUpdate = clone;\n          newBaseState = newState;\n        } else {\n          newLastBaseUpdate = newLastBaseUpdate.next = clone;\n        } // Update the remaining priority in the queue.\n\n\n        newLanes = mergeLanes(newLanes, updateLane);\n      } else {\n        // This update does have sufficient priority.\n        if (newLastBaseUpdate !== null) {\n          var _clone = {\n            eventTime: updateEventTime,\n            // This update is going to be committed so we never want uncommit\n            // it. Using NoLane works because 0 is a subset of all bitmasks, so\n            // this will never be skipped by the check above.\n            lane: NoLane,\n            tag: update.tag,\n            payload: update.payload,\n            callback: update.callback,\n            next: null\n          };\n          newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n        } // Process this update.\n\n\n        newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n        var callback = update.callback;\n\n        if (callback !== null && // If the update was already committed, we should not queue its\n        // callback again.\n        update.lane !== NoLane) {\n          workInProgress.flags |= Callback;\n          var effects = queue.effects;\n\n          if (effects === null) {\n            queue.effects = [update];\n          } else {\n            effects.push(update);\n          }\n        }\n      }\n\n      update = update.next;\n\n      if (update === null) {\n        pendingQueue = queue.shared.pending;\n\n        if (pendingQueue === null) {\n          break;\n        } else {\n          // An update was scheduled from inside a reducer. Add the new\n          // pending updates to the end of the list and keep processing.\n          var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n          // unravel them when transferring them to the base queue.\n\n          var _firstPendingUpdate = _lastPendingUpdate.next;\n          _lastPendingUpdate.next = null;\n          update = _firstPendingUpdate;\n          queue.lastBaseUpdate = _lastPendingUpdate;\n          queue.shared.pending = null;\n        }\n      }\n    } while (true);\n\n    if (newLastBaseUpdate === null) {\n      newBaseState = newState;\n    }\n\n    queue.baseState = newBaseState;\n    queue.firstBaseUpdate = newFirstBaseUpdate;\n    queue.lastBaseUpdate = newLastBaseUpdate; // Interleaved updates are stored on a separate queue. We aren't going to\n    // process them during this render, but we do need to track which lanes\n    // are remaining.\n\n    var lastInterleaved = queue.shared.interleaved;\n\n    if (lastInterleaved !== null) {\n      var interleaved = lastInterleaved;\n\n      do {\n        newLanes = mergeLanes(newLanes, interleaved.lane);\n        interleaved = interleaved.next;\n      } while (interleaved !== lastInterleaved);\n    } else if (firstBaseUpdate === null) {\n      // `queue.lanes` is used for entangling transitions. We can set it back to\n      // zero once the queue is empty.\n      queue.shared.lanes = NoLanes;\n    } // Set the remaining expiration time to be whatever is remaining in the queue.\n    // This should be fine because the only two other things that contribute to\n    // expiration time are props and context. We're already in the middle of the\n    // begin phase by the time we start processing the queue, so we've already\n    // dealt with the props. Context in components that specify\n    // shouldComponentUpdate is tricky; but we'll have to account for\n    // that regardless.\n\n\n    markSkippedUpdateLanes(newLanes);\n    workInProgress.lanes = newLanes;\n    workInProgress.memoizedState = newState;\n  }\n\n  {\n    currentlyProcessingQueue = null;\n  }\n}\n\nfunction callCallback(callback, context) {\n  if (typeof callback !== 'function') {\n    throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + (\"received: \" + callback));\n  }\n\n  callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n  hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n  return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n  // Commit the effects\n  var effects = finishedQueue.effects;\n  finishedQueue.effects = null;\n\n  if (effects !== null) {\n    for (var i = 0; i < effects.length; i++) {\n      var effect = effects[i];\n      var callback = effect.callback;\n\n      if (callback !== null) {\n        effect.callback = null;\n        callCallback(callback, instance);\n      }\n    }\n  }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n  if (c === NO_CONTEXT) {\n    throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n  }\n\n  return c;\n}\n\nfunction getRootHostContainer() {\n  var rootInstance = requiredContext(rootInstanceStackCursor.current);\n  return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n  // Push current root instance onto the stack;\n  // This allows us to reset root when portals are popped.\n  push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n  // This enables us to pop only Fibers that provide unique contexts.\n\n  push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n  // However, we can't just call getRootHostContext() and push it because\n  // we'd have a different number of entries on the stack depending on\n  // whether getRootHostContext() throws somewhere in renderer code or not.\n  // So we push an empty value first. This lets us safely unwind on errors.\n\n  push(contextStackCursor$1, NO_CONTEXT, fiber);\n  var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n  pop(contextStackCursor$1, fiber);\n  push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n  pop(contextStackCursor$1, fiber);\n  pop(contextFiberStackCursor, fiber);\n  pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n  var context = requiredContext(contextStackCursor$1.current);\n  return context;\n}\n\nfunction pushHostContext(fiber) {\n  var rootInstance = requiredContext(rootInstanceStackCursor.current);\n  var context = requiredContext(contextStackCursor$1.current);\n  var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n  if (context === nextContext) {\n    return;\n  } // Track the context and the Fiber that provided it.\n  // This enables us to pop only Fibers that provide unique contexts.\n\n\n  push(contextFiberStackCursor, fiber, fiber);\n  push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n  // Do not pop unless this Fiber provided the current context.\n  // pushHostContext() only pushes Fibers that provide unique contexts.\n  if (contextFiberStackCursor.current !== fiber) {\n    return;\n  }\n\n  pop(contextStackCursor$1, fiber);\n  pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n  return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n  return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n  return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n  return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n  push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n  pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n  // If it was the primary children that just suspended, capture and render the\n  // fallback. Otherwise, don't capture and bubble to the next boundary.\n  var nextState = workInProgress.memoizedState;\n\n  if (nextState !== null) {\n    if (nextState.dehydrated !== null) {\n      // A dehydrated boundary always captures.\n      return true;\n    }\n\n    return false;\n  }\n\n  var props = workInProgress.memoizedProps; // Regular boundaries always capture.\n\n  {\n    return true;\n  } // If it's a boundary we should avoid, then we prefer to bubble up to the\n}\nfunction findFirstSuspended(row) {\n  var node = row;\n\n  while (node !== null) {\n    if (node.tag === SuspenseComponent) {\n      var state = node.memoizedState;\n\n      if (state !== null) {\n        var dehydrated = state.dehydrated;\n\n        if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n          return node;\n        }\n      }\n    } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n    // keep track of whether it suspended or not.\n    node.memoizedProps.revealOrder !== undefined) {\n      var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n      if (didSuspend) {\n        return node;\n      }\n    } else if (node.child !== null) {\n      node.child.return = node;\n      node = node.child;\n      continue;\n    }\n\n    if (node === row) {\n      return null;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === row) {\n        return null;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  }\n\n  return null;\n}\n\nvar NoFlags$1 =\n/*   */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Insertion =\n/*  */\n2;\nvar Layout =\n/*    */\n4;\nvar Passive$1 =\n/*   */\n8;\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nfunction resetWorkInProgressVersions() {\n  for (var i = 0; i < workInProgressSources.length; i++) {\n    var mutableSource = workInProgressSources[i];\n\n    {\n      mutableSource._workInProgressVersionPrimary = null;\n    }\n  }\n\n  workInProgressSources.length = 0;\n}\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n  var getVersion = mutableSource._getVersion;\n  var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n  // Retaining it forever may interfere with GC.\n\n  if (root.mutableSourceEagerHydrationData == null) {\n    root.mutableSourceEagerHydrationData = [mutableSource, version];\n  } else {\n    root.mutableSourceEagerHydrationData.push(mutableSource, version);\n  }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n    ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnUncachedGetSnapshot;\n\n{\n  didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false; // Counts the number of useId hooks in this component.\n\nvar localIdCounter = 0; // Used for ids that are generated completely client-side (i.e. not during\n// hydration). This counter is global, so client ids are not stable across\n// render attempts.\n\nvar globalClientIdCounter = 0;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n  {\n    var hookName = currentHookNameInDev;\n\n    if (hookTypesDev === null) {\n      hookTypesDev = [hookName];\n    } else {\n      hookTypesDev.push(hookName);\n    }\n  }\n}\n\nfunction updateHookTypesDev() {\n  {\n    var hookName = currentHookNameInDev;\n\n    if (hookTypesDev !== null) {\n      hookTypesUpdateIndexDev++;\n\n      if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n        warnOnHookMismatchInDev(hookName);\n      }\n    }\n  }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n  {\n    if (deps !== undefined && deps !== null && !isArray(deps)) {\n      // Verify deps, but only on mount to avoid extra checks.\n      // It's unlikely their type would change as usually you define them inline.\n      error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n    }\n  }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n  {\n    var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);\n\n    if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n      didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n      if (hookTypesDev !== null) {\n        var table = '';\n        var secondColumnStart = 30;\n\n        for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n          var oldHookName = hookTypesDev[i];\n          var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n          var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n          // lol @ IE not supporting String#repeat\n\n          while (row.length < secondColumnStart) {\n            row += ' ';\n          }\n\n          row += newHookName + '\\n';\n          table += row;\n        }\n\n        error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\\n\\n' + '   Previous render            Next render\\n' + '   ------------------------------------------------------\\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n      }\n    }\n  }\n}\n\nfunction throwInvalidHookError() {\n  throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\\n' + '2. You might be breaking the Rules of Hooks\\n' + '3. You might have more than one copy of React in the same app\\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n  {\n    if (ignorePreviousDependencies) {\n      // Only true when this component is being hot reloaded.\n      return false;\n    }\n  }\n\n  if (prevDeps === null) {\n    {\n      error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n    }\n\n    return false;\n  }\n\n  {\n    // Don't bother comparing lengths in prod because these arrays should be\n    // passed inline.\n    if (nextDeps.length !== prevDeps.length) {\n      error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n    }\n  }\n\n  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n    if (objectIs(nextDeps[i], prevDeps[i])) {\n      continue;\n    }\n\n    return false;\n  }\n\n  return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n  renderLanes = nextRenderLanes;\n  currentlyRenderingFiber$1 = workInProgress;\n\n  {\n    hookTypesDev = current !== null ? current._debugHookTypes : null;\n    hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n  }\n\n  workInProgress.memoizedState = null;\n  workInProgress.updateQueue = null;\n  workInProgress.lanes = NoLanes; // The following should have already been reset\n  // currentHook = null;\n  // workInProgressHook = null;\n  // didScheduleRenderPhaseUpdate = false;\n  // localIdCounter = 0;\n  // TODO Warn if no hooks are used at all during mount, then some are used during update.\n  // Currently we will identify the update render as a mount because memoizedState === null.\n  // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n  // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n  // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n  // so memoizedState would be null during updates and mounts.\n\n  {\n    if (current !== null && current.memoizedState !== null) {\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n    } else if (hookTypesDev !== null) {\n      // This dispatcher handles an edge case where a component is updating,\n      // but no stateful hooks have been used.\n      // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n      // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n      // This dispatcher does that.\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n    } else {\n      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n    }\n  }\n\n  var children = Component(props, secondArg); // Check if there was a render phase update\n\n  if (didScheduleRenderPhaseUpdateDuringThisPass) {\n    // Keep rendering in a loop for as long as render phase updates continue to\n    // be scheduled. Use a counter to prevent infinite loops.\n    var numberOfReRenders = 0;\n\n    do {\n      didScheduleRenderPhaseUpdateDuringThisPass = false;\n      localIdCounter = 0;\n\n      if (numberOfReRenders >= RE_RENDER_LIMIT) {\n        throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');\n      }\n\n      numberOfReRenders += 1;\n\n      {\n        // Even when hot reloading, allow dependencies to stabilize\n        // after first render to prevent infinite render phase updates.\n        ignorePreviousDependencies = false;\n      } // Start over from the beginning of the list\n\n\n      currentHook = null;\n      workInProgressHook = null;\n      workInProgress.updateQueue = null;\n\n      {\n        // Also validate hook order for cascading updates.\n        hookTypesUpdateIndexDev = -1;\n      }\n\n      ReactCurrentDispatcher$1.current =  HooksDispatcherOnRerenderInDEV ;\n      children = Component(props, secondArg);\n    } while (didScheduleRenderPhaseUpdateDuringThisPass);\n  } // We can assume the previous dispatcher is always this one, since we set it\n  // at the beginning of the render phase and there's no re-entrance.\n\n\n  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n  {\n    workInProgress._debugHookTypes = hookTypesDev;\n  } // This check uses currentHook so that it works the same in DEV and prod bundles.\n  // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n  var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n  renderLanes = NoLanes;\n  currentlyRenderingFiber$1 = null;\n  currentHook = null;\n  workInProgressHook = null;\n\n  {\n    currentHookNameInDev = null;\n    hookTypesDev = null;\n    hookTypesUpdateIndexDev = -1; // Confirm that a static flag was not added or removed since the last\n    // render. If this fires, it suggests that we incorrectly reset the static\n    // flags in some other part of the codebase. This has happened before, for\n    // example, in the SuspenseList implementation.\n\n    if (current !== null && (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird\n    // and creates false positives. To make this work in legacy mode, we'd\n    // need to mark fibers that commit in an incomplete state, somehow. For\n    // now I'll disable the warning that most of the bugs that would trigger\n    // it are either exclusive to concurrent mode or exist in both.\n    (current.mode & ConcurrentMode) !== NoMode) {\n      error('Internal React error: Expected static flag was missing. Please ' + 'notify the React team.');\n    }\n  }\n\n  didScheduleRenderPhaseUpdate = false; // This is reset by checkDidRenderIdHook\n  // localIdCounter = 0;\n\n  if (didRenderTooFewHooks) {\n    throw new Error('Rendered fewer hooks than expected. This may be caused by an accidental ' + 'early return statement.');\n  }\n\n  return children;\n}\nfunction checkDidRenderIdHook() {\n  // This should be called immediately after every renderWithHooks call.\n  // Conceptually, it's part of the return value of renderWithHooks; it's only a\n  // separate function to avoid using an array tuple.\n  var didRenderIdHook = localIdCounter !== 0;\n  localIdCounter = 0;\n  return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n  workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the\n  // complete phase (bubbleProperties).\n\n  if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n    workInProgress.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);\n  } else {\n    workInProgress.flags &= ~(Passive | Update);\n  }\n\n  current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n  // We can assume the previous dispatcher is always this one, since we set it\n  // at the beginning of the render phase and there's no re-entrance.\n  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n  if (didScheduleRenderPhaseUpdate) {\n    // There were render phase updates. These are only valid for this render\n    // phase, which we are now aborting. Remove the updates from the queues so\n    // they do not persist to the next render. Do not remove updates from hooks\n    // that weren't processed.\n    //\n    // Only reset the updates from the queue if it has a clone. If it does\n    // not have a clone, that means it wasn't processed, and the updates were\n    // scheduled before we entered the render phase.\n    var hook = currentlyRenderingFiber$1.memoizedState;\n\n    while (hook !== null) {\n      var queue = hook.queue;\n\n      if (queue !== null) {\n        queue.pending = null;\n      }\n\n      hook = hook.next;\n    }\n\n    didScheduleRenderPhaseUpdate = false;\n  }\n\n  renderLanes = NoLanes;\n  currentlyRenderingFiber$1 = null;\n  currentHook = null;\n  workInProgressHook = null;\n\n  {\n    hookTypesDev = null;\n    hookTypesUpdateIndexDev = -1;\n    currentHookNameInDev = null;\n    isUpdatingOpaqueValueInRenderPhase = false;\n  }\n\n  didScheduleRenderPhaseUpdateDuringThisPass = false;\n  localIdCounter = 0;\n}\n\nfunction mountWorkInProgressHook() {\n  var hook = {\n    memoizedState: null,\n    baseState: null,\n    baseQueue: null,\n    queue: null,\n    next: null\n  };\n\n  if (workInProgressHook === null) {\n    // This is the first hook in the list\n    currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n  } else {\n    // Append to the end of the list\n    workInProgressHook = workInProgressHook.next = hook;\n  }\n\n  return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n  // This function is used both for updates and for re-renders triggered by a\n  // render phase update. It assumes there is either a current hook we can\n  // clone, or a work-in-progress hook from a previous render pass that we can\n  // use as a base. When we reach the end of the base list, we must switch to\n  // the dispatcher used for mounts.\n  var nextCurrentHook;\n\n  if (currentHook === null) {\n    var current = currentlyRenderingFiber$1.alternate;\n\n    if (current !== null) {\n      nextCurrentHook = current.memoizedState;\n    } else {\n      nextCurrentHook = null;\n    }\n  } else {\n    nextCurrentHook = currentHook.next;\n  }\n\n  var nextWorkInProgressHook;\n\n  if (workInProgressHook === null) {\n    nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n  } else {\n    nextWorkInProgressHook = workInProgressHook.next;\n  }\n\n  if (nextWorkInProgressHook !== null) {\n    // There's already a work-in-progress. Reuse it.\n    workInProgressHook = nextWorkInProgressHook;\n    nextWorkInProgressHook = workInProgressHook.next;\n    currentHook = nextCurrentHook;\n  } else {\n    // Clone from the current hook.\n    if (nextCurrentHook === null) {\n      throw new Error('Rendered more hooks than during the previous render.');\n    }\n\n    currentHook = nextCurrentHook;\n    var newHook = {\n      memoizedState: currentHook.memoizedState,\n      baseState: currentHook.baseState,\n      baseQueue: currentHook.baseQueue,\n      queue: currentHook.queue,\n      next: null\n    };\n\n    if (workInProgressHook === null) {\n      // This is the first hook in the list.\n      currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n    } else {\n      // Append to the end of the list.\n      workInProgressHook = workInProgressHook.next = newHook;\n    }\n  }\n\n  return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n  return {\n    lastEffect: null,\n    stores: null\n  };\n}\n\nfunction basicStateReducer(state, action) {\n  // $FlowFixMe: Flow doesn't like mixed types\n  return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n  var hook = mountWorkInProgressHook();\n  var initialState;\n\n  if (init !== undefined) {\n    initialState = init(initialArg);\n  } else {\n    initialState = initialArg;\n  }\n\n  hook.memoizedState = hook.baseState = initialState;\n  var queue = {\n    pending: null,\n    interleaved: null,\n    lanes: NoLanes,\n    dispatch: null,\n    lastRenderedReducer: reducer,\n    lastRenderedState: initialState\n  };\n  hook.queue = queue;\n  var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);\n  return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n  var hook = updateWorkInProgressHook();\n  var queue = hook.queue;\n\n  if (queue === null) {\n    throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n  }\n\n  queue.lastRenderedReducer = reducer;\n  var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n  var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n  var pendingQueue = queue.pending;\n\n  if (pendingQueue !== null) {\n    // We have new updates that haven't been processed yet.\n    // We'll add them to the base queue.\n    if (baseQueue !== null) {\n      // Merge the pending queue and the base queue.\n      var baseFirst = baseQueue.next;\n      var pendingFirst = pendingQueue.next;\n      baseQueue.next = pendingFirst;\n      pendingQueue.next = baseFirst;\n    }\n\n    {\n      if (current.baseQueue !== baseQueue) {\n        // Internal invariant that should never happen, but feasibly could in\n        // the future if we implement resuming, or some form of that.\n        error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n      }\n    }\n\n    current.baseQueue = baseQueue = pendingQueue;\n    queue.pending = null;\n  }\n\n  if (baseQueue !== null) {\n    // We have a queue to process.\n    var first = baseQueue.next;\n    var newState = current.baseState;\n    var newBaseState = null;\n    var newBaseQueueFirst = null;\n    var newBaseQueueLast = null;\n    var update = first;\n\n    do {\n      var updateLane = update.lane;\n\n      if (!isSubsetOfLanes(renderLanes, updateLane)) {\n        // Priority is insufficient. Skip this update. If this is the first\n        // skipped update, the previous update/state is the new base\n        // update/state.\n        var clone = {\n          lane: updateLane,\n          action: update.action,\n          hasEagerState: update.hasEagerState,\n          eagerState: update.eagerState,\n          next: null\n        };\n\n        if (newBaseQueueLast === null) {\n          newBaseQueueFirst = newBaseQueueLast = clone;\n          newBaseState = newState;\n        } else {\n          newBaseQueueLast = newBaseQueueLast.next = clone;\n        } // Update the remaining priority in the queue.\n        // TODO: Don't need to accumulate this. Instead, we can remove\n        // renderLanes from the original lanes.\n\n\n        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n        markSkippedUpdateLanes(updateLane);\n      } else {\n        // This update does have sufficient priority.\n        if (newBaseQueueLast !== null) {\n          var _clone = {\n            // This update is going to be committed so we never want uncommit\n            // it. Using NoLane works because 0 is a subset of all bitmasks, so\n            // this will never be skipped by the check above.\n            lane: NoLane,\n            action: update.action,\n            hasEagerState: update.hasEagerState,\n            eagerState: update.eagerState,\n            next: null\n          };\n          newBaseQueueLast = newBaseQueueLast.next = _clone;\n        } // Process this update.\n\n\n        if (update.hasEagerState) {\n          // If this update is a state update (not a reducer) and was processed eagerly,\n          // we can use the eagerly computed state\n          newState = update.eagerState;\n        } else {\n          var action = update.action;\n          newState = reducer(newState, action);\n        }\n      }\n\n      update = update.next;\n    } while (update !== null && update !== first);\n\n    if (newBaseQueueLast === null) {\n      newBaseState = newState;\n    } else {\n      newBaseQueueLast.next = newBaseQueueFirst;\n    } // Mark that the fiber performed work, but only if the new state is\n    // different from the current state.\n\n\n    if (!objectIs(newState, hook.memoizedState)) {\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = newState;\n    hook.baseState = newBaseState;\n    hook.baseQueue = newBaseQueueLast;\n    queue.lastRenderedState = newState;\n  } // Interleaved updates are stored on a separate queue. We aren't going to\n  // process them during this render, but we do need to track which lanes\n  // are remaining.\n\n\n  var lastInterleaved = queue.interleaved;\n\n  if (lastInterleaved !== null) {\n    var interleaved = lastInterleaved;\n\n    do {\n      var interleavedLane = interleaved.lane;\n      currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);\n      markSkippedUpdateLanes(interleavedLane);\n      interleaved = interleaved.next;\n    } while (interleaved !== lastInterleaved);\n  } else if (baseQueue === null) {\n    // `queue.lanes` is used for entangling transitions. We can set it back to\n    // zero once the queue is empty.\n    queue.lanes = NoLanes;\n  }\n\n  var dispatch = queue.dispatch;\n  return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n  var hook = updateWorkInProgressHook();\n  var queue = hook.queue;\n\n  if (queue === null) {\n    throw new Error('Should have a queue. This is likely a bug in React. Please file an issue.');\n  }\n\n  queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n  // work-in-progress hook.\n\n  var dispatch = queue.dispatch;\n  var lastRenderPhaseUpdate = queue.pending;\n  var newState = hook.memoizedState;\n\n  if (lastRenderPhaseUpdate !== null) {\n    // The queue doesn't persist past this render pass.\n    queue.pending = null;\n    var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n    var update = firstRenderPhaseUpdate;\n\n    do {\n      // Process this render phase update. We don't have to check the\n      // priority because it will always be the same as the current\n      // render's.\n      var action = update.action;\n      newState = reducer(newState, action);\n      update = update.next;\n    } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n    // different from the current state.\n\n\n    if (!objectIs(newState, hook.memoizedState)) {\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n    // the base state unless the queue is empty.\n    // TODO: Not sure if this is the desired semantics, but it's what we\n    // do for gDSFP. I can't remember why.\n\n    if (hook.baseQueue === null) {\n      hook.baseState = newState;\n    }\n\n    queue.lastRenderedState = newState;\n  }\n\n  return [newState, dispatch];\n}\n\nfunction mountMutableSource(source, getSnapshot, subscribe) {\n  {\n    return undefined;\n  }\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n  {\n    return undefined;\n  }\n}\n\nfunction mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var fiber = currentlyRenderingFiber$1;\n  var hook = mountWorkInProgressHook();\n  var nextSnapshot;\n  var isHydrating = getIsHydrating();\n\n  if (isHydrating) {\n    if (getServerSnapshot === undefined) {\n      throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');\n    }\n\n    nextSnapshot = getServerSnapshot();\n\n    {\n      if (!didWarnUncachedGetSnapshot) {\n        if (nextSnapshot !== getServerSnapshot()) {\n          error('The result of getServerSnapshot should be cached to avoid an infinite loop');\n\n          didWarnUncachedGetSnapshot = true;\n        }\n      }\n    }\n  } else {\n    nextSnapshot = getSnapshot();\n\n    {\n      if (!didWarnUncachedGetSnapshot) {\n        var cachedSnapshot = getSnapshot();\n\n        if (!objectIs(nextSnapshot, cachedSnapshot)) {\n          error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n          didWarnUncachedGetSnapshot = true;\n        }\n      }\n    } // Unless we're rendering a blocking lane, schedule a consistency check.\n    // Right before committing, we will walk the tree and check if any of the\n    // stores were mutated.\n    //\n    // We won't do this if we're hydrating server-rendered content, because if\n    // the content is stale, it's already visible anyway. Instead we'll patch\n    // it up in a passive effect.\n\n\n    var root = getWorkInProgressRoot();\n\n    if (root === null) {\n      throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n    }\n\n    if (!includesBlockingLane(root, renderLanes)) {\n      pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n    }\n  } // Read the current snapshot from the store on every render. This breaks the\n  // normal rules of React, and only works because store updates are\n  // always synchronous.\n\n\n  hook.memoizedState = nextSnapshot;\n  var inst = {\n    value: nextSnapshot,\n    getSnapshot: getSnapshot\n  };\n  hook.queue = inst; // Schedule an effect to subscribe to the store.\n\n  mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Schedule an effect to update the mutable instance fields. We will update\n  // this whenever subscribe, getSnapshot, or value changes. Because there's no\n  // clean-up function, and we track the deps correctly, we can call pushEffect\n  // directly, without storing any additional state. For the same reason, we\n  // don't need to set a static flag, either.\n  // TODO: We can move this to the passive phase once we add a pre-commit\n  // consistency check. See the next comment.\n\n  fiber.flags |= Passive;\n  pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null);\n  return nextSnapshot;\n}\n\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n  var fiber = currentlyRenderingFiber$1;\n  var hook = updateWorkInProgressHook(); // Read the current snapshot from the store on every render. This breaks the\n  // normal rules of React, and only works because store updates are\n  // always synchronous.\n\n  var nextSnapshot = getSnapshot();\n\n  {\n    if (!didWarnUncachedGetSnapshot) {\n      var cachedSnapshot = getSnapshot();\n\n      if (!objectIs(nextSnapshot, cachedSnapshot)) {\n        error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n        didWarnUncachedGetSnapshot = true;\n      }\n    }\n  }\n\n  var prevSnapshot = hook.memoizedState;\n  var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);\n\n  if (snapshotChanged) {\n    hook.memoizedState = nextSnapshot;\n    markWorkInProgressReceivedUpdate();\n  }\n\n  var inst = hook.queue;\n  updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]); // Whenever getSnapshot or subscribe changes, we need to check in the\n  // commit phase if there was an interleaved mutation. In concurrent mode\n  // this can happen all the time, but even in synchronous mode, an earlier\n  // effect may have mutated the store.\n\n  if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by\n  // checking whether we scheduled a subscription effect above.\n  workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {\n    fiber.flags |= Passive;\n    pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), undefined, null); // Unless we're rendering a blocking lane, schedule a consistency check.\n    // Right before committing, we will walk the tree and check if any of the\n    // stores were mutated.\n\n    var root = getWorkInProgressRoot();\n\n    if (root === null) {\n      throw new Error('Expected a work-in-progress root. This is a bug in React. Please file an issue.');\n    }\n\n    if (!includesBlockingLane(root, renderLanes)) {\n      pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);\n    }\n  }\n\n  return nextSnapshot;\n}\n\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n  fiber.flags |= StoreConsistency;\n  var check = {\n    getSnapshot: getSnapshot,\n    value: renderedSnapshot\n  };\n  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n  if (componentUpdateQueue === null) {\n    componentUpdateQueue = createFunctionComponentUpdateQueue();\n    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n    componentUpdateQueue.stores = [check];\n  } else {\n    var stores = componentUpdateQueue.stores;\n\n    if (stores === null) {\n      componentUpdateQueue.stores = [check];\n    } else {\n      stores.push(check);\n    }\n  }\n}\n\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n  // These are updated in the passive phase\n  inst.value = nextSnapshot;\n  inst.getSnapshot = getSnapshot; // Something may have been mutated in between render and commit. This could\n  // have been in an event that fired before the passive effects, or it could\n  // have been in a layout effect. In that case, we would have used the old\n  // snapsho and getSnapshot values to bail out. We need to check one more time.\n\n  if (checkIfSnapshotChanged(inst)) {\n    // Force a re-render.\n    forceStoreRerender(fiber);\n  }\n}\n\nfunction subscribeToStore(fiber, inst, subscribe) {\n  var handleStoreChange = function () {\n    // The store changed. Check if the snapshot changed since the last time we\n    // read from the store.\n    if (checkIfSnapshotChanged(inst)) {\n      // Force a re-render.\n      forceStoreRerender(fiber);\n    }\n  }; // Subscribe to the store and return a clean-up function.\n\n\n  return subscribe(handleStoreChange);\n}\n\nfunction checkIfSnapshotChanged(inst) {\n  var latestGetSnapshot = inst.getSnapshot;\n  var prevValue = inst.value;\n\n  try {\n    var nextValue = latestGetSnapshot();\n    return !objectIs(prevValue, nextValue);\n  } catch (error) {\n    return true;\n  }\n}\n\nfunction forceStoreRerender(fiber) {\n  var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n  if (root !== null) {\n    scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n  }\n}\n\nfunction mountState(initialState) {\n  var hook = mountWorkInProgressHook();\n\n  if (typeof initialState === 'function') {\n    // $FlowFixMe: Flow doesn't like mixed types\n    initialState = initialState();\n  }\n\n  hook.memoizedState = hook.baseState = initialState;\n  var queue = {\n    pending: null,\n    interleaved: null,\n    lanes: NoLanes,\n    dispatch: null,\n    lastRenderedReducer: basicStateReducer,\n    lastRenderedState: initialState\n  };\n  hook.queue = queue;\n  var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);\n  return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n  return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n  return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n  var effect = {\n    tag: tag,\n    create: create,\n    destroy: destroy,\n    deps: deps,\n    // Circular\n    next: null\n  };\n  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n  if (componentUpdateQueue === null) {\n    componentUpdateQueue = createFunctionComponentUpdateQueue();\n    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n    componentUpdateQueue.lastEffect = effect.next = effect;\n  } else {\n    var lastEffect = componentUpdateQueue.lastEffect;\n\n    if (lastEffect === null) {\n      componentUpdateQueue.lastEffect = effect.next = effect;\n    } else {\n      var firstEffect = lastEffect.next;\n      lastEffect.next = effect;\n      effect.next = firstEffect;\n      componentUpdateQueue.lastEffect = effect;\n    }\n  }\n\n  return effect;\n}\n\nfunction mountRef(initialValue) {\n  var hook = mountWorkInProgressHook();\n\n  {\n    var _ref2 = {\n      current: initialValue\n    };\n    hook.memoizedState = _ref2;\n    return _ref2;\n  }\n}\n\nfunction updateRef(initialValue) {\n  var hook = updateWorkInProgressHook();\n  return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  currentlyRenderingFiber$1.flags |= fiberFlags;\n  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var destroy = undefined;\n\n  if (currentHook !== null) {\n    var prevEffect = currentHook.memoizedState;\n    destroy = prevEffect.destroy;\n\n    if (nextDeps !== null) {\n      var prevDeps = prevEffect.deps;\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);\n        return;\n      }\n    }\n  }\n\n  currentlyRenderingFiber$1.flags |= fiberFlags;\n  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);\n  } else {\n    return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);\n  }\n}\n\nfunction updateEffect(create, deps) {\n  return updateEffectImpl(Passive, Passive$1, create, deps);\n}\n\nfunction mountInsertionEffect(create, deps) {\n  return mountEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction updateInsertionEffect(create, deps) {\n  return updateEffectImpl(Update, Insertion, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n  var fiberFlags = Update;\n\n  {\n    fiberFlags |= LayoutStatic;\n  }\n\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    fiberFlags |= MountLayoutDev;\n  }\n\n  return mountEffectImpl(fiberFlags, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n  return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n  if (typeof ref === 'function') {\n    var refCallback = ref;\n\n    var _inst = create();\n\n    refCallback(_inst);\n    return function () {\n      refCallback(null);\n    };\n  } else if (ref !== null && ref !== undefined) {\n    var refObject = ref;\n\n    {\n      if (!refObject.hasOwnProperty('current')) {\n        error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n      }\n    }\n\n    var _inst2 = create();\n\n    refObject.current = _inst2;\n    return function () {\n      refObject.current = null;\n    };\n  }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n  {\n    if (typeof create !== 'function') {\n      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n    }\n  } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n  var fiberFlags = Update;\n\n  {\n    fiberFlags |= LayoutStatic;\n  }\n\n  if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {\n    fiberFlags |= MountLayoutDev;\n  }\n\n  return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n  {\n    if (typeof create !== 'function') {\n      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n    }\n  } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n  return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n  // The react-debug-hooks package injects its own implementation\n  // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  hook.memoizedState = [callback, nextDeps];\n  return callback;\n}\n\nfunction updateCallback(callback, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var prevState = hook.memoizedState;\n\n  if (prevState !== null) {\n    if (nextDeps !== null) {\n      var prevDeps = prevState[1];\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        return prevState[0];\n      }\n    }\n  }\n\n  hook.memoizedState = [callback, nextDeps];\n  return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n  var hook = mountWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var nextValue = nextCreate();\n  hook.memoizedState = [nextValue, nextDeps];\n  return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n  var hook = updateWorkInProgressHook();\n  var nextDeps = deps === undefined ? null : deps;\n  var prevState = hook.memoizedState;\n\n  if (prevState !== null) {\n    // Assume these are defined. If they're not, areHookInputsEqual will warn.\n    if (nextDeps !== null) {\n      var prevDeps = prevState[1];\n\n      if (areHookInputsEqual(nextDeps, prevDeps)) {\n        return prevState[0];\n      }\n    }\n  }\n\n  var nextValue = nextCreate();\n  hook.memoizedState = [nextValue, nextDeps];\n  return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n  var hook = mountWorkInProgressHook();\n  hook.memoizedState = value;\n  return value;\n}\n\nfunction updateDeferredValue(value) {\n  var hook = updateWorkInProgressHook();\n  var resolvedCurrentHook = currentHook;\n  var prevValue = resolvedCurrentHook.memoizedState;\n  return updateDeferredValueImpl(hook, prevValue, value);\n}\n\nfunction rerenderDeferredValue(value) {\n  var hook = updateWorkInProgressHook();\n\n  if (currentHook === null) {\n    // This is a rerender during a mount.\n    hook.memoizedState = value;\n    return value;\n  } else {\n    // This is a rerender during an update.\n    var prevValue = currentHook.memoizedState;\n    return updateDeferredValueImpl(hook, prevValue, value);\n  }\n}\n\nfunction updateDeferredValueImpl(hook, prevValue, value) {\n  var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);\n\n  if (shouldDeferValue) {\n    // This is an urgent update. If the value has changed, keep using the\n    // previous value and spawn a deferred render to update it later.\n    if (!objectIs(value, prevValue)) {\n      // Schedule a deferred render\n      var deferredLane = claimNextTransitionLane();\n      currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);\n      markSkippedUpdateLanes(deferredLane); // Set this to true to indicate that the rendered value is inconsistent\n      // from the latest value. The name \"baseState\" doesn't really match how we\n      // use it because we're reusing a state hook field instead of creating a\n      // new one.\n\n      hook.baseState = true;\n    } // Reuse the previous value\n\n\n    return prevValue;\n  } else {\n    // This is not an urgent update, so we can use the latest value regardless\n    // of what it is. No need to defer it.\n    // However, if we're currently inside a spawned render, then we need to mark\n    // this as an update to prevent the fiber from bailing out.\n    //\n    // `baseState` is true when the current value is different from the rendered\n    // value. The name doesn't really match how we use it because we're reusing\n    // a state hook field instead of creating a new one.\n    if (hook.baseState) {\n      // Flip this back to false.\n      hook.baseState = false;\n      markWorkInProgressReceivedUpdate();\n    }\n\n    hook.memoizedState = value;\n    return value;\n  }\n}\n\nfunction startTransition(setPending, callback, options) {\n  var previousPriority = getCurrentUpdatePriority();\n  setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));\n  setPending(true);\n  var prevTransition = ReactCurrentBatchConfig$2.transition;\n  ReactCurrentBatchConfig$2.transition = {};\n  var currentTransition = ReactCurrentBatchConfig$2.transition;\n\n  {\n    ReactCurrentBatchConfig$2.transition._updatedFibers = new Set();\n  }\n\n  try {\n    setPending(false);\n    callback();\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$2.transition = prevTransition;\n\n    {\n      if (prevTransition === null && currentTransition._updatedFibers) {\n        var updatedFibersCount = currentTransition._updatedFibers.size;\n\n        if (updatedFibersCount > 10) {\n          warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');\n        }\n\n        currentTransition._updatedFibers.clear();\n      }\n    }\n  }\n}\n\nfunction mountTransition() {\n  var _mountState = mountState(false),\n      isPending = _mountState[0],\n      setPending = _mountState[1]; // The `start` method never changes.\n\n\n  var start = startTransition.bind(null, setPending);\n  var hook = mountWorkInProgressHook();\n  hook.memoizedState = start;\n  return [isPending, start];\n}\n\nfunction updateTransition() {\n  var _updateState = updateState(),\n      isPending = _updateState[0];\n\n  var hook = updateWorkInProgressHook();\n  var start = hook.memoizedState;\n  return [isPending, start];\n}\n\nfunction rerenderTransition() {\n  var _rerenderState = rerenderState(),\n      isPending = _rerenderState[0];\n\n  var hook = updateWorkInProgressHook();\n  var start = hook.memoizedState;\n  return [isPending, start];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n  {\n    return isUpdatingOpaqueValueInRenderPhase;\n  }\n}\n\nfunction mountId() {\n  var hook = mountWorkInProgressHook();\n  var root = getWorkInProgressRoot(); // TODO: In Fizz, id generation is specific to each server config. Maybe we\n  // should do this in Fiber, too? Deferring this decision for now because\n  // there's no other place to store the prefix except for an internal field on\n  // the public createRoot object, which the fiber tree does not currently have\n  // a reference to.\n\n  var identifierPrefix = root.identifierPrefix;\n  var id;\n\n  if (getIsHydrating()) {\n    var treeId = getTreeId(); // Use a captial R prefix for server-generated ids.\n\n    id = ':' + identifierPrefix + 'R' + treeId; // Unless this is the first id at this level, append a number at the end\n    // that represents the position of this useId hook among all the useId\n    // hooks for this fiber.\n\n    var localId = localIdCounter++;\n\n    if (localId > 0) {\n      id += 'H' + localId.toString(32);\n    }\n\n    id += ':';\n  } else {\n    // Use a lowercase r prefix for client-generated ids.\n    var globalClientId = globalClientIdCounter++;\n    id = ':' + identifierPrefix + 'r' + globalClientId.toString(32) + ':';\n  }\n\n  hook.memoizedState = id;\n  return id;\n}\n\nfunction updateId() {\n  var hook = updateWorkInProgressHook();\n  var id = hook.memoizedState;\n  return id;\n}\n\nfunction dispatchReducerAction(fiber, queue, action) {\n  {\n    if (typeof arguments[3] === 'function') {\n      error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n    }\n  }\n\n  var lane = requestUpdateLane(fiber);\n  var update = {\n    lane: lane,\n    action: action,\n    hasEagerState: false,\n    eagerState: null,\n    next: null\n  };\n\n  if (isRenderPhaseUpdate(fiber)) {\n    enqueueRenderPhaseUpdate(queue, update);\n  } else {\n    var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n    if (root !== null) {\n      var eventTime = requestEventTime();\n      scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n      entangleTransitionUpdate(root, queue, lane);\n    }\n  }\n\n  markUpdateInDevTools(fiber, lane);\n}\n\nfunction dispatchSetState(fiber, queue, action) {\n  {\n    if (typeof arguments[3] === 'function') {\n      error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n    }\n  }\n\n  var lane = requestUpdateLane(fiber);\n  var update = {\n    lane: lane,\n    action: action,\n    hasEagerState: false,\n    eagerState: null,\n    next: null\n  };\n\n  if (isRenderPhaseUpdate(fiber)) {\n    enqueueRenderPhaseUpdate(queue, update);\n  } else {\n    var alternate = fiber.alternate;\n\n    if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n      // The queue is currently empty, which means we can eagerly compute the\n      // next state before entering the render phase. If the new state is the\n      // same as the current state, we may be able to bail out entirely.\n      var lastRenderedReducer = queue.lastRenderedReducer;\n\n      if (lastRenderedReducer !== null) {\n        var prevDispatcher;\n\n        {\n          prevDispatcher = ReactCurrentDispatcher$1.current;\n          ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n        }\n\n        try {\n          var currentState = queue.lastRenderedState;\n          var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n          // it, on the update object. If the reducer hasn't changed by the\n          // time we enter the render phase, then the eager state can be used\n          // without calling the reducer again.\n\n          update.hasEagerState = true;\n          update.eagerState = eagerState;\n\n          if (objectIs(eagerState, currentState)) {\n            // Fast path. We can bail out without scheduling React to re-render.\n            // It's still possible that we'll need to rebase this update later,\n            // if the component re-renders for a different reason and by that\n            // time the reducer has changed.\n            // TODO: Do we still need to entangle transitions in this case?\n            enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);\n            return;\n          }\n        } catch (error) {// Suppress the error. It will throw again in the render phase.\n        } finally {\n          {\n            ReactCurrentDispatcher$1.current = prevDispatcher;\n          }\n        }\n      }\n    }\n\n    var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n\n    if (root !== null) {\n      var eventTime = requestEventTime();\n      scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n      entangleTransitionUpdate(root, queue, lane);\n    }\n  }\n\n  markUpdateInDevTools(fiber, lane);\n}\n\nfunction isRenderPhaseUpdate(fiber) {\n  var alternate = fiber.alternate;\n  return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;\n}\n\nfunction enqueueRenderPhaseUpdate(queue, update) {\n  // This is a render phase update. Stash it in a lazily-created map of\n  // queue -> linked list of updates. After this render pass, we'll restart\n  // and apply the stashed updates on top of the work-in-progress hook.\n  didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n  var pending = queue.pending;\n\n  if (pending === null) {\n    // This is the first update. Create a circular list.\n    update.next = update;\n  } else {\n    update.next = pending.next;\n    pending.next = update;\n  }\n\n  queue.pending = update;\n} // TODO: Move to ReactFiberConcurrentUpdates?\n\n\nfunction entangleTransitionUpdate(root, queue, lane) {\n  if (isTransitionLane(lane)) {\n    var queueLanes = queue.lanes; // If any entangled lanes are no longer pending on the root, then they\n    // must have finished. We can remove them from the shared queue, which\n    // represents a superset of the actually pending lanes. In some cases we\n    // may entangle more than we need to, but that's OK. In fact it's worse if\n    // we *don't* entangle when we should.\n\n    queueLanes = intersectLanes(queueLanes, root.pendingLanes); // Entangle the new transition lane with the other transition lanes.\n\n    var newQueueLanes = mergeLanes(queueLanes, lane);\n    queue.lanes = newQueueLanes; // Even if queue.lanes already include lane, we don't know for certain if\n    // the lane finished since the last time we entangled it. So we need to\n    // entangle it again, just to be sure.\n\n    markRootEntangled(root, newQueueLanes);\n  }\n}\n\nfunction markUpdateInDevTools(fiber, lane, action) {\n\n  {\n    markStateUpdateScheduled(fiber, lane);\n  }\n}\n\nvar ContextOnlyDispatcher = {\n  readContext: readContext,\n  useCallback: throwInvalidHookError,\n  useContext: throwInvalidHookError,\n  useEffect: throwInvalidHookError,\n  useImperativeHandle: throwInvalidHookError,\n  useInsertionEffect: throwInvalidHookError,\n  useLayoutEffect: throwInvalidHookError,\n  useMemo: throwInvalidHookError,\n  useReducer: throwInvalidHookError,\n  useRef: throwInvalidHookError,\n  useState: throwInvalidHookError,\n  useDebugValue: throwInvalidHookError,\n  useDeferredValue: throwInvalidHookError,\n  useTransition: throwInvalidHookError,\n  useMutableSource: throwInvalidHookError,\n  useSyncExternalStore: throwInvalidHookError,\n  useId: throwInvalidHookError,\n  unstable_isNewReconciler: enableNewReconciler\n};\n\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n  var warnInvalidContextAccess = function () {\n    error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n  };\n\n  var warnInvalidHookAccess = function () {\n    error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n  };\n\n  HooksDispatcherOnMountInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      mountHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      mountHookTypesDev();\n      checkDepsAreArrayDev(deps);\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      mountHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      mountHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      mountHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      mountHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      mountHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      mountHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      mountHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnMountWithHookTypesInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnUpdateInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return updateDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return updateTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  HooksDispatcherOnRerenderInDEV = {\n    readContext: function (context) {\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return rerenderReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n      try {\n        return rerenderState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      updateHookTypesDev();\n      return rerenderDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      updateHookTypesDev();\n      return rerenderTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnMountInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountRef(initialValue);\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n      try {\n        return mountState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      mountHookTypesDev();\n      return mountId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnUpdateInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n\n  InvalidNestedHooksDispatcherOnRerenderInDEV = {\n    readContext: function (context) {\n      warnInvalidContextAccess();\n      return readContext(context);\n    },\n    useCallback: function (callback, deps) {\n      currentHookNameInDev = 'useCallback';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateCallback(callback, deps);\n    },\n    useContext: function (context) {\n      currentHookNameInDev = 'useContext';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return readContext(context);\n    },\n    useEffect: function (create, deps) {\n      currentHookNameInDev = 'useEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateEffect(create, deps);\n    },\n    useImperativeHandle: function (ref, create, deps) {\n      currentHookNameInDev = 'useImperativeHandle';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateImperativeHandle(ref, create, deps);\n    },\n    useInsertionEffect: function (create, deps) {\n      currentHookNameInDev = 'useInsertionEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateInsertionEffect(create, deps);\n    },\n    useLayoutEffect: function (create, deps) {\n      currentHookNameInDev = 'useLayoutEffect';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateLayoutEffect(create, deps);\n    },\n    useMemo: function (create, deps) {\n      currentHookNameInDev = 'useMemo';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return updateMemo(create, deps);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useReducer: function (reducer, initialArg, init) {\n      currentHookNameInDev = 'useReducer';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return rerenderReducer(reducer, initialArg, init);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useRef: function (initialValue) {\n      currentHookNameInDev = 'useRef';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateRef();\n    },\n    useState: function (initialState) {\n      currentHookNameInDev = 'useState';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      var prevDispatcher = ReactCurrentDispatcher$1.current;\n      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n      try {\n        return rerenderState(initialState);\n      } finally {\n        ReactCurrentDispatcher$1.current = prevDispatcher;\n      }\n    },\n    useDebugValue: function (value, formatterFn) {\n      currentHookNameInDev = 'useDebugValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateDebugValue();\n    },\n    useDeferredValue: function (value) {\n      currentHookNameInDev = 'useDeferredValue';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return rerenderDeferredValue(value);\n    },\n    useTransition: function () {\n      currentHookNameInDev = 'useTransition';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return rerenderTransition();\n    },\n    useMutableSource: function (source, getSnapshot, subscribe) {\n      currentHookNameInDev = 'useMutableSource';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateMutableSource();\n    },\n    useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n      currentHookNameInDev = 'useSyncExternalStore';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateSyncExternalStore(subscribe, getSnapshot);\n    },\n    useId: function () {\n      currentHookNameInDev = 'useId';\n      warnInvalidHookAccess();\n      updateHookTypesDev();\n      return updateId();\n    },\n    unstable_isNewReconciler: enableNewReconciler\n  };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar layoutEffectStartTime = -1;\nvar profilerStartTime = -1;\nvar passiveEffectStartTime = -1;\n/**\n * Tracks whether the current update was a nested/cascading update (scheduled from a layout effect).\n *\n * The overall sequence is:\n *   1. render\n *   2. commit (and call `onRender`, `onCommit`)\n *   3. check for nested updates\n *   4. flush passive effects (and call `onPostCommit`)\n *\n * Nested updates are identified in step 3 above,\n * but step 4 still applies to the work that was just committed.\n * We use two flags to track nested updates then:\n * one tracks whether the upcoming update is a nested update,\n * and the other tracks whether the current update was a nested update.\n * The first value gets synced to the second at the start of the render phase.\n */\n\nvar currentUpdateIsNested = false;\nvar nestedUpdateScheduled = false;\n\nfunction isCurrentUpdateNested() {\n  return currentUpdateIsNested;\n}\n\nfunction markNestedUpdateScheduled() {\n  {\n    nestedUpdateScheduled = true;\n  }\n}\n\nfunction resetNestedUpdateFlag() {\n  {\n    currentUpdateIsNested = false;\n    nestedUpdateScheduled = false;\n  }\n}\n\nfunction syncNestedUpdateFlag() {\n  {\n    currentUpdateIsNested = nestedUpdateScheduled;\n    nestedUpdateScheduled = false;\n  }\n}\n\nfunction getCommitTime() {\n  return commitTime;\n}\n\nfunction recordCommitTime() {\n\n  commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n  profilerStartTime = now$1();\n\n  if (fiber.actualStartTime < 0) {\n    fiber.actualStartTime = now$1();\n  }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n  profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n  if (profilerStartTime >= 0) {\n    var elapsedTime = now$1() - profilerStartTime;\n    fiber.actualDuration += elapsedTime;\n\n    if (overrideBaseTime) {\n      fiber.selfBaseDuration = elapsedTime;\n    }\n\n    profilerStartTime = -1;\n  }\n}\n\nfunction recordLayoutEffectDuration(fiber) {\n\n  if (layoutEffectStartTime >= 0) {\n    var elapsedTime = now$1() - layoutEffectStartTime;\n    layoutEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n    // Or the root (for the DevTools Profiler to read)\n\n    var parentFiber = fiber.return;\n\n    while (parentFiber !== null) {\n      switch (parentFiber.tag) {\n        case HostRoot:\n          var root = parentFiber.stateNode;\n          root.effectDuration += elapsedTime;\n          return;\n\n        case Profiler:\n          var parentStateNode = parentFiber.stateNode;\n          parentStateNode.effectDuration += elapsedTime;\n          return;\n      }\n\n      parentFiber = parentFiber.return;\n    }\n  }\n}\n\nfunction recordPassiveEffectDuration(fiber) {\n\n  if (passiveEffectStartTime >= 0) {\n    var elapsedTime = now$1() - passiveEffectStartTime;\n    passiveEffectStartTime = -1; // Store duration on the next nearest Profiler ancestor\n    // Or the root (for the DevTools Profiler to read)\n\n    var parentFiber = fiber.return;\n\n    while (parentFiber !== null) {\n      switch (parentFiber.tag) {\n        case HostRoot:\n          var root = parentFiber.stateNode;\n\n          if (root !== null) {\n            root.passiveEffectDuration += elapsedTime;\n          }\n\n          return;\n\n        case Profiler:\n          var parentStateNode = parentFiber.stateNode;\n\n          if (parentStateNode !== null) {\n            // Detached fibers have their state node cleared out.\n            // In this case, the return pointer is also cleared out,\n            // so we won't be able to report the time spent in this Profiler's subtree.\n            parentStateNode.passiveEffectDuration += elapsedTime;\n          }\n\n          return;\n      }\n\n      parentFiber = parentFiber.return;\n    }\n  }\n}\n\nfunction startLayoutEffectTimer() {\n\n  layoutEffectStartTime = now$1();\n}\n\nfunction startPassiveEffectTimer() {\n\n  passiveEffectStartTime = now$1();\n}\n\nfunction transferActualDuration(fiber) {\n  // Transfer time spent rendering these children so we don't lose it\n  // after we rerender. This is used as a helper in special cases\n  // where we should count the work of multiple passes.\n  var child = fiber.child;\n\n  while (child) {\n    fiber.actualDuration += child.actualDuration;\n    child = child.sibling;\n  }\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n  if (Component && Component.defaultProps) {\n    // Resolve default props. Taken from ReactElement\n    var props = assign({}, baseProps);\n    var defaultProps = Component.defaultProps;\n\n    for (var propName in defaultProps) {\n      if (props[propName] === undefined) {\n        props[propName] = defaultProps[propName];\n      }\n    }\n\n    return props;\n  }\n\n  return baseProps;\n}\n\nvar fakeInternalInstance = {};\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\nvar didWarnAboutLegacyContext$1;\n\n{\n  didWarnAboutStateAssignmentForComponent = new Set();\n  didWarnAboutUninitializedState = new Set();\n  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n  didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n  didWarnAboutDirectlyAssigningPropsToState = new Set();\n  didWarnAboutUndefinedDerivedState = new Set();\n  didWarnAboutContextTypeAndContextTypes = new Set();\n  didWarnAboutInvalidateContextType = new Set();\n  didWarnAboutLegacyContext$1 = new Set();\n  var didWarnOnInvalidCallback = new Set();\n\n  warnOnInvalidCallback = function (callback, callerName) {\n    if (callback === null || typeof callback === 'function') {\n      return;\n    }\n\n    var key = callerName + '_' + callback;\n\n    if (!didWarnOnInvalidCallback.has(key)) {\n      didWarnOnInvalidCallback.add(key);\n\n      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n    }\n  };\n\n  warnOnUndefinedDerivedState = function (type, partialState) {\n    if (partialState === undefined) {\n      var componentName = getComponentNameFromType(type) || 'Component';\n\n      if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n        didWarnAboutUndefinedDerivedState.add(componentName);\n\n        error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n      }\n    }\n  }; // This is so gross but it's at least non-critical and can be removed if\n  // it causes problems. This is meant to give a nicer error message for\n  // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n  // ...)) which otherwise throws a \"_processChildContext is not a function\"\n  // exception.\n\n\n  Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n    enumerable: false,\n    value: function () {\n      throw new Error('_processChildContext is not available in React 16+. This likely ' + 'means you have multiple copies of React and are attempting to nest ' + 'a React 15 tree inside a React 16 tree using ' + \"unstable_renderSubtreeIntoContainer, which isn't supported. Try \" + 'to make sure you have only one copy of React (and ideally, switch ' + 'to ReactDOM.createPortal).');\n    }\n  });\n  Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n  var prevState = workInProgress.memoizedState;\n  var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n  {\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        // Invoke the function an extra time to help detect side-effects.\n        partialState = getDerivedStateFromProps(nextProps, prevState);\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    warnOnUndefinedDerivedState(ctor, partialState);\n  } // Merge the partial state and the previous state.\n\n\n  var memoizedState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);\n  workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n  // base state.\n\n  if (workInProgress.lanes === NoLanes) {\n    // Queue is always non-null for classes\n    var updateQueue = workInProgress.updateQueue;\n    updateQueue.baseState = memoizedState;\n  }\n}\n\nvar classComponentUpdater = {\n  isMounted: isMounted,\n  enqueueSetState: function (inst, payload, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.payload = payload;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'setState');\n      }\n\n      update.callback = callback;\n    }\n\n    var root = enqueueUpdate(fiber, update, lane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markStateUpdateScheduled(fiber, lane);\n    }\n  },\n  enqueueReplaceState: function (inst, payload, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.tag = ReplaceState;\n    update.payload = payload;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'replaceState');\n      }\n\n      update.callback = callback;\n    }\n\n    var root = enqueueUpdate(fiber, update, lane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markStateUpdateScheduled(fiber, lane);\n    }\n  },\n  enqueueForceUpdate: function (inst, callback) {\n    var fiber = get(inst);\n    var eventTime = requestEventTime();\n    var lane = requestUpdateLane(fiber);\n    var update = createUpdate(eventTime, lane);\n    update.tag = ForceUpdate;\n\n    if (callback !== undefined && callback !== null) {\n      {\n        warnOnInvalidCallback(callback, 'forceUpdate');\n      }\n\n      update.callback = callback;\n    }\n\n    var root = enqueueUpdate(fiber, update, lane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n      entangleTransitions(root, fiber, lane);\n    }\n\n    {\n      markForceUpdateScheduled(fiber, lane);\n    }\n  }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n  var instance = workInProgress.stateNode;\n\n  if (typeof instance.shouldComponentUpdate === 'function') {\n    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n    {\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          // Invoke the function an extra time to help detect side-effects.\n          shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n\n      if (shouldUpdate === undefined) {\n        error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentNameFromType(ctor) || 'Component');\n      }\n    }\n\n    return shouldUpdate;\n  }\n\n  if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n    return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n  }\n\n  return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n  var instance = workInProgress.stateNode;\n\n  {\n    var name = getComponentNameFromType(ctor) || 'Component';\n    var renderPresent = instance.render;\n\n    if (!renderPresent) {\n      if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n        error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n      } else {\n        error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n      }\n    }\n\n    if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n      error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n    }\n\n    if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n    }\n\n    if (instance.propTypes) {\n      error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n    }\n\n    if (instance.contextType) {\n      error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n    }\n\n    {\n      if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n      // this one.\n      (workInProgress.mode & StrictLegacyMode) === NoMode) {\n        didWarnAboutLegacyContext$1.add(ctor);\n\n        error('%s uses the legacy childContextTypes API which is no longer ' + 'supported and will be removed in the next major release. Use ' + 'React.createContext() instead\\n\\n.' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n      }\n\n      if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip\n      // this one.\n      (workInProgress.mode & StrictLegacyMode) === NoMode) {\n        didWarnAboutLegacyContext$1.add(ctor);\n\n        error('%s uses the legacy contextTypes API which is no longer supported ' + 'and will be removed in the next major release. Use ' + 'React.createContext() with static contextType instead.\\n\\n' + 'Learn more about this warning here: https://reactjs.org/link/legacy-context', name);\n      }\n\n      if (instance.contextTypes) {\n        error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n      }\n\n      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n        didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n        error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n      }\n    }\n\n    if (typeof instance.componentShouldUpdate === 'function') {\n      error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n    }\n\n    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n      error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');\n    }\n\n    if (typeof instance.componentDidUnmount === 'function') {\n      error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n    }\n\n    if (typeof instance.componentDidReceiveProps === 'function') {\n      error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n    }\n\n    if (typeof instance.componentWillRecieveProps === 'function') {\n      error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n    }\n\n    if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n      error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n    }\n\n    var hasMutatedProps = instance.props !== newProps;\n\n    if (instance.props !== undefined && hasMutatedProps) {\n      error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n    }\n\n    if (instance.defaultProps) {\n      error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n      error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));\n    }\n\n    if (typeof instance.getDerivedStateFromProps === 'function') {\n      error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n    }\n\n    if (typeof instance.getDerivedStateFromError === 'function') {\n      error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n    }\n\n    if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n      error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n    }\n\n    var _state = instance.state;\n\n    if (_state && (typeof _state !== 'object' || isArray(_state))) {\n      error('%s.state: must be set to an object or null', name);\n    }\n\n    if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n      error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n    }\n  }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n  instance.updater = classComponentUpdater;\n  workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n  set(instance, workInProgress);\n\n  {\n    instance._reactInternalInstance = fakeInternalInstance;\n  }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n  var isLegacyContextConsumer = false;\n  var unmaskedContext = emptyContextObject;\n  var context = emptyContextObject;\n  var contextType = ctor.contextType;\n\n  {\n    if ('contextType' in ctor) {\n      var isValid = // Allow null for conditional declaration\n      contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n      if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n        didWarnAboutInvalidateContextType.add(ctor);\n        var addendum = '';\n\n        if (contextType === undefined) {\n          addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n        } else if (typeof contextType !== 'object') {\n          addendum = ' However, it is set to a ' + typeof contextType + '.';\n        } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n          addendum = ' Did you accidentally pass the Context.Provider instead?';\n        } else if (contextType._context !== undefined) {\n          // <Context.Consumer>\n          addendum = ' Did you accidentally pass the Context.Consumer instead?';\n        } else {\n          addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n        }\n\n        error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);\n      }\n    }\n  }\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    context = readContext(contextType);\n  } else {\n    unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    var contextTypes = ctor.contextTypes;\n    isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n    context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n  }\n\n  var instance = new ctor(props, context); // Instantiate twice to help detect side-effects.\n\n  {\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        instance = new ctor(props, context); // eslint-disable-line no-new\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n  }\n\n  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n  adoptClassInstance(workInProgress, instance);\n\n  {\n    if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n      var componentName = getComponentNameFromType(ctor) || 'Component';\n\n      if (!didWarnAboutUninitializedState.has(componentName)) {\n        didWarnAboutUninitializedState.add(componentName);\n\n        error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n      }\n    } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n    // Warn about these lifecycles if they are present.\n    // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n    if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n      var foundWillMountName = null;\n      var foundWillReceivePropsName = null;\n      var foundWillUpdateName = null;\n\n      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n        foundWillMountName = 'componentWillMount';\n      } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n        foundWillMountName = 'UNSAFE_componentWillMount';\n      }\n\n      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n        foundWillReceivePropsName = 'componentWillReceiveProps';\n      } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n        foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n      }\n\n      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n        foundWillUpdateName = 'componentWillUpdate';\n      } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n        foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n      }\n\n      if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n        var _componentName = getComponentNameFromType(ctor) || 'Component';\n\n        var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n        if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n          didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n          error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n  \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n  \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n  \" + foundWillUpdateName : '');\n        }\n      }\n    }\n  } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n  // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n  if (isLegacyContextConsumer) {\n    cacheContext(workInProgress, unmaskedContext, context);\n  }\n\n  return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n  var oldState = instance.state;\n\n  if (typeof instance.componentWillMount === 'function') {\n    instance.componentWillMount();\n  }\n\n  if (typeof instance.UNSAFE_componentWillMount === 'function') {\n    instance.UNSAFE_componentWillMount();\n  }\n\n  if (oldState !== instance.state) {\n    {\n      error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentNameFromFiber(workInProgress) || 'Component');\n    }\n\n    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n  }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n  var oldState = instance.state;\n\n  if (typeof instance.componentWillReceiveProps === 'function') {\n    instance.componentWillReceiveProps(newProps, nextContext);\n  }\n\n  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n  }\n\n  if (instance.state !== oldState) {\n    {\n      var componentName = getComponentNameFromFiber(workInProgress) || 'Component';\n\n      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n        didWarnAboutStateAssignmentForComponent.add(componentName);\n\n        error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n      }\n    }\n\n    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n  }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n  {\n    checkClassInstance(workInProgress, ctor, newProps);\n  }\n\n  var instance = workInProgress.stateNode;\n  instance.props = newProps;\n  instance.state = workInProgress.memoizedState;\n  instance.refs = {};\n  initializeUpdateQueue(workInProgress);\n  var contextType = ctor.contextType;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    instance.context = readContext(contextType);\n  } else {\n    var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    instance.context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  {\n    if (instance.state === newProps) {\n      var componentName = getComponentNameFromType(ctor) || 'Component';\n\n      if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n        didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n        error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n      }\n    }\n\n    if (workInProgress.mode & StrictLegacyMode) {\n      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n    }\n\n    {\n      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n    }\n  }\n\n  instance.state = workInProgress.memoizedState;\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    instance.state = workInProgress.memoizedState;\n  } // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n    callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n    // process them now.\n\n    processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n    instance.state = workInProgress.memoizedState;\n  }\n\n  if (typeof instance.componentDidMount === 'function') {\n    var fiberFlags = Update;\n\n    {\n      fiberFlags |= LayoutStatic;\n    }\n\n    if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n      fiberFlags |= MountLayoutDev;\n    }\n\n    workInProgress.flags |= fiberFlags;\n  }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n  var instance = workInProgress.stateNode;\n  var oldProps = workInProgress.memoizedProps;\n  instance.props = oldProps;\n  var oldContext = instance.context;\n  var contextType = ctor.contextType;\n  var nextContext = emptyContextObject;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    nextContext = readContext(contextType);\n  } else {\n    var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n  }\n\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n  // ever the previously attempted to render - not the \"current\". However,\n  // during componentDidUpdate we pass the \"current\" props.\n  // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n    if (oldProps !== newProps || oldContext !== nextContext) {\n      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n    }\n  }\n\n  resetHasForceUpdateBeforeProcessing();\n  var oldState = workInProgress.memoizedState;\n  var newState = instance.state = oldState;\n  processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n  newState = workInProgress.memoizedState;\n\n  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidMount === 'function') {\n      var fiberFlags = Update;\n\n      {\n        fiberFlags |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        fiberFlags |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= fiberFlags;\n    }\n\n    return false;\n  }\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    newState = workInProgress.memoizedState;\n  }\n\n  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n  if (shouldUpdate) {\n    // In order to support react-lifecycles-compat polyfilled components,\n    // Unsafe lifecycles should not be invoked for components using the new APIs.\n    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n      if (typeof instance.componentWillMount === 'function') {\n        instance.componentWillMount();\n      }\n\n      if (typeof instance.UNSAFE_componentWillMount === 'function') {\n        instance.UNSAFE_componentWillMount();\n      }\n    }\n\n    if (typeof instance.componentDidMount === 'function') {\n      var _fiberFlags = Update;\n\n      {\n        _fiberFlags |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        _fiberFlags |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= _fiberFlags;\n    }\n  } else {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidMount === 'function') {\n      var _fiberFlags2 = Update;\n\n      {\n        _fiberFlags2 |= LayoutStatic;\n      }\n\n      if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {\n        _fiberFlags2 |= MountLayoutDev;\n      }\n\n      workInProgress.flags |= _fiberFlags2;\n    } // If shouldComponentUpdate returned false, we should still update the\n    // memoized state to indicate that this work can be reused.\n\n\n    workInProgress.memoizedProps = newProps;\n    workInProgress.memoizedState = newState;\n  } // Update the existing instance's state, props, and context pointers even\n  // if shouldComponentUpdate returns false.\n\n\n  instance.props = newProps;\n  instance.state = newState;\n  instance.context = nextContext;\n  return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n  var instance = workInProgress.stateNode;\n  cloneUpdateQueue(current, workInProgress);\n  var unresolvedOldProps = workInProgress.memoizedProps;\n  var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n  instance.props = oldProps;\n  var unresolvedNewProps = workInProgress.pendingProps;\n  var oldContext = instance.context;\n  var contextType = ctor.contextType;\n  var nextContext = emptyContextObject;\n\n  if (typeof contextType === 'object' && contextType !== null) {\n    nextContext = readContext(contextType);\n  } else {\n    var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n    nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n  }\n\n  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n  // ever the previously attempted to render - not the \"current\". However,\n  // during componentDidUpdate we pass the \"current\" props.\n  // In order to support react-lifecycles-compat polyfilled components,\n  // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n    if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n    }\n  }\n\n  resetHasForceUpdateBeforeProcessing();\n  var oldState = workInProgress.memoizedState;\n  var newState = instance.state = oldState;\n  processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n  newState = workInProgress.memoizedState;\n\n  if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !(enableLazyContextPropagation   )) {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Update;\n      }\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Snapshot;\n      }\n    }\n\n    return false;\n  }\n\n  if (typeof getDerivedStateFromProps === 'function') {\n    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n    newState = workInProgress.memoizedState;\n  }\n\n  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,\n  // both before and after `shouldComponentUpdate` has been called. Not ideal,\n  // but I'm loath to refactor this function. This only happens for memoized\n  // components so it's not that common.\n  enableLazyContextPropagation   ;\n\n  if (shouldUpdate) {\n    // In order to support react-lifecycles-compat polyfilled components,\n    // Unsafe lifecycles should not be invoked for components using the new APIs.\n    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n      if (typeof instance.componentWillUpdate === 'function') {\n        instance.componentWillUpdate(newProps, newState, nextContext);\n      }\n\n      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n      }\n    }\n\n    if (typeof instance.componentDidUpdate === 'function') {\n      workInProgress.flags |= Update;\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      workInProgress.flags |= Snapshot;\n    }\n  } else {\n    // If an update was already in progress, we should schedule an Update\n    // effect even though we're bailing out, so that cWU/cDU are called.\n    if (typeof instance.componentDidUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Update;\n      }\n    }\n\n    if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n        workInProgress.flags |= Snapshot;\n      }\n    } // If shouldComponentUpdate returned false, we should still update the\n    // memoized props/state to indicate that this work can be reused.\n\n\n    workInProgress.memoizedProps = newProps;\n    workInProgress.memoizedState = newState;\n  } // Update the existing instance's state, props, and context pointers even\n  // if shouldComponentUpdate returns false.\n\n\n  instance.props = newProps;\n  instance.state = newState;\n  instance.context = nextContext;\n  return shouldUpdate;\n}\n\nfunction createCapturedValueAtFiber(value, source) {\n  // If the value is an error, call this function immediately after it is thrown\n  // so the stack is accurate.\n  return {\n    value: value,\n    source: source,\n    stack: getStackByFiberInDevAndProd(source),\n    digest: null\n  };\n}\nfunction createCapturedValue(value, digest, stack) {\n  return {\n    value: value,\n    source: null,\n    stack: stack != null ? stack : null,\n    digest: digest != null ? digest : null\n  };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n  return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n  try {\n    var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n    // This enables renderers like ReactNative to better manage redbox behavior.\n\n    if (logError === false) {\n      return;\n    }\n\n    var error = errorInfo.value;\n\n    if (true) {\n      var source = errorInfo.source;\n      var stack = errorInfo.stack;\n      var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n      // `preventDefault()` in window `error` handler.\n      // We record this information as an expando on the error.\n\n      if (error != null && error._suppressLogging) {\n        if (boundary.tag === ClassComponent) {\n          // The error is recoverable and was silenced.\n          // Ignore it and don't print the stack addendum.\n          // This is handy for testing error boundaries without noise.\n          return;\n        } // The error is fatal. Since the silencing might have\n        // been accidental, we'll surface it anyway.\n        // However, the browser would have silenced the original error\n        // so we'll print it first, and then print the stack addendum.\n\n\n        console['error'](error); // Don't transform to our wrapper\n        // For a more detailed description of this block, see:\n        // https://github.com/facebook/react/pull/13384\n      }\n\n      var componentName = source ? getComponentNameFromFiber(source) : null;\n      var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n      var errorBoundaryMessage;\n\n      if (boundary.tag === HostRoot) {\n        errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n      } else {\n        var errorBoundaryName = getComponentNameFromFiber(boundary) || 'Anonymous';\n        errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n      }\n\n      var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n      // We don't include the original error message and JS stack because the browser\n      // has already printed it. Even if the application swallows the error, it is still\n      // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n      console['error'](combinedMessage); // Don't transform to our wrapper\n    } else {\n      // In production, we print the error directly.\n      // This will include the message, the JS stack, and anything the browser wants to show.\n      // We pass the error object instead of custom message so that the browser displays the error natively.\n      console['error'](error); // Don't transform to our wrapper\n    }\n  } catch (e) {\n    // This method must not throw, or React internal state will get messed up.\n    // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n    // we want to report this error outside of the normal stack as a last resort.\n    // https://github.com/facebook/react/issues/13188\n    setTimeout(function () {\n      throw e;\n    });\n  }\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n  var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n  update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n  // being called \"element\".\n\n  update.payload = {\n    element: null\n  };\n  var error = errorInfo.value;\n\n  update.callback = function () {\n    onUncaughtError(error);\n    logCapturedError(fiber, errorInfo);\n  };\n\n  return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n  var update = createUpdate(NoTimestamp, lane);\n  update.tag = CaptureUpdate;\n  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n  if (typeof getDerivedStateFromError === 'function') {\n    var error$1 = errorInfo.value;\n\n    update.payload = function () {\n      return getDerivedStateFromError(error$1);\n    };\n\n    update.callback = function () {\n      {\n        markFailedErrorBoundaryForHotReloading(fiber);\n      }\n\n      logCapturedError(fiber, errorInfo);\n    };\n  }\n\n  var inst = fiber.stateNode;\n\n  if (inst !== null && typeof inst.componentDidCatch === 'function') {\n    update.callback = function callback() {\n      {\n        markFailedErrorBoundaryForHotReloading(fiber);\n      }\n\n      logCapturedError(fiber, errorInfo);\n\n      if (typeof getDerivedStateFromError !== 'function') {\n        // To preserve the preexisting retry behavior of error boundaries,\n        // we keep track of which ones already failed during this batch.\n        // This gets reset before we yield back to the browser.\n        // TODO: Warn in strict mode if getDerivedStateFromError is\n        // not defined.\n        markLegacyErrorBoundaryAsFailed(this);\n      }\n\n      var error$1 = errorInfo.value;\n      var stack = errorInfo.stack;\n      this.componentDidCatch(error$1, {\n        componentStack: stack !== null ? stack : ''\n      });\n\n      {\n        if (typeof getDerivedStateFromError !== 'function') {\n          // If componentDidCatch is the only error boundary method defined,\n          // then it needs to call setState to recover from errors.\n          // If no state update is scheduled then the boundary will swallow the error.\n          if (!includesSomeLane(fiber.lanes, SyncLane)) {\n            error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentNameFromFiber(fiber) || 'Unknown');\n          }\n        }\n      }\n    };\n  }\n\n  return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n  // Attach a ping listener\n  //\n  // The data might resolve before we have a chance to commit the fallback. Or,\n  // in the case of a refresh, we'll never commit a fallback. So we need to\n  // attach a listener now. When it resolves (\"pings\"), we can decide whether to\n  // try rendering the tree again.\n  //\n  // Only attach a listener if one does not already exist for the lanes\n  // we're currently rendering (which acts like a \"thread ID\" here).\n  //\n  // We only need to do this in concurrent mode. Legacy Suspense always\n  // commits fallbacks synchronously, so there are no pings.\n  var pingCache = root.pingCache;\n  var threadIDs;\n\n  if (pingCache === null) {\n    pingCache = root.pingCache = new PossiblyWeakMap$1();\n    threadIDs = new Set();\n    pingCache.set(wakeable, threadIDs);\n  } else {\n    threadIDs = pingCache.get(wakeable);\n\n    if (threadIDs === undefined) {\n      threadIDs = new Set();\n      pingCache.set(wakeable, threadIDs);\n    }\n  }\n\n  if (!threadIDs.has(lanes)) {\n    // Memoize using the thread ID to prevent redundant listeners.\n    threadIDs.add(lanes);\n    var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n\n    {\n      if (isDevToolsPresent) {\n        // If we have pending work still, restore the original updaters\n        restorePendingUpdaters(root, lanes);\n      }\n    }\n\n    wakeable.then(ping, ping);\n  }\n}\n\nfunction attachRetryListener(suspenseBoundary, root, wakeable, lanes) {\n  // Retry listener\n  //\n  // If the fallback does commit, we need to attach a different type of\n  // listener. This one schedules an update on the Suspense boundary to turn\n  // the fallback state off.\n  //\n  // Stash the wakeable on the boundary fiber so we can access it in the\n  // commit phase.\n  //\n  // When the wakeable resolves, we'll attempt to render the boundary\n  // again (\"retry\").\n  var wakeables = suspenseBoundary.updateQueue;\n\n  if (wakeables === null) {\n    var updateQueue = new Set();\n    updateQueue.add(wakeable);\n    suspenseBoundary.updateQueue = updateQueue;\n  } else {\n    wakeables.add(wakeable);\n  }\n}\n\nfunction resetSuspendedComponent(sourceFiber, rootRenderLanes) {\n  // A legacy mode Suspense quirk, only relevant to hook components.\n\n\n  var tag = sourceFiber.tag;\n\n  if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {\n    var currentSource = sourceFiber.alternate;\n\n    if (currentSource) {\n      sourceFiber.updateQueue = currentSource.updateQueue;\n      sourceFiber.memoizedState = currentSource.memoizedState;\n      sourceFiber.lanes = currentSource.lanes;\n    } else {\n      sourceFiber.updateQueue = null;\n      sourceFiber.memoizedState = null;\n    }\n  }\n}\n\nfunction getNearestSuspenseBoundaryToCapture(returnFiber) {\n  var node = returnFiber;\n\n  do {\n    if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {\n      return node;\n    } // This boundary already captured during this render. Continue to the next\n    // boundary.\n\n\n    node = node.return;\n  } while (node !== null);\n\n  return null;\n}\n\nfunction markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes) {\n  // This marks a Suspense boundary so that when we're unwinding the stack,\n  // it captures the suspended \"exception\" and does a second (fallback) pass.\n  if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {\n    // Legacy Mode Suspense\n    //\n    // If the boundary is in legacy mode, we should *not*\n    // suspend the commit. Pretend as if the suspended component rendered\n    // null and keep rendering. When the Suspense boundary completes,\n    // we'll do a second pass to render the fallback.\n    if (suspenseBoundary === returnFiber) {\n      // Special case where we suspended while reconciling the children of\n      // a Suspense boundary's inner Offscreen wrapper fiber. This happens\n      // when a React.lazy component is a direct child of a\n      // Suspense boundary.\n      //\n      // Suspense boundaries are implemented as multiple fibers, but they\n      // are a single conceptual unit. The legacy mode behavior where we\n      // pretend the suspended fiber committed as `null` won't work,\n      // because in this case the \"suspended\" fiber is the inner\n      // Offscreen wrapper.\n      //\n      // Because the contents of the boundary haven't started rendering\n      // yet (i.e. nothing in the tree has partially rendered) we can\n      // switch to the regular, concurrent mode behavior: mark the\n      // boundary with ShouldCapture and enter the unwind phase.\n      suspenseBoundary.flags |= ShouldCapture;\n    } else {\n      suspenseBoundary.flags |= DidCapture;\n      sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n      // But we shouldn't call any lifecycle methods or callbacks. Remove\n      // all lifecycle effect tags.\n\n      sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n      if (sourceFiber.tag === ClassComponent) {\n        var currentSourceFiber = sourceFiber.alternate;\n\n        if (currentSourceFiber === null) {\n          // This is a new mount. Change the tag so it's not mistaken for a\n          // completed class component. For example, we should not call\n          // componentWillUnmount if it is deleted.\n          sourceFiber.tag = IncompleteClassComponent;\n        } else {\n          // When we try rendering again, we should not reuse the current fiber,\n          // since it's known to be in an inconsistent state. Use a force update to\n          // prevent a bail out.\n          var update = createUpdate(NoTimestamp, SyncLane);\n          update.tag = ForceUpdate;\n          enqueueUpdate(sourceFiber, update, SyncLane);\n        }\n      } // The source fiber did not complete. Mark it with Sync priority to\n      // indicate that it still has pending work.\n\n\n      sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);\n    }\n\n    return suspenseBoundary;\n  } // Confirmed that the boundary is in a concurrent mode tree. Continue\n  // with the normal suspend path.\n  //\n  // After this we'll use a set of heuristics to determine whether this\n  // render pass will run to completion or restart or \"suspend\" the commit.\n  // The actual logic for this is spread out in different places.\n  //\n  // This first principle is that if we're going to suspend when we complete\n  // a root, then we should also restart if we get an update or ping that\n  // might unsuspend it, and vice versa. The only reason to suspend is\n  // because you think you might want to restart before committing. However,\n  // it doesn't make sense to restart only while in the period we're suspended.\n  //\n  // Restarting too aggressively is also not good because it starves out any\n  // intermediate loading state. So we use heuristics to determine when.\n  // Suspense Heuristics\n  //\n  // If nothing threw a Promise or all the same fallbacks are already showing,\n  // then don't suspend/restart.\n  //\n  // If this is an initial render of a new tree of Suspense boundaries and\n  // those trigger a fallback, then don't suspend/restart. We want to ensure\n  // that we can show the initial loading state as quickly as possible.\n  //\n  // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n  // a fallback, then we should always suspend/restart. Transitions apply\n  // to this case. If none is defined, JND is used instead.\n  //\n  // If we're already showing a fallback and it gets \"retried\", allowing us to show\n  // another level, but there's still an inner boundary that would show a fallback,\n  // then we suspend/restart for 500ms since the last time we showed a fallback\n  // anywhere in the tree. This effectively throttles progressive loading into a\n  // consistent train of commits. This also gives us an opportunity to restart to\n  // get to the completed state slightly earlier.\n  //\n  // If there's ambiguity due to batching it's resolved in preference of:\n  // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n  //\n  // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n  // ensure that new initial loading states can commit as soon as possible.\n\n\n  suspenseBoundary.flags |= ShouldCapture; // TODO: I think we can remove this, since we now use `DidCapture` in\n  // the begin phase to prevent an early bailout.\n\n  suspenseBoundary.lanes = rootRenderLanes;\n  return suspenseBoundary;\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n  // The source fiber did not complete.\n  sourceFiber.flags |= Incomplete;\n\n  {\n    if (isDevToolsPresent) {\n      // If we have pending work still, restore the original updaters\n      restorePendingUpdaters(root, rootRenderLanes);\n    }\n  }\n\n  if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n    // This is a wakeable. The component suspended.\n    var wakeable = value;\n    resetSuspendedComponent(sourceFiber);\n\n    {\n      if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n        markDidThrowWhileHydratingDEV();\n      }\n    }\n\n\n    var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);\n\n    if (suspenseBoundary !== null) {\n      suspenseBoundary.flags &= ~ForceClientRender;\n      markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // We only attach ping listeners in concurrent mode. Legacy Suspense always\n      // commits fallbacks synchronously, so there are no pings.\n\n      if (suspenseBoundary.mode & ConcurrentMode) {\n        attachPingListener(root, wakeable, rootRenderLanes);\n      }\n\n      attachRetryListener(suspenseBoundary, root, wakeable);\n      return;\n    } else {\n      // No boundary was found. Unless this is a sync update, this is OK.\n      // We can suspend and wait for more data to arrive.\n      if (!includesSyncLane(rootRenderLanes)) {\n        // This is not a sync update. Suspend. Since we're not activating a\n        // Suspense boundary, this will unwind all the way to the root without\n        // performing a second pass to render a fallback. (This is arguably how\n        // refresh transitions should work, too, since we're not going to commit\n        // the fallbacks anyway.)\n        //\n        // This case also applies to initial hydration.\n        attachPingListener(root, wakeable, rootRenderLanes);\n        renderDidSuspendDelayIfPossible();\n        return;\n      } // This is a sync/discrete update. We treat this case like an error\n      // because discrete renders are expected to produce a complete tree\n      // synchronously to maintain consistency with external state.\n\n\n      var uncaughtSuspenseError = new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To ' + 'fix, updates that suspend should be wrapped ' + 'with startTransition.'); // If we're outside a transition, fall through to the regular error path.\n      // The error will be caught by the nearest suspense boundary.\n\n      value = uncaughtSuspenseError;\n    }\n  } else {\n    // This is a regular error, not a Suspense wakeable.\n    if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {\n      markDidThrowWhileHydratingDEV();\n\n      var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber); // If the error was thrown during hydration, we may be able to recover by\n      // discarding the dehydrated content and switching to a client render.\n      // Instead of surfacing the error, find the nearest Suspense boundary\n      // and render it again without hydration.\n\n\n      if (_suspenseBoundary !== null) {\n        if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {\n          // Set a flag to indicate that we should try rendering the normal\n          // children again, not the fallback.\n          _suspenseBoundary.flags |= ForceClientRender;\n        }\n\n        markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root, rootRenderLanes); // Even though the user may not be affected by this error, we should\n        // still log it so it can be fixed.\n\n        queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));\n        return;\n      }\n    }\n  }\n\n  value = createCapturedValueAtFiber(value, sourceFiber);\n  renderDidError(value); // We didn't find a boundary that could handle this type of exception. Start\n  // over and traverse parent path again, this time treating the exception\n  // as an error.\n\n  var workInProgress = returnFiber;\n\n  do {\n    switch (workInProgress.tag) {\n      case HostRoot:\n        {\n          var _errorInfo = value;\n          workInProgress.flags |= ShouldCapture;\n          var lane = pickArbitraryLane(rootRenderLanes);\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n          var update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n          enqueueCapturedUpdate(workInProgress, update);\n          return;\n        }\n\n      case ClassComponent:\n        // Capture and retry\n        var errorInfo = value;\n        var ctor = workInProgress.type;\n        var instance = workInProgress.stateNode;\n\n        if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n          workInProgress.flags |= ShouldCapture;\n\n          var _lane = pickArbitraryLane(rootRenderLanes);\n\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n          var _update = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n          enqueueCapturedUpdate(workInProgress, _update);\n          return;\n        }\n\n        break;\n    }\n\n    workInProgress = workInProgress.return;\n  } while (workInProgress !== null);\n}\n\nfunction getSuspendedCache() {\n  {\n    return null;\n  } // This function is called when a Suspense boundary suspends. It returns the\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\nvar didWarnAboutDefaultPropsOnFunctionComponent;\n\n{\n  didWarnAboutBadClass = {};\n  didWarnAboutModulePatternComponent = {};\n  didWarnAboutContextTypeOnFunctionComponent = {};\n  didWarnAboutGetDerivedStateOnFunctionComponent = {};\n  didWarnAboutFunctionRefs = {};\n  didWarnAboutReassigningProps = false;\n  didWarnAboutRevealOrder = {};\n  didWarnAboutTailOptions = {};\n  didWarnAboutDefaultPropsOnFunctionComponent = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n  if (current === null) {\n    // If this is a fresh new component that hasn't been rendered yet, we\n    // won't update its child set by applying minimal side-effects. Instead,\n    // we will add them all to the child before it gets rendered. That means\n    // we can optimize this reconciliation pass by not tracking side-effects.\n    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n  } else {\n    // If the current child is the same as the work in progress, it means that\n    // we haven't yet started any work on these children. Therefore, we use\n    // the clone algorithm to create a copy of all the current children.\n    // If we had any progressed work already, that is invalid at this point so\n    // let's throw it out.\n    workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n  }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n  // This function is fork of reconcileChildren. It's used in cases where we\n  // want to reconcile without matching against the existing set. This has the\n  // effect of all current children being unmounted; even if the type and key\n  // are the same, the old child is unmounted and a new child is created.\n  //\n  // To do this, we're going to go through the reconcile algorithm twice. In\n  // the first pass, we schedule a deletion for all the current children by\n  // passing null.\n  workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n  // pass null in place of where we usually pass the current child set. This has\n  // the effect of remounting all children regardless of whether their\n  // identities match.\n\n  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n  // TODO: current can be non-null here even if the component\n  // hasn't yet mounted. This happens after the first render suspends.\n  // We'll need to figure out if this is fine or can cause issues.\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  }\n\n  var render = Component.render;\n  var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n  var nextChildren;\n  var hasId;\n  prepareToReadContext(workInProgress, renderLanes);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n    hasId = checkDidRenderIdHook();\n\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n        hasId = checkDidRenderIdHook();\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  }\n\n  if (current !== null && !didReceiveUpdate) {\n    bailoutHooks(current, workInProgress, renderLanes);\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  if (getIsHydrating() && hasId) {\n    pushMaterializedTreeId(workInProgress);\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  if (current === null) {\n    var type = Component.type;\n\n    if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n    Component.defaultProps === undefined) {\n      var resolvedType = type;\n\n      {\n        resolvedType = resolveFunctionForHotReloading(type);\n      } // If this is a plain function component without default props,\n      // and with only the default shallow comparison, we upgrade it\n      // to a SimpleMemoComponent to allow fast path updates.\n\n\n      workInProgress.tag = SimpleMemoComponent;\n      workInProgress.type = resolvedType;\n\n      {\n        validateFunctionComponentInDev(workInProgress, type);\n      }\n\n      return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, renderLanes);\n    }\n\n    {\n      var innerPropTypes = type.propTypes;\n\n      if (innerPropTypes) {\n        // Inner memo component props aren't currently validated in createElement.\n        // We could move it there, but we'd still need this for lazy code path.\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(type));\n      }\n\n      if ( Component.defaultProps !== undefined) {\n        var componentName = getComponentNameFromType(type) || 'Unknown';\n\n        if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n          error('%s: Support for defaultProps will be removed from memo components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n          didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n        }\n      }\n    }\n\n    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n    child.ref = workInProgress.ref;\n    child.return = workInProgress;\n    workInProgress.child = child;\n    return child;\n  }\n\n  {\n    var _type = Component.type;\n    var _innerPropTypes = _type.propTypes;\n\n    if (_innerPropTypes) {\n      // Inner memo component props aren't currently validated in createElement.\n      // We could move it there, but we'd still need this for lazy code path.\n      checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n      'prop', getComponentNameFromType(_type));\n    }\n  }\n\n  var currentChild = current.child; // This is always exactly one child\n\n  var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n  if (!hasScheduledUpdateOrContext) {\n    // This will be the props with resolved defaultProps,\n    // unlike current.memoizedProps which will be the unresolved ones.\n    var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n    var compare = Component.compare;\n    compare = compare !== null ? compare : shallowEqual;\n\n    if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n    }\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  var newChild = createWorkInProgress(currentChild, nextProps);\n  newChild.ref = workInProgress.ref;\n  newChild.return = workInProgress;\n  workInProgress.child = newChild;\n  return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  // TODO: current can be non-null here even if the component\n  // hasn't yet mounted. This happens when the inner render suspends.\n  // We'll need to figure out if this is fine or can cause issues.\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var outerMemoType = workInProgress.elementType;\n\n      if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n        // We warn when you define propTypes on lazy()\n        // so let's just skip over it to find memo() outer wrapper.\n        // Inner props for memo are validated later.\n        var lazyComponent = outerMemoType;\n        var payload = lazyComponent._payload;\n        var init = lazyComponent._init;\n\n        try {\n          outerMemoType = init(payload);\n        } catch (x) {\n          outerMemoType = null;\n        } // Inner propTypes will be validated in the function component path.\n\n\n        var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n        if (outerPropTypes) {\n          checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n          'prop', getComponentNameFromType(outerMemoType));\n        }\n      }\n    }\n  }\n\n  if (current !== null) {\n    var prevProps = current.memoizedProps;\n\n    if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n     workInProgress.type === current.type )) {\n      didReceiveUpdate = false; // The props are shallowly equal. Reuse the previous props object, like we\n      // would during a normal fiber bailout.\n      //\n      // We don't have strong guarantees that the props object is referentially\n      // equal during updates where we can't bail out anyway — like if the props\n      // are shallowly equal, but there's a local state or context update in the\n      // same batch.\n      //\n      // However, as a principle, we should aim to make the behavior consistent\n      // across different ways of memoizing a component. For example, React.memo\n      // has a different internal Fiber layout if you pass a normal function\n      // component (SimpleMemoComponent) versus if you pass a different type\n      // like forwardRef (MemoComponent). But this is an implementation detail.\n      // Wrapping a component in forwardRef (or React.lazy, etc) shouldn't\n      // affect whether the props object is reused during a bailout.\n\n      workInProgress.pendingProps = nextProps = prevProps;\n\n      if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n        // The pending lanes were cleared at the beginning of beginWork. We're\n        // about to bail out, but there might be other lanes that weren't\n        // included in the current render. Usually, the priority level of the\n        // remaining updates is accumulated during the evaluation of the\n        // component (i.e. when processing the update queue). But since since\n        // we're bailing out early *without* evaluating the component, we need\n        // to account for it here, too. Reset to the value of the current fiber.\n        // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n        // because a MemoComponent fiber does not have hooks or an update queue;\n        // rather, it wraps around an inner component, which may or may not\n        // contains hooks.\n        // TODO: Move the reset at in beginWork out of the common path so that\n        // this is no longer necessary.\n        workInProgress.lanes = current.lanes;\n        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n      } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n        // This is a special case that only exists for legacy mode.\n        // See https://github.com/facebook/react/pull/19216.\n        didReceiveUpdate = true;\n      }\n    }\n  }\n\n  return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps;\n  var nextChildren = nextProps.children;\n  var prevState = current !== null ? current.memoizedState : null;\n\n  if (nextProps.mode === 'hidden' || enableLegacyHidden ) {\n    // Rendering a hidden tree.\n    if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n      // In legacy sync mode, don't defer the subtree. Render it now.\n      // TODO: Consider how Offscreen should work with transitions in the future\n      var nextState = {\n        baseLanes: NoLanes,\n        cachePool: null,\n        transitions: null\n      };\n      workInProgress.memoizedState = nextState;\n\n      pushRenderLanes(workInProgress, renderLanes);\n    } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n      var spawnedCachePool = null; // We're hidden, and we're not rendering at Offscreen. We will bail out\n      // and resume this tree later.\n\n      var nextBaseLanes;\n\n      if (prevState !== null) {\n        var prevBaseLanes = prevState.baseLanes;\n        nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n      } else {\n        nextBaseLanes = renderLanes;\n      } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n      workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n      var _nextState = {\n        baseLanes: nextBaseLanes,\n        cachePool: spawnedCachePool,\n        transitions: null\n      };\n      workInProgress.memoizedState = _nextState;\n      workInProgress.updateQueue = null;\n      // to avoid a push/pop misalignment.\n\n\n      pushRenderLanes(workInProgress, nextBaseLanes);\n\n      return null;\n    } else {\n      // This is the second render. The surrounding visible content has already\n      // committed. Now we resume rendering the hidden tree.\n      // Rendering at offscreen, so we can clear the base lanes.\n      var _nextState2 = {\n        baseLanes: NoLanes,\n        cachePool: null,\n        transitions: null\n      };\n      workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n      var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n\n      pushRenderLanes(workInProgress, subtreeRenderLanes);\n    }\n  } else {\n    // Rendering a visible tree.\n    var _subtreeRenderLanes;\n\n    if (prevState !== null) {\n      // We're going from hidden -> visible.\n      _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes);\n\n      workInProgress.memoizedState = null;\n    } else {\n      // We weren't previously hidden, and we still aren't, so there's nothing\n      // special to do. Need to push to the stack regardless, though, to avoid\n      // a push/pop misalignment.\n      _subtreeRenderLanes = renderLanes;\n    }\n\n    pushRenderLanes(workInProgress, _subtreeRenderLanes);\n  }\n\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n  var nextChildren = workInProgress.pendingProps;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n  var nextChildren = workInProgress.pendingProps.children;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n  {\n    workInProgress.flags |= Update;\n\n    {\n      // Reset effect durations for the next eventual effect phase.\n      // These are reset during render to allow the DevTools commit hook a chance to read them,\n      var stateNode = workInProgress.stateNode;\n      stateNode.effectDuration = 0;\n      stateNode.passiveEffectDuration = 0;\n    }\n  }\n\n  var nextProps = workInProgress.pendingProps;\n  var nextChildren = nextProps.children;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n  var ref = workInProgress.ref;\n\n  if (current === null && ref !== null || current !== null && current.ref !== ref) {\n    // Schedule a Ref effect\n    workInProgress.flags |= Ref;\n\n    {\n      workInProgress.flags |= RefStatic;\n    }\n  }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  {\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  }\n\n  var context;\n\n  {\n    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n    context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  var nextChildren;\n  var hasId;\n  prepareToReadContext(workInProgress, renderLanes);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n    hasId = checkDidRenderIdHook();\n\n    if ( workInProgress.mode & StrictLegacyMode) {\n      setIsStrictModeForDevtools(true);\n\n      try {\n        nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n        hasId = checkDidRenderIdHook();\n      } finally {\n        setIsStrictModeForDevtools(false);\n      }\n    }\n\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  }\n\n  if (current !== null && !didReceiveUpdate) {\n    bailoutHooks(current, workInProgress, renderLanes);\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  if (getIsHydrating() && hasId) {\n    pushMaterializedTreeId(workInProgress);\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n  {\n    // This is used by DevTools to force a boundary to error.\n    switch (shouldError(workInProgress)) {\n      case false:\n        {\n          var _instance = workInProgress.stateNode;\n          var ctor = workInProgress.type; // TODO This way of resetting the error boundary state is a hack.\n          // Is there a better way to do this?\n\n          var tempInstance = new ctor(workInProgress.memoizedProps, _instance.context);\n          var state = tempInstance.state;\n\n          _instance.updater.enqueueSetState(_instance, state, null);\n\n          break;\n        }\n\n      case true:\n        {\n          workInProgress.flags |= DidCapture;\n          workInProgress.flags |= ShouldCapture; // eslint-disable-next-line react-internal/prod-error-codes\n\n          var error$1 = new Error('Simulated error coming from DevTools');\n          var lane = pickArbitraryLane(renderLanes);\n          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); // Schedule the error boundary to re-render using updated state\n\n          var update = createClassErrorUpdate(workInProgress, createCapturedValueAtFiber(error$1, workInProgress), lane);\n          enqueueCapturedUpdate(workInProgress, update);\n          break;\n        }\n    }\n\n    if (workInProgress.type !== workInProgress.elementType) {\n      // Lazy component props can't be validated in createElement\n      // because they're only guaranteed to be resolved here.\n      var innerPropTypes = Component.propTypes;\n\n      if (innerPropTypes) {\n        checkPropTypes(innerPropTypes, nextProps, // Resolved props\n        'prop', getComponentNameFromType(Component));\n      }\n    }\n  } // Push context providers early to prevent context stack mismatches.\n  // During mounting we don't know the child context yet as the instance doesn't exist.\n  // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n  var hasContext;\n\n  if (isContextProvider(Component)) {\n    hasContext = true;\n    pushContextProvider(workInProgress);\n  } else {\n    hasContext = false;\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var instance = workInProgress.stateNode;\n  var shouldUpdate;\n\n  if (instance === null) {\n    resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress); // In the initial pass we might need to construct the instance.\n\n    constructClassInstance(workInProgress, Component, nextProps);\n    mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n    shouldUpdate = true;\n  } else if (current === null) {\n    // In a resume, we'll already have an instance we can reuse.\n    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n  } else {\n    shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n  }\n\n  var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n  {\n    var inst = workInProgress.stateNode;\n\n    if (shouldUpdate && inst.props !== nextProps) {\n      if (!didWarnAboutReassigningProps) {\n        error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromFiber(workInProgress) || 'a component');\n      }\n\n      didWarnAboutReassigningProps = true;\n    }\n  }\n\n  return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n  // Refs should update even if shouldComponentUpdate returns false\n  markRef(current, workInProgress);\n  var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n  if (!shouldUpdate && !didCaptureError) {\n    // Context providers should defer to sCU for rendering\n    if (hasContext) {\n      invalidateContextProvider(workInProgress, Component, false);\n    }\n\n    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n  }\n\n  var instance = workInProgress.stateNode; // Rerender\n\n  ReactCurrentOwner$1.current = workInProgress;\n  var nextChildren;\n\n  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n    // If we captured an error, but getDerivedStateFromError is not defined,\n    // unmount all the children. componentDidCatch will schedule an update to\n    // re-render a fallback. This is temporary until we migrate everyone to\n    // the new API.\n    // TODO: Warn in a future release.\n    nextChildren = null;\n\n    {\n      stopProfilerTimerIfRunning();\n    }\n  } else {\n    {\n      markComponentRenderStarted(workInProgress);\n    }\n\n    {\n      setIsRendering(true);\n      nextChildren = instance.render();\n\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          instance.render();\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n\n      setIsRendering(false);\n    }\n\n    {\n      markComponentRenderStopped();\n    }\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n\n  if (current !== null && didCaptureError) {\n    // If we're recovering from an error, reconcile without reusing any of\n    // the existing children. Conceptually, the normal children and the children\n    // that are shown on error are two different sets, so we shouldn't reuse\n    // normal children even if their identities match.\n    forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n  } else {\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  } // Memoize state using the values we just used to render.\n  // TODO: Restructure so we never read values from the instance.\n\n\n  workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n  if (hasContext) {\n    invalidateContextProvider(workInProgress, Component, true);\n  }\n\n  return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n  var root = workInProgress.stateNode;\n\n  if (root.pendingContext) {\n    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n  } else if (root.context) {\n    // Should always be set\n    pushTopLevelContextObject(workInProgress, root.context, false);\n  }\n\n  pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n  pushHostRootContext(workInProgress);\n\n  if (current === null) {\n    throw new Error('Should have a current fiber. This is a bug in React.');\n  }\n\n  var nextProps = workInProgress.pendingProps;\n  var prevState = workInProgress.memoizedState;\n  var prevChildren = prevState.element;\n  cloneUpdateQueue(current, workInProgress);\n  processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n  var nextState = workInProgress.memoizedState;\n  var root = workInProgress.stateNode;\n  // being called \"element\".\n\n\n  var nextChildren = nextState.element;\n\n  if ( prevState.isDehydrated) {\n    // This is a hydration root whose shell has not yet hydrated. We should\n    // attempt to hydrate.\n    // Flip isDehydrated to false to indicate that when this render\n    // finishes, the root will no longer be dehydrated.\n    var overrideState = {\n      element: nextChildren,\n      isDehydrated: false,\n      cache: nextState.cache,\n      pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,\n      transitions: nextState.transitions\n    };\n    var updateQueue = workInProgress.updateQueue; // `baseState` can always be the last state because the root doesn't\n    // have reducer functions so it doesn't need rebasing.\n\n    updateQueue.baseState = overrideState;\n    workInProgress.memoizedState = overrideState;\n\n    if (workInProgress.flags & ForceClientRender) {\n      // Something errored during a previous attempt to hydrate the shell, so we\n      // forced a client render.\n      var recoverableError = createCapturedValueAtFiber(new Error('There was an error while hydrating. Because the error happened outside ' + 'of a Suspense boundary, the entire root will switch to ' + 'client rendering.'), workInProgress);\n      return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError);\n    } else if (nextChildren !== prevChildren) {\n      var _recoverableError = createCapturedValueAtFiber(new Error('This root received an early update, before anything was able ' + 'hydrate. Switched the entire root to client rendering.'), workInProgress);\n\n      return mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, _recoverableError);\n    } else {\n      // The outermost shell has not hydrated yet. Start hydrating.\n      enterHydrationState(workInProgress);\n\n      var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n      workInProgress.child = child;\n      var node = child;\n\n      while (node) {\n        // Mark each child as hydrating. This is a fast path to know whether this\n        // tree is part of a hydrating tree. This is used to determine if a child\n        // node has fully mounted yet, and for scheduling event replaying.\n        // Conceptually this is similar to Placement in that a new subtree is\n        // inserted into the React tree here. It just happens to not need DOM\n        // mutations because it already exists.\n        node.flags = node.flags & ~Placement | Hydrating;\n        node = node.sibling;\n      }\n    }\n  } else {\n    // Root is not dehydrated. Either this is a client-only root, or it\n    // already hydrated.\n    resetHydrationState();\n\n    if (nextChildren === prevChildren) {\n      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n    }\n\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  }\n\n  return workInProgress.child;\n}\n\nfunction mountHostRootWithoutHydrating(current, workInProgress, nextChildren, renderLanes, recoverableError) {\n  // Revert to client rendering.\n  resetHydrationState();\n  queueHydrationError(recoverableError);\n  workInProgress.flags |= ForceClientRender;\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderLanes) {\n  pushHostContext(workInProgress);\n\n  if (current === null) {\n    tryToClaimNextHydratableInstance(workInProgress);\n  }\n\n  var type = workInProgress.type;\n  var nextProps = workInProgress.pendingProps;\n  var prevProps = current !== null ? current.memoizedProps : null;\n  var nextChildren = nextProps.children;\n  var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n  if (isDirectTextChild) {\n    // We special case a direct text child of a host node. This is a common\n    // case. We won't handle it as a reified child. We will instead handle\n    // this in the host environment that also has access to this prop. That\n    // avoids allocating another HostText fiber and traversing it.\n    nextChildren = null;\n  } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n    // If we're switching from a direct text child to a normal child, or to\n    // empty, we need to schedule the text content to be reset.\n    workInProgress.flags |= ContentReset;\n  }\n\n  markRef(current, workInProgress);\n  reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction updateHostText(current, workInProgress) {\n  if (current === null) {\n    tryToClaimNextHydratableInstance(workInProgress);\n  } // Nothing to do here. This is terminal. We'll do the completion step\n  // immediately after.\n\n\n  return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, renderLanes) {\n  resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n  var props = workInProgress.pendingProps;\n  var lazyComponent = elementType;\n  var payload = lazyComponent._payload;\n  var init = lazyComponent._init;\n  var Component = init(payload); // Store the unwrapped component in the type.\n\n  workInProgress.type = Component;\n  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n  var resolvedProps = resolveDefaultProps(Component, props);\n  var child;\n\n  switch (resolvedTag) {\n    case FunctionComponent:\n      {\n        {\n          validateFunctionComponentInDev(workInProgress, Component);\n          workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n        }\n\n        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case ClassComponent:\n      {\n        {\n          workInProgress.type = Component = resolveClassForHotReloading(Component);\n        }\n\n        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case ForwardRef:\n      {\n        {\n          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n        }\n\n        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n        return child;\n      }\n\n    case MemoComponent:\n      {\n        {\n          if (workInProgress.type !== workInProgress.elementType) {\n            var outerPropTypes = Component.propTypes;\n\n            if (outerPropTypes) {\n              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n              'prop', getComponentNameFromType(Component));\n            }\n          }\n        }\n\n        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n        renderLanes);\n        return child;\n      }\n  }\n\n  var hint = '';\n\n  {\n    if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n      hint = ' Did you wrap a component in React.lazy() more than once?';\n    }\n  } // This message intentionally doesn't mention ForwardRef or MemoComponent\n  // because the fact that it's a separate type of work is an\n  // implementation detail.\n\n\n  throw new Error(\"Element type is invalid. Received a promise that resolves to: \" + Component + \". \" + (\"Lazy element type must resolve to a class or function.\" + hint));\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n  resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress); // Promote the fiber to a class and try rendering again.\n\n  workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n  // Push context providers early to prevent context stack mismatches.\n  // During mounting we don't know the child context yet as the instance doesn't exist.\n  // We will invalidate the child context in finishClassComponent() right after rendering.\n\n  var hasContext;\n\n  if (isContextProvider(Component)) {\n    hasContext = true;\n    pushContextProvider(workInProgress);\n  } else {\n    hasContext = false;\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  constructClassInstance(workInProgress, Component, nextProps);\n  mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n  resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);\n  var props = workInProgress.pendingProps;\n  var context;\n\n  {\n    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n    context = getMaskedContext(workInProgress, unmaskedContext);\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var value;\n  var hasId;\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  {\n    if (Component.prototype && typeof Component.prototype.render === 'function') {\n      var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutBadClass[componentName]) {\n        error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n        didWarnAboutBadClass[componentName] = true;\n      }\n    }\n\n    if (workInProgress.mode & StrictLegacyMode) {\n      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n    }\n\n    setIsRendering(true);\n    ReactCurrentOwner$1.current = workInProgress;\n    value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n    hasId = checkDidRenderIdHook();\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n\n  {\n    // Support for module components is deprecated and is removed behind a flag.\n    // Whether or not it would crash later, we want to show a good message in DEV first.\n    if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n      var _componentName = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutModulePatternComponent[_componentName]) {\n        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n        didWarnAboutModulePatternComponent[_componentName] = true;\n      }\n    }\n  }\n\n  if ( // Run these checks in production only if the flag is off.\n  // Eventually we'll delete this branch altogether.\n   typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n    {\n      var _componentName2 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutModulePatternComponent[_componentName2]) {\n        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n        didWarnAboutModulePatternComponent[_componentName2] = true;\n      }\n    } // Proceed under the assumption that this is a class instance\n\n\n    workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n    workInProgress.memoizedState = null;\n    workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n    // During mounting we don't know the child context yet as the instance doesn't exist.\n    // We will invalidate the child context in finishClassComponent() right after rendering.\n\n    var hasContext = false;\n\n    if (isContextProvider(Component)) {\n      hasContext = true;\n      pushContextProvider(workInProgress);\n    } else {\n      hasContext = false;\n    }\n\n    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n    initializeUpdateQueue(workInProgress);\n    adoptClassInstance(workInProgress, value);\n    mountClassInstance(workInProgress, Component, props, renderLanes);\n    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n  } else {\n    // Proceed under the assumption that this is a function component\n    workInProgress.tag = FunctionComponent;\n\n    {\n\n      if ( workInProgress.mode & StrictLegacyMode) {\n        setIsStrictModeForDevtools(true);\n\n        try {\n          value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n          hasId = checkDidRenderIdHook();\n        } finally {\n          setIsStrictModeForDevtools(false);\n        }\n      }\n    }\n\n    if (getIsHydrating() && hasId) {\n      pushMaterializedTreeId(workInProgress);\n    }\n\n    reconcileChildren(null, workInProgress, value, renderLanes);\n\n    {\n      validateFunctionComponentInDev(workInProgress, Component);\n    }\n\n    return workInProgress.child;\n  }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n  {\n    if (Component) {\n      if (Component.childContextTypes) {\n        error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n      }\n    }\n\n    if (workInProgress.ref !== null) {\n      var info = '';\n      var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n      if (ownerName) {\n        info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n      }\n\n      var warningKey = ownerName || '';\n      var debugSource = workInProgress._debugSource;\n\n      if (debugSource) {\n        warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n      }\n\n      if (!didWarnAboutFunctionRefs[warningKey]) {\n        didWarnAboutFunctionRefs[warningKey] = true;\n\n        error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n      }\n    }\n\n    if ( Component.defaultProps !== undefined) {\n      var componentName = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {\n        error('%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);\n\n        didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;\n      }\n    }\n\n    if (typeof Component.getDerivedStateFromProps === 'function') {\n      var _componentName3 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n        error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n        didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n      }\n    }\n\n    if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n      var _componentName4 = getComponentNameFromType(Component) || 'Unknown';\n\n      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n        error('%s: Function components do not support contextType.', _componentName4);\n\n        didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n      }\n    }\n  }\n}\n\nvar SUSPENDED_MARKER = {\n  dehydrated: null,\n  treeContext: null,\n  retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n  return {\n    baseLanes: renderLanes,\n    cachePool: getSuspendedCache(),\n    transitions: null\n  };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n  var cachePool = null;\n\n  return {\n    baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),\n    cachePool: cachePool,\n    transitions: prevOffscreenState.transitions\n  };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n  // If we're already showing a fallback, there are cases where we need to\n  // remain on that fallback regardless of whether the content has resolved.\n  // For example, SuspenseList coordinates when nested content appears.\n  if (current !== null) {\n    var suspenseState = current.memoizedState;\n\n    if (suspenseState === null) {\n      // Currently showing content. Don't hide it, even if ForceSuspenseFallback\n      // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n      // Note: This is a factoring smell. Can't remain on a fallback if there's\n      // no fallback to remain on.\n      return false;\n    }\n  } // Not currently showing content. Consult the Suspense context.\n\n\n  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n  // TODO: Should not remove render lanes that were pinged during this render\n  return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n  {\n    if (shouldSuspend(workInProgress)) {\n      workInProgress.flags |= DidCapture;\n    }\n  }\n\n  var suspenseContext = suspenseStackCursor.current;\n  var showFallback = false;\n  var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n  if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n    // Something in this boundary's subtree already suspended. Switch to\n    // rendering the fallback children.\n    showFallback = true;\n    workInProgress.flags &= ~DidCapture;\n  } else {\n    // Attempting the main content\n    if (current === null || current.memoizedState !== null) {\n      // This is a new mount or this boundary is already showing a fallback state.\n      // Mark this subtree context as having at least one invisible parent that could\n      // handle the fallback state.\n      // Avoided boundaries are not considered since they cannot handle preferred fallback states.\n      {\n        suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n      }\n    }\n  }\n\n  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n  pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n  // boundary's children. This involves some custom reconciliation logic. Two\n  // main reasons this is so complicated.\n  //\n  // First, Legacy Mode has different semantics for backwards compatibility. The\n  // primary tree will commit in an inconsistent state, so when we do the\n  // second pass to render the fallback, we do some exceedingly, uh, clever\n  // hacks to make that not totally break. Like transferring effects and\n  // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n  // because we bailout on the primary tree completely and leave it in its old\n  // state, no effects. Same as what we do for Offscreen (except that\n  // Offscreen doesn't have the first render pass).\n  //\n  // Second is hydration. During hydration, the Suspense fiber has a slightly\n  // different layout, where the child points to a dehydrated fragment, which\n  // contains the DOM rendered by the server.\n  //\n  // Third, even if you set all that aside, Suspense is like error boundaries in\n  // that we first we try to render one tree, and if that fails, we render again\n  // and switch to a different tree. Like a try/catch block. So we have to track\n  // which branch we're currently rendering. Ideally we would model this using\n  // a stack.\n\n  if (current === null) {\n    // Initial mount\n    // Special path for hydration\n    // If we're currently hydrating, try to hydrate this boundary.\n    tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n\n    var suspenseState = workInProgress.memoizedState;\n\n    if (suspenseState !== null) {\n      var dehydrated = suspenseState.dehydrated;\n\n      if (dehydrated !== null) {\n        return mountDehydratedSuspenseComponent(workInProgress, dehydrated);\n      }\n    }\n\n    var nextPrimaryChildren = nextProps.children;\n    var nextFallbackChildren = nextProps.fallback;\n\n    if (showFallback) {\n      var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n      var primaryChildFragment = workInProgress.child;\n      primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n      workInProgress.memoizedState = SUSPENDED_MARKER;\n\n      return fallbackFragment;\n    } else {\n      return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n    }\n  } else {\n    // This is an update.\n    // Special path for hydration\n    var prevState = current.memoizedState;\n\n    if (prevState !== null) {\n      var _dehydrated = prevState.dehydrated;\n\n      if (_dehydrated !== null) {\n        return updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, _dehydrated, prevState, renderLanes);\n      }\n    }\n\n    if (showFallback) {\n      var _nextFallbackChildren = nextProps.fallback;\n      var _nextPrimaryChildren = nextProps.children;\n      var fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren, _nextFallbackChildren, renderLanes);\n      var _primaryChildFragment2 = workInProgress.child;\n      var prevOffscreenState = current.child.memoizedState;\n      _primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n\n      _primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n      workInProgress.memoizedState = SUSPENDED_MARKER;\n      return fallbackChildFragment;\n    } else {\n      var _nextPrimaryChildren2 = nextProps.children;\n\n      var _primaryChildFragment3 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren2, renderLanes);\n\n      workInProgress.memoizedState = null;\n      return _primaryChildFragment3;\n    }\n  }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var primaryChildProps = {\n    mode: 'visible',\n    children: primaryChildren\n  };\n  var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n  primaryChildFragment.return = workInProgress;\n  workInProgress.child = primaryChildFragment;\n  return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var progressedPrimaryFragment = workInProgress.child;\n  var primaryChildProps = {\n    mode: 'hidden',\n    children: primaryChildren\n  };\n  var primaryChildFragment;\n  var fallbackChildFragment;\n\n  if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {\n    // In legacy mode, we commit the primary tree as if it successfully\n    // completed, even though it's in an inconsistent state.\n    primaryChildFragment = progressedPrimaryFragment;\n    primaryChildFragment.childLanes = NoLanes;\n    primaryChildFragment.pendingProps = primaryChildProps;\n\n    if ( workInProgress.mode & ProfileMode) {\n      // Reset the durations from the first pass so they aren't included in the\n      // final amounts. This seems counterintuitive, since we're intentionally\n      // not measuring part of the render phase, but this makes it match what we\n      // do in Concurrent Mode.\n      primaryChildFragment.actualDuration = 0;\n      primaryChildFragment.actualStartTime = -1;\n      primaryChildFragment.selfBaseDuration = 0;\n      primaryChildFragment.treeBaseDuration = 0;\n    }\n\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n  } else {\n    primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n  }\n\n  primaryChildFragment.return = workInProgress;\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n  return fallbackChildFragment;\n}\n\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes) {\n  // The props argument to `createFiberFromOffscreen` is `any` typed, so we use\n  // this wrapper function to constrain it.\n  return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);\n}\n\nfunction updateWorkInProgressOffscreenFiber(current, offscreenProps) {\n  // The props argument to `createWorkInProgress` is `any` typed, so we use this\n  // wrapper function to constrain it.\n  return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n  var currentPrimaryChildFragment = current.child;\n  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n  var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n    mode: 'visible',\n    children: primaryChildren\n  });\n\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    primaryChildFragment.lanes = renderLanes;\n  }\n\n  primaryChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = null;\n\n  if (currentFallbackChildFragment !== null) {\n    // Delete the fallback child fragment\n    var deletions = workInProgress.deletions;\n\n    if (deletions === null) {\n      workInProgress.deletions = [currentFallbackChildFragment];\n      workInProgress.flags |= ChildDeletion;\n    } else {\n      deletions.push(currentFallbackChildFragment);\n    }\n  }\n\n  workInProgress.child = primaryChildFragment;\n  return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var mode = workInProgress.mode;\n  var currentPrimaryChildFragment = current.child;\n  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n  var primaryChildProps = {\n    mode: 'hidden',\n    children: primaryChildren\n  };\n  var primaryChildFragment;\n\n  if ( // In legacy mode, we commit the primary tree as if it successfully\n  // completed, even though it's in an inconsistent state.\n  (mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n  // already cloned. In legacy mode, the only case where this isn't true is\n  // when DevTools forces us to display a fallback; we skip the first render\n  // pass entirely and go straight to rendering the fallback. (In Concurrent\n  // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n  // only codepath.)\n  workInProgress.child !== currentPrimaryChildFragment) {\n    var progressedPrimaryFragment = workInProgress.child;\n    primaryChildFragment = progressedPrimaryFragment;\n    primaryChildFragment.childLanes = NoLanes;\n    primaryChildFragment.pendingProps = primaryChildProps;\n\n    if ( workInProgress.mode & ProfileMode) {\n      // Reset the durations from the first pass so they aren't included in the\n      // final amounts. This seems counterintuitive, since we're intentionally\n      // not measuring part of the render phase, but this makes it match what we\n      // do in Concurrent Mode.\n      primaryChildFragment.actualDuration = 0;\n      primaryChildFragment.actualStartTime = -1;\n      primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n      primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n    } // The fallback fiber was added as a deletion during the first pass.\n    // However, since we're going to remain on the fallback, we no longer want\n    // to delete it.\n\n\n    workInProgress.deletions = null;\n  } else {\n    primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); // Since we're reusing a current tree, we need to reuse the flags, too.\n    // (We don't do this in legacy mode, because in legacy mode we don't re-use\n    // the current tree; see previous branch.)\n\n    primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;\n  }\n\n  var fallbackChildFragment;\n\n  if (currentFallbackChildFragment !== null) {\n    fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n  } else {\n    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n    // mounted but this is a new fiber.\n\n    fallbackChildFragment.flags |= Placement;\n  }\n\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n  return fallbackChildFragment;\n}\n\nfunction retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, recoverableError) {\n  // Falling back to client rendering. Because this has performance\n  // implications, it's considered a recoverable error, even though the user\n  // likely won't observe anything wrong with the UI.\n  //\n  // The error is passed in as an argument to enforce that every caller provide\n  // a custom message, or explicitly opt out (currently the only path that opts\n  // out is legacy mode; every concurrent path provides an error).\n  if (recoverableError !== null) {\n    queueHydrationError(recoverableError);\n  } // This will add the old fiber to the deletion list\n\n\n  reconcileChildFibers(workInProgress, current.child, null, renderLanes); // We're now not suspended nor dehydrated.\n\n  var nextProps = workInProgress.pendingProps;\n  var primaryChildren = nextProps.children;\n  var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Needs a placement effect because the parent (the Suspense boundary) already\n  // mounted but this is a new fiber.\n\n  primaryChildFragment.flags |= Placement;\n  workInProgress.memoizedState = null;\n  return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n  var fiberMode = workInProgress.mode;\n  var primaryChildProps = {\n    mode: 'visible',\n    children: primaryChildren\n  };\n  var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);\n  var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes, null); // Needs a placement effect because the parent (the Suspense\n  // boundary) already mounted but this is a new fiber.\n\n  fallbackChildFragment.flags |= Placement;\n  primaryChildFragment.return = workInProgress;\n  fallbackChildFragment.return = workInProgress;\n  primaryChildFragment.sibling = fallbackChildFragment;\n  workInProgress.child = primaryChildFragment;\n\n  if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n    // We will have dropped the effect list which contains the\n    // deletion. We need to reconcile to delete the current child.\n    reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n  }\n\n  return fallbackChildFragment;\n}\n\nfunction mountDehydratedSuspenseComponent(workInProgress, suspenseInstance, renderLanes) {\n  // During the first pass, we'll bail out and not drill into the children.\n  // Instead, we'll leave the content in place and try to hydrate it later.\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    {\n      error('Cannot hydrate Suspense in legacy mode. Switch from ' + 'ReactDOM.hydrate(element, container) to ' + 'ReactDOMClient.hydrateRoot(container, <App />)' + '.render(element) or remove the Suspense components from ' + 'the server rendered components.');\n    }\n\n    workInProgress.lanes = laneToLanes(SyncLane);\n  } else if (isSuspenseInstanceFallback(suspenseInstance)) {\n    // This is a client-only boundary. Since we won't get any content from the server\n    // for this, we need to schedule that at a higher priority based on when it would\n    // have timed out. In theory we could render it in this pass but it would have the\n    // wrong priority associated with it and will prevent hydration of parent path.\n    // Instead, we'll leave work left on it to render it in a separate commit.\n    // TODO This time should be the time at which the server rendered response that is\n    // a parent to this boundary was displayed. However, since we currently don't have\n    // a protocol to transfer that time, we'll just estimate it by using the current\n    // time. This will mean that Suspense timeouts are slightly shifted to later than\n    // they should be.\n    // Schedule a normal pri update to render this content.\n    workInProgress.lanes = laneToLanes(DefaultHydrationLane);\n  } else {\n    // We'll continue hydrating the rest at offscreen priority since we'll already\n    // be showing the right content coming from the server, it is no rush.\n    workInProgress.lanes = laneToLanes(OffscreenLane);\n  }\n\n  return null;\n}\n\nfunction updateDehydratedSuspenseComponent(current, workInProgress, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes) {\n  if (!didSuspend) {\n    // This is the first render pass. Attempt to hydrate.\n    // We should never be hydrating at this point because it is the first pass,\n    // but after we've already committed once.\n    warnIfHydrating();\n\n    if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n      return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, // TODO: When we delete legacy mode, we should make this error argument\n      // required — every concurrent mode path that causes hydration to\n      // de-opt to client rendering should have an error message.\n      null);\n    }\n\n    if (isSuspenseInstanceFallback(suspenseInstance)) {\n      // This boundary is in a permanent fallback state. In this case, we'll never\n      // get an update and we'll never be able to hydrate the final content. Let's just try the\n      // client side render instead.\n      var digest, message, stack;\n\n      {\n        var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);\n\n        digest = _getSuspenseInstanceF.digest;\n        message = _getSuspenseInstanceF.message;\n        stack = _getSuspenseInstanceF.stack;\n      }\n\n      var error;\n\n      if (message) {\n        // eslint-disable-next-line react-internal/prod-error-codes\n        error = new Error(message);\n      } else {\n        error = new Error('The server could not finish this Suspense boundary, likely ' + 'due to an error during server rendering. Switched to ' + 'client rendering.');\n      }\n\n      var capturedValue = createCapturedValue(error, digest, stack);\n      return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, capturedValue);\n    }\n    // any context has changed, we need to treat is as if the input might have changed.\n\n\n    var hasContextChanged = includesSomeLane(renderLanes, current.childLanes);\n\n    if (didReceiveUpdate || hasContextChanged) {\n      // This boundary has changed since the first render. This means that we are now unable to\n      // hydrate it. We might still be able to hydrate it using a higher priority lane.\n      var root = getWorkInProgressRoot();\n\n      if (root !== null) {\n        var attemptHydrationAtLane = getBumpedLaneForHydration(root, renderLanes);\n\n        if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {\n          // Intentionally mutating since this render will get interrupted. This\n          // is one of the very rare times where we mutate the current tree\n          // during the render phase.\n          suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render\n\n          var eventTime = NoTimestamp;\n          enqueueConcurrentRenderForLane(current, attemptHydrationAtLane);\n          scheduleUpdateOnFiber(root, current, attemptHydrationAtLane, eventTime);\n        }\n      } // If we have scheduled higher pri work above, this will probably just abort the render\n      // since we now have higher priority work, but in case it doesn't, we need to prepare to\n      // render something, if we time out. Even if that requires us to delete everything and\n      // skip hydration.\n      // Delay having to do this as long as the suspense timeout allows us.\n\n\n      renderDidSuspendDelayIfPossible();\n\n      var _capturedValue = createCapturedValue(new Error('This Suspense boundary received an update before it finished ' + 'hydrating. This caused the boundary to switch to client rendering. ' + 'The usual way to fix this is to wrap the original update ' + 'in startTransition.'));\n\n      return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue);\n    } else if (isSuspenseInstancePending(suspenseInstance)) {\n      // This component is still pending more data from the server, so we can't hydrate its\n      // content. We treat it as if this component suspended itself. It might seem as if\n      // we could just try to render it client-side instead. However, this will perform a\n      // lot of unnecessary work and is unlikely to complete since it often will suspend\n      // on missing data anyway. Additionally, the server might be able to render more\n      // than we can on the client yet. In that case we'd end up with more fallback states\n      // on the client than if we just leave it alone. If the server times out or errors\n      // these should update this boundary to the permanent Fallback state instead.\n      // Mark it as having captured (i.e. suspended).\n      workInProgress.flags |= DidCapture; // Leave the child in place. I.e. the dehydrated fragment.\n\n      workInProgress.child = current.child; // Register a callback to retry this boundary once the server has sent the result.\n\n      var retry = retryDehydratedSuspenseBoundary.bind(null, current);\n      registerSuspenseInstanceRetry(suspenseInstance, retry);\n      return null;\n    } else {\n      // This is the first attempt.\n      reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress, suspenseInstance, suspenseState.treeContext);\n      var primaryChildren = nextProps.children;\n      var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress, primaryChildren); // Mark the children as hydrating. This is a fast path to know whether this\n      // tree is part of a hydrating tree. This is used to determine if a child\n      // node has fully mounted yet, and for scheduling event replaying.\n      // Conceptually this is similar to Placement in that a new subtree is\n      // inserted into the React tree here. It just happens to not need DOM\n      // mutations because it already exists.\n\n      primaryChildFragment.flags |= Hydrating;\n      return primaryChildFragment;\n    }\n  } else {\n    // This is the second render pass. We already attempted to hydrated, but\n    // something either suspended or errored.\n    if (workInProgress.flags & ForceClientRender) {\n      // Something errored during hydration. Try again without hydrating.\n      workInProgress.flags &= ~ForceClientRender;\n\n      var _capturedValue2 = createCapturedValue(new Error('There was an error while hydrating this Suspense boundary. ' + 'Switched to client rendering.'));\n\n      return retrySuspenseComponentWithoutHydrating(current, workInProgress, renderLanes, _capturedValue2);\n    } else if (workInProgress.memoizedState !== null) {\n      // Something suspended and we should still be in dehydrated mode.\n      // Leave the existing child in place.\n      workInProgress.child = current.child; // The dehydrated completion pass expects this flag to be there\n      // but the normal suspense pass doesn't.\n\n      workInProgress.flags |= DidCapture;\n      return null;\n    } else {\n      // Suspended but we should no longer be in dehydrated mode.\n      // Therefore we now have to render the fallback.\n      var nextPrimaryChildren = nextProps.children;\n      var nextFallbackChildren = nextProps.fallback;\n      var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current, workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n      var _primaryChildFragment4 = workInProgress.child;\n      _primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes);\n      workInProgress.memoizedState = SUSPENDED_MARKER;\n      return fallbackChildFragment;\n    }\n  }\n}\n\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n  fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n  }\n\n  scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n  // Mark any Suspense boundaries with fallbacks as having work to do.\n  // If they were previously forced into fallbacks, they may now be able\n  // to unblock.\n  var node = firstChild;\n\n  while (node !== null) {\n    if (node.tag === SuspenseComponent) {\n      var state = node.memoizedState;\n\n      if (state !== null) {\n        scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n      }\n    } else if (node.tag === SuspenseListComponent) {\n      // If the tail is hidden there might not be an Suspense boundaries\n      // to schedule work on. In this case we have to schedule it on the\n      // list itself.\n      // We don't have to traverse to the children of the list since\n      // the list will propagate the change when it rerenders.\n      scheduleSuspenseWorkOnFiber(node, renderLanes, workInProgress);\n    } else if (node.child !== null) {\n      node.child.return = node;\n      node = node.child;\n      continue;\n    }\n\n    if (node === workInProgress) {\n      return;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === workInProgress) {\n        return;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  }\n}\n\nfunction findLastContentRow(firstChild) {\n  // This is going to find the last row among these children that is already\n  // showing content on the screen, as opposed to being in fallback state or\n  // new. If a row has multiple Suspense boundaries, any of them being in the\n  // fallback state, counts as the whole row being in a fallback state.\n  // Note that the \"rows\" will be workInProgress, but any nested children\n  // will still be current since we haven't rendered them yet. The mounted\n  // order may not be the same as the new order. We use the new order.\n  var row = firstChild;\n  var lastContentRow = null;\n\n  while (row !== null) {\n    var currentRow = row.alternate; // New rows can't be content rows.\n\n    if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n      lastContentRow = row;\n    }\n\n    row = row.sibling;\n  }\n\n  return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n  {\n    if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n      didWarnAboutRevealOrder[revealOrder] = true;\n\n      if (typeof revealOrder === 'string') {\n        switch (revealOrder.toLowerCase()) {\n          case 'together':\n          case 'forwards':\n          case 'backwards':\n            {\n              error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n              break;\n            }\n\n          case 'forward':\n          case 'backward':\n            {\n              error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n              break;\n            }\n\n          default:\n            error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n            break;\n        }\n      } else {\n        error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n      }\n    }\n  }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n  {\n    if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n      if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n        didWarnAboutTailOptions[tailMode] = true;\n\n        error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n      } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n        didWarnAboutTailOptions[tailMode] = true;\n\n        error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n      }\n    }\n  }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n  {\n    var isAnArray = isArray(childSlot);\n    var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === 'function';\n\n    if (isAnArray || isIterable) {\n      var type = isAnArray ? 'array' : 'iterable';\n\n      error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n  {\n    if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n      if (isArray(children)) {\n        for (var i = 0; i < children.length; i++) {\n          if (!validateSuspenseListNestedChild(children[i], i)) {\n            return;\n          }\n        }\n      } else {\n        var iteratorFn = getIteratorFn(children);\n\n        if (typeof iteratorFn === 'function') {\n          var childrenIterator = iteratorFn.call(children);\n\n          if (childrenIterator) {\n            var step = childrenIterator.next();\n            var _i = 0;\n\n            for (; !step.done; step = childrenIterator.next()) {\n              if (!validateSuspenseListNestedChild(step.value, _i)) {\n                return;\n              }\n\n              _i++;\n            }\n          }\n        } else {\n          error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n        }\n      }\n    }\n  }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {\n  var renderState = workInProgress.memoizedState;\n\n  if (renderState === null) {\n    workInProgress.memoizedState = {\n      isBackwards: isBackwards,\n      rendering: null,\n      renderingStartTime: 0,\n      last: lastContentRow,\n      tail: tail,\n      tailMode: tailMode\n    };\n  } else {\n    // We can reuse the existing object from previous renders.\n    renderState.isBackwards = isBackwards;\n    renderState.rendering = null;\n    renderState.renderingStartTime = 0;\n    renderState.last = lastContentRow;\n    renderState.tail = tail;\n    renderState.tailMode = tailMode;\n  }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n  var nextProps = workInProgress.pendingProps;\n  var revealOrder = nextProps.revealOrder;\n  var tailMode = nextProps.tail;\n  var newChildren = nextProps.children;\n  validateRevealOrder(revealOrder);\n  validateTailOptions(tailMode, revealOrder);\n  validateSuspenseListChildren(newChildren, revealOrder);\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  var suspenseContext = suspenseStackCursor.current;\n  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n  if (shouldForceFallback) {\n    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n    workInProgress.flags |= DidCapture;\n  } else {\n    var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n    if (didSuspendBefore) {\n      // If we previously forced a fallback, we need to schedule work\n      // on any nested boundaries to let them know to try to render\n      // again. This is the same as context updating.\n      propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n    }\n\n    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n  }\n\n  pushSuspenseContext(workInProgress, suspenseContext);\n\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    // In legacy mode, SuspenseList doesn't work so we just\n    // use make it a noop by treating it as the default revealOrder.\n    workInProgress.memoizedState = null;\n  } else {\n    switch (revealOrder) {\n      case 'forwards':\n        {\n          var lastContentRow = findLastContentRow(workInProgress.child);\n          var tail;\n\n          if (lastContentRow === null) {\n            // The whole list is part of the tail.\n            // TODO: We could fast path by just rendering the tail now.\n            tail = workInProgress.child;\n            workInProgress.child = null;\n          } else {\n            // Disconnect the tail rows after the content row.\n            // We're going to render them separately later.\n            tail = lastContentRow.sibling;\n            lastContentRow.sibling = null;\n          }\n\n          initSuspenseListRenderState(workInProgress, false, // isBackwards\n          tail, lastContentRow, tailMode);\n          break;\n        }\n\n      case 'backwards':\n        {\n          // We're going to find the first row that has existing content.\n          // At the same time we're going to reverse the list of everything\n          // we pass in the meantime. That's going to be our tail in reverse\n          // order.\n          var _tail = null;\n          var row = workInProgress.child;\n          workInProgress.child = null;\n\n          while (row !== null) {\n            var currentRow = row.alternate; // New rows can't be content rows.\n\n            if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n              // This is the beginning of the main content.\n              workInProgress.child = row;\n              break;\n            }\n\n            var nextRow = row.sibling;\n            row.sibling = _tail;\n            _tail = row;\n            row = nextRow;\n          } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n          initSuspenseListRenderState(workInProgress, true, // isBackwards\n          _tail, null, // last\n          tailMode);\n          break;\n        }\n\n      case 'together':\n        {\n          initSuspenseListRenderState(workInProgress, false, // isBackwards\n          null, // tail\n          null, // last\n          undefined);\n          break;\n        }\n\n      default:\n        {\n          // The default reveal order is the same as not having\n          // a boundary.\n          workInProgress.memoizedState = null;\n        }\n    }\n  }\n\n  return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n  var nextChildren = workInProgress.pendingProps;\n\n  if (current === null) {\n    // Portals are special because we don't append the children during mount\n    // but at commit. Therefore we need to track insertions which the normal\n    // flow doesn't do during mount. This doesn't happen at the root because\n    // the root always starts with a \"current\" with a null child.\n    // TODO: Consider unifying this with how the root works.\n    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n  } else {\n    reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n  }\n\n  return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n  var providerType = workInProgress.type;\n  var context = providerType._context;\n  var newProps = workInProgress.pendingProps;\n  var oldProps = workInProgress.memoizedProps;\n  var newValue = newProps.value;\n\n  {\n    if (!('value' in newProps)) {\n      if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n        hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n        error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n      }\n    }\n\n    var providerPropTypes = workInProgress.type.propTypes;\n\n    if (providerPropTypes) {\n      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n    }\n  }\n\n  pushProvider(workInProgress, context, newValue);\n\n  {\n    if (oldProps !== null) {\n      var oldValue = oldProps.value;\n\n      if (objectIs(oldValue, newValue)) {\n        // No change. Bailout early if children are the same.\n        if (oldProps.children === newProps.children && !hasContextChanged()) {\n          return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n        }\n      } else {\n        // The context value changed. Search for matching consumers and schedule\n        // them to update.\n        propagateContextChange(workInProgress, context, renderLanes);\n      }\n    }\n  }\n\n  var newChildren = newProps.children;\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n  var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n  // DEV mode, we create a separate object for Context.Consumer that acts\n  // like a proxy to Context. This proxy object adds unnecessary code in PROD\n  // so we use the old behaviour (Context.Consumer references Context) to\n  // reduce size and overhead. The separate object references context via\n  // a property called \"_context\", which also gives us the ability to check\n  // in DEV mode if this property exists or not and warn if it does not.\n\n  {\n    if (context._context === undefined) {\n      // This may be because it's a Context (rather than a Consumer).\n      // Or it may be because it's older React where they're the same thing.\n      // We only want to warn if we're sure it's a new React.\n      if (context !== context.Consumer) {\n        if (!hasWarnedAboutUsingContextAsConsumer) {\n          hasWarnedAboutUsingContextAsConsumer = true;\n\n          error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n        }\n      }\n    } else {\n      context = context._context;\n    }\n  }\n\n  var newProps = workInProgress.pendingProps;\n  var render = newProps.children;\n\n  {\n    if (typeof render !== 'function') {\n      error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n    }\n  }\n\n  prepareToReadContext(workInProgress, renderLanes);\n  var newValue = readContext(context);\n\n  {\n    markComponentRenderStarted(workInProgress);\n  }\n\n  var newChildren;\n\n  {\n    ReactCurrentOwner$1.current = workInProgress;\n    setIsRendering(true);\n    newChildren = render(newValue);\n    setIsRendering(false);\n  }\n\n  {\n    markComponentRenderStopped();\n  } // React DevTools reads this flag.\n\n\n  workInProgress.flags |= PerformedWork;\n  reconcileChildren(current, workInProgress, newChildren, renderLanes);\n  return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n  didReceiveUpdate = true;\n}\n\nfunction resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress) {\n  if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n    if (current !== null) {\n      // A lazy component only mounts if it suspended inside a non-\n      // concurrent tree, in an inconsistent state. We want to treat it like\n      // a new mount, even though an empty version of it already committed.\n      // Disconnect the alternate pointers.\n      current.alternate = null;\n      workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n      workInProgress.flags |= Placement;\n    }\n  }\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n  if (current !== null) {\n    // Reuse previous dependencies\n    workInProgress.dependencies = current.dependencies;\n  }\n\n  {\n    // Don't update \"base\" render times for bailouts.\n    stopProfilerTimerIfRunning();\n  }\n\n  markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n  if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n    // The children don't have any work either. We can skip them.\n    // TODO: Once we add back resuming, we should check if the children are\n    // a work-in-progress set. If so, we need to transfer their effects.\n    {\n      return null;\n    }\n  } // This fiber doesn't have work, but its subtree does. Clone the child\n  // fibers and continue.\n\n\n  cloneChildFibers(current, workInProgress);\n  return workInProgress.child;\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n  {\n    var returnFiber = oldWorkInProgress.return;\n\n    if (returnFiber === null) {\n      // eslint-disable-next-line react-internal/prod-error-codes\n      throw new Error('Cannot swap the root fiber.');\n    } // Disconnect from the old current.\n    // It will get deleted.\n\n\n    current.alternate = null;\n    oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n    newWorkInProgress.index = oldWorkInProgress.index;\n    newWorkInProgress.sibling = oldWorkInProgress.sibling;\n    newWorkInProgress.return = oldWorkInProgress.return;\n    newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n    if (oldWorkInProgress === returnFiber.child) {\n      returnFiber.child = newWorkInProgress;\n    } else {\n      var prevSibling = returnFiber.child;\n\n      if (prevSibling === null) {\n        // eslint-disable-next-line react-internal/prod-error-codes\n        throw new Error('Expected parent to have a child.');\n      }\n\n      while (prevSibling.sibling !== oldWorkInProgress) {\n        prevSibling = prevSibling.sibling;\n\n        if (prevSibling === null) {\n          // eslint-disable-next-line react-internal/prod-error-codes\n          throw new Error('Expected to find the previous sibling.');\n        }\n      }\n\n      prevSibling.sibling = newWorkInProgress;\n    } // Delete the old fiber and place the new one.\n    // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n    var deletions = returnFiber.deletions;\n\n    if (deletions === null) {\n      returnFiber.deletions = [current];\n      returnFiber.flags |= ChildDeletion;\n    } else {\n      deletions.push(current);\n    }\n\n    newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n    return newWorkInProgress;\n  }\n}\n\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n  // Before performing an early bailout, we must check if there are pending\n  // updates or context.\n  var updateLanes = current.lanes;\n\n  if (includesSomeLane(updateLanes, renderLanes)) {\n    return true;\n  } // No pending update, but because context is propagated lazily, we need\n\n  return false;\n}\n\nfunction attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes) {\n  // This fiber does not have any pending work. Bailout without entering\n  // the begin phase. There's still some bookkeeping we that needs to be done\n  // in this optimized path, mostly pushing stuff onto the stack.\n  switch (workInProgress.tag) {\n    case HostRoot:\n      pushHostRootContext(workInProgress);\n      var root = workInProgress.stateNode;\n\n      resetHydrationState();\n      break;\n\n    case HostComponent:\n      pushHostContext(workInProgress);\n      break;\n\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          pushContextProvider(workInProgress);\n        }\n\n        break;\n      }\n\n    case HostPortal:\n      pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n      break;\n\n    case ContextProvider:\n      {\n        var newValue = workInProgress.memoizedProps.value;\n        var context = workInProgress.type._context;\n        pushProvider(workInProgress, context, newValue);\n        break;\n      }\n\n    case Profiler:\n      {\n        // Profiler should only call onRender when one of its descendants actually rendered.\n        var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n        if (hasChildWork) {\n          workInProgress.flags |= Update;\n        }\n\n        {\n          // Reset effect durations for the next eventual effect phase.\n          // These are reset during render to allow the DevTools commit hook a chance to read them,\n          var stateNode = workInProgress.stateNode;\n          stateNode.effectDuration = 0;\n          stateNode.passiveEffectDuration = 0;\n        }\n      }\n\n      break;\n\n    case SuspenseComponent:\n      {\n        var state = workInProgress.memoizedState;\n\n        if (state !== null) {\n          if (state.dehydrated !== null) {\n            pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // We know that this component will suspend again because if it has\n            // been unsuspended it has committed as a resolved Suspense component.\n            // If it needs to be retried, it should have work scheduled on it.\n\n            workInProgress.flags |= DidCapture; // We should never render the children of a dehydrated boundary until we\n            // upgrade it. We return null instead of bailoutOnAlreadyFinishedWork.\n\n            return null;\n          } // If this boundary is currently timed out, we need to decide\n          // whether to retry the primary children, or to skip over it and\n          // go straight to the fallback. Check the priority of the primary\n          // child fragment.\n\n\n          var primaryChildFragment = workInProgress.child;\n          var primaryChildLanes = primaryChildFragment.childLanes;\n\n          if (includesSomeLane(renderLanes, primaryChildLanes)) {\n            // The primary children have pending work. Use the normal path\n            // to attempt to render the primary children again.\n            return updateSuspenseComponent(current, workInProgress, renderLanes);\n          } else {\n            // The primary child fragment does not have pending work marked\n            // on it\n            pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n            // priority. Bailout.\n\n            var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n            if (child !== null) {\n              // The fallback children have pending work. Skip over the\n              // primary children and work on the fallback.\n              return child.sibling;\n            } else {\n              // Note: We can return `null` here because we already checked\n              // whether there were nested context consumers, via the call to\n              // `bailoutOnAlreadyFinishedWork` above.\n              return null;\n            }\n          }\n        } else {\n          pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n        }\n\n        break;\n      }\n\n    case SuspenseListComponent:\n      {\n        var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n        var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n        if (didSuspendBefore) {\n          if (_hasChildWork) {\n            // If something was in fallback state last time, and we have all the\n            // same children then we're still in progressive loading state.\n            // Something might get unblocked by state updates or retries in the\n            // tree which will affect the tail. So we need to use the normal\n            // path to compute the correct tail.\n            return updateSuspenseListComponent(current, workInProgress, renderLanes);\n          } // If none of the children had any work, that means that none of\n          // them got retried so they'll still be blocked in the same way\n          // as before. We can fast bail out.\n\n\n          workInProgress.flags |= DidCapture;\n        } // If nothing suspended before and we're rendering the same children,\n        // then the tail doesn't matter. Anything new that suspends will work\n        // in the \"together\" mode, so we can continue from the state we had.\n\n\n        var renderState = workInProgress.memoizedState;\n\n        if (renderState !== null) {\n          // Reset to the \"together\" mode in case we've started a different\n          // update in the past but didn't complete it.\n          renderState.rendering = null;\n          renderState.tail = null;\n          renderState.lastEffect = null;\n        }\n\n        pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n        if (_hasChildWork) {\n          break;\n        } else {\n          // If none of the children had any work, that means that none of\n          // them got retried so they'll still be blocked in the same way\n          // as before. We can fast bail out.\n          return null;\n        }\n      }\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      {\n        // Need to check if the tree still needs to be deferred. This is\n        // almost identical to the logic used in the normal update path,\n        // so we'll just enter that. The only difference is we'll bail out\n        // at the next level instead of this one, because the child props\n        // have not changed. Which is fine.\n        // TODO: Probably should refactor `beginWork` to split the bailout\n        // path from the normal path. I'm tempted to do a labeled break here\n        // but I won't :)\n        workInProgress.lanes = NoLanes;\n        return updateOffscreenComponent(current, workInProgress, renderLanes);\n      }\n  }\n\n  return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n  {\n    if (workInProgress._debugNeedsRemount && current !== null) {\n      // This will restart the begin phase with a new fiber.\n      return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n    }\n  }\n\n  if (current !== null) {\n    var oldProps = current.memoizedProps;\n    var newProps = workInProgress.pendingProps;\n\n    if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n     workInProgress.type !== current.type )) {\n      // If props or context changed, mark the fiber as having performed work.\n      // This may be unset if the props are determined to be equal later (memo).\n      didReceiveUpdate = true;\n    } else {\n      // Neither props nor legacy context changes. Check if there's a pending\n      // update or context change.\n      var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current, renderLanes);\n\n      if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there\n      // may not be work scheduled on `current`, so we check for this flag.\n      (workInProgress.flags & DidCapture) === NoFlags) {\n        // No pending updates or context. Bail out now.\n        didReceiveUpdate = false;\n        return attemptEarlyBailoutIfNoScheduledUpdate(current, workInProgress, renderLanes);\n      }\n\n      if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n        // This is a special case that only exists for legacy mode.\n        // See https://github.com/facebook/react/pull/19216.\n        didReceiveUpdate = true;\n      } else {\n        // An update was scheduled on this fiber, but there are no new props\n        // nor legacy context. Set this to false. If an update queue or context\n        // consumer produces a changed value, it will set this to true. Otherwise,\n        // the component will assume the children have not changed and bail out.\n        didReceiveUpdate = false;\n      }\n    }\n  } else {\n    didReceiveUpdate = false;\n\n    if (getIsHydrating() && isForkedChild(workInProgress)) {\n      // Check if this child belongs to a list of muliple children in\n      // its parent.\n      //\n      // In a true multi-threaded implementation, we would render children on\n      // parallel threads. This would represent the beginning of a new render\n      // thread for this subtree.\n      //\n      // We only use this for id generation during hydration, which is why the\n      // logic is located in this special branch.\n      var slotIndex = workInProgress.index;\n      var numberOfForks = getForksAtLevel();\n      pushTreeId(workInProgress, numberOfForks, slotIndex);\n    }\n  } // Before entering the begin phase, clear pending update priority.\n  // TODO: This assumes that we're about to evaluate the component and process\n  // the update queue. However, there's an exception: SimpleMemoComponent\n  // sometimes bails out later in the begin phase. This indicates that we should\n  // move this assignment out of the common path and into each branch.\n\n\n  workInProgress.lanes = NoLanes;\n\n  switch (workInProgress.tag) {\n    case IndeterminateComponent:\n      {\n        return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n      }\n\n    case LazyComponent:\n      {\n        var elementType = workInProgress.elementType;\n        return mountLazyComponent(current, workInProgress, elementType, renderLanes);\n      }\n\n    case FunctionComponent:\n      {\n        var Component = workInProgress.type;\n        var unresolvedProps = workInProgress.pendingProps;\n        var resolvedProps = workInProgress.elementType === Component ? unresolvedProps : resolveDefaultProps(Component, unresolvedProps);\n        return updateFunctionComponent(current, workInProgress, Component, resolvedProps, renderLanes);\n      }\n\n    case ClassComponent:\n      {\n        var _Component = workInProgress.type;\n        var _unresolvedProps = workInProgress.pendingProps;\n\n        var _resolvedProps = workInProgress.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);\n\n        return updateClassComponent(current, workInProgress, _Component, _resolvedProps, renderLanes);\n      }\n\n    case HostRoot:\n      return updateHostRoot(current, workInProgress, renderLanes);\n\n    case HostComponent:\n      return updateHostComponent(current, workInProgress, renderLanes);\n\n    case HostText:\n      return updateHostText(current, workInProgress);\n\n    case SuspenseComponent:\n      return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n    case HostPortal:\n      return updatePortalComponent(current, workInProgress, renderLanes);\n\n    case ForwardRef:\n      {\n        var type = workInProgress.type;\n        var _unresolvedProps2 = workInProgress.pendingProps;\n\n        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n        return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n      }\n\n    case Fragment:\n      return updateFragment(current, workInProgress, renderLanes);\n\n    case Mode:\n      return updateMode(current, workInProgress, renderLanes);\n\n    case Profiler:\n      return updateProfiler(current, workInProgress, renderLanes);\n\n    case ContextProvider:\n      return updateContextProvider(current, workInProgress, renderLanes);\n\n    case ContextConsumer:\n      return updateContextConsumer(current, workInProgress, renderLanes);\n\n    case MemoComponent:\n      {\n        var _type2 = workInProgress.type;\n        var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n        var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n        {\n          if (workInProgress.type !== workInProgress.elementType) {\n            var outerPropTypes = _type2.propTypes;\n\n            if (outerPropTypes) {\n              checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n              'prop', getComponentNameFromType(_type2));\n            }\n          }\n        }\n\n        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n        return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, renderLanes);\n      }\n\n    case SimpleMemoComponent:\n      {\n        return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, renderLanes);\n      }\n\n    case IncompleteClassComponent:\n      {\n        var _Component2 = workInProgress.type;\n        var _unresolvedProps4 = workInProgress.pendingProps;\n\n        var _resolvedProps4 = workInProgress.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);\n\n        return mountIncompleteClassComponent(current, workInProgress, _Component2, _resolvedProps4, renderLanes);\n      }\n\n    case SuspenseListComponent:\n      {\n        return updateSuspenseListComponent(current, workInProgress, renderLanes);\n      }\n\n    case ScopeComponent:\n      {\n\n        break;\n      }\n\n    case OffscreenComponent:\n      {\n        return updateOffscreenComponent(current, workInProgress, renderLanes);\n      }\n  }\n\n  throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction markUpdate(workInProgress) {\n  // Tag the fiber with an update effect. This turns a Placement into\n  // a PlacementAndUpdate.\n  workInProgress.flags |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n  workInProgress.flags |= Ref;\n\n  {\n    workInProgress.flags |= RefStatic;\n  }\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent$1;\nvar updateHostText$1;\n\n{\n  // Mutation mode\n  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n    // We only have the top Fiber that was created but we need recurse down its\n    // children to find all the terminal nodes.\n    var node = workInProgress.child;\n\n    while (node !== null) {\n      if (node.tag === HostComponent || node.tag === HostText) {\n        appendInitialChild(parent, node.stateNode);\n      } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === workInProgress) {\n        return;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === workInProgress) {\n          return;\n        }\n\n        node = node.return;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  };\n\n  updateHostContainer = function (current, workInProgress) {// Noop\n  };\n\n  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n    // If we have an alternate, that means this is an update and we need to\n    // schedule a side-effect to do the updates.\n    var oldProps = current.memoizedProps;\n\n    if (oldProps === newProps) {\n      // In mutation mode, this is sufficient for a bailout because\n      // we won't touch this node even if children changed.\n      return;\n    } // If we get updated because one of our children updated, we don't\n    // have newProps so we'll have to reuse them.\n    // TODO: Split the update API as separate for the props vs. children.\n    // Even better would be if children weren't special cased at all tho.\n\n\n    var instance = workInProgress.stateNode;\n    var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n    // component is hitting the resume path. Figure out why. Possibly\n    // related to `hidden`.\n\n    var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n    workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n    // is a new ref we mark this as an update. All the work is done in commitWork.\n\n    if (updatePayload) {\n      markUpdate(workInProgress);\n    }\n  };\n\n  updateHostText$1 = function (current, workInProgress, oldText, newText) {\n    // If the text differs, mark it as an update. All the work in done in commitWork.\n    if (oldText !== newText) {\n      markUpdate(workInProgress);\n    }\n  };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n  if (getIsHydrating()) {\n    // If we're hydrating, we should consume as many items as we can\n    // so we don't leave any behind.\n    return;\n  }\n\n  switch (renderState.tailMode) {\n    case 'hidden':\n      {\n        // Any insertions at the end of the tail list after this point\n        // should be invisible. If there are already mounted boundaries\n        // anything before them are not considered for collapsing.\n        // Therefore we need to go through the whole tail to find if\n        // there are any.\n        var tailNode = renderState.tail;\n        var lastTailNode = null;\n\n        while (tailNode !== null) {\n          if (tailNode.alternate !== null) {\n            lastTailNode = tailNode;\n          }\n\n          tailNode = tailNode.sibling;\n        } // Next we're simply going to delete all insertions after the\n        // last rendered item.\n\n\n        if (lastTailNode === null) {\n          // All remaining items in the tail are insertions.\n          renderState.tail = null;\n        } else {\n          // Detach the insertion after the last node that was already\n          // inserted.\n          lastTailNode.sibling = null;\n        }\n\n        break;\n      }\n\n    case 'collapsed':\n      {\n        // Any insertions at the end of the tail list after this point\n        // should be invisible. If there are already mounted boundaries\n        // anything before them are not considered for collapsing.\n        // Therefore we need to go through the whole tail to find if\n        // there are any.\n        var _tailNode = renderState.tail;\n        var _lastTailNode = null;\n\n        while (_tailNode !== null) {\n          if (_tailNode.alternate !== null) {\n            _lastTailNode = _tailNode;\n          }\n\n          _tailNode = _tailNode.sibling;\n        } // Next we're simply going to delete all insertions after the\n        // last rendered item.\n\n\n        if (_lastTailNode === null) {\n          // All remaining items in the tail are insertions.\n          if (!hasRenderedATailFallback && renderState.tail !== null) {\n            // We suspended during the head. We want to show at least one\n            // row at the tail. So we'll keep on and cut off the rest.\n            renderState.tail.sibling = null;\n          } else {\n            renderState.tail = null;\n          }\n        } else {\n          // Detach the insertion after the last node that was already\n          // inserted.\n          _lastTailNode.sibling = null;\n        }\n\n        break;\n      }\n  }\n}\n\nfunction bubbleProperties(completedWork) {\n  var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;\n  var newChildLanes = NoLanes;\n  var subtreeFlags = NoFlags;\n\n  if (!didBailout) {\n    // Bubble up the earliest expiration time.\n    if ( (completedWork.mode & ProfileMode) !== NoMode) {\n      // In profiling mode, resetChildExpirationTime is also used to reset\n      // profiler durations.\n      var actualDuration = completedWork.actualDuration;\n      var treeBaseDuration = completedWork.selfBaseDuration;\n      var child = completedWork.child;\n\n      while (child !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n        subtreeFlags |= child.subtreeFlags;\n        subtreeFlags |= child.flags; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n        // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n        // When work is done, it should bubble to the parent's actualDuration. If\n        // the fiber has not been cloned though, (meaning no work was done), then\n        // this value will reflect the amount of time spent working on a previous\n        // render. In that case it should not bubble. We determine whether it was\n        // cloned by comparing the child pointer.\n\n        actualDuration += child.actualDuration;\n        treeBaseDuration += child.treeBaseDuration;\n        child = child.sibling;\n      }\n\n      completedWork.actualDuration = actualDuration;\n      completedWork.treeBaseDuration = treeBaseDuration;\n    } else {\n      var _child = completedWork.child;\n\n      while (_child !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n        subtreeFlags |= _child.subtreeFlags;\n        subtreeFlags |= _child.flags; // Update the return pointer so the tree is consistent. This is a code\n        // smell because it assumes the commit phase is never concurrent with\n        // the render phase. Will address during refactor to alternate model.\n\n        _child.return = completedWork;\n        _child = _child.sibling;\n      }\n    }\n\n    completedWork.subtreeFlags |= subtreeFlags;\n  } else {\n    // Bubble up the earliest expiration time.\n    if ( (completedWork.mode & ProfileMode) !== NoMode) {\n      // In profiling mode, resetChildExpirationTime is also used to reset\n      // profiler durations.\n      var _treeBaseDuration = completedWork.selfBaseDuration;\n      var _child2 = completedWork.child;\n\n      while (_child2 !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n        // so we should bubble those up even during a bailout. All the other\n        // flags have a lifetime only of a single render + commit, so we should\n        // ignore them.\n\n        subtreeFlags |= _child2.subtreeFlags & StaticMask;\n        subtreeFlags |= _child2.flags & StaticMask;\n        _treeBaseDuration += _child2.treeBaseDuration;\n        _child2 = _child2.sibling;\n      }\n\n      completedWork.treeBaseDuration = _treeBaseDuration;\n    } else {\n      var _child3 = completedWork.child;\n\n      while (_child3 !== null) {\n        newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes)); // \"Static\" flags share the lifetime of the fiber/hook they belong to,\n        // so we should bubble those up even during a bailout. All the other\n        // flags have a lifetime only of a single render + commit, so we should\n        // ignore them.\n\n        subtreeFlags |= _child3.subtreeFlags & StaticMask;\n        subtreeFlags |= _child3.flags & StaticMask; // Update the return pointer so the tree is consistent. This is a code\n        // smell because it assumes the commit phase is never concurrent with\n        // the render phase. Will address during refactor to alternate model.\n\n        _child3.return = completedWork;\n        _child3 = _child3.sibling;\n      }\n    }\n\n    completedWork.subtreeFlags |= subtreeFlags;\n  }\n\n  completedWork.childLanes = newChildLanes;\n  return didBailout;\n}\n\nfunction completeDehydratedSuspenseBoundary(current, workInProgress, nextState) {\n  if (hasUnhydratedTailNodes() && (workInProgress.mode & ConcurrentMode) !== NoMode && (workInProgress.flags & DidCapture) === NoFlags) {\n    warnIfUnhydratedTailNodes(workInProgress);\n    resetHydrationState();\n    workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;\n    return false;\n  }\n\n  var wasHydrated = popHydrationState(workInProgress);\n\n  if (nextState !== null && nextState.dehydrated !== null) {\n    // We might be inside a hydration state the first time we're picking up this\n    // Suspense boundary, and also after we've reentered it for further hydration.\n    if (current === null) {\n      if (!wasHydrated) {\n        throw new Error('A dehydrated suspense component was completed without a hydrated node. ' + 'This is probably a bug in React.');\n      }\n\n      prepareToHydrateHostSuspenseInstance(workInProgress);\n      bubbleProperties(workInProgress);\n\n      {\n        if ((workInProgress.mode & ProfileMode) !== NoMode) {\n          var isTimedOutSuspense = nextState !== null;\n\n          if (isTimedOutSuspense) {\n            // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n            var primaryChildFragment = workInProgress.child;\n\n            if (primaryChildFragment !== null) {\n              // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n              workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n            }\n          }\n        }\n      }\n\n      return false;\n    } else {\n      // We might have reentered this boundary to hydrate it. If so, we need to reset the hydration\n      // state since we're now exiting out of it. popHydrationState doesn't do that for us.\n      resetHydrationState();\n\n      if ((workInProgress.flags & DidCapture) === NoFlags) {\n        // This boundary did not suspend so it's now hydrated and unsuspended.\n        workInProgress.memoizedState = null;\n      } // If nothing suspended, we need to schedule an effect to mark this boundary\n      // as having hydrated so events know that they're free to be invoked.\n      // It's also a signal to replay events and the suspense callback.\n      // If something suspended, schedule an effect to attach retry listeners.\n      // So we might as well always mark this.\n\n\n      workInProgress.flags |= Update;\n      bubbleProperties(workInProgress);\n\n      {\n        if ((workInProgress.mode & ProfileMode) !== NoMode) {\n          var _isTimedOutSuspense = nextState !== null;\n\n          if (_isTimedOutSuspense) {\n            // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n            var _primaryChildFragment = workInProgress.child;\n\n            if (_primaryChildFragment !== null) {\n              // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n              workInProgress.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;\n            }\n          }\n        }\n      }\n\n      return false;\n    }\n  } else {\n    // Successfully completed this tree. If this was a forced client render,\n    // there may have been recoverable errors during first hydration\n    // attempt. If so, add them to a queue so we can log them in the\n    // commit phase.\n    upgradeHydrationErrorsToRecoverable(); // Fall through to normal Suspense path\n\n    return true;\n  }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n  var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n\n  popTreeContext(workInProgress);\n\n  switch (workInProgress.tag) {\n    case IndeterminateComponent:\n    case LazyComponent:\n    case SimpleMemoComponent:\n    case FunctionComponent:\n    case ForwardRef:\n    case Fragment:\n    case Mode:\n    case Profiler:\n    case ContextConsumer:\n    case MemoComponent:\n      bubbleProperties(workInProgress);\n      return null;\n\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          popContext(workInProgress);\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case HostRoot:\n      {\n        var fiberRoot = workInProgress.stateNode;\n        popHostContainer(workInProgress);\n        popTopLevelContextObject(workInProgress);\n        resetWorkInProgressVersions();\n\n        if (fiberRoot.pendingContext) {\n          fiberRoot.context = fiberRoot.pendingContext;\n          fiberRoot.pendingContext = null;\n        }\n\n        if (current === null || current.child === null) {\n          // If we hydrated, pop so that we can delete any remaining children\n          // that weren't hydrated.\n          var wasHydrated = popHydrationState(workInProgress);\n\n          if (wasHydrated) {\n            // If we hydrated, then we'll need to schedule an update for\n            // the commit side-effects on the root.\n            markUpdate(workInProgress);\n          } else {\n            if (current !== null) {\n              var prevState = current.memoizedState;\n\n              if ( // Check if this is a client root\n              !prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)\n              (workInProgress.flags & ForceClientRender) !== NoFlags) {\n                // Schedule an effect to clear this container at the start of the\n                // next commit. This handles the case of React rendering into a\n                // container with previous children. It's also safe to do for\n                // updates too, because current.child would only be null if the\n                // previous render was null (so the container would already\n                // be empty).\n                workInProgress.flags |= Snapshot; // If this was a forced client render, there may have been\n                // recoverable errors during first hydration attempt. If so, add\n                // them to a queue so we can log them in the commit phase.\n\n                upgradeHydrationErrorsToRecoverable();\n              }\n            }\n          }\n        }\n\n        updateHostContainer(current, workInProgress);\n        bubbleProperties(workInProgress);\n\n        return null;\n      }\n\n    case HostComponent:\n      {\n        popHostContext(workInProgress);\n        var rootContainerInstance = getRootHostContainer();\n        var type = workInProgress.type;\n\n        if (current !== null && workInProgress.stateNode != null) {\n          updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n          if (current.ref !== workInProgress.ref) {\n            markRef$1(workInProgress);\n          }\n        } else {\n          if (!newProps) {\n            if (workInProgress.stateNode === null) {\n              throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            } // This can happen when we abort work.\n\n\n            bubbleProperties(workInProgress);\n            return null;\n          }\n\n          var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n          // \"stack\" as the parent. Then append children as we go in beginWork\n          // or completeWork depending on whether we want to add them top->down or\n          // bottom->up. Top->down is faster in IE11.\n\n          var _wasHydrated = popHydrationState(workInProgress);\n\n          if (_wasHydrated) {\n            // TODO: Move this and createInstance step into the beginPhase\n            // to consolidate.\n            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n              // If changes to the hydrated node need to be applied at the\n              // commit-phase we mark this as such.\n              markUpdate(workInProgress);\n            }\n          } else {\n            var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n            appendAllChildren(instance, workInProgress, false, false);\n            workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n            // (eg DOM renderer supports auto-focus for certain elements).\n            // Make sure such renderers get scheduled for later work.\n\n            if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n              markUpdate(workInProgress);\n            }\n          }\n\n          if (workInProgress.ref !== null) {\n            // If there is a ref on a host node we need to schedule a callback\n            markRef$1(workInProgress);\n          }\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case HostText:\n      {\n        var newText = newProps;\n\n        if (current && workInProgress.stateNode != null) {\n          var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n          // to schedule a side-effect to do the updates.\n\n          updateHostText$1(current, workInProgress, oldText, newText);\n        } else {\n          if (typeof newText !== 'string') {\n            if (workInProgress.stateNode === null) {\n              throw new Error('We must have new props for new mounts. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            } // This can happen when we abort work.\n\n          }\n\n          var _rootContainerInstance = getRootHostContainer();\n\n          var _currentHostContext = getHostContext();\n\n          var _wasHydrated2 = popHydrationState(workInProgress);\n\n          if (_wasHydrated2) {\n            if (prepareToHydrateHostTextInstance(workInProgress)) {\n              markUpdate(workInProgress);\n            }\n          } else {\n            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n          }\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case SuspenseComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var nextState = workInProgress.memoizedState; // Special path for dehydrated boundaries. We may eventually move this\n        // to its own fiber type so that we can add other kinds of hydration\n        // boundaries that aren't associated with a Suspense tree. In anticipation\n        // of such a refactor, all the hydration logic is contained in\n        // this branch.\n\n        if (current === null || current.memoizedState !== null && current.memoizedState.dehydrated !== null) {\n          var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current, workInProgress, nextState);\n\n          if (!fallthroughToNormalSuspensePath) {\n            if (workInProgress.flags & ShouldCapture) {\n              // Special case. There were remaining unhydrated nodes. We treat\n              // this as a mismatch. Revert to client rendering.\n              return workInProgress;\n            } else {\n              // Did not finish hydrating, either because this is the initial\n              // render or because something suspended.\n              return null;\n            }\n          } // Continue with the normal Suspense path.\n\n        }\n\n        if ((workInProgress.flags & DidCapture) !== NoFlags) {\n          // Something suspended. Re-render with the fallback children.\n          workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          } // Don't bubble properties in this case.\n\n\n          return workInProgress;\n        }\n\n        var nextDidTimeout = nextState !== null;\n        var prevDidTimeout = current !== null && current.memoizedState !== null;\n        // a passive effect, which is when we process the transitions\n\n\n        if (nextDidTimeout !== prevDidTimeout) {\n          // an effect to toggle the subtree's visibility. When we switch from\n          // fallback -> primary, the inner Offscreen fiber schedules this effect\n          // as part of its normal complete phase. But when we switch from\n          // primary -> fallback, the inner Offscreen fiber does not have a complete\n          // phase. So we need to schedule its effect here.\n          //\n          // We also use this flag to connect/disconnect the effects, but the same\n          // logic applies: when re-connecting, the Offscreen fiber's complete\n          // phase will handle scheduling the effect. It's only when the fallback\n          // is active that we have to do anything special.\n\n\n          if (nextDidTimeout) {\n            var _offscreenFiber2 = workInProgress.child;\n            _offscreenFiber2.flags |= Visibility; // TODO: This will still suspend a synchronous tree if anything\n            // in the concurrent tree already suspended during this render.\n            // This is a known bug.\n\n            if ((workInProgress.mode & ConcurrentMode) !== NoMode) {\n              // TODO: Move this back to throwException because this is too late\n              // if this is a large tree which is common for initial loads. We\n              // don't know if we should restart a render or not until we get\n              // this marker, and this is too late.\n              // If this render already had a ping or lower pri updates,\n              // and this is the first time we know we're going to suspend we\n              // should be able to immediately restart from within throwException.\n              var hasInvisibleChildContext = current === null && (workInProgress.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);\n\n              if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n                // If this was in an invisible tree or a new render, then showing\n                // this boundary is ok.\n                renderDidSuspend();\n              } else {\n                // Otherwise, we're going to have to hide content so we should\n                // suspend for longer if possible.\n                renderDidSuspendDelayIfPossible();\n              }\n            }\n          }\n        }\n\n        var wakeables = workInProgress.updateQueue;\n\n        if (wakeables !== null) {\n          // Schedule an effect to attach a retry listener to the promise.\n          // TODO: Move to passive phase\n          workInProgress.flags |= Update;\n        }\n\n        bubbleProperties(workInProgress);\n\n        {\n          if ((workInProgress.mode & ProfileMode) !== NoMode) {\n            if (nextDidTimeout) {\n              // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n              var primaryChildFragment = workInProgress.child;\n\n              if (primaryChildFragment !== null) {\n                // $FlowFixMe Flow doesn't support type casting in combination with the -= operator\n                workInProgress.treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n              }\n            }\n          }\n        }\n\n        return null;\n      }\n\n    case HostPortal:\n      popHostContainer(workInProgress);\n      updateHostContainer(current, workInProgress);\n\n      if (current === null) {\n        preparePortalMount(workInProgress.stateNode.containerInfo);\n      }\n\n      bubbleProperties(workInProgress);\n      return null;\n\n    case ContextProvider:\n      // Pop provider fiber\n      var context = workInProgress.type._context;\n      popProvider(context, workInProgress);\n      bubbleProperties(workInProgress);\n      return null;\n\n    case IncompleteClassComponent:\n      {\n        // Same as class component case. I put it down here so that the tags are\n        // sequential to ensure this switch is compiled to a jump table.\n        var _Component = workInProgress.type;\n\n        if (isContextProvider(_Component)) {\n          popContext(workInProgress);\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case SuspenseListComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var renderState = workInProgress.memoizedState;\n\n        if (renderState === null) {\n          // We're running in the default, \"independent\" mode.\n          // We don't do anything in this mode.\n          bubbleProperties(workInProgress);\n          return null;\n        }\n\n        var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n        var renderedTail = renderState.rendering;\n\n        if (renderedTail === null) {\n          // We just rendered the head.\n          if (!didSuspendAlready) {\n            // This is the first pass. We need to figure out if anything is still\n            // suspended in the rendered set.\n            // If new content unsuspended, but there's still some content that\n            // didn't. Then we need to do a second pass that forces everything\n            // to keep showing their fallbacks.\n            // We might be suspended if something in this render pass suspended, or\n            // something in the previous committed pass suspended. Otherwise,\n            // there's no chance so we can skip the expensive call to\n            // findFirstSuspended.\n            var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n            if (!cannotBeSuspended) {\n              var row = workInProgress.child;\n\n              while (row !== null) {\n                var suspended = findFirstSuspended(row);\n\n                if (suspended !== null) {\n                  didSuspendAlready = true;\n                  workInProgress.flags |= DidCapture;\n                  cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n                  // part of the second pass. In that case nothing will subscribe to\n                  // its thenables. Instead, we'll transfer its thenables to the\n                  // SuspenseList so that it can retry if they resolve.\n                  // There might be multiple of these in the list but since we're\n                  // going to wait for all of them anyway, it doesn't really matter\n                  // which ones gets to ping. In theory we could get clever and keep\n                  // track of how many dependencies remain but it gets tricky because\n                  // in the meantime, we can add/remove/change items and dependencies.\n                  // We might bail out of the loop before finding any but that\n                  // doesn't matter since that means that the other boundaries that\n                  // we did find already has their listeners attached.\n\n                  var newThenables = suspended.updateQueue;\n\n                  if (newThenables !== null) {\n                    workInProgress.updateQueue = newThenables;\n                    workInProgress.flags |= Update;\n                  } // Rerender the whole list, but this time, we'll force fallbacks\n                  // to stay in place.\n                  // Reset the effect flags before doing the second pass since that's now invalid.\n                  // Reset the child fibers to their original state.\n\n\n                  workInProgress.subtreeFlags = NoFlags;\n                  resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n                  // rerender the children.\n\n                  pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); // Don't bubble properties in this case.\n\n                  return workInProgress.child;\n                }\n\n                row = row.sibling;\n              }\n            }\n\n            if (renderState.tail !== null && now() > getRenderTargetTime()) {\n              // We have already passed our CPU deadline but we still have rows\n              // left in the tail. We'll just give up further attempts to render\n              // the main content and only render fallbacks.\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true;\n              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n              // to get it started back up to attempt the next item. While in terms\n              // of priority this work has the same priority as this current render,\n              // it's not part of the same transition once the transition has\n              // committed. If it's sync, we still want to yield so that it can be\n              // painted. Conceptually, this is really the same as pinging.\n              // We can use any RetryLane even if it's the one currently rendering\n              // since we're leaving it behind on this node.\n\n              workInProgress.lanes = SomeRetryLane;\n            }\n          } else {\n            cutOffTailIfNeeded(renderState, false);\n          } // Next we're going to render the tail.\n\n        } else {\n          // Append the rendered row to the child list.\n          if (!didSuspendAlready) {\n            var _suspended = findFirstSuspended(renderedTail);\n\n            if (_suspended !== null) {\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n              // get lost if this row ends up dropped during a second pass.\n\n              var _newThenables = _suspended.updateQueue;\n\n              if (_newThenables !== null) {\n                workInProgress.updateQueue = _newThenables;\n                workInProgress.flags |= Update;\n              }\n\n              cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n              if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n              ) {\n                  // We're done.\n                  bubbleProperties(workInProgress);\n                  return null;\n                }\n            } else if ( // The time it took to render last row is greater than the remaining\n            // time we have to render. So rendering one more row would likely\n            // exceed it.\n            now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n              // We have now passed our CPU deadline and we'll just give up further\n              // attempts to render the main content and only render fallbacks.\n              // The assumption is that this is usually faster.\n              workInProgress.flags |= DidCapture;\n              didSuspendAlready = true;\n              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n              // to get it started back up to attempt the next item. While in terms\n              // of priority this work has the same priority as this current render,\n              // it's not part of the same transition once the transition has\n              // committed. If it's sync, we still want to yield so that it can be\n              // painted. Conceptually, this is really the same as pinging.\n              // We can use any RetryLane even if it's the one currently rendering\n              // since we're leaving it behind on this node.\n\n              workInProgress.lanes = SomeRetryLane;\n            }\n          }\n\n          if (renderState.isBackwards) {\n            // The effect list of the backwards tail will have been added\n            // to the end. This breaks the guarantee that life-cycles fire in\n            // sibling order but that isn't a strong guarantee promised by React.\n            // Especially since these might also just pop in during future commits.\n            // Append to the beginning of the list.\n            renderedTail.sibling = workInProgress.child;\n            workInProgress.child = renderedTail;\n          } else {\n            var previousSibling = renderState.last;\n\n            if (previousSibling !== null) {\n              previousSibling.sibling = renderedTail;\n            } else {\n              workInProgress.child = renderedTail;\n            }\n\n            renderState.last = renderedTail;\n          }\n        }\n\n        if (renderState.tail !== null) {\n          // We still have tail rows to render.\n          // Pop a row.\n          var next = renderState.tail;\n          renderState.rendering = next;\n          renderState.tail = next.sibling;\n          renderState.renderingStartTime = now();\n          next.sibling = null; // Restore the context.\n          // TODO: We can probably just avoid popping it instead and only\n          // setting it the first time we go from not suspended to suspended.\n\n          var suspenseContext = suspenseStackCursor.current;\n\n          if (didSuspendAlready) {\n            suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n          } else {\n            suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n          }\n\n          pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n          // Don't bubble properties in this case.\n\n          return next;\n        }\n\n        bubbleProperties(workInProgress);\n        return null;\n      }\n\n    case ScopeComponent:\n      {\n\n        break;\n      }\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      {\n        popRenderLanes(workInProgress);\n        var _nextState = workInProgress.memoizedState;\n        var nextIsHidden = _nextState !== null;\n\n        if (current !== null) {\n          var _prevState = current.memoizedState;\n          var prevIsHidden = _prevState !== null;\n\n          if (prevIsHidden !== nextIsHidden && ( // LegacyHidden doesn't do any hiding — it only pre-renders.\n          !enableLegacyHidden )) {\n            workInProgress.flags |= Visibility;\n          }\n        }\n\n        if (!nextIsHidden || (workInProgress.mode & ConcurrentMode) === NoMode) {\n          bubbleProperties(workInProgress);\n        } else {\n          // Don't bubble properties for hidden children unless we're rendering\n          // at offscreen priority.\n          if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {\n            bubbleProperties(workInProgress);\n\n            {\n              // Check if there was an insertion or update in the hidden subtree.\n              // If so, we need to hide those nodes in the commit phase, so\n              // schedule a visibility effect.\n              if ( workInProgress.subtreeFlags & (Placement | Update)) {\n                workInProgress.flags |= Visibility;\n              }\n            }\n          }\n        }\n        return null;\n      }\n\n    case CacheComponent:\n      {\n\n        return null;\n      }\n\n    case TracingMarkerComponent:\n      {\n\n        return null;\n      }\n  }\n\n  throw new Error(\"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in \" + 'React. Please file an issue.');\n}\n\nfunction unwindWork(current, workInProgress, renderLanes) {\n  // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n  popTreeContext(workInProgress);\n\n  switch (workInProgress.tag) {\n    case ClassComponent:\n      {\n        var Component = workInProgress.type;\n\n        if (isContextProvider(Component)) {\n          popContext(workInProgress);\n        }\n\n        var flags = workInProgress.flags;\n\n        if (flags & ShouldCapture) {\n          workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          }\n\n          return workInProgress;\n        }\n\n        return null;\n      }\n\n    case HostRoot:\n      {\n        var root = workInProgress.stateNode;\n        popHostContainer(workInProgress);\n        popTopLevelContextObject(workInProgress);\n        resetWorkInProgressVersions();\n        var _flags = workInProgress.flags;\n\n        if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {\n          // There was an error during render that wasn't captured by a suspense\n          // boundary. Do a second pass on the root to unmount the children.\n          workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n          return workInProgress;\n        } // We unwound to the root without completing it. Exit.\n\n\n        return null;\n      }\n\n    case HostComponent:\n      {\n        // TODO: popHydrationState\n        popHostContext(workInProgress);\n        return null;\n      }\n\n    case SuspenseComponent:\n      {\n        popSuspenseContext(workInProgress);\n        var suspenseState = workInProgress.memoizedState;\n\n        if (suspenseState !== null && suspenseState.dehydrated !== null) {\n          if (workInProgress.alternate === null) {\n            throw new Error('Threw in newly mounted dehydrated component. This is likely a bug in ' + 'React. Please file an issue.');\n          }\n\n          resetHydrationState();\n        }\n\n        var _flags2 = workInProgress.flags;\n\n        if (_flags2 & ShouldCapture) {\n          workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n          if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n            transferActualDuration(workInProgress);\n          }\n\n          return workInProgress;\n        }\n\n        return null;\n      }\n\n    case SuspenseListComponent:\n      {\n        popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n        // caught by a nested boundary. If not, it should bubble through.\n\n        return null;\n      }\n\n    case HostPortal:\n      popHostContainer(workInProgress);\n      return null;\n\n    case ContextProvider:\n      var context = workInProgress.type._context;\n      popProvider(context, workInProgress);\n      return null;\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      popRenderLanes(workInProgress);\n      return null;\n\n    case CacheComponent:\n\n      return null;\n\n    default:\n      return null;\n  }\n}\n\nfunction unwindInterruptedWork(current, interruptedWork, renderLanes) {\n  // Note: This intentionally doesn't check if we're hydrating because comparing\n  // to the current tree provider fiber is just as fast and less error-prone.\n  // Ideally we would have a special version of the work loop only\n  // for hydration.\n  popTreeContext(interruptedWork);\n\n  switch (interruptedWork.tag) {\n    case ClassComponent:\n      {\n        var childContextTypes = interruptedWork.type.childContextTypes;\n\n        if (childContextTypes !== null && childContextTypes !== undefined) {\n          popContext(interruptedWork);\n        }\n\n        break;\n      }\n\n    case HostRoot:\n      {\n        var root = interruptedWork.stateNode;\n        popHostContainer(interruptedWork);\n        popTopLevelContextObject(interruptedWork);\n        resetWorkInProgressVersions();\n        break;\n      }\n\n    case HostComponent:\n      {\n        popHostContext(interruptedWork);\n        break;\n      }\n\n    case HostPortal:\n      popHostContainer(interruptedWork);\n      break;\n\n    case SuspenseComponent:\n      popSuspenseContext(interruptedWork);\n      break;\n\n    case SuspenseListComponent:\n      popSuspenseContext(interruptedWork);\n      break;\n\n    case ContextProvider:\n      var context = interruptedWork.type._context;\n      popProvider(context, interruptedWork);\n      break;\n\n    case OffscreenComponent:\n    case LegacyHiddenComponent:\n      popRenderLanes(interruptedWork);\n      break;\n  }\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n} // Used during the commit phase to track the state of the Offscreen component stack.\n// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.\n// Only used when enableSuspenseLayoutEffectSemantics is enabled.\n\n\nvar offscreenSubtreeIsHidden = false;\nvar offscreenSubtreeWasHidden = false;\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\nvar nextEffect = null; // Used for Profiling builds to track updaters.\n\nvar inProgressLanes = null;\nvar inProgressRoot = null;\nfunction reportUncaughtErrorInDEV(error) {\n  // Wrapping each small part of the commit phase into a guarded\n  // callback is a bit too slow (https://github.com/facebook/react/pull/21666).\n  // But we rely on it to surface errors to DEV tools like overlays\n  // (https://github.com/facebook/react/issues/21712).\n  // As a compromise, rethrow only caught errors in a guard.\n  {\n    invokeGuardedCallback(null, function () {\n      throw error;\n    });\n    clearCaughtError();\n  }\n}\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n  instance.props = current.memoizedProps;\n  instance.state = current.memoizedState;\n\n  if ( current.mode & ProfileMode) {\n    try {\n      startLayoutEffectTimer();\n      instance.componentWillUnmount();\n    } finally {\n      recordLayoutEffectDuration(current);\n    }\n  } else {\n    instance.componentWillUnmount();\n  }\n}; // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallCommitHookLayoutEffectListMount(current, nearestMountedAncestor) {\n  try {\n    commitHookEffectListMount(Layout, current);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, nearestMountedAncestor, instance) {\n  try {\n    callComponentWillUnmountWithTimer(current, instance);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyCallComponentDidMount(current, nearestMountedAncestor, instance) {\n  try {\n    instance.componentDidMount();\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n} // Capture errors so they don't interrupt mounting.\n\n\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n  try {\n    commitAttachRef(current);\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\n\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n  var ref = current.ref;\n\n  if (ref !== null) {\n    if (typeof ref === 'function') {\n      var retVal;\n\n      try {\n        if (enableProfilerTimer && enableProfilerCommitHooks && current.mode & ProfileMode) {\n          try {\n            startLayoutEffectTimer();\n            retVal = ref(null);\n          } finally {\n            recordLayoutEffectDuration(current);\n          }\n        } else {\n          retVal = ref(null);\n        }\n      } catch (error) {\n        captureCommitPhaseError(current, nearestMountedAncestor, error);\n      }\n\n      {\n        if (typeof retVal === 'function') {\n          error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(current));\n        }\n      }\n    } else {\n      ref.current = null;\n    }\n  }\n}\n\nfunction safelyCallDestroy(current, nearestMountedAncestor, destroy) {\n  try {\n    destroy();\n  } catch (error) {\n    captureCommitPhaseError(current, nearestMountedAncestor, error);\n  }\n}\n\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction commitBeforeMutationEffects(root, firstChild) {\n  focusedInstanceHandle = prepareForCommit(root.containerInfo);\n  nextEffect = firstChild;\n  commitBeforeMutationEffects_begin(); // We no longer need to track the active instance fiber\n\n  var shouldFire = shouldFireAfterActiveInstanceBlur;\n  shouldFireAfterActiveInstanceBlur = false;\n  focusedInstanceHandle = null;\n  return shouldFire;\n}\n\nfunction commitBeforeMutationEffects_begin() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // This phase is only used for beforeActiveInstanceBlur.\n\n    var child = fiber.child;\n\n    if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitBeforeMutationEffects_complete();\n    }\n  }\n}\n\nfunction commitBeforeMutationEffects_complete() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    setCurrentFiber(fiber);\n\n    try {\n      commitBeforeMutationEffectsOnFiber(fiber);\n    } catch (error) {\n      captureCommitPhaseError(fiber, fiber.return, error);\n    }\n\n    resetCurrentFiber();\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitBeforeMutationEffectsOnFiber(finishedWork) {\n  var current = finishedWork.alternate;\n  var flags = finishedWork.flags;\n\n  if ((flags & Snapshot) !== NoFlags) {\n    setCurrentFiber(finishedWork);\n\n    switch (finishedWork.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          break;\n        }\n\n      case ClassComponent:\n        {\n          if (current !== null) {\n            var prevProps = current.memoizedProps;\n            var prevState = current.memoizedState;\n            var instance = finishedWork.stateNode; // We could update instance props and state here,\n            // but instead we rely on them being set during last render.\n            // TODO: revisit this when we implement resuming.\n\n            {\n              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                if (instance.props !== finishedWork.memoizedProps) {\n                  error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n\n                if (instance.state !== finishedWork.memoizedState) {\n                  error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n              }\n            }\n\n            var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n            {\n              var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n              if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n                didWarnSet.add(finishedWork.type);\n\n                error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentNameFromFiber(finishedWork));\n              }\n            }\n\n            instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n          }\n\n          break;\n        }\n\n      case HostRoot:\n        {\n          {\n            var root = finishedWork.stateNode;\n            clearContainer(root.containerInfo);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n      case HostText:\n      case HostPortal:\n      case IncompleteClassComponent:\n        // Nothing to do for these component types\n        break;\n\n      default:\n        {\n          throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n        }\n    }\n\n    resetCurrentFiber();\n  }\n}\n\nfunction commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {\n  var updateQueue = finishedWork.updateQueue;\n  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n  if (lastEffect !== null) {\n    var firstEffect = lastEffect.next;\n    var effect = firstEffect;\n\n    do {\n      if ((effect.tag & flags) === flags) {\n        // Unmount\n        var destroy = effect.destroy;\n        effect.destroy = undefined;\n\n        if (destroy !== undefined) {\n          {\n            if ((flags & Passive$1) !== NoFlags$1) {\n              markComponentPassiveEffectUnmountStarted(finishedWork);\n            } else if ((flags & Layout) !== NoFlags$1) {\n              markComponentLayoutEffectUnmountStarted(finishedWork);\n            }\n          }\n\n          {\n            if ((flags & Insertion) !== NoFlags$1) {\n              setIsRunningInsertionEffect(true);\n            }\n          }\n\n          safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);\n\n          {\n            if ((flags & Insertion) !== NoFlags$1) {\n              setIsRunningInsertionEffect(false);\n            }\n          }\n\n          {\n            if ((flags & Passive$1) !== NoFlags$1) {\n              markComponentPassiveEffectUnmountStopped();\n            } else if ((flags & Layout) !== NoFlags$1) {\n              markComponentLayoutEffectUnmountStopped();\n            }\n          }\n        }\n      }\n\n      effect = effect.next;\n    } while (effect !== firstEffect);\n  }\n}\n\nfunction commitHookEffectListMount(flags, finishedWork) {\n  var updateQueue = finishedWork.updateQueue;\n  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n  if (lastEffect !== null) {\n    var firstEffect = lastEffect.next;\n    var effect = firstEffect;\n\n    do {\n      if ((effect.tag & flags) === flags) {\n        {\n          if ((flags & Passive$1) !== NoFlags$1) {\n            markComponentPassiveEffectMountStarted(finishedWork);\n          } else if ((flags & Layout) !== NoFlags$1) {\n            markComponentLayoutEffectMountStarted(finishedWork);\n          }\n        } // Mount\n\n\n        var create = effect.create;\n\n        {\n          if ((flags & Insertion) !== NoFlags$1) {\n            setIsRunningInsertionEffect(true);\n          }\n        }\n\n        effect.destroy = create();\n\n        {\n          if ((flags & Insertion) !== NoFlags$1) {\n            setIsRunningInsertionEffect(false);\n          }\n        }\n\n        {\n          if ((flags & Passive$1) !== NoFlags$1) {\n            markComponentPassiveEffectMountStopped();\n          } else if ((flags & Layout) !== NoFlags$1) {\n            markComponentLayoutEffectMountStopped();\n          }\n        }\n\n        {\n          var destroy = effect.destroy;\n\n          if (destroy !== undefined && typeof destroy !== 'function') {\n            var hookName = void 0;\n\n            if ((effect.tag & Layout) !== NoFlags) {\n              hookName = 'useLayoutEffect';\n            } else if ((effect.tag & Insertion) !== NoFlags) {\n              hookName = 'useInsertionEffect';\n            } else {\n              hookName = 'useEffect';\n            }\n\n            var addendum = void 0;\n\n            if (destroy === null) {\n              addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n            } else if (typeof destroy.then === 'function') {\n              addendum = '\\n\\nIt looks like you wrote ' + hookName + '(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + hookName + '(() => {\\n' + '  async function fetchData() {\\n' + '    // You can await here\\n' + '    const response = await MyAPI.getData(someId);\\n' + '    // ...\\n' + '  }\\n' + '  fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';\n            } else {\n              addendum = ' You returned: ' + destroy;\n            }\n\n            error('%s must not return anything besides a function, ' + 'which is used for clean-up.%s', hookName, addendum);\n          }\n        }\n      }\n\n      effect = effect.next;\n    } while (effect !== firstEffect);\n  }\n}\n\nfunction commitPassiveEffectDurations(finishedRoot, finishedWork) {\n  {\n    // Only Profilers with work in their subtree will have an Update effect scheduled.\n    if ((finishedWork.flags & Update) !== NoFlags) {\n      switch (finishedWork.tag) {\n        case Profiler:\n          {\n            var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;\n            var _finishedWork$memoize = finishedWork.memoizedProps,\n                id = _finishedWork$memoize.id,\n                onPostCommit = _finishedWork$memoize.onPostCommit; // This value will still reflect the previous commit phase.\n            // It does not get reset until the start of the next commit phase.\n\n            var commitTime = getCommitTime();\n            var phase = finishedWork.alternate === null ? 'mount' : 'update';\n\n            {\n              if (isCurrentUpdateNested()) {\n                phase = 'nested-update';\n              }\n            }\n\n            if (typeof onPostCommit === 'function') {\n              onPostCommit(id, phase, passiveEffectDuration, commitTime);\n            } // Bubble times to the next nearest ancestor Profiler.\n            // After we process that Profiler, we'll bubble further up.\n\n\n            var parentFiber = finishedWork.return;\n\n            outer: while (parentFiber !== null) {\n              switch (parentFiber.tag) {\n                case HostRoot:\n                  var root = parentFiber.stateNode;\n                  root.passiveEffectDuration += passiveEffectDuration;\n                  break outer;\n\n                case Profiler:\n                  var parentStateNode = parentFiber.stateNode;\n                  parentStateNode.passiveEffectDuration += passiveEffectDuration;\n                  break outer;\n              }\n\n              parentFiber = parentFiber.return;\n            }\n\n            break;\n          }\n      }\n    }\n  }\n}\n\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committedLanes) {\n  if ((finishedWork.flags & LayoutMask) !== NoFlags) {\n    switch (finishedWork.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          if ( !offscreenSubtreeWasHidden) {\n            // At this point layout effects have already been destroyed (during mutation phase).\n            // This is done to prevent sibling component effects from interfering with each other,\n            // e.g. a destroy function in one component should never override a ref set\n            // by a create function in another component during the same commit.\n            if ( finishedWork.mode & ProfileMode) {\n              try {\n                startLayoutEffectTimer();\n                commitHookEffectListMount(Layout | HasEffect, finishedWork);\n              } finally {\n                recordLayoutEffectDuration(finishedWork);\n              }\n            } else {\n              commitHookEffectListMount(Layout | HasEffect, finishedWork);\n            }\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = finishedWork.stateNode;\n\n          if (finishedWork.flags & Update) {\n            if (!offscreenSubtreeWasHidden) {\n              if (current === null) {\n                // We could update instance props and state here,\n                // but instead we rely on them being set during last render.\n                // TODO: revisit this when we implement resuming.\n                {\n                  if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                    if (instance.props !== finishedWork.memoizedProps) {\n                      error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n\n                    if (instance.state !== finishedWork.memoizedState) {\n                      error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n                  }\n                }\n\n                if ( finishedWork.mode & ProfileMode) {\n                  try {\n                    startLayoutEffectTimer();\n                    instance.componentDidMount();\n                  } finally {\n                    recordLayoutEffectDuration(finishedWork);\n                  }\n                } else {\n                  instance.componentDidMount();\n                }\n              } else {\n                var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n                var prevState = current.memoizedState; // We could update instance props and state here,\n                // but instead we rely on them being set during last render.\n                // TODO: revisit this when we implement resuming.\n\n                {\n                  if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                    if (instance.props !== finishedWork.memoizedProps) {\n                      error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n\n                    if (instance.state !== finishedWork.memoizedState) {\n                      error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                    }\n                  }\n                }\n\n                if ( finishedWork.mode & ProfileMode) {\n                  try {\n                    startLayoutEffectTimer();\n                    instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n                  } finally {\n                    recordLayoutEffectDuration(finishedWork);\n                  }\n                } else {\n                  instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n                }\n              }\n            }\n          } // TODO: I think this is now always non-null by the time it reaches the\n          // commit phase. Consider removing the type check.\n\n\n          var updateQueue = finishedWork.updateQueue;\n\n          if (updateQueue !== null) {\n            {\n              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n                if (instance.props !== finishedWork.memoizedProps) {\n                  error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n\n                if (instance.state !== finishedWork.memoizedState) {\n                  error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentNameFromFiber(finishedWork) || 'instance');\n                }\n              }\n            } // We could update instance props and state here,\n            // but instead we rely on them being set during last render.\n            // TODO: revisit this when we implement resuming.\n\n\n            commitUpdateQueue(finishedWork, updateQueue, instance);\n          }\n\n          break;\n        }\n\n      case HostRoot:\n        {\n          // TODO: I think this is now always non-null by the time it reaches the\n          // commit phase. Consider removing the type check.\n          var _updateQueue = finishedWork.updateQueue;\n\n          if (_updateQueue !== null) {\n            var _instance = null;\n\n            if (finishedWork.child !== null) {\n              switch (finishedWork.child.tag) {\n                case HostComponent:\n                  _instance = getPublicInstance(finishedWork.child.stateNode);\n                  break;\n\n                case ClassComponent:\n                  _instance = finishedWork.child.stateNode;\n                  break;\n              }\n            }\n\n            commitUpdateQueue(finishedWork, _updateQueue, _instance);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n          // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n          // These effects should only be committed when components are first mounted,\n          // aka when there is no current/alternate.\n\n          if (current === null && finishedWork.flags & Update) {\n            var type = finishedWork.type;\n            var props = finishedWork.memoizedProps;\n            commitMount(_instance2, type, props);\n          }\n\n          break;\n        }\n\n      case HostText:\n        {\n          // We have no life-cycles associated with text.\n          break;\n        }\n\n      case HostPortal:\n        {\n          // We have no life-cycles associated with portals.\n          break;\n        }\n\n      case Profiler:\n        {\n          {\n            var _finishedWork$memoize2 = finishedWork.memoizedProps,\n                onCommit = _finishedWork$memoize2.onCommit,\n                onRender = _finishedWork$memoize2.onRender;\n            var effectDuration = finishedWork.stateNode.effectDuration;\n            var commitTime = getCommitTime();\n            var phase = current === null ? 'mount' : 'update';\n\n            {\n              if (isCurrentUpdateNested()) {\n                phase = 'nested-update';\n              }\n            }\n\n            if (typeof onRender === 'function') {\n              onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime);\n            }\n\n            {\n              if (typeof onCommit === 'function') {\n                onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime);\n              } // Schedule a passive effect for this Profiler to call onPostCommit hooks.\n              // This effect should be scheduled even if there is no onPostCommit callback for this Profiler,\n              // because the effect is also where times bubble to parent Profilers.\n\n\n              enqueuePendingPassiveProfilerEffect(finishedWork); // Propagate layout effect durations to the next nearest Profiler ancestor.\n              // Do not reset these values until the next render so DevTools has a chance to read them first.\n\n              var parentFiber = finishedWork.return;\n\n              outer: while (parentFiber !== null) {\n                switch (parentFiber.tag) {\n                  case HostRoot:\n                    var root = parentFiber.stateNode;\n                    root.effectDuration += effectDuration;\n                    break outer;\n\n                  case Profiler:\n                    var parentStateNode = parentFiber.stateNode;\n                    parentStateNode.effectDuration += effectDuration;\n                    break outer;\n                }\n\n                parentFiber = parentFiber.return;\n              }\n            }\n          }\n\n          break;\n        }\n\n      case SuspenseComponent:\n        {\n          commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n          break;\n        }\n\n      case SuspenseListComponent:\n      case IncompleteClassComponent:\n      case ScopeComponent:\n      case OffscreenComponent:\n      case LegacyHiddenComponent:\n      case TracingMarkerComponent:\n        {\n          break;\n        }\n\n      default:\n        throw new Error('This unit of work tag should not have side-effects. This error is ' + 'likely caused by a bug in React. Please file an issue.');\n    }\n  }\n\n  if ( !offscreenSubtreeWasHidden) {\n    {\n      if (finishedWork.flags & Ref) {\n        commitAttachRef(finishedWork);\n      }\n    }\n  }\n}\n\nfunction reappearLayoutEffectsOnFiber(node) {\n  // Turn on layout effects in a tree that previously disappeared.\n  // TODO (Offscreen) Check: flags & LayoutStatic\n  switch (node.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( node.mode & ProfileMode) {\n          try {\n            startLayoutEffectTimer();\n            safelyCallCommitHookLayoutEffectListMount(node, node.return);\n          } finally {\n            recordLayoutEffectDuration(node);\n          }\n        } else {\n          safelyCallCommitHookLayoutEffectListMount(node, node.return);\n        }\n\n        break;\n      }\n\n    case ClassComponent:\n      {\n        var instance = node.stateNode;\n\n        if (typeof instance.componentDidMount === 'function') {\n          safelyCallComponentDidMount(node, node.return, instance);\n        }\n\n        safelyAttachRef(node, node.return);\n        break;\n      }\n\n    case HostComponent:\n      {\n        safelyAttachRef(node, node.return);\n        break;\n      }\n  }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n  // Only hide or unhide the top-most host nodes.\n  var hostSubtreeRoot = null;\n\n  {\n    // We only have the top Fiber that was inserted but we need to recurse down its\n    // children to find all the terminal nodes.\n    var node = finishedWork;\n\n    while (true) {\n      if (node.tag === HostComponent) {\n        if (hostSubtreeRoot === null) {\n          hostSubtreeRoot = node;\n\n          try {\n            var instance = node.stateNode;\n\n            if (isHidden) {\n              hideInstance(instance);\n            } else {\n              unhideInstance(node.stateNode, node.memoizedProps);\n            }\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      } else if (node.tag === HostText) {\n        if (hostSubtreeRoot === null) {\n          try {\n            var _instance3 = node.stateNode;\n\n            if (isHidden) {\n              hideTextInstance(_instance3);\n            } else {\n              unhideTextInstance(_instance3, node.memoizedProps);\n            }\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n        }\n      } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === finishedWork) {\n        return;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === finishedWork) {\n          return;\n        }\n\n        if (hostSubtreeRoot === node) {\n          hostSubtreeRoot = null;\n        }\n\n        node = node.return;\n      }\n\n      if (hostSubtreeRoot === node) {\n        hostSubtreeRoot = null;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  }\n}\n\nfunction commitAttachRef(finishedWork) {\n  var ref = finishedWork.ref;\n\n  if (ref !== null) {\n    var instance = finishedWork.stateNode;\n    var instanceToUse;\n\n    switch (finishedWork.tag) {\n      case HostComponent:\n        instanceToUse = getPublicInstance(instance);\n        break;\n\n      default:\n        instanceToUse = instance;\n    } // Moved outside to ensure DCE works with this flag\n\n    if (typeof ref === 'function') {\n      var retVal;\n\n      if ( finishedWork.mode & ProfileMode) {\n        try {\n          startLayoutEffectTimer();\n          retVal = ref(instanceToUse);\n        } finally {\n          recordLayoutEffectDuration(finishedWork);\n        }\n      } else {\n        retVal = ref(instanceToUse);\n      }\n\n      {\n        if (typeof retVal === 'function') {\n          error('Unexpected return value from a callback ref in %s. ' + 'A callback ref should not return a function.', getComponentNameFromFiber(finishedWork));\n        }\n      }\n    } else {\n      {\n        if (!ref.hasOwnProperty('current')) {\n          error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentNameFromFiber(finishedWork));\n        }\n      }\n\n      ref.current = instanceToUse;\n    }\n  }\n}\n\nfunction detachFiberMutation(fiber) {\n  // Cut off the return pointer to disconnect it from the tree.\n  // This enables us to detect and warn against state updates on an unmounted component.\n  // It also prevents events from bubbling from within disconnected components.\n  //\n  // Ideally, we should also clear the child pointer of the parent alternate to let this\n  // get GC:ed but we don't know which for sure which parent is the current\n  // one so we'll settle for GC:ing the subtree of this child.\n  // This child itself will be GC:ed when the parent updates the next time.\n  //\n  // Note that we can't clear child or sibling pointers yet.\n  // They're needed for passive effects and for findDOMNode.\n  // We defer those fields, and all other cleanup, to the passive phase (see detachFiberAfterEffects).\n  //\n  // Don't reset the alternate yet, either. We need that so we can detach the\n  // alternate's fields in the passive phase. Clearing the return pointer is\n  // sufficient for findDOMNode semantics.\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    alternate.return = null;\n  }\n\n  fiber.return = null;\n}\n\nfunction detachFiberAfterEffects(fiber) {\n  var alternate = fiber.alternate;\n\n  if (alternate !== null) {\n    fiber.alternate = null;\n    detachFiberAfterEffects(alternate);\n  } // Note: Defensively using negation instead of < in case\n  // `deletedTreeCleanUpLevel` is undefined.\n\n\n  {\n    // Clear cyclical Fiber fields. This level alone is designed to roughly\n    // approximate the planned Fiber refactor. In that world, `setState` will be\n    // bound to a special \"instance\" object instead of a Fiber. The Instance\n    // object will not have any of these fields. It will only be connected to\n    // the fiber tree via a single link at the root. So if this level alone is\n    // sufficient to fix memory issues, that bodes well for our plans.\n    fiber.child = null;\n    fiber.deletions = null;\n    fiber.sibling = null; // The `stateNode` is cyclical because on host nodes it points to the host\n    // tree, which has its own pointers to children, parents, and siblings.\n    // The other host nodes also point back to fibers, so we should detach that\n    // one, too.\n\n    if (fiber.tag === HostComponent) {\n      var hostInstance = fiber.stateNode;\n\n      if (hostInstance !== null) {\n        detachDeletedInstance(hostInstance);\n      }\n    }\n\n    fiber.stateNode = null; // I'm intentionally not clearing the `return` field in this level. We\n    // already disconnect the `return` pointer at the root of the deleted\n    // subtree (in `detachFiberMutation`). Besides, `return` by itself is not\n    // cyclical — it's only cyclical when combined with `child`, `sibling`, and\n    // `alternate`. But we'll clear it in the next level anyway, just in case.\n\n    {\n      fiber._debugOwner = null;\n    }\n\n    {\n      // Theoretically, nothing in here should be necessary, because we already\n      // disconnected the fiber from the tree. So even if something leaks this\n      // particular fiber, it won't leak anything else\n      //\n      // The purpose of this branch is to be super aggressive so we can measure\n      // if there's any difference in memory impact. If there is, that could\n      // indicate a React leak we don't know about.\n      fiber.return = null;\n      fiber.dependencies = null;\n      fiber.memoizedProps = null;\n      fiber.memoizedState = null;\n      fiber.pendingProps = null;\n      fiber.stateNode = null; // TODO: Move to `commitPassiveUnmountInsideDeletedTreeOnFiber` instead.\n\n      fiber.updateQueue = null;\n    }\n  }\n}\n\nfunction getHostParentFiber(fiber) {\n  var parent = fiber.return;\n\n  while (parent !== null) {\n    if (isHostParent(parent)) {\n      return parent;\n    }\n\n    parent = parent.return;\n  }\n\n  throw new Error('Expected to find a host parent. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n}\n\nfunction isHostParent(fiber) {\n  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n  // We're going to search forward into the tree until we find a sibling host\n  // node. Unfortunately, if multiple insertions are done in a row we have to\n  // search past them. This leads to exponential search for the next sibling.\n  // TODO: Find a more efficient way to do this.\n  var node = fiber;\n\n  siblings: while (true) {\n    // If we didn't find anything, let's try the next sibling.\n    while (node.sibling === null) {\n      if (node.return === null || isHostParent(node.return)) {\n        // If we pop out of the root or hit the parent the fiber we are the\n        // last sibling.\n        return null;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n\n    while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n      // If it is not host node and, we might have a host node inside it.\n      // Try to search down until we find one.\n      if (node.flags & Placement) {\n        // If we don't have a child, try the siblings instead.\n        continue siblings;\n      } // If we don't have a child, try the siblings instead.\n      // We also skip portals because they are not part of this host tree.\n\n\n      if (node.child === null || node.tag === HostPortal) {\n        continue siblings;\n      } else {\n        node.child.return = node;\n        node = node.child;\n      }\n    } // Check if this host node is stable or about to be placed.\n\n\n    if (!(node.flags & Placement)) {\n      // Found it!\n      return node.stateNode;\n    }\n  }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n  var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n  switch (parentFiber.tag) {\n    case HostComponent:\n      {\n        var parent = parentFiber.stateNode;\n\n        if (parentFiber.flags & ContentReset) {\n          // Reset the text content of the parent before doing any insertions\n          resetTextContent(parent); // Clear ContentReset from the effect tag\n\n          parentFiber.flags &= ~ContentReset;\n        }\n\n        var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n        // children to find all the terminal nodes.\n\n        insertOrAppendPlacementNode(finishedWork, before, parent);\n        break;\n      }\n\n    case HostRoot:\n    case HostPortal:\n      {\n        var _parent = parentFiber.stateNode.containerInfo;\n\n        var _before = getHostSibling(finishedWork);\n\n        insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);\n        break;\n      }\n    // eslint-disable-next-line-no-fallthrough\n\n    default:\n      throw new Error('Invalid host parent fiber. This error is likely caused by a bug ' + 'in React. Please file an issue.');\n  }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n  var tag = node.tag;\n  var isHost = tag === HostComponent || tag === HostText;\n\n  if (isHost) {\n    var stateNode = node.stateNode;\n\n    if (before) {\n      insertInContainerBefore(parent, stateNode, before);\n    } else {\n      appendChildToContainer(parent, stateNode);\n    }\n  } else if (tag === HostPortal) ; else {\n    var child = node.child;\n\n    if (child !== null) {\n      insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n      var sibling = child.sibling;\n\n      while (sibling !== null) {\n        insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n        sibling = sibling.sibling;\n      }\n    }\n  }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n  var tag = node.tag;\n  var isHost = tag === HostComponent || tag === HostText;\n\n  if (isHost) {\n    var stateNode = node.stateNode;\n\n    if (before) {\n      insertBefore(parent, stateNode, before);\n    } else {\n      appendChild(parent, stateNode);\n    }\n  } else if (tag === HostPortal) ; else {\n    var child = node.child;\n\n    if (child !== null) {\n      insertOrAppendPlacementNode(child, before, parent);\n      var sibling = child.sibling;\n\n      while (sibling !== null) {\n        insertOrAppendPlacementNode(sibling, before, parent);\n        sibling = sibling.sibling;\n      }\n    }\n  }\n} // These are tracked on the stack as we recursively traverse a\n// deleted subtree.\n// TODO: Update these during the whole mutation phase, not just during\n// a deletion.\n\n\nvar hostParent = null;\nvar hostParentIsContainer = false;\n\nfunction commitDeletionEffects(root, returnFiber, deletedFiber) {\n  {\n    // We only have the top Fiber that was deleted but we need to recurse down its\n    // children to find all the terminal nodes.\n    // Recursively delete all host nodes from the parent, detach refs, clean\n    // up mounted layout effects, and call componentWillUnmount.\n    // We only need to remove the topmost host child in each branch. But then we\n    // still need to keep traversing to unmount effects, refs, and cWU. TODO: We\n    // could split this into two separate traversals functions, where the second\n    // one doesn't include any removeChild logic. This is maybe the same\n    // function as \"disappearLayoutEffects\" (or whatever that turns into after\n    // the layout phase is refactored to use recursion).\n    // Before starting, find the nearest host parent on the stack so we know\n    // which instance/container to remove the children from.\n    // TODO: Instead of searching up the fiber return path on every deletion, we\n    // can track the nearest host component on the JS stack as we traverse the\n    // tree during the commit phase. This would make insertions faster, too.\n    var parent = returnFiber;\n\n    findParent: while (parent !== null) {\n      switch (parent.tag) {\n        case HostComponent:\n          {\n            hostParent = parent.stateNode;\n            hostParentIsContainer = false;\n            break findParent;\n          }\n\n        case HostRoot:\n          {\n            hostParent = parent.stateNode.containerInfo;\n            hostParentIsContainer = true;\n            break findParent;\n          }\n\n        case HostPortal:\n          {\n            hostParent = parent.stateNode.containerInfo;\n            hostParentIsContainer = true;\n            break findParent;\n          }\n      }\n\n      parent = parent.return;\n    }\n\n    if (hostParent === null) {\n      throw new Error('Expected to find a host parent. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n    }\n\n    commitDeletionEffectsOnFiber(root, returnFiber, deletedFiber);\n    hostParent = null;\n    hostParentIsContainer = false;\n  }\n\n  detachFiberMutation(deletedFiber);\n}\n\nfunction recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {\n  // TODO: Use a static flag to skip trees that don't have unmount effects\n  var child = parent.child;\n\n  while (child !== null) {\n    commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);\n    child = child.sibling;\n  }\n}\n\nfunction commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {\n  onCommitUnmount(deletedFiber); // The cases in this outer switch modify the stack before they traverse\n  // into their subtree. There are simpler cases in the inner switch\n  // that don't modify the stack.\n\n  switch (deletedFiber.tag) {\n    case HostComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          safelyDetachRef(deletedFiber, nearestMountedAncestor);\n        } // Intentional fallthrough to next branch\n\n      }\n    // eslint-disable-next-line-no-fallthrough\n\n    case HostText:\n      {\n        // We only need to remove the nearest host child. Set the host parent\n        // to `null` on the stack to indicate that nested children don't\n        // need to be removed.\n        {\n          var prevHostParent = hostParent;\n          var prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = null;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          hostParent = prevHostParent;\n          hostParentIsContainer = prevHostParentIsContainer;\n\n          if (hostParent !== null) {\n            // Now that all the child effects have unmounted, we can remove the\n            // node from the tree.\n            if (hostParentIsContainer) {\n              removeChildFromContainer(hostParent, deletedFiber.stateNode);\n            } else {\n              removeChild(hostParent, deletedFiber.stateNode);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case DehydratedFragment:\n      {\n        // Delete the dehydrated suspense boundary and all of its content.\n\n\n        {\n          if (hostParent !== null) {\n            if (hostParentIsContainer) {\n              clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);\n            } else {\n              clearSuspenseBoundary(hostParent, deletedFiber.stateNode);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostPortal:\n      {\n        {\n          // When we go into a portal, it becomes the parent to remove from.\n          var _prevHostParent = hostParent;\n          var _prevHostParentIsContainer = hostParentIsContainer;\n          hostParent = deletedFiber.stateNode.containerInfo;\n          hostParentIsContainer = true;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          hostParent = _prevHostParent;\n          hostParentIsContainer = _prevHostParentIsContainer;\n        }\n\n        return;\n      }\n\n    case FunctionComponent:\n    case ForwardRef:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          var updateQueue = deletedFiber.updateQueue;\n\n          if (updateQueue !== null) {\n            var lastEffect = updateQueue.lastEffect;\n\n            if (lastEffect !== null) {\n              var firstEffect = lastEffect.next;\n              var effect = firstEffect;\n\n              do {\n                var _effect = effect,\n                    destroy = _effect.destroy,\n                    tag = _effect.tag;\n\n                if (destroy !== undefined) {\n                  if ((tag & Insertion) !== NoFlags$1) {\n                    safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                  } else if ((tag & Layout) !== NoFlags$1) {\n                    {\n                      markComponentLayoutEffectUnmountStarted(deletedFiber);\n                    }\n\n                    if ( deletedFiber.mode & ProfileMode) {\n                      startLayoutEffectTimer();\n                      safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                      recordLayoutEffectDuration(deletedFiber);\n                    } else {\n                      safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);\n                    }\n\n                    {\n                      markComponentLayoutEffectUnmountStopped();\n                    }\n                  }\n                }\n\n                effect = effect.next;\n              } while (effect !== firstEffect);\n            }\n          }\n        }\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case ClassComponent:\n      {\n        if (!offscreenSubtreeWasHidden) {\n          safelyDetachRef(deletedFiber, nearestMountedAncestor);\n          var instance = deletedFiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);\n          }\n        }\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case ScopeComponent:\n      {\n\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n\n    case OffscreenComponent:\n      {\n        if ( // TODO: Remove this dead flag\n         deletedFiber.mode & ConcurrentMode) {\n          // If this offscreen component is hidden, we already unmounted it. Before\n          // deleting the children, track that it's already unmounted so that we\n          // don't attempt to unmount the effects again.\n          // TODO: If the tree is hidden, in most cases we should be able to skip\n          // over the nested children entirely. An exception is we haven't yet found\n          // the topmost host node to delete, which we already track on the stack.\n          // But the other case is portals, which need to be detached no matter how\n          // deeply they are nested. We should use a subtree flag to track whether a\n          // subtree includes a nested portal.\n          var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        } else {\n          recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        }\n\n        break;\n      }\n\n    default:\n      {\n        recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);\n        return;\n      }\n  }\n}\n\nfunction commitSuspenseCallback(finishedWork) {\n  // TODO: Move this to passive phase\n  var newState = finishedWork.memoizedState;\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n  var newState = finishedWork.memoizedState;\n\n  if (newState === null) {\n    var current = finishedWork.alternate;\n\n    if (current !== null) {\n      var prevState = current.memoizedState;\n\n      if (prevState !== null) {\n        var suspenseInstance = prevState.dehydrated;\n\n        if (suspenseInstance !== null) {\n          commitHydratedSuspenseInstance(suspenseInstance);\n        }\n      }\n    }\n  }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n  // If this boundary just timed out, then it will have a set of wakeables.\n  // For each wakeable, attach a listener so that when it resolves, React\n  // attempts to re-render the boundary in the primary (pre-timeout) state.\n  var wakeables = finishedWork.updateQueue;\n\n  if (wakeables !== null) {\n    finishedWork.updateQueue = null;\n    var retryCache = finishedWork.stateNode;\n\n    if (retryCache === null) {\n      retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n    }\n\n    wakeables.forEach(function (wakeable) {\n      // Memoize using the boundary fiber to prevent redundant listeners.\n      var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n      if (!retryCache.has(wakeable)) {\n        retryCache.add(wakeable);\n\n        {\n          if (isDevToolsPresent) {\n            if (inProgressLanes !== null && inProgressRoot !== null) {\n              // If we have pending work still, associate the original updaters with it.\n              restorePendingUpdaters(inProgressRoot, inProgressLanes);\n            } else {\n              throw Error('Expected finished root and lanes to be set. This is a bug in React.');\n            }\n          }\n        }\n\n        wakeable.then(retry, retry);\n      }\n    });\n  }\n} // This function detects when a Suspense boundary goes from visible to hidden.\nfunction commitMutationEffects(root, finishedWork, committedLanes) {\n  inProgressLanes = committedLanes;\n  inProgressRoot = root;\n  setCurrentFiber(finishedWork);\n  commitMutationEffectsOnFiber(finishedWork, root);\n  setCurrentFiber(finishedWork);\n  inProgressLanes = null;\n  inProgressRoot = null;\n}\n\nfunction recursivelyTraverseMutationEffects(root, parentFiber, lanes) {\n  // Deletions effects can be scheduled on any fiber type. They need to happen\n  // before the children effects hae fired.\n  var deletions = parentFiber.deletions;\n\n  if (deletions !== null) {\n    for (var i = 0; i < deletions.length; i++) {\n      var childToDelete = deletions[i];\n\n      try {\n        commitDeletionEffects(root, parentFiber, childToDelete);\n      } catch (error) {\n        captureCommitPhaseError(childToDelete, parentFiber, error);\n      }\n    }\n  }\n\n  var prevDebugFiber = getCurrentFiber();\n\n  if (parentFiber.subtreeFlags & MutationMask) {\n    var child = parentFiber.child;\n\n    while (child !== null) {\n      setCurrentFiber(child);\n      commitMutationEffectsOnFiber(child, root);\n      child = child.sibling;\n    }\n  }\n\n  setCurrentFiber(prevDebugFiber);\n}\n\nfunction commitMutationEffectsOnFiber(finishedWork, root, lanes) {\n  var current = finishedWork.alternate;\n  var flags = finishedWork.flags; // The effect flag should be checked *after* we refine the type of fiber,\n  // because the fiber tag is more specific. An exception is any flag related\n  // to reconcilation, because those can be set on all fiber types.\n\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case MemoComponent:\n    case SimpleMemoComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          try {\n            commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);\n            commitHookEffectListMount(Insertion | HasEffect, finishedWork);\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          } // Layout effects are destroyed during the mutation phase so that all\n          // destroy functions for all fibers are called before any create functions.\n          // This prevents sibling component effects from interfering with each other,\n          // e.g. a destroy function in one component should never override a ref set\n          // by a create function in another component during the same commit.\n\n\n          if ( finishedWork.mode & ProfileMode) {\n            try {\n              startLayoutEffectTimer();\n              commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n\n            recordLayoutEffectDuration(finishedWork);\n          } else {\n            try {\n              commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case ClassComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Ref) {\n          if (current !== null) {\n            safelyDetachRef(current, current.return);\n          }\n        }\n\n        return;\n      }\n\n    case HostComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Ref) {\n          if (current !== null) {\n            safelyDetachRef(current, current.return);\n          }\n        }\n\n        {\n          // TODO: ContentReset gets cleared by the children during the commit\n          // phase. This is a refactor hazard because it means we must read\n          // flags the flags after `commitReconciliationEffects` has already run;\n          // the order matters. We should refactor so that ContentReset does not\n          // rely on mutating the flag during commit. Like by setting a flag\n          // during the render phase instead.\n          if (finishedWork.flags & ContentReset) {\n            var instance = finishedWork.stateNode;\n\n            try {\n              resetTextContent(instance);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n\n          if (flags & Update) {\n            var _instance4 = finishedWork.stateNode;\n\n            if (_instance4 != null) {\n              // Commit the work prepared earlier.\n              var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n              // as the newProps. The updatePayload will contain the real change in\n              // this case.\n\n              var oldProps = current !== null ? current.memoizedProps : newProps;\n              var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n              var updatePayload = finishedWork.updateQueue;\n              finishedWork.updateQueue = null;\n\n              if (updatePayload !== null) {\n                try {\n                  commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);\n                } catch (error) {\n                  captureCommitPhaseError(finishedWork, finishedWork.return, error);\n                }\n              }\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostText:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          {\n            if (finishedWork.stateNode === null) {\n              throw new Error('This should have a text node initialized. This error is likely ' + 'caused by a bug in React. Please file an issue.');\n            }\n\n            var textInstance = finishedWork.stateNode;\n            var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n            // as the newProps. The updatePayload will contain the real change in\n            // this case.\n\n            var oldText = current !== null ? current.memoizedProps : newText;\n\n            try {\n              commitTextUpdate(textInstance, oldText, newText);\n            } catch (error) {\n              captureCommitPhaseError(finishedWork, finishedWork.return, error);\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostRoot:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          {\n            if (current !== null) {\n              var prevRootState = current.memoizedState;\n\n              if (prevRootState.isDehydrated) {\n                try {\n                  commitHydratedContainer(root.containerInfo);\n                } catch (error) {\n                  captureCommitPhaseError(finishedWork, finishedWork.return, error);\n                }\n              }\n            }\n          }\n        }\n\n        return;\n      }\n\n    case HostPortal:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        return;\n      }\n\n    case SuspenseComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n        var offscreenFiber = finishedWork.child;\n\n        if (offscreenFiber.flags & Visibility) {\n          var offscreenInstance = offscreenFiber.stateNode;\n          var newState = offscreenFiber.memoizedState;\n          var isHidden = newState !== null; // Track the current state on the Offscreen instance so we can\n          // read it during an event\n\n          offscreenInstance.isHidden = isHidden;\n\n          if (isHidden) {\n            var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;\n\n            if (!wasHidden) {\n              // TODO: Move to passive phase\n              markCommitTimeOfFallback();\n            }\n          }\n        }\n\n        if (flags & Update) {\n          try {\n            commitSuspenseCallback(finishedWork);\n          } catch (error) {\n            captureCommitPhaseError(finishedWork, finishedWork.return, error);\n          }\n\n          attachSuspenseRetryListeners(finishedWork);\n        }\n\n        return;\n      }\n\n    case OffscreenComponent:\n      {\n        var _wasHidden = current !== null && current.memoizedState !== null;\n\n        if ( // TODO: Remove this dead flag\n         finishedWork.mode & ConcurrentMode) {\n          // Before committing the children, track on the stack whether this\n          // offscreen subtree was already hidden, so that we don't unmount the\n          // effects again.\n          var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;\n          recursivelyTraverseMutationEffects(root, finishedWork);\n          offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        } else {\n          recursivelyTraverseMutationEffects(root, finishedWork);\n        }\n\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Visibility) {\n          var _offscreenInstance = finishedWork.stateNode;\n          var _newState = finishedWork.memoizedState;\n\n          var _isHidden = _newState !== null;\n\n          var offscreenBoundary = finishedWork; // Track the current state on the Offscreen instance so we can\n          // read it during an event\n\n          _offscreenInstance.isHidden = _isHidden;\n\n          {\n            if (_isHidden) {\n              if (!_wasHidden) {\n                if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {\n                  nextEffect = offscreenBoundary;\n                  var offscreenChild = offscreenBoundary.child;\n\n                  while (offscreenChild !== null) {\n                    nextEffect = offscreenChild;\n                    disappearLayoutEffects_begin(offscreenChild);\n                    offscreenChild = offscreenChild.sibling;\n                  }\n                }\n              }\n            }\n          }\n\n          {\n            // TODO: This needs to run whenever there's an insertion or update\n            // inside a hidden Offscreen tree.\n            hideOrUnhideAllChildren(offscreenBoundary, _isHidden);\n          }\n        }\n\n        return;\n      }\n\n    case SuspenseListComponent:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n\n        if (flags & Update) {\n          attachSuspenseRetryListeners(finishedWork);\n        }\n\n        return;\n      }\n\n    case ScopeComponent:\n      {\n\n        return;\n      }\n\n    default:\n      {\n        recursivelyTraverseMutationEffects(root, finishedWork);\n        commitReconciliationEffects(finishedWork);\n        return;\n      }\n  }\n}\n\nfunction commitReconciliationEffects(finishedWork) {\n  // Placement effects (insertions, reorders) can be scheduled on any fiber\n  // type. They needs to happen after the children effects have fired, but\n  // before the effects on this fiber have fired.\n  var flags = finishedWork.flags;\n\n  if (flags & Placement) {\n    try {\n      commitPlacement(finishedWork);\n    } catch (error) {\n      captureCommitPhaseError(finishedWork, finishedWork.return, error);\n    } // Clear the \"placement\" from effect tag so that we know that this is\n    // inserted, before any life-cycles like componentDidMount gets called.\n    // TODO: findDOMNode doesn't rely on this any more but isMounted does\n    // and isMounted is deprecated anyway so we should be able to kill this.\n\n\n    finishedWork.flags &= ~Placement;\n  }\n\n  if (flags & Hydrating) {\n    finishedWork.flags &= ~Hydrating;\n  }\n}\n\nfunction commitLayoutEffects(finishedWork, root, committedLanes) {\n  inProgressLanes = committedLanes;\n  inProgressRoot = root;\n  nextEffect = finishedWork;\n  commitLayoutEffects_begin(finishedWork, root, committedLanes);\n  inProgressLanes = null;\n  inProgressRoot = null;\n}\n\nfunction commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {\n  // Suspense layout effects semantics don't change for legacy roots.\n  var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;\n\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if ( fiber.tag === OffscreenComponent && isModernRoot) {\n      // Keep track of the current Offscreen stack's state.\n      var isHidden = fiber.memoizedState !== null;\n      var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;\n\n      if (newOffscreenSubtreeIsHidden) {\n        // The Offscreen tree is hidden. Skip over its layout effects.\n        commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n        continue;\n      } else {\n        // TODO (Offscreen) Also check: subtreeFlags & LayoutMask\n        var current = fiber.alternate;\n        var wasHidden = current !== null && current.memoizedState !== null;\n        var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;\n        var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;\n        var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden; // Traverse the Offscreen subtree with the current Offscreen as the root.\n\n        offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;\n        offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;\n\n        if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {\n          // This is the root of a reappearing boundary. Turn its layout effects\n          // back on.\n          nextEffect = fiber;\n          reappearLayoutEffects_begin(fiber);\n        }\n\n        var child = firstChild;\n\n        while (child !== null) {\n          nextEffect = child;\n          commitLayoutEffects_begin(child, // New root; bubble back up to here and stop.\n          root, committedLanes);\n          child = child.sibling;\n        } // Restore Offscreen state and resume in our-progress traversal.\n\n\n        nextEffect = fiber;\n        offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n        offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n        commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n        continue;\n      }\n    }\n\n    if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes);\n    }\n  }\n}\n\nfunction commitLayoutMountEffects_complete(subtreeRoot, root, committedLanes) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & LayoutMask) !== NoFlags) {\n      var current = fiber.alternate;\n      setCurrentFiber(fiber);\n\n      try {\n        commitLayoutEffectOnFiber(root, current, fiber, committedLanes);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n\n      resetCurrentFiber();\n    }\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction disappearLayoutEffects_begin(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child; // TODO (Offscreen) Check: flags & (RefStatic | LayoutStatic)\n\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case MemoComponent:\n      case SimpleMemoComponent:\n        {\n          if ( fiber.mode & ProfileMode) {\n            try {\n              startLayoutEffectTimer();\n              commitHookEffectListUnmount(Layout, fiber, fiber.return);\n            } finally {\n              recordLayoutEffectDuration(fiber);\n            }\n          } else {\n            commitHookEffectListUnmount(Layout, fiber, fiber.return);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          // TODO (Offscreen) Check: flags & RefStatic\n          safelyDetachRef(fiber, fiber.return);\n          var instance = fiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n          }\n\n          break;\n        }\n\n      case HostComponent:\n        {\n          safelyDetachRef(fiber, fiber.return);\n          break;\n        }\n\n      case OffscreenComponent:\n        {\n          // Check if this is a\n          var isHidden = fiber.memoizedState !== null;\n\n          if (isHidden) {\n            // Nested Offscreen tree is already hidden. Don't disappear\n            // its effects.\n            disappearLayoutEffects_complete(subtreeRoot);\n            continue;\n          }\n\n          break;\n        }\n    } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n    if (firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      disappearLayoutEffects_complete(subtreeRoot);\n    }\n  }\n}\n\nfunction disappearLayoutEffects_complete(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction reappearLayoutEffects_begin(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if (fiber.tag === OffscreenComponent) {\n      var isHidden = fiber.memoizedState !== null;\n\n      if (isHidden) {\n        // Nested Offscreen tree is still hidden. Don't re-appear its effects.\n        reappearLayoutEffects_complete(subtreeRoot);\n        continue;\n      }\n    } // TODO (Offscreen) Check: subtreeFlags & LayoutStatic\n\n\n    if (firstChild !== null) {\n      // This node may have been reused from a previous render, so we can't\n      // assume its return pointer is correct.\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      reappearLayoutEffects_complete(subtreeRoot);\n    }\n  }\n}\n\nfunction reappearLayoutEffects_complete(subtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // TODO (Offscreen) Check: flags & LayoutStatic\n\n    setCurrentFiber(fiber);\n\n    try {\n      reappearLayoutEffectsOnFiber(fiber);\n    } catch (error) {\n      captureCommitPhaseError(fiber, fiber.return, error);\n    }\n\n    resetCurrentFiber();\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      // This node may have been reused from a previous render, so we can't\n      // assume its return pointer is correct.\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveMountEffects(root, finishedWork, committedLanes, committedTransitions) {\n  nextEffect = finishedWork;\n  commitPassiveMountEffects_begin(finishedWork, root, committedLanes, committedTransitions);\n}\n\nfunction commitPassiveMountEffects_begin(subtreeRoot, root, committedLanes, committedTransitions) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var firstChild = fiber.child;\n\n    if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {\n      firstChild.return = fiber;\n      nextEffect = firstChild;\n    } else {\n      commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions);\n    }\n  }\n}\n\nfunction commitPassiveMountEffects_complete(subtreeRoot, root, committedLanes, committedTransitions) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & Passive) !== NoFlags) {\n      setCurrentFiber(fiber);\n\n      try {\n        commitPassiveMountOnFiber(root, fiber, committedLanes, committedTransitions);\n      } catch (error) {\n        captureCommitPhaseError(fiber, fiber.return, error);\n      }\n\n      resetCurrentFiber();\n    }\n\n    if (fiber === subtreeRoot) {\n      nextEffect = null;\n      return;\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( finishedWork.mode & ProfileMode) {\n          startPassiveEffectTimer();\n\n          try {\n            commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n          } finally {\n            recordPassiveEffectDuration(finishedWork);\n          }\n        } else {\n          commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);\n        }\n\n        break;\n      }\n  }\n}\n\nfunction commitPassiveUnmountEffects(firstChild) {\n  nextEffect = firstChild;\n  commitPassiveUnmountEffects_begin();\n}\n\nfunction commitPassiveUnmountEffects_begin() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var child = fiber.child;\n\n    if ((nextEffect.flags & ChildDeletion) !== NoFlags) {\n      var deletions = fiber.deletions;\n\n      if (deletions !== null) {\n        for (var i = 0; i < deletions.length; i++) {\n          var fiberToDelete = deletions[i];\n          nextEffect = fiberToDelete;\n          commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);\n        }\n\n        {\n          // A fiber was deleted from this parent fiber, but it's still part of\n          // the previous (alternate) parent fiber's list of children. Because\n          // children are a linked list, an earlier sibling that's still alive\n          // will be connected to the deleted fiber via its `alternate`:\n          //\n          //   live fiber\n          //   --alternate--> previous live fiber\n          //   --sibling--> deleted fiber\n          //\n          // We can't disconnect `alternate` on nodes that haven't been deleted\n          // yet, but we can disconnect the `sibling` and `child` pointers.\n          var previousFiber = fiber.alternate;\n\n          if (previousFiber !== null) {\n            var detachedChild = previousFiber.child;\n\n            if (detachedChild !== null) {\n              previousFiber.child = null;\n\n              do {\n                var detachedSibling = detachedChild.sibling;\n                detachedChild.sibling = null;\n                detachedChild = detachedSibling;\n              } while (detachedChild !== null);\n            }\n          }\n        }\n\n        nextEffect = fiber;\n      }\n    }\n\n    if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitPassiveUnmountEffects_complete();\n    }\n  }\n}\n\nfunction commitPassiveUnmountEffects_complete() {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n\n    if ((fiber.flags & Passive) !== NoFlags) {\n      setCurrentFiber(fiber);\n      commitPassiveUnmountOnFiber(fiber);\n      resetCurrentFiber();\n    }\n\n    var sibling = fiber.sibling;\n\n    if (sibling !== null) {\n      sibling.return = fiber.return;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = fiber.return;\n  }\n}\n\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n  switch (finishedWork.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( finishedWork.mode & ProfileMode) {\n          startPassiveEffectTimer();\n          commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n          recordPassiveEffectDuration(finishedWork);\n        } else {\n          commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);\n        }\n\n        break;\n      }\n  }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect; // Deletion effects fire in parent -> child order\n    // TODO: Check if fiber has a PassiveStatic flag\n\n    setCurrentFiber(fiber);\n    commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);\n    resetCurrentFiber();\n    var child = fiber.child; // TODO: Only traverse subtree if it has a PassiveStatic flag. (But, if we\n    // do this, still need to handle `deletedTreeCleanUpLevel` correctly.)\n\n    if (child !== null) {\n      child.return = fiber;\n      nextEffect = child;\n    } else {\n      commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);\n    }\n  }\n}\n\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {\n  while (nextEffect !== null) {\n    var fiber = nextEffect;\n    var sibling = fiber.sibling;\n    var returnFiber = fiber.return;\n\n    {\n      // Recursively traverse the entire deleted tree and clean up fiber fields.\n      // This is more aggressive than ideal, and the long term goal is to only\n      // have to detach the deleted tree at the root.\n      detachFiberAfterEffects(fiber);\n\n      if (fiber === deletedSubtreeRoot) {\n        nextEffect = null;\n        return;\n      }\n    }\n\n    if (sibling !== null) {\n      sibling.return = returnFiber;\n      nextEffect = sibling;\n      return;\n    }\n\n    nextEffect = returnFiber;\n  }\n}\n\nfunction commitPassiveUnmountInsideDeletedTreeOnFiber(current, nearestMountedAncestor) {\n  switch (current.tag) {\n    case FunctionComponent:\n    case ForwardRef:\n    case SimpleMemoComponent:\n      {\n        if ( current.mode & ProfileMode) {\n          startPassiveEffectTimer();\n          commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n          recordPassiveEffectDuration(current);\n        } else {\n          commitHookEffectListUnmount(Passive$1, current, nearestMountedAncestor);\n        }\n\n        break;\n      }\n  }\n} // TODO: Reuse reappearLayoutEffects traversal here?\n\n\nfunction invokeLayoutEffectMountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListMount(Layout | HasEffect, fiber);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = fiber.stateNode;\n\n          try {\n            instance.componentDidMount();\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokePassiveEffectMountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListMount(Passive$1 | HasEffect, fiber);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokeLayoutEffectUnmountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n\n          break;\n        }\n\n      case ClassComponent:\n        {\n          var instance = fiber.stateNode;\n\n          if (typeof instance.componentWillUnmount === 'function') {\n            safelyCallComponentWillUnmount(fiber, fiber.return, instance);\n          }\n\n          break;\n        }\n    }\n  }\n}\n\nfunction invokePassiveEffectUnmountInDEV(fiber) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    switch (fiber.tag) {\n      case FunctionComponent:\n      case ForwardRef:\n      case SimpleMemoComponent:\n        {\n          try {\n            commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);\n          } catch (error) {\n            captureCommitPhaseError(fiber, fiber.return, error);\n          }\n        }\n    }\n  }\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n  var symbolFor = Symbol.for;\n  COMPONENT_TYPE = symbolFor('selector.component');\n  HAS_PSEUDO_CLASS_TYPE = symbolFor('selector.has_pseudo_class');\n  ROLE_TYPE = symbolFor('selector.role');\n  TEST_NAME_TYPE = symbolFor('selector.test_id');\n  TEXT_TYPE = symbolFor('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n  {\n    commitHooks.forEach(function (commitHook) {\n      return commitHook();\n    });\n  }\n}\n\nvar ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;\nfunction isLegacyActEnvironment(fiber) {\n  {\n    // Legacy mode. We preserve the behavior of React 17's act. It assumes an\n    // act environment whenever `jest` is defined, but you can still turn off\n    // spurious warnings by setting IS_REACT_ACT_ENVIRONMENT explicitly\n    // to false.\n    var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n    typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined; // $FlowExpectedError - Flow doesn't know about jest\n\n    var jestIsDefined = typeof jest !== 'undefined';\n    return  jestIsDefined && isReactActEnvironmentGlobal !== false;\n  }\n}\nfunction isConcurrentActEnvironment() {\n  {\n    var isReactActEnvironmentGlobal = // $FlowExpectedError – Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global\n    typeof IS_REACT_ACT_ENVIRONMENT !== 'undefined' ? IS_REACT_ACT_ENVIRONMENT : undefined;\n\n    if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {\n      // TODO: Include link to relevant documentation page.\n      error('The current testing environment is not configured to support ' + 'act(...)');\n    }\n\n    return isReactActEnvironmentGlobal;\n  }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n    ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n    ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig,\n    ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;\nvar NoContext =\n/*             */\n0;\nvar BatchedContext =\n/*               */\n1;\nvar RenderContext =\n/*                */\n2;\nvar CommitContext =\n/*                */\n4;\nvar RootInProgress = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5;\nvar RootDidNotComplete = 6; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootInProgress; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootInterleavedUpdatedLanes = NoLanes; // Lanes that were updated during the render phase (*not* an interleaved event).\n\nvar workInProgressRootPingedLanes = NoLanes; // Errors that are thrown during the render phase.\n\nvar workInProgressRootConcurrentErrors = null; // These are errors that we recovered from without surfacing them to the UI.\n// We will log them once the tree commits.\n\nvar workInProgressRootRecoverableErrors = null; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\nvar workInProgressTransitions = null;\n\nfunction resetRenderTimer() {\n  workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n  return workInProgressRootRenderTargetTime;\n}\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null; // Only used when enableProfilerNestedUpdateScheduledHook is true;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveProfilerEffects = [];\nvar pendingPassiveTransitions = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar isFlushingPassiveEffects = false;\nvar didScheduleUpdateDuringPassiveEffects = false;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0;\nvar rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventTransitionLane = NoLanes;\nvar isRunningInsertionEffect = false;\nfunction getWorkInProgressRoot() {\n  return workInProgressRoot;\n}\nfunction requestEventTime() {\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    // We're inside React, so it's fine to read the actual time.\n    return now();\n  } // We're not inside React, so we may be in the middle of a browser event.\n\n\n  if (currentEventTime !== NoTimestamp) {\n    // Use the same start time for all updates until we enter React again.\n    return currentEventTime;\n  } // This is the first update since React yielded. Compute a new start time.\n\n\n  currentEventTime = now();\n  return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n  // Special cases\n  var mode = fiber.mode;\n\n  if ((mode & ConcurrentMode) === NoMode) {\n    return SyncLane;\n  } else if ( (executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {\n    // This is a render phase update. These are not officially supported. The\n    // old behavior is to give this the same \"thread\" (lanes) as\n    // whatever is currently rendering. So if you call `setState` on a component\n    // that happens later in the same render, it will flush. Ideally, we want to\n    // remove the special case and treat them as if they came from an\n    // interleaved event. Regardless, this pattern is not officially supported.\n    // This behavior is only a fallback. The flag only exists until we can roll\n    // out the setState warning, since existing code might accidentally rely on\n    // the current behavior.\n    return pickArbitraryLane(workInProgressRootRenderLanes);\n  }\n\n  var isTransition = requestCurrentTransition() !== NoTransition;\n\n  if (isTransition) {\n    if ( ReactCurrentBatchConfig$3.transition !== null) {\n      var transition = ReactCurrentBatchConfig$3.transition;\n\n      if (!transition._updatedFibers) {\n        transition._updatedFibers = new Set();\n      }\n\n      transition._updatedFibers.add(fiber);\n    } // The algorithm for assigning an update to a lane should be stable for all\n    // updates at the same priority within the same event. To do this, the\n    // inputs to the algorithm must be the same.\n    //\n    // The trick we use is to cache the first of each of these inputs within an\n    // event. Then reset the cached values once we can be sure the event is\n    // over. Our heuristic for that is whenever we enter a concurrent work loop.\n\n\n    if (currentEventTransitionLane === NoLane) {\n      // All transitions within the same event are assigned the same lane.\n      currentEventTransitionLane = claimNextTransitionLane();\n    }\n\n    return currentEventTransitionLane;\n  } // Updates originating inside certain React methods, like flushSync, have\n  // their priority set by tracking it with a context variable.\n  //\n  // The opaque type returned by the host config is internally a lane, so we can\n  // use that directly.\n  // TODO: Move this type conversion to the event priority module.\n\n\n  var updateLane = getCurrentUpdatePriority();\n\n  if (updateLane !== NoLane) {\n    return updateLane;\n  } // This update originated outside React. Ask the host environment for an\n  // appropriate priority, based on the type of event.\n  //\n  // The opaque type returned by the host config is internally a lane, so we can\n  // use that directly.\n  // TODO: Move this type conversion to the event priority module.\n\n\n  var eventLane = getCurrentEventPriority();\n  return eventLane;\n}\n\nfunction requestRetryLane(fiber) {\n  // This is a fork of `requestUpdateLane` designed specifically for Suspense\n  // \"retries\" — a special update that attempts to flip a Suspense boundary\n  // from its placeholder state to its primary/resolved state.\n  // Special cases\n  var mode = fiber.mode;\n\n  if ((mode & ConcurrentMode) === NoMode) {\n    return SyncLane;\n  }\n\n  return claimNextRetryLane();\n}\n\nfunction scheduleUpdateOnFiber(root, fiber, lane, eventTime) {\n  checkForNestedUpdates();\n\n  {\n    if (isRunningInsertionEffect) {\n      error('useInsertionEffect must not schedule updates.');\n    }\n  }\n\n  {\n    if (isFlushingPassiveEffects) {\n      didScheduleUpdateDuringPassiveEffects = true;\n    }\n  } // Mark that the root has a pending update.\n\n\n  markRootUpdated(root, lane, eventTime);\n\n  if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot) {\n    // This update was dispatched during the render phase. This is a mistake\n    // if the update originates from user space (with the exception of local\n    // hook updates, which are handled differently and don't reach this\n    // function), but there are some internal React features that use this as\n    // an implementation detail, like selective hydration.\n    warnAboutRenderPhaseUpdatesInDEV(fiber); // Track lanes that were updated during the render phase\n  } else {\n    // This is a normal update, scheduled from outside the render phase. For\n    // example, during an input event.\n    {\n      if (isDevToolsPresent) {\n        addFiberToLanesMap(root, fiber, lane);\n      }\n    }\n\n    warnIfUpdatesNotWrappedWithActDEV(fiber);\n\n    if (root === workInProgressRoot) {\n      // Received an update to a tree that's in the middle of rendering. Mark\n      // that there was an interleaved update work on this root. Unless the\n      // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n      // phase update. In that case, we don't treat render phase updates as if\n      // they were interleaved, for backwards compat reasons.\n      if ( (executionContext & RenderContext) === NoContext) {\n        workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);\n      }\n\n      if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n        // The root already suspended with a delay, which means this render\n        // definitely won't finish. Since we have a new update, let's mark it as\n        // suspended now, right before marking the incoming update. This has the\n        // effect of interrupting the current render and switching to the update.\n        // TODO: Make sure this doesn't override pings that happen while we've\n        // already started rendering.\n        markRootSuspended$1(root, workInProgressRootRenderLanes);\n      }\n    }\n\n    ensureRootIsScheduled(root, eventTime);\n\n    if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n    !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n      // Flush the synchronous work now, unless we're already working or inside\n      // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n      // scheduleCallbackForFiber to preserve the ability to schedule a callback\n      // without immediately flushing it. We only do this for user-initiated\n      // updates, to preserve historical behavior of legacy mode.\n      resetRenderTimer();\n      flushSyncCallbacksOnlyInLegacyMode();\n    }\n  }\n}\nfunction scheduleInitialHydrationOnRoot(root, lane, eventTime) {\n  // This is a special fork of scheduleUpdateOnFiber that is only used to\n  // schedule the initial hydration of a root that has just been created. Most\n  // of the stuff in scheduleUpdateOnFiber can be skipped.\n  //\n  // The main reason for this separate path, though, is to distinguish the\n  // initial children from subsequent updates. In fully client-rendered roots\n  // (createRoot instead of hydrateRoot), all top-level renders are modeled as\n  // updates, but hydration roots are special because the initial render must\n  // match what was rendered on the server.\n  var current = root.current;\n  current.lanes = lane;\n  markRootUpdated(root, lane, eventTime);\n  ensureRootIsScheduled(root, eventTime);\n}\nfunction isUnsafeClassRenderPhaseUpdate(fiber) {\n  // Check if this is a render phase update. Only called by class components,\n  // which special (deprecated) behavior for UNSAFE_componentWillReceive props.\n  return (// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We\n    // decided not to enable it.\n     (executionContext & RenderContext) !== NoContext\n  );\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\nfunction ensureRootIsScheduled(root, currentTime) {\n  var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n  // expired so we know to work on those next.\n\n  markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n  var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n  if (nextLanes === NoLanes) {\n    // Special case: There's nothing to work on.\n    if (existingCallbackNode !== null) {\n      cancelCallback$1(existingCallbackNode);\n    }\n\n    root.callbackNode = null;\n    root.callbackPriority = NoLane;\n    return;\n  } // We use the highest priority lane to represent the priority of the callback.\n\n\n  var newCallbackPriority = getHighestPriorityLane(nextLanes); // Check if there's an existing task. We may be able to reuse it.\n\n  var existingCallbackPriority = root.callbackPriority;\n\n  if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a\n  // Scheduler task, rather than an `act` task, cancel it and re-scheduled\n  // on the `act` queue.\n  !( ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {\n    {\n      // If we're going to re-use an existing task, it needs to exist.\n      // Assume that discrete update microtasks are non-cancellable and null.\n      // TODO: Temporary until we confirm this warning is not fired.\n      if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {\n        error('Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.');\n      }\n    } // The priority hasn't changed. We can reuse the existing task. Exit.\n\n\n    return;\n  }\n\n  if (existingCallbackNode != null) {\n    // Cancel the existing callback. We'll schedule a new one below.\n    cancelCallback$1(existingCallbackNode);\n  } // Schedule a new callback.\n\n\n  var newCallbackNode;\n\n  if (newCallbackPriority === SyncLane) {\n    // Special case: Sync React callbacks are scheduled on a special\n    // internal queue\n    if (root.tag === LegacyRoot) {\n      if ( ReactCurrentActQueue$1.isBatchingLegacy !== null) {\n        ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;\n      }\n\n      scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root));\n    } else {\n      scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n    }\n\n    {\n      // Flush the queue in a microtask.\n      if ( ReactCurrentActQueue$1.current !== null) {\n        // Inside `act`, use our internal `act` queue so that these get flushed\n        // at the end of the current scope even when using the sync version\n        // of `act`.\n        ReactCurrentActQueue$1.current.push(flushSyncCallbacks);\n      } else {\n        scheduleMicrotask(function () {\n          // In Safari, appending an iframe forces microtasks to run.\n          // https://github.com/facebook/react/issues/22459\n          // We don't support running callbacks in the middle of render\n          // or commit so we need to check against that.\n          if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n            // Note that this would still prematurely flush the callbacks\n            // if this happens outside render or commit phase (e.g. in an event).\n            flushSyncCallbacks();\n          }\n        });\n      }\n    }\n\n    newCallbackNode = null;\n  } else {\n    var schedulerPriorityLevel;\n\n    switch (lanesToEventPriority(nextLanes)) {\n      case DiscreteEventPriority:\n        schedulerPriorityLevel = ImmediatePriority;\n        break;\n\n      case ContinuousEventPriority:\n        schedulerPriorityLevel = UserBlockingPriority;\n        break;\n\n      case DefaultEventPriority:\n        schedulerPriorityLevel = NormalPriority;\n        break;\n\n      case IdleEventPriority:\n        schedulerPriorityLevel = IdlePriority;\n        break;\n\n      default:\n        schedulerPriorityLevel = NormalPriority;\n        break;\n    }\n\n    newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n  }\n\n  root.callbackPriority = newCallbackPriority;\n  root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root, didTimeout) {\n  {\n    resetNestedUpdateFlag();\n  } // Since we know we're in a React event, we can clear the current\n  // event time. The next update will compute a new event time.\n\n\n  currentEventTime = NoTimestamp;\n  currentEventTransitionLane = NoLanes;\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  } // Flush any pending passive effects before deciding which lanes to work on,\n  // in case they schedule additional work.\n\n\n  var originalCallbackNode = root.callbackNode;\n  var didFlushPassiveEffects = flushPassiveEffects();\n\n  if (didFlushPassiveEffects) {\n    // Something in the passive effect phase may have canceled the current task.\n    // Check if the task node for this root was changed.\n    if (root.callbackNode !== originalCallbackNode) {\n      // The current task was canceled. Exit. We don't need to call\n      // `ensureRootIsScheduled` because the check above implies either that\n      // there's a new task, or that there's no remaining work on this root.\n      return null;\n    }\n  } // Determine the next lanes to work on, using the fields stored\n  // on the root.\n\n\n  var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n  if (lanes === NoLanes) {\n    // Defensive coding. This is never expected to happen.\n    return null;\n  } // We disable time-slicing in some cases: if the work has been CPU-bound\n  // for too long (\"expired\" work, to prevent starvation), or we're in\n  // sync-updates-by-default mode.\n  // TODO: We only check `didTimeout` defensively, to account for a Scheduler\n  // bug we're still investigating. Once the bug in Scheduler is fixed,\n  // we can remove this, since we track expiration ourselves.\n\n\n  var shouldTimeSlice = !includesBlockingLane(root, lanes) && !includesExpiredLane(root, lanes) && ( !didTimeout);\n  var exitStatus = shouldTimeSlice ? renderRootConcurrent(root, lanes) : renderRootSync(root, lanes);\n\n  if (exitStatus !== RootInProgress) {\n    if (exitStatus === RootErrored) {\n      // If something threw an error, try rendering one more time. We'll\n      // render synchronously to block concurrent data mutations, and we'll\n      // includes all pending updates are included. If it still fails after\n      // the second attempt, we'll give up and commit the resulting tree.\n      var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n      if (errorRetryLanes !== NoLanes) {\n        lanes = errorRetryLanes;\n        exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n      }\n    }\n\n    if (exitStatus === RootFatalErrored) {\n      var fatalError = workInProgressRootFatalError;\n      prepareFreshStack(root, NoLanes);\n      markRootSuspended$1(root, lanes);\n      ensureRootIsScheduled(root, now());\n      throw fatalError;\n    }\n\n    if (exitStatus === RootDidNotComplete) {\n      // The render unwound without completing the tree. This happens in special\n      // cases where need to exit the current render without producing a\n      // consistent tree or committing.\n      //\n      // This should only happen during a concurrent render, not a discrete or\n      // synchronous update. We should have already checked for this when we\n      // unwound the stack.\n      markRootSuspended$1(root, lanes);\n    } else {\n      // The render completed.\n      // Check if this render may have yielded to a concurrent event, and if so,\n      // confirm that any newly rendered stores are consistent.\n      // TODO: It's possible that even a concurrent render may never have yielded\n      // to the main thread, if it was fast enough, or if it expired. We could\n      // skip the consistency check in that case, too.\n      var renderWasConcurrent = !includesBlockingLane(root, lanes);\n      var finishedWork = root.current.alternate;\n\n      if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {\n        // A store was mutated in an interleaved event. Render again,\n        // synchronously, to block further mutations.\n        exitStatus = renderRootSync(root, lanes); // We need to check again if something threw\n\n        if (exitStatus === RootErrored) {\n          var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n          if (_errorRetryLanes !== NoLanes) {\n            lanes = _errorRetryLanes;\n            exitStatus = recoverFromConcurrentError(root, _errorRetryLanes); // We assume the tree is now consistent because we didn't yield to any\n            // concurrent events.\n          }\n        }\n\n        if (exitStatus === RootFatalErrored) {\n          var _fatalError = workInProgressRootFatalError;\n          prepareFreshStack(root, NoLanes);\n          markRootSuspended$1(root, lanes);\n          ensureRootIsScheduled(root, now());\n          throw _fatalError;\n        }\n      } // We now have a consistent tree. The next step is either to commit it,\n      // or, if something suspended, wait to commit it after a timeout.\n\n\n      root.finishedWork = finishedWork;\n      root.finishedLanes = lanes;\n      finishConcurrentRender(root, exitStatus, lanes);\n    }\n  }\n\n  ensureRootIsScheduled(root, now());\n\n  if (root.callbackNode === originalCallbackNode) {\n    // The task node scheduled for this root is the same one that's\n    // currently executed. Need to return a continuation.\n    return performConcurrentWorkOnRoot.bind(null, root);\n  }\n\n  return null;\n}\n\nfunction recoverFromConcurrentError(root, errorRetryLanes) {\n  // If an error occurred during hydration, discard server response and fall\n  // back to client side render.\n  // Before rendering again, save the errors from the previous attempt.\n  var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;\n\n  if (isRootDehydrated(root)) {\n    // The shell failed to hydrate. Set a flag to force a client rendering\n    // during the next attempt. To do this, we call prepareFreshStack now\n    // to create the root work-in-progress fiber. This is a bit weird in terms\n    // of factoring, because it relies on renderRootSync not calling\n    // prepareFreshStack again in the call below, which happens because the\n    // root and lanes haven't changed.\n    //\n    // TODO: I think what we should do is set ForceClientRender inside\n    // throwException, like we do for nested Suspense boundaries. The reason\n    // it's here instead is so we can switch to the synchronous work loop, too.\n    // Something to consider for a future refactor.\n    var rootWorkInProgress = prepareFreshStack(root, errorRetryLanes);\n    rootWorkInProgress.flags |= ForceClientRender;\n\n    {\n      errorHydratingContainer(root.containerInfo);\n    }\n  }\n\n  var exitStatus = renderRootSync(root, errorRetryLanes);\n\n  if (exitStatus !== RootErrored) {\n    // Successfully finished rendering on retry\n    // The errors from the failed first attempt have been recovered. Add\n    // them to the collection of recoverable errors. We'll log them in the\n    // commit phase.\n    var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;\n    workInProgressRootRecoverableErrors = errorsFromFirstAttempt; // The errors from the second attempt should be queued after the errors\n    // from the first attempt, to preserve the causal sequence.\n\n    if (errorsFromSecondAttempt !== null) {\n      queueRecoverableErrors(errorsFromSecondAttempt);\n    }\n  }\n\n  return exitStatus;\n}\n\nfunction queueRecoverableErrors(errors) {\n  if (workInProgressRootRecoverableErrors === null) {\n    workInProgressRootRecoverableErrors = errors;\n  } else {\n    workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors);\n  }\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n  switch (exitStatus) {\n    case RootInProgress:\n    case RootFatalErrored:\n      {\n        throw new Error('Root did not complete. This is a bug in React.');\n      }\n    // Flow knows about invariant, so it complains if I add a break\n    // statement, but eslint doesn't know about invariant, so it complains\n    // if I do. eslint-disable-next-line no-fallthrough\n\n    case RootErrored:\n      {\n        // We should have already attempted to retry this tree. If we reached\n        // this point, it errored again. Commit it.\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootSuspended:\n      {\n        markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n        // should immediately commit it or wait a bit.\n\n        if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n        !shouldForceFlushFallbacksInDEV()) {\n          // This render only included retries, no updates. Throttle committing\n          // retries so that we don't show too many loading states too quickly.\n          var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n          if (msUntilTimeout > 10) {\n            var nextLanes = getNextLanes(root, NoLanes);\n\n            if (nextLanes !== NoLanes) {\n              // There's additional work on this root.\n              break;\n            }\n\n            var suspendedLanes = root.suspendedLanes;\n\n            if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n              // We should prefer to render the fallback of at the last\n              // suspended level. Ping the last suspended level to try\n              // rendering it again.\n              // FIXME: What if the suspended lanes are Idle? Should not restart.\n              var eventTime = requestEventTime();\n              markRootPinged(root, suspendedLanes);\n              break;\n            } // The render is suspended, it hasn't timed out, and there's no\n            // lower priority work to do. Instead of committing the fallback\n            // immediately, wait for more data to arrive.\n\n\n            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);\n            break;\n          }\n        } // The work expired. Commit immediately.\n\n\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootSuspendedWithDelay:\n      {\n        markRootSuspended$1(root, lanes);\n\n        if (includesOnlyTransitions(lanes)) {\n          // This is a transition, so we should exit without committing a\n          // placeholder and without scheduling a timeout. Delay indefinitely\n          // until we receive more data.\n          break;\n        }\n\n        if (!shouldForceFlushFallbacksInDEV()) {\n          // This is not a transition, but we did trigger an avoided state.\n          // Schedule a placeholder to display after a short delay, using the Just\n          // Noticeable Difference.\n          // TODO: Is the JND optimization worth the added complexity? If this is\n          // the only reason we track the event time, then probably not.\n          // Consider removing.\n          var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n          var eventTimeMs = mostRecentEventTime;\n          var timeElapsedMs = now() - eventTimeMs;\n\n          var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n          if (_msUntilTimeout > 10) {\n            // Instead of committing the fallback immediately, wait for more data\n            // to arrive.\n            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);\n            break;\n          }\n        } // Commit the placeholder.\n\n\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    case RootCompleted:\n      {\n        // The work completed. Ready to commit.\n        commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions);\n        break;\n      }\n\n    default:\n      {\n        throw new Error('Unknown root exit status.');\n      }\n  }\n}\n\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n  // Search the rendered tree for external store reads, and check whether the\n  // stores were mutated in a concurrent event. Intentionally using an iterative\n  // loop instead of recursion so we can exit early.\n  var node = finishedWork;\n\n  while (true) {\n    if (node.flags & StoreConsistency) {\n      var updateQueue = node.updateQueue;\n\n      if (updateQueue !== null) {\n        var checks = updateQueue.stores;\n\n        if (checks !== null) {\n          for (var i = 0; i < checks.length; i++) {\n            var check = checks[i];\n            var getSnapshot = check.getSnapshot;\n            var renderedValue = check.value;\n\n            try {\n              if (!objectIs(getSnapshot(), renderedValue)) {\n                // Found an inconsistent store.\n                return false;\n              }\n            } catch (error) {\n              // If `getSnapshot` throws, return `false`. This will schedule\n              // a re-render, and the error will be rethrown during render.\n              return false;\n            }\n          }\n        }\n      }\n    }\n\n    var child = node.child;\n\n    if (node.subtreeFlags & StoreConsistency && child !== null) {\n      child.return = node;\n      node = child;\n      continue;\n    }\n\n    if (node === finishedWork) {\n      return true;\n    }\n\n    while (node.sibling === null) {\n      if (node.return === null || node.return === finishedWork) {\n        return true;\n      }\n\n      node = node.return;\n    }\n\n    node.sibling.return = node.return;\n    node = node.sibling;\n  } // Flow doesn't know this is unreachable, but eslint does\n  // eslint-disable-next-line no-unreachable\n\n\n  return true;\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n  // When suspending, we should always exclude lanes that were pinged or (more\n  // rarely, since we try to avoid it) updated during the render phase.\n  // TODO: Lol maybe there's a better way to factor this besides this\n  // obnoxiously named function :)\n  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);\n  markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n  {\n    syncNestedUpdateFlag();\n  }\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  }\n\n  flushPassiveEffects();\n  var lanes = getNextLanes(root, NoLanes);\n\n  if (!includesSomeLane(lanes, SyncLane)) {\n    // There's no remaining sync work left.\n    ensureRootIsScheduled(root, now());\n    return null;\n  }\n\n  var exitStatus = renderRootSync(root, lanes);\n\n  if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n    // If something threw an error, try rendering one more time. We'll render\n    // synchronously to block concurrent data mutations, and we'll includes\n    // all pending updates are included. If it still fails after the second\n    // attempt, we'll give up and commit the resulting tree.\n    var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root);\n\n    if (errorRetryLanes !== NoLanes) {\n      lanes = errorRetryLanes;\n      exitStatus = recoverFromConcurrentError(root, errorRetryLanes);\n    }\n  }\n\n  if (exitStatus === RootFatalErrored) {\n    var fatalError = workInProgressRootFatalError;\n    prepareFreshStack(root, NoLanes);\n    markRootSuspended$1(root, lanes);\n    ensureRootIsScheduled(root, now());\n    throw fatalError;\n  }\n\n  if (exitStatus === RootDidNotComplete) {\n    throw new Error('Root did not complete. This is a bug in React.');\n  } // We now have a consistent tree. Because this is a sync render, we\n  // will commit it even if something suspended.\n\n\n  var finishedWork = root.current.alternate;\n  root.finishedWork = finishedWork;\n  root.finishedLanes = lanes;\n  commitRoot(root, workInProgressRootRecoverableErrors, workInProgressTransitions); // Before exiting, make sure there's a callback scheduled for the next\n  // pending level.\n\n  ensureRootIsScheduled(root, now());\n  return null;\n}\n\nfunction flushRoot(root, lanes) {\n  if (lanes !== NoLanes) {\n    markRootEntangled(root, mergeLanes(lanes, SyncLane));\n    ensureRootIsScheduled(root, now());\n\n    if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n      resetRenderTimer();\n      flushSyncCallbacks();\n    }\n  }\n}\nfunction batchedUpdates$1(fn, a) {\n  var prevExecutionContext = executionContext;\n  executionContext |= BatchedContext;\n\n  try {\n    return fn(a);\n  } finally {\n    executionContext = prevExecutionContext; // If there were legacy sync updates, flush them at the end of the outer\n    // most batchedUpdates-like method.\n\n    if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.\n    !( ReactCurrentActQueue$1.isBatchingLegacy)) {\n      resetRenderTimer();\n      flushSyncCallbacksOnlyInLegacyMode();\n    }\n  }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n  var previousPriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    return fn(a, b, c, d);\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n\n    if (executionContext === NoContext) {\n      resetRenderTimer();\n    }\n  }\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync(fn) {\n  // In legacy mode, we flush pending passive effects at the beginning of the\n  // next event, not at the end of the previous one.\n  if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {\n    flushPassiveEffects();\n  }\n\n  var prevExecutionContext = executionContext;\n  executionContext |= BatchedContext;\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n  var previousPriority = getCurrentUpdatePriority();\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n\n    if (fn) {\n      return fn();\n    } else {\n      return undefined;\n    }\n  } finally {\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n    executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n    // Note that this will happen even if batchedUpdates is higher up\n    // the stack.\n\n    if ((executionContext & (RenderContext | CommitContext)) === NoContext) {\n      flushSyncCallbacks();\n    }\n  }\n}\nfunction isAlreadyRendering() {\n  // Used by the renderer to print a warning if certain APIs are called from\n  // the wrong context.\n  return  (executionContext & (RenderContext | CommitContext)) !== NoContext;\n}\nfunction pushRenderLanes(fiber, lanes) {\n  push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n  subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n  workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n  subtreeRenderLanes = subtreeRenderLanesCursor.current;\n  pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n  root.finishedWork = null;\n  root.finishedLanes = NoLanes;\n  var timeoutHandle = root.timeoutHandle;\n\n  if (timeoutHandle !== noTimeout) {\n    // The root previous suspended and scheduled a timeout to commit a fallback\n    // state. Now that we have additional work, cancel the timeout.\n    root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n    cancelTimeout(timeoutHandle);\n  }\n\n  if (workInProgress !== null) {\n    var interruptedWork = workInProgress.return;\n\n    while (interruptedWork !== null) {\n      var current = interruptedWork.alternate;\n      unwindInterruptedWork(current, interruptedWork);\n      interruptedWork = interruptedWork.return;\n    }\n  }\n\n  workInProgressRoot = root;\n  var rootWorkInProgress = createWorkInProgress(root.current, null);\n  workInProgress = rootWorkInProgress;\n  workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n  workInProgressRootExitStatus = RootInProgress;\n  workInProgressRootFatalError = null;\n  workInProgressRootSkippedLanes = NoLanes;\n  workInProgressRootInterleavedUpdatedLanes = NoLanes;\n  workInProgressRootPingedLanes = NoLanes;\n  workInProgressRootConcurrentErrors = null;\n  workInProgressRootRecoverableErrors = null;\n  finishQueueingConcurrentUpdates();\n\n  {\n    ReactStrictModeWarnings.discardPendingWarnings();\n  }\n\n  return rootWorkInProgress;\n}\n\nfunction handleError(root, thrownValue) {\n  do {\n    var erroredWork = workInProgress;\n\n    try {\n      // Reset module-level state that was set during the render phase.\n      resetContextDependencies();\n      resetHooksAfterThrow();\n      resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n      // separate issue. Write a regression test using string refs.\n\n      ReactCurrentOwner$2.current = null;\n\n      if (erroredWork === null || erroredWork.return === null) {\n        // Expected to be working on a non-root fiber. This is a fatal error\n        // because there's no ancestor that can handle it; the root is\n        // supposed to capture all errors that weren't caught by an error\n        // boundary.\n        workInProgressRootExitStatus = RootFatalErrored;\n        workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n        // sibling, or the parent if there are no siblings. But since the root\n        // has no siblings nor a parent, we set it to null. Usually this is\n        // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n        // intentionally not calling those, we need set it here.\n        // TODO: Consider calling `unwindWork` to pop the contexts.\n\n        workInProgress = null;\n        return;\n      }\n\n      if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n        // Record the time spent rendering before an error was thrown. This\n        // avoids inaccurate Profiler durations in the case of a\n        // suspended render.\n        stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n      }\n\n      if (enableSchedulingProfiler) {\n        markComponentRenderStopped();\n\n        if (thrownValue !== null && typeof thrownValue === 'object' && typeof thrownValue.then === 'function') {\n          var wakeable = thrownValue;\n          markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);\n        } else {\n          markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);\n        }\n      }\n\n      throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n      completeUnitOfWork(erroredWork);\n    } catch (yetAnotherThrownValue) {\n      // Something in the return path also threw.\n      thrownValue = yetAnotherThrownValue;\n\n      if (workInProgress === erroredWork && erroredWork !== null) {\n        // If this boundary has already errored, then we had trouble processing\n        // the error. Bubble it to the next boundary.\n        erroredWork = erroredWork.return;\n        workInProgress = erroredWork;\n      } else {\n        erroredWork = workInProgress;\n      }\n\n      continue;\n    } // Return to the normal work loop.\n\n\n    return;\n  } while (true);\n}\n\nfunction pushDispatcher() {\n  var prevDispatcher = ReactCurrentDispatcher$2.current;\n  ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n  if (prevDispatcher === null) {\n    // The React isomorphic package does not include a default dispatcher.\n    // Instead the first renderer will lazily attach one, in order to give\n    // nicer error messages.\n    return ContextOnlyDispatcher;\n  } else {\n    return prevDispatcher;\n  }\n}\n\nfunction popDispatcher(prevDispatcher) {\n  ReactCurrentDispatcher$2.current = prevDispatcher;\n}\n\nfunction markCommitTimeOfFallback() {\n  globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n  workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n  if (workInProgressRootExitStatus === RootInProgress) {\n    workInProgressRootExitStatus = RootSuspended;\n  }\n}\nfunction renderDidSuspendDelayIfPossible() {\n  if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {\n    workInProgressRootExitStatus = RootSuspendedWithDelay;\n  } // Check if there are updates that we skipped tree that might have unblocked\n  // this render.\n\n\n  if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {\n    // Mark the current render as suspended so that we switch to working on\n    // the updates that were skipped. Usually we only suspend at the end of\n    // the render phase.\n    // TODO: We should probably always mark the root as suspended immediately\n    // (inside this function), since by suspending at the end of the render\n    // phase introduces a potential mistake where we suspend lanes that were\n    // pinged or updated while we were rendering.\n    markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n  }\n}\nfunction renderDidError(error) {\n  if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {\n    workInProgressRootExitStatus = RootErrored;\n  }\n\n  if (workInProgressRootConcurrentErrors === null) {\n    workInProgressRootConcurrentErrors = [error];\n  } else {\n    workInProgressRootConcurrentErrors.push(error);\n  }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n  // If something errored or completed, we can't really be sure,\n  // so those are false.\n  return workInProgressRootExitStatus === RootInProgress;\n}\n\nfunction renderRootSync(root, lanes) {\n  var prevExecutionContext = executionContext;\n  executionContext |= RenderContext;\n  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n  // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n    {\n      if (isDevToolsPresent) {\n        var memoizedUpdaters = root.memoizedUpdaters;\n\n        if (memoizedUpdaters.size > 0) {\n          restorePendingUpdaters(root, workInProgressRootRenderLanes);\n          memoizedUpdaters.clear();\n        } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n        // If we bailout on this work, we'll move them back (like above).\n        // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n        // That way we can keep the current update and future updates separate.\n\n\n        movePendingFibersToMemoized(root, lanes);\n      }\n    }\n\n    workInProgressTransitions = getTransitionsForLanes();\n    prepareFreshStack(root, lanes);\n  }\n\n  {\n    markRenderStarted(lanes);\n  }\n\n  do {\n    try {\n      workLoopSync();\n      break;\n    } catch (thrownValue) {\n      handleError(root, thrownValue);\n    }\n  } while (true);\n\n  resetContextDependencies();\n  executionContext = prevExecutionContext;\n  popDispatcher(prevDispatcher);\n\n  if (workInProgress !== null) {\n    // This is a sync render, so we should have finished the whole tree.\n    throw new Error('Cannot commit an incomplete root. This error is likely caused by a ' + 'bug in React. Please file an issue.');\n  }\n\n  {\n    markRenderStopped();\n  } // Set this to null to indicate there's no in-progress render.\n\n\n  workInProgressRoot = null;\n  workInProgressRootRenderLanes = NoLanes;\n  return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n  // Already timed out, so perform work without checking if we need to yield.\n  while (workInProgress !== null) {\n    performUnitOfWork(workInProgress);\n  }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n  var prevExecutionContext = executionContext;\n  executionContext |= RenderContext;\n  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n  // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n    {\n      if (isDevToolsPresent) {\n        var memoizedUpdaters = root.memoizedUpdaters;\n\n        if (memoizedUpdaters.size > 0) {\n          restorePendingUpdaters(root, workInProgressRootRenderLanes);\n          memoizedUpdaters.clear();\n        } // At this point, move Fibers that scheduled the upcoming work from the Map to the Set.\n        // If we bailout on this work, we'll move them back (like above).\n        // It's important to move them now in case the work spawns more work at the same priority with different updaters.\n        // That way we can keep the current update and future updates separate.\n\n\n        movePendingFibersToMemoized(root, lanes);\n      }\n    }\n\n    workInProgressTransitions = getTransitionsForLanes();\n    resetRenderTimer();\n    prepareFreshStack(root, lanes);\n  }\n\n  {\n    markRenderStarted(lanes);\n  }\n\n  do {\n    try {\n      workLoopConcurrent();\n      break;\n    } catch (thrownValue) {\n      handleError(root, thrownValue);\n    }\n  } while (true);\n\n  resetContextDependencies();\n  popDispatcher(prevDispatcher);\n  executionContext = prevExecutionContext;\n\n\n  if (workInProgress !== null) {\n    // Still work remaining.\n    {\n      markRenderYielded();\n    }\n\n    return RootInProgress;\n  } else {\n    // Completed the tree.\n    {\n      markRenderStopped();\n    } // Set this to null to indicate there's no in-progress render.\n\n\n    workInProgressRoot = null;\n    workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n    return workInProgressRootExitStatus;\n  }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n  // Perform work until Scheduler asks us to yield\n  while (workInProgress !== null && !shouldYield()) {\n    performUnitOfWork(workInProgress);\n  }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n  // The current, flushed, state of this fiber is the alternate. Ideally\n  // nothing should rely on this, but relying on it here means that we don't\n  // need an additional field on the work in progress.\n  var current = unitOfWork.alternate;\n  setCurrentFiber(unitOfWork);\n  var next;\n\n  if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n    startProfilerTimer(unitOfWork);\n    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n  } else {\n    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n  }\n\n  resetCurrentFiber();\n  unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n  if (next === null) {\n    // If this doesn't spawn new work, complete the current work.\n    completeUnitOfWork(unitOfWork);\n  } else {\n    workInProgress = next;\n  }\n\n  ReactCurrentOwner$2.current = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n  // Attempt to complete the current unit of work, then move to the next\n  // sibling. If there are no more siblings, return to the parent fiber.\n  var completedWork = unitOfWork;\n\n  do {\n    // The current, flushed, state of this fiber is the alternate. Ideally\n    // nothing should rely on this, but relying on it here means that we don't\n    // need an additional field on the work in progress.\n    var current = completedWork.alternate;\n    var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n    if ((completedWork.flags & Incomplete) === NoFlags) {\n      setCurrentFiber(completedWork);\n      var next = void 0;\n\n      if ( (completedWork.mode & ProfileMode) === NoMode) {\n        next = completeWork(current, completedWork, subtreeRenderLanes);\n      } else {\n        startProfilerTimer(completedWork);\n        next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n      }\n\n      resetCurrentFiber();\n\n      if (next !== null) {\n        // Completing this fiber spawned new work. Work on that next.\n        workInProgress = next;\n        return;\n      }\n    } else {\n      // This fiber did not complete because something threw. Pop values off\n      // the stack without entering the complete phase. If this is a boundary,\n      // capture values if possible.\n      var _next = unwindWork(current, completedWork); // Because this fiber did not complete, don't reset its lanes.\n\n\n      if (_next !== null) {\n        // If completing this work spawned new work, do that next. We'll come\n        // back here again.\n        // Since we're restarting, remove anything that is not a host effect\n        // from the effect tag.\n        _next.flags &= HostEffectMask;\n        workInProgress = _next;\n        return;\n      }\n\n      if ( (completedWork.mode & ProfileMode) !== NoMode) {\n        // Record the render duration for the fiber that errored.\n        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n        var actualDuration = completedWork.actualDuration;\n        var child = completedWork.child;\n\n        while (child !== null) {\n          actualDuration += child.actualDuration;\n          child = child.sibling;\n        }\n\n        completedWork.actualDuration = actualDuration;\n      }\n\n      if (returnFiber !== null) {\n        // Mark the parent fiber as incomplete and clear its subtree flags.\n        returnFiber.flags |= Incomplete;\n        returnFiber.subtreeFlags = NoFlags;\n        returnFiber.deletions = null;\n      } else {\n        // We've unwound all the way to the root.\n        workInProgressRootExitStatus = RootDidNotComplete;\n        workInProgress = null;\n        return;\n      }\n    }\n\n    var siblingFiber = completedWork.sibling;\n\n    if (siblingFiber !== null) {\n      // If there is more work to do in this returnFiber, do that next.\n      workInProgress = siblingFiber;\n      return;\n    } // Otherwise, return to the parent\n\n\n    completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n    workInProgress = completedWork;\n  } while (completedWork !== null); // We've reached the root.\n\n\n  if (workInProgressRootExitStatus === RootInProgress) {\n    workInProgressRootExitStatus = RootCompleted;\n  }\n}\n\nfunction commitRoot(root, recoverableErrors, transitions) {\n  // TODO: This no longer makes any sense. We already wrap the mutation and\n  // layout phases. Should be able to remove.\n  var previousUpdateLanePriority = getCurrentUpdatePriority();\n  var prevTransition = ReactCurrentBatchConfig$3.transition;\n\n  try {\n    ReactCurrentBatchConfig$3.transition = null;\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    commitRootImpl(root, recoverableErrors, transitions, previousUpdateLanePriority);\n  } finally {\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n    setCurrentUpdatePriority(previousUpdateLanePriority);\n  }\n\n  return null;\n}\n\nfunction commitRootImpl(root, recoverableErrors, transitions, renderPriorityLevel) {\n  do {\n    // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n    // means `flushPassiveEffects` will sometimes result in additional\n    // passive effects. So we need to keep flushing in a loop until there are\n    // no more pending effects.\n    // TODO: Might be better if `flushPassiveEffects` did not automatically\n    // flush synchronous work at the end, to avoid factoring hazards like this.\n    flushPassiveEffects();\n  } while (rootWithPendingPassiveEffects !== null);\n\n  flushRenderPhaseStrictModeWarningsInDEV();\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Should not already be working.');\n  }\n\n  var finishedWork = root.finishedWork;\n  var lanes = root.finishedLanes;\n\n  {\n    markCommitStarted(lanes);\n  }\n\n  if (finishedWork === null) {\n\n    {\n      markCommitStopped();\n    }\n\n    return null;\n  } else {\n    {\n      if (lanes === NoLanes) {\n        error('root.finishedLanes should not be empty during a commit. This is a ' + 'bug in React.');\n      }\n    }\n  }\n\n  root.finishedWork = null;\n  root.finishedLanes = NoLanes;\n\n  if (finishedWork === root.current) {\n    throw new Error('Cannot commit the same tree as before. This error is likely caused by ' + 'a bug in React. Please file an issue.');\n  } // commitRoot never returns a continuation; it always finishes synchronously.\n  // So we can clear these now to allow a new callback to be scheduled.\n\n\n  root.callbackNode = null;\n  root.callbackPriority = NoLane; // Update the first and last pending times on this root. The new first\n  // pending time is whatever is left on the root fiber.\n\n  var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n  markRootFinished(root, remainingLanes);\n\n  if (root === workInProgressRoot) {\n    // We can reset these now that they are finished.\n    workInProgressRoot = null;\n    workInProgress = null;\n    workInProgressRootRenderLanes = NoLanes;\n  } // If there are pending passive effects, schedule a callback to process them.\n  // Do this as early as possible, so it is queued before anything else that\n  // might get scheduled in the commit phase. (See #16714.)\n  // TODO: Delete all other places that schedule the passive effect callback\n  // They're redundant.\n\n\n  if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {\n    if (!rootDoesHavePassiveEffects) {\n      rootDoesHavePassiveEffects = true;\n      // to store it in pendingPassiveTransitions until they get processed\n      // We need to pass this through as an argument to commitRoot\n      // because workInProgressTransitions might have changed between\n      // the previous render and commit if we throttle the commit\n      // with setTimeout\n\n      pendingPassiveTransitions = transitions;\n      scheduleCallback$1(NormalPriority, function () {\n        flushPassiveEffects(); // This render triggered passive effects: release the root cache pool\n        // *after* passive effects fire to avoid freeing a cache pool that may\n        // be referenced by a node in the tree (HostRoot, Cache boundary etc)\n\n        return null;\n      });\n    }\n  } // Check if there are any effects in the whole tree.\n  // TODO: This is left over from the effect list implementation, where we had\n  // to check for the existence of `firstEffect` to satisfy Flow. I think the\n  // only other reason this optimization exists is because it affects profiling.\n  // Reconsider whether this is necessary.\n\n\n  var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n  var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;\n\n  if (subtreeHasEffects || rootHasEffect) {\n    var prevTransition = ReactCurrentBatchConfig$3.transition;\n    ReactCurrentBatchConfig$3.transition = null;\n    var previousPriority = getCurrentUpdatePriority();\n    setCurrentUpdatePriority(DiscreteEventPriority);\n    var prevExecutionContext = executionContext;\n    executionContext |= CommitContext; // Reset this to null before calling lifecycles\n\n    ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n    // of the effect list for each phase: all mutation effects come before all\n    // layout effects, and so on.\n    // The first phase a \"before mutation\" phase. We use this phase to read the\n    // state of the host tree right before we mutate it. This is where\n    // getSnapshotBeforeUpdate is called.\n\n    var shouldFireAfterActiveInstanceBlur = commitBeforeMutationEffects(root, finishedWork);\n\n    {\n      // Mark the current commit time to be shared by all Profilers in this\n      // batch. This enables them to be grouped later.\n      recordCommitTime();\n    }\n\n\n    commitMutationEffects(root, finishedWork, lanes);\n\n    resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n    // the mutation phase, so that the previous tree is still current during\n    // componentWillUnmount, but before the layout phase, so that the finished\n    // work is current during componentDidMount/Update.\n\n    root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n\n    {\n      markLayoutEffectsStarted(lanes);\n    }\n\n    commitLayoutEffects(finishedWork, root, lanes);\n\n    {\n      markLayoutEffectsStopped();\n    }\n    // opportunity to paint.\n\n\n    requestPaint();\n    executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value.\n\n    setCurrentUpdatePriority(previousPriority);\n    ReactCurrentBatchConfig$3.transition = prevTransition;\n  } else {\n    // No effects.\n    root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n    // no effects.\n    // TODO: Maybe there's a better way to report this.\n\n    {\n      recordCommitTime();\n    }\n  }\n\n  var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n  if (rootDoesHavePassiveEffects) {\n    // This commit has passive effects. Stash a reference to them. But don't\n    // schedule a callback until after flushing layout work.\n    rootDoesHavePassiveEffects = false;\n    rootWithPendingPassiveEffects = root;\n    pendingPassiveEffectsLanes = lanes;\n  } else {\n\n    {\n      nestedPassiveUpdateCount = 0;\n      rootWithPassiveNestedUpdates = null;\n    }\n  } // Read this again, since an effect might have updated it\n\n\n  remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n  // TODO: This is part of the `componentDidCatch` implementation. Its purpose\n  // is to detect whether something might have called setState inside\n  // `componentDidCatch`. The mechanism is known to be flawed because `setState`\n  // inside `componentDidCatch` is itself flawed — that's why we recommend\n  // `getDerivedStateFromError` instead. However, it could be improved by\n  // checking if remainingLanes includes Sync work, instead of whether there's\n  // any work remaining at all (which would also include stuff like Suspense\n  // retries or transitions). It's been like this for a while, though, so fixing\n  // it probably isn't that urgent.\n\n  if (remainingLanes === NoLanes) {\n    // If there's no remaining work, we can clear the set of already failed\n    // error boundaries.\n    legacyErrorBoundariesThatAlreadyFailed = null;\n  }\n\n  {\n    if (!rootDidHavePassiveEffects) {\n      commitDoubleInvokeEffectsInDEV(root.current, false);\n    }\n  }\n\n  onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n  {\n    if (isDevToolsPresent) {\n      root.memoizedUpdaters.clear();\n    }\n  }\n\n  {\n    onCommitRoot$1();\n  } // Always call this before exiting `commitRoot`, to ensure that any\n  // additional work on this root is scheduled.\n\n\n  ensureRootIsScheduled(root, now());\n\n  if (recoverableErrors !== null) {\n    // There were errors during this render, but recovered from them without\n    // needing to surface it to the UI. We log them here.\n    var onRecoverableError = root.onRecoverableError;\n\n    for (var i = 0; i < recoverableErrors.length; i++) {\n      var recoverableError = recoverableErrors[i];\n      var componentStack = recoverableError.stack;\n      var digest = recoverableError.digest;\n      onRecoverableError(recoverableError.value, {\n        componentStack: componentStack,\n        digest: digest\n      });\n    }\n  }\n\n  if (hasUncaughtError) {\n    hasUncaughtError = false;\n    var error$1 = firstUncaughtError;\n    firstUncaughtError = null;\n    throw error$1;\n  } // If the passive effects are the result of a discrete render, flush them\n  // synchronously at the end of the current task so that the result is\n  // immediately observable. Otherwise, we assume that they are not\n  // order-dependent and do not need to be observed by external systems, so we\n  // can wait until after paint.\n  // TODO: We can optimize this by not scheduling the callback earlier. Since we\n  // currently schedule the callback in multiple places, will wait until those\n  // are consolidated.\n\n\n  if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root.tag !== LegacyRoot) {\n    flushPassiveEffects();\n  } // Read this again, since a passive effect might have updated it\n\n\n  remainingLanes = root.pendingLanes;\n\n  if (includesSomeLane(remainingLanes, SyncLane)) {\n    {\n      markNestedUpdateScheduled();\n    } // Count the number of times the root synchronously re-renders without\n    // finishing. If there are too many, it indicates an infinite update loop.\n\n\n    if (root === rootWithNestedUpdates) {\n      nestedUpdateCount++;\n    } else {\n      nestedUpdateCount = 0;\n      rootWithNestedUpdates = root;\n    }\n  } else {\n    nestedUpdateCount = 0;\n  } // If layout work was scheduled, flush it now.\n\n\n  flushSyncCallbacks();\n\n  {\n    markCommitStopped();\n  }\n\n  return null;\n}\n\nfunction flushPassiveEffects() {\n  // Returns whether passive effects were flushed.\n  // TODO: Combine this check with the one in flushPassiveEFfectsImpl. We should\n  // probably just combine the two functions. I believe they were only separate\n  // in the first place because we used to wrap it with\n  // `Scheduler.runWithPriority`, which accepts a function. But now we track the\n  // priority within React itself, so we can mutate the variable directly.\n  if (rootWithPendingPassiveEffects !== null) {\n    var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);\n    var priority = lowerEventPriority(DefaultEventPriority, renderPriority);\n    var prevTransition = ReactCurrentBatchConfig$3.transition;\n    var previousPriority = getCurrentUpdatePriority();\n\n    try {\n      ReactCurrentBatchConfig$3.transition = null;\n      setCurrentUpdatePriority(priority);\n      return flushPassiveEffectsImpl();\n    } finally {\n      setCurrentUpdatePriority(previousPriority);\n      ReactCurrentBatchConfig$3.transition = prevTransition; // Once passive effects have run for the tree - giving components a\n    }\n  }\n\n  return false;\n}\nfunction enqueuePendingPassiveProfilerEffect(fiber) {\n  {\n    pendingPassiveProfilerEffects.push(fiber);\n\n    if (!rootDoesHavePassiveEffects) {\n      rootDoesHavePassiveEffects = true;\n      scheduleCallback$1(NormalPriority, function () {\n        flushPassiveEffects();\n        return null;\n      });\n    }\n  }\n}\n\nfunction flushPassiveEffectsImpl() {\n  if (rootWithPendingPassiveEffects === null) {\n    return false;\n  } // Cache and clear the transitions flag\n\n\n  var transitions = pendingPassiveTransitions;\n  pendingPassiveTransitions = null;\n  var root = rootWithPendingPassiveEffects;\n  var lanes = pendingPassiveEffectsLanes;\n  rootWithPendingPassiveEffects = null; // TODO: This is sometimes out of sync with rootWithPendingPassiveEffects.\n  // Figure out why and fix it. It's not causing any known issues (probably\n  // because it's only used for profiling), but it's a refactor hazard.\n\n  pendingPassiveEffectsLanes = NoLanes;\n\n  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n    throw new Error('Cannot flush passive effects while already rendering.');\n  }\n\n  {\n    isFlushingPassiveEffects = true;\n    didScheduleUpdateDuringPassiveEffects = false;\n  }\n\n  {\n    markPassiveEffectsStarted(lanes);\n  }\n\n  var prevExecutionContext = executionContext;\n  executionContext |= CommitContext;\n  commitPassiveUnmountEffects(root.current);\n  commitPassiveMountEffects(root, root.current, lanes, transitions); // TODO: Move to commitPassiveMountEffects\n\n  {\n    var profilerEffects = pendingPassiveProfilerEffects;\n    pendingPassiveProfilerEffects = [];\n\n    for (var i = 0; i < profilerEffects.length; i++) {\n      var _fiber = profilerEffects[i];\n      commitPassiveEffectDurations(root, _fiber);\n    }\n  }\n\n  {\n    markPassiveEffectsStopped();\n  }\n\n  {\n    commitDoubleInvokeEffectsInDEV(root.current, true);\n  }\n\n  executionContext = prevExecutionContext;\n  flushSyncCallbacks();\n\n  {\n    // If additional passive effects were scheduled, increment a counter. If this\n    // exceeds the limit, we'll fire a warning.\n    if (didScheduleUpdateDuringPassiveEffects) {\n      if (root === rootWithPassiveNestedUpdates) {\n        nestedPassiveUpdateCount++;\n      } else {\n        nestedPassiveUpdateCount = 0;\n        rootWithPassiveNestedUpdates = root;\n      }\n    } else {\n      nestedPassiveUpdateCount = 0;\n    }\n\n    isFlushingPassiveEffects = false;\n    didScheduleUpdateDuringPassiveEffects = false;\n  } // TODO: Move to commitPassiveMountEffects\n\n\n  onPostCommitRoot(root);\n\n  {\n    var stateNode = root.current.stateNode;\n    stateNode.effectDuration = 0;\n    stateNode.passiveEffectDuration = 0;\n  }\n\n  return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n  return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n  if (legacyErrorBoundariesThatAlreadyFailed === null) {\n    legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n  } else {\n    legacyErrorBoundariesThatAlreadyFailed.add(instance);\n  }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n  if (!hasUncaughtError) {\n    hasUncaughtError = true;\n    firstUncaughtError = error;\n  }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n  var errorInfo = createCapturedValueAtFiber(error, sourceFiber);\n  var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n  var root = enqueueUpdate(rootFiber, update, SyncLane);\n  var eventTime = requestEventTime();\n\n  if (root !== null) {\n    markRootUpdated(root, SyncLane, eventTime);\n    ensureRootIsScheduled(root, eventTime);\n  }\n}\n\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {\n  {\n    reportUncaughtErrorInDEV(error$1);\n    setIsRunningInsertionEffect(false);\n  }\n\n  if (sourceFiber.tag === HostRoot) {\n    // Error was thrown at the root. There is no parent, so the root\n    // itself should capture it.\n    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);\n    return;\n  }\n\n  var fiber = null;\n\n  {\n    fiber = nearestMountedAncestor;\n  }\n\n  while (fiber !== null) {\n    if (fiber.tag === HostRoot) {\n      captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);\n      return;\n    } else if (fiber.tag === ClassComponent) {\n      var ctor = fiber.type;\n      var instance = fiber.stateNode;\n\n      if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n        var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);\n        var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n        var root = enqueueUpdate(fiber, update, SyncLane);\n        var eventTime = requestEventTime();\n\n        if (root !== null) {\n          markRootUpdated(root, SyncLane, eventTime);\n          ensureRootIsScheduled(root, eventTime);\n        }\n\n        return;\n      }\n    }\n\n    fiber = fiber.return;\n  }\n\n  {\n    // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning\n    // will fire for errors that are thrown by destroy functions inside deleted\n    // trees. What it should instead do is propagate the error to the parent of\n    // the deleted tree. In the meantime, do not add this warning to the\n    // allowlist; this is only for our internal use.\n    error('Internal React error: Attempted to capture a commit phase error ' + 'inside a detached tree. This indicates a bug in React. Likely ' + 'causes include deleting the same fiber more than once, committing an ' + 'already-finished tree, or an inconsistent return pointer.\\n\\n' + 'Error message:\\n\\n%s', error$1);\n  }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n  var pingCache = root.pingCache;\n\n  if (pingCache !== null) {\n    // The wakeable resolved, so we no longer need to memoize, because it will\n    // never be thrown again.\n    pingCache.delete(wakeable);\n  }\n\n  var eventTime = requestEventTime();\n  markRootPinged(root, pingedLanes);\n  warnIfSuspenseResolutionNotWrappedWithActDEV(root);\n\n  if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n    // Received a ping at the same priority level at which we're currently\n    // rendering. We might want to restart this render. This should mirror\n    // the logic of whether or not a root suspends once it completes.\n    // TODO: If we're rendering sync either due to Sync, Batched or expired,\n    // we should probably never restart.\n    // If we're suspended with delay, or if it's a retry, we'll always suspend\n    // so we can always restart.\n    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n      // Restart from the root.\n      prepareFreshStack(root, NoLanes);\n    } else {\n      // Even though we can't restart right now, we might get an\n      // opportunity later. So we mark this render as having a ping.\n      workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n    }\n  }\n\n  ensureRootIsScheduled(root, eventTime);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n  // The boundary fiber (a Suspense component or SuspenseList component)\n  // previously was rendered in its fallback state. One of the promises that\n  // suspended it has resolved, which means at least part of the tree was\n  // likely unblocked. Try rendering again, at a new lanes.\n  if (retryLane === NoLane) {\n    // TODO: Assign this to `suspenseState.retryLane`? to avoid\n    // unnecessary entanglement?\n    retryLane = requestRetryLane(boundaryFiber);\n  } // TODO: Special case idle priority?\n\n\n  var eventTime = requestEventTime();\n  var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n\n  if (root !== null) {\n    markRootUpdated(root, retryLane, eventTime);\n    ensureRootIsScheduled(root, eventTime);\n  }\n}\n\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n  var suspenseState = boundaryFiber.memoizedState;\n  var retryLane = NoLane;\n\n  if (suspenseState !== null) {\n    retryLane = suspenseState.retryLane;\n  }\n\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n  var retryLane = NoLane; // Default\n\n  var retryCache;\n\n  switch (boundaryFiber.tag) {\n    case SuspenseComponent:\n      retryCache = boundaryFiber.stateNode;\n      var suspenseState = boundaryFiber.memoizedState;\n\n      if (suspenseState !== null) {\n        retryLane = suspenseState.retryLane;\n      }\n\n      break;\n\n    case SuspenseListComponent:\n      retryCache = boundaryFiber.stateNode;\n      break;\n\n    default:\n      throw new Error('Pinged unknown suspense boundary type. ' + 'This is probably a bug in React.');\n  }\n\n  if (retryCache !== null) {\n    // The wakeable resolved, so we no longer need to memoize, because it will\n    // never be thrown again.\n    retryCache.delete(wakeable);\n  }\n\n  retryTimedOutBoundary(boundaryFiber, retryLane);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n  return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction checkForNestedUpdates() {\n  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n    nestedUpdateCount = 0;\n    rootWithNestedUpdates = null;\n    throw new Error('Maximum update depth exceeded. This can happen when a component ' + 'repeatedly calls setState inside componentWillUpdate or ' + 'componentDidUpdate. React limits the number of nested updates to ' + 'prevent infinite loops.');\n  }\n\n  {\n    if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n      nestedPassiveUpdateCount = 0;\n      rootWithPassiveNestedUpdates = null;\n\n      error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n    }\n  }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n  {\n    ReactStrictModeWarnings.flushLegacyContextWarning();\n\n    {\n      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n    }\n  }\n}\n\nfunction commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {\n  {\n    // TODO (StrictEffects) Should we set a marker on the root if it contains strict effects\n    // so we don't traverse unnecessarily? similar to subtreeFlags but just at the root level.\n    // Maybe not a big deal since this is DEV only behavior.\n    setCurrentFiber(fiber);\n    invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);\n\n    if (hasPassiveEffects) {\n      invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);\n    }\n\n    invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);\n\n    if (hasPassiveEffects) {\n      invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);\n    }\n\n    resetCurrentFiber();\n  }\n}\n\nfunction invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {\n  {\n    // We don't need to re-check StrictEffectsMode here.\n    // This function is only called if that check has already passed.\n    var current = firstChild;\n    var subtreeRoot = null;\n\n    while (current !== null) {\n      var primarySubtreeFlag = current.subtreeFlags & fiberFlags;\n\n      if (current !== subtreeRoot && current.child !== null && primarySubtreeFlag !== NoFlags) {\n        current = current.child;\n      } else {\n        if ((current.flags & fiberFlags) !== NoFlags) {\n          invokeEffectFn(current);\n        }\n\n        if (current.sibling !== null) {\n          current = current.sibling;\n        } else {\n          current = subtreeRoot = current.return;\n        }\n      }\n    }\n  }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n  {\n    if ((executionContext & RenderContext) !== NoContext) {\n      // We let the other warning about render phase updates deal with this one.\n      return;\n    }\n\n    if (!(fiber.mode & ConcurrentMode)) {\n      return;\n    }\n\n    var tag = fiber.tag;\n\n    if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {\n      // Only warn for user-defined components, not internal ones like Suspense.\n      return;\n    } // We show the whole stack but dedupe on the top component's name because\n    // the problematic code almost always lies inside that component.\n\n\n    var componentName = getComponentNameFromFiber(fiber) || 'ReactComponent';\n\n    if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n      if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n        return;\n      }\n\n      didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n    } else {\n      didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n    }\n\n    var previousFiber = current;\n\n    try {\n      setCurrentFiber(fiber);\n\n      error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n    } finally {\n      if (previousFiber) {\n        setCurrentFiber(fiber);\n      } else {\n        resetCurrentFiber();\n      }\n    }\n  }\n}\nvar beginWork$1;\n\n{\n  var dummyFiber = null;\n\n  beginWork$1 = function (current, unitOfWork, lanes) {\n    // If a component throws an error, we replay it again in a synchronously\n    // dispatched event, so that the debugger will treat it as an uncaught\n    // error See ReactErrorUtils for more information.\n    // Before entering the begin phase, copy the work-in-progress onto a dummy\n    // fiber. If beginWork throws, we'll use this to reset the state.\n    var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n    try {\n      return beginWork(current, unitOfWork, lanes);\n    } catch (originalError) {\n      if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n        // Don't replay promises.\n        // Don't replay errors if we are hydrating and have already suspended or handled an error\n        throw originalError;\n      } // Keep this code in sync with handleError; any changes here must have\n      // corresponding changes there.\n\n\n      resetContextDependencies();\n      resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n      // same fiber again.\n      // Unwind the failed stack frame\n\n      unwindInterruptedWork(current, unitOfWork); // Restore the original properties of the fiber.\n\n      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n      if ( unitOfWork.mode & ProfileMode) {\n        // Reset the profiler timer.\n        startProfilerTimer(unitOfWork);\n      } // Run beginWork again.\n\n\n      invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n      if (hasCaughtError()) {\n        var replayError = clearCaughtError();\n\n        if (typeof replayError === 'object' && replayError !== null && replayError._suppressLogging && typeof originalError === 'object' && originalError !== null && !originalError._suppressLogging) {\n          // If suppressed, let the flag carry over to the original error which is the one we'll rethrow.\n          originalError._suppressLogging = true;\n        }\n      } // We always throw the original error in case the second render pass is not idempotent.\n      // This can happen if a memoized function or CommonJS module doesn't throw after first invocation.\n\n\n      throw originalError;\n    }\n  };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n  didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n  {\n    if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n      switch (fiber.tag) {\n        case FunctionComponent:\n        case ForwardRef:\n        case SimpleMemoComponent:\n          {\n            var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n            var dedupeKey = renderingComponentName;\n\n            if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n              didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n              var setStateComponentName = getComponentNameFromFiber(fiber) || 'Unknown';\n\n              error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n            }\n\n            break;\n          }\n\n        case ClassComponent:\n          {\n            if (!didWarnAboutUpdateInRender) {\n              error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n              didWarnAboutUpdateInRender = true;\n            }\n\n            break;\n          }\n      }\n    }\n  }\n}\n\nfunction restorePendingUpdaters(root, lanes) {\n  {\n    if (isDevToolsPresent) {\n      var memoizedUpdaters = root.memoizedUpdaters;\n      memoizedUpdaters.forEach(function (schedulingFiber) {\n        addFiberToLanesMap(root, schedulingFiber, lanes);\n      }); // This function intentionally does not clear memoized updaters.\n      // Those may still be relevant to the current commit\n      // and a future one (e.g. Suspense).\n    }\n  }\n}\nvar fakeActCallbackNode = {};\n\nfunction scheduleCallback$1(priorityLevel, callback) {\n  {\n    // If we're currently inside an `act` scope, bypass Scheduler and push to\n    // the `act` queue instead.\n    var actQueue = ReactCurrentActQueue$1.current;\n\n    if (actQueue !== null) {\n      actQueue.push(callback);\n      return fakeActCallbackNode;\n    } else {\n      return scheduleCallback(priorityLevel, callback);\n    }\n  }\n}\n\nfunction cancelCallback$1(callbackNode) {\n  if ( callbackNode === fakeActCallbackNode) {\n    return;\n  } // In production, always call Scheduler. This function will be stripped out.\n\n\n  return cancelCallback(callbackNode);\n}\n\nfunction shouldForceFlushFallbacksInDEV() {\n  // Never force flush in production. This function should get stripped out.\n  return  ReactCurrentActQueue$1.current !== null;\n}\n\nfunction warnIfUpdatesNotWrappedWithActDEV(fiber) {\n  {\n    if (fiber.mode & ConcurrentMode) {\n      if (!isConcurrentActEnvironment()) {\n        // Not in an act environment. No need to warn.\n        return;\n      }\n    } else {\n      // Legacy mode has additional cases where we suppress a warning.\n      if (!isLegacyActEnvironment()) {\n        // Not in an act environment. No need to warn.\n        return;\n      }\n\n      if (executionContext !== NoContext) {\n        // Legacy mode doesn't warn if the update is batched, i.e.\n        // batchedUpdates or flushSync.\n        return;\n      }\n\n      if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {\n        // For backwards compatibility with pre-hooks code, legacy mode only\n        // warns for updates that originate from a hook.\n        return;\n      }\n    }\n\n    if (ReactCurrentActQueue$1.current === null) {\n      var previousFiber = current;\n\n      try {\n        setCurrentFiber(fiber);\n\n        error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + '  /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentNameFromFiber(fiber));\n      } finally {\n        if (previousFiber) {\n          setCurrentFiber(fiber);\n        } else {\n          resetCurrentFiber();\n        }\n      }\n    }\n  }\n}\n\nfunction warnIfSuspenseResolutionNotWrappedWithActDEV(root) {\n  {\n    if (root.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {\n      error('A suspended resource finished loading inside a test, but the event ' + 'was not wrapped in act(...).\\n\\n' + 'When testing, code that resolves suspended data should be wrapped ' + 'into act(...):\\n\\n' + 'act(() => {\\n' + '  /* finish loading suspended data */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act');\n    }\n  }\n}\n\nfunction setIsRunningInsertionEffect(isRunning) {\n  {\n    isRunningInsertionEffect = isRunning;\n  }\n}\n\n/* eslint-disable react-internal/prod-error-codes */\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n  {\n    resolveFamily = handler;\n  }\n};\nfunction resolveFunctionForHotReloading(type) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return type;\n    }\n\n    var family = resolveFamily(type);\n\n    if (family === undefined) {\n      return type;\n    } // Use the latest known implementation.\n\n\n    return family.current;\n  }\n}\nfunction resolveClassForHotReloading(type) {\n  // No implementation differences.\n  return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return type;\n    }\n\n    var family = resolveFamily(type);\n\n    if (family === undefined) {\n      // Check if we're dealing with a real forwardRef. Don't want to crash early.\n      if (type !== null && type !== undefined && typeof type.render === 'function') {\n        // ForwardRef is special because its resolved .type is an object,\n        // but it's possible that we only have its inner render function in the map.\n        // If that inner render function is different, we'll build a new forwardRef type.\n        var currentRender = resolveFunctionForHotReloading(type.render);\n\n        if (type.render !== currentRender) {\n          var syntheticType = {\n            $$typeof: REACT_FORWARD_REF_TYPE,\n            render: currentRender\n          };\n\n          if (type.displayName !== undefined) {\n            syntheticType.displayName = type.displayName;\n          }\n\n          return syntheticType;\n        }\n      }\n\n      return type;\n    } // Use the latest known implementation.\n\n\n    return family.current;\n  }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return false;\n    }\n\n    var prevType = fiber.elementType;\n    var nextType = element.type; // If we got here, we know types aren't === equal.\n\n    var needsCompareFamilies = false;\n    var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n    switch (fiber.tag) {\n      case ClassComponent:\n        {\n          if (typeof nextType === 'function') {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case FunctionComponent:\n        {\n          if (typeof nextType === 'function') {\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            // We don't know the inner type yet.\n            // We're going to assume that the lazy inner type is stable,\n            // and so it is sufficient to avoid reconciling it away.\n            // We're not going to unwrap or actually use the new lazy type.\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case ForwardRef:\n        {\n          if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      case MemoComponent:\n      case SimpleMemoComponent:\n        {\n          if ($$typeofNextType === REACT_MEMO_TYPE) {\n            // TODO: if it was but can no longer be simple,\n            // we shouldn't set this.\n            needsCompareFamilies = true;\n          } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n            needsCompareFamilies = true;\n          }\n\n          break;\n        }\n\n      default:\n        return false;\n    } // Check if both types have a family and it's the same one.\n\n\n    if (needsCompareFamilies) {\n      // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n      // This means both of them need to be registered to preserve state.\n      // If we unwrapped and compared the inner types for wrappers instead,\n      // then we would risk falsely saying two separate memo(Foo)\n      // calls are equivalent because they wrap the same Foo function.\n      var prevFamily = resolveFamily(prevType);\n\n      if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return;\n    }\n\n    if (typeof WeakSet !== 'function') {\n      return;\n    }\n\n    if (failedBoundaries === null) {\n      failedBoundaries = new WeakSet();\n    }\n\n    failedBoundaries.add(fiber);\n  }\n}\nvar scheduleRefresh = function (root, update) {\n  {\n    if (resolveFamily === null) {\n      // Hot reloading is disabled.\n      return;\n    }\n\n    var staleFamilies = update.staleFamilies,\n        updatedFamilies = update.updatedFamilies;\n    flushPassiveEffects();\n    flushSync(function () {\n      scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n    });\n  }\n};\nvar scheduleRoot = function (root, element) {\n  {\n    if (root.context !== emptyContextObject) {\n      // Super edge case: root has a legacy _renderSubtree context\n      // but we don't know the parentComponent so we can't pass it.\n      // Just ignore. We'll delete this with _renderSubtree code path later.\n      return;\n    }\n\n    flushPassiveEffects();\n    flushSync(function () {\n      updateContainer(element, root, null, null);\n    });\n  }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n  {\n    var alternate = fiber.alternate,\n        child = fiber.child,\n        sibling = fiber.sibling,\n        tag = fiber.tag,\n        type = fiber.type;\n    var candidateType = null;\n\n    switch (tag) {\n      case FunctionComponent:\n      case SimpleMemoComponent:\n      case ClassComponent:\n        candidateType = type;\n        break;\n\n      case ForwardRef:\n        candidateType = type.render;\n        break;\n    }\n\n    if (resolveFamily === null) {\n      throw new Error('Expected resolveFamily to be set during hot reload.');\n    }\n\n    var needsRender = false;\n    var needsRemount = false;\n\n    if (candidateType !== null) {\n      var family = resolveFamily(candidateType);\n\n      if (family !== undefined) {\n        if (staleFamilies.has(family)) {\n          needsRemount = true;\n        } else if (updatedFamilies.has(family)) {\n          if (tag === ClassComponent) {\n            needsRemount = true;\n          } else {\n            needsRender = true;\n          }\n        }\n      }\n    }\n\n    if (failedBoundaries !== null) {\n      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n        needsRemount = true;\n      }\n    }\n\n    if (needsRemount) {\n      fiber._debugNeedsRemount = true;\n    }\n\n    if (needsRemount || needsRender) {\n      var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n      if (_root !== null) {\n        scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);\n      }\n    }\n\n    if (child !== null && !needsRemount) {\n      scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n    }\n\n    if (sibling !== null) {\n      scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n    }\n  }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n  {\n    var hostInstances = new Set();\n    var types = new Set(families.map(function (family) {\n      return family.current;\n    }));\n    findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n    return hostInstances;\n  }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n  {\n    var child = fiber.child,\n        sibling = fiber.sibling,\n        tag = fiber.tag,\n        type = fiber.type;\n    var candidateType = null;\n\n    switch (tag) {\n      case FunctionComponent:\n      case SimpleMemoComponent:\n      case ClassComponent:\n        candidateType = type;\n        break;\n\n      case ForwardRef:\n        candidateType = type.render;\n        break;\n    }\n\n    var didMatch = false;\n\n    if (candidateType !== null) {\n      if (types.has(candidateType)) {\n        didMatch = true;\n      }\n    }\n\n    if (didMatch) {\n      // We have a match. This only drills down to the closest host components.\n      // There's no need to search deeper because for the purpose of giving\n      // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n      findHostInstancesForFiberShallowly(fiber, hostInstances);\n    } else {\n      // If there's no match, maybe there will be one further down in the child tree.\n      if (child !== null) {\n        findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n      }\n    }\n\n    if (sibling !== null) {\n      findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n    }\n  }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n  {\n    var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n    if (foundHostInstances) {\n      return;\n    } // If we didn't find any host children, fallback to closest host parent.\n\n\n    var node = fiber;\n\n    while (true) {\n      switch (node.tag) {\n        case HostComponent:\n          hostInstances.add(node.stateNode);\n          return;\n\n        case HostPortal:\n          hostInstances.add(node.stateNode.containerInfo);\n          return;\n\n        case HostRoot:\n          hostInstances.add(node.stateNode.containerInfo);\n          return;\n      }\n\n      if (node.return === null) {\n        throw new Error('Expected to reach root first.');\n      }\n\n      node = node.return;\n    }\n  }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n  {\n    var node = fiber;\n    var foundHostInstances = false;\n\n    while (true) {\n      if (node.tag === HostComponent) {\n        // We got a match.\n        foundHostInstances = true;\n        hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n      } else if (node.child !== null) {\n        node.child.return = node;\n        node = node.child;\n        continue;\n      }\n\n      if (node === fiber) {\n        return foundHostInstances;\n      }\n\n      while (node.sibling === null) {\n        if (node.return === null || node.return === fiber) {\n          return foundHostInstances;\n        }\n\n        node = node.return;\n      }\n\n      node.sibling.return = node.return;\n      node = node.sibling;\n    }\n  }\n\n  return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n  hasBadMapPolyfill = false;\n\n  try {\n    var nonExtensibleObject = Object.preventExtensions({});\n    /* eslint-disable no-new */\n\n    new Map([[nonExtensibleObject, null]]);\n    new Set([nonExtensibleObject]);\n    /* eslint-enable no-new */\n  } catch (e) {\n    // TODO: Consider warning about bad polyfills\n    hasBadMapPolyfill = true;\n  }\n}\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n  // Instance\n  this.tag = tag;\n  this.key = key;\n  this.elementType = null;\n  this.type = null;\n  this.stateNode = null; // Fiber\n\n  this.return = null;\n  this.child = null;\n  this.sibling = null;\n  this.index = 0;\n  this.ref = null;\n  this.pendingProps = pendingProps;\n  this.memoizedProps = null;\n  this.updateQueue = null;\n  this.memoizedState = null;\n  this.dependencies = null;\n  this.mode = mode; // Effects\n\n  this.flags = NoFlags;\n  this.subtreeFlags = NoFlags;\n  this.deletions = null;\n  this.lanes = NoLanes;\n  this.childLanes = NoLanes;\n  this.alternate = null;\n\n  {\n    // Note: The following is done to avoid a v8 performance cliff.\n    //\n    // Initializing the fields below to smis and later updating them with\n    // double values will cause Fibers to end up having separate shapes.\n    // This behavior/bug has something to do with Object.preventExtension().\n    // Fortunately this only impacts DEV builds.\n    // Unfortunately it makes React unusably slow for some applications.\n    // To work around this, initialize the fields below with doubles.\n    //\n    // Learn more about this here:\n    // https://github.com/facebook/react/issues/14365\n    // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n    this.actualDuration = Number.NaN;\n    this.actualStartTime = Number.NaN;\n    this.selfBaseDuration = Number.NaN;\n    this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n    // This won't trigger the performance cliff mentioned above,\n    // and it simplifies other profiler code (including DevTools).\n\n    this.actualDuration = 0;\n    this.actualStartTime = -1;\n    this.selfBaseDuration = 0;\n    this.treeBaseDuration = 0;\n  }\n\n  {\n    // This isn't directly used but is handy for debugging internals:\n    this._debugSource = null;\n    this._debugOwner = null;\n    this._debugNeedsRemount = false;\n    this._debugHookTypes = null;\n\n    if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n      Object.preventExtensions(this);\n    }\n  }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n//    more difficult to predict when they get optimized and they are almost\n//    never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n//    always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n//    to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n//    is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n//    compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n  return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct$1(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n  return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n  if (typeof Component === 'function') {\n    return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n  } else if (Component !== undefined && Component !== null) {\n    var $$typeof = Component.$$typeof;\n\n    if ($$typeof === REACT_FORWARD_REF_TYPE) {\n      return ForwardRef;\n    }\n\n    if ($$typeof === REACT_MEMO_TYPE) {\n      return MemoComponent;\n    }\n  }\n\n  return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n  var workInProgress = current.alternate;\n\n  if (workInProgress === null) {\n    // We use a double buffering pooling technique because we know that we'll\n    // only ever need at most two versions of a tree. We pool the \"other\" unused\n    // node that we're free to reuse. This is lazily created to avoid allocating\n    // extra objects for things that are never updated. It also allow us to\n    // reclaim the extra memory if needed.\n    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n    workInProgress.elementType = current.elementType;\n    workInProgress.type = current.type;\n    workInProgress.stateNode = current.stateNode;\n\n    {\n      // DEV-only fields\n      workInProgress._debugSource = current._debugSource;\n      workInProgress._debugOwner = current._debugOwner;\n      workInProgress._debugHookTypes = current._debugHookTypes;\n    }\n\n    workInProgress.alternate = current;\n    current.alternate = workInProgress;\n  } else {\n    workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n    workInProgress.type = current.type; // We already have an alternate.\n    // Reset the effect tag.\n\n    workInProgress.flags = NoFlags; // The effects are no longer valid.\n\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.deletions = null;\n\n    {\n      // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n      // This prevents time from endlessly accumulating in new commits.\n      // This has the downside of resetting values for different priority renders,\n      // But works for yielding (the common case) and should support resuming.\n      workInProgress.actualDuration = 0;\n      workInProgress.actualStartTime = -1;\n    }\n  } // Reset all effects except static ones.\n  // Static effects are not specific to a render.\n\n\n  workInProgress.flags = current.flags & StaticMask;\n  workInProgress.childLanes = current.childLanes;\n  workInProgress.lanes = current.lanes;\n  workInProgress.child = current.child;\n  workInProgress.memoizedProps = current.memoizedProps;\n  workInProgress.memoizedState = current.memoizedState;\n  workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n  // it cannot be shared with the current fiber.\n\n  var currentDependencies = current.dependencies;\n  workInProgress.dependencies = currentDependencies === null ? null : {\n    lanes: currentDependencies.lanes,\n    firstContext: currentDependencies.firstContext\n  }; // These will be overridden during the parent's reconciliation\n\n  workInProgress.sibling = current.sibling;\n  workInProgress.index = current.index;\n  workInProgress.ref = current.ref;\n\n  {\n    workInProgress.selfBaseDuration = current.selfBaseDuration;\n    workInProgress.treeBaseDuration = current.treeBaseDuration;\n  }\n\n  {\n    workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n    switch (workInProgress.tag) {\n      case IndeterminateComponent:\n      case FunctionComponent:\n      case SimpleMemoComponent:\n        workInProgress.type = resolveFunctionForHotReloading(current.type);\n        break;\n\n      case ClassComponent:\n        workInProgress.type = resolveClassForHotReloading(current.type);\n        break;\n\n      case ForwardRef:\n        workInProgress.type = resolveForwardRefForHotReloading(current.type);\n        break;\n    }\n  }\n\n  return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n  // This resets the Fiber to what createFiber or createWorkInProgress would\n  // have set the values to before during the first pass. Ideally this wouldn't\n  // be necessary but unfortunately many code paths reads from the workInProgress\n  // when they should be reading from current and writing to workInProgress.\n  // We assume pendingProps, index, key, ref, return are still untouched to\n  // avoid doing another reconciliation.\n  // Reset the effect flags but keep any Placement tags, since that's something\n  // that child fiber is setting, not the reconciliation.\n  workInProgress.flags &= StaticMask | Placement; // The effects are no longer valid.\n\n  var current = workInProgress.alternate;\n\n  if (current === null) {\n    // Reset to createFiber's initial values.\n    workInProgress.childLanes = NoLanes;\n    workInProgress.lanes = renderLanes;\n    workInProgress.child = null;\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.memoizedProps = null;\n    workInProgress.memoizedState = null;\n    workInProgress.updateQueue = null;\n    workInProgress.dependencies = null;\n    workInProgress.stateNode = null;\n\n    {\n      // Note: We don't reset the actualTime counts. It's useful to accumulate\n      // actual time across multiple render passes.\n      workInProgress.selfBaseDuration = 0;\n      workInProgress.treeBaseDuration = 0;\n    }\n  } else {\n    // Reset to the cloned values that createWorkInProgress would've.\n    workInProgress.childLanes = current.childLanes;\n    workInProgress.lanes = current.lanes;\n    workInProgress.child = current.child;\n    workInProgress.subtreeFlags = NoFlags;\n    workInProgress.deletions = null;\n    workInProgress.memoizedProps = current.memoizedProps;\n    workInProgress.memoizedState = current.memoizedState;\n    workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n    workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n    // it cannot be shared with the current fiber.\n\n    var currentDependencies = current.dependencies;\n    workInProgress.dependencies = currentDependencies === null ? null : {\n      lanes: currentDependencies.lanes,\n      firstContext: currentDependencies.firstContext\n    };\n\n    {\n      // Note: We don't reset the actualTime counts. It's useful to accumulate\n      // actual time across multiple render passes.\n      workInProgress.selfBaseDuration = current.selfBaseDuration;\n      workInProgress.treeBaseDuration = current.treeBaseDuration;\n    }\n  }\n\n  return workInProgress;\n}\nfunction createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {\n  var mode;\n\n  if (tag === ConcurrentRoot) {\n    mode = ConcurrentMode;\n\n    if (isStrictMode === true) {\n      mode |= StrictLegacyMode;\n\n      {\n        mode |= StrictEffectsMode;\n      }\n    }\n  } else {\n    mode = NoMode;\n  }\n\n  if ( isDevToolsPresent) {\n    // Always collect profile timings when DevTools are present.\n    // This enables DevTools to start capturing timing at any point–\n    // Without some nodes in the tree having empty base times.\n    mode |= ProfileMode;\n  }\n\n  return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n  var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n  var resolvedType = type;\n\n  if (typeof type === 'function') {\n    if (shouldConstruct$1(type)) {\n      fiberTag = ClassComponent;\n\n      {\n        resolvedType = resolveClassForHotReloading(resolvedType);\n      }\n    } else {\n      {\n        resolvedType = resolveFunctionForHotReloading(resolvedType);\n      }\n    }\n  } else if (typeof type === 'string') {\n    fiberTag = HostComponent;\n  } else {\n    getTag: switch (type) {\n      case REACT_FRAGMENT_TYPE:\n        return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n      case REACT_STRICT_MODE_TYPE:\n        fiberTag = Mode;\n        mode |= StrictLegacyMode;\n\n        if ( (mode & ConcurrentMode) !== NoMode) {\n          // Strict effects should never run on legacy roots\n          mode |= StrictEffectsMode;\n        }\n\n        break;\n\n      case REACT_PROFILER_TYPE:\n        return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n      case REACT_SUSPENSE_TYPE:\n        return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n      case REACT_SUSPENSE_LIST_TYPE:\n        return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n      case REACT_OFFSCREEN_TYPE:\n        return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n      case REACT_LEGACY_HIDDEN_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_SCOPE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_CACHE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_TRACING_MARKER_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      case REACT_DEBUG_TRACING_MODE_TYPE:\n\n      // eslint-disable-next-line no-fallthrough\n\n      default:\n        {\n          if (typeof type === 'object' && type !== null) {\n            switch (type.$$typeof) {\n              case REACT_PROVIDER_TYPE:\n                fiberTag = ContextProvider;\n                break getTag;\n\n              case REACT_CONTEXT_TYPE:\n                // This is a consumer\n                fiberTag = ContextConsumer;\n                break getTag;\n\n              case REACT_FORWARD_REF_TYPE:\n                fiberTag = ForwardRef;\n\n                {\n                  resolvedType = resolveForwardRefForHotReloading(resolvedType);\n                }\n\n                break getTag;\n\n              case REACT_MEMO_TYPE:\n                fiberTag = MemoComponent;\n                break getTag;\n\n              case REACT_LAZY_TYPE:\n                fiberTag = LazyComponent;\n                resolvedType = null;\n                break getTag;\n            }\n          }\n\n          var info = '';\n\n          {\n            if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n              info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and \" + 'named imports.';\n            }\n\n            var ownerName = owner ? getComponentNameFromFiber(owner) : null;\n\n            if (ownerName) {\n              info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n            }\n          }\n\n          throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + (\"but got: \" + (type == null ? type : typeof type) + \".\" + info));\n        }\n    }\n  }\n\n  var fiber = createFiber(fiberTag, pendingProps, key, mode);\n  fiber.elementType = type;\n  fiber.type = resolvedType;\n  fiber.lanes = lanes;\n\n  {\n    fiber._debugOwner = owner;\n  }\n\n  return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n  var owner = null;\n\n  {\n    owner = element._owner;\n  }\n\n  var type = element.type;\n  var key = element.key;\n  var pendingProps = element.props;\n  var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n  {\n    fiber._debugSource = element._source;\n    fiber._debugOwner = element._owner;\n  }\n\n  return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n  var fiber = createFiber(Fragment, elements, key, mode);\n  fiber.lanes = lanes;\n  return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n  {\n    if (typeof pendingProps.id !== 'string') {\n      error('Profiler must specify an \"id\" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);\n    }\n  }\n\n  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);\n  fiber.elementType = REACT_PROFILER_TYPE;\n  fiber.lanes = lanes;\n\n  {\n    fiber.stateNode = {\n      effectDuration: 0,\n      passiveEffectDuration: 0\n    };\n  }\n\n  return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_SUSPENSE_TYPE;\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n  var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);\n  fiber.elementType = REACT_OFFSCREEN_TYPE;\n  fiber.lanes = lanes;\n  var primaryChildInstance = {\n    isHidden: false\n  };\n  fiber.stateNode = primaryChildInstance;\n  return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n  var fiber = createFiber(HostText, content, null, mode);\n  fiber.lanes = lanes;\n  return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n  var fiber = createFiber(HostComponent, null, null, NoMode);\n  fiber.elementType = 'DELETED';\n  return fiber;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n  var fiber = createFiber(DehydratedFragment, null, null, NoMode);\n  fiber.stateNode = dehydratedNode;\n  return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n  var pendingProps = portal.children !== null ? portal.children : [];\n  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n  fiber.lanes = lanes;\n  fiber.stateNode = {\n    containerInfo: portal.containerInfo,\n    pendingChildren: null,\n    // Used by persistent updates\n    implementation: portal.implementation\n  };\n  return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n  if (target === null) {\n    // This Fiber's initial properties will always be overwritten.\n    // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n    target = createFiber(IndeterminateComponent, null, null, NoMode);\n  } // This is intentionally written as a list of all properties.\n  // We tried to use Object.assign() instead but this is called in\n  // the hottest path, and Object.assign() was too slow:\n  // https://github.com/facebook/react/issues/12502\n  // This code is DEV-only so size is not a concern.\n\n\n  target.tag = source.tag;\n  target.key = source.key;\n  target.elementType = source.elementType;\n  target.type = source.type;\n  target.stateNode = source.stateNode;\n  target.return = source.return;\n  target.child = source.child;\n  target.sibling = source.sibling;\n  target.index = source.index;\n  target.ref = source.ref;\n  target.pendingProps = source.pendingProps;\n  target.memoizedProps = source.memoizedProps;\n  target.updateQueue = source.updateQueue;\n  target.memoizedState = source.memoizedState;\n  target.dependencies = source.dependencies;\n  target.mode = source.mode;\n  target.flags = source.flags;\n  target.subtreeFlags = source.subtreeFlags;\n  target.deletions = source.deletions;\n  target.lanes = source.lanes;\n  target.childLanes = source.childLanes;\n  target.alternate = source.alternate;\n\n  {\n    target.actualDuration = source.actualDuration;\n    target.actualStartTime = source.actualStartTime;\n    target.selfBaseDuration = source.selfBaseDuration;\n    target.treeBaseDuration = source.treeBaseDuration;\n  }\n\n  target._debugSource = source._debugSource;\n  target._debugOwner = source._debugOwner;\n  target._debugNeedsRemount = source._debugNeedsRemount;\n  target._debugHookTypes = source._debugHookTypes;\n  return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError) {\n  this.tag = tag;\n  this.containerInfo = containerInfo;\n  this.pendingChildren = null;\n  this.current = null;\n  this.pingCache = null;\n  this.finishedWork = null;\n  this.timeoutHandle = noTimeout;\n  this.context = null;\n  this.pendingContext = null;\n  this.callbackNode = null;\n  this.callbackPriority = NoLane;\n  this.eventTimes = createLaneMap(NoLanes);\n  this.expirationTimes = createLaneMap(NoTimestamp);\n  this.pendingLanes = NoLanes;\n  this.suspendedLanes = NoLanes;\n  this.pingedLanes = NoLanes;\n  this.expiredLanes = NoLanes;\n  this.mutableReadLanes = NoLanes;\n  this.finishedLanes = NoLanes;\n  this.entangledLanes = NoLanes;\n  this.entanglements = createLaneMap(NoLanes);\n  this.identifierPrefix = identifierPrefix;\n  this.onRecoverableError = onRecoverableError;\n\n  {\n    this.mutableSourceEagerHydrationData = null;\n  }\n\n  {\n    this.effectDuration = 0;\n    this.passiveEffectDuration = 0;\n  }\n\n  {\n    this.memoizedUpdaters = new Set();\n    var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];\n\n    for (var _i = 0; _i < TotalLanes; _i++) {\n      pendingUpdatersLaneMap.push(new Set());\n    }\n  }\n\n  {\n    switch (tag) {\n      case ConcurrentRoot:\n        this._debugRootType = hydrate ? 'hydrateRoot()' : 'createRoot()';\n        break;\n\n      case LegacyRoot:\n        this._debugRootType = hydrate ? 'hydrate()' : 'render()';\n        break;\n    }\n  }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, // TODO: We have several of these arguments that are conceptually part of the\n// host config, but because they are passed in at runtime, we have to thread\n// them through the root constructor. Perhaps we should put them all into a\n// single type, like a DynamicHostConfig that is defined by the renderer.\nidentifierPrefix, onRecoverableError, transitionCallbacks) {\n  var root = new FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onRecoverableError);\n  // stateNode is any.\n\n\n  var uninitializedFiber = createHostRootFiber(tag, isStrictMode);\n  root.current = uninitializedFiber;\n  uninitializedFiber.stateNode = root;\n\n  {\n    var _initialState = {\n      element: initialChildren,\n      isDehydrated: hydrate,\n      cache: null,\n      // not enabled yet\n      transitions: null,\n      pendingSuspenseBoundaries: null\n    };\n    uninitializedFiber.memoizedState = _initialState;\n  }\n\n  initializeUpdateQueue(uninitializedFiber);\n  return root;\n}\n\nvar ReactVersion = '18.3.1';\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n  var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n  {\n    checkKeyStringCoercion(key);\n  }\n\n  return {\n    // This tag allow us to uniquely identify this as a React Portal\n    $$typeof: REACT_PORTAL_TYPE,\n    key: key == null ? null : '' + key,\n    children: children,\n    containerInfo: containerInfo,\n    implementation: implementation\n  };\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n  didWarnAboutNestedUpdates = false;\n  didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n  if (!parentComponent) {\n    return emptyContextObject;\n  }\n\n  var fiber = get(parentComponent);\n  var parentContext = findCurrentUnmaskedContext(fiber);\n\n  if (fiber.tag === ClassComponent) {\n    var Component = fiber.type;\n\n    if (isContextProvider(Component)) {\n      return processChildContext(fiber, Component, parentContext);\n    }\n  }\n\n  return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n  {\n    var fiber = get(component);\n\n    if (fiber === undefined) {\n      if (typeof component.render === 'function') {\n        throw new Error('Unable to find node on an unmounted component.');\n      } else {\n        var keys = Object.keys(component).join(',');\n        throw new Error(\"Argument appears to not be a ReactComponent. Keys: \" + keys);\n      }\n    }\n\n    var hostFiber = findCurrentHostFiber(fiber);\n\n    if (hostFiber === null) {\n      return null;\n    }\n\n    if (hostFiber.mode & StrictLegacyMode) {\n      var componentName = getComponentNameFromFiber(fiber) || 'Component';\n\n      if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n        didWarnAboutFindNodeInStrictMode[componentName] = true;\n        var previousFiber = current;\n\n        try {\n          setCurrentFiber(hostFiber);\n\n          if (fiber.mode & StrictLegacyMode) {\n            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n          } else {\n            error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n          }\n        } finally {\n          // Ideally this should reset to previous but this shouldn't be called in\n          // render and there's another warning for that anyway.\n          if (previousFiber) {\n            setCurrentFiber(previousFiber);\n          } else {\n            resetCurrentFiber();\n          }\n        }\n      }\n    }\n\n    return hostFiber.stateNode;\n  }\n}\n\nfunction createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n  var hydrate = false;\n  var initialChildren = null;\n  return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n}\nfunction createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.\ncallback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {\n  var hydrate = true;\n  var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor\n\n  root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from\n  // a regular update because the initial render must match was was rendered\n  // on the server.\n  // NOTE: This update intentionally doesn't have a payload. We're only using\n  // the update to schedule work on the root fiber (and, for legacy roots, to\n  // enqueue the callback if one is provided).\n\n  var current = root.current;\n  var eventTime = requestEventTime();\n  var lane = requestUpdateLane(current);\n  var update = createUpdate(eventTime, lane);\n  update.callback = callback !== undefined && callback !== null ? callback : null;\n  enqueueUpdate(current, update, lane);\n  scheduleInitialHydrationOnRoot(root, lane, eventTime);\n  return root;\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n  {\n    onScheduleRoot(container, element);\n  }\n\n  var current$1 = container.current;\n  var eventTime = requestEventTime();\n  var lane = requestUpdateLane(current$1);\n\n  {\n    markRenderScheduled(lane);\n  }\n\n  var context = getContextForSubtree(parentComponent);\n\n  if (container.context === null) {\n    container.context = context;\n  } else {\n    container.pendingContext = context;\n  }\n\n  {\n    if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n      didWarnAboutNestedUpdates = true;\n\n      error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');\n    }\n  }\n\n  var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n  // being called \"element\".\n\n  update.payload = {\n    element: element\n  };\n  callback = callback === undefined ? null : callback;\n\n  if (callback !== null) {\n    {\n      if (typeof callback !== 'function') {\n        error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n      }\n    }\n\n    update.callback = callback;\n  }\n\n  var root = enqueueUpdate(current$1, update, lane);\n\n  if (root !== null) {\n    scheduleUpdateOnFiber(root, current$1, lane, eventTime);\n    entangleTransitions(root, current$1, lane);\n  }\n\n  return lane;\n}\nfunction getPublicRootInstance(container) {\n  var containerFiber = container.current;\n\n  if (!containerFiber.child) {\n    return null;\n  }\n\n  switch (containerFiber.child.tag) {\n    case HostComponent:\n      return getPublicInstance(containerFiber.child.stateNode);\n\n    default:\n      return containerFiber.child.stateNode;\n  }\n}\nfunction attemptSynchronousHydration$1(fiber) {\n  switch (fiber.tag) {\n    case HostRoot:\n      {\n        var root = fiber.stateNode;\n\n        if (isRootDehydrated(root)) {\n          // Flush the first scheduled \"update\".\n          var lanes = getHighestPriorityPendingLanes(root);\n          flushRoot(root, lanes);\n        }\n\n        break;\n      }\n\n    case SuspenseComponent:\n      {\n        flushSync(function () {\n          var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n          if (root !== null) {\n            var eventTime = requestEventTime();\n            scheduleUpdateOnFiber(root, fiber, SyncLane, eventTime);\n          }\n        }); // If we're still blocked after this, we need to increase\n        // the priority of any promises resolving within this\n        // boundary so that they next attempt also has higher pri.\n\n        var retryLane = SyncLane;\n        markRetryLaneIfNotHydrated(fiber, retryLane);\n        break;\n      }\n  }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n  var suspenseState = fiber.memoizedState;\n\n  if (suspenseState !== null && suspenseState.dehydrated !== null) {\n    suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n  }\n} // Increases the priority of thenables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n  markRetryLaneImpl(fiber, retryLane);\n  var alternate = fiber.alternate;\n\n  if (alternate) {\n    markRetryLaneImpl(alternate, retryLane);\n  }\n}\nfunction attemptContinuousHydration$1(fiber) {\n  if (fiber.tag !== SuspenseComponent) {\n    // We ignore HostRoots here because we can't increase\n    // their priority and they should not suspend on I/O,\n    // since you have to wrap anything that might suspend in\n    // Suspense.\n    return;\n  }\n\n  var lane = SelectiveHydrationLane;\n  var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n  if (root !== null) {\n    var eventTime = requestEventTime();\n    scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n  }\n\n  markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n  if (fiber.tag !== SuspenseComponent) {\n    // We ignore HostRoots here because we can't increase\n    // their priority other than synchronously flush it.\n    return;\n  }\n\n  var lane = requestUpdateLane(fiber);\n  var root = enqueueConcurrentRenderForLane(fiber, lane);\n\n  if (root !== null) {\n    var eventTime = requestEventTime();\n    scheduleUpdateOnFiber(root, fiber, lane, eventTime);\n  }\n\n  markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n  var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n  if (hostFiber === null) {\n    return null;\n  }\n\n  return hostFiber.stateNode;\n}\n\nvar shouldErrorImpl = function (fiber) {\n  return null;\n};\n\nfunction shouldError(fiber) {\n  return shouldErrorImpl(fiber);\n}\n\nvar shouldSuspendImpl = function (fiber) {\n  return false;\n};\n\nfunction shouldSuspend(fiber) {\n  return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setErrorHandler = null;\nvar setSuspenseHandler = null;\n\n{\n  var copyWithDeleteImpl = function (obj, path, index) {\n    var key = path[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n    if (index + 1 === path.length) {\n      if (isArray(updated)) {\n        updated.splice(key, 1);\n      } else {\n        delete updated[key];\n      }\n\n      return updated;\n    } // $FlowFixMe number or string is fine here\n\n\n    updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n    return updated;\n  };\n\n  var copyWithDelete = function (obj, path) {\n    return copyWithDeleteImpl(obj, path, 0);\n  };\n\n  var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n    var oldKey = oldPath[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj);\n\n    if (index + 1 === oldPath.length) {\n      var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n      updated[newKey] = updated[oldKey];\n\n      if (isArray(updated)) {\n        updated.splice(oldKey, 1);\n      } else {\n        delete updated[oldKey];\n      }\n    } else {\n      // $FlowFixMe number or string is fine here\n      updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n      obj[oldKey], oldPath, newPath, index + 1);\n    }\n\n    return updated;\n  };\n\n  var copyWithRename = function (obj, oldPath, newPath) {\n    if (oldPath.length !== newPath.length) {\n      warn('copyWithRename() expects paths of the same length');\n\n      return;\n    } else {\n      for (var i = 0; i < newPath.length - 1; i++) {\n        if (oldPath[i] !== newPath[i]) {\n          warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n          return;\n        }\n      }\n    }\n\n    return copyWithRenameImpl(obj, oldPath, newPath, 0);\n  };\n\n  var copyWithSetImpl = function (obj, path, index, value) {\n    if (index >= path.length) {\n      return value;\n    }\n\n    var key = path[index];\n    var updated = isArray(obj) ? obj.slice() : assign({}, obj); // $FlowFixMe number or string is fine here\n\n    updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n    return updated;\n  };\n\n  var copyWithSet = function (obj, path, value) {\n    return copyWithSetImpl(obj, path, 0, value);\n  };\n\n  var findHook = function (fiber, id) {\n    // For now, the \"id\" of stateful hooks is just the stateful hook index.\n    // This may change in the future with e.g. nested hooks.\n    var currentHook = fiber.memoizedState;\n\n    while (currentHook !== null && id > 0) {\n      currentHook = currentHook.next;\n      id--;\n    }\n\n    return currentHook;\n  }; // Support DevTools editable values for useState and useReducer.\n\n\n  overrideHookState = function (fiber, id, path, value) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithSet(hook.memoizedState, path, value);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n      if (root !== null) {\n        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n      }\n    }\n  };\n\n  overrideHookStateDeletePath = function (fiber, id, path) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithDelete(hook.memoizedState, path);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n      if (root !== null) {\n        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n      }\n    }\n  };\n\n  overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n    var hook = findHook(fiber, id);\n\n    if (hook !== null) {\n      var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n      hook.memoizedState = newState;\n      hook.baseState = newState; // We aren't actually adding an update to the queue,\n      // because there is no update we can add for useReducer hooks that won't trigger an error.\n      // (There's no appropriate action type for DevTools overrides.)\n      // As a result though, React will see the scheduled update as a noop and bailout.\n      // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n      fiber.memoizedProps = assign({}, fiber.memoizedProps);\n      var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n      if (root !== null) {\n        scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n      }\n    }\n  }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n  overrideProps = function (fiber, path, value) {\n    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  overridePropsDeletePath = function (fiber, path) {\n    fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  overridePropsRenamePath = function (fiber, oldPath, newPath) {\n    fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n    if (fiber.alternate) {\n      fiber.alternate.pendingProps = fiber.pendingProps;\n    }\n\n    var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  scheduleUpdate = function (fiber) {\n    var root = enqueueConcurrentRenderForLane(fiber, SyncLane);\n\n    if (root !== null) {\n      scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp);\n    }\n  };\n\n  setErrorHandler = function (newShouldErrorImpl) {\n    shouldErrorImpl = newShouldErrorImpl;\n  };\n\n  setSuspenseHandler = function (newShouldSuspendImpl) {\n    shouldSuspendImpl = newShouldSuspendImpl;\n  };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n  var hostFiber = findCurrentHostFiber(fiber);\n\n  if (hostFiber === null) {\n    return null;\n  }\n\n  return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n  return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n  return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n  return injectInternals({\n    bundleType: devToolsConfig.bundleType,\n    version: devToolsConfig.version,\n    rendererPackageName: devToolsConfig.rendererPackageName,\n    rendererConfig: devToolsConfig.rendererConfig,\n    overrideHookState: overrideHookState,\n    overrideHookStateDeletePath: overrideHookStateDeletePath,\n    overrideHookStateRenamePath: overrideHookStateRenamePath,\n    overrideProps: overrideProps,\n    overridePropsDeletePath: overridePropsDeletePath,\n    overridePropsRenamePath: overridePropsRenamePath,\n    setErrorHandler: setErrorHandler,\n    setSuspenseHandler: setSuspenseHandler,\n    scheduleUpdate: scheduleUpdate,\n    currentDispatcherRef: ReactCurrentDispatcher,\n    findHostInstanceByFiber: findHostInstanceByFiber,\n    findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n    // React Refresh\n    findHostInstancesForRefresh:  findHostInstancesForRefresh ,\n    scheduleRefresh:  scheduleRefresh ,\n    scheduleRoot:  scheduleRoot ,\n    setRefreshHandler:  setRefreshHandler ,\n    // Enables DevTools to append owner stacks to error messages in DEV mode.\n    getCurrentFiber:  getCurrentFiberForDevTools ,\n    // Enables DevTools to detect reconciler version rather than renderer version\n    // which may not match for third party renderers.\n    reconcilerVersion: ReactVersion\n  });\n}\n\n/* global reportError */\n\nvar defaultOnRecoverableError = typeof reportError === 'function' ? // In modern browsers, reportError will dispatch an error event,\n// emulating an uncaught JavaScript error.\nreportError : function (error) {\n  // In older browsers and test environments, fallback to console.error.\n  // eslint-disable-next-line react-internal/no-production-logging\n  console['error'](error);\n};\n\nfunction ReactDOMRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\n\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function (children) {\n  var root = this._internalRoot;\n\n  if (root === null) {\n    throw new Error('Cannot update an unmounted root.');\n  }\n\n  {\n    if (typeof arguments[1] === 'function') {\n      error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n    } else if (isValidContainer(arguments[1])) {\n      error('You passed a container to the second argument of root.render(...). ' + \"You don't need to pass it again since you already passed it to create the root.\");\n    } else if (typeof arguments[1] !== 'undefined') {\n      error('You passed a second argument to root.render(...) but it only accepts ' + 'one argument.');\n    }\n\n    var container = root.containerInfo;\n\n    if (container.nodeType !== COMMENT_NODE) {\n      var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n      if (hostInstance) {\n        if (hostInstance.parentNode !== container) {\n          error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n        }\n      }\n    }\n  }\n\n  updateContainer(children, root, null, null);\n};\n\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function () {\n  {\n    if (typeof arguments[0] === 'function') {\n      error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n    }\n  }\n\n  var root = this._internalRoot;\n\n  if (root !== null) {\n    this._internalRoot = null;\n    var container = root.containerInfo;\n\n    {\n      if (isAlreadyRendering()) {\n        error('Attempted to synchronously unmount a root while React was already ' + 'rendering. React cannot finish unmounting the root until the ' + 'current render has completed, which may lead to a race condition.');\n      }\n    }\n\n    flushSync(function () {\n      updateContainer(null, root, null, null);\n    });\n    unmarkContainerAsRoot(container);\n  }\n};\n\nfunction createRoot(container, options) {\n  if (!isValidContainer(container)) {\n    throw new Error('createRoot(...): Target container is not a DOM element.');\n  }\n\n  warnIfReactDOMContainerInDEV(container);\n  var isStrictMode = false;\n  var concurrentUpdatesByDefaultOverride = false;\n  var identifierPrefix = '';\n  var onRecoverableError = defaultOnRecoverableError;\n  var transitionCallbacks = null;\n\n  if (options !== null && options !== undefined) {\n    {\n      if (options.hydrate) {\n        warn('hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.');\n      } else {\n        if (typeof options === 'object' && options !== null && options.$$typeof === REACT_ELEMENT_TYPE) {\n          error('You passed a JSX element to createRoot. You probably meant to ' + 'call root.render instead. ' + 'Example usage:\\n\\n' + '  let root = createRoot(domContainer);\\n' + '  root.render(<App />);');\n        }\n      }\n    }\n\n    if (options.unstable_strictMode === true) {\n      isStrictMode = true;\n    }\n\n    if (options.identifierPrefix !== undefined) {\n      identifierPrefix = options.identifierPrefix;\n    }\n\n    if (options.onRecoverableError !== undefined) {\n      onRecoverableError = options.onRecoverableError;\n    }\n\n    if (options.transitionCallbacks !== undefined) {\n      transitionCallbacks = options.transitionCallbacks;\n    }\n  }\n\n  var root = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n  markContainerAsRoot(root.current, container);\n  var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n  listenToAllSupportedEvents(rootContainerElement);\n  return new ReactDOMRoot(root);\n}\n\nfunction ReactDOMHydrationRoot(internalRoot) {\n  this._internalRoot = internalRoot;\n}\n\nfunction scheduleHydration(target) {\n  if (target) {\n    queueExplicitHydrationTarget(target);\n  }\n}\n\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;\nfunction hydrateRoot(container, initialChildren, options) {\n  if (!isValidContainer(container)) {\n    throw new Error('hydrateRoot(...): Target container is not a DOM element.');\n  }\n\n  warnIfReactDOMContainerInDEV(container);\n\n  {\n    if (initialChildren === undefined) {\n      error('Must provide initial children as second argument to hydrateRoot. ' + 'Example usage: hydrateRoot(domContainer, <App />)');\n    }\n  } // For now we reuse the whole bag of options since they contain\n  // the hydration callbacks.\n\n\n  var hydrationCallbacks = options != null ? options : null; // TODO: Delete this option\n\n  var mutableSources = options != null && options.hydratedSources || null;\n  var isStrictMode = false;\n  var concurrentUpdatesByDefaultOverride = false;\n  var identifierPrefix = '';\n  var onRecoverableError = defaultOnRecoverableError;\n\n  if (options !== null && options !== undefined) {\n    if (options.unstable_strictMode === true) {\n      isStrictMode = true;\n    }\n\n    if (options.identifierPrefix !== undefined) {\n      identifierPrefix = options.identifierPrefix;\n    }\n\n    if (options.onRecoverableError !== undefined) {\n      onRecoverableError = options.onRecoverableError;\n    }\n  }\n\n  var root = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);\n  markContainerAsRoot(root.current, container); // This can't be a comment node since hydration doesn't work on comment nodes anyway.\n\n  listenToAllSupportedEvents(container);\n\n  if (mutableSources) {\n    for (var i = 0; i < mutableSources.length; i++) {\n      var mutableSource = mutableSources[i];\n      registerMutableSourceForHydration(root, mutableSource);\n    }\n  }\n\n  return new ReactDOMHydrationRoot(root);\n}\nfunction isValidContainer(node) {\n  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers  ));\n} // TODO: Remove this function which also includes comment nodes.\n// We only use it in places that are currently more relaxed.\n\nfunction isValidContainerLegacy(node) {\n  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nfunction warnIfReactDOMContainerInDEV(container) {\n  {\n    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n      error('createRoot(): Creating roots directly with document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try using a container element created ' + 'for your app.');\n    }\n\n    if (isContainerMarkedAsRoot(container)) {\n      if (container._reactRootContainer) {\n        error('You are calling ReactDOMClient.createRoot() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.');\n      } else {\n        error('You are calling ReactDOMClient.createRoot() on a container that ' + 'has already been passed to createRoot() before. Instead, call ' + 'root.render() on the existing root instead if you want to update it.');\n      }\n    }\n  }\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\n\n{\n  topLevelUpdateWarnings = function (container) {\n    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);\n\n      if (hostInstance) {\n        if (hostInstance.parentNode !== container) {\n          error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n        }\n      }\n    }\n\n    var isRootRenderedBySomeReact = !!container._reactRootContainer;\n    var rootEl = getReactRootElementInContainer(container);\n    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n    if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n      error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n    }\n\n    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n      error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n    }\n  };\n}\n\nfunction getReactRootElementInContainer(container) {\n  if (!container) {\n    return null;\n  }\n\n  if (container.nodeType === DOCUMENT_NODE) {\n    return container.documentElement;\n  } else {\n    return container.firstChild;\n  }\n}\n\nfunction noopOnRecoverableError() {// This isn't reachable because onRecoverableError isn't called in the\n  // legacy API.\n}\n\nfunction legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {\n  if (isHydrationContainer) {\n    if (typeof callback === 'function') {\n      var originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(root);\n        originalCallback.call(instance);\n      };\n    }\n\n    var root = createHydrationContainer(initialChildren, callback, container, LegacyRoot, null, // hydrationCallbacks\n    false, // isStrictMode\n    false, // concurrentUpdatesByDefaultOverride,\n    '', // identifierPrefix\n    noopOnRecoverableError);\n    container._reactRootContainer = root;\n    markContainerAsRoot(root.current, container);\n    var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n    listenToAllSupportedEvents(rootContainerElement);\n    flushSync();\n    return root;\n  } else {\n    // First clear any existing content.\n    var rootSibling;\n\n    while (rootSibling = container.lastChild) {\n      container.removeChild(rootSibling);\n    }\n\n    if (typeof callback === 'function') {\n      var _originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(_root);\n\n        _originalCallback.call(instance);\n      };\n    }\n\n    var _root = createContainer(container, LegacyRoot, null, // hydrationCallbacks\n    false, // isStrictMode\n    false, // concurrentUpdatesByDefaultOverride,\n    '', // identifierPrefix\n    noopOnRecoverableError);\n\n    container._reactRootContainer = _root;\n    markContainerAsRoot(_root.current, container);\n\n    var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n\n    listenToAllSupportedEvents(_rootContainerElement); // Initial mount should not be batched.\n\n    flushSync(function () {\n      updateContainer(initialChildren, _root, parentComponent, callback);\n    });\n    return _root;\n  }\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n  {\n    if (callback !== null && typeof callback !== 'function') {\n      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n    }\n  }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n  {\n    topLevelUpdateWarnings(container);\n    warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n  }\n\n  var maybeRoot = container._reactRootContainer;\n  var root;\n\n  if (!maybeRoot) {\n    // Initial mount\n    root = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);\n  } else {\n    root = maybeRoot;\n\n    if (typeof callback === 'function') {\n      var originalCallback = callback;\n\n      callback = function () {\n        var instance = getPublicRootInstance(root);\n        originalCallback.call(instance);\n      };\n    } // Update\n\n\n    updateContainer(children, root, parentComponent, callback);\n  }\n\n  return getPublicRootInstance(root);\n}\n\nvar didWarnAboutFindDOMNode = false;\nfunction findDOMNode(componentOrElement) {\n  {\n    if (!didWarnAboutFindDOMNode) {\n      didWarnAboutFindDOMNode = true;\n\n      error('findDOMNode is deprecated and will be removed in the next major ' + 'release. Instead, add a ref directly to the element you want ' + 'to reference. Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node');\n    }\n\n    var owner = ReactCurrentOwner$3.current;\n\n    if (owner !== null && owner.stateNode !== null) {\n      var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n      if (!warnedAboutRefsInRender) {\n        error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentNameFromType(owner.type) || 'A component');\n      }\n\n      owner.stateNode._warnedAboutRefsInRender = true;\n    }\n  }\n\n  if (componentOrElement == null) {\n    return null;\n  }\n\n  if (componentOrElement.nodeType === ELEMENT_NODE) {\n    return componentOrElement;\n  }\n\n  {\n    return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n  }\n}\nfunction hydrate(element, container, callback) {\n  {\n    error('ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call hydrateRoot(container, element)?');\n    }\n  } // TODO: throw or warn if we couldn't hydrate?\n\n\n  return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n  {\n    error('ReactDOM.render is no longer supported in React 18. Use createRoot ' + 'instead. Until you switch to the new API, your app will behave as ' + \"if it's running React 17. Learn \" + 'more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n    }\n  }\n\n  return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n  {\n    error('ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported ' + 'in React 18. Consider using a portal instead. Until you switch to ' + \"the createRoot API, your app will behave as if it's running React \" + '17. Learn more: https://reactjs.org/link/switch-to-createroot');\n  }\n\n  if (!isValidContainerLegacy(containerNode)) {\n    throw new Error('Target container is not a DOM element.');\n  }\n\n  if (parentComponent == null || !has(parentComponent)) {\n    throw new Error('parentComponent must be a valid React Component');\n  }\n\n  return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nvar didWarnAboutUnmountComponentAtNode = false;\nfunction unmountComponentAtNode(container) {\n  {\n    if (!didWarnAboutUnmountComponentAtNode) {\n      didWarnAboutUnmountComponentAtNode = true;\n\n      error('unmountComponentAtNode is deprecated and will be removed in the ' + 'next major release. Switch to the createRoot API. Learn ' + 'more: https://reactjs.org/link/switch-to-createroot');\n    }\n  }\n\n  if (!isValidContainerLegacy(container)) {\n    throw new Error('unmountComponentAtNode(...): Target container is not a DOM element.');\n  }\n\n  {\n    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n    if (isModernRoot) {\n      error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n    }\n  }\n\n  if (container._reactRootContainer) {\n    {\n      var rootEl = getReactRootElementInContainer(container);\n      var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n      if (renderedByDifferentReact) {\n        error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n      }\n    } // Unmount should not be batched.\n\n\n    flushSync(function () {\n      legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n        // $FlowFixMe This should probably use `delete container._reactRootContainer`\n        container._reactRootContainer = null;\n        unmarkContainerAsRoot(container);\n      });\n    }); // If you call unmountComponentAtNode twice in quick succession, you'll\n    // get `true` twice. That's probably fine?\n\n    return true;\n  } else {\n    {\n      var _rootEl = getReactRootElementInContainer(container);\n\n      var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n      var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n      if (hasNonRootReactChild) {\n        error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n      }\n    }\n\n    return false;\n  }\n}\n\nsetAttemptSynchronousHydration(attemptSynchronousHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetGetCurrentUpdatePriority(getCurrentUpdatePriority);\nsetAttemptHydrationAtPriority(runWithPriority);\n\n{\n  if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n  Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n  Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n    error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n  }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);\n\nfunction createPortal$1(children, container) {\n  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n  if (!isValidContainer(container)) {\n    throw new Error('Target container is not a DOM element.');\n  } // TODO: pass ReactDOM portal implementation as third argument\n  // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n  return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n  return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nvar Internals = {\n  usingClientEntryPoint: false,\n  // Keep in sync with ReactTestUtils.js.\n  // This is an array for better minification.\n  Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]\n};\n\nfunction createRoot$1(container, options) {\n  {\n    if (!Internals.usingClientEntryPoint && !false) {\n      error('You are importing createRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n    }\n  }\n\n  return createRoot(container, options);\n}\n\nfunction hydrateRoot$1(container, initialChildren, options) {\n  {\n    if (!Internals.usingClientEntryPoint && !false) {\n      error('You are importing hydrateRoot from \"react-dom\" which is not supported. ' + 'You should instead import it from \"react-dom/client\".');\n    }\n  }\n\n  return hydrateRoot(container, initialChildren, options);\n} // Overload the definition to the two valid signatures.\n// Warning, this opts-out of checking the function body.\n\n\n// eslint-disable-next-line no-redeclare\nfunction flushSync$1(fn) {\n  {\n    if (isAlreadyRendering()) {\n      error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n    }\n  }\n\n  return flushSync(fn);\n}\nvar foundDevTools = injectIntoDevTools({\n  findFiberByHostInstance: getClosestInstanceFromNode,\n  bundleType:  1 ,\n  version: ReactVersion,\n  rendererPackageName: 'react-dom'\n});\n\n{\n  if (!foundDevTools && canUseDOM && window.top === window.self) {\n    // If we're in Chrome or Firefox, provide a download link if not installed.\n    if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n      var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n      if (/^(https?|file):$/.test(protocol)) {\n        // eslint-disable-next-line react-internal/no-production-logging\n        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');\n      }\n    }\n  }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.createRoot = createRoot$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync$1;\nexports.hydrate = hydrate;\nexports.hydrateRoot = hydrateRoot$1;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n          /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n    'function'\n) {\n  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n        \n  })();\n}\n","'use strict';\n\nfunction checkDCE() {\n  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n  if (\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n  ) {\n    return;\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    // This branch is unreachable because this function is only called\n    // in production, but the condition is true only in development.\n    // Therefore if the branch is still here, dead code elimination wasn't\n    // properly applied.\n    // Don't change the message. React DevTools relies on it. Also make sure\n    // this message doesn't occur elsewhere in this function, or it will cause\n    // a false positive.\n    throw new Error('^_^');\n  }\n  try {\n    // Verify that the code above has been dead code eliminated (DCE'd).\n    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n  } catch (err) {\n    // DevTools shouldn't crash React, no matter what.\n    // We should still report in case we break this code.\n    console.error(err);\n  }\n}\n\nif (process.env.NODE_ENV === 'production') {\n  // DCE check should happen before ReactDOM bundle executes so that\n  // DevTools can report bad minification during injection.\n  checkDCE();\n  module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n  module.exports = require('./cjs/react-dom.development.js');\n}\n","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n  exports.createRoot = m.createRoot;\n  exports.hydrateRoot = m.hydrateRoot;\n} else {\n  var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n  exports.createRoot = function(c, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.createRoot(c, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n  exports.hydrateRoot = function(c, h, o) {\n    i.usingClientEntryPoint = true;\n    try {\n      return m.hydrateRoot(c, h, o);\n    } finally {\n      i.usingClientEntryPoint = false;\n    }\n  };\n}\n","// src/utils/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n  return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\n\n// src/utils/symbol-observable.ts\nvar $$observable = /* @__PURE__ */ (() => typeof Symbol === \"function\" && Symbol.observable || \"@@observable\")();\nvar symbol_observable_default = $$observable;\n\n// src/utils/actionTypes.ts\nvar randomString = () => Math.random().toString(36).substring(7).split(\"\").join(\".\");\nvar ActionTypes = {\n  INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,\n  REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,\n  PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`\n};\nvar actionTypes_default = ActionTypes;\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n  if (typeof obj !== \"object\" || obj === null)\n    return false;\n  let proto = obj;\n  while (Object.getPrototypeOf(proto) !== null) {\n    proto = Object.getPrototypeOf(proto);\n  }\n  return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;\n}\n\n// src/utils/kindOf.ts\nfunction miniKindOf(val) {\n  if (val === void 0)\n    return \"undefined\";\n  if (val === null)\n    return \"null\";\n  const type = typeof val;\n  switch (type) {\n    case \"boolean\":\n    case \"string\":\n    case \"number\":\n    case \"symbol\":\n    case \"function\": {\n      return type;\n    }\n  }\n  if (Array.isArray(val))\n    return \"array\";\n  if (isDate(val))\n    return \"date\";\n  if (isError(val))\n    return \"error\";\n  const constructorName = ctorName(val);\n  switch (constructorName) {\n    case \"Symbol\":\n    case \"Promise\":\n    case \"WeakMap\":\n    case \"WeakSet\":\n    case \"Map\":\n    case \"Set\":\n      return constructorName;\n  }\n  return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\\s/g, \"\");\n}\nfunction ctorName(val) {\n  return typeof val.constructor === \"function\" ? val.constructor.name : null;\n}\nfunction isError(val) {\n  return val instanceof Error || typeof val.message === \"string\" && val.constructor && typeof val.constructor.stackTraceLimit === \"number\";\n}\nfunction isDate(val) {\n  if (val instanceof Date)\n    return true;\n  return typeof val.toDateString === \"function\" && typeof val.getDate === \"function\" && typeof val.setDate === \"function\";\n}\nfunction kindOf(val) {\n  let typeOfVal = typeof val;\n  if (process.env.NODE_ENV !== \"production\") {\n    typeOfVal = miniKindOf(val);\n  }\n  return typeOfVal;\n}\n\n// src/createStore.ts\nfunction createStore(reducer, preloadedState, enhancer) {\n  if (typeof reducer !== \"function\") {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : `Expected the root reducer to be a function. Instead, received: '${kindOf(reducer)}'`);\n  }\n  if (typeof preloadedState === \"function\" && typeof enhancer === \"function\" || typeof enhancer === \"function\" && typeof arguments[3] === \"function\") {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.\");\n  }\n  if (typeof preloadedState === \"function\" && typeof enhancer === \"undefined\") {\n    enhancer = preloadedState;\n    preloadedState = void 0;\n  }\n  if (typeof enhancer !== \"undefined\") {\n    if (typeof enhancer !== \"function\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : `Expected the enhancer to be a function. Instead, received: '${kindOf(enhancer)}'`);\n    }\n    return enhancer(createStore)(reducer, preloadedState);\n  }\n  let currentReducer = reducer;\n  let currentState = preloadedState;\n  let currentListeners = /* @__PURE__ */ new Map();\n  let nextListeners = currentListeners;\n  let listenerIdCounter = 0;\n  let isDispatching = false;\n  function ensureCanMutateNextListeners() {\n    if (nextListeners === currentListeners) {\n      nextListeners = /* @__PURE__ */ new Map();\n      currentListeners.forEach((listener, key) => {\n        nextListeners.set(key, listener);\n      });\n    }\n  }\n  function getState() {\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.\");\n    }\n    return currentState;\n  }\n  function subscribe(listener) {\n    if (typeof listener !== \"function\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : `Expected the listener to be a function. Instead, received: '${kindOf(listener)}'`);\n    }\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.\");\n    }\n    let isSubscribed = true;\n    ensureCanMutateNextListeners();\n    const listenerId = listenerIdCounter++;\n    nextListeners.set(listenerId, listener);\n    return function unsubscribe() {\n      if (!isSubscribed) {\n        return;\n      }\n      if (isDispatching) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.\");\n      }\n      isSubscribed = false;\n      ensureCanMutateNextListeners();\n      nextListeners.delete(listenerId);\n      currentListeners = null;\n    };\n  }\n  function dispatch(action) {\n    if (!isPlainObject(action)) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : `Actions must be plain objects. Instead, the actual type was: '${kindOf(action)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);\n    }\n    if (typeof action.type === \"undefined\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : 'Actions may not have an undefined \"type\" property. You may have misspelled an action type string constant.');\n    }\n    if (typeof action.type !== \"string\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : `Action \"type\" property must be a string. Instead, the actual type was: '${kindOf(action.type)}'. Value was: '${action.type}' (stringified)`);\n    }\n    if (isDispatching) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(9) : \"Reducers may not dispatch actions.\");\n    }\n    try {\n      isDispatching = true;\n      currentState = currentReducer(currentState, action);\n    } finally {\n      isDispatching = false;\n    }\n    const listeners = currentListeners = nextListeners;\n    listeners.forEach((listener) => {\n      listener();\n    });\n    return action;\n  }\n  function replaceReducer(nextReducer) {\n    if (typeof nextReducer !== \"function\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(10) : `Expected the nextReducer to be a function. Instead, received: '${kindOf(nextReducer)}`);\n    }\n    currentReducer = nextReducer;\n    dispatch({\n      type: actionTypes_default.REPLACE\n    });\n  }\n  function observable() {\n    const outerSubscribe = subscribe;\n    return {\n      /**\n       * The minimal observable subscription method.\n       * @param observer Any object that can be used as an observer.\n       * The observer object should have a `next` method.\n       * @returns An object with an `unsubscribe` method that can\n       * be used to unsubscribe the observable from the store, and prevent further\n       * emission of values from the observable.\n       */\n      subscribe(observer) {\n        if (typeof observer !== \"object\" || observer === null) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : `Expected the observer to be an object. Instead, received: '${kindOf(observer)}'`);\n        }\n        function observeState() {\n          const observerAsObserver = observer;\n          if (observerAsObserver.next) {\n            observerAsObserver.next(getState());\n          }\n        }\n        observeState();\n        const unsubscribe = outerSubscribe(observeState);\n        return {\n          unsubscribe\n        };\n      },\n      [symbol_observable_default]() {\n        return this;\n      }\n    };\n  }\n  dispatch({\n    type: actionTypes_default.INIT\n  });\n  const store = {\n    dispatch,\n    subscribe,\n    getState,\n    replaceReducer,\n    [symbol_observable_default]: observable\n  };\n  return store;\n}\nfunction legacy_createStore(reducer, preloadedState, enhancer) {\n  return createStore(reducer, preloadedState, enhancer);\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n  if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n    console.error(message);\n  }\n  try {\n    throw new Error(message);\n  } catch (e) {\n  }\n}\n\n// src/combineReducers.ts\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n  const reducerKeys = Object.keys(reducers);\n  const argumentName = action && action.type === actionTypes_default.INIT ? \"preloadedState argument passed to createStore\" : \"previous state received by the reducer\";\n  if (reducerKeys.length === 0) {\n    return \"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";\n  }\n  if (!isPlainObject(inputState)) {\n    return `The ${argumentName} has unexpected type of \"${kindOf(inputState)}\". Expected argument to be an object with the following keys: \"${reducerKeys.join('\", \"')}\"`;\n  }\n  const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);\n  unexpectedKeys.forEach((key) => {\n    unexpectedKeyCache[key] = true;\n  });\n  if (action && action.type === actionTypes_default.REPLACE)\n    return;\n  if (unexpectedKeys.length > 0) {\n    return `Unexpected ${unexpectedKeys.length > 1 ? \"keys\" : \"key\"} \"${unexpectedKeys.join('\", \"')}\" found in ${argumentName}. Expected to find one of the known reducer keys instead: \"${reducerKeys.join('\", \"')}\". Unexpected keys will be ignored.`;\n  }\n}\nfunction assertReducerShape(reducers) {\n  Object.keys(reducers).forEach((key) => {\n    const reducer = reducers[key];\n    const initialState = reducer(void 0, {\n      type: actionTypes_default.INIT\n    });\n    if (typeof initialState === \"undefined\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : `The slice reducer for key \"${key}\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n    }\n    if (typeof reducer(void 0, {\n      type: actionTypes_default.PROBE_UNKNOWN_ACTION()\n    }) === \"undefined\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : `The slice reducer for key \"${key}\" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in \"redux/*\" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);\n    }\n  });\n}\nfunction combineReducers(reducers) {\n  const reducerKeys = Object.keys(reducers);\n  const finalReducers = {};\n  for (let i = 0; i < reducerKeys.length; i++) {\n    const key = reducerKeys[i];\n    if (process.env.NODE_ENV !== \"production\") {\n      if (typeof reducers[key] === \"undefined\") {\n        warning(`No reducer provided for key \"${key}\"`);\n      }\n    }\n    if (typeof reducers[key] === \"function\") {\n      finalReducers[key] = reducers[key];\n    }\n  }\n  const finalReducerKeys = Object.keys(finalReducers);\n  let unexpectedKeyCache;\n  if (process.env.NODE_ENV !== \"production\") {\n    unexpectedKeyCache = {};\n  }\n  let shapeAssertionError;\n  try {\n    assertReducerShape(finalReducers);\n  } catch (e) {\n    shapeAssertionError = e;\n  }\n  return function combination(state = {}, action) {\n    if (shapeAssertionError) {\n      throw shapeAssertionError;\n    }\n    if (process.env.NODE_ENV !== \"production\") {\n      const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n      if (warningMessage) {\n        warning(warningMessage);\n      }\n    }\n    let hasChanged = false;\n    const nextState = {};\n    for (let i = 0; i < finalReducerKeys.length; i++) {\n      const key = finalReducerKeys[i];\n      const reducer = finalReducers[key];\n      const previousStateForKey = state[key];\n      const nextStateForKey = reducer(previousStateForKey, action);\n      if (typeof nextStateForKey === \"undefined\") {\n        const actionType = action && action.type;\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : `When called with an action of type ${actionType ? `\"${String(actionType)}\"` : \"(unknown type)\"}, the slice reducer for key \"${key}\" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);\n      }\n      nextState[key] = nextStateForKey;\n      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n    }\n    hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n    return hasChanged ? nextState : state;\n  };\n}\n\n// src/bindActionCreators.ts\nfunction bindActionCreator(actionCreator, dispatch) {\n  return function(...args) {\n    return dispatch(actionCreator.apply(this, args));\n  };\n}\nfunction bindActionCreators(actionCreators, dispatch) {\n  if (typeof actionCreators === \"function\") {\n    return bindActionCreator(actionCreators, dispatch);\n  }\n  if (typeof actionCreators !== \"object\" || actionCreators === null) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : `bindActionCreators expected an object or a function, but instead received: '${kindOf(actionCreators)}'. Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?`);\n  }\n  const boundActionCreators = {};\n  for (const key in actionCreators) {\n    const actionCreator = actionCreators[key];\n    if (typeof actionCreator === \"function\") {\n      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n    }\n  }\n  return boundActionCreators;\n}\n\n// src/compose.ts\nfunction compose(...funcs) {\n  if (funcs.length === 0) {\n    return (arg) => arg;\n  }\n  if (funcs.length === 1) {\n    return funcs[0];\n  }\n  return funcs.reduce((a, b) => (...args) => a(b(...args)));\n}\n\n// src/applyMiddleware.ts\nfunction applyMiddleware(...middlewares) {\n  return (createStore2) => (reducer, preloadedState) => {\n    const store = createStore2(reducer, preloadedState);\n    let dispatch = () => {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.\");\n    };\n    const middlewareAPI = {\n      getState: store.getState,\n      dispatch: (action, ...args) => dispatch(action, ...args)\n    };\n    const chain = middlewares.map((middleware) => middleware(middlewareAPI));\n    dispatch = compose(...chain)(store.dispatch);\n    return {\n      ...store,\n      dispatch\n    };\n  };\n}\n\n// src/utils/isAction.ts\nfunction isAction(action) {\n  return isPlainObject(action) && \"type\" in action && typeof action.type === \"string\";\n}\nexport {\n  actionTypes_default as __DO_NOT_USE__ActionTypes,\n  applyMiddleware,\n  bindActionCreators,\n  combineReducers,\n  compose,\n  createStore,\n  isAction,\n  isPlainObject,\n  legacy_createStore\n};\n//# sourceMappingURL=redux.mjs.map","// src/utils/env.ts\nvar NOTHING = Symbol.for(\"immer-nothing\");\nvar DRAFTABLE = Symbol.for(\"immer-draftable\");\nvar DRAFT_STATE = Symbol.for(\"immer-state\");\n\n// src/utils/errors.ts\nvar errors = process.env.NODE_ENV !== \"production\" ? [\n  // All error codes, starting by 0:\n  function(plugin) {\n    return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \\`enable${plugin}()\\` when initializing your application.`;\n  },\n  function(thing) {\n    return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`;\n  },\n  \"This object has been frozen and should not be mutated\",\n  function(data) {\n    return \"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? \" + data;\n  },\n  \"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.\",\n  \"Immer forbids circular references\",\n  \"The first or second argument to `produce` must be a function\",\n  \"The third argument to `produce` must be a function or undefined\",\n  \"First argument to `createDraft` must be a plain object, an array, or an immerable object\",\n  \"First argument to `finishDraft` must be a draft returned by `createDraft`\",\n  function(thing) {\n    return `'current' expects a draft, got: ${thing}`;\n  },\n  \"Object.defineProperty() cannot be used on an Immer draft\",\n  \"Object.setPrototypeOf() cannot be used on an Immer draft\",\n  \"Immer only supports deleting array indices\",\n  \"Immer only supports setting array indices and the 'length' property\",\n  function(thing) {\n    return `'original' expects a draft, got: ${thing}`;\n  }\n  // Note: if more errors are added, the errorOffset in Patches.ts should be increased\n  // See Patches.ts for additional errors\n] : [];\nfunction die(error, ...args) {\n  if (process.env.NODE_ENV !== \"production\") {\n    const e = errors[error];\n    const msg = typeof e === \"function\" ? e.apply(null, args) : e;\n    throw new Error(`[Immer] ${msg}`);\n  }\n  throw new Error(\n    `[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`\n  );\n}\n\n// src/utils/common.ts\nvar getPrototypeOf = Object.getPrototypeOf;\nfunction isDraft(value) {\n  return !!value && !!value[DRAFT_STATE];\n}\nfunction isDraftable(value) {\n  if (!value)\n    return false;\n  return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);\n}\nvar objectCtorString = Object.prototype.constructor.toString();\nfunction isPlainObject(value) {\n  if (!value || typeof value !== \"object\")\n    return false;\n  const proto = getPrototypeOf(value);\n  if (proto === null) {\n    return true;\n  }\n  const Ctor = Object.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n  if (Ctor === Object)\n    return true;\n  return typeof Ctor == \"function\" && Function.toString.call(Ctor) === objectCtorString;\n}\nfunction original(value) {\n  if (!isDraft(value))\n    die(15, value);\n  return value[DRAFT_STATE].base_;\n}\nfunction each(obj, iter) {\n  if (getArchtype(obj) === 0 /* Object */) {\n    Reflect.ownKeys(obj).forEach((key) => {\n      iter(key, obj[key], obj);\n    });\n  } else {\n    obj.forEach((entry, index) => iter(index, entry, obj));\n  }\n}\nfunction getArchtype(thing) {\n  const state = thing[DRAFT_STATE];\n  return state ? state.type_ : Array.isArray(thing) ? 1 /* Array */ : isMap(thing) ? 2 /* Map */ : isSet(thing) ? 3 /* Set */ : 0 /* Object */;\n}\nfunction has(thing, prop) {\n  return getArchtype(thing) === 2 /* Map */ ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);\n}\nfunction get(thing, prop) {\n  return getArchtype(thing) === 2 /* Map */ ? thing.get(prop) : thing[prop];\n}\nfunction set(thing, propOrOldValue, value) {\n  const t = getArchtype(thing);\n  if (t === 2 /* Map */)\n    thing.set(propOrOldValue, value);\n  else if (t === 3 /* Set */) {\n    thing.add(value);\n  } else\n    thing[propOrOldValue] = value;\n}\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\nfunction isMap(target) {\n  return target instanceof Map;\n}\nfunction isSet(target) {\n  return target instanceof Set;\n}\nfunction latest(state) {\n  return state.copy_ || state.base_;\n}\nfunction shallowCopy(base, strict) {\n  if (isMap(base)) {\n    return new Map(base);\n  }\n  if (isSet(base)) {\n    return new Set(base);\n  }\n  if (Array.isArray(base))\n    return Array.prototype.slice.call(base);\n  const isPlain = isPlainObject(base);\n  if (strict === true || strict === \"class_only\" && !isPlain) {\n    const descriptors = Object.getOwnPropertyDescriptors(base);\n    delete descriptors[DRAFT_STATE];\n    let keys = Reflect.ownKeys(descriptors);\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n      const desc = descriptors[key];\n      if (desc.writable === false) {\n        desc.writable = true;\n        desc.configurable = true;\n      }\n      if (desc.get || desc.set)\n        descriptors[key] = {\n          configurable: true,\n          writable: true,\n          // could live with !!desc.set as well here...\n          enumerable: desc.enumerable,\n          value: base[key]\n        };\n    }\n    return Object.create(getPrototypeOf(base), descriptors);\n  } else {\n    const proto = getPrototypeOf(base);\n    if (proto !== null && isPlain) {\n      return { ...base };\n    }\n    const obj = Object.create(proto);\n    return Object.assign(obj, base);\n  }\n}\nfunction freeze(obj, deep = false) {\n  if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))\n    return obj;\n  if (getArchtype(obj) > 1) {\n    Object.defineProperties(obj, {\n      set: { value: dontMutateFrozenCollections },\n      add: { value: dontMutateFrozenCollections },\n      clear: { value: dontMutateFrozenCollections },\n      delete: { value: dontMutateFrozenCollections }\n    });\n  }\n  Object.freeze(obj);\n  if (deep)\n    Object.values(obj).forEach((value) => freeze(value, true));\n  return obj;\n}\nfunction dontMutateFrozenCollections() {\n  die(2);\n}\nfunction isFrozen(obj) {\n  return Object.isFrozen(obj);\n}\n\n// src/utils/plugins.ts\nvar plugins = {};\nfunction getPlugin(pluginKey) {\n  const plugin = plugins[pluginKey];\n  if (!plugin) {\n    die(0, pluginKey);\n  }\n  return plugin;\n}\nfunction loadPlugin(pluginKey, implementation) {\n  if (!plugins[pluginKey])\n    plugins[pluginKey] = implementation;\n}\n\n// src/core/scope.ts\nvar currentScope;\nfunction getCurrentScope() {\n  return currentScope;\n}\nfunction createScope(parent_, immer_) {\n  return {\n    drafts_: [],\n    parent_,\n    immer_,\n    // Whenever the modified draft contains a draft from another scope, we\n    // need to prevent auto-freezing so the unowned draft can be finalized.\n    canAutoFreeze_: true,\n    unfinalizedDrafts_: 0\n  };\n}\nfunction usePatchesInScope(scope, patchListener) {\n  if (patchListener) {\n    getPlugin(\"Patches\");\n    scope.patches_ = [];\n    scope.inversePatches_ = [];\n    scope.patchListener_ = patchListener;\n  }\n}\nfunction revokeScope(scope) {\n  leaveScope(scope);\n  scope.drafts_.forEach(revokeDraft);\n  scope.drafts_ = null;\n}\nfunction leaveScope(scope) {\n  if (scope === currentScope) {\n    currentScope = scope.parent_;\n  }\n}\nfunction enterScope(immer2) {\n  return currentScope = createScope(currentScope, immer2);\n}\nfunction revokeDraft(draft) {\n  const state = draft[DRAFT_STATE];\n  if (state.type_ === 0 /* Object */ || state.type_ === 1 /* Array */)\n    state.revoke_();\n  else\n    state.revoked_ = true;\n}\n\n// src/core/finalize.ts\nfunction processResult(result, scope) {\n  scope.unfinalizedDrafts_ = scope.drafts_.length;\n  const baseDraft = scope.drafts_[0];\n  const isReplaced = result !== void 0 && result !== baseDraft;\n  if (isReplaced) {\n    if (baseDraft[DRAFT_STATE].modified_) {\n      revokeScope(scope);\n      die(4);\n    }\n    if (isDraftable(result)) {\n      result = finalize(scope, result);\n      if (!scope.parent_)\n        maybeFreeze(scope, result);\n    }\n    if (scope.patches_) {\n      getPlugin(\"Patches\").generateReplacementPatches_(\n        baseDraft[DRAFT_STATE].base_,\n        result,\n        scope.patches_,\n        scope.inversePatches_\n      );\n    }\n  } else {\n    result = finalize(scope, baseDraft, []);\n  }\n  revokeScope(scope);\n  if (scope.patches_) {\n    scope.patchListener_(scope.patches_, scope.inversePatches_);\n  }\n  return result !== NOTHING ? result : void 0;\n}\nfunction finalize(rootScope, value, path) {\n  if (isFrozen(value))\n    return value;\n  const state = value[DRAFT_STATE];\n  if (!state) {\n    each(\n      value,\n      (key, childValue) => finalizeProperty(rootScope, state, value, key, childValue, path)\n    );\n    return value;\n  }\n  if (state.scope_ !== rootScope)\n    return value;\n  if (!state.modified_) {\n    maybeFreeze(rootScope, state.base_, true);\n    return state.base_;\n  }\n  if (!state.finalized_) {\n    state.finalized_ = true;\n    state.scope_.unfinalizedDrafts_--;\n    const result = state.copy_;\n    let resultEach = result;\n    let isSet2 = false;\n    if (state.type_ === 3 /* Set */) {\n      resultEach = new Set(result);\n      result.clear();\n      isSet2 = true;\n    }\n    each(\n      resultEach,\n      (key, childValue) => finalizeProperty(rootScope, state, result, key, childValue, path, isSet2)\n    );\n    maybeFreeze(rootScope, result, false);\n    if (path && rootScope.patches_) {\n      getPlugin(\"Patches\").generatePatches_(\n        state,\n        path,\n        rootScope.patches_,\n        rootScope.inversePatches_\n      );\n    }\n  }\n  return state.copy_;\n}\nfunction finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {\n  if (process.env.NODE_ENV !== \"production\" && childValue === targetObject)\n    die(5);\n  if (isDraft(childValue)) {\n    const path = rootPath && parentState && parentState.type_ !== 3 /* Set */ && // Set objects are atomic since they have no keys.\n    !has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;\n    const res = finalize(rootScope, childValue, path);\n    set(targetObject, prop, res);\n    if (isDraft(res)) {\n      rootScope.canAutoFreeze_ = false;\n    } else\n      return;\n  } else if (targetIsSet) {\n    targetObject.add(childValue);\n  }\n  if (isDraftable(childValue) && !isFrozen(childValue)) {\n    if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {\n      return;\n    }\n    finalize(rootScope, childValue);\n    if ((!parentState || !parentState.scope_.parent_) && typeof prop !== \"symbol\" && (isMap(targetObject) ? targetObject.has(prop) : Object.prototype.propertyIsEnumerable.call(targetObject, prop)))\n      maybeFreeze(rootScope, childValue);\n  }\n}\nfunction maybeFreeze(scope, value, deep = false) {\n  if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {\n    freeze(value, deep);\n  }\n}\n\n// src/core/proxy.ts\nfunction createProxyProxy(base, parent) {\n  const isArray = Array.isArray(base);\n  const state = {\n    type_: isArray ? 1 /* Array */ : 0 /* Object */,\n    // Track which produce call this is associated with.\n    scope_: parent ? parent.scope_ : getCurrentScope(),\n    // True for both shallow and deep changes.\n    modified_: false,\n    // Used during finalization.\n    finalized_: false,\n    // Track which properties have been assigned (true) or deleted (false).\n    assigned_: {},\n    // The parent draft state.\n    parent_: parent,\n    // The base state.\n    base_: base,\n    // The base proxy.\n    draft_: null,\n    // set below\n    // The base copy with any updated values.\n    copy_: null,\n    // Called by the `produce` function.\n    revoke_: null,\n    isManual_: false\n  };\n  let target = state;\n  let traps = objectTraps;\n  if (isArray) {\n    target = [state];\n    traps = arrayTraps;\n  }\n  const { revoke, proxy } = Proxy.revocable(target, traps);\n  state.draft_ = proxy;\n  state.revoke_ = revoke;\n  return proxy;\n}\nvar objectTraps = {\n  get(state, prop) {\n    if (prop === DRAFT_STATE)\n      return state;\n    const source = latest(state);\n    if (!has(source, prop)) {\n      return readPropFromProto(state, source, prop);\n    }\n    const value = source[prop];\n    if (state.finalized_ || !isDraftable(value)) {\n      return value;\n    }\n    if (value === peek(state.base_, prop)) {\n      prepareCopy(state);\n      return state.copy_[prop] = createProxy(value, state);\n    }\n    return value;\n  },\n  has(state, prop) {\n    return prop in latest(state);\n  },\n  ownKeys(state) {\n    return Reflect.ownKeys(latest(state));\n  },\n  set(state, prop, value) {\n    const desc = getDescriptorFromProto(latest(state), prop);\n    if (desc?.set) {\n      desc.set.call(state.draft_, value);\n      return true;\n    }\n    if (!state.modified_) {\n      const current2 = peek(latest(state), prop);\n      const currentState = current2?.[DRAFT_STATE];\n      if (currentState && currentState.base_ === value) {\n        state.copy_[prop] = value;\n        state.assigned_[prop] = false;\n        return true;\n      }\n      if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))\n        return true;\n      prepareCopy(state);\n      markChanged(state);\n    }\n    if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'\n    (value !== void 0 || prop in state.copy_) || // special case: NaN\n    Number.isNaN(value) && Number.isNaN(state.copy_[prop]))\n      return true;\n    state.copy_[prop] = value;\n    state.assigned_[prop] = true;\n    return true;\n  },\n  deleteProperty(state, prop) {\n    if (peek(state.base_, prop) !== void 0 || prop in state.base_) {\n      state.assigned_[prop] = false;\n      prepareCopy(state);\n      markChanged(state);\n    } else {\n      delete state.assigned_[prop];\n    }\n    if (state.copy_) {\n      delete state.copy_[prop];\n    }\n    return true;\n  },\n  // Note: We never coerce `desc.value` into an Immer draft, because we can't make\n  // the same guarantee in ES5 mode.\n  getOwnPropertyDescriptor(state, prop) {\n    const owner = latest(state);\n    const desc = Reflect.getOwnPropertyDescriptor(owner, prop);\n    if (!desc)\n      return desc;\n    return {\n      writable: true,\n      configurable: state.type_ !== 1 /* Array */ || prop !== \"length\",\n      enumerable: desc.enumerable,\n      value: owner[prop]\n    };\n  },\n  defineProperty() {\n    die(11);\n  },\n  getPrototypeOf(state) {\n    return getPrototypeOf(state.base_);\n  },\n  setPrototypeOf() {\n    die(12);\n  }\n};\nvar arrayTraps = {};\neach(objectTraps, (key, fn) => {\n  arrayTraps[key] = function() {\n    arguments[0] = arguments[0][0];\n    return fn.apply(this, arguments);\n  };\n});\narrayTraps.deleteProperty = function(state, prop) {\n  if (process.env.NODE_ENV !== \"production\" && isNaN(parseInt(prop)))\n    die(13);\n  return arrayTraps.set.call(this, state, prop, void 0);\n};\narrayTraps.set = function(state, prop, value) {\n  if (process.env.NODE_ENV !== \"production\" && prop !== \"length\" && isNaN(parseInt(prop)))\n    die(14);\n  return objectTraps.set.call(this, state[0], prop, value, state[0]);\n};\nfunction peek(draft, prop) {\n  const state = draft[DRAFT_STATE];\n  const source = state ? latest(state) : draft;\n  return source[prop];\n}\nfunction readPropFromProto(state, source, prop) {\n  const desc = getDescriptorFromProto(source, prop);\n  return desc ? `value` in desc ? desc.value : (\n    // This is a very special case, if the prop is a getter defined by the\n    // prototype, we should invoke it with the draft as context!\n    desc.get?.call(state.draft_)\n  ) : void 0;\n}\nfunction getDescriptorFromProto(source, prop) {\n  if (!(prop in source))\n    return void 0;\n  let proto = getPrototypeOf(source);\n  while (proto) {\n    const desc = Object.getOwnPropertyDescriptor(proto, prop);\n    if (desc)\n      return desc;\n    proto = getPrototypeOf(proto);\n  }\n  return void 0;\n}\nfunction markChanged(state) {\n  if (!state.modified_) {\n    state.modified_ = true;\n    if (state.parent_) {\n      markChanged(state.parent_);\n    }\n  }\n}\nfunction prepareCopy(state) {\n  if (!state.copy_) {\n    state.copy_ = shallowCopy(\n      state.base_,\n      state.scope_.immer_.useStrictShallowCopy_\n    );\n  }\n}\n\n// src/core/immerClass.ts\nvar Immer2 = class {\n  constructor(config) {\n    this.autoFreeze_ = true;\n    this.useStrictShallowCopy_ = false;\n    /**\n     * The `produce` function takes a value and a \"recipe function\" (whose\n     * return value often depends on the base state). The recipe function is\n     * free to mutate its first argument however it wants. All mutations are\n     * only ever applied to a __copy__ of the base state.\n     *\n     * Pass only a function to create a \"curried producer\" which relieves you\n     * from passing the recipe function every time.\n     *\n     * Only plain objects and arrays are made mutable. All other objects are\n     * considered uncopyable.\n     *\n     * Note: This function is __bound__ to its `Immer` instance.\n     *\n     * @param {any} base - the initial state\n     * @param {Function} recipe - function that receives a proxy of the base state as first argument and which can be freely modified\n     * @param {Function} patchListener - optional function that will be called with all the patches produced here\n     * @returns {any} a new state, or the initial state if nothing was modified\n     */\n    this.produce = (base, recipe, patchListener) => {\n      if (typeof base === \"function\" && typeof recipe !== \"function\") {\n        const defaultBase = recipe;\n        recipe = base;\n        const self = this;\n        return function curriedProduce(base2 = defaultBase, ...args) {\n          return self.produce(base2, (draft) => recipe.call(this, draft, ...args));\n        };\n      }\n      if (typeof recipe !== \"function\")\n        die(6);\n      if (patchListener !== void 0 && typeof patchListener !== \"function\")\n        die(7);\n      let result;\n      if (isDraftable(base)) {\n        const scope = enterScope(this);\n        const proxy = createProxy(base, void 0);\n        let hasError = true;\n        try {\n          result = recipe(proxy);\n          hasError = false;\n        } finally {\n          if (hasError)\n            revokeScope(scope);\n          else\n            leaveScope(scope);\n        }\n        usePatchesInScope(scope, patchListener);\n        return processResult(result, scope);\n      } else if (!base || typeof base !== \"object\") {\n        result = recipe(base);\n        if (result === void 0)\n          result = base;\n        if (result === NOTHING)\n          result = void 0;\n        if (this.autoFreeze_)\n          freeze(result, true);\n        if (patchListener) {\n          const p = [];\n          const ip = [];\n          getPlugin(\"Patches\").generateReplacementPatches_(base, result, p, ip);\n          patchListener(p, ip);\n        }\n        return result;\n      } else\n        die(1, base);\n    };\n    this.produceWithPatches = (base, recipe) => {\n      if (typeof base === \"function\") {\n        return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));\n      }\n      let patches, inversePatches;\n      const result = this.produce(base, recipe, (p, ip) => {\n        patches = p;\n        inversePatches = ip;\n      });\n      return [result, patches, inversePatches];\n    };\n    if (typeof config?.autoFreeze === \"boolean\")\n      this.setAutoFreeze(config.autoFreeze);\n    if (typeof config?.useStrictShallowCopy === \"boolean\")\n      this.setUseStrictShallowCopy(config.useStrictShallowCopy);\n  }\n  createDraft(base) {\n    if (!isDraftable(base))\n      die(8);\n    if (isDraft(base))\n      base = current(base);\n    const scope = enterScope(this);\n    const proxy = createProxy(base, void 0);\n    proxy[DRAFT_STATE].isManual_ = true;\n    leaveScope(scope);\n    return proxy;\n  }\n  finishDraft(draft, patchListener) {\n    const state = draft && draft[DRAFT_STATE];\n    if (!state || !state.isManual_)\n      die(9);\n    const { scope_: scope } = state;\n    usePatchesInScope(scope, patchListener);\n    return processResult(void 0, scope);\n  }\n  /**\n   * Pass true to automatically freeze all copies created by Immer.\n   *\n   * By default, auto-freezing is enabled.\n   */\n  setAutoFreeze(value) {\n    this.autoFreeze_ = value;\n  }\n  /**\n   * Pass true to enable strict shallow copy.\n   *\n   * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.\n   */\n  setUseStrictShallowCopy(value) {\n    this.useStrictShallowCopy_ = value;\n  }\n  applyPatches(base, patches) {\n    let i;\n    for (i = patches.length - 1; i >= 0; i--) {\n      const patch = patches[i];\n      if (patch.path.length === 0 && patch.op === \"replace\") {\n        base = patch.value;\n        break;\n      }\n    }\n    if (i > -1) {\n      patches = patches.slice(i + 1);\n    }\n    const applyPatchesImpl = getPlugin(\"Patches\").applyPatches_;\n    if (isDraft(base)) {\n      return applyPatchesImpl(base, patches);\n    }\n    return this.produce(\n      base,\n      (draft) => applyPatchesImpl(draft, patches)\n    );\n  }\n};\nfunction createProxy(value, parent) {\n  const draft = isMap(value) ? getPlugin(\"MapSet\").proxyMap_(value, parent) : isSet(value) ? getPlugin(\"MapSet\").proxySet_(value, parent) : createProxyProxy(value, parent);\n  const scope = parent ? parent.scope_ : getCurrentScope();\n  scope.drafts_.push(draft);\n  return draft;\n}\n\n// src/core/current.ts\nfunction current(value) {\n  if (!isDraft(value))\n    die(10, value);\n  return currentImpl(value);\n}\nfunction currentImpl(value) {\n  if (!isDraftable(value) || isFrozen(value))\n    return value;\n  const state = value[DRAFT_STATE];\n  let copy;\n  if (state) {\n    if (!state.modified_)\n      return state.base_;\n    state.finalized_ = true;\n    copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);\n  } else {\n    copy = shallowCopy(value, true);\n  }\n  each(copy, (key, childValue) => {\n    set(copy, key, currentImpl(childValue));\n  });\n  if (state) {\n    state.finalized_ = false;\n  }\n  return copy;\n}\n\n// src/plugins/patches.ts\nfunction enablePatches() {\n  const errorOffset = 16;\n  if (process.env.NODE_ENV !== \"production\") {\n    errors.push(\n      'Sets cannot have \"replace\" patches.',\n      function(op) {\n        return \"Unsupported patch operation: \" + op;\n      },\n      function(path) {\n        return \"Cannot apply patch, path doesn't resolve: \" + path;\n      },\n      \"Patching reserved attributes like __proto__, prototype and constructor is not allowed\"\n    );\n  }\n  const REPLACE = \"replace\";\n  const ADD = \"add\";\n  const REMOVE = \"remove\";\n  function generatePatches_(state, basePath, patches, inversePatches) {\n    switch (state.type_) {\n      case 0 /* Object */:\n      case 2 /* Map */:\n        return generatePatchesFromAssigned(\n          state,\n          basePath,\n          patches,\n          inversePatches\n        );\n      case 1 /* Array */:\n        return generateArrayPatches(state, basePath, patches, inversePatches);\n      case 3 /* Set */:\n        return generateSetPatches(\n          state,\n          basePath,\n          patches,\n          inversePatches\n        );\n    }\n  }\n  function generateArrayPatches(state, basePath, patches, inversePatches) {\n    let { base_, assigned_ } = state;\n    let copy_ = state.copy_;\n    if (copy_.length < base_.length) {\n      ;\n      [base_, copy_] = [copy_, base_];\n      [patches, inversePatches] = [inversePatches, patches];\n    }\n    for (let i = 0; i < base_.length; i++) {\n      if (assigned_[i] && copy_[i] !== base_[i]) {\n        const path = basePath.concat([i]);\n        patches.push({\n          op: REPLACE,\n          path,\n          // Need to maybe clone it, as it can in fact be the original value\n          // due to the base/copy inversion at the start of this function\n          value: clonePatchValueIfNeeded(copy_[i])\n        });\n        inversePatches.push({\n          op: REPLACE,\n          path,\n          value: clonePatchValueIfNeeded(base_[i])\n        });\n      }\n    }\n    for (let i = base_.length; i < copy_.length; i++) {\n      const path = basePath.concat([i]);\n      patches.push({\n        op: ADD,\n        path,\n        // Need to maybe clone it, as it can in fact be the original value\n        // due to the base/copy inversion at the start of this function\n        value: clonePatchValueIfNeeded(copy_[i])\n      });\n    }\n    for (let i = copy_.length - 1; base_.length <= i; --i) {\n      const path = basePath.concat([i]);\n      inversePatches.push({\n        op: REMOVE,\n        path\n      });\n    }\n  }\n  function generatePatchesFromAssigned(state, basePath, patches, inversePatches) {\n    const { base_, copy_ } = state;\n    each(state.assigned_, (key, assignedValue) => {\n      const origValue = get(base_, key);\n      const value = get(copy_, key);\n      const op = !assignedValue ? REMOVE : has(base_, key) ? REPLACE : ADD;\n      if (origValue === value && op === REPLACE)\n        return;\n      const path = basePath.concat(key);\n      patches.push(op === REMOVE ? { op, path } : { op, path, value });\n      inversePatches.push(\n        op === ADD ? { op: REMOVE, path } : op === REMOVE ? { op: ADD, path, value: clonePatchValueIfNeeded(origValue) } : { op: REPLACE, path, value: clonePatchValueIfNeeded(origValue) }\n      );\n    });\n  }\n  function generateSetPatches(state, basePath, patches, inversePatches) {\n    let { base_, copy_ } = state;\n    let i = 0;\n    base_.forEach((value) => {\n      if (!copy_.has(value)) {\n        const path = basePath.concat([i]);\n        patches.push({\n          op: REMOVE,\n          path,\n          value\n        });\n        inversePatches.unshift({\n          op: ADD,\n          path,\n          value\n        });\n      }\n      i++;\n    });\n    i = 0;\n    copy_.forEach((value) => {\n      if (!base_.has(value)) {\n        const path = basePath.concat([i]);\n        patches.push({\n          op: ADD,\n          path,\n          value\n        });\n        inversePatches.unshift({\n          op: REMOVE,\n          path,\n          value\n        });\n      }\n      i++;\n    });\n  }\n  function generateReplacementPatches_(baseValue, replacement, patches, inversePatches) {\n    patches.push({\n      op: REPLACE,\n      path: [],\n      value: replacement === NOTHING ? void 0 : replacement\n    });\n    inversePatches.push({\n      op: REPLACE,\n      path: [],\n      value: baseValue\n    });\n  }\n  function applyPatches_(draft, patches) {\n    patches.forEach((patch) => {\n      const { path, op } = patch;\n      let base = draft;\n      for (let i = 0; i < path.length - 1; i++) {\n        const parentType = getArchtype(base);\n        let p = path[i];\n        if (typeof p !== \"string\" && typeof p !== \"number\") {\n          p = \"\" + p;\n        }\n        if ((parentType === 0 /* Object */ || parentType === 1 /* Array */) && (p === \"__proto__\" || p === \"constructor\"))\n          die(errorOffset + 3);\n        if (typeof base === \"function\" && p === \"prototype\")\n          die(errorOffset + 3);\n        base = get(base, p);\n        if (typeof base !== \"object\")\n          die(errorOffset + 2, path.join(\"/\"));\n      }\n      const type = getArchtype(base);\n      const value = deepClonePatchValue(patch.value);\n      const key = path[path.length - 1];\n      switch (op) {\n        case REPLACE:\n          switch (type) {\n            case 2 /* Map */:\n              return base.set(key, value);\n            case 3 /* Set */:\n              die(errorOffset);\n            default:\n              return base[key] = value;\n          }\n        case ADD:\n          switch (type) {\n            case 1 /* Array */:\n              return key === \"-\" ? base.push(value) : base.splice(key, 0, value);\n            case 2 /* Map */:\n              return base.set(key, value);\n            case 3 /* Set */:\n              return base.add(value);\n            default:\n              return base[key] = value;\n          }\n        case REMOVE:\n          switch (type) {\n            case 1 /* Array */:\n              return base.splice(key, 1);\n            case 2 /* Map */:\n              return base.delete(key);\n            case 3 /* Set */:\n              return base.delete(patch.value);\n            default:\n              return delete base[key];\n          }\n        default:\n          die(errorOffset + 1, op);\n      }\n    });\n    return draft;\n  }\n  function deepClonePatchValue(obj) {\n    if (!isDraftable(obj))\n      return obj;\n    if (Array.isArray(obj))\n      return obj.map(deepClonePatchValue);\n    if (isMap(obj))\n      return new Map(\n        Array.from(obj.entries()).map(([k, v]) => [k, deepClonePatchValue(v)])\n      );\n    if (isSet(obj))\n      return new Set(Array.from(obj).map(deepClonePatchValue));\n    const cloned = Object.create(getPrototypeOf(obj));\n    for (const key in obj)\n      cloned[key] = deepClonePatchValue(obj[key]);\n    if (has(obj, DRAFTABLE))\n      cloned[DRAFTABLE] = obj[DRAFTABLE];\n    return cloned;\n  }\n  function clonePatchValueIfNeeded(obj) {\n    if (isDraft(obj)) {\n      return deepClonePatchValue(obj);\n    } else\n      return obj;\n  }\n  loadPlugin(\"Patches\", {\n    applyPatches_,\n    generatePatches_,\n    generateReplacementPatches_\n  });\n}\n\n// src/plugins/mapset.ts\nfunction enableMapSet() {\n  class DraftMap extends Map {\n    constructor(target, parent) {\n      super();\n      this[DRAFT_STATE] = {\n        type_: 2 /* Map */,\n        parent_: parent,\n        scope_: parent ? parent.scope_ : getCurrentScope(),\n        modified_: false,\n        finalized_: false,\n        copy_: void 0,\n        assigned_: void 0,\n        base_: target,\n        draft_: this,\n        isManual_: false,\n        revoked_: false\n      };\n    }\n    get size() {\n      return latest(this[DRAFT_STATE]).size;\n    }\n    has(key) {\n      return latest(this[DRAFT_STATE]).has(key);\n    }\n    set(key, value) {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      if (!latest(state).has(key) || latest(state).get(key) !== value) {\n        prepareMapCopy(state);\n        markChanged(state);\n        state.assigned_.set(key, true);\n        state.copy_.set(key, value);\n        state.assigned_.set(key, true);\n      }\n      return this;\n    }\n    delete(key) {\n      if (!this.has(key)) {\n        return false;\n      }\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      prepareMapCopy(state);\n      markChanged(state);\n      if (state.base_.has(key)) {\n        state.assigned_.set(key, false);\n      } else {\n        state.assigned_.delete(key);\n      }\n      state.copy_.delete(key);\n      return true;\n    }\n    clear() {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      if (latest(state).size) {\n        prepareMapCopy(state);\n        markChanged(state);\n        state.assigned_ = /* @__PURE__ */ new Map();\n        each(state.base_, (key) => {\n          state.assigned_.set(key, false);\n        });\n        state.copy_.clear();\n      }\n    }\n    forEach(cb, thisArg) {\n      const state = this[DRAFT_STATE];\n      latest(state).forEach((_value, key, _map) => {\n        cb.call(thisArg, this.get(key), key, this);\n      });\n    }\n    get(key) {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      const value = latest(state).get(key);\n      if (state.finalized_ || !isDraftable(value)) {\n        return value;\n      }\n      if (value !== state.base_.get(key)) {\n        return value;\n      }\n      const draft = createProxy(value, state);\n      prepareMapCopy(state);\n      state.copy_.set(key, draft);\n      return draft;\n    }\n    keys() {\n      return latest(this[DRAFT_STATE]).keys();\n    }\n    values() {\n      const iterator = this.keys();\n      return {\n        [Symbol.iterator]: () => this.values(),\n        next: () => {\n          const r = iterator.next();\n          if (r.done)\n            return r;\n          const value = this.get(r.value);\n          return {\n            done: false,\n            value\n          };\n        }\n      };\n    }\n    entries() {\n      const iterator = this.keys();\n      return {\n        [Symbol.iterator]: () => this.entries(),\n        next: () => {\n          const r = iterator.next();\n          if (r.done)\n            return r;\n          const value = this.get(r.value);\n          return {\n            done: false,\n            value: [r.value, value]\n          };\n        }\n      };\n    }\n    [(DRAFT_STATE, Symbol.iterator)]() {\n      return this.entries();\n    }\n  }\n  function proxyMap_(target, parent) {\n    return new DraftMap(target, parent);\n  }\n  function prepareMapCopy(state) {\n    if (!state.copy_) {\n      state.assigned_ = /* @__PURE__ */ new Map();\n      state.copy_ = new Map(state.base_);\n    }\n  }\n  class DraftSet extends Set {\n    constructor(target, parent) {\n      super();\n      this[DRAFT_STATE] = {\n        type_: 3 /* Set */,\n        parent_: parent,\n        scope_: parent ? parent.scope_ : getCurrentScope(),\n        modified_: false,\n        finalized_: false,\n        copy_: void 0,\n        base_: target,\n        draft_: this,\n        drafts_: /* @__PURE__ */ new Map(),\n        revoked_: false,\n        isManual_: false\n      };\n    }\n    get size() {\n      return latest(this[DRAFT_STATE]).size;\n    }\n    has(value) {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      if (!state.copy_) {\n        return state.base_.has(value);\n      }\n      if (state.copy_.has(value))\n        return true;\n      if (state.drafts_.has(value) && state.copy_.has(state.drafts_.get(value)))\n        return true;\n      return false;\n    }\n    add(value) {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      if (!this.has(value)) {\n        prepareSetCopy(state);\n        markChanged(state);\n        state.copy_.add(value);\n      }\n      return this;\n    }\n    delete(value) {\n      if (!this.has(value)) {\n        return false;\n      }\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      prepareSetCopy(state);\n      markChanged(state);\n      return state.copy_.delete(value) || (state.drafts_.has(value) ? state.copy_.delete(state.drafts_.get(value)) : (\n        /* istanbul ignore next */\n        false\n      ));\n    }\n    clear() {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      if (latest(state).size) {\n        prepareSetCopy(state);\n        markChanged(state);\n        state.copy_.clear();\n      }\n    }\n    values() {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      prepareSetCopy(state);\n      return state.copy_.values();\n    }\n    entries() {\n      const state = this[DRAFT_STATE];\n      assertUnrevoked(state);\n      prepareSetCopy(state);\n      return state.copy_.entries();\n    }\n    keys() {\n      return this.values();\n    }\n    [(DRAFT_STATE, Symbol.iterator)]() {\n      return this.values();\n    }\n    forEach(cb, thisArg) {\n      const iterator = this.values();\n      let result = iterator.next();\n      while (!result.done) {\n        cb.call(thisArg, result.value, result.value, this);\n        result = iterator.next();\n      }\n    }\n  }\n  function proxySet_(target, parent) {\n    return new DraftSet(target, parent);\n  }\n  function prepareSetCopy(state) {\n    if (!state.copy_) {\n      state.copy_ = /* @__PURE__ */ new Set();\n      state.base_.forEach((value) => {\n        if (isDraftable(value)) {\n          const draft = createProxy(value, state);\n          state.drafts_.set(value, draft);\n          state.copy_.add(draft);\n        } else {\n          state.copy_.add(value);\n        }\n      });\n    }\n  }\n  function assertUnrevoked(state) {\n    if (state.revoked_)\n      die(3, JSON.stringify(latest(state)));\n  }\n  loadPlugin(\"MapSet\", { proxyMap_, proxySet_ });\n}\n\n// src/immer.ts\nvar immer = new Immer2();\nvar produce = immer.produce;\nvar produceWithPatches = /* @__PURE__ */ immer.produceWithPatches.bind(\n  immer\n);\nvar setAutoFreeze = /* @__PURE__ */ immer.setAutoFreeze.bind(immer);\nvar setUseStrictShallowCopy = /* @__PURE__ */ immer.setUseStrictShallowCopy.bind(\n  immer\n);\nvar applyPatches = /* @__PURE__ */ immer.applyPatches.bind(immer);\nvar createDraft = /* @__PURE__ */ immer.createDraft.bind(immer);\nvar finishDraft = /* @__PURE__ */ immer.finishDraft.bind(immer);\nfunction castDraft(value) {\n  return value;\n}\nfunction castImmutable(value) {\n  return value;\n}\nexport {\n  Immer2 as Immer,\n  applyPatches,\n  castDraft,\n  castImmutable,\n  createDraft,\n  current,\n  enableMapSet,\n  enablePatches,\n  finishDraft,\n  freeze,\n  DRAFTABLE as immerable,\n  isDraft,\n  isDraftable,\n  NOTHING as nothing,\n  original,\n  produce,\n  produceWithPatches,\n  setAutoFreeze,\n  setUseStrictShallowCopy\n};\n//# sourceMappingURL=immer.mjs.map","// src/index.ts\nfunction createThunkMiddleware(extraArgument) {\n  const middleware = ({ dispatch, getState }) => (next) => (action) => {\n    if (typeof action === \"function\") {\n      return action(dispatch, getState, extraArgument);\n    }\n    return next(action);\n  };\n  return middleware;\n}\nvar thunk = createThunkMiddleware();\nvar withExtraArgument = createThunkMiddleware;\nexport {\n  thunk,\n  withExtraArgument\n};\n","// src/index.ts\nexport * from \"redux\";\nimport { produce, current as current3, freeze, original as original2, isDraft as isDraft5 } from \"immer\";\nimport { createSelector, createSelectorCreator as createSelectorCreator2, lruMemoize, weakMapMemoize as weakMapMemoize2 } from \"reselect\";\n\n// src/createDraftSafeSelector.ts\nimport { current, isDraft } from \"immer\";\nimport { createSelectorCreator, weakMapMemoize } from \"reselect\";\nvar createDraftSafeSelectorCreator = (...args) => {\n  const createSelector2 = createSelectorCreator(...args);\n  const createDraftSafeSelector2 = Object.assign((...args2) => {\n    const selector = createSelector2(...args2);\n    const wrappedSelector = (value, ...rest) => selector(isDraft(value) ? current(value) : value, ...rest);\n    Object.assign(wrappedSelector, selector);\n    return wrappedSelector;\n  }, {\n    withTypes: () => createDraftSafeSelector2\n  });\n  return createDraftSafeSelector2;\n};\nvar createDraftSafeSelector = /* @__PURE__ */ createDraftSafeSelectorCreator(weakMapMemoize);\n\n// src/configureStore.ts\nimport { applyMiddleware, createStore, compose as compose2, combineReducers, isPlainObject as isPlainObject2 } from \"redux\";\n\n// src/devtoolsExtension.ts\nimport { compose } from \"redux\";\nvar composeWithDevTools = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {\n  if (arguments.length === 0) return void 0;\n  if (typeof arguments[0] === \"object\") return compose;\n  return compose.apply(null, arguments);\n};\nvar devToolsEnhancer = typeof window !== \"undefined\" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function() {\n  return function(noop3) {\n    return noop3;\n  };\n};\n\n// src/getDefaultMiddleware.ts\nimport { thunk as thunkMiddleware, withExtraArgument } from \"redux-thunk\";\n\n// src/createAction.ts\nimport { isAction } from \"redux\";\n\n// src/tsHelpers.ts\nvar hasMatchFunction = (v) => {\n  return v && typeof v.match === \"function\";\n};\n\n// src/createAction.ts\nfunction createAction(type, prepareAction) {\n  function actionCreator(...args) {\n    if (prepareAction) {\n      let prepared = prepareAction(...args);\n      if (!prepared) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(0) : \"prepareAction did not return an object\");\n      }\n      return {\n        type,\n        payload: prepared.payload,\n        ...\"meta\" in prepared && {\n          meta: prepared.meta\n        },\n        ...\"error\" in prepared && {\n          error: prepared.error\n        }\n      };\n    }\n    return {\n      type,\n      payload: args[0]\n    };\n  }\n  actionCreator.toString = () => `${type}`;\n  actionCreator.type = type;\n  actionCreator.match = (action) => isAction(action) && action.type === type;\n  return actionCreator;\n}\nfunction isActionCreator(action) {\n  return typeof action === \"function\" && \"type\" in action && // hasMatchFunction only wants Matchers but I don't see the point in rewriting it\n  hasMatchFunction(action);\n}\nfunction isFSA(action) {\n  return isAction(action) && Object.keys(action).every(isValidKey);\n}\nfunction isValidKey(key) {\n  return [\"type\", \"payload\", \"error\", \"meta\"].indexOf(key) > -1;\n}\n\n// src/actionCreatorInvariantMiddleware.ts\nfunction getMessage(type) {\n  const splitType = type ? `${type}`.split(\"/\") : [];\n  const actionName = splitType[splitType.length - 1] || \"actionCreator\";\n  return `Detected an action creator with type \"${type || \"unknown\"}\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \\`dispatch(${actionName}())\\` instead of \\`dispatch(${actionName})\\`. This is necessary even if the action has no payload.`;\n}\nfunction createActionCreatorInvariantMiddleware(options = {}) {\n  if (process.env.NODE_ENV === \"production\") {\n    return () => (next) => (action) => next(action);\n  }\n  const {\n    isActionCreator: isActionCreator2 = isActionCreator\n  } = options;\n  return () => (next) => (action) => {\n    if (isActionCreator2(action)) {\n      console.warn(getMessage(action.type));\n    }\n    return next(action);\n  };\n}\n\n// src/utils.ts\nimport { produce as createNextState, isDraftable } from \"immer\";\nfunction getTimeMeasureUtils(maxDelay, fnName) {\n  let elapsed = 0;\n  return {\n    measureTime(fn) {\n      const started = Date.now();\n      try {\n        return fn();\n      } finally {\n        const finished = Date.now();\n        elapsed += finished - started;\n      }\n    },\n    warnIfExceeded() {\n      if (elapsed > maxDelay) {\n        console.warn(`${fnName} took ${elapsed}ms, which is more than the warning threshold of ${maxDelay}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`);\n      }\n    }\n  };\n}\nvar Tuple = class _Tuple extends Array {\n  constructor(...items) {\n    super(...items);\n    Object.setPrototypeOf(this, _Tuple.prototype);\n  }\n  static get [Symbol.species]() {\n    return _Tuple;\n  }\n  concat(...arr) {\n    return super.concat.apply(this, arr);\n  }\n  prepend(...arr) {\n    if (arr.length === 1 && Array.isArray(arr[0])) {\n      return new _Tuple(...arr[0].concat(this));\n    }\n    return new _Tuple(...arr.concat(this));\n  }\n};\nfunction freezeDraftable(val) {\n  return isDraftable(val) ? createNextState(val, () => {\n  }) : val;\n}\nfunction getOrInsertComputed(map, key, compute) {\n  if (map.has(key)) return map.get(key);\n  return map.set(key, compute(key)).get(key);\n}\n\n// src/immutableStateInvariantMiddleware.ts\nfunction isImmutableDefault(value) {\n  return typeof value !== \"object\" || value == null || Object.isFrozen(value);\n}\nfunction trackForMutations(isImmutable, ignorePaths, obj) {\n  const trackedProperties = trackProperties(isImmutable, ignorePaths, obj);\n  return {\n    detectMutations() {\n      return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);\n    }\n  };\n}\nfunction trackProperties(isImmutable, ignorePaths = [], obj, path = \"\", checkedObjects = /* @__PURE__ */ new Set()) {\n  const tracked = {\n    value: obj\n  };\n  if (!isImmutable(obj) && !checkedObjects.has(obj)) {\n    checkedObjects.add(obj);\n    tracked.children = {};\n    for (const key in obj) {\n      const childPath = path ? path + \".\" + key : key;\n      if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {\n        continue;\n      }\n      tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);\n    }\n  }\n  return tracked;\n}\nfunction detectMutations(isImmutable, ignoredPaths = [], trackedProperty, obj, sameParentRef = false, path = \"\") {\n  const prevObj = trackedProperty ? trackedProperty.value : void 0;\n  const sameRef = prevObj === obj;\n  if (sameParentRef && !sameRef && !Number.isNaN(obj)) {\n    return {\n      wasMutated: true,\n      path\n    };\n  }\n  if (isImmutable(prevObj) || isImmutable(obj)) {\n    return {\n      wasMutated: false\n    };\n  }\n  const keysToDetect = {};\n  for (let key in trackedProperty.children) {\n    keysToDetect[key] = true;\n  }\n  for (let key in obj) {\n    keysToDetect[key] = true;\n  }\n  const hasIgnoredPaths = ignoredPaths.length > 0;\n  for (let key in keysToDetect) {\n    const nestedPath = path ? path + \".\" + key : key;\n    if (hasIgnoredPaths) {\n      const hasMatches = ignoredPaths.some((ignored) => {\n        if (ignored instanceof RegExp) {\n          return ignored.test(nestedPath);\n        }\n        return nestedPath === ignored;\n      });\n      if (hasMatches) {\n        continue;\n      }\n    }\n    const result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);\n    if (result.wasMutated) {\n      return result;\n    }\n  }\n  return {\n    wasMutated: false\n  };\n}\nfunction createImmutableStateInvariantMiddleware(options = {}) {\n  if (process.env.NODE_ENV === \"production\") {\n    return () => (next) => (action) => next(action);\n  } else {\n    let stringify2 = function(obj, serializer, indent, decycler) {\n      return JSON.stringify(obj, getSerialize2(serializer, decycler), indent);\n    }, getSerialize2 = function(serializer, decycler) {\n      let stack = [], keys = [];\n      if (!decycler) decycler = function(_, value) {\n        if (stack[0] === value) return \"[Circular ~]\";\n        return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\n      };\n      return function(key, value) {\n        if (stack.length > 0) {\n          var thisPos = stack.indexOf(this);\n          ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n          ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n          if (~stack.indexOf(value)) value = decycler.call(this, key, value);\n        } else stack.push(value);\n        return serializer == null ? value : serializer.call(this, key, value);\n      };\n    };\n    var stringify = stringify2, getSerialize = getSerialize2;\n    let {\n      isImmutable = isImmutableDefault,\n      ignoredPaths,\n      warnAfter = 32\n    } = options;\n    const track = trackForMutations.bind(null, isImmutable, ignoredPaths);\n    return ({\n      getState\n    }) => {\n      let state = getState();\n      let tracker = track(state);\n      let result;\n      return (next) => (action) => {\n        const measureUtils = getTimeMeasureUtils(warnAfter, \"ImmutableStateInvariantMiddleware\");\n        measureUtils.measureTime(() => {\n          state = getState();\n          result = tracker.detectMutations();\n          tracker = track(state);\n          if (result.wasMutated) {\n            throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(19) : `A state mutation was detected between dispatches, in the path '${result.path || \"\"}'.  This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);\n          }\n        });\n        const dispatchedAction = next(action);\n        measureUtils.measureTime(() => {\n          state = getState();\n          result = tracker.detectMutations();\n          tracker = track(state);\n          if (result.wasMutated) {\n            throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(20) : `A state mutation was detected inside a dispatch, in the path: ${result.path || \"\"}. Take a look at the reducer(s) handling the action ${stringify2(action)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);\n          }\n        });\n        measureUtils.warnIfExceeded();\n        return dispatchedAction;\n      };\n    };\n  }\n}\n\n// src/serializableStateInvariantMiddleware.ts\nimport { isAction as isAction2, isPlainObject } from \"redux\";\nfunction isPlain(val) {\n  const type = typeof val;\n  return val == null || type === \"string\" || type === \"boolean\" || type === \"number\" || Array.isArray(val) || isPlainObject(val);\n}\nfunction findNonSerializableValue(value, path = \"\", isSerializable = isPlain, getEntries, ignoredPaths = [], cache) {\n  let foundNestedSerializable;\n  if (!isSerializable(value)) {\n    return {\n      keyPath: path || \"<root>\",\n      value\n    };\n  }\n  if (typeof value !== \"object\" || value === null) {\n    return false;\n  }\n  if (cache?.has(value)) return false;\n  const entries = getEntries != null ? getEntries(value) : Object.entries(value);\n  const hasIgnoredPaths = ignoredPaths.length > 0;\n  for (const [key, nestedValue] of entries) {\n    const nestedPath = path ? path + \".\" + key : key;\n    if (hasIgnoredPaths) {\n      const hasMatches = ignoredPaths.some((ignored) => {\n        if (ignored instanceof RegExp) {\n          return ignored.test(nestedPath);\n        }\n        return nestedPath === ignored;\n      });\n      if (hasMatches) {\n        continue;\n      }\n    }\n    if (!isSerializable(nestedValue)) {\n      return {\n        keyPath: nestedPath,\n        value: nestedValue\n      };\n    }\n    if (typeof nestedValue === \"object\") {\n      foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);\n      if (foundNestedSerializable) {\n        return foundNestedSerializable;\n      }\n    }\n  }\n  if (cache && isNestedFrozen(value)) cache.add(value);\n  return false;\n}\nfunction isNestedFrozen(value) {\n  if (!Object.isFrozen(value)) return false;\n  for (const nestedValue of Object.values(value)) {\n    if (typeof nestedValue !== \"object\" || nestedValue === null) continue;\n    if (!isNestedFrozen(nestedValue)) return false;\n  }\n  return true;\n}\nfunction createSerializableStateInvariantMiddleware(options = {}) {\n  if (process.env.NODE_ENV === \"production\") {\n    return () => (next) => (action) => next(action);\n  } else {\n    const {\n      isSerializable = isPlain,\n      getEntries,\n      ignoredActions = [],\n      ignoredActionPaths = [\"meta.arg\", \"meta.baseQueryMeta\"],\n      ignoredPaths = [],\n      warnAfter = 32,\n      ignoreState = false,\n      ignoreActions = false,\n      disableCache = false\n    } = options;\n    const cache = !disableCache && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;\n    return (storeAPI) => (next) => (action) => {\n      if (!isAction2(action)) {\n        return next(action);\n      }\n      const result = next(action);\n      const measureUtils = getTimeMeasureUtils(warnAfter, \"SerializableStateInvariantMiddleware\");\n      if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {\n        measureUtils.measureTime(() => {\n          const foundActionNonSerializableValue = findNonSerializableValue(action, \"\", isSerializable, getEntries, ignoredActionPaths, cache);\n          if (foundActionNonSerializableValue) {\n            const {\n              keyPath,\n              value\n            } = foundActionNonSerializableValue;\n            console.error(`A non-serializable value was detected in an action, in the path: \\`${keyPath}\\`. Value:`, value, \"\\nTake a look at the logic that dispatched this action: \", action, \"\\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)\", \"\\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)\");\n          }\n        });\n      }\n      if (!ignoreState) {\n        measureUtils.measureTime(() => {\n          const state = storeAPI.getState();\n          const foundStateNonSerializableValue = findNonSerializableValue(state, \"\", isSerializable, getEntries, ignoredPaths, cache);\n          if (foundStateNonSerializableValue) {\n            const {\n              keyPath,\n              value\n            } = foundStateNonSerializableValue;\n            console.error(`A non-serializable value was detected in the state, in the path: \\`${keyPath}\\`. Value:`, value, `\nTake a look at the reducer(s) handling this action type: ${action.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);\n          }\n        });\n        measureUtils.warnIfExceeded();\n      }\n      return result;\n    };\n  }\n}\n\n// src/getDefaultMiddleware.ts\nfunction isBoolean(x) {\n  return typeof x === \"boolean\";\n}\nvar buildGetDefaultMiddleware = () => function getDefaultMiddleware(options) {\n  const {\n    thunk = true,\n    immutableCheck = true,\n    serializableCheck = true,\n    actionCreatorCheck = true\n  } = options ?? {};\n  let middlewareArray = new Tuple();\n  if (thunk) {\n    if (isBoolean(thunk)) {\n      middlewareArray.push(thunkMiddleware);\n    } else {\n      middlewareArray.push(withExtraArgument(thunk.extraArgument));\n    }\n  }\n  if (process.env.NODE_ENV !== \"production\") {\n    if (immutableCheck) {\n      let immutableOptions = {};\n      if (!isBoolean(immutableCheck)) {\n        immutableOptions = immutableCheck;\n      }\n      middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));\n    }\n    if (serializableCheck) {\n      let serializableOptions = {};\n      if (!isBoolean(serializableCheck)) {\n        serializableOptions = serializableCheck;\n      }\n      middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));\n    }\n    if (actionCreatorCheck) {\n      let actionCreatorOptions = {};\n      if (!isBoolean(actionCreatorCheck)) {\n        actionCreatorOptions = actionCreatorCheck;\n      }\n      middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));\n    }\n  }\n  return middlewareArray;\n};\n\n// src/autoBatchEnhancer.ts\nvar SHOULD_AUTOBATCH = \"RTK_autoBatch\";\nvar prepareAutoBatched = () => (payload) => ({\n  payload,\n  meta: {\n    [SHOULD_AUTOBATCH]: true\n  }\n});\nvar createQueueWithTimer = (timeout) => {\n  return (notify) => {\n    setTimeout(notify, timeout);\n  };\n};\nvar autoBatchEnhancer = (options = {\n  type: \"raf\"\n}) => (next) => (...args) => {\n  const store = next(...args);\n  let notifying = true;\n  let shouldNotifyAtEndOfTick = false;\n  let notificationQueued = false;\n  const listeners = /* @__PURE__ */ new Set();\n  const queueCallback = options.type === \"tick\" ? queueMicrotask : options.type === \"raf\" ? (\n    // requestAnimationFrame won't exist in SSR environments. Fall back to a vague approximation just to keep from erroring.\n    typeof window !== \"undefined\" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10)\n  ) : options.type === \"callback\" ? options.queueNotification : createQueueWithTimer(options.timeout);\n  const notifyListeners = () => {\n    notificationQueued = false;\n    if (shouldNotifyAtEndOfTick) {\n      shouldNotifyAtEndOfTick = false;\n      listeners.forEach((l) => l());\n    }\n  };\n  return Object.assign({}, store, {\n    // Override the base `store.subscribe` method to keep original listeners\n    // from running if we're delaying notifications\n    subscribe(listener2) {\n      const wrappedListener = () => notifying && listener2();\n      const unsubscribe = store.subscribe(wrappedListener);\n      listeners.add(listener2);\n      return () => {\n        unsubscribe();\n        listeners.delete(listener2);\n      };\n    },\n    // Override the base `store.dispatch` method so that we can check actions\n    // for the `shouldAutoBatch` flag and determine if batching is active\n    dispatch(action) {\n      try {\n        notifying = !action?.meta?.[SHOULD_AUTOBATCH];\n        shouldNotifyAtEndOfTick = !notifying;\n        if (shouldNotifyAtEndOfTick) {\n          if (!notificationQueued) {\n            notificationQueued = true;\n            queueCallback(notifyListeners);\n          }\n        }\n        return store.dispatch(action);\n      } finally {\n        notifying = true;\n      }\n    }\n  });\n};\n\n// src/getDefaultEnhancers.ts\nvar buildGetDefaultEnhancers = (middlewareEnhancer) => function getDefaultEnhancers(options) {\n  const {\n    autoBatch = true\n  } = options ?? {};\n  let enhancerArray = new Tuple(middlewareEnhancer);\n  if (autoBatch) {\n    enhancerArray.push(autoBatchEnhancer(typeof autoBatch === \"object\" ? autoBatch : void 0));\n  }\n  return enhancerArray;\n};\n\n// src/configureStore.ts\nfunction configureStore(options) {\n  const getDefaultMiddleware = buildGetDefaultMiddleware();\n  const {\n    reducer = void 0,\n    middleware,\n    devTools = true,\n    duplicateMiddlewareCheck = true,\n    preloadedState = void 0,\n    enhancers = void 0\n  } = options || {};\n  let rootReducer;\n  if (typeof reducer === \"function\") {\n    rootReducer = reducer;\n  } else if (isPlainObject2(reducer)) {\n    rootReducer = combineReducers(reducer);\n  } else {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(1) : \"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers\");\n  }\n  if (process.env.NODE_ENV !== \"production\" && middleware && typeof middleware !== \"function\") {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(2) : \"`middleware` field must be a callback\");\n  }\n  let finalMiddleware;\n  if (typeof middleware === \"function\") {\n    finalMiddleware = middleware(getDefaultMiddleware);\n    if (process.env.NODE_ENV !== \"production\" && !Array.isArray(finalMiddleware)) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(3) : \"when using a middleware builder function, an array of middleware must be returned\");\n    }\n  } else {\n    finalMiddleware = getDefaultMiddleware();\n  }\n  if (process.env.NODE_ENV !== \"production\" && finalMiddleware.some((item) => typeof item !== \"function\")) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(4) : \"each middleware provided to configureStore must be a function\");\n  }\n  if (process.env.NODE_ENV !== \"production\" && duplicateMiddlewareCheck) {\n    let middlewareReferences = /* @__PURE__ */ new Set();\n    finalMiddleware.forEach((middleware2) => {\n      if (middlewareReferences.has(middleware2)) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(42) : \"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.\");\n      }\n      middlewareReferences.add(middleware2);\n    });\n  }\n  let finalCompose = compose2;\n  if (devTools) {\n    finalCompose = composeWithDevTools({\n      // Enable capture of stack traces for dispatched Redux actions\n      trace: process.env.NODE_ENV !== \"production\",\n      ...typeof devTools === \"object\" && devTools\n    });\n  }\n  const middlewareEnhancer = applyMiddleware(...finalMiddleware);\n  const getDefaultEnhancers = buildGetDefaultEnhancers(middlewareEnhancer);\n  if (process.env.NODE_ENV !== \"production\" && enhancers && typeof enhancers !== \"function\") {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(5) : \"`enhancers` field must be a callback\");\n  }\n  let storeEnhancers = typeof enhancers === \"function\" ? enhancers(getDefaultEnhancers) : getDefaultEnhancers();\n  if (process.env.NODE_ENV !== \"production\" && !Array.isArray(storeEnhancers)) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(6) : \"`enhancers` callback must return an array\");\n  }\n  if (process.env.NODE_ENV !== \"production\" && storeEnhancers.some((item) => typeof item !== \"function\")) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(7) : \"each enhancer provided to configureStore must be a function\");\n  }\n  if (process.env.NODE_ENV !== \"production\" && finalMiddleware.length && !storeEnhancers.includes(middlewareEnhancer)) {\n    console.error(\"middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`\");\n  }\n  const composedEnhancer = finalCompose(...storeEnhancers);\n  return createStore(rootReducer, preloadedState, composedEnhancer);\n}\n\n// src/createReducer.ts\nimport { produce as createNextState2, isDraft as isDraft2, isDraftable as isDraftable2 } from \"immer\";\n\n// src/mapBuilders.ts\nfunction executeReducerBuilderCallback(builderCallback) {\n  const actionsMap = {};\n  const actionMatchers = [];\n  let defaultCaseReducer;\n  const builder = {\n    addCase(typeOrActionCreator, reducer) {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (actionMatchers.length > 0) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(26) : \"`builder.addCase` should only be called before calling `builder.addMatcher`\");\n        }\n        if (defaultCaseReducer) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(27) : \"`builder.addCase` should only be called before calling `builder.addDefaultCase`\");\n        }\n      }\n      const type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\n      if (!type) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(28) : \"`builder.addCase` cannot be called with an empty action type\");\n      }\n      if (type in actionsMap) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(29) : `\\`builder.addCase\\` cannot be called with two reducers for the same action type '${type}'`);\n      }\n      actionsMap[type] = reducer;\n      return builder;\n    },\n    addAsyncThunk(asyncThunk, reducers) {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (defaultCaseReducer) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(43) : \"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`\");\n        }\n      }\n      if (reducers.pending) actionsMap[asyncThunk.pending.type] = reducers.pending;\n      if (reducers.rejected) actionsMap[asyncThunk.rejected.type] = reducers.rejected;\n      if (reducers.fulfilled) actionsMap[asyncThunk.fulfilled.type] = reducers.fulfilled;\n      if (reducers.settled) actionMatchers.push({\n        matcher: asyncThunk.settled,\n        reducer: reducers.settled\n      });\n      return builder;\n    },\n    addMatcher(matcher, reducer) {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (defaultCaseReducer) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(30) : \"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`\");\n        }\n      }\n      actionMatchers.push({\n        matcher,\n        reducer\n      });\n      return builder;\n    },\n    addDefaultCase(reducer) {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (defaultCaseReducer) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(31) : \"`builder.addDefaultCase` can only be called once\");\n        }\n      }\n      defaultCaseReducer = reducer;\n      return builder;\n    }\n  };\n  builderCallback(builder);\n  return [actionsMap, actionMatchers, defaultCaseReducer];\n}\n\n// src/createReducer.ts\nfunction isStateFunction(x) {\n  return typeof x === \"function\";\n}\nfunction createReducer(initialState, mapOrBuilderCallback) {\n  if (process.env.NODE_ENV !== \"production\") {\n    if (typeof mapOrBuilderCallback === \"object\") {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(8) : \"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer\");\n    }\n  }\n  let [actionsMap, finalActionMatchers, finalDefaultCaseReducer] = executeReducerBuilderCallback(mapOrBuilderCallback);\n  let getInitialState;\n  if (isStateFunction(initialState)) {\n    getInitialState = () => freezeDraftable(initialState());\n  } else {\n    const frozenInitialState = freezeDraftable(initialState);\n    getInitialState = () => frozenInitialState;\n  }\n  function reducer(state = getInitialState(), action) {\n    let caseReducers = [actionsMap[action.type], ...finalActionMatchers.filter(({\n      matcher\n    }) => matcher(action)).map(({\n      reducer: reducer2\n    }) => reducer2)];\n    if (caseReducers.filter((cr) => !!cr).length === 0) {\n      caseReducers = [finalDefaultCaseReducer];\n    }\n    return caseReducers.reduce((previousState, caseReducer) => {\n      if (caseReducer) {\n        if (isDraft2(previousState)) {\n          const draft = previousState;\n          const result = caseReducer(draft, action);\n          if (result === void 0) {\n            return previousState;\n          }\n          return result;\n        } else if (!isDraftable2(previousState)) {\n          const result = caseReducer(previousState, action);\n          if (result === void 0) {\n            if (previousState === null) {\n              return previousState;\n            }\n            throw Error(\"A case reducer on a non-draftable value must not return undefined\");\n          }\n          return result;\n        } else {\n          return createNextState2(previousState, (draft) => {\n            return caseReducer(draft, action);\n          });\n        }\n      }\n      return previousState;\n    }, state);\n  }\n  reducer.getInitialState = getInitialState;\n  return reducer;\n}\n\n// src/matchers.ts\nvar matches = (matcher, action) => {\n  if (hasMatchFunction(matcher)) {\n    return matcher.match(action);\n  } else {\n    return matcher(action);\n  }\n};\nfunction isAnyOf(...matchers) {\n  return (action) => {\n    return matchers.some((matcher) => matches(matcher, action));\n  };\n}\nfunction isAllOf(...matchers) {\n  return (action) => {\n    return matchers.every((matcher) => matches(matcher, action));\n  };\n}\nfunction hasExpectedRequestMetadata(action, validStatus) {\n  if (!action || !action.meta) return false;\n  const hasValidRequestId = typeof action.meta.requestId === \"string\";\n  const hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;\n  return hasValidRequestId && hasValidRequestStatus;\n}\nfunction isAsyncThunkArray(a) {\n  return typeof a[0] === \"function\" && \"pending\" in a[0] && \"fulfilled\" in a[0] && \"rejected\" in a[0];\n}\nfunction isPending(...asyncThunks) {\n  if (asyncThunks.length === 0) {\n    return (action) => hasExpectedRequestMetadata(action, [\"pending\"]);\n  }\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isPending()(asyncThunks[0]);\n  }\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.pending));\n}\nfunction isRejected(...asyncThunks) {\n  if (asyncThunks.length === 0) {\n    return (action) => hasExpectedRequestMetadata(action, [\"rejected\"]);\n  }\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isRejected()(asyncThunks[0]);\n  }\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.rejected));\n}\nfunction isRejectedWithValue(...asyncThunks) {\n  const hasFlag = (action) => {\n    return action && action.meta && action.meta.rejectedWithValue;\n  };\n  if (asyncThunks.length === 0) {\n    return isAllOf(isRejected(...asyncThunks), hasFlag);\n  }\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isRejectedWithValue()(asyncThunks[0]);\n  }\n  return isAllOf(isRejected(...asyncThunks), hasFlag);\n}\nfunction isFulfilled(...asyncThunks) {\n  if (asyncThunks.length === 0) {\n    return (action) => hasExpectedRequestMetadata(action, [\"fulfilled\"]);\n  }\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isFulfilled()(asyncThunks[0]);\n  }\n  return isAnyOf(...asyncThunks.map((asyncThunk) => asyncThunk.fulfilled));\n}\nfunction isAsyncThunkAction(...asyncThunks) {\n  if (asyncThunks.length === 0) {\n    return (action) => hasExpectedRequestMetadata(action, [\"pending\", \"fulfilled\", \"rejected\"]);\n  }\n  if (!isAsyncThunkArray(asyncThunks)) {\n    return isAsyncThunkAction()(asyncThunks[0]);\n  }\n  return isAnyOf(...asyncThunks.flatMap((asyncThunk) => [asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled]));\n}\n\n// src/nanoid.ts\nvar urlAlphabet = \"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW\";\nvar nanoid = (size = 21) => {\n  let id = \"\";\n  let i = size;\n  while (i--) {\n    id += urlAlphabet[Math.random() * 64 | 0];\n  }\n  return id;\n};\n\n// src/createAsyncThunk.ts\nvar commonProperties = [\"name\", \"message\", \"stack\", \"code\"];\nvar RejectWithValue = class {\n  constructor(payload, meta) {\n    this.payload = payload;\n    this.meta = meta;\n  }\n  /*\n  type-only property to distinguish between RejectWithValue and FulfillWithMeta\n  does not exist at runtime\n  */\n  _type;\n};\nvar FulfillWithMeta = class {\n  constructor(payload, meta) {\n    this.payload = payload;\n    this.meta = meta;\n  }\n  /*\n  type-only property to distinguish between RejectWithValue and FulfillWithMeta\n  does not exist at runtime\n  */\n  _type;\n};\nvar miniSerializeError = (value) => {\n  if (typeof value === \"object\" && value !== null) {\n    const simpleError = {};\n    for (const property of commonProperties) {\n      if (typeof value[property] === \"string\") {\n        simpleError[property] = value[property];\n      }\n    }\n    return simpleError;\n  }\n  return {\n    message: String(value)\n  };\n};\nvar externalAbortMessage = \"External signal was aborted\";\nvar createAsyncThunk = /* @__PURE__ */ (() => {\n  function createAsyncThunk2(typePrefix, payloadCreator, options) {\n    const fulfilled = createAction(typePrefix + \"/fulfilled\", (payload, requestId, arg, meta) => ({\n      payload,\n      meta: {\n        ...meta || {},\n        arg,\n        requestId,\n        requestStatus: \"fulfilled\"\n      }\n    }));\n    const pending = createAction(typePrefix + \"/pending\", (requestId, arg, meta) => ({\n      payload: void 0,\n      meta: {\n        ...meta || {},\n        arg,\n        requestId,\n        requestStatus: \"pending\"\n      }\n    }));\n    const rejected = createAction(typePrefix + \"/rejected\", (error, requestId, arg, payload, meta) => ({\n      payload,\n      error: (options && options.serializeError || miniSerializeError)(error || \"Rejected\"),\n      meta: {\n        ...meta || {},\n        arg,\n        requestId,\n        rejectedWithValue: !!payload,\n        requestStatus: \"rejected\",\n        aborted: error?.name === \"AbortError\",\n        condition: error?.name === \"ConditionError\"\n      }\n    }));\n    function actionCreator(arg, {\n      signal\n    } = {}) {\n      return (dispatch, getState, extra) => {\n        const requestId = options?.idGenerator ? options.idGenerator(arg) : nanoid();\n        const abortController = new AbortController();\n        let abortHandler;\n        let abortReason;\n        function abort(reason) {\n          abortReason = reason;\n          abortController.abort();\n        }\n        if (signal) {\n          if (signal.aborted) {\n            abort(externalAbortMessage);\n          } else {\n            signal.addEventListener(\"abort\", () => abort(externalAbortMessage), {\n              once: true\n            });\n          }\n        }\n        const promise = async function() {\n          let finalAction;\n          try {\n            let conditionResult = options?.condition?.(arg, {\n              getState,\n              extra\n            });\n            if (isThenable(conditionResult)) {\n              conditionResult = await conditionResult;\n            }\n            if (conditionResult === false || abortController.signal.aborted) {\n              throw {\n                name: \"ConditionError\",\n                message: \"Aborted due to condition callback returning false.\"\n              };\n            }\n            const abortedPromise = new Promise((_, reject) => {\n              abortHandler = () => {\n                reject({\n                  name: \"AbortError\",\n                  message: abortReason || \"Aborted\"\n                });\n              };\n              abortController.signal.addEventListener(\"abort\", abortHandler);\n            });\n            dispatch(pending(requestId, arg, options?.getPendingMeta?.({\n              requestId,\n              arg\n            }, {\n              getState,\n              extra\n            })));\n            finalAction = await Promise.race([abortedPromise, Promise.resolve(payloadCreator(arg, {\n              dispatch,\n              getState,\n              extra,\n              requestId,\n              signal: abortController.signal,\n              abort,\n              rejectWithValue: (value, meta) => {\n                return new RejectWithValue(value, meta);\n              },\n              fulfillWithValue: (value, meta) => {\n                return new FulfillWithMeta(value, meta);\n              }\n            })).then((result) => {\n              if (result instanceof RejectWithValue) {\n                throw result;\n              }\n              if (result instanceof FulfillWithMeta) {\n                return fulfilled(result.payload, requestId, arg, result.meta);\n              }\n              return fulfilled(result, requestId, arg);\n            })]);\n          } catch (err) {\n            finalAction = err instanceof RejectWithValue ? rejected(null, requestId, arg, err.payload, err.meta) : rejected(err, requestId, arg);\n          } finally {\n            if (abortHandler) {\n              abortController.signal.removeEventListener(\"abort\", abortHandler);\n            }\n          }\n          const skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;\n          if (!skipDispatch) {\n            dispatch(finalAction);\n          }\n          return finalAction;\n        }();\n        return Object.assign(promise, {\n          abort,\n          requestId,\n          arg,\n          unwrap() {\n            return promise.then(unwrapResult);\n          }\n        });\n      };\n    }\n    return Object.assign(actionCreator, {\n      pending,\n      rejected,\n      fulfilled,\n      settled: isAnyOf(rejected, fulfilled),\n      typePrefix\n    });\n  }\n  createAsyncThunk2.withTypes = () => createAsyncThunk2;\n  return createAsyncThunk2;\n})();\nfunction unwrapResult(action) {\n  if (action.meta && action.meta.rejectedWithValue) {\n    throw action.payload;\n  }\n  if (action.error) {\n    throw action.error;\n  }\n  return action.payload;\n}\nfunction isThenable(value) {\n  return value !== null && typeof value === \"object\" && typeof value.then === \"function\";\n}\n\n// src/createSlice.ts\nvar asyncThunkSymbol = /* @__PURE__ */ Symbol.for(\"rtk-slice-createasyncthunk\");\nvar asyncThunkCreator = {\n  [asyncThunkSymbol]: createAsyncThunk\n};\nvar ReducerType = /* @__PURE__ */ ((ReducerType2) => {\n  ReducerType2[\"reducer\"] = \"reducer\";\n  ReducerType2[\"reducerWithPrepare\"] = \"reducerWithPrepare\";\n  ReducerType2[\"asyncThunk\"] = \"asyncThunk\";\n  return ReducerType2;\n})(ReducerType || {});\nfunction getType(slice, actionKey) {\n  return `${slice}/${actionKey}`;\n}\nfunction buildCreateSlice({\n  creators\n} = {}) {\n  const cAT = creators?.asyncThunk?.[asyncThunkSymbol];\n  return function createSlice2(options) {\n    const {\n      name,\n      reducerPath = name\n    } = options;\n    if (!name) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(11) : \"`name` is a required option for createSlice\");\n    }\n    if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\n      if (options.initialState === void 0) {\n        console.error(\"You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`\");\n      }\n    }\n    const reducers = (typeof options.reducers === \"function\" ? options.reducers(buildReducerCreators()) : options.reducers) || {};\n    const reducerNames = Object.keys(reducers);\n    const context = {\n      sliceCaseReducersByName: {},\n      sliceCaseReducersByType: {},\n      actionCreators: {},\n      sliceMatchers: []\n    };\n    const contextMethods = {\n      addCase(typeOrActionCreator, reducer2) {\n        const type = typeof typeOrActionCreator === \"string\" ? typeOrActionCreator : typeOrActionCreator.type;\n        if (!type) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(12) : \"`context.addCase` cannot be called with an empty action type\");\n        }\n        if (type in context.sliceCaseReducersByType) {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(13) : \"`context.addCase` cannot be called with two reducers for the same action type: \" + type);\n        }\n        context.sliceCaseReducersByType[type] = reducer2;\n        return contextMethods;\n      },\n      addMatcher(matcher, reducer2) {\n        context.sliceMatchers.push({\n          matcher,\n          reducer: reducer2\n        });\n        return contextMethods;\n      },\n      exposeAction(name2, actionCreator) {\n        context.actionCreators[name2] = actionCreator;\n        return contextMethods;\n      },\n      exposeCaseReducer(name2, reducer2) {\n        context.sliceCaseReducersByName[name2] = reducer2;\n        return contextMethods;\n      }\n    };\n    reducerNames.forEach((reducerName) => {\n      const reducerDefinition = reducers[reducerName];\n      const reducerDetails = {\n        reducerName,\n        type: getType(name, reducerName),\n        createNotation: typeof options.reducers === \"function\"\n      };\n      if (isAsyncThunkSliceReducerDefinition(reducerDefinition)) {\n        handleThunkCaseReducerDefinition(reducerDetails, reducerDefinition, contextMethods, cAT);\n      } else {\n        handleNormalReducerDefinition(reducerDetails, reducerDefinition, contextMethods);\n      }\n    });\n    function buildReducer() {\n      if (process.env.NODE_ENV !== \"production\") {\n        if (typeof options.extraReducers === \"object\") {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(14) : \"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice\");\n        }\n      }\n      const [extraReducers = {}, actionMatchers = [], defaultCaseReducer = void 0] = typeof options.extraReducers === \"function\" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers];\n      const finalCaseReducers = {\n        ...extraReducers,\n        ...context.sliceCaseReducersByType\n      };\n      return createReducer(options.initialState, (builder) => {\n        for (let key in finalCaseReducers) {\n          builder.addCase(key, finalCaseReducers[key]);\n        }\n        for (let sM of context.sliceMatchers) {\n          builder.addMatcher(sM.matcher, sM.reducer);\n        }\n        for (let m of actionMatchers) {\n          builder.addMatcher(m.matcher, m.reducer);\n        }\n        if (defaultCaseReducer) {\n          builder.addDefaultCase(defaultCaseReducer);\n        }\n      });\n    }\n    const selectSelf = (state) => state;\n    const injectedSelectorCache = /* @__PURE__ */ new Map();\n    const injectedStateCache = /* @__PURE__ */ new WeakMap();\n    let _reducer;\n    function reducer(state, action) {\n      if (!_reducer) _reducer = buildReducer();\n      return _reducer(state, action);\n    }\n    function getInitialState() {\n      if (!_reducer) _reducer = buildReducer();\n      return _reducer.getInitialState();\n    }\n    function makeSelectorProps(reducerPath2, injected = false) {\n      function selectSlice(state) {\n        let sliceState = state[reducerPath2];\n        if (typeof sliceState === \"undefined\") {\n          if (injected) {\n            sliceState = getOrInsertComputed(injectedStateCache, selectSlice, getInitialState);\n          } else if (process.env.NODE_ENV !== \"production\") {\n            throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(15) : \"selectSlice returned undefined for an uninjected slice reducer\");\n          }\n        }\n        return sliceState;\n      }\n      function getSelectors(selectState = selectSelf) {\n        const selectorCache = getOrInsertComputed(injectedSelectorCache, injected, () => /* @__PURE__ */ new WeakMap());\n        return getOrInsertComputed(selectorCache, selectState, () => {\n          const map = {};\n          for (const [name2, selector] of Object.entries(options.selectors ?? {})) {\n            map[name2] = wrapSelector(selector, selectState, () => getOrInsertComputed(injectedStateCache, selectState, getInitialState), injected);\n          }\n          return map;\n        });\n      }\n      return {\n        reducerPath: reducerPath2,\n        getSelectors,\n        get selectors() {\n          return getSelectors(selectSlice);\n        },\n        selectSlice\n      };\n    }\n    const slice = {\n      name,\n      reducer,\n      actions: context.actionCreators,\n      caseReducers: context.sliceCaseReducersByName,\n      getInitialState,\n      ...makeSelectorProps(reducerPath),\n      injectInto(injectable, {\n        reducerPath: pathOpt,\n        ...config\n      } = {}) {\n        const newReducerPath = pathOpt ?? reducerPath;\n        injectable.inject({\n          reducerPath: newReducerPath,\n          reducer\n        }, config);\n        return {\n          ...slice,\n          ...makeSelectorProps(newReducerPath, true)\n        };\n      }\n    };\n    return slice;\n  };\n}\nfunction wrapSelector(selector, selectState, getInitialState, injected) {\n  function wrapper(rootState, ...args) {\n    let sliceState = selectState(rootState);\n    if (typeof sliceState === \"undefined\") {\n      if (injected) {\n        sliceState = getInitialState();\n      } else if (process.env.NODE_ENV !== \"production\") {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(16) : \"selectState returned undefined for an uninjected slice reducer\");\n      }\n    }\n    return selector(sliceState, ...args);\n  }\n  wrapper.unwrapped = selector;\n  return wrapper;\n}\nvar createSlice = /* @__PURE__ */ buildCreateSlice();\nfunction buildReducerCreators() {\n  function asyncThunk(payloadCreator, config) {\n    return {\n      _reducerDefinitionType: \"asyncThunk\" /* asyncThunk */,\n      payloadCreator,\n      ...config\n    };\n  }\n  asyncThunk.withTypes = () => asyncThunk;\n  return {\n    reducer(caseReducer) {\n      return Object.assign({\n        // hack so the wrapping function has the same name as the original\n        // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original\n        [caseReducer.name](...args) {\n          return caseReducer(...args);\n        }\n      }[caseReducer.name], {\n        _reducerDefinitionType: \"reducer\" /* reducer */\n      });\n    },\n    preparedReducer(prepare, reducer) {\n      return {\n        _reducerDefinitionType: \"reducerWithPrepare\" /* reducerWithPrepare */,\n        prepare,\n        reducer\n      };\n    },\n    asyncThunk\n  };\n}\nfunction handleNormalReducerDefinition({\n  type,\n  reducerName,\n  createNotation\n}, maybeReducerWithPrepare, context) {\n  let caseReducer;\n  let prepareCallback;\n  if (\"reducer\" in maybeReducerWithPrepare) {\n    if (createNotation && !isCaseReducerWithPrepareDefinition(maybeReducerWithPrepare)) {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(17) : \"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.\");\n    }\n    caseReducer = maybeReducerWithPrepare.reducer;\n    prepareCallback = maybeReducerWithPrepare.prepare;\n  } else {\n    caseReducer = maybeReducerWithPrepare;\n  }\n  context.addCase(type, caseReducer).exposeCaseReducer(reducerName, caseReducer).exposeAction(reducerName, prepareCallback ? createAction(type, prepareCallback) : createAction(type));\n}\nfunction isAsyncThunkSliceReducerDefinition(reducerDefinition) {\n  return reducerDefinition._reducerDefinitionType === \"asyncThunk\" /* asyncThunk */;\n}\nfunction isCaseReducerWithPrepareDefinition(reducerDefinition) {\n  return reducerDefinition._reducerDefinitionType === \"reducerWithPrepare\" /* reducerWithPrepare */;\n}\nfunction handleThunkCaseReducerDefinition({\n  type,\n  reducerName\n}, reducerDefinition, context, cAT) {\n  if (!cAT) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(18) : \"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.\");\n  }\n  const {\n    payloadCreator,\n    fulfilled,\n    pending,\n    rejected,\n    settled,\n    options\n  } = reducerDefinition;\n  const thunk = cAT(type, payloadCreator, options);\n  context.exposeAction(reducerName, thunk);\n  if (fulfilled) {\n    context.addCase(thunk.fulfilled, fulfilled);\n  }\n  if (pending) {\n    context.addCase(thunk.pending, pending);\n  }\n  if (rejected) {\n    context.addCase(thunk.rejected, rejected);\n  }\n  if (settled) {\n    context.addMatcher(thunk.settled, settled);\n  }\n  context.exposeCaseReducer(reducerName, {\n    fulfilled: fulfilled || noop,\n    pending: pending || noop,\n    rejected: rejected || noop,\n    settled: settled || noop\n  });\n}\nfunction noop() {\n}\n\n// src/entities/entity_state.ts\nfunction getInitialEntityState() {\n  return {\n    ids: [],\n    entities: {}\n  };\n}\nfunction createInitialStateFactory(stateAdapter) {\n  function getInitialState(additionalState = {}, entities) {\n    const state = Object.assign(getInitialEntityState(), additionalState);\n    return entities ? stateAdapter.setAll(state, entities) : state;\n  }\n  return {\n    getInitialState\n  };\n}\n\n// src/entities/state_selectors.ts\nfunction createSelectorsFactory() {\n  function getSelectors(selectState, options = {}) {\n    const {\n      createSelector: createSelector2 = createDraftSafeSelector\n    } = options;\n    const selectIds = (state) => state.ids;\n    const selectEntities = (state) => state.entities;\n    const selectAll = createSelector2(selectIds, selectEntities, (ids, entities) => ids.map((id) => entities[id]));\n    const selectId = (_, id) => id;\n    const selectById = (entities, id) => entities[id];\n    const selectTotal = createSelector2(selectIds, (ids) => ids.length);\n    if (!selectState) {\n      return {\n        selectIds,\n        selectEntities,\n        selectAll,\n        selectTotal,\n        selectById: createSelector2(selectEntities, selectId, selectById)\n      };\n    }\n    const selectGlobalizedEntities = createSelector2(selectState, selectEntities);\n    return {\n      selectIds: createSelector2(selectState, selectIds),\n      selectEntities: selectGlobalizedEntities,\n      selectAll: createSelector2(selectState, selectAll),\n      selectTotal: createSelector2(selectState, selectTotal),\n      selectById: createSelector2(selectGlobalizedEntities, selectId, selectById)\n    };\n  }\n  return {\n    getSelectors\n  };\n}\n\n// src/entities/state_adapter.ts\nimport { produce as createNextState3, isDraft as isDraft3 } from \"immer\";\nvar isDraftTyped = isDraft3;\nfunction createSingleArgumentStateOperator(mutator) {\n  const operator = createStateOperator((_, state) => mutator(state));\n  return function operation(state) {\n    return operator(state, void 0);\n  };\n}\nfunction createStateOperator(mutator) {\n  return function operation(state, arg) {\n    function isPayloadActionArgument(arg2) {\n      return isFSA(arg2);\n    }\n    const runMutator = (draft) => {\n      if (isPayloadActionArgument(arg)) {\n        mutator(arg.payload, draft);\n      } else {\n        mutator(arg, draft);\n      }\n    };\n    if (isDraftTyped(state)) {\n      runMutator(state);\n      return state;\n    }\n    return createNextState3(state, runMutator);\n  };\n}\n\n// src/entities/utils.ts\nimport { current as current2, isDraft as isDraft4 } from \"immer\";\nfunction selectIdValue(entity, selectId) {\n  const key = selectId(entity);\n  if (process.env.NODE_ENV !== \"production\" && key === void 0) {\n    console.warn(\"The entity passed to the `selectId` implementation returned undefined.\", \"You should probably provide your own `selectId` implementation.\", \"The entity that was passed:\", entity, \"The `selectId` implementation:\", selectId.toString());\n  }\n  return key;\n}\nfunction ensureEntitiesArray(entities) {\n  if (!Array.isArray(entities)) {\n    entities = Object.values(entities);\n  }\n  return entities;\n}\nfunction getCurrent(value) {\n  return isDraft4(value) ? current2(value) : value;\n}\nfunction splitAddedUpdatedEntities(newEntities, selectId, state) {\n  newEntities = ensureEntitiesArray(newEntities);\n  const existingIdsArray = getCurrent(state.ids);\n  const existingIds = new Set(existingIdsArray);\n  const added = [];\n  const addedIds = /* @__PURE__ */ new Set([]);\n  const updated = [];\n  for (const entity of newEntities) {\n    const id = selectIdValue(entity, selectId);\n    if (existingIds.has(id) || addedIds.has(id)) {\n      updated.push({\n        id,\n        changes: entity\n      });\n    } else {\n      addedIds.add(id);\n      added.push(entity);\n    }\n  }\n  return [added, updated, existingIdsArray];\n}\n\n// src/entities/unsorted_state_adapter.ts\nfunction createUnsortedStateAdapter(selectId) {\n  function addOneMutably(entity, state) {\n    const key = selectIdValue(entity, selectId);\n    if (key in state.entities) {\n      return;\n    }\n    state.ids.push(key);\n    state.entities[key] = entity;\n  }\n  function addManyMutably(newEntities, state) {\n    newEntities = ensureEntitiesArray(newEntities);\n    for (const entity of newEntities) {\n      addOneMutably(entity, state);\n    }\n  }\n  function setOneMutably(entity, state) {\n    const key = selectIdValue(entity, selectId);\n    if (!(key in state.entities)) {\n      state.ids.push(key);\n    }\n    ;\n    state.entities[key] = entity;\n  }\n  function setManyMutably(newEntities, state) {\n    newEntities = ensureEntitiesArray(newEntities);\n    for (const entity of newEntities) {\n      setOneMutably(entity, state);\n    }\n  }\n  function setAllMutably(newEntities, state) {\n    newEntities = ensureEntitiesArray(newEntities);\n    state.ids = [];\n    state.entities = {};\n    addManyMutably(newEntities, state);\n  }\n  function removeOneMutably(key, state) {\n    return removeManyMutably([key], state);\n  }\n  function removeManyMutably(keys, state) {\n    let didMutate = false;\n    keys.forEach((key) => {\n      if (key in state.entities) {\n        delete state.entities[key];\n        didMutate = true;\n      }\n    });\n    if (didMutate) {\n      state.ids = state.ids.filter((id) => id in state.entities);\n    }\n  }\n  function removeAllMutably(state) {\n    Object.assign(state, {\n      ids: [],\n      entities: {}\n    });\n  }\n  function takeNewKey(keys, update, state) {\n    const original3 = state.entities[update.id];\n    if (original3 === void 0) {\n      return false;\n    }\n    const updated = Object.assign({}, original3, update.changes);\n    const newKey = selectIdValue(updated, selectId);\n    const hasNewKey = newKey !== update.id;\n    if (hasNewKey) {\n      keys[update.id] = newKey;\n      delete state.entities[update.id];\n    }\n    ;\n    state.entities[newKey] = updated;\n    return hasNewKey;\n  }\n  function updateOneMutably(update, state) {\n    return updateManyMutably([update], state);\n  }\n  function updateManyMutably(updates, state) {\n    const newKeys = {};\n    const updatesPerEntity = {};\n    updates.forEach((update) => {\n      if (update.id in state.entities) {\n        updatesPerEntity[update.id] = {\n          id: update.id,\n          // Spreads ignore falsy values, so this works even if there isn't\n          // an existing update already at this key\n          changes: {\n            ...updatesPerEntity[update.id]?.changes,\n            ...update.changes\n          }\n        };\n      }\n    });\n    updates = Object.values(updatesPerEntity);\n    const didMutateEntities = updates.length > 0;\n    if (didMutateEntities) {\n      const didMutateIds = updates.filter((update) => takeNewKey(newKeys, update, state)).length > 0;\n      if (didMutateIds) {\n        state.ids = Object.values(state.entities).map((e) => selectIdValue(e, selectId));\n      }\n    }\n  }\n  function upsertOneMutably(entity, state) {\n    return upsertManyMutably([entity], state);\n  }\n  function upsertManyMutably(newEntities, state) {\n    const [added, updated] = splitAddedUpdatedEntities(newEntities, selectId, state);\n    addManyMutably(added, state);\n    updateManyMutably(updated, state);\n  }\n  return {\n    removeAll: createSingleArgumentStateOperator(removeAllMutably),\n    addOne: createStateOperator(addOneMutably),\n    addMany: createStateOperator(addManyMutably),\n    setOne: createStateOperator(setOneMutably),\n    setMany: createStateOperator(setManyMutably),\n    setAll: createStateOperator(setAllMutably),\n    updateOne: createStateOperator(updateOneMutably),\n    updateMany: createStateOperator(updateManyMutably),\n    upsertOne: createStateOperator(upsertOneMutably),\n    upsertMany: createStateOperator(upsertManyMutably),\n    removeOne: createStateOperator(removeOneMutably),\n    removeMany: createStateOperator(removeManyMutably)\n  };\n}\n\n// src/entities/sorted_state_adapter.ts\nfunction findInsertIndex(sortedItems, item, comparisonFunction) {\n  let lowIndex = 0;\n  let highIndex = sortedItems.length;\n  while (lowIndex < highIndex) {\n    let middleIndex = lowIndex + highIndex >>> 1;\n    const currentItem = sortedItems[middleIndex];\n    const res = comparisonFunction(item, currentItem);\n    if (res >= 0) {\n      lowIndex = middleIndex + 1;\n    } else {\n      highIndex = middleIndex;\n    }\n  }\n  return lowIndex;\n}\nfunction insert(sortedItems, item, comparisonFunction) {\n  const insertAtIndex = findInsertIndex(sortedItems, item, comparisonFunction);\n  sortedItems.splice(insertAtIndex, 0, item);\n  return sortedItems;\n}\nfunction createSortedStateAdapter(selectId, comparer) {\n  const {\n    removeOne,\n    removeMany,\n    removeAll\n  } = createUnsortedStateAdapter(selectId);\n  function addOneMutably(entity, state) {\n    return addManyMutably([entity], state);\n  }\n  function addManyMutably(newEntities, state, existingIds) {\n    newEntities = ensureEntitiesArray(newEntities);\n    const existingKeys = new Set(existingIds ?? getCurrent(state.ids));\n    const models = newEntities.filter((model) => !existingKeys.has(selectIdValue(model, selectId)));\n    if (models.length !== 0) {\n      mergeFunction(state, models);\n    }\n  }\n  function setOneMutably(entity, state) {\n    return setManyMutably([entity], state);\n  }\n  function setManyMutably(newEntities, state) {\n    newEntities = ensureEntitiesArray(newEntities);\n    if (newEntities.length !== 0) {\n      for (const item of newEntities) {\n        delete state.entities[selectId(item)];\n      }\n      mergeFunction(state, newEntities);\n    }\n  }\n  function setAllMutably(newEntities, state) {\n    newEntities = ensureEntitiesArray(newEntities);\n    state.entities = {};\n    state.ids = [];\n    addManyMutably(newEntities, state, []);\n  }\n  function updateOneMutably(update, state) {\n    return updateManyMutably([update], state);\n  }\n  function updateManyMutably(updates, state) {\n    let appliedUpdates = false;\n    let replacedIds = false;\n    for (let update of updates) {\n      const entity = state.entities[update.id];\n      if (!entity) {\n        continue;\n      }\n      appliedUpdates = true;\n      Object.assign(entity, update.changes);\n      const newId = selectId(entity);\n      if (update.id !== newId) {\n        replacedIds = true;\n        delete state.entities[update.id];\n        const oldIndex = state.ids.indexOf(update.id);\n        state.ids[oldIndex] = newId;\n        state.entities[newId] = entity;\n      }\n    }\n    if (appliedUpdates) {\n      mergeFunction(state, [], appliedUpdates, replacedIds);\n    }\n  }\n  function upsertOneMutably(entity, state) {\n    return upsertManyMutably([entity], state);\n  }\n  function upsertManyMutably(newEntities, state) {\n    const [added, updated, existingIdsArray] = splitAddedUpdatedEntities(newEntities, selectId, state);\n    if (added.length) {\n      addManyMutably(added, state, existingIdsArray);\n    }\n    if (updated.length) {\n      updateManyMutably(updated, state);\n    }\n  }\n  function areArraysEqual(a, b) {\n    if (a.length !== b.length) {\n      return false;\n    }\n    for (let i = 0; i < a.length; i++) {\n      if (a[i] === b[i]) {\n        continue;\n      }\n      return false;\n    }\n    return true;\n  }\n  const mergeFunction = (state, addedItems, appliedUpdates, replacedIds) => {\n    const currentEntities = getCurrent(state.entities);\n    const currentIds = getCurrent(state.ids);\n    const stateEntities = state.entities;\n    let ids = currentIds;\n    if (replacedIds) {\n      ids = new Set(currentIds);\n    }\n    let sortedEntities = [];\n    for (const id of ids) {\n      const entity = currentEntities[id];\n      if (entity) {\n        sortedEntities.push(entity);\n      }\n    }\n    const wasPreviouslyEmpty = sortedEntities.length === 0;\n    for (const item of addedItems) {\n      stateEntities[selectId(item)] = item;\n      if (!wasPreviouslyEmpty) {\n        insert(sortedEntities, item, comparer);\n      }\n    }\n    if (wasPreviouslyEmpty) {\n      sortedEntities = addedItems.slice().sort(comparer);\n    } else if (appliedUpdates) {\n      sortedEntities.sort(comparer);\n    }\n    const newSortedIds = sortedEntities.map(selectId);\n    if (!areArraysEqual(currentIds, newSortedIds)) {\n      state.ids = newSortedIds;\n    }\n  };\n  return {\n    removeOne,\n    removeMany,\n    removeAll,\n    addOne: createStateOperator(addOneMutably),\n    updateOne: createStateOperator(updateOneMutably),\n    upsertOne: createStateOperator(upsertOneMutably),\n    setOne: createStateOperator(setOneMutably),\n    setMany: createStateOperator(setManyMutably),\n    setAll: createStateOperator(setAllMutably),\n    addMany: createStateOperator(addManyMutably),\n    updateMany: createStateOperator(updateManyMutably),\n    upsertMany: createStateOperator(upsertManyMutably)\n  };\n}\n\n// src/entities/create_adapter.ts\nfunction createEntityAdapter(options = {}) {\n  const {\n    selectId,\n    sortComparer\n  } = {\n    sortComparer: false,\n    selectId: (instance) => instance.id,\n    ...options\n  };\n  const stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);\n  const stateFactory = createInitialStateFactory(stateAdapter);\n  const selectorsFactory = createSelectorsFactory();\n  return {\n    selectId,\n    sortComparer,\n    ...stateFactory,\n    ...selectorsFactory,\n    ...stateAdapter\n  };\n}\n\n// src/listenerMiddleware/index.ts\nimport { isAction as isAction3 } from \"redux\";\n\n// src/listenerMiddleware/exceptions.ts\nvar task = \"task\";\nvar listener = \"listener\";\nvar completed = \"completed\";\nvar cancelled = \"cancelled\";\nvar taskCancelled = `task-${cancelled}`;\nvar taskCompleted = `task-${completed}`;\nvar listenerCancelled = `${listener}-${cancelled}`;\nvar listenerCompleted = `${listener}-${completed}`;\nvar TaskAbortError = class {\n  constructor(code) {\n    this.code = code;\n    this.message = `${task} ${cancelled} (reason: ${code})`;\n  }\n  name = \"TaskAbortError\";\n  message;\n};\n\n// src/listenerMiddleware/utils.ts\nvar assertFunction = (func, expected) => {\n  if (typeof func !== \"function\") {\n    throw new TypeError(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(32) : `${expected} is not a function`);\n  }\n};\nvar noop2 = () => {\n};\nvar catchRejection = (promise, onError = noop2) => {\n  promise.catch(onError);\n  return promise;\n};\nvar addAbortSignalListener = (abortSignal, callback) => {\n  abortSignal.addEventListener(\"abort\", callback, {\n    once: true\n  });\n  return () => abortSignal.removeEventListener(\"abort\", callback);\n};\nvar abortControllerWithReason = (abortController, reason) => {\n  const signal = abortController.signal;\n  if (signal.aborted) {\n    return;\n  }\n  if (!(\"reason\" in signal)) {\n    Object.defineProperty(signal, \"reason\", {\n      enumerable: true,\n      value: reason,\n      configurable: true,\n      writable: true\n    });\n  }\n  ;\n  abortController.abort(reason);\n};\n\n// src/listenerMiddleware/task.ts\nvar validateActive = (signal) => {\n  if (signal.aborted) {\n    const {\n      reason\n    } = signal;\n    throw new TaskAbortError(reason);\n  }\n};\nfunction raceWithSignal(signal, promise) {\n  let cleanup = noop2;\n  return new Promise((resolve, reject) => {\n    const notifyRejection = () => reject(new TaskAbortError(signal.reason));\n    if (signal.aborted) {\n      notifyRejection();\n      return;\n    }\n    cleanup = addAbortSignalListener(signal, notifyRejection);\n    promise.finally(() => cleanup()).then(resolve, reject);\n  }).finally(() => {\n    cleanup = noop2;\n  });\n}\nvar runTask = async (task2, cleanUp) => {\n  try {\n    await Promise.resolve();\n    const value = await task2();\n    return {\n      status: \"ok\",\n      value\n    };\n  } catch (error) {\n    return {\n      status: error instanceof TaskAbortError ? \"cancelled\" : \"rejected\",\n      error\n    };\n  } finally {\n    cleanUp?.();\n  }\n};\nvar createPause = (signal) => {\n  return (promise) => {\n    return catchRejection(raceWithSignal(signal, promise).then((output) => {\n      validateActive(signal);\n      return output;\n    }));\n  };\n};\nvar createDelay = (signal) => {\n  const pause = createPause(signal);\n  return (timeoutMs) => {\n    return pause(new Promise((resolve) => setTimeout(resolve, timeoutMs)));\n  };\n};\n\n// src/listenerMiddleware/index.ts\nvar {\n  assign\n} = Object;\nvar INTERNAL_NIL_TOKEN = {};\nvar alm = \"listenerMiddleware\";\nvar createFork = (parentAbortSignal, parentBlockingPromises) => {\n  const linkControllers = (controller) => addAbortSignalListener(parentAbortSignal, () => abortControllerWithReason(controller, parentAbortSignal.reason));\n  return (taskExecutor, opts) => {\n    assertFunction(taskExecutor, \"taskExecutor\");\n    const childAbortController = new AbortController();\n    linkControllers(childAbortController);\n    const result = runTask(async () => {\n      validateActive(parentAbortSignal);\n      validateActive(childAbortController.signal);\n      const result2 = await taskExecutor({\n        pause: createPause(childAbortController.signal),\n        delay: createDelay(childAbortController.signal),\n        signal: childAbortController.signal\n      });\n      validateActive(childAbortController.signal);\n      return result2;\n    }, () => abortControllerWithReason(childAbortController, taskCompleted));\n    if (opts?.autoJoin) {\n      parentBlockingPromises.push(result.catch(noop2));\n    }\n    return {\n      result: createPause(parentAbortSignal)(result),\n      cancel() {\n        abortControllerWithReason(childAbortController, taskCancelled);\n      }\n    };\n  };\n};\nvar createTakePattern = (startListening, signal) => {\n  const take = async (predicate, timeout) => {\n    validateActive(signal);\n    let unsubscribe = () => {\n    };\n    const tuplePromise = new Promise((resolve, reject) => {\n      let stopListening = startListening({\n        predicate,\n        effect: (action, listenerApi) => {\n          listenerApi.unsubscribe();\n          resolve([action, listenerApi.getState(), listenerApi.getOriginalState()]);\n        }\n      });\n      unsubscribe = () => {\n        stopListening();\n        reject();\n      };\n    });\n    const promises = [tuplePromise];\n    if (timeout != null) {\n      promises.push(new Promise((resolve) => setTimeout(resolve, timeout, null)));\n    }\n    try {\n      const output = await raceWithSignal(signal, Promise.race(promises));\n      validateActive(signal);\n      return output;\n    } finally {\n      unsubscribe();\n    }\n  };\n  return (predicate, timeout) => catchRejection(take(predicate, timeout));\n};\nvar getListenerEntryPropsFrom = (options) => {\n  let {\n    type,\n    actionCreator,\n    matcher,\n    predicate,\n    effect\n  } = options;\n  if (type) {\n    predicate = createAction(type).match;\n  } else if (actionCreator) {\n    type = actionCreator.type;\n    predicate = actionCreator.match;\n  } else if (matcher) {\n    predicate = matcher;\n  } else if (predicate) {\n  } else {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(21) : \"Creating or removing a listener requires one of the known fields for matching an action\");\n  }\n  assertFunction(effect, \"options.listener\");\n  return {\n    predicate,\n    type,\n    effect\n  };\n};\nvar createListenerEntry = /* @__PURE__ */ assign((options) => {\n  const {\n    type,\n    predicate,\n    effect\n  } = getListenerEntryPropsFrom(options);\n  const entry = {\n    id: nanoid(),\n    effect,\n    type,\n    predicate,\n    pending: /* @__PURE__ */ new Set(),\n    unsubscribe: () => {\n      throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(22) : \"Unsubscribe not initialized\");\n    }\n  };\n  return entry;\n}, {\n  withTypes: () => createListenerEntry\n});\nvar findListenerEntry = (listenerMap, options) => {\n  const {\n    type,\n    effect,\n    predicate\n  } = getListenerEntryPropsFrom(options);\n  return Array.from(listenerMap.values()).find((entry) => {\n    const matchPredicateOrType = typeof type === \"string\" ? entry.type === type : entry.predicate === predicate;\n    return matchPredicateOrType && entry.effect === effect;\n  });\n};\nvar cancelActiveListeners = (entry) => {\n  entry.pending.forEach((controller) => {\n    abortControllerWithReason(controller, listenerCancelled);\n  });\n};\nvar createClearListenerMiddleware = (listenerMap) => {\n  return () => {\n    listenerMap.forEach(cancelActiveListeners);\n    listenerMap.clear();\n  };\n};\nvar safelyNotifyError = (errorHandler, errorToNotify, errorInfo) => {\n  try {\n    errorHandler(errorToNotify, errorInfo);\n  } catch (errorHandlerError) {\n    setTimeout(() => {\n      throw errorHandlerError;\n    }, 0);\n  }\n};\nvar addListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/add`), {\n  withTypes: () => addListener\n});\nvar clearAllListeners = /* @__PURE__ */ createAction(`${alm}/removeAll`);\nvar removeListener = /* @__PURE__ */ assign(/* @__PURE__ */ createAction(`${alm}/remove`), {\n  withTypes: () => removeListener\n});\nvar defaultErrorHandler = (...args) => {\n  console.error(`${alm}/error`, ...args);\n};\nvar createListenerMiddleware = (middlewareOptions = {}) => {\n  const listenerMap = /* @__PURE__ */ new Map();\n  const {\n    extra,\n    onError = defaultErrorHandler\n  } = middlewareOptions;\n  assertFunction(onError, \"onError\");\n  const insertEntry = (entry) => {\n    entry.unsubscribe = () => listenerMap.delete(entry.id);\n    listenerMap.set(entry.id, entry);\n    return (cancelOptions) => {\n      entry.unsubscribe();\n      if (cancelOptions?.cancelActive) {\n        cancelActiveListeners(entry);\n      }\n    };\n  };\n  const startListening = (options) => {\n    const entry = findListenerEntry(listenerMap, options) ?? createListenerEntry(options);\n    return insertEntry(entry);\n  };\n  assign(startListening, {\n    withTypes: () => startListening\n  });\n  const stopListening = (options) => {\n    const entry = findListenerEntry(listenerMap, options);\n    if (entry) {\n      entry.unsubscribe();\n      if (options.cancelActive) {\n        cancelActiveListeners(entry);\n      }\n    }\n    return !!entry;\n  };\n  assign(stopListening, {\n    withTypes: () => stopListening\n  });\n  const notifyListener = async (entry, action, api, getOriginalState) => {\n    const internalTaskController = new AbortController();\n    const take = createTakePattern(startListening, internalTaskController.signal);\n    const autoJoinPromises = [];\n    try {\n      entry.pending.add(internalTaskController);\n      await Promise.resolve(entry.effect(\n        action,\n        // Use assign() rather than ... to avoid extra helper functions added to bundle\n        assign({}, api, {\n          getOriginalState,\n          condition: (predicate, timeout) => take(predicate, timeout).then(Boolean),\n          take,\n          delay: createDelay(internalTaskController.signal),\n          pause: createPause(internalTaskController.signal),\n          extra,\n          signal: internalTaskController.signal,\n          fork: createFork(internalTaskController.signal, autoJoinPromises),\n          unsubscribe: entry.unsubscribe,\n          subscribe: () => {\n            listenerMap.set(entry.id, entry);\n          },\n          cancelActiveListeners: () => {\n            entry.pending.forEach((controller, _, set) => {\n              if (controller !== internalTaskController) {\n                abortControllerWithReason(controller, listenerCancelled);\n                set.delete(controller);\n              }\n            });\n          },\n          cancel: () => {\n            abortControllerWithReason(internalTaskController, listenerCancelled);\n            entry.pending.delete(internalTaskController);\n          },\n          throwIfCancelled: () => {\n            validateActive(internalTaskController.signal);\n          }\n        })\n      ));\n    } catch (listenerError) {\n      if (!(listenerError instanceof TaskAbortError)) {\n        safelyNotifyError(onError, listenerError, {\n          raisedBy: \"effect\"\n        });\n      }\n    } finally {\n      await Promise.all(autoJoinPromises);\n      abortControllerWithReason(internalTaskController, listenerCompleted);\n      entry.pending.delete(internalTaskController);\n    }\n  };\n  const clearListenerMiddleware = createClearListenerMiddleware(listenerMap);\n  const middleware = (api) => (next) => (action) => {\n    if (!isAction3(action)) {\n      return next(action);\n    }\n    if (addListener.match(action)) {\n      return startListening(action.payload);\n    }\n    if (clearAllListeners.match(action)) {\n      clearListenerMiddleware();\n      return;\n    }\n    if (removeListener.match(action)) {\n      return stopListening(action.payload);\n    }\n    let originalState = api.getState();\n    const getOriginalState = () => {\n      if (originalState === INTERNAL_NIL_TOKEN) {\n        throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(23) : `${alm}: getOriginalState can only be called synchronously`);\n      }\n      return originalState;\n    };\n    let result;\n    try {\n      result = next(action);\n      if (listenerMap.size > 0) {\n        const currentState = api.getState();\n        const listenerEntries = Array.from(listenerMap.values());\n        for (const entry of listenerEntries) {\n          let runListener = false;\n          try {\n            runListener = entry.predicate(action, currentState, originalState);\n          } catch (predicateError) {\n            runListener = false;\n            safelyNotifyError(onError, predicateError, {\n              raisedBy: \"predicate\"\n            });\n          }\n          if (!runListener) {\n            continue;\n          }\n          notifyListener(entry, action, api, getOriginalState);\n        }\n      }\n    } finally {\n      originalState = INTERNAL_NIL_TOKEN;\n    }\n    return result;\n  };\n  return {\n    middleware,\n    startListening,\n    stopListening,\n    clearListeners: clearListenerMiddleware\n  };\n};\n\n// src/dynamicMiddleware/index.ts\nimport { compose as compose3 } from \"redux\";\nvar createMiddlewareEntry = (middleware) => ({\n  middleware,\n  applied: /* @__PURE__ */ new Map()\n});\nvar matchInstance = (instanceId) => (action) => action?.meta?.instanceId === instanceId;\nvar createDynamicMiddleware = () => {\n  const instanceId = nanoid();\n  const middlewareMap = /* @__PURE__ */ new Map();\n  const withMiddleware = Object.assign(createAction(\"dynamicMiddleware/add\", (...middlewares) => ({\n    payload: middlewares,\n    meta: {\n      instanceId\n    }\n  })), {\n    withTypes: () => withMiddleware\n  });\n  const addMiddleware = Object.assign(function addMiddleware2(...middlewares) {\n    middlewares.forEach((middleware2) => {\n      getOrInsertComputed(middlewareMap, middleware2, createMiddlewareEntry);\n    });\n  }, {\n    withTypes: () => addMiddleware\n  });\n  const getFinalMiddleware = (api) => {\n    const appliedMiddleware = Array.from(middlewareMap.values()).map((entry) => getOrInsertComputed(entry.applied, api, entry.middleware));\n    return compose3(...appliedMiddleware);\n  };\n  const isWithMiddleware = isAllOf(withMiddleware, matchInstance(instanceId));\n  const middleware = (api) => (next) => (action) => {\n    if (isWithMiddleware(action)) {\n      addMiddleware(...action.payload);\n      return api.dispatch;\n    }\n    return getFinalMiddleware(api)(next)(action);\n  };\n  return {\n    middleware,\n    addMiddleware,\n    withMiddleware,\n    instanceId\n  };\n};\n\n// src/combineSlices.ts\nimport { combineReducers as combineReducers2 } from \"redux\";\nvar isSliceLike = (maybeSliceLike) => \"reducerPath\" in maybeSliceLike && typeof maybeSliceLike.reducerPath === \"string\";\nvar getReducers = (slices) => slices.flatMap((sliceOrMap) => isSliceLike(sliceOrMap) ? [[sliceOrMap.reducerPath, sliceOrMap.reducer]] : Object.entries(sliceOrMap));\nvar ORIGINAL_STATE = Symbol.for(\"rtk-state-proxy-original\");\nvar isStateProxy = (value) => !!value && !!value[ORIGINAL_STATE];\nvar stateProxyMap = /* @__PURE__ */ new WeakMap();\nvar createStateProxy = (state, reducerMap, initialStateCache) => getOrInsertComputed(stateProxyMap, state, () => new Proxy(state, {\n  get: (target, prop, receiver) => {\n    if (prop === ORIGINAL_STATE) return target;\n    const result = Reflect.get(target, prop, receiver);\n    if (typeof result === \"undefined\") {\n      const cached = initialStateCache[prop];\n      if (typeof cached !== \"undefined\") return cached;\n      const reducer = reducerMap[prop];\n      if (reducer) {\n        const reducerResult = reducer(void 0, {\n          type: nanoid()\n        });\n        if (typeof reducerResult === \"undefined\") {\n          throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(24) : `The slice reducer for key \"${prop.toString()}\" returned undefined when called for selector(). If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);\n        }\n        initialStateCache[prop] = reducerResult;\n        return reducerResult;\n      }\n    }\n    return result;\n  }\n}));\nvar original = (state) => {\n  if (!isStateProxy(state)) {\n    throw new Error(process.env.NODE_ENV === \"production\" ? formatProdErrorMessage(25) : \"original must be used on state Proxy\");\n  }\n  return state[ORIGINAL_STATE];\n};\nvar emptyObject = {};\nvar noopReducer = (state = emptyObject) => state;\nfunction combineSlices(...slices) {\n  const reducerMap = Object.fromEntries(getReducers(slices));\n  const getReducer = () => Object.keys(reducerMap).length ? combineReducers2(reducerMap) : noopReducer;\n  let reducer = getReducer();\n  function combinedReducer(state, action) {\n    return reducer(state, action);\n  }\n  combinedReducer.withLazyLoadedSlices = () => combinedReducer;\n  const initialStateCache = {};\n  const inject = (slice, config = {}) => {\n    const {\n      reducerPath,\n      reducer: reducerToInject\n    } = slice;\n    const currentReducer = reducerMap[reducerPath];\n    if (!config.overrideExisting && currentReducer && currentReducer !== reducerToInject) {\n      if (typeof process !== \"undefined\" && process.env.NODE_ENV === \"development\") {\n        console.error(`called \\`inject\\` to override already-existing reducer ${reducerPath} without specifying \\`overrideExisting: true\\``);\n      }\n      return combinedReducer;\n    }\n    if (config.overrideExisting && currentReducer !== reducerToInject) {\n      delete initialStateCache[reducerPath];\n    }\n    reducerMap[reducerPath] = reducerToInject;\n    reducer = getReducer();\n    return combinedReducer;\n  };\n  const selector = Object.assign(function makeSelector(selectorFn, selectState) {\n    return function selector2(state, ...args) {\n      return selectorFn(createStateProxy(selectState ? selectState(state, ...args) : state, reducerMap, initialStateCache), ...args);\n    };\n  }, {\n    original\n  });\n  return Object.assign(combinedReducer, {\n    inject,\n    selector\n  });\n}\n\n// src/formatProdErrorMessage.ts\nfunction formatProdErrorMessage(code) {\n  return `Minified Redux Toolkit error #${code}; visit https://redux-toolkit.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;\n}\nexport {\n  ReducerType,\n  SHOULD_AUTOBATCH,\n  TaskAbortError,\n  Tuple,\n  addListener,\n  asyncThunkCreator,\n  autoBatchEnhancer,\n  buildCreateSlice,\n  clearAllListeners,\n  combineSlices,\n  configureStore,\n  createAction,\n  createActionCreatorInvariantMiddleware,\n  createAsyncThunk,\n  createDraftSafeSelector,\n  createDraftSafeSelectorCreator,\n  createDynamicMiddleware,\n  createEntityAdapter,\n  createImmutableStateInvariantMiddleware,\n  createListenerMiddleware,\n  produce as createNextState,\n  createReducer,\n  createSelector,\n  createSelectorCreator2 as createSelectorCreator,\n  createSerializableStateInvariantMiddleware,\n  createSlice,\n  current3 as current,\n  findNonSerializableValue,\n  formatProdErrorMessage,\n  freeze,\n  isActionCreator,\n  isAllOf,\n  isAnyOf,\n  isAsyncThunkAction,\n  isDraft5 as isDraft,\n  isFSA as isFluxStandardAction,\n  isFulfilled,\n  isImmutableDefault,\n  isPending,\n  isPlain,\n  isRejected,\n  isRejectedWithValue,\n  lruMemoize,\n  miniSerializeError,\n  nanoid,\n  original2 as original,\n  prepareAutoBatched,\n  removeListener,\n  unwrapResult,\n  weakMapMemoize2 as weakMapMemoize\n};\n//# sourceMappingURL=redux-toolkit.modern.mjs.map","export class InvalidTokenError extends Error {\n}\nInvalidTokenError.prototype.name = \"InvalidTokenError\";\nfunction b64DecodeUnicode(str) {\n    return decodeURIComponent(atob(str).replace(/(.)/g, (m, p) => {\n        let code = p.charCodeAt(0).toString(16).toUpperCase();\n        if (code.length < 2) {\n            code = \"0\" + code;\n        }\n        return \"%\" + code;\n    }));\n}\nfunction base64UrlDecode(str) {\n    let output = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    switch (output.length % 4) {\n        case 0:\n            break;\n        case 2:\n            output += \"==\";\n            break;\n        case 3:\n            output += \"=\";\n            break;\n        default:\n            throw new Error(\"base64 string is not of the correct length\");\n    }\n    try {\n        return b64DecodeUnicode(output);\n    }\n    catch (err) {\n        return atob(output);\n    }\n}\nexport function jwtDecode(token, options) {\n    if (typeof token !== \"string\") {\n        throw new InvalidTokenError(\"Invalid token specified: must be a string\");\n    }\n    options || (options = {});\n    const pos = options.header === true ? 0 : 1;\n    const part = token.split(\".\")[pos];\n    if (typeof part !== \"string\") {\n        throw new InvalidTokenError(`Invalid token specified: missing part #${pos + 1}`);\n    }\n    let decoded;\n    try {\n        decoded = base64UrlDecode(part);\n    }\n    catch (e) {\n        throw new InvalidTokenError(`Invalid token specified: invalid base64 for part #${pos + 1} (${e.message})`);\n    }\n    try {\n        return JSON.parse(decoded);\n    }\n    catch (e) {\n        throw new InvalidTokenError(`Invalid token specified: invalid json for part #${pos + 1} (${e.message})`);\n    }\n}\n","//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\nvar hookCallback;\n\nfunction hooks() {\n    return hookCallback.apply(null, arguments);\n}\n\n// This is done to register the method called with moment()\n// without creating circular dependencies.\nfunction setHookCallback(callback) {\n    hookCallback = callback;\n}\n\nfunction isArray(input) {\n    return (\n        input instanceof Array ||\n        Object.prototype.toString.call(input) === '[object Array]'\n    );\n}\n\nfunction isObject(input) {\n    // IE8 will treat undefined and null as object if it wasn't for\n    // input != null\n    return (\n        input != null &&\n        Object.prototype.toString.call(input) === '[object Object]'\n    );\n}\n\nfunction hasOwnProp(a, b) {\n    return Object.prototype.hasOwnProperty.call(a, b);\n}\n\nfunction isObjectEmpty(obj) {\n    if (Object.getOwnPropertyNames) {\n        return Object.getOwnPropertyNames(obj).length === 0;\n    } else {\n        var k;\n        for (k in obj) {\n            if (hasOwnProp(obj, k)) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n\nfunction isUndefined(input) {\n    return input === void 0;\n}\n\nfunction isNumber(input) {\n    return (\n        typeof input === 'number' ||\n        Object.prototype.toString.call(input) === '[object Number]'\n    );\n}\n\nfunction isDate(input) {\n    return (\n        input instanceof Date ||\n        Object.prototype.toString.call(input) === '[object Date]'\n    );\n}\n\nfunction map(arr, fn) {\n    var res = [],\n        i,\n        arrLen = arr.length;\n    for (i = 0; i < arrLen; ++i) {\n        res.push(fn(arr[i], i));\n    }\n    return res;\n}\n\nfunction extend(a, b) {\n    for (var i in b) {\n        if (hasOwnProp(b, i)) {\n            a[i] = b[i];\n        }\n    }\n\n    if (hasOwnProp(b, 'toString')) {\n        a.toString = b.toString;\n    }\n\n    if (hasOwnProp(b, 'valueOf')) {\n        a.valueOf = b.valueOf;\n    }\n\n    return a;\n}\n\nfunction createUTC(input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, true).utc();\n}\n\nfunction defaultParsingFlags() {\n    // We need to deep clone this object.\n    return {\n        empty: false,\n        unusedTokens: [],\n        unusedInput: [],\n        overflow: -2,\n        charsLeftOver: 0,\n        nullInput: false,\n        invalidEra: null,\n        invalidMonth: null,\n        invalidFormat: false,\n        userInvalidated: false,\n        iso: false,\n        parsedDateParts: [],\n        era: null,\n        meridiem: null,\n        rfc2822: false,\n        weekdayMismatch: false,\n    };\n}\n\nfunction getParsingFlags(m) {\n    if (m._pf == null) {\n        m._pf = defaultParsingFlags();\n    }\n    return m._pf;\n}\n\nvar some;\nif (Array.prototype.some) {\n    some = Array.prototype.some;\n} else {\n    some = function (fun) {\n        var t = Object(this),\n            len = t.length >>> 0,\n            i;\n\n        for (i = 0; i < len; i++) {\n            if (i in t && fun.call(this, t[i], i, t)) {\n                return true;\n            }\n        }\n\n        return false;\n    };\n}\n\nfunction isValid(m) {\n    var flags = null,\n        parsedParts = false,\n        isNowValid = m._d && !isNaN(m._d.getTime());\n    if (isNowValid) {\n        flags = getParsingFlags(m);\n        parsedParts = some.call(flags.parsedDateParts, function (i) {\n            return i != null;\n        });\n        isNowValid =\n            flags.overflow < 0 &&\n            !flags.empty &&\n            !flags.invalidEra &&\n            !flags.invalidMonth &&\n            !flags.invalidWeekday &&\n            !flags.weekdayMismatch &&\n            !flags.nullInput &&\n            !flags.invalidFormat &&\n            !flags.userInvalidated &&\n            (!flags.meridiem || (flags.meridiem && parsedParts));\n        if (m._strict) {\n            isNowValid =\n                isNowValid &&\n                flags.charsLeftOver === 0 &&\n                flags.unusedTokens.length === 0 &&\n                flags.bigHour === undefined;\n        }\n    }\n    if (Object.isFrozen == null || !Object.isFrozen(m)) {\n        m._isValid = isNowValid;\n    } else {\n        return isNowValid;\n    }\n    return m._isValid;\n}\n\nfunction createInvalid(flags) {\n    var m = createUTC(NaN);\n    if (flags != null) {\n        extend(getParsingFlags(m), flags);\n    } else {\n        getParsingFlags(m).userInvalidated = true;\n    }\n\n    return m;\n}\n\n// Plugins that add properties should also add the key here (null value),\n// so we can properly clone ourselves.\nvar momentProperties = (hooks.momentProperties = []),\n    updateInProgress = false;\n\nfunction copyConfig(to, from) {\n    var i,\n        prop,\n        val,\n        momentPropertiesLen = momentProperties.length;\n\n    if (!isUndefined(from._isAMomentObject)) {\n        to._isAMomentObject = from._isAMomentObject;\n    }\n    if (!isUndefined(from._i)) {\n        to._i = from._i;\n    }\n    if (!isUndefined(from._f)) {\n        to._f = from._f;\n    }\n    if (!isUndefined(from._l)) {\n        to._l = from._l;\n    }\n    if (!isUndefined(from._strict)) {\n        to._strict = from._strict;\n    }\n    if (!isUndefined(from._tzm)) {\n        to._tzm = from._tzm;\n    }\n    if (!isUndefined(from._isUTC)) {\n        to._isUTC = from._isUTC;\n    }\n    if (!isUndefined(from._offset)) {\n        to._offset = from._offset;\n    }\n    if (!isUndefined(from._pf)) {\n        to._pf = getParsingFlags(from);\n    }\n    if (!isUndefined(from._locale)) {\n        to._locale = from._locale;\n    }\n\n    if (momentPropertiesLen > 0) {\n        for (i = 0; i < momentPropertiesLen; i++) {\n            prop = momentProperties[i];\n            val = from[prop];\n            if (!isUndefined(val)) {\n                to[prop] = val;\n            }\n        }\n    }\n\n    return to;\n}\n\n// Moment prototype object\nfunction Moment(config) {\n    copyConfig(this, config);\n    this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n    if (!this.isValid()) {\n        this._d = new Date(NaN);\n    }\n    // Prevent infinite loop in case updateOffset creates new moment\n    // objects.\n    if (updateInProgress === false) {\n        updateInProgress = true;\n        hooks.updateOffset(this);\n        updateInProgress = false;\n    }\n}\n\nfunction isMoment(obj) {\n    return (\n        obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n    );\n}\n\nfunction warn(msg) {\n    if (\n        hooks.suppressDeprecationWarnings === false &&\n        typeof console !== 'undefined' &&\n        console.warn\n    ) {\n        console.warn('Deprecation warning: ' + msg);\n    }\n}\n\nfunction deprecate(msg, fn) {\n    var firstTime = true;\n\n    return extend(function () {\n        if (hooks.deprecationHandler != null) {\n            hooks.deprecationHandler(null, msg);\n        }\n        if (firstTime) {\n            var args = [],\n                arg,\n                i,\n                key,\n                argLen = arguments.length;\n            for (i = 0; i < argLen; i++) {\n                arg = '';\n                if (typeof arguments[i] === 'object') {\n                    arg += '\\n[' + i + '] ';\n                    for (key in arguments[0]) {\n                        if (hasOwnProp(arguments[0], key)) {\n                            arg += key + ': ' + arguments[0][key] + ', ';\n                        }\n                    }\n                    arg = arg.slice(0, -2); // Remove trailing comma and space\n                } else {\n                    arg = arguments[i];\n                }\n                args.push(arg);\n            }\n            warn(\n                msg +\n                    '\\nArguments: ' +\n                    Array.prototype.slice.call(args).join('') +\n                    '\\n' +\n                    new Error().stack\n            );\n            firstTime = false;\n        }\n        return fn.apply(this, arguments);\n    }, fn);\n}\n\nvar deprecations = {};\n\nfunction deprecateSimple(name, msg) {\n    if (hooks.deprecationHandler != null) {\n        hooks.deprecationHandler(name, msg);\n    }\n    if (!deprecations[name]) {\n        warn(msg);\n        deprecations[name] = true;\n    }\n}\n\nhooks.suppressDeprecationWarnings = false;\nhooks.deprecationHandler = null;\n\nfunction isFunction(input) {\n    return (\n        (typeof Function !== 'undefined' && input instanceof Function) ||\n        Object.prototype.toString.call(input) === '[object Function]'\n    );\n}\n\nfunction set(config) {\n    var prop, i;\n    for (i in config) {\n        if (hasOwnProp(config, i)) {\n            prop = config[i];\n            if (isFunction(prop)) {\n                this[i] = prop;\n            } else {\n                this['_' + i] = prop;\n            }\n        }\n    }\n    this._config = config;\n    // Lenient ordinal parsing accepts just a number in addition to\n    // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n    // TODO: Remove \"ordinalParse\" fallback in next major release.\n    this._dayOfMonthOrdinalParseLenient = new RegExp(\n        (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n            '|' +\n            /\\d{1,2}/.source\n    );\n}\n\nfunction mergeConfigs(parentConfig, childConfig) {\n    var res = extend({}, parentConfig),\n        prop;\n    for (prop in childConfig) {\n        if (hasOwnProp(childConfig, prop)) {\n            if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n                res[prop] = {};\n                extend(res[prop], parentConfig[prop]);\n                extend(res[prop], childConfig[prop]);\n            } else if (childConfig[prop] != null) {\n                res[prop] = childConfig[prop];\n            } else {\n                delete res[prop];\n            }\n        }\n    }\n    for (prop in parentConfig) {\n        if (\n            hasOwnProp(parentConfig, prop) &&\n            !hasOwnProp(childConfig, prop) &&\n            isObject(parentConfig[prop])\n        ) {\n            // make sure changes to properties don't modify parent config\n            res[prop] = extend({}, res[prop]);\n        }\n    }\n    return res;\n}\n\nfunction Locale(config) {\n    if (config != null) {\n        this.set(config);\n    }\n}\n\nvar keys;\n\nif (Object.keys) {\n    keys = Object.keys;\n} else {\n    keys = function (obj) {\n        var i,\n            res = [];\n        for (i in obj) {\n            if (hasOwnProp(obj, i)) {\n                res.push(i);\n            }\n        }\n        return res;\n    };\n}\n\nvar defaultCalendar = {\n    sameDay: '[Today at] LT',\n    nextDay: '[Tomorrow at] LT',\n    nextWeek: 'dddd [at] LT',\n    lastDay: '[Yesterday at] LT',\n    lastWeek: '[Last] dddd [at] LT',\n    sameElse: 'L',\n};\n\nfunction calendar(key, mom, now) {\n    var output = this._calendar[key] || this._calendar['sameElse'];\n    return isFunction(output) ? output.call(mom, now) : output;\n}\n\nfunction zeroFill(number, targetLength, forceSign) {\n    var absNumber = '' + Math.abs(number),\n        zerosToFill = targetLength - absNumber.length,\n        sign = number >= 0;\n    return (\n        (sign ? (forceSign ? '+' : '') : '-') +\n        Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n        absNumber\n    );\n}\n\nvar formattingTokens =\n        /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n    localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n    formatFunctions = {},\n    formatTokenFunctions = {};\n\n// token:    'M'\n// padded:   ['MM', 2]\n// ordinal:  'Mo'\n// callback: function () { this.month() + 1 }\nfunction addFormatToken(token, padded, ordinal, callback) {\n    var func = callback;\n    if (typeof callback === 'string') {\n        func = function () {\n            return this[callback]();\n        };\n    }\n    if (token) {\n        formatTokenFunctions[token] = func;\n    }\n    if (padded) {\n        formatTokenFunctions[padded[0]] = function () {\n            return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n        };\n    }\n    if (ordinal) {\n        formatTokenFunctions[ordinal] = function () {\n            return this.localeData().ordinal(\n                func.apply(this, arguments),\n                token\n            );\n        };\n    }\n}\n\nfunction removeFormattingTokens(input) {\n    if (input.match(/\\[[\\s\\S]/)) {\n        return input.replace(/^\\[|\\]$/g, '');\n    }\n    return input.replace(/\\\\/g, '');\n}\n\nfunction makeFormatFunction(format) {\n    var array = format.match(formattingTokens),\n        i,\n        length;\n\n    for (i = 0, length = array.length; i < length; i++) {\n        if (formatTokenFunctions[array[i]]) {\n            array[i] = formatTokenFunctions[array[i]];\n        } else {\n            array[i] = removeFormattingTokens(array[i]);\n        }\n    }\n\n    return function (mom) {\n        var output = '',\n            i;\n        for (i = 0; i < length; i++) {\n            output += isFunction(array[i])\n                ? array[i].call(mom, format)\n                : array[i];\n        }\n        return output;\n    };\n}\n\n// format date using native date object\nfunction formatMoment(m, format) {\n    if (!m.isValid()) {\n        return m.localeData().invalidDate();\n    }\n\n    format = expandFormat(format, m.localeData());\n    formatFunctions[format] =\n        formatFunctions[format] || makeFormatFunction(format);\n\n    return formatFunctions[format](m);\n}\n\nfunction expandFormat(format, locale) {\n    var i = 5;\n\n    function replaceLongDateFormatTokens(input) {\n        return locale.longDateFormat(input) || input;\n    }\n\n    localFormattingTokens.lastIndex = 0;\n    while (i >= 0 && localFormattingTokens.test(format)) {\n        format = format.replace(\n            localFormattingTokens,\n            replaceLongDateFormatTokens\n        );\n        localFormattingTokens.lastIndex = 0;\n        i -= 1;\n    }\n\n    return format;\n}\n\nvar defaultLongDateFormat = {\n    LTS: 'h:mm:ss A',\n    LT: 'h:mm A',\n    L: 'MM/DD/YYYY',\n    LL: 'MMMM D, YYYY',\n    LLL: 'MMMM D, YYYY h:mm A',\n    LLLL: 'dddd, MMMM D, YYYY h:mm A',\n};\n\nfunction longDateFormat(key) {\n    var format = this._longDateFormat[key],\n        formatUpper = this._longDateFormat[key.toUpperCase()];\n\n    if (format || !formatUpper) {\n        return format;\n    }\n\n    this._longDateFormat[key] = formatUpper\n        .match(formattingTokens)\n        .map(function (tok) {\n            if (\n                tok === 'MMMM' ||\n                tok === 'MM' ||\n                tok === 'DD' ||\n                tok === 'dddd'\n            ) {\n                return tok.slice(1);\n            }\n            return tok;\n        })\n        .join('');\n\n    return this._longDateFormat[key];\n}\n\nvar defaultInvalidDate = 'Invalid date';\n\nfunction invalidDate() {\n    return this._invalidDate;\n}\n\nvar defaultOrdinal = '%d',\n    defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\nfunction ordinal(number) {\n    return this._ordinal.replace('%d', number);\n}\n\nvar defaultRelativeTime = {\n    future: 'in %s',\n    past: '%s ago',\n    s: 'a few seconds',\n    ss: '%d seconds',\n    m: 'a minute',\n    mm: '%d minutes',\n    h: 'an hour',\n    hh: '%d hours',\n    d: 'a day',\n    dd: '%d days',\n    w: 'a week',\n    ww: '%d weeks',\n    M: 'a month',\n    MM: '%d months',\n    y: 'a year',\n    yy: '%d years',\n};\n\nfunction relativeTime(number, withoutSuffix, string, isFuture) {\n    var output = this._relativeTime[string];\n    return isFunction(output)\n        ? output(number, withoutSuffix, string, isFuture)\n        : output.replace(/%d/i, number);\n}\n\nfunction pastFuture(diff, output) {\n    var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n    return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n}\n\nvar aliases = {\n    D: 'date',\n    dates: 'date',\n    date: 'date',\n    d: 'day',\n    days: 'day',\n    day: 'day',\n    e: 'weekday',\n    weekdays: 'weekday',\n    weekday: 'weekday',\n    E: 'isoWeekday',\n    isoweekdays: 'isoWeekday',\n    isoweekday: 'isoWeekday',\n    DDD: 'dayOfYear',\n    dayofyears: 'dayOfYear',\n    dayofyear: 'dayOfYear',\n    h: 'hour',\n    hours: 'hour',\n    hour: 'hour',\n    ms: 'millisecond',\n    milliseconds: 'millisecond',\n    millisecond: 'millisecond',\n    m: 'minute',\n    minutes: 'minute',\n    minute: 'minute',\n    M: 'month',\n    months: 'month',\n    month: 'month',\n    Q: 'quarter',\n    quarters: 'quarter',\n    quarter: 'quarter',\n    s: 'second',\n    seconds: 'second',\n    second: 'second',\n    gg: 'weekYear',\n    weekyears: 'weekYear',\n    weekyear: 'weekYear',\n    GG: 'isoWeekYear',\n    isoweekyears: 'isoWeekYear',\n    isoweekyear: 'isoWeekYear',\n    w: 'week',\n    weeks: 'week',\n    week: 'week',\n    W: 'isoWeek',\n    isoweeks: 'isoWeek',\n    isoweek: 'isoWeek',\n    y: 'year',\n    years: 'year',\n    year: 'year',\n};\n\nfunction normalizeUnits(units) {\n    return typeof units === 'string'\n        ? aliases[units] || aliases[units.toLowerCase()]\n        : undefined;\n}\n\nfunction normalizeObjectUnits(inputObject) {\n    var normalizedInput = {},\n        normalizedProp,\n        prop;\n\n    for (prop in inputObject) {\n        if (hasOwnProp(inputObject, prop)) {\n            normalizedProp = normalizeUnits(prop);\n            if (normalizedProp) {\n                normalizedInput[normalizedProp] = inputObject[prop];\n            }\n        }\n    }\n\n    return normalizedInput;\n}\n\nvar priorities = {\n    date: 9,\n    day: 11,\n    weekday: 11,\n    isoWeekday: 11,\n    dayOfYear: 4,\n    hour: 13,\n    millisecond: 16,\n    minute: 14,\n    month: 8,\n    quarter: 7,\n    second: 15,\n    weekYear: 1,\n    isoWeekYear: 1,\n    week: 5,\n    isoWeek: 5,\n    year: 1,\n};\n\nfunction getPrioritizedUnits(unitsObj) {\n    var units = [],\n        u;\n    for (u in unitsObj) {\n        if (hasOwnProp(unitsObj, u)) {\n            units.push({ unit: u, priority: priorities[u] });\n        }\n    }\n    units.sort(function (a, b) {\n        return a.priority - b.priority;\n    });\n    return units;\n}\n\nvar match1 = /\\d/, //       0 - 9\n    match2 = /\\d\\d/, //      00 - 99\n    match3 = /\\d{3}/, //     000 - 999\n    match4 = /\\d{4}/, //    0000 - 9999\n    match6 = /[+-]?\\d{6}/, // -999999 - 999999\n    match1to2 = /\\d\\d?/, //       0 - 99\n    match3to4 = /\\d\\d\\d\\d?/, //     999 - 9999\n    match5to6 = /\\d\\d\\d\\d\\d\\d?/, //   99999 - 999999\n    match1to3 = /\\d{1,3}/, //       0 - 999\n    match1to4 = /\\d{1,4}/, //       0 - 9999\n    match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n    matchUnsigned = /\\d+/, //       0 - inf\n    matchSigned = /[+-]?\\d+/, //    -inf - inf\n    matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n    matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n    matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n    // any word (or two) characters or numbers including two/three word month in arabic.\n    // includes scottish gaelic two word and hyphenated months\n    matchWord =\n        /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n    match1to2NoLeadingZero = /^[1-9]\\d?/, //         1-99\n    match1to2HasZero = /^([1-9]\\d|\\d)/, //           0-99\n    regexes;\n\nregexes = {};\n\nfunction addRegexToken(token, regex, strictRegex) {\n    regexes[token] = isFunction(regex)\n        ? regex\n        : function (isStrict, localeData) {\n              return isStrict && strictRegex ? strictRegex : regex;\n          };\n}\n\nfunction getParseRegexForToken(token, config) {\n    if (!hasOwnProp(regexes, token)) {\n        return new RegExp(unescapeFormat(token));\n    }\n\n    return regexes[token](config._strict, config._locale);\n}\n\n// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\nfunction unescapeFormat(s) {\n    return regexEscape(\n        s\n            .replace('\\\\', '')\n            .replace(\n                /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n                function (matched, p1, p2, p3, p4) {\n                    return p1 || p2 || p3 || p4;\n                }\n            )\n    );\n}\n\nfunction regexEscape(s) {\n    return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n}\n\nfunction absFloor(number) {\n    if (number < 0) {\n        // -0 -> 0\n        return Math.ceil(number) || 0;\n    } else {\n        return Math.floor(number);\n    }\n}\n\nfunction toInt(argumentForCoercion) {\n    var coercedNumber = +argumentForCoercion,\n        value = 0;\n\n    if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n        value = absFloor(coercedNumber);\n    }\n\n    return value;\n}\n\nvar tokens = {};\n\nfunction addParseToken(token, callback) {\n    var i,\n        func = callback,\n        tokenLen;\n    if (typeof token === 'string') {\n        token = [token];\n    }\n    if (isNumber(callback)) {\n        func = function (input, array) {\n            array[callback] = toInt(input);\n        };\n    }\n    tokenLen = token.length;\n    for (i = 0; i < tokenLen; i++) {\n        tokens[token[i]] = func;\n    }\n}\n\nfunction addWeekParseToken(token, callback) {\n    addParseToken(token, function (input, array, config, token) {\n        config._w = config._w || {};\n        callback(input, config._w, config, token);\n    });\n}\n\nfunction addTimeToArrayFromToken(token, input, config) {\n    if (input != null && hasOwnProp(tokens, token)) {\n        tokens[token](input, config._a, config, token);\n    }\n}\n\nfunction isLeapYear(year) {\n    return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nvar YEAR = 0,\n    MONTH = 1,\n    DATE = 2,\n    HOUR = 3,\n    MINUTE = 4,\n    SECOND = 5,\n    MILLISECOND = 6,\n    WEEK = 7,\n    WEEKDAY = 8;\n\n// FORMATTING\n\naddFormatToken('Y', 0, 0, function () {\n    var y = this.year();\n    return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n});\n\naddFormatToken(0, ['YY', 2], 0, function () {\n    return this.year() % 100;\n});\n\naddFormatToken(0, ['YYYY', 4], 0, 'year');\naddFormatToken(0, ['YYYYY', 5], 0, 'year');\naddFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n// PARSING\n\naddRegexToken('Y', matchSigned);\naddRegexToken('YY', match1to2, match2);\naddRegexToken('YYYY', match1to4, match4);\naddRegexToken('YYYYY', match1to6, match6);\naddRegexToken('YYYYYY', match1to6, match6);\n\naddParseToken(['YYYYY', 'YYYYYY'], YEAR);\naddParseToken('YYYY', function (input, array) {\n    array[YEAR] =\n        input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n});\naddParseToken('YY', function (input, array) {\n    array[YEAR] = hooks.parseTwoDigitYear(input);\n});\naddParseToken('Y', function (input, array) {\n    array[YEAR] = parseInt(input, 10);\n});\n\n// HELPERS\n\nfunction daysInYear(year) {\n    return isLeapYear(year) ? 366 : 365;\n}\n\n// HOOKS\n\nhooks.parseTwoDigitYear = function (input) {\n    return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n};\n\n// MOMENTS\n\nvar getSetYear = makeGetSet('FullYear', true);\n\nfunction getIsLeapYear() {\n    return isLeapYear(this.year());\n}\n\nfunction makeGetSet(unit, keepTime) {\n    return function (value) {\n        if (value != null) {\n            set$1(this, unit, value);\n            hooks.updateOffset(this, keepTime);\n            return this;\n        } else {\n            return get(this, unit);\n        }\n    };\n}\n\nfunction get(mom, unit) {\n    if (!mom.isValid()) {\n        return NaN;\n    }\n\n    var d = mom._d,\n        isUTC = mom._isUTC;\n\n    switch (unit) {\n        case 'Milliseconds':\n            return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n        case 'Seconds':\n            return isUTC ? d.getUTCSeconds() : d.getSeconds();\n        case 'Minutes':\n            return isUTC ? d.getUTCMinutes() : d.getMinutes();\n        case 'Hours':\n            return isUTC ? d.getUTCHours() : d.getHours();\n        case 'Date':\n            return isUTC ? d.getUTCDate() : d.getDate();\n        case 'Day':\n            return isUTC ? d.getUTCDay() : d.getDay();\n        case 'Month':\n            return isUTC ? d.getUTCMonth() : d.getMonth();\n        case 'FullYear':\n            return isUTC ? d.getUTCFullYear() : d.getFullYear();\n        default:\n            return NaN; // Just in case\n    }\n}\n\nfunction set$1(mom, unit, value) {\n    var d, isUTC, year, month, date;\n\n    if (!mom.isValid() || isNaN(value)) {\n        return;\n    }\n\n    d = mom._d;\n    isUTC = mom._isUTC;\n\n    switch (unit) {\n        case 'Milliseconds':\n            return void (isUTC\n                ? d.setUTCMilliseconds(value)\n                : d.setMilliseconds(value));\n        case 'Seconds':\n            return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n        case 'Minutes':\n            return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n        case 'Hours':\n            return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n        case 'Date':\n            return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n        // case 'Day': // Not real\n        //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n        // case 'Month': // Not used because we need to pass two variables\n        //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n        case 'FullYear':\n            break; // See below ...\n        default:\n            return; // Just in case\n    }\n\n    year = value;\n    month = mom.month();\n    date = mom.date();\n    date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n    void (isUTC\n        ? d.setUTCFullYear(year, month, date)\n        : d.setFullYear(year, month, date));\n}\n\n// MOMENTS\n\nfunction stringGet(units) {\n    units = normalizeUnits(units);\n    if (isFunction(this[units])) {\n        return this[units]();\n    }\n    return this;\n}\n\nfunction stringSet(units, value) {\n    if (typeof units === 'object') {\n        units = normalizeObjectUnits(units);\n        var prioritized = getPrioritizedUnits(units),\n            i,\n            prioritizedLen = prioritized.length;\n        for (i = 0; i < prioritizedLen; i++) {\n            this[prioritized[i].unit](units[prioritized[i].unit]);\n        }\n    } else {\n        units = normalizeUnits(units);\n        if (isFunction(this[units])) {\n            return this[units](value);\n        }\n    }\n    return this;\n}\n\nfunction mod(n, x) {\n    return ((n % x) + x) % x;\n}\n\nvar indexOf;\n\nif (Array.prototype.indexOf) {\n    indexOf = Array.prototype.indexOf;\n} else {\n    indexOf = function (o) {\n        // I know\n        var i;\n        for (i = 0; i < this.length; ++i) {\n            if (this[i] === o) {\n                return i;\n            }\n        }\n        return -1;\n    };\n}\n\nfunction daysInMonth(year, month) {\n    if (isNaN(year) || isNaN(month)) {\n        return NaN;\n    }\n    var modMonth = mod(month, 12);\n    year += (month - modMonth) / 12;\n    return modMonth === 1\n        ? isLeapYear(year)\n            ? 29\n            : 28\n        : 31 - ((modMonth % 7) % 2);\n}\n\n// FORMATTING\n\naddFormatToken('M', ['MM', 2], 'Mo', function () {\n    return this.month() + 1;\n});\n\naddFormatToken('MMM', 0, 0, function (format) {\n    return this.localeData().monthsShort(this, format);\n});\n\naddFormatToken('MMMM', 0, 0, function (format) {\n    return this.localeData().months(this, format);\n});\n\n// PARSING\n\naddRegexToken('M', match1to2, match1to2NoLeadingZero);\naddRegexToken('MM', match1to2, match2);\naddRegexToken('MMM', function (isStrict, locale) {\n    return locale.monthsShortRegex(isStrict);\n});\naddRegexToken('MMMM', function (isStrict, locale) {\n    return locale.monthsRegex(isStrict);\n});\n\naddParseToken(['M', 'MM'], function (input, array) {\n    array[MONTH] = toInt(input) - 1;\n});\n\naddParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n    var month = config._locale.monthsParse(input, token, config._strict);\n    // if we didn't find a month name, mark the date as invalid.\n    if (month != null) {\n        array[MONTH] = month;\n    } else {\n        getParsingFlags(config).invalidMonth = input;\n    }\n});\n\n// LOCALES\n\nvar defaultLocaleMonths =\n        'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n            '_'\n        ),\n    defaultLocaleMonthsShort =\n        'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n    MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n    defaultMonthsShortRegex = matchWord,\n    defaultMonthsRegex = matchWord;\n\nfunction localeMonths(m, format) {\n    if (!m) {\n        return isArray(this._months)\n            ? this._months\n            : this._months['standalone'];\n    }\n    return isArray(this._months)\n        ? this._months[m.month()]\n        : this._months[\n              (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n                  ? 'format'\n                  : 'standalone'\n          ][m.month()];\n}\n\nfunction localeMonthsShort(m, format) {\n    if (!m) {\n        return isArray(this._monthsShort)\n            ? this._monthsShort\n            : this._monthsShort['standalone'];\n    }\n    return isArray(this._monthsShort)\n        ? this._monthsShort[m.month()]\n        : this._monthsShort[\n              MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n          ][m.month()];\n}\n\nfunction handleStrictParse(monthName, format, strict) {\n    var i,\n        ii,\n        mom,\n        llc = monthName.toLocaleLowerCase();\n    if (!this._monthsParse) {\n        // this is not used\n        this._monthsParse = [];\n        this._longMonthsParse = [];\n        this._shortMonthsParse = [];\n        for (i = 0; i < 12; ++i) {\n            mom = createUTC([2000, i]);\n            this._shortMonthsParse[i] = this.monthsShort(\n                mom,\n                ''\n            ).toLocaleLowerCase();\n            this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n        }\n    }\n\n    if (strict) {\n        if (format === 'MMM') {\n            ii = indexOf.call(this._shortMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf.call(this._longMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    } else {\n        if (format === 'MMM') {\n            ii = indexOf.call(this._shortMonthsParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._longMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf.call(this._longMonthsParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._shortMonthsParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    }\n}\n\nfunction localeMonthsParse(monthName, format, strict) {\n    var i, mom, regex;\n\n    if (this._monthsParseExact) {\n        return handleStrictParse.call(this, monthName, format, strict);\n    }\n\n    if (!this._monthsParse) {\n        this._monthsParse = [];\n        this._longMonthsParse = [];\n        this._shortMonthsParse = [];\n    }\n\n    // TODO: add sorting\n    // Sorting makes sure if one month (or abbr) is a prefix of another\n    // see sorting in computeMonthsParse\n    for (i = 0; i < 12; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, i]);\n        if (strict && !this._longMonthsParse[i]) {\n            this._longMonthsParse[i] = new RegExp(\n                '^' + this.months(mom, '').replace('.', '') + '$',\n                'i'\n            );\n            this._shortMonthsParse[i] = new RegExp(\n                '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n                'i'\n            );\n        }\n        if (!strict && !this._monthsParse[i]) {\n            regex =\n                '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n            this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n        }\n        // test the regex\n        if (\n            strict &&\n            format === 'MMMM' &&\n            this._longMonthsParse[i].test(monthName)\n        ) {\n            return i;\n        } else if (\n            strict &&\n            format === 'MMM' &&\n            this._shortMonthsParse[i].test(monthName)\n        ) {\n            return i;\n        } else if (!strict && this._monthsParse[i].test(monthName)) {\n            return i;\n        }\n    }\n}\n\n// MOMENTS\n\nfunction setMonth(mom, value) {\n    if (!mom.isValid()) {\n        // No op\n        return mom;\n    }\n\n    if (typeof value === 'string') {\n        if (/^\\d+$/.test(value)) {\n            value = toInt(value);\n        } else {\n            value = mom.localeData().monthsParse(value);\n            // TODO: Another silent failure?\n            if (!isNumber(value)) {\n                return mom;\n            }\n        }\n    }\n\n    var month = value,\n        date = mom.date();\n\n    date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n    void (mom._isUTC\n        ? mom._d.setUTCMonth(month, date)\n        : mom._d.setMonth(month, date));\n    return mom;\n}\n\nfunction getSetMonth(value) {\n    if (value != null) {\n        setMonth(this, value);\n        hooks.updateOffset(this, true);\n        return this;\n    } else {\n        return get(this, 'Month');\n    }\n}\n\nfunction getDaysInMonth() {\n    return daysInMonth(this.year(), this.month());\n}\n\nfunction monthsShortRegex(isStrict) {\n    if (this._monthsParseExact) {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            computeMonthsParse.call(this);\n        }\n        if (isStrict) {\n            return this._monthsShortStrictRegex;\n        } else {\n            return this._monthsShortRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_monthsShortRegex')) {\n            this._monthsShortRegex = defaultMonthsShortRegex;\n        }\n        return this._monthsShortStrictRegex && isStrict\n            ? this._monthsShortStrictRegex\n            : this._monthsShortRegex;\n    }\n}\n\nfunction monthsRegex(isStrict) {\n    if (this._monthsParseExact) {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            computeMonthsParse.call(this);\n        }\n        if (isStrict) {\n            return this._monthsStrictRegex;\n        } else {\n            return this._monthsRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_monthsRegex')) {\n            this._monthsRegex = defaultMonthsRegex;\n        }\n        return this._monthsStrictRegex && isStrict\n            ? this._monthsStrictRegex\n            : this._monthsRegex;\n    }\n}\n\nfunction computeMonthsParse() {\n    function cmpLenRev(a, b) {\n        return b.length - a.length;\n    }\n\n    var shortPieces = [],\n        longPieces = [],\n        mixedPieces = [],\n        i,\n        mom,\n        shortP,\n        longP;\n    for (i = 0; i < 12; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, i]);\n        shortP = regexEscape(this.monthsShort(mom, ''));\n        longP = regexEscape(this.months(mom, ''));\n        shortPieces.push(shortP);\n        longPieces.push(longP);\n        mixedPieces.push(longP);\n        mixedPieces.push(shortP);\n    }\n    // Sorting makes sure if one month (or abbr) is a prefix of another it\n    // will match the longer piece.\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n\n    this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._monthsShortRegex = this._monthsRegex;\n    this._monthsStrictRegex = new RegExp(\n        '^(' + longPieces.join('|') + ')',\n        'i'\n    );\n    this._monthsShortStrictRegex = new RegExp(\n        '^(' + shortPieces.join('|') + ')',\n        'i'\n    );\n}\n\nfunction createDate(y, m, d, h, M, s, ms) {\n    // can't just apply() to create a date:\n    // https://stackoverflow.com/q/181348\n    var date;\n    // the date constructor remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n        // preserve leap years using a full 400 year cycle, then reset\n        date = new Date(y + 400, m, d, h, M, s, ms);\n        if (isFinite(date.getFullYear())) {\n            date.setFullYear(y);\n        }\n    } else {\n        date = new Date(y, m, d, h, M, s, ms);\n    }\n\n    return date;\n}\n\nfunction createUTCDate(y) {\n    var date, args;\n    // the Date.UTC function remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n        args = Array.prototype.slice.call(arguments);\n        // preserve leap years using a full 400 year cycle, then reset\n        args[0] = y + 400;\n        date = new Date(Date.UTC.apply(null, args));\n        if (isFinite(date.getUTCFullYear())) {\n            date.setUTCFullYear(y);\n        }\n    } else {\n        date = new Date(Date.UTC.apply(null, arguments));\n    }\n\n    return date;\n}\n\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n    var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n        fwd = 7 + dow - doy,\n        // first-week day local weekday -- which local weekday is fwd\n        fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n    return -fwdlw + fwd - 1;\n}\n\n// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\nfunction dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n    var localWeekday = (7 + weekday - dow) % 7,\n        weekOffset = firstWeekOffset(year, dow, doy),\n        dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n        resYear,\n        resDayOfYear;\n\n    if (dayOfYear <= 0) {\n        resYear = year - 1;\n        resDayOfYear = daysInYear(resYear) + dayOfYear;\n    } else if (dayOfYear > daysInYear(year)) {\n        resYear = year + 1;\n        resDayOfYear = dayOfYear - daysInYear(year);\n    } else {\n        resYear = year;\n        resDayOfYear = dayOfYear;\n    }\n\n    return {\n        year: resYear,\n        dayOfYear: resDayOfYear,\n    };\n}\n\nfunction weekOfYear(mom, dow, doy) {\n    var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n        week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n        resWeek,\n        resYear;\n\n    if (week < 1) {\n        resYear = mom.year() - 1;\n        resWeek = week + weeksInYear(resYear, dow, doy);\n    } else if (week > weeksInYear(mom.year(), dow, doy)) {\n        resWeek = week - weeksInYear(mom.year(), dow, doy);\n        resYear = mom.year() + 1;\n    } else {\n        resYear = mom.year();\n        resWeek = week;\n    }\n\n    return {\n        week: resWeek,\n        year: resYear,\n    };\n}\n\nfunction weeksInYear(year, dow, doy) {\n    var weekOffset = firstWeekOffset(year, dow, doy),\n        weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n    return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n}\n\n// FORMATTING\n\naddFormatToken('w', ['ww', 2], 'wo', 'week');\naddFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n// PARSING\n\naddRegexToken('w', match1to2, match1to2NoLeadingZero);\naddRegexToken('ww', match1to2, match2);\naddRegexToken('W', match1to2, match1to2NoLeadingZero);\naddRegexToken('WW', match1to2, match2);\n\naddWeekParseToken(\n    ['w', 'ww', 'W', 'WW'],\n    function (input, week, config, token) {\n        week[token.substr(0, 1)] = toInt(input);\n    }\n);\n\n// HELPERS\n\n// LOCALES\n\nfunction localeWeek(mom) {\n    return weekOfYear(mom, this._week.dow, this._week.doy).week;\n}\n\nvar defaultLocaleWeek = {\n    dow: 0, // Sunday is the first day of the week.\n    doy: 6, // The week that contains Jan 6th is the first week of the year.\n};\n\nfunction localeFirstDayOfWeek() {\n    return this._week.dow;\n}\n\nfunction localeFirstDayOfYear() {\n    return this._week.doy;\n}\n\n// MOMENTS\n\nfunction getSetWeek(input) {\n    var week = this.localeData().week(this);\n    return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\nfunction getSetISOWeek(input) {\n    var week = weekOfYear(this, 1, 4).week;\n    return input == null ? week : this.add((input - week) * 7, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('d', 0, 'do', 'day');\n\naddFormatToken('dd', 0, 0, function (format) {\n    return this.localeData().weekdaysMin(this, format);\n});\n\naddFormatToken('ddd', 0, 0, function (format) {\n    return this.localeData().weekdaysShort(this, format);\n});\n\naddFormatToken('dddd', 0, 0, function (format) {\n    return this.localeData().weekdays(this, format);\n});\n\naddFormatToken('e', 0, 0, 'weekday');\naddFormatToken('E', 0, 0, 'isoWeekday');\n\n// PARSING\n\naddRegexToken('d', match1to2);\naddRegexToken('e', match1to2);\naddRegexToken('E', match1to2);\naddRegexToken('dd', function (isStrict, locale) {\n    return locale.weekdaysMinRegex(isStrict);\n});\naddRegexToken('ddd', function (isStrict, locale) {\n    return locale.weekdaysShortRegex(isStrict);\n});\naddRegexToken('dddd', function (isStrict, locale) {\n    return locale.weekdaysRegex(isStrict);\n});\n\naddWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n    var weekday = config._locale.weekdaysParse(input, token, config._strict);\n    // if we didn't get a weekday name, mark the date as invalid\n    if (weekday != null) {\n        week.d = weekday;\n    } else {\n        getParsingFlags(config).invalidWeekday = input;\n    }\n});\n\naddWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n    week[token] = toInt(input);\n});\n\n// HELPERS\n\nfunction parseWeekday(input, locale) {\n    if (typeof input !== 'string') {\n        return input;\n    }\n\n    if (!isNaN(input)) {\n        return parseInt(input, 10);\n    }\n\n    input = locale.weekdaysParse(input);\n    if (typeof input === 'number') {\n        return input;\n    }\n\n    return null;\n}\n\nfunction parseIsoWeekday(input, locale) {\n    if (typeof input === 'string') {\n        return locale.weekdaysParse(input) % 7 || 7;\n    }\n    return isNaN(input) ? null : input;\n}\n\n// LOCALES\nfunction shiftWeekdays(ws, n) {\n    return ws.slice(n, 7).concat(ws.slice(0, n));\n}\n\nvar defaultLocaleWeekdays =\n        'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n    defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n    defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n    defaultWeekdaysRegex = matchWord,\n    defaultWeekdaysShortRegex = matchWord,\n    defaultWeekdaysMinRegex = matchWord;\n\nfunction localeWeekdays(m, format) {\n    var weekdays = isArray(this._weekdays)\n        ? this._weekdays\n        : this._weekdays[\n              m && m !== true && this._weekdays.isFormat.test(format)\n                  ? 'format'\n                  : 'standalone'\n          ];\n    return m === true\n        ? shiftWeekdays(weekdays, this._week.dow)\n        : m\n          ? weekdays[m.day()]\n          : weekdays;\n}\n\nfunction localeWeekdaysShort(m) {\n    return m === true\n        ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n        : m\n          ? this._weekdaysShort[m.day()]\n          : this._weekdaysShort;\n}\n\nfunction localeWeekdaysMin(m) {\n    return m === true\n        ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n        : m\n          ? this._weekdaysMin[m.day()]\n          : this._weekdaysMin;\n}\n\nfunction handleStrictParse$1(weekdayName, format, strict) {\n    var i,\n        ii,\n        mom,\n        llc = weekdayName.toLocaleLowerCase();\n    if (!this._weekdaysParse) {\n        this._weekdaysParse = [];\n        this._shortWeekdaysParse = [];\n        this._minWeekdaysParse = [];\n\n        for (i = 0; i < 7; ++i) {\n            mom = createUTC([2000, 1]).day(i);\n            this._minWeekdaysParse[i] = this.weekdaysMin(\n                mom,\n                ''\n            ).toLocaleLowerCase();\n            this._shortWeekdaysParse[i] = this.weekdaysShort(\n                mom,\n                ''\n            ).toLocaleLowerCase();\n            this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n        }\n    }\n\n    if (strict) {\n        if (format === 'dddd') {\n            ii = indexOf.call(this._weekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else if (format === 'ddd') {\n            ii = indexOf.call(this._shortWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    } else {\n        if (format === 'dddd') {\n            ii = indexOf.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._shortWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else if (format === 'ddd') {\n            ii = indexOf.call(this._shortWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._minWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        } else {\n            ii = indexOf.call(this._minWeekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._weekdaysParse, llc);\n            if (ii !== -1) {\n                return ii;\n            }\n            ii = indexOf.call(this._shortWeekdaysParse, llc);\n            return ii !== -1 ? ii : null;\n        }\n    }\n}\n\nfunction localeWeekdaysParse(weekdayName, format, strict) {\n    var i, mom, regex;\n\n    if (this._weekdaysParseExact) {\n        return handleStrictParse$1.call(this, weekdayName, format, strict);\n    }\n\n    if (!this._weekdaysParse) {\n        this._weekdaysParse = [];\n        this._minWeekdaysParse = [];\n        this._shortWeekdaysParse = [];\n        this._fullWeekdaysParse = [];\n    }\n\n    for (i = 0; i < 7; i++) {\n        // make the regex if we don't have it already\n\n        mom = createUTC([2000, 1]).day(i);\n        if (strict && !this._fullWeekdaysParse[i]) {\n            this._fullWeekdaysParse[i] = new RegExp(\n                '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n                'i'\n            );\n            this._shortWeekdaysParse[i] = new RegExp(\n                '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n                'i'\n            );\n            this._minWeekdaysParse[i] = new RegExp(\n                '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n                'i'\n            );\n        }\n        if (!this._weekdaysParse[i]) {\n            regex =\n                '^' +\n                this.weekdays(mom, '') +\n                '|^' +\n                this.weekdaysShort(mom, '') +\n                '|^' +\n                this.weekdaysMin(mom, '');\n            this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n        }\n        // test the regex\n        if (\n            strict &&\n            format === 'dddd' &&\n            this._fullWeekdaysParse[i].test(weekdayName)\n        ) {\n            return i;\n        } else if (\n            strict &&\n            format === 'ddd' &&\n            this._shortWeekdaysParse[i].test(weekdayName)\n        ) {\n            return i;\n        } else if (\n            strict &&\n            format === 'dd' &&\n            this._minWeekdaysParse[i].test(weekdayName)\n        ) {\n            return i;\n        } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n            return i;\n        }\n    }\n}\n\n// MOMENTS\n\nfunction getSetDayOfWeek(input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n\n    var day = get(this, 'Day');\n    if (input != null) {\n        input = parseWeekday(input, this.localeData());\n        return this.add(input - day, 'd');\n    } else {\n        return day;\n    }\n}\n\nfunction getSetLocaleDayOfWeek(input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n    var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n    return input == null ? weekday : this.add(input - weekday, 'd');\n}\n\nfunction getSetISODayOfWeek(input) {\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n\n    // behaves the same as moment#day except\n    // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n    // as a setter, sunday should belong to the previous week.\n\n    if (input != null) {\n        var weekday = parseIsoWeekday(input, this.localeData());\n        return this.day(this.day() % 7 ? weekday : weekday - 7);\n    } else {\n        return this.day() || 7;\n    }\n}\n\nfunction weekdaysRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysStrictRegex;\n        } else {\n            return this._weekdaysRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            this._weekdaysRegex = defaultWeekdaysRegex;\n        }\n        return this._weekdaysStrictRegex && isStrict\n            ? this._weekdaysStrictRegex\n            : this._weekdaysRegex;\n    }\n}\n\nfunction weekdaysShortRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysShortStrictRegex;\n        } else {\n            return this._weekdaysShortRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n            this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n        }\n        return this._weekdaysShortStrictRegex && isStrict\n            ? this._weekdaysShortStrictRegex\n            : this._weekdaysShortRegex;\n    }\n}\n\nfunction weekdaysMinRegex(isStrict) {\n    if (this._weekdaysParseExact) {\n        if (!hasOwnProp(this, '_weekdaysRegex')) {\n            computeWeekdaysParse.call(this);\n        }\n        if (isStrict) {\n            return this._weekdaysMinStrictRegex;\n        } else {\n            return this._weekdaysMinRegex;\n        }\n    } else {\n        if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n            this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n        }\n        return this._weekdaysMinStrictRegex && isStrict\n            ? this._weekdaysMinStrictRegex\n            : this._weekdaysMinRegex;\n    }\n}\n\nfunction computeWeekdaysParse() {\n    function cmpLenRev(a, b) {\n        return b.length - a.length;\n    }\n\n    var minPieces = [],\n        shortPieces = [],\n        longPieces = [],\n        mixedPieces = [],\n        i,\n        mom,\n        minp,\n        shortp,\n        longp;\n    for (i = 0; i < 7; i++) {\n        // make the regex if we don't have it already\n        mom = createUTC([2000, 1]).day(i);\n        minp = regexEscape(this.weekdaysMin(mom, ''));\n        shortp = regexEscape(this.weekdaysShort(mom, ''));\n        longp = regexEscape(this.weekdays(mom, ''));\n        minPieces.push(minp);\n        shortPieces.push(shortp);\n        longPieces.push(longp);\n        mixedPieces.push(minp);\n        mixedPieces.push(shortp);\n        mixedPieces.push(longp);\n    }\n    // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n    // will match the longer piece.\n    minPieces.sort(cmpLenRev);\n    shortPieces.sort(cmpLenRev);\n    longPieces.sort(cmpLenRev);\n    mixedPieces.sort(cmpLenRev);\n\n    this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._weekdaysShortRegex = this._weekdaysRegex;\n    this._weekdaysMinRegex = this._weekdaysRegex;\n\n    this._weekdaysStrictRegex = new RegExp(\n        '^(' + longPieces.join('|') + ')',\n        'i'\n    );\n    this._weekdaysShortStrictRegex = new RegExp(\n        '^(' + shortPieces.join('|') + ')',\n        'i'\n    );\n    this._weekdaysMinStrictRegex = new RegExp(\n        '^(' + minPieces.join('|') + ')',\n        'i'\n    );\n}\n\n// FORMATTING\n\nfunction hFormat() {\n    return this.hours() % 12 || 12;\n}\n\nfunction kFormat() {\n    return this.hours() || 24;\n}\n\naddFormatToken('H', ['HH', 2], 0, 'hour');\naddFormatToken('h', ['hh', 2], 0, hFormat);\naddFormatToken('k', ['kk', 2], 0, kFormat);\n\naddFormatToken('hmm', 0, 0, function () {\n    return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('hmmss', 0, 0, function () {\n    return (\n        '' +\n        hFormat.apply(this) +\n        zeroFill(this.minutes(), 2) +\n        zeroFill(this.seconds(), 2)\n    );\n});\n\naddFormatToken('Hmm', 0, 0, function () {\n    return '' + this.hours() + zeroFill(this.minutes(), 2);\n});\n\naddFormatToken('Hmmss', 0, 0, function () {\n    return (\n        '' +\n        this.hours() +\n        zeroFill(this.minutes(), 2) +\n        zeroFill(this.seconds(), 2)\n    );\n});\n\nfunction meridiem(token, lowercase) {\n    addFormatToken(token, 0, 0, function () {\n        return this.localeData().meridiem(\n            this.hours(),\n            this.minutes(),\n            lowercase\n        );\n    });\n}\n\nmeridiem('a', true);\nmeridiem('A', false);\n\n// PARSING\n\nfunction matchMeridiem(isStrict, locale) {\n    return locale._meridiemParse;\n}\n\naddRegexToken('a', matchMeridiem);\naddRegexToken('A', matchMeridiem);\naddRegexToken('H', match1to2, match1to2HasZero);\naddRegexToken('h', match1to2, match1to2NoLeadingZero);\naddRegexToken('k', match1to2, match1to2NoLeadingZero);\naddRegexToken('HH', match1to2, match2);\naddRegexToken('hh', match1to2, match2);\naddRegexToken('kk', match1to2, match2);\n\naddRegexToken('hmm', match3to4);\naddRegexToken('hmmss', match5to6);\naddRegexToken('Hmm', match3to4);\naddRegexToken('Hmmss', match5to6);\n\naddParseToken(['H', 'HH'], HOUR);\naddParseToken(['k', 'kk'], function (input, array, config) {\n    var kInput = toInt(input);\n    array[HOUR] = kInput === 24 ? 0 : kInput;\n});\naddParseToken(['a', 'A'], function (input, array, config) {\n    config._isPm = config._locale.isPM(input);\n    config._meridiem = input;\n});\naddParseToken(['h', 'hh'], function (input, array, config) {\n    array[HOUR] = toInt(input);\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('hmmss', function (input, array, config) {\n    var pos1 = input.length - 4,\n        pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n    getParsingFlags(config).bigHour = true;\n});\naddParseToken('Hmm', function (input, array, config) {\n    var pos = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos));\n    array[MINUTE] = toInt(input.substr(pos));\n});\naddParseToken('Hmmss', function (input, array, config) {\n    var pos1 = input.length - 4,\n        pos2 = input.length - 2;\n    array[HOUR] = toInt(input.substr(0, pos1));\n    array[MINUTE] = toInt(input.substr(pos1, 2));\n    array[SECOND] = toInt(input.substr(pos2));\n});\n\n// LOCALES\n\nfunction localeIsPM(input) {\n    // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n    // Using charAt should be more compatible.\n    return (input + '').toLowerCase().charAt(0) === 'p';\n}\n\nvar defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n    // Setting the hour should keep the time, because the user explicitly\n    // specified which hour they want. So trying to maintain the same hour (in\n    // a new timezone) makes sense. Adding/subtracting hours does not follow\n    // this rule.\n    getSetHour = makeGetSet('Hours', true);\n\nfunction localeMeridiem(hours, minutes, isLower) {\n    if (hours > 11) {\n        return isLower ? 'pm' : 'PM';\n    } else {\n        return isLower ? 'am' : 'AM';\n    }\n}\n\nvar baseConfig = {\n    calendar: defaultCalendar,\n    longDateFormat: defaultLongDateFormat,\n    invalidDate: defaultInvalidDate,\n    ordinal: defaultOrdinal,\n    dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n    relativeTime: defaultRelativeTime,\n\n    months: defaultLocaleMonths,\n    monthsShort: defaultLocaleMonthsShort,\n\n    week: defaultLocaleWeek,\n\n    weekdays: defaultLocaleWeekdays,\n    weekdaysMin: defaultLocaleWeekdaysMin,\n    weekdaysShort: defaultLocaleWeekdaysShort,\n\n    meridiemParse: defaultLocaleMeridiemParse,\n};\n\n// internal storage for locale config files\nvar locales = {},\n    localeFamilies = {},\n    globalLocale;\n\nfunction commonPrefix(arr1, arr2) {\n    var i,\n        minl = Math.min(arr1.length, arr2.length);\n    for (i = 0; i < minl; i += 1) {\n        if (arr1[i] !== arr2[i]) {\n            return i;\n        }\n    }\n    return minl;\n}\n\nfunction normalizeLocale(key) {\n    return key ? key.toLowerCase().replace('_', '-') : key;\n}\n\n// pick the locale from the array\n// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\nfunction chooseLocale(names) {\n    var i = 0,\n        j,\n        next,\n        locale,\n        split;\n\n    while (i < names.length) {\n        split = normalizeLocale(names[i]).split('-');\n        j = split.length;\n        next = normalizeLocale(names[i + 1]);\n        next = next ? next.split('-') : null;\n        while (j > 0) {\n            locale = loadLocale(split.slice(0, j).join('-'));\n            if (locale) {\n                return locale;\n            }\n            if (\n                next &&\n                next.length >= j &&\n                commonPrefix(split, next) >= j - 1\n            ) {\n                //the next array item is better than a shallower substring of this one\n                break;\n            }\n            j--;\n        }\n        i++;\n    }\n    return globalLocale;\n}\n\nfunction isLocaleNameSane(name) {\n    // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n    // Ensure name is available and function returns boolean\n    return !!(name && name.match('^[^/\\\\\\\\]*$'));\n}\n\nfunction loadLocale(name) {\n    var oldLocale = null,\n        aliasedRequire;\n    // TODO: Find a better way to register and load all the locales in Node\n    if (\n        locales[name] === undefined &&\n        typeof module !== 'undefined' &&\n        module &&\n        module.exports &&\n        isLocaleNameSane(name)\n    ) {\n        try {\n            oldLocale = globalLocale._abbr;\n            aliasedRequire = require;\n            aliasedRequire('./locale/' + name);\n            getSetGlobalLocale(oldLocale);\n        } catch (e) {\n            // mark as not found to avoid repeating expensive file require call causing high CPU\n            // when trying to find en-US, en_US, en-us for every format call\n            locales[name] = null; // null means not found\n        }\n    }\n    return locales[name];\n}\n\n// This function will load locale and then set the global locale.  If\n// no arguments are passed in, it will simply return the current global\n// locale key.\nfunction getSetGlobalLocale(key, values) {\n    var data;\n    if (key) {\n        if (isUndefined(values)) {\n            data = getLocale(key);\n        } else {\n            data = defineLocale(key, values);\n        }\n\n        if (data) {\n            // moment.duration._locale = moment._locale = data;\n            globalLocale = data;\n        } else {\n            if (typeof console !== 'undefined' && console.warn) {\n                //warn user if arguments are passed but the locale could not be set\n                console.warn(\n                    'Locale ' + key + ' not found. Did you forget to load it?'\n                );\n            }\n        }\n    }\n\n    return globalLocale._abbr;\n}\n\nfunction defineLocale(name, config) {\n    if (config !== null) {\n        var locale,\n            parentConfig = baseConfig;\n        config.abbr = name;\n        if (locales[name] != null) {\n            deprecateSimple(\n                'defineLocaleOverride',\n                'use moment.updateLocale(localeName, config) to change ' +\n                    'an existing locale. moment.defineLocale(localeName, ' +\n                    'config) should only be used for creating a new locale ' +\n                    'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n            );\n            parentConfig = locales[name]._config;\n        } else if (config.parentLocale != null) {\n            if (locales[config.parentLocale] != null) {\n                parentConfig = locales[config.parentLocale]._config;\n            } else {\n                locale = loadLocale(config.parentLocale);\n                if (locale != null) {\n                    parentConfig = locale._config;\n                } else {\n                    if (!localeFamilies[config.parentLocale]) {\n                        localeFamilies[config.parentLocale] = [];\n                    }\n                    localeFamilies[config.parentLocale].push({\n                        name: name,\n                        config: config,\n                    });\n                    return null;\n                }\n            }\n        }\n        locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n        if (localeFamilies[name]) {\n            localeFamilies[name].forEach(function (x) {\n                defineLocale(x.name, x.config);\n            });\n        }\n\n        // backwards compat for now: also set the locale\n        // make sure we set the locale AFTER all child locales have been\n        // created, so we won't end up with the child locale set.\n        getSetGlobalLocale(name);\n\n        return locales[name];\n    } else {\n        // useful for testing\n        delete locales[name];\n        return null;\n    }\n}\n\nfunction updateLocale(name, config) {\n    if (config != null) {\n        var locale,\n            tmpLocale,\n            parentConfig = baseConfig;\n\n        if (locales[name] != null && locales[name].parentLocale != null) {\n            // Update existing child locale in-place to avoid memory-leaks\n            locales[name].set(mergeConfigs(locales[name]._config, config));\n        } else {\n            // MERGE\n            tmpLocale = loadLocale(name);\n            if (tmpLocale != null) {\n                parentConfig = tmpLocale._config;\n            }\n            config = mergeConfigs(parentConfig, config);\n            if (tmpLocale == null) {\n                // updateLocale is called for creating a new locale\n                // Set abbr so it will have a name (getters return\n                // undefined otherwise).\n                config.abbr = name;\n            }\n            locale = new Locale(config);\n            locale.parentLocale = locales[name];\n            locales[name] = locale;\n        }\n\n        // backwards compat for now: also set the locale\n        getSetGlobalLocale(name);\n    } else {\n        // pass null for config to unupdate, useful for tests\n        if (locales[name] != null) {\n            if (locales[name].parentLocale != null) {\n                locales[name] = locales[name].parentLocale;\n                if (name === getSetGlobalLocale()) {\n                    getSetGlobalLocale(name);\n                }\n            } else if (locales[name] != null) {\n                delete locales[name];\n            }\n        }\n    }\n    return locales[name];\n}\n\n// returns locale data\nfunction getLocale(key) {\n    var locale;\n\n    if (key && key._locale && key._locale._abbr) {\n        key = key._locale._abbr;\n    }\n\n    if (!key) {\n        return globalLocale;\n    }\n\n    if (!isArray(key)) {\n        //short-circuit everything else\n        locale = loadLocale(key);\n        if (locale) {\n            return locale;\n        }\n        key = [key];\n    }\n\n    return chooseLocale(key);\n}\n\nfunction listLocales() {\n    return keys(locales);\n}\n\nfunction checkOverflow(m) {\n    var overflow,\n        a = m._a;\n\n    if (a && getParsingFlags(m).overflow === -2) {\n        overflow =\n            a[MONTH] < 0 || a[MONTH] > 11\n                ? MONTH\n                : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n                  ? DATE\n                  : a[HOUR] < 0 ||\n                      a[HOUR] > 24 ||\n                      (a[HOUR] === 24 &&\n                          (a[MINUTE] !== 0 ||\n                              a[SECOND] !== 0 ||\n                              a[MILLISECOND] !== 0))\n                    ? HOUR\n                    : a[MINUTE] < 0 || a[MINUTE] > 59\n                      ? MINUTE\n                      : a[SECOND] < 0 || a[SECOND] > 59\n                        ? SECOND\n                        : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n                          ? MILLISECOND\n                          : -1;\n\n        if (\n            getParsingFlags(m)._overflowDayOfYear &&\n            (overflow < YEAR || overflow > DATE)\n        ) {\n            overflow = DATE;\n        }\n        if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n            overflow = WEEK;\n        }\n        if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n            overflow = WEEKDAY;\n        }\n\n        getParsingFlags(m).overflow = overflow;\n    }\n\n    return m;\n}\n\n// iso 8601 regex\n// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\nvar extendedIsoRegex =\n        /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n    basicIsoRegex =\n        /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n    tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n    isoDates = [\n        ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n        ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n        ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n        ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n        ['YYYY-DDD', /\\d{4}-\\d{3}/],\n        ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n        ['YYYYYYMMDD', /[+-]\\d{10}/],\n        ['YYYYMMDD', /\\d{8}/],\n        ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n        ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n        ['YYYYDDD', /\\d{7}/],\n        ['YYYYMM', /\\d{6}/, false],\n        ['YYYY', /\\d{4}/, false],\n    ],\n    // iso time formats and regexes\n    isoTimes = [\n        ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n        ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n        ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n        ['HH:mm', /\\d\\d:\\d\\d/],\n        ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n        ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n        ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n        ['HHmm', /\\d\\d\\d\\d/],\n        ['HH', /\\d\\d/],\n    ],\n    aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n    // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n    rfc2822 =\n        /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n    obsOffsets = {\n        UT: 0,\n        GMT: 0,\n        EDT: -4 * 60,\n        EST: -5 * 60,\n        CDT: -5 * 60,\n        CST: -6 * 60,\n        MDT: -6 * 60,\n        MST: -7 * 60,\n        PDT: -7 * 60,\n        PST: -8 * 60,\n    };\n\n// date from iso format\nfunction configFromISO(config) {\n    var i,\n        l,\n        string = config._i,\n        match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n        allowTime,\n        dateFormat,\n        timeFormat,\n        tzFormat,\n        isoDatesLen = isoDates.length,\n        isoTimesLen = isoTimes.length;\n\n    if (match) {\n        getParsingFlags(config).iso = true;\n        for (i = 0, l = isoDatesLen; i < l; i++) {\n            if (isoDates[i][1].exec(match[1])) {\n                dateFormat = isoDates[i][0];\n                allowTime = isoDates[i][2] !== false;\n                break;\n            }\n        }\n        if (dateFormat == null) {\n            config._isValid = false;\n            return;\n        }\n        if (match[3]) {\n            for (i = 0, l = isoTimesLen; i < l; i++) {\n                if (isoTimes[i][1].exec(match[3])) {\n                    // match[2] should be 'T' or space\n                    timeFormat = (match[2] || ' ') + isoTimes[i][0];\n                    break;\n                }\n            }\n            if (timeFormat == null) {\n                config._isValid = false;\n                return;\n            }\n        }\n        if (!allowTime && timeFormat != null) {\n            config._isValid = false;\n            return;\n        }\n        if (match[4]) {\n            if (tzRegex.exec(match[4])) {\n                tzFormat = 'Z';\n            } else {\n                config._isValid = false;\n                return;\n            }\n        }\n        config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n        configFromStringAndFormat(config);\n    } else {\n        config._isValid = false;\n    }\n}\n\nfunction extractFromRFC2822Strings(\n    yearStr,\n    monthStr,\n    dayStr,\n    hourStr,\n    minuteStr,\n    secondStr\n) {\n    var result = [\n        untruncateYear(yearStr),\n        defaultLocaleMonthsShort.indexOf(monthStr),\n        parseInt(dayStr, 10),\n        parseInt(hourStr, 10),\n        parseInt(minuteStr, 10),\n    ];\n\n    if (secondStr) {\n        result.push(parseInt(secondStr, 10));\n    }\n\n    return result;\n}\n\nfunction untruncateYear(yearStr) {\n    var year = parseInt(yearStr, 10);\n    if (year <= 49) {\n        return 2000 + year;\n    } else if (year <= 999) {\n        return 1900 + year;\n    }\n    return year;\n}\n\nfunction preprocessRFC2822(s) {\n    // Remove comments and folding whitespace and replace multiple-spaces with a single space\n    return s\n        .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n        .replace(/(\\s\\s+)/g, ' ')\n        .replace(/^\\s\\s*/, '')\n        .replace(/\\s\\s*$/, '');\n}\n\nfunction checkWeekday(weekdayStr, parsedInput, config) {\n    if (weekdayStr) {\n        // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n        var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n            weekdayActual = new Date(\n                parsedInput[0],\n                parsedInput[1],\n                parsedInput[2]\n            ).getDay();\n        if (weekdayProvided !== weekdayActual) {\n            getParsingFlags(config).weekdayMismatch = true;\n            config._isValid = false;\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction calculateOffset(obsOffset, militaryOffset, numOffset) {\n    if (obsOffset) {\n        return obsOffsets[obsOffset];\n    } else if (militaryOffset) {\n        // the only allowed military tz is Z\n        return 0;\n    } else {\n        var hm = parseInt(numOffset, 10),\n            m = hm % 100,\n            h = (hm - m) / 100;\n        return h * 60 + m;\n    }\n}\n\n// date and time from ref 2822 format\nfunction configFromRFC2822(config) {\n    var match = rfc2822.exec(preprocessRFC2822(config._i)),\n        parsedArray;\n    if (match) {\n        parsedArray = extractFromRFC2822Strings(\n            match[4],\n            match[3],\n            match[2],\n            match[5],\n            match[6],\n            match[7]\n        );\n        if (!checkWeekday(match[1], parsedArray, config)) {\n            return;\n        }\n\n        config._a = parsedArray;\n        config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n        config._d = createUTCDate.apply(null, config._a);\n        config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n        getParsingFlags(config).rfc2822 = true;\n    } else {\n        config._isValid = false;\n    }\n}\n\n// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\nfunction configFromString(config) {\n    var matched = aspNetJsonRegex.exec(config._i);\n    if (matched !== null) {\n        config._d = new Date(+matched[1]);\n        return;\n    }\n\n    configFromISO(config);\n    if (config._isValid === false) {\n        delete config._isValid;\n    } else {\n        return;\n    }\n\n    configFromRFC2822(config);\n    if (config._isValid === false) {\n        delete config._isValid;\n    } else {\n        return;\n    }\n\n    if (config._strict) {\n        config._isValid = false;\n    } else {\n        // Final attempt, use Input Fallback\n        hooks.createFromInputFallback(config);\n    }\n}\n\nhooks.createFromInputFallback = deprecate(\n    'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n        'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n        'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n    function (config) {\n        config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n    }\n);\n\n// Pick the first defined of two or three arguments.\nfunction defaults(a, b, c) {\n    if (a != null) {\n        return a;\n    }\n    if (b != null) {\n        return b;\n    }\n    return c;\n}\n\nfunction currentDateArray(config) {\n    // hooks is actually the exported moment object\n    var nowValue = new Date(hooks.now());\n    if (config._useUTC) {\n        return [\n            nowValue.getUTCFullYear(),\n            nowValue.getUTCMonth(),\n            nowValue.getUTCDate(),\n        ];\n    }\n    return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n}\n\n// convert an array to a date.\n// the array should mirror the parameters below\n// note: all values past the year are optional and will default to the lowest possible value.\n// [year, month, day , hour, minute, second, millisecond]\nfunction configFromArray(config) {\n    var i,\n        date,\n        input = [],\n        currentDate,\n        expectedWeekday,\n        yearToUse;\n\n    if (config._d) {\n        return;\n    }\n\n    currentDate = currentDateArray(config);\n\n    //compute day of the year from weeks and weekdays\n    if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n        dayOfYearFromWeekInfo(config);\n    }\n\n    //if the day of the year is set, figure out what it is\n    if (config._dayOfYear != null) {\n        yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n        if (\n            config._dayOfYear > daysInYear(yearToUse) ||\n            config._dayOfYear === 0\n        ) {\n            getParsingFlags(config)._overflowDayOfYear = true;\n        }\n\n        date = createUTCDate(yearToUse, 0, config._dayOfYear);\n        config._a[MONTH] = date.getUTCMonth();\n        config._a[DATE] = date.getUTCDate();\n    }\n\n    // Default to current date.\n    // * if no year, month, day of month are given, default to today\n    // * if day of month is given, default month and year\n    // * if month is given, default only year\n    // * if year is given, don't default anything\n    for (i = 0; i < 3 && config._a[i] == null; ++i) {\n        config._a[i] = input[i] = currentDate[i];\n    }\n\n    // Zero out whatever was not defaulted, including time\n    for (; i < 7; i++) {\n        config._a[i] = input[i] =\n            config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n    }\n\n    // Check for 24:00:00.000\n    if (\n        config._a[HOUR] === 24 &&\n        config._a[MINUTE] === 0 &&\n        config._a[SECOND] === 0 &&\n        config._a[MILLISECOND] === 0\n    ) {\n        config._nextDay = true;\n        config._a[HOUR] = 0;\n    }\n\n    config._d = (config._useUTC ? createUTCDate : createDate).apply(\n        null,\n        input\n    );\n    expectedWeekday = config._useUTC\n        ? config._d.getUTCDay()\n        : config._d.getDay();\n\n    // Apply timezone offset from input. The actual utcOffset can be changed\n    // with parseZone.\n    if (config._tzm != null) {\n        config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n    }\n\n    if (config._nextDay) {\n        config._a[HOUR] = 24;\n    }\n\n    // check for mismatching day of week\n    if (\n        config._w &&\n        typeof config._w.d !== 'undefined' &&\n        config._w.d !== expectedWeekday\n    ) {\n        getParsingFlags(config).weekdayMismatch = true;\n    }\n}\n\nfunction dayOfYearFromWeekInfo(config) {\n    var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n    w = config._w;\n    if (w.GG != null || w.W != null || w.E != null) {\n        dow = 1;\n        doy = 4;\n\n        // TODO: We need to take the current isoWeekYear, but that depends on\n        // how we interpret now (local, utc, fixed offset). So create\n        // a now version of current config (take local/utc/offset flags, and\n        // create now).\n        weekYear = defaults(\n            w.GG,\n            config._a[YEAR],\n            weekOfYear(createLocal(), 1, 4).year\n        );\n        week = defaults(w.W, 1);\n        weekday = defaults(w.E, 1);\n        if (weekday < 1 || weekday > 7) {\n            weekdayOverflow = true;\n        }\n    } else {\n        dow = config._locale._week.dow;\n        doy = config._locale._week.doy;\n\n        curWeek = weekOfYear(createLocal(), dow, doy);\n\n        weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n        // Default to current week.\n        week = defaults(w.w, curWeek.week);\n\n        if (w.d != null) {\n            // weekday -- low day numbers are considered next week\n            weekday = w.d;\n            if (weekday < 0 || weekday > 6) {\n                weekdayOverflow = true;\n            }\n        } else if (w.e != null) {\n            // local weekday -- counting starts from beginning of week\n            weekday = w.e + dow;\n            if (w.e < 0 || w.e > 6) {\n                weekdayOverflow = true;\n            }\n        } else {\n            // default to beginning of week\n            weekday = dow;\n        }\n    }\n    if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n        getParsingFlags(config)._overflowWeeks = true;\n    } else if (weekdayOverflow != null) {\n        getParsingFlags(config)._overflowWeekday = true;\n    } else {\n        temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n        config._a[YEAR] = temp.year;\n        config._dayOfYear = temp.dayOfYear;\n    }\n}\n\n// constant that refers to the ISO standard\nhooks.ISO_8601 = function () {};\n\n// constant that refers to the RFC 2822 form\nhooks.RFC_2822 = function () {};\n\n// date from string and format string\nfunction configFromStringAndFormat(config) {\n    // TODO: Move this to another part of the creation flow to prevent circular deps\n    if (config._f === hooks.ISO_8601) {\n        configFromISO(config);\n        return;\n    }\n    if (config._f === hooks.RFC_2822) {\n        configFromRFC2822(config);\n        return;\n    }\n    config._a = [];\n    getParsingFlags(config).empty = true;\n\n    // This array is used to make a Date, either with `new Date` or `Date.UTC`\n    var string = '' + config._i,\n        i,\n        parsedInput,\n        tokens,\n        token,\n        skipped,\n        stringLength = string.length,\n        totalParsedInputLength = 0,\n        era,\n        tokenLen;\n\n    tokens =\n        expandFormat(config._f, config._locale).match(formattingTokens) || [];\n    tokenLen = tokens.length;\n    for (i = 0; i < tokenLen; i++) {\n        token = tokens[i];\n        parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n            [])[0];\n        if (parsedInput) {\n            skipped = string.substr(0, string.indexOf(parsedInput));\n            if (skipped.length > 0) {\n                getParsingFlags(config).unusedInput.push(skipped);\n            }\n            string = string.slice(\n                string.indexOf(parsedInput) + parsedInput.length\n            );\n            totalParsedInputLength += parsedInput.length;\n        }\n        // don't parse if it's not a known token\n        if (formatTokenFunctions[token]) {\n            if (parsedInput) {\n                getParsingFlags(config).empty = false;\n            } else {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n            addTimeToArrayFromToken(token, parsedInput, config);\n        } else if (config._strict && !parsedInput) {\n            getParsingFlags(config).unusedTokens.push(token);\n        }\n    }\n\n    // add remaining unparsed input length to the string\n    getParsingFlags(config).charsLeftOver =\n        stringLength - totalParsedInputLength;\n    if (string.length > 0) {\n        getParsingFlags(config).unusedInput.push(string);\n    }\n\n    // clear _12h flag if hour is <= 12\n    if (\n        config._a[HOUR] <= 12 &&\n        getParsingFlags(config).bigHour === true &&\n        config._a[HOUR] > 0\n    ) {\n        getParsingFlags(config).bigHour = undefined;\n    }\n\n    getParsingFlags(config).parsedDateParts = config._a.slice(0);\n    getParsingFlags(config).meridiem = config._meridiem;\n    // handle meridiem\n    config._a[HOUR] = meridiemFixWrap(\n        config._locale,\n        config._a[HOUR],\n        config._meridiem\n    );\n\n    // handle era\n    era = getParsingFlags(config).era;\n    if (era !== null) {\n        config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n    }\n\n    configFromArray(config);\n    checkOverflow(config);\n}\n\nfunction meridiemFixWrap(locale, hour, meridiem) {\n    var isPm;\n\n    if (meridiem == null) {\n        // nothing to do\n        return hour;\n    }\n    if (locale.meridiemHour != null) {\n        return locale.meridiemHour(hour, meridiem);\n    } else if (locale.isPM != null) {\n        // Fallback\n        isPm = locale.isPM(meridiem);\n        if (isPm && hour < 12) {\n            hour += 12;\n        }\n        if (!isPm && hour === 12) {\n            hour = 0;\n        }\n        return hour;\n    } else {\n        // this is not supposed to happen\n        return hour;\n    }\n}\n\n// date from string and array of format strings\nfunction configFromStringAndArray(config) {\n    var tempConfig,\n        bestMoment,\n        scoreToBeat,\n        i,\n        currentScore,\n        validFormatFound,\n        bestFormatIsValid = false,\n        configfLen = config._f.length;\n\n    if (configfLen === 0) {\n        getParsingFlags(config).invalidFormat = true;\n        config._d = new Date(NaN);\n        return;\n    }\n\n    for (i = 0; i < configfLen; i++) {\n        currentScore = 0;\n        validFormatFound = false;\n        tempConfig = copyConfig({}, config);\n        if (config._useUTC != null) {\n            tempConfig._useUTC = config._useUTC;\n        }\n        tempConfig._f = config._f[i];\n        configFromStringAndFormat(tempConfig);\n\n        if (isValid(tempConfig)) {\n            validFormatFound = true;\n        }\n\n        // if there is any input that was not parsed add a penalty for that format\n        currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n        //or tokens\n        currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n        getParsingFlags(tempConfig).score = currentScore;\n\n        if (!bestFormatIsValid) {\n            if (\n                scoreToBeat == null ||\n                currentScore < scoreToBeat ||\n                validFormatFound\n            ) {\n                scoreToBeat = currentScore;\n                bestMoment = tempConfig;\n                if (validFormatFound) {\n                    bestFormatIsValid = true;\n                }\n            }\n        } else {\n            if (currentScore < scoreToBeat) {\n                scoreToBeat = currentScore;\n                bestMoment = tempConfig;\n            }\n        }\n    }\n\n    extend(config, bestMoment || tempConfig);\n}\n\nfunction configFromObject(config) {\n    if (config._d) {\n        return;\n    }\n\n    var i = normalizeObjectUnits(config._i),\n        dayOrDate = i.day === undefined ? i.date : i.day;\n    config._a = map(\n        [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n        function (obj) {\n            return obj && parseInt(obj, 10);\n        }\n    );\n\n    configFromArray(config);\n}\n\nfunction createFromConfig(config) {\n    var res = new Moment(checkOverflow(prepareConfig(config)));\n    if (res._nextDay) {\n        // Adding is smart enough around DST\n        res.add(1, 'd');\n        res._nextDay = undefined;\n    }\n\n    return res;\n}\n\nfunction prepareConfig(config) {\n    var input = config._i,\n        format = config._f;\n\n    config._locale = config._locale || getLocale(config._l);\n\n    if (input === null || (format === undefined && input === '')) {\n        return createInvalid({ nullInput: true });\n    }\n\n    if (typeof input === 'string') {\n        config._i = input = config._locale.preparse(input);\n    }\n\n    if (isMoment(input)) {\n        return new Moment(checkOverflow(input));\n    } else if (isDate(input)) {\n        config._d = input;\n    } else if (isArray(format)) {\n        configFromStringAndArray(config);\n    } else if (format) {\n        configFromStringAndFormat(config);\n    } else {\n        configFromInput(config);\n    }\n\n    if (!isValid(config)) {\n        config._d = null;\n    }\n\n    return config;\n}\n\nfunction configFromInput(config) {\n    var input = config._i;\n    if (isUndefined(input)) {\n        config._d = new Date(hooks.now());\n    } else if (isDate(input)) {\n        config._d = new Date(input.valueOf());\n    } else if (typeof input === 'string') {\n        configFromString(config);\n    } else if (isArray(input)) {\n        config._a = map(input.slice(0), function (obj) {\n            return parseInt(obj, 10);\n        });\n        configFromArray(config);\n    } else if (isObject(input)) {\n        configFromObject(config);\n    } else if (isNumber(input)) {\n        // from milliseconds\n        config._d = new Date(input);\n    } else {\n        hooks.createFromInputFallback(config);\n    }\n}\n\nfunction createLocalOrUTC(input, format, locale, strict, isUTC) {\n    var c = {};\n\n    if (format === true || format === false) {\n        strict = format;\n        format = undefined;\n    }\n\n    if (locale === true || locale === false) {\n        strict = locale;\n        locale = undefined;\n    }\n\n    if (\n        (isObject(input) && isObjectEmpty(input)) ||\n        (isArray(input) && input.length === 0)\n    ) {\n        input = undefined;\n    }\n    // object construction must be done this way.\n    // https://github.com/moment/moment/issues/1423\n    c._isAMomentObject = true;\n    c._useUTC = c._isUTC = isUTC;\n    c._l = locale;\n    c._i = input;\n    c._f = format;\n    c._strict = strict;\n\n    return createFromConfig(c);\n}\n\nfunction createLocal(input, format, locale, strict) {\n    return createLocalOrUTC(input, format, locale, strict, false);\n}\n\nvar prototypeMin = deprecate(\n        'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other < this ? this : other;\n            } else {\n                return createInvalid();\n            }\n        }\n    ),\n    prototypeMax = deprecate(\n        'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n        function () {\n            var other = createLocal.apply(null, arguments);\n            if (this.isValid() && other.isValid()) {\n                return other > this ? this : other;\n            } else {\n                return createInvalid();\n            }\n        }\n    );\n\n// Pick a moment m from moments so that m[fn](other) is true for all\n// other. This relies on the function fn to be transitive.\n//\n// moments should either be an array of moment objects or an array, whose\n// first element is an array of moment objects.\nfunction pickBy(fn, moments) {\n    var res, i;\n    if (moments.length === 1 && isArray(moments[0])) {\n        moments = moments[0];\n    }\n    if (!moments.length) {\n        return createLocal();\n    }\n    res = moments[0];\n    for (i = 1; i < moments.length; ++i) {\n        if (!moments[i].isValid() || moments[i][fn](res)) {\n            res = moments[i];\n        }\n    }\n    return res;\n}\n\n// TODO: Use [].sort instead?\nfunction min() {\n    var args = [].slice.call(arguments, 0);\n\n    return pickBy('isBefore', args);\n}\n\nfunction max() {\n    var args = [].slice.call(arguments, 0);\n\n    return pickBy('isAfter', args);\n}\n\nvar now = function () {\n    return Date.now ? Date.now() : +new Date();\n};\n\nvar ordering = [\n    'year',\n    'quarter',\n    'month',\n    'week',\n    'day',\n    'hour',\n    'minute',\n    'second',\n    'millisecond',\n];\n\nfunction isDurationValid(m) {\n    var key,\n        unitHasDecimal = false,\n        i,\n        orderLen = ordering.length;\n    for (key in m) {\n        if (\n            hasOwnProp(m, key) &&\n            !(\n                indexOf.call(ordering, key) !== -1 &&\n                (m[key] == null || !isNaN(m[key]))\n            )\n        ) {\n            return false;\n        }\n    }\n\n    for (i = 0; i < orderLen; ++i) {\n        if (m[ordering[i]]) {\n            if (unitHasDecimal) {\n                return false; // only allow non-integers for smallest unit\n            }\n            if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n                unitHasDecimal = true;\n            }\n        }\n    }\n\n    return true;\n}\n\nfunction isValid$1() {\n    return this._isValid;\n}\n\nfunction createInvalid$1() {\n    return createDuration(NaN);\n}\n\nfunction Duration(duration) {\n    var normalizedInput = normalizeObjectUnits(duration),\n        years = normalizedInput.year || 0,\n        quarters = normalizedInput.quarter || 0,\n        months = normalizedInput.month || 0,\n        weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n        days = normalizedInput.day || 0,\n        hours = normalizedInput.hour || 0,\n        minutes = normalizedInput.minute || 0,\n        seconds = normalizedInput.second || 0,\n        milliseconds = normalizedInput.millisecond || 0;\n\n    this._isValid = isDurationValid(normalizedInput);\n\n    // representation for dateAddRemove\n    this._milliseconds =\n        +milliseconds +\n        seconds * 1e3 + // 1000\n        minutes * 6e4 + // 1000 * 60\n        hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n    // Because of dateAddRemove treats 24 hours as different from a\n    // day when working around DST, we need to store them separately\n    this._days = +days + weeks * 7;\n    // It is impossible to translate months into days without knowing\n    // which months you are are talking about, so we have to store\n    // it separately.\n    this._months = +months + quarters * 3 + years * 12;\n\n    this._data = {};\n\n    this._locale = getLocale();\n\n    this._bubble();\n}\n\nfunction isDuration(obj) {\n    return obj instanceof Duration;\n}\n\nfunction absRound(number) {\n    if (number < 0) {\n        return Math.round(-1 * number) * -1;\n    } else {\n        return Math.round(number);\n    }\n}\n\n// compare two arrays, return the number of differences\nfunction compareArrays(array1, array2, dontConvert) {\n    var len = Math.min(array1.length, array2.length),\n        lengthDiff = Math.abs(array1.length - array2.length),\n        diffs = 0,\n        i;\n    for (i = 0; i < len; i++) {\n        if (\n            (dontConvert && array1[i] !== array2[i]) ||\n            (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n        ) {\n            diffs++;\n        }\n    }\n    return diffs + lengthDiff;\n}\n\n// FORMATTING\n\nfunction offset(token, separator) {\n    addFormatToken(token, 0, 0, function () {\n        var offset = this.utcOffset(),\n            sign = '+';\n        if (offset < 0) {\n            offset = -offset;\n            sign = '-';\n        }\n        return (\n            sign +\n            zeroFill(~~(offset / 60), 2) +\n            separator +\n            zeroFill(~~offset % 60, 2)\n        );\n    });\n}\n\noffset('Z', ':');\noffset('ZZ', '');\n\n// PARSING\n\naddRegexToken('Z', matchShortOffset);\naddRegexToken('ZZ', matchShortOffset);\naddParseToken(['Z', 'ZZ'], function (input, array, config) {\n    config._useUTC = true;\n    config._tzm = offsetFromString(matchShortOffset, input);\n});\n\n// HELPERS\n\n// timezone chunker\n// '+10:00' > ['10',  '00']\n// '-1530'  > ['-15', '30']\nvar chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\nfunction offsetFromString(matcher, string) {\n    var matches = (string || '').match(matcher),\n        chunk,\n        parts,\n        minutes;\n\n    if (matches === null) {\n        return null;\n    }\n\n    chunk = matches[matches.length - 1] || [];\n    parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n    minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n    return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n}\n\n// Return a moment from input, that is local/utc/zone equivalent to model.\nfunction cloneWithOffset(input, model) {\n    var res, diff;\n    if (model._isUTC) {\n        res = model.clone();\n        diff =\n            (isMoment(input) || isDate(input)\n                ? input.valueOf()\n                : createLocal(input).valueOf()) - res.valueOf();\n        // Use low-level api, because this fn is low-level api.\n        res._d.setTime(res._d.valueOf() + diff);\n        hooks.updateOffset(res, false);\n        return res;\n    } else {\n        return createLocal(input).local();\n    }\n}\n\nfunction getDateOffset(m) {\n    // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n    // https://github.com/moment/moment/pull/1871\n    return -Math.round(m._d.getTimezoneOffset());\n}\n\n// HOOKS\n\n// This function will be called whenever a moment is mutated.\n// It is intended to keep the offset in sync with the timezone.\nhooks.updateOffset = function () {};\n\n// MOMENTS\n\n// keepLocalTime = true means only change the timezone, without\n// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n// +0200, so we adjust the time as needed, to be valid.\n//\n// Keeping the time actually adds/subtracts (one hour)\n// from the actual represented time. That is why we call updateOffset\n// a second time. In case it wants us to change the offset again\n// _changeInProgress == true case, then we have to adjust, because\n// there is no such time in the given timezone.\nfunction getSetOffset(input, keepLocalTime, keepMinutes) {\n    var offset = this._offset || 0,\n        localAdjust;\n    if (!this.isValid()) {\n        return input != null ? this : NaN;\n    }\n    if (input != null) {\n        if (typeof input === 'string') {\n            input = offsetFromString(matchShortOffset, input);\n            if (input === null) {\n                return this;\n            }\n        } else if (Math.abs(input) < 16 && !keepMinutes) {\n            input = input * 60;\n        }\n        if (!this._isUTC && keepLocalTime) {\n            localAdjust = getDateOffset(this);\n        }\n        this._offset = input;\n        this._isUTC = true;\n        if (localAdjust != null) {\n            this.add(localAdjust, 'm');\n        }\n        if (offset !== input) {\n            if (!keepLocalTime || this._changeInProgress) {\n                addSubtract(\n                    this,\n                    createDuration(input - offset, 'm'),\n                    1,\n                    false\n                );\n            } else if (!this._changeInProgress) {\n                this._changeInProgress = true;\n                hooks.updateOffset(this, true);\n                this._changeInProgress = null;\n            }\n        }\n        return this;\n    } else {\n        return this._isUTC ? offset : getDateOffset(this);\n    }\n}\n\nfunction getSetZone(input, keepLocalTime) {\n    if (input != null) {\n        if (typeof input !== 'string') {\n            input = -input;\n        }\n\n        this.utcOffset(input, keepLocalTime);\n\n        return this;\n    } else {\n        return -this.utcOffset();\n    }\n}\n\nfunction setOffsetToUTC(keepLocalTime) {\n    return this.utcOffset(0, keepLocalTime);\n}\n\nfunction setOffsetToLocal(keepLocalTime) {\n    if (this._isUTC) {\n        this.utcOffset(0, keepLocalTime);\n        this._isUTC = false;\n\n        if (keepLocalTime) {\n            this.subtract(getDateOffset(this), 'm');\n        }\n    }\n    return this;\n}\n\nfunction setOffsetToParsedOffset() {\n    if (this._tzm != null) {\n        this.utcOffset(this._tzm, false, true);\n    } else if (typeof this._i === 'string') {\n        var tZone = offsetFromString(matchOffset, this._i);\n        if (tZone != null) {\n            this.utcOffset(tZone);\n        } else {\n            this.utcOffset(0, true);\n        }\n    }\n    return this;\n}\n\nfunction hasAlignedHourOffset(input) {\n    if (!this.isValid()) {\n        return false;\n    }\n    input = input ? createLocal(input).utcOffset() : 0;\n\n    return (this.utcOffset() - input) % 60 === 0;\n}\n\nfunction isDaylightSavingTime() {\n    return (\n        this.utcOffset() > this.clone().month(0).utcOffset() ||\n        this.utcOffset() > this.clone().month(5).utcOffset()\n    );\n}\n\nfunction isDaylightSavingTimeShifted() {\n    if (!isUndefined(this._isDSTShifted)) {\n        return this._isDSTShifted;\n    }\n\n    var c = {},\n        other;\n\n    copyConfig(c, this);\n    c = prepareConfig(c);\n\n    if (c._a) {\n        other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n        this._isDSTShifted =\n            this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n    } else {\n        this._isDSTShifted = false;\n    }\n\n    return this._isDSTShifted;\n}\n\nfunction isLocal() {\n    return this.isValid() ? !this._isUTC : false;\n}\n\nfunction isUtcOffset() {\n    return this.isValid() ? this._isUTC : false;\n}\n\nfunction isUtc() {\n    return this.isValid() ? this._isUTC && this._offset === 0 : false;\n}\n\n// ASP.NET json date format regex\nvar aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n    // and further modified to allow for strings containing both week and day\n    isoRegex =\n        /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\nfunction createDuration(input, key) {\n    var duration = input,\n        // matching against regexp is expensive, do it on demand\n        match = null,\n        sign,\n        ret,\n        diffRes;\n\n    if (isDuration(input)) {\n        duration = {\n            ms: input._milliseconds,\n            d: input._days,\n            M: input._months,\n        };\n    } else if (isNumber(input) || !isNaN(+input)) {\n        duration = {};\n        if (key) {\n            duration[key] = +input;\n        } else {\n            duration.milliseconds = +input;\n        }\n    } else if ((match = aspNetRegex.exec(input))) {\n        sign = match[1] === '-' ? -1 : 1;\n        duration = {\n            y: 0,\n            d: toInt(match[DATE]) * sign,\n            h: toInt(match[HOUR]) * sign,\n            m: toInt(match[MINUTE]) * sign,\n            s: toInt(match[SECOND]) * sign,\n            ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n        };\n    } else if ((match = isoRegex.exec(input))) {\n        sign = match[1] === '-' ? -1 : 1;\n        duration = {\n            y: parseIso(match[2], sign),\n            M: parseIso(match[3], sign),\n            w: parseIso(match[4], sign),\n            d: parseIso(match[5], sign),\n            h: parseIso(match[6], sign),\n            m: parseIso(match[7], sign),\n            s: parseIso(match[8], sign),\n        };\n    } else if (duration == null) {\n        // checks for null or undefined\n        duration = {};\n    } else if (\n        typeof duration === 'object' &&\n        ('from' in duration || 'to' in duration)\n    ) {\n        diffRes = momentsDifference(\n            createLocal(duration.from),\n            createLocal(duration.to)\n        );\n\n        duration = {};\n        duration.ms = diffRes.milliseconds;\n        duration.M = diffRes.months;\n    }\n\n    ret = new Duration(duration);\n\n    if (isDuration(input) && hasOwnProp(input, '_locale')) {\n        ret._locale = input._locale;\n    }\n\n    if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n        ret._isValid = input._isValid;\n    }\n\n    return ret;\n}\n\ncreateDuration.fn = Duration.prototype;\ncreateDuration.invalid = createInvalid$1;\n\nfunction parseIso(inp, sign) {\n    // We'd normally use ~~inp for this, but unfortunately it also\n    // converts floats to ints.\n    // inp may be undefined, so careful calling replace on it.\n    var res = inp && parseFloat(inp.replace(',', '.'));\n    // apply sign while we're at it\n    return (isNaN(res) ? 0 : res) * sign;\n}\n\nfunction positiveMomentsDifference(base, other) {\n    var res = {};\n\n    res.months =\n        other.month() - base.month() + (other.year() - base.year()) * 12;\n    if (base.clone().add(res.months, 'M').isAfter(other)) {\n        --res.months;\n    }\n\n    res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n    return res;\n}\n\nfunction momentsDifference(base, other) {\n    var res;\n    if (!(base.isValid() && other.isValid())) {\n        return { milliseconds: 0, months: 0 };\n    }\n\n    other = cloneWithOffset(other, base);\n    if (base.isBefore(other)) {\n        res = positiveMomentsDifference(base, other);\n    } else {\n        res = positiveMomentsDifference(other, base);\n        res.milliseconds = -res.milliseconds;\n        res.months = -res.months;\n    }\n\n    return res;\n}\n\n// TODO: remove 'name' arg after deprecation is removed\nfunction createAdder(direction, name) {\n    return function (val, period) {\n        var dur, tmp;\n        //invert the arguments, but complain about it\n        if (period !== null && !isNaN(+period)) {\n            deprecateSimple(\n                name,\n                'moment().' +\n                    name +\n                    '(period, number) is deprecated. Please use moment().' +\n                    name +\n                    '(number, period). ' +\n                    'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n            );\n            tmp = val;\n            val = period;\n            period = tmp;\n        }\n\n        dur = createDuration(val, period);\n        addSubtract(this, dur, direction);\n        return this;\n    };\n}\n\nfunction addSubtract(mom, duration, isAdding, updateOffset) {\n    var milliseconds = duration._milliseconds,\n        days = absRound(duration._days),\n        months = absRound(duration._months);\n\n    if (!mom.isValid()) {\n        // No op\n        return;\n    }\n\n    updateOffset = updateOffset == null ? true : updateOffset;\n\n    if (months) {\n        setMonth(mom, get(mom, 'Month') + months * isAdding);\n    }\n    if (days) {\n        set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n    }\n    if (milliseconds) {\n        mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n    }\n    if (updateOffset) {\n        hooks.updateOffset(mom, days || months);\n    }\n}\n\nvar add = createAdder(1, 'add'),\n    subtract = createAdder(-1, 'subtract');\n\nfunction isString(input) {\n    return typeof input === 'string' || input instanceof String;\n}\n\n// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\nfunction isMomentInput(input) {\n    return (\n        isMoment(input) ||\n        isDate(input) ||\n        isString(input) ||\n        isNumber(input) ||\n        isNumberOrStringArray(input) ||\n        isMomentInputObject(input) ||\n        input === null ||\n        input === undefined\n    );\n}\n\nfunction isMomentInputObject(input) {\n    var objectTest = isObject(input) && !isObjectEmpty(input),\n        propertyTest = false,\n        properties = [\n            'years',\n            'year',\n            'y',\n            'months',\n            'month',\n            'M',\n            'days',\n            'day',\n            'd',\n            'dates',\n            'date',\n            'D',\n            'hours',\n            'hour',\n            'h',\n            'minutes',\n            'minute',\n            'm',\n            'seconds',\n            'second',\n            's',\n            'milliseconds',\n            'millisecond',\n            'ms',\n        ],\n        i,\n        property,\n        propertyLen = properties.length;\n\n    for (i = 0; i < propertyLen; i += 1) {\n        property = properties[i];\n        propertyTest = propertyTest || hasOwnProp(input, property);\n    }\n\n    return objectTest && propertyTest;\n}\n\nfunction isNumberOrStringArray(input) {\n    var arrayTest = isArray(input),\n        dataTypeTest = false;\n    if (arrayTest) {\n        dataTypeTest =\n            input.filter(function (item) {\n                return !isNumber(item) && isString(input);\n            }).length === 0;\n    }\n    return arrayTest && dataTypeTest;\n}\n\nfunction isCalendarSpec(input) {\n    var objectTest = isObject(input) && !isObjectEmpty(input),\n        propertyTest = false,\n        properties = [\n            'sameDay',\n            'nextDay',\n            'lastDay',\n            'nextWeek',\n            'lastWeek',\n            'sameElse',\n        ],\n        i,\n        property;\n\n    for (i = 0; i < properties.length; i += 1) {\n        property = properties[i];\n        propertyTest = propertyTest || hasOwnProp(input, property);\n    }\n\n    return objectTest && propertyTest;\n}\n\nfunction getCalendarFormat(myMoment, now) {\n    var diff = myMoment.diff(now, 'days', true);\n    return diff < -6\n        ? 'sameElse'\n        : diff < -1\n          ? 'lastWeek'\n          : diff < 0\n            ? 'lastDay'\n            : diff < 1\n              ? 'sameDay'\n              : diff < 2\n                ? 'nextDay'\n                : diff < 7\n                  ? 'nextWeek'\n                  : 'sameElse';\n}\n\nfunction calendar$1(time, formats) {\n    // Support for single parameter, formats only overload to the calendar function\n    if (arguments.length === 1) {\n        if (!arguments[0]) {\n            time = undefined;\n            formats = undefined;\n        } else if (isMomentInput(arguments[0])) {\n            time = arguments[0];\n            formats = undefined;\n        } else if (isCalendarSpec(arguments[0])) {\n            formats = arguments[0];\n            time = undefined;\n        }\n    }\n    // We want to compare the start of today, vs this.\n    // Getting start-of-today depends on whether we're local/utc/offset or not.\n    var now = time || createLocal(),\n        sod = cloneWithOffset(now, this).startOf('day'),\n        format = hooks.calendarFormat(this, sod) || 'sameElse',\n        output =\n            formats &&\n            (isFunction(formats[format])\n                ? formats[format].call(this, now)\n                : formats[format]);\n\n    return this.format(\n        output || this.localeData().calendar(format, this, createLocal(now))\n    );\n}\n\nfunction clone() {\n    return new Moment(this);\n}\n\nfunction isAfter(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(units) || 'millisecond';\n    if (units === 'millisecond') {\n        return this.valueOf() > localInput.valueOf();\n    } else {\n        return localInput.valueOf() < this.clone().startOf(units).valueOf();\n    }\n}\n\nfunction isBefore(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input);\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(units) || 'millisecond';\n    if (units === 'millisecond') {\n        return this.valueOf() < localInput.valueOf();\n    } else {\n        return this.clone().endOf(units).valueOf() < localInput.valueOf();\n    }\n}\n\nfunction isBetween(from, to, units, inclusivity) {\n    var localFrom = isMoment(from) ? from : createLocal(from),\n        localTo = isMoment(to) ? to : createLocal(to);\n    if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n        return false;\n    }\n    inclusivity = inclusivity || '()';\n    return (\n        (inclusivity[0] === '('\n            ? this.isAfter(localFrom, units)\n            : !this.isBefore(localFrom, units)) &&\n        (inclusivity[1] === ')'\n            ? this.isBefore(localTo, units)\n            : !this.isAfter(localTo, units))\n    );\n}\n\nfunction isSame(input, units) {\n    var localInput = isMoment(input) ? input : createLocal(input),\n        inputMs;\n    if (!(this.isValid() && localInput.isValid())) {\n        return false;\n    }\n    units = normalizeUnits(units) || 'millisecond';\n    if (units === 'millisecond') {\n        return this.valueOf() === localInput.valueOf();\n    } else {\n        inputMs = localInput.valueOf();\n        return (\n            this.clone().startOf(units).valueOf() <= inputMs &&\n            inputMs <= this.clone().endOf(units).valueOf()\n        );\n    }\n}\n\nfunction isSameOrAfter(input, units) {\n    return this.isSame(input, units) || this.isAfter(input, units);\n}\n\nfunction isSameOrBefore(input, units) {\n    return this.isSame(input, units) || this.isBefore(input, units);\n}\n\nfunction diff(input, units, asFloat) {\n    var that, zoneDelta, output;\n\n    if (!this.isValid()) {\n        return NaN;\n    }\n\n    that = cloneWithOffset(input, this);\n\n    if (!that.isValid()) {\n        return NaN;\n    }\n\n    zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n    units = normalizeUnits(units);\n\n    switch (units) {\n        case 'year':\n            output = monthDiff(this, that) / 12;\n            break;\n        case 'month':\n            output = monthDiff(this, that);\n            break;\n        case 'quarter':\n            output = monthDiff(this, that) / 3;\n            break;\n        case 'second':\n            output = (this - that) / 1e3;\n            break; // 1000\n        case 'minute':\n            output = (this - that) / 6e4;\n            break; // 1000 * 60\n        case 'hour':\n            output = (this - that) / 36e5;\n            break; // 1000 * 60 * 60\n        case 'day':\n            output = (this - that - zoneDelta) / 864e5;\n            break; // 1000 * 60 * 60 * 24, negate dst\n        case 'week':\n            output = (this - that - zoneDelta) / 6048e5;\n            break; // 1000 * 60 * 60 * 24 * 7, negate dst\n        default:\n            output = this - that;\n    }\n\n    return asFloat ? output : absFloor(output);\n}\n\nfunction monthDiff(a, b) {\n    if (a.date() < b.date()) {\n        // end-of-month calculations work correct when the start month has more\n        // days than the end month.\n        return -monthDiff(b, a);\n    }\n    // difference in months\n    var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n        // b is in (anchor - 1 month, anchor + 1 month)\n        anchor = a.clone().add(wholeMonthDiff, 'months'),\n        anchor2,\n        adjust;\n\n    if (b - anchor < 0) {\n        anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n        // linear across the month\n        adjust = (b - anchor) / (anchor - anchor2);\n    } else {\n        anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n        // linear across the month\n        adjust = (b - anchor) / (anchor2 - anchor);\n    }\n\n    //check for negative zero, return zero if negative zero\n    return -(wholeMonthDiff + adjust) || 0;\n}\n\nhooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\nhooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\nfunction toString() {\n    return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n}\n\nfunction toISOString(keepOffset) {\n    if (!this.isValid()) {\n        return null;\n    }\n    var utc = keepOffset !== true,\n        m = utc ? this.clone().utc() : this;\n    if (m.year() < 0 || m.year() > 9999) {\n        return formatMoment(\n            m,\n            utc\n                ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n                : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n        );\n    }\n    if (isFunction(Date.prototype.toISOString)) {\n        // native implementation is ~50x faster, use it when we can\n        if (utc) {\n            return this.toDate().toISOString();\n        } else {\n            return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n                .toISOString()\n                .replace('Z', formatMoment(m, 'Z'));\n        }\n    }\n    return formatMoment(\n        m,\n        utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n    );\n}\n\n/**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\nfunction inspect() {\n    if (!this.isValid()) {\n        return 'moment.invalid(/* ' + this._i + ' */)';\n    }\n    var func = 'moment',\n        zone = '',\n        prefix,\n        year,\n        datetime,\n        suffix;\n    if (!this.isLocal()) {\n        func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n        zone = 'Z';\n    }\n    prefix = '[' + func + '(\"]';\n    year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n    datetime = '-MM-DD[T]HH:mm:ss.SSS';\n    suffix = zone + '[\")]';\n\n    return this.format(prefix + year + datetime + suffix);\n}\n\nfunction format(inputString) {\n    if (!inputString) {\n        inputString = this.isUtc()\n            ? hooks.defaultFormatUtc\n            : hooks.defaultFormat;\n    }\n    var output = formatMoment(this, inputString);\n    return this.localeData().postformat(output);\n}\n\nfunction from(time, withoutSuffix) {\n    if (\n        this.isValid() &&\n        ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n    ) {\n        return createDuration({ to: this, from: time })\n            .locale(this.locale())\n            .humanize(!withoutSuffix);\n    } else {\n        return this.localeData().invalidDate();\n    }\n}\n\nfunction fromNow(withoutSuffix) {\n    return this.from(createLocal(), withoutSuffix);\n}\n\nfunction to(time, withoutSuffix) {\n    if (\n        this.isValid() &&\n        ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n    ) {\n        return createDuration({ from: this, to: time })\n            .locale(this.locale())\n            .humanize(!withoutSuffix);\n    } else {\n        return this.localeData().invalidDate();\n    }\n}\n\nfunction toNow(withoutSuffix) {\n    return this.to(createLocal(), withoutSuffix);\n}\n\n// If passed a locale key, it will set the locale for this\n// instance.  Otherwise, it will return the locale configuration\n// variables for this instance.\nfunction locale(key) {\n    var newLocaleData;\n\n    if (key === undefined) {\n        return this._locale._abbr;\n    } else {\n        newLocaleData = getLocale(key);\n        if (newLocaleData != null) {\n            this._locale = newLocaleData;\n        }\n        return this;\n    }\n}\n\nvar lang = deprecate(\n    'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n    function (key) {\n        if (key === undefined) {\n            return this.localeData();\n        } else {\n            return this.locale(key);\n        }\n    }\n);\n\nfunction localeData() {\n    return this._locale;\n}\n\nvar MS_PER_SECOND = 1000,\n    MS_PER_MINUTE = 60 * MS_PER_SECOND,\n    MS_PER_HOUR = 60 * MS_PER_MINUTE,\n    MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n// actual modulo - handles negative numbers (for dates before 1970):\nfunction mod$1(dividend, divisor) {\n    return ((dividend % divisor) + divisor) % divisor;\n}\n\nfunction localStartOfDate(y, m, d) {\n    // the date constructor remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n        // preserve leap years using a full 400 year cycle, then reset\n        return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n    } else {\n        return new Date(y, m, d).valueOf();\n    }\n}\n\nfunction utcStartOfDate(y, m, d) {\n    // Date.UTC remaps years 0-99 to 1900-1999\n    if (y < 100 && y >= 0) {\n        // preserve leap years using a full 400 year cycle, then reset\n        return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n    } else {\n        return Date.UTC(y, m, d);\n    }\n}\n\nfunction startOf(units) {\n    var time, startOfDate;\n    units = normalizeUnits(units);\n    if (units === undefined || units === 'millisecond' || !this.isValid()) {\n        return this;\n    }\n\n    startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n    switch (units) {\n        case 'year':\n            time = startOfDate(this.year(), 0, 1);\n            break;\n        case 'quarter':\n            time = startOfDate(\n                this.year(),\n                this.month() - (this.month() % 3),\n                1\n            );\n            break;\n        case 'month':\n            time = startOfDate(this.year(), this.month(), 1);\n            break;\n        case 'week':\n            time = startOfDate(\n                this.year(),\n                this.month(),\n                this.date() - this.weekday()\n            );\n            break;\n        case 'isoWeek':\n            time = startOfDate(\n                this.year(),\n                this.month(),\n                this.date() - (this.isoWeekday() - 1)\n            );\n            break;\n        case 'day':\n        case 'date':\n            time = startOfDate(this.year(), this.month(), this.date());\n            break;\n        case 'hour':\n            time = this._d.valueOf();\n            time -= mod$1(\n                time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                MS_PER_HOUR\n            );\n            break;\n        case 'minute':\n            time = this._d.valueOf();\n            time -= mod$1(time, MS_PER_MINUTE);\n            break;\n        case 'second':\n            time = this._d.valueOf();\n            time -= mod$1(time, MS_PER_SECOND);\n            break;\n    }\n\n    this._d.setTime(time);\n    hooks.updateOffset(this, true);\n    return this;\n}\n\nfunction endOf(units) {\n    var time, startOfDate;\n    units = normalizeUnits(units);\n    if (units === undefined || units === 'millisecond' || !this.isValid()) {\n        return this;\n    }\n\n    startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n    switch (units) {\n        case 'year':\n            time = startOfDate(this.year() + 1, 0, 1) - 1;\n            break;\n        case 'quarter':\n            time =\n                startOfDate(\n                    this.year(),\n                    this.month() - (this.month() % 3) + 3,\n                    1\n                ) - 1;\n            break;\n        case 'month':\n            time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n            break;\n        case 'week':\n            time =\n                startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - this.weekday() + 7\n                ) - 1;\n            break;\n        case 'isoWeek':\n            time =\n                startOfDate(\n                    this.year(),\n                    this.month(),\n                    this.date() - (this.isoWeekday() - 1) + 7\n                ) - 1;\n            break;\n        case 'day':\n        case 'date':\n            time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n            break;\n        case 'hour':\n            time = this._d.valueOf();\n            time +=\n                MS_PER_HOUR -\n                mod$1(\n                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n                    MS_PER_HOUR\n                ) -\n                1;\n            break;\n        case 'minute':\n            time = this._d.valueOf();\n            time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n            break;\n        case 'second':\n            time = this._d.valueOf();\n            time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n            break;\n    }\n\n    this._d.setTime(time);\n    hooks.updateOffset(this, true);\n    return this;\n}\n\nfunction valueOf() {\n    return this._d.valueOf() - (this._offset || 0) * 60000;\n}\n\nfunction unix() {\n    return Math.floor(this.valueOf() / 1000);\n}\n\nfunction toDate() {\n    return new Date(this.valueOf());\n}\n\nfunction toArray() {\n    var m = this;\n    return [\n        m.year(),\n        m.month(),\n        m.date(),\n        m.hour(),\n        m.minute(),\n        m.second(),\n        m.millisecond(),\n    ];\n}\n\nfunction toObject() {\n    var m = this;\n    return {\n        years: m.year(),\n        months: m.month(),\n        date: m.date(),\n        hours: m.hours(),\n        minutes: m.minutes(),\n        seconds: m.seconds(),\n        milliseconds: m.milliseconds(),\n    };\n}\n\nfunction toJSON() {\n    // new Date(NaN).toJSON() === null\n    return this.isValid() ? this.toISOString() : null;\n}\n\nfunction isValid$2() {\n    return isValid(this);\n}\n\nfunction parsingFlags() {\n    return extend({}, getParsingFlags(this));\n}\n\nfunction invalidAt() {\n    return getParsingFlags(this).overflow;\n}\n\nfunction creationData() {\n    return {\n        input: this._i,\n        format: this._f,\n        locale: this._locale,\n        isUTC: this._isUTC,\n        strict: this._strict,\n    };\n}\n\naddFormatToken('N', 0, 0, 'eraAbbr');\naddFormatToken('NN', 0, 0, 'eraAbbr');\naddFormatToken('NNN', 0, 0, 'eraAbbr');\naddFormatToken('NNNN', 0, 0, 'eraName');\naddFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\naddFormatToken('y', ['y', 1], 'yo', 'eraYear');\naddFormatToken('y', ['yy', 2], 0, 'eraYear');\naddFormatToken('y', ['yyy', 3], 0, 'eraYear');\naddFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\naddRegexToken('N', matchEraAbbr);\naddRegexToken('NN', matchEraAbbr);\naddRegexToken('NNN', matchEraAbbr);\naddRegexToken('NNNN', matchEraName);\naddRegexToken('NNNNN', matchEraNarrow);\n\naddParseToken(\n    ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n    function (input, array, config, token) {\n        var era = config._locale.erasParse(input, token, config._strict);\n        if (era) {\n            getParsingFlags(config).era = era;\n        } else {\n            getParsingFlags(config).invalidEra = input;\n        }\n    }\n);\n\naddRegexToken('y', matchUnsigned);\naddRegexToken('yy', matchUnsigned);\naddRegexToken('yyy', matchUnsigned);\naddRegexToken('yyyy', matchUnsigned);\naddRegexToken('yo', matchEraYearOrdinal);\n\naddParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\naddParseToken(['yo'], function (input, array, config, token) {\n    var match;\n    if (config._locale._eraYearOrdinalRegex) {\n        match = input.match(config._locale._eraYearOrdinalRegex);\n    }\n\n    if (config._locale.eraYearOrdinalParse) {\n        array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n    } else {\n        array[YEAR] = parseInt(input, 10);\n    }\n});\n\nfunction localeEras(m, format) {\n    var i,\n        l,\n        date,\n        eras = this._eras || getLocale('en')._eras;\n    for (i = 0, l = eras.length; i < l; ++i) {\n        switch (typeof eras[i].since) {\n            case 'string':\n                // truncate time\n                date = hooks(eras[i].since).startOf('day');\n                eras[i].since = date.valueOf();\n                break;\n        }\n\n        switch (typeof eras[i].until) {\n            case 'undefined':\n                eras[i].until = +Infinity;\n                break;\n            case 'string':\n                // truncate time\n                date = hooks(eras[i].until).startOf('day').valueOf();\n                eras[i].until = date.valueOf();\n                break;\n        }\n    }\n    return eras;\n}\n\nfunction localeErasParse(eraName, format, strict) {\n    var i,\n        l,\n        eras = this.eras(),\n        name,\n        abbr,\n        narrow;\n    eraName = eraName.toUpperCase();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n        name = eras[i].name.toUpperCase();\n        abbr = eras[i].abbr.toUpperCase();\n        narrow = eras[i].narrow.toUpperCase();\n\n        if (strict) {\n            switch (format) {\n                case 'N':\n                case 'NN':\n                case 'NNN':\n                    if (abbr === eraName) {\n                        return eras[i];\n                    }\n                    break;\n\n                case 'NNNN':\n                    if (name === eraName) {\n                        return eras[i];\n                    }\n                    break;\n\n                case 'NNNNN':\n                    if (narrow === eraName) {\n                        return eras[i];\n                    }\n                    break;\n            }\n        } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n            return eras[i];\n        }\n    }\n}\n\nfunction localeErasConvertYear(era, year) {\n    var dir = era.since <= era.until ? +1 : -1;\n    if (year === undefined) {\n        return hooks(era.since).year();\n    } else {\n        return hooks(era.since).year() + (year - era.offset) * dir;\n    }\n}\n\nfunction getEraName() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n    for (i = 0, l = eras.length; i < l; ++i) {\n        // truncate time\n        val = this.clone().startOf('day').valueOf();\n\n        if (eras[i].since <= val && val <= eras[i].until) {\n            return eras[i].name;\n        }\n        if (eras[i].until <= val && val <= eras[i].since) {\n            return eras[i].name;\n        }\n    }\n\n    return '';\n}\n\nfunction getEraNarrow() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n    for (i = 0, l = eras.length; i < l; ++i) {\n        // truncate time\n        val = this.clone().startOf('day').valueOf();\n\n        if (eras[i].since <= val && val <= eras[i].until) {\n            return eras[i].narrow;\n        }\n        if (eras[i].until <= val && val <= eras[i].since) {\n            return eras[i].narrow;\n        }\n    }\n\n    return '';\n}\n\nfunction getEraAbbr() {\n    var i,\n        l,\n        val,\n        eras = this.localeData().eras();\n    for (i = 0, l = eras.length; i < l; ++i) {\n        // truncate time\n        val = this.clone().startOf('day').valueOf();\n\n        if (eras[i].since <= val && val <= eras[i].until) {\n            return eras[i].abbr;\n        }\n        if (eras[i].until <= val && val <= eras[i].since) {\n            return eras[i].abbr;\n        }\n    }\n\n    return '';\n}\n\nfunction getEraYear() {\n    var i,\n        l,\n        dir,\n        val,\n        eras = this.localeData().eras();\n    for (i = 0, l = eras.length; i < l; ++i) {\n        dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n        // truncate time\n        val = this.clone().startOf('day').valueOf();\n\n        if (\n            (eras[i].since <= val && val <= eras[i].until) ||\n            (eras[i].until <= val && val <= eras[i].since)\n        ) {\n            return (\n                (this.year() - hooks(eras[i].since).year()) * dir +\n                eras[i].offset\n            );\n        }\n    }\n\n    return this.year();\n}\n\nfunction erasNameRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasNameRegex')) {\n        computeErasParse.call(this);\n    }\n    return isStrict ? this._erasNameRegex : this._erasRegex;\n}\n\nfunction erasAbbrRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasAbbrRegex')) {\n        computeErasParse.call(this);\n    }\n    return isStrict ? this._erasAbbrRegex : this._erasRegex;\n}\n\nfunction erasNarrowRegex(isStrict) {\n    if (!hasOwnProp(this, '_erasNarrowRegex')) {\n        computeErasParse.call(this);\n    }\n    return isStrict ? this._erasNarrowRegex : this._erasRegex;\n}\n\nfunction matchEraAbbr(isStrict, locale) {\n    return locale.erasAbbrRegex(isStrict);\n}\n\nfunction matchEraName(isStrict, locale) {\n    return locale.erasNameRegex(isStrict);\n}\n\nfunction matchEraNarrow(isStrict, locale) {\n    return locale.erasNarrowRegex(isStrict);\n}\n\nfunction matchEraYearOrdinal(isStrict, locale) {\n    return locale._eraYearOrdinalRegex || matchUnsigned;\n}\n\nfunction computeErasParse() {\n    var abbrPieces = [],\n        namePieces = [],\n        narrowPieces = [],\n        mixedPieces = [],\n        i,\n        l,\n        erasName,\n        erasAbbr,\n        erasNarrow,\n        eras = this.eras();\n\n    for (i = 0, l = eras.length; i < l; ++i) {\n        erasName = regexEscape(eras[i].name);\n        erasAbbr = regexEscape(eras[i].abbr);\n        erasNarrow = regexEscape(eras[i].narrow);\n\n        namePieces.push(erasName);\n        abbrPieces.push(erasAbbr);\n        narrowPieces.push(erasNarrow);\n        mixedPieces.push(erasName);\n        mixedPieces.push(erasAbbr);\n        mixedPieces.push(erasNarrow);\n    }\n\n    this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n    this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n    this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n    this._erasNarrowRegex = new RegExp(\n        '^(' + narrowPieces.join('|') + ')',\n        'i'\n    );\n}\n\n// FORMATTING\n\naddFormatToken(0, ['gg', 2], 0, function () {\n    return this.weekYear() % 100;\n});\n\naddFormatToken(0, ['GG', 2], 0, function () {\n    return this.isoWeekYear() % 100;\n});\n\nfunction addWeekYearFormatToken(token, getter) {\n    addFormatToken(0, [token, token.length], 0, getter);\n}\n\naddWeekYearFormatToken('gggg', 'weekYear');\naddWeekYearFormatToken('ggggg', 'weekYear');\naddWeekYearFormatToken('GGGG', 'isoWeekYear');\naddWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n// ALIASES\n\n// PARSING\n\naddRegexToken('G', matchSigned);\naddRegexToken('g', matchSigned);\naddRegexToken('GG', match1to2, match2);\naddRegexToken('gg', match1to2, match2);\naddRegexToken('GGGG', match1to4, match4);\naddRegexToken('gggg', match1to4, match4);\naddRegexToken('GGGGG', match1to6, match6);\naddRegexToken('ggggg', match1to6, match6);\n\naddWeekParseToken(\n    ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n    function (input, week, config, token) {\n        week[token.substr(0, 2)] = toInt(input);\n    }\n);\n\naddWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n    week[token] = hooks.parseTwoDigitYear(input);\n});\n\n// MOMENTS\n\nfunction getSetWeekYear(input) {\n    return getSetWeekYearHelper.call(\n        this,\n        input,\n        this.week(),\n        this.weekday() + this.localeData()._week.dow,\n        this.localeData()._week.dow,\n        this.localeData()._week.doy\n    );\n}\n\nfunction getSetISOWeekYear(input) {\n    return getSetWeekYearHelper.call(\n        this,\n        input,\n        this.isoWeek(),\n        this.isoWeekday(),\n        1,\n        4\n    );\n}\n\nfunction getISOWeeksInYear() {\n    return weeksInYear(this.year(), 1, 4);\n}\n\nfunction getISOWeeksInISOWeekYear() {\n    return weeksInYear(this.isoWeekYear(), 1, 4);\n}\n\nfunction getWeeksInYear() {\n    var weekInfo = this.localeData()._week;\n    return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getWeeksInWeekYear() {\n    var weekInfo = this.localeData()._week;\n    return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n}\n\nfunction getSetWeekYearHelper(input, week, weekday, dow, doy) {\n    var weeksTarget;\n    if (input == null) {\n        return weekOfYear(this, dow, doy).year;\n    } else {\n        weeksTarget = weeksInYear(input, dow, doy);\n        if (week > weeksTarget) {\n            week = weeksTarget;\n        }\n        return setWeekAll.call(this, input, week, weekday, dow, doy);\n    }\n}\n\nfunction setWeekAll(weekYear, week, weekday, dow, doy) {\n    var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n        date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n    this.year(date.getUTCFullYear());\n    this.month(date.getUTCMonth());\n    this.date(date.getUTCDate());\n    return this;\n}\n\n// FORMATTING\n\naddFormatToken('Q', 0, 'Qo', 'quarter');\n\n// PARSING\n\naddRegexToken('Q', match1);\naddParseToken('Q', function (input, array) {\n    array[MONTH] = (toInt(input) - 1) * 3;\n});\n\n// MOMENTS\n\nfunction getSetQuarter(input) {\n    return input == null\n        ? Math.ceil((this.month() + 1) / 3)\n        : this.month((input - 1) * 3 + (this.month() % 3));\n}\n\n// FORMATTING\n\naddFormatToken('D', ['DD', 2], 'Do', 'date');\n\n// PARSING\n\naddRegexToken('D', match1to2, match1to2NoLeadingZero);\naddRegexToken('DD', match1to2, match2);\naddRegexToken('Do', function (isStrict, locale) {\n    // TODO: Remove \"ordinalParse\" fallback in next major release.\n    return isStrict\n        ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n        : locale._dayOfMonthOrdinalParseLenient;\n});\n\naddParseToken(['D', 'DD'], DATE);\naddParseToken('Do', function (input, array) {\n    array[DATE] = toInt(input.match(match1to2)[0]);\n});\n\n// MOMENTS\n\nvar getSetDayOfMonth = makeGetSet('Date', true);\n\n// FORMATTING\n\naddFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n// PARSING\n\naddRegexToken('DDD', match1to3);\naddRegexToken('DDDD', match3);\naddParseToken(['DDD', 'DDDD'], function (input, array, config) {\n    config._dayOfYear = toInt(input);\n});\n\n// HELPERS\n\n// MOMENTS\n\nfunction getSetDayOfYear(input) {\n    var dayOfYear =\n        Math.round(\n            (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n        ) + 1;\n    return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n}\n\n// FORMATTING\n\naddFormatToken('m', ['mm', 2], 0, 'minute');\n\n// PARSING\n\naddRegexToken('m', match1to2, match1to2HasZero);\naddRegexToken('mm', match1to2, match2);\naddParseToken(['m', 'mm'], MINUTE);\n\n// MOMENTS\n\nvar getSetMinute = makeGetSet('Minutes', false);\n\n// FORMATTING\n\naddFormatToken('s', ['ss', 2], 0, 'second');\n\n// PARSING\n\naddRegexToken('s', match1to2, match1to2HasZero);\naddRegexToken('ss', match1to2, match2);\naddParseToken(['s', 'ss'], SECOND);\n\n// MOMENTS\n\nvar getSetSecond = makeGetSet('Seconds', false);\n\n// FORMATTING\n\naddFormatToken('S', 0, 0, function () {\n    return ~~(this.millisecond() / 100);\n});\n\naddFormatToken(0, ['SS', 2], 0, function () {\n    return ~~(this.millisecond() / 10);\n});\n\naddFormatToken(0, ['SSS', 3], 0, 'millisecond');\naddFormatToken(0, ['SSSS', 4], 0, function () {\n    return this.millisecond() * 10;\n});\naddFormatToken(0, ['SSSSS', 5], 0, function () {\n    return this.millisecond() * 100;\n});\naddFormatToken(0, ['SSSSSS', 6], 0, function () {\n    return this.millisecond() * 1000;\n});\naddFormatToken(0, ['SSSSSSS', 7], 0, function () {\n    return this.millisecond() * 10000;\n});\naddFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n    return this.millisecond() * 100000;\n});\naddFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n    return this.millisecond() * 1000000;\n});\n\n// PARSING\n\naddRegexToken('S', match1to3, match1);\naddRegexToken('SS', match1to3, match2);\naddRegexToken('SSS', match1to3, match3);\n\nvar token, getSetMillisecond;\nfor (token = 'SSSS'; token.length <= 9; token += 'S') {\n    addRegexToken(token, matchUnsigned);\n}\n\nfunction parseMs(input, array) {\n    array[MILLISECOND] = toInt(('0.' + input) * 1000);\n}\n\nfor (token = 'S'; token.length <= 9; token += 'S') {\n    addParseToken(token, parseMs);\n}\n\ngetSetMillisecond = makeGetSet('Milliseconds', false);\n\n// FORMATTING\n\naddFormatToken('z', 0, 0, 'zoneAbbr');\naddFormatToken('zz', 0, 0, 'zoneName');\n\n// MOMENTS\n\nfunction getZoneAbbr() {\n    return this._isUTC ? 'UTC' : '';\n}\n\nfunction getZoneName() {\n    return this._isUTC ? 'Coordinated Universal Time' : '';\n}\n\nvar proto = Moment.prototype;\n\nproto.add = add;\nproto.calendar = calendar$1;\nproto.clone = clone;\nproto.diff = diff;\nproto.endOf = endOf;\nproto.format = format;\nproto.from = from;\nproto.fromNow = fromNow;\nproto.to = to;\nproto.toNow = toNow;\nproto.get = stringGet;\nproto.invalidAt = invalidAt;\nproto.isAfter = isAfter;\nproto.isBefore = isBefore;\nproto.isBetween = isBetween;\nproto.isSame = isSame;\nproto.isSameOrAfter = isSameOrAfter;\nproto.isSameOrBefore = isSameOrBefore;\nproto.isValid = isValid$2;\nproto.lang = lang;\nproto.locale = locale;\nproto.localeData = localeData;\nproto.max = prototypeMax;\nproto.min = prototypeMin;\nproto.parsingFlags = parsingFlags;\nproto.set = stringSet;\nproto.startOf = startOf;\nproto.subtract = subtract;\nproto.toArray = toArray;\nproto.toObject = toObject;\nproto.toDate = toDate;\nproto.toISOString = toISOString;\nproto.inspect = inspect;\nif (typeof Symbol !== 'undefined' && Symbol.for != null) {\n    proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n        return 'Moment<' + this.format() + '>';\n    };\n}\nproto.toJSON = toJSON;\nproto.toString = toString;\nproto.unix = unix;\nproto.valueOf = valueOf;\nproto.creationData = creationData;\nproto.eraName = getEraName;\nproto.eraNarrow = getEraNarrow;\nproto.eraAbbr = getEraAbbr;\nproto.eraYear = getEraYear;\nproto.year = getSetYear;\nproto.isLeapYear = getIsLeapYear;\nproto.weekYear = getSetWeekYear;\nproto.isoWeekYear = getSetISOWeekYear;\nproto.quarter = proto.quarters = getSetQuarter;\nproto.month = getSetMonth;\nproto.daysInMonth = getDaysInMonth;\nproto.week = proto.weeks = getSetWeek;\nproto.isoWeek = proto.isoWeeks = getSetISOWeek;\nproto.weeksInYear = getWeeksInYear;\nproto.weeksInWeekYear = getWeeksInWeekYear;\nproto.isoWeeksInYear = getISOWeeksInYear;\nproto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\nproto.date = getSetDayOfMonth;\nproto.day = proto.days = getSetDayOfWeek;\nproto.weekday = getSetLocaleDayOfWeek;\nproto.isoWeekday = getSetISODayOfWeek;\nproto.dayOfYear = getSetDayOfYear;\nproto.hour = proto.hours = getSetHour;\nproto.minute = proto.minutes = getSetMinute;\nproto.second = proto.seconds = getSetSecond;\nproto.millisecond = proto.milliseconds = getSetMillisecond;\nproto.utcOffset = getSetOffset;\nproto.utc = setOffsetToUTC;\nproto.local = setOffsetToLocal;\nproto.parseZone = setOffsetToParsedOffset;\nproto.hasAlignedHourOffset = hasAlignedHourOffset;\nproto.isDST = isDaylightSavingTime;\nproto.isLocal = isLocal;\nproto.isUtcOffset = isUtcOffset;\nproto.isUtc = isUtc;\nproto.isUTC = isUtc;\nproto.zoneAbbr = getZoneAbbr;\nproto.zoneName = getZoneName;\nproto.dates = deprecate(\n    'dates accessor is deprecated. Use date instead.',\n    getSetDayOfMonth\n);\nproto.months = deprecate(\n    'months accessor is deprecated. Use month instead',\n    getSetMonth\n);\nproto.years = deprecate(\n    'years accessor is deprecated. Use year instead',\n    getSetYear\n);\nproto.zone = deprecate(\n    'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n    getSetZone\n);\nproto.isDSTShifted = deprecate(\n    'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n    isDaylightSavingTimeShifted\n);\n\nfunction createUnix(input) {\n    return createLocal(input * 1000);\n}\n\nfunction createInZone() {\n    return createLocal.apply(null, arguments).parseZone();\n}\n\nfunction preParsePostFormat(string) {\n    return string;\n}\n\nvar proto$1 = Locale.prototype;\n\nproto$1.calendar = calendar;\nproto$1.longDateFormat = longDateFormat;\nproto$1.invalidDate = invalidDate;\nproto$1.ordinal = ordinal;\nproto$1.preparse = preParsePostFormat;\nproto$1.postformat = preParsePostFormat;\nproto$1.relativeTime = relativeTime;\nproto$1.pastFuture = pastFuture;\nproto$1.set = set;\nproto$1.eras = localeEras;\nproto$1.erasParse = localeErasParse;\nproto$1.erasConvertYear = localeErasConvertYear;\nproto$1.erasAbbrRegex = erasAbbrRegex;\nproto$1.erasNameRegex = erasNameRegex;\nproto$1.erasNarrowRegex = erasNarrowRegex;\n\nproto$1.months = localeMonths;\nproto$1.monthsShort = localeMonthsShort;\nproto$1.monthsParse = localeMonthsParse;\nproto$1.monthsRegex = monthsRegex;\nproto$1.monthsShortRegex = monthsShortRegex;\nproto$1.week = localeWeek;\nproto$1.firstDayOfYear = localeFirstDayOfYear;\nproto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\nproto$1.weekdays = localeWeekdays;\nproto$1.weekdaysMin = localeWeekdaysMin;\nproto$1.weekdaysShort = localeWeekdaysShort;\nproto$1.weekdaysParse = localeWeekdaysParse;\n\nproto$1.weekdaysRegex = weekdaysRegex;\nproto$1.weekdaysShortRegex = weekdaysShortRegex;\nproto$1.weekdaysMinRegex = weekdaysMinRegex;\n\nproto$1.isPM = localeIsPM;\nproto$1.meridiem = localeMeridiem;\n\nfunction get$1(format, index, field, setter) {\n    var locale = getLocale(),\n        utc = createUTC().set(setter, index);\n    return locale[field](utc, format);\n}\n\nfunction listMonthsImpl(format, index, field) {\n    if (isNumber(format)) {\n        index = format;\n        format = undefined;\n    }\n\n    format = format || '';\n\n    if (index != null) {\n        return get$1(format, index, field, 'month');\n    }\n\n    var i,\n        out = [];\n    for (i = 0; i < 12; i++) {\n        out[i] = get$1(format, i, field, 'month');\n    }\n    return out;\n}\n\n// ()\n// (5)\n// (fmt, 5)\n// (fmt)\n// (true)\n// (true, 5)\n// (true, fmt, 5)\n// (true, fmt)\nfunction listWeekdaysImpl(localeSorted, format, index, field) {\n    if (typeof localeSorted === 'boolean') {\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n    } else {\n        format = localeSorted;\n        index = format;\n        localeSorted = false;\n\n        if (isNumber(format)) {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n    }\n\n    var locale = getLocale(),\n        shift = localeSorted ? locale._week.dow : 0,\n        i,\n        out = [];\n\n    if (index != null) {\n        return get$1(format, (index + shift) % 7, field, 'day');\n    }\n\n    for (i = 0; i < 7; i++) {\n        out[i] = get$1(format, (i + shift) % 7, field, 'day');\n    }\n    return out;\n}\n\nfunction listMonths(format, index) {\n    return listMonthsImpl(format, index, 'months');\n}\n\nfunction listMonthsShort(format, index) {\n    return listMonthsImpl(format, index, 'monthsShort');\n}\n\nfunction listWeekdays(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n}\n\nfunction listWeekdaysShort(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n}\n\nfunction listWeekdaysMin(localeSorted, format, index) {\n    return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n}\n\ngetSetGlobalLocale('en', {\n    eras: [\n        {\n            since: '0001-01-01',\n            until: +Infinity,\n            offset: 1,\n            name: 'Anno Domini',\n            narrow: 'AD',\n            abbr: 'AD',\n        },\n        {\n            since: '0000-12-31',\n            until: -Infinity,\n            offset: 1,\n            name: 'Before Christ',\n            narrow: 'BC',\n            abbr: 'BC',\n        },\n    ],\n    dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n    ordinal: function (number) {\n        var b = number % 10,\n            output =\n                toInt((number % 100) / 10) === 1\n                    ? 'th'\n                    : b === 1\n                      ? 'st'\n                      : b === 2\n                        ? 'nd'\n                        : b === 3\n                          ? 'rd'\n                          : 'th';\n        return number + output;\n    },\n});\n\n// Side effect imports\n\nhooks.lang = deprecate(\n    'moment.lang is deprecated. Use moment.locale instead.',\n    getSetGlobalLocale\n);\nhooks.langData = deprecate(\n    'moment.langData is deprecated. Use moment.localeData instead.',\n    getLocale\n);\n\nvar mathAbs = Math.abs;\n\nfunction abs() {\n    var data = this._data;\n\n    this._milliseconds = mathAbs(this._milliseconds);\n    this._days = mathAbs(this._days);\n    this._months = mathAbs(this._months);\n\n    data.milliseconds = mathAbs(data.milliseconds);\n    data.seconds = mathAbs(data.seconds);\n    data.minutes = mathAbs(data.minutes);\n    data.hours = mathAbs(data.hours);\n    data.months = mathAbs(data.months);\n    data.years = mathAbs(data.years);\n\n    return this;\n}\n\nfunction addSubtract$1(duration, input, value, direction) {\n    var other = createDuration(input, value);\n\n    duration._milliseconds += direction * other._milliseconds;\n    duration._days += direction * other._days;\n    duration._months += direction * other._months;\n\n    return duration._bubble();\n}\n\n// supports only 2.0-style add(1, 's') or add(duration)\nfunction add$1(input, value) {\n    return addSubtract$1(this, input, value, 1);\n}\n\n// supports only 2.0-style subtract(1, 's') or subtract(duration)\nfunction subtract$1(input, value) {\n    return addSubtract$1(this, input, value, -1);\n}\n\nfunction absCeil(number) {\n    if (number < 0) {\n        return Math.floor(number);\n    } else {\n        return Math.ceil(number);\n    }\n}\n\nfunction bubble() {\n    var milliseconds = this._milliseconds,\n        days = this._days,\n        months = this._months,\n        data = this._data,\n        seconds,\n        minutes,\n        hours,\n        years,\n        monthsFromDays;\n\n    // if we have a mix of positive and negative values, bubble down first\n    // check: https://github.com/moment/moment/issues/2166\n    if (\n        !(\n            (milliseconds >= 0 && days >= 0 && months >= 0) ||\n            (milliseconds <= 0 && days <= 0 && months <= 0)\n        )\n    ) {\n        milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n        days = 0;\n        months = 0;\n    }\n\n    // The following code bubbles up values, see the tests for\n    // examples of what that means.\n    data.milliseconds = milliseconds % 1000;\n\n    seconds = absFloor(milliseconds / 1000);\n    data.seconds = seconds % 60;\n\n    minutes = absFloor(seconds / 60);\n    data.minutes = minutes % 60;\n\n    hours = absFloor(minutes / 60);\n    data.hours = hours % 24;\n\n    days += absFloor(hours / 24);\n\n    // convert days to months\n    monthsFromDays = absFloor(daysToMonths(days));\n    months += monthsFromDays;\n    days -= absCeil(monthsToDays(monthsFromDays));\n\n    // 12 months -> 1 year\n    years = absFloor(months / 12);\n    months %= 12;\n\n    data.days = days;\n    data.months = months;\n    data.years = years;\n\n    return this;\n}\n\nfunction daysToMonths(days) {\n    // 400 years have 146097 days (taking into account leap year rules)\n    // 400 years have 12 months === 4800\n    return (days * 4800) / 146097;\n}\n\nfunction monthsToDays(months) {\n    // the reverse of daysToMonths\n    return (months * 146097) / 4800;\n}\n\nfunction as(units) {\n    if (!this.isValid()) {\n        return NaN;\n    }\n    var days,\n        months,\n        milliseconds = this._milliseconds;\n\n    units = normalizeUnits(units);\n\n    if (units === 'month' || units === 'quarter' || units === 'year') {\n        days = this._days + milliseconds / 864e5;\n        months = this._months + daysToMonths(days);\n        switch (units) {\n            case 'month':\n                return months;\n            case 'quarter':\n                return months / 3;\n            case 'year':\n                return months / 12;\n        }\n    } else {\n        // handle milliseconds separately because of floating point math errors (issue #1867)\n        days = this._days + Math.round(monthsToDays(this._months));\n        switch (units) {\n            case 'week':\n                return days / 7 + milliseconds / 6048e5;\n            case 'day':\n                return days + milliseconds / 864e5;\n            case 'hour':\n                return days * 24 + milliseconds / 36e5;\n            case 'minute':\n                return days * 1440 + milliseconds / 6e4;\n            case 'second':\n                return days * 86400 + milliseconds / 1000;\n            // Math.floor prevents floating point math errors here\n            case 'millisecond':\n                return Math.floor(days * 864e5) + milliseconds;\n            default:\n                throw new Error('Unknown unit ' + units);\n        }\n    }\n}\n\nfunction makeAs(alias) {\n    return function () {\n        return this.as(alias);\n    };\n}\n\nvar asMilliseconds = makeAs('ms'),\n    asSeconds = makeAs('s'),\n    asMinutes = makeAs('m'),\n    asHours = makeAs('h'),\n    asDays = makeAs('d'),\n    asWeeks = makeAs('w'),\n    asMonths = makeAs('M'),\n    asQuarters = makeAs('Q'),\n    asYears = makeAs('y'),\n    valueOf$1 = asMilliseconds;\n\nfunction clone$1() {\n    return createDuration(this);\n}\n\nfunction get$2(units) {\n    units = normalizeUnits(units);\n    return this.isValid() ? this[units + 's']() : NaN;\n}\n\nfunction makeGetter(name) {\n    return function () {\n        return this.isValid() ? this._data[name] : NaN;\n    };\n}\n\nvar milliseconds = makeGetter('milliseconds'),\n    seconds = makeGetter('seconds'),\n    minutes = makeGetter('minutes'),\n    hours = makeGetter('hours'),\n    days = makeGetter('days'),\n    months = makeGetter('months'),\n    years = makeGetter('years');\n\nfunction weeks() {\n    return absFloor(this.days() / 7);\n}\n\nvar round = Math.round,\n    thresholds = {\n        ss: 44, // a few seconds to seconds\n        s: 45, // seconds to minute\n        m: 45, // minutes to hour\n        h: 22, // hours to day\n        d: 26, // days to month/week\n        w: null, // weeks to month\n        M: 11, // months to year\n    };\n\n// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\nfunction substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n    return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n}\n\nfunction relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n    var duration = createDuration(posNegDuration).abs(),\n        seconds = round(duration.as('s')),\n        minutes = round(duration.as('m')),\n        hours = round(duration.as('h')),\n        days = round(duration.as('d')),\n        months = round(duration.as('M')),\n        weeks = round(duration.as('w')),\n        years = round(duration.as('y')),\n        a =\n            (seconds <= thresholds.ss && ['s', seconds]) ||\n            (seconds < thresholds.s && ['ss', seconds]) ||\n            (minutes <= 1 && ['m']) ||\n            (minutes < thresholds.m && ['mm', minutes]) ||\n            (hours <= 1 && ['h']) ||\n            (hours < thresholds.h && ['hh', hours]) ||\n            (days <= 1 && ['d']) ||\n            (days < thresholds.d && ['dd', days]);\n\n    if (thresholds.w != null) {\n        a =\n            a ||\n            (weeks <= 1 && ['w']) ||\n            (weeks < thresholds.w && ['ww', weeks]);\n    }\n    a = a ||\n        (months <= 1 && ['M']) ||\n        (months < thresholds.M && ['MM', months]) ||\n        (years <= 1 && ['y']) || ['yy', years];\n\n    a[2] = withoutSuffix;\n    a[3] = +posNegDuration > 0;\n    a[4] = locale;\n    return substituteTimeAgo.apply(null, a);\n}\n\n// This function allows you to set the rounding function for relative time strings\nfunction getSetRelativeTimeRounding(roundingFunction) {\n    if (roundingFunction === undefined) {\n        return round;\n    }\n    if (typeof roundingFunction === 'function') {\n        round = roundingFunction;\n        return true;\n    }\n    return false;\n}\n\n// This function allows you to set a threshold for relative time strings\nfunction getSetRelativeTimeThreshold(threshold, limit) {\n    if (thresholds[threshold] === undefined) {\n        return false;\n    }\n    if (limit === undefined) {\n        return thresholds[threshold];\n    }\n    thresholds[threshold] = limit;\n    if (threshold === 's') {\n        thresholds.ss = limit - 1;\n    }\n    return true;\n}\n\nfunction humanize(argWithSuffix, argThresholds) {\n    if (!this.isValid()) {\n        return this.localeData().invalidDate();\n    }\n\n    var withSuffix = false,\n        th = thresholds,\n        locale,\n        output;\n\n    if (typeof argWithSuffix === 'object') {\n        argThresholds = argWithSuffix;\n        argWithSuffix = false;\n    }\n    if (typeof argWithSuffix === 'boolean') {\n        withSuffix = argWithSuffix;\n    }\n    if (typeof argThresholds === 'object') {\n        th = Object.assign({}, thresholds, argThresholds);\n        if (argThresholds.s != null && argThresholds.ss == null) {\n            th.ss = argThresholds.s - 1;\n        }\n    }\n\n    locale = this.localeData();\n    output = relativeTime$1(this, !withSuffix, th, locale);\n\n    if (withSuffix) {\n        output = locale.pastFuture(+this, output);\n    }\n\n    return locale.postformat(output);\n}\n\nvar abs$1 = Math.abs;\n\nfunction sign(x) {\n    return (x > 0) - (x < 0) || +x;\n}\n\nfunction toISOString$1() {\n    // for ISO strings we do not use the normal bubbling rules:\n    //  * milliseconds bubble up until they become hours\n    //  * days do not bubble at all\n    //  * months bubble up until they become years\n    // This is because there is no context-free conversion between hours and days\n    // (think of clock changes)\n    // and also not between days and months (28-31 days per month)\n    if (!this.isValid()) {\n        return this.localeData().invalidDate();\n    }\n\n    var seconds = abs$1(this._milliseconds) / 1000,\n        days = abs$1(this._days),\n        months = abs$1(this._months),\n        minutes,\n        hours,\n        years,\n        s,\n        total = this.asSeconds(),\n        totalSign,\n        ymSign,\n        daysSign,\n        hmsSign;\n\n    if (!total) {\n        // this is the same as C#'s (Noda) and python (isodate)...\n        // but not other JS (goog.date)\n        return 'P0D';\n    }\n\n    // 3600 seconds -> 60 minutes -> 1 hour\n    minutes = absFloor(seconds / 60);\n    hours = absFloor(minutes / 60);\n    seconds %= 60;\n    minutes %= 60;\n\n    // 12 months -> 1 year\n    years = absFloor(months / 12);\n    months %= 12;\n\n    // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n    s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n    totalSign = total < 0 ? '-' : '';\n    ymSign = sign(this._months) !== sign(total) ? '-' : '';\n    daysSign = sign(this._days) !== sign(total) ? '-' : '';\n    hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n    return (\n        totalSign +\n        'P' +\n        (years ? ymSign + years + 'Y' : '') +\n        (months ? ymSign + months + 'M' : '') +\n        (days ? daysSign + days + 'D' : '') +\n        (hours || minutes || seconds ? 'T' : '') +\n        (hours ? hmsSign + hours + 'H' : '') +\n        (minutes ? hmsSign + minutes + 'M' : '') +\n        (seconds ? hmsSign + s + 'S' : '')\n    );\n}\n\nvar proto$2 = Duration.prototype;\n\nproto$2.isValid = isValid$1;\nproto$2.abs = abs;\nproto$2.add = add$1;\nproto$2.subtract = subtract$1;\nproto$2.as = as;\nproto$2.asMilliseconds = asMilliseconds;\nproto$2.asSeconds = asSeconds;\nproto$2.asMinutes = asMinutes;\nproto$2.asHours = asHours;\nproto$2.asDays = asDays;\nproto$2.asWeeks = asWeeks;\nproto$2.asMonths = asMonths;\nproto$2.asQuarters = asQuarters;\nproto$2.asYears = asYears;\nproto$2.valueOf = valueOf$1;\nproto$2._bubble = bubble;\nproto$2.clone = clone$1;\nproto$2.get = get$2;\nproto$2.milliseconds = milliseconds;\nproto$2.seconds = seconds;\nproto$2.minutes = minutes;\nproto$2.hours = hours;\nproto$2.days = days;\nproto$2.weeks = weeks;\nproto$2.months = months;\nproto$2.years = years;\nproto$2.humanize = humanize;\nproto$2.toISOString = toISOString$1;\nproto$2.toString = toISOString$1;\nproto$2.toJSON = toISOString$1;\nproto$2.locale = locale;\nproto$2.localeData = localeData;\n\nproto$2.toIsoString = deprecate(\n    'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n    toISOString$1\n);\nproto$2.lang = lang;\n\n// FORMATTING\n\naddFormatToken('X', 0, 0, 'unix');\naddFormatToken('x', 0, 0, 'valueOf');\n\n// PARSING\n\naddRegexToken('x', matchSigned);\naddRegexToken('X', matchTimestamp);\naddParseToken('X', function (input, array, config) {\n    config._d = new Date(parseFloat(input) * 1000);\n});\naddParseToken('x', function (input, array, config) {\n    config._d = new Date(toInt(input));\n});\n\n//! moment.js\n\nhooks.version = '2.30.1';\n\nsetHookCallback(createLocal);\n\nhooks.fn = proto;\nhooks.min = min;\nhooks.max = max;\nhooks.now = now;\nhooks.utc = createUTC;\nhooks.unix = createUnix;\nhooks.months = listMonths;\nhooks.isDate = isDate;\nhooks.locale = getSetGlobalLocale;\nhooks.invalid = createInvalid;\nhooks.duration = createDuration;\nhooks.isMoment = isMoment;\nhooks.weekdays = listWeekdays;\nhooks.parseZone = createInZone;\nhooks.localeData = getLocale;\nhooks.isDuration = isDuration;\nhooks.monthsShort = listMonthsShort;\nhooks.weekdaysMin = listWeekdaysMin;\nhooks.defineLocale = defineLocale;\nhooks.updateLocale = updateLocale;\nhooks.locales = listLocales;\nhooks.weekdaysShort = listWeekdaysShort;\nhooks.normalizeUnits = normalizeUnits;\nhooks.relativeTimeRounding = getSetRelativeTimeRounding;\nhooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\nhooks.calendarFormat = getCalendarFormat;\nhooks.prototype = proto;\n\n// currently HTML5 input type only supports 24-hour formats\nhooks.HTML5_FMT = {\n    DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type=\"datetime-local\" />\n    DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n    DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n    DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n    TIME: 'HH:mm', // <input type=\"time\" />\n    TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n    TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n    WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n    MONTH: 'YYYY-MM', // <input type=\"month\" />\n};\n\nexport default hooks;\n","import moment from \"moment\";\n\nconst USER_ID_COOKIE_NAME = 'user_id'\nconst ACCESS_TOKEN_COOKIE_NAME = 'access_token'\nconst REFRESH_TOKEN_COOKIE_NAME = 'refresh_token'\nconst CUSTOMER_ID_COOKIE_NAME = 'customer_id'\n\n// note: safari doesn't allow cookies to be set this long. 7 days is the max for safari\nconst SECONDS_TO_EXPIRATION = 60 * 60 * 24 * 180 // 180 days\n\nexport const setAccessToken = (accessToken: string) => setCookie(ACCESS_TOKEN_COOKIE_NAME, accessToken)\nexport const getAccessToken = (): string | undefined => getCookie(ACCESS_TOKEN_COOKIE_NAME)\nexport const setRefreshToken = (refreshToken: string) => setCookie(REFRESH_TOKEN_COOKIE_NAME, refreshToken)\nexport const getRefreshToken = (): string | undefined => getCookie(REFRESH_TOKEN_COOKIE_NAME)\nexport const setUserId = (userId: string) => setCookie(USER_ID_COOKIE_NAME, userId)\nexport const getUserId = (): string | undefined => getCookie(USER_ID_COOKIE_NAME)\nexport const setCustomerId = (customerId: string) => setCookie(CUSTOMER_ID_COOKIE_NAME, customerId)\nexport const getCustomerId = (): string | undefined => getCookie(CUSTOMER_ID_COOKIE_NAME)\n\nexport const setCookie = (cookieName: string, cookieValue: string) => {\n    if (typeof document === \"undefined\") {\n        return\n    }\n    console.log('setting cookie', cookieName, cookieValue)\n    document.cookie = `${cookieName}=${cookieValue};domain=${import.meta.env.CLIENT_COOKIE_DOMAIN};path=/;expires=${moment().add(SECONDS_TO_EXPIRATION, \"seconds\")};max-age=${SECONDS_TO_EXPIRATION}`\n}\n\nexport const getCookie = (cookieName: string): string | undefined => {\n    if (typeof document === \"undefined\") {\n        return undefined\n    }\n    const cookies = document.cookie.split('; ')\n    return cookies.find(cookie => cookie.indexOf(cookieName) === 0)?.split('=')[1]\n}\n\nexport const clearCookie = (cookieName: string) => {\n    if (typeof document === \"undefined\") {\n        return\n    }\n    document.cookie = `${cookieName}=;domain=${import.meta.env.CLIENT_COOKIE_DOMAIN};path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;max-age=0`\n}\n\nexport const clearAllCookies = () => {\n    console.log('clearing tokens')\n    if (typeof document === \"undefined\") {\n        return\n    } else {\n        clearCookie(ACCESS_TOKEN_COOKIE_NAME)\n        clearCookie(REFRESH_TOKEN_COOKIE_NAME)\n        clearCookie(USER_ID_COOKIE_NAME)\n        clearCookie(CUSTOMER_ID_COOKIE_NAME)\n    }\n}\n","import { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { jwtDecode } from \"jwt-decode\";\nimport moment from \"moment/moment\";\nimport {\n    getAccessToken,\n    getRefreshToken,\n    getUserId,\n    getCustomerId,\n    clearAllCookies as authCookieClearTokens,\n    setAccessToken as authCookieSetAccessToken,\n    setRefreshToken as authCookieSetRefreshToken,\n    setUserId as authCookieSetUserId,\n    setCustomerId as authCookieSetCustomerId,\n} from \"../../../auth-cookies/auth-cookies.ts\";\n\nexport interface AuthState {\n    accessToken?: string\n    refreshToken?: string\n    userId?: string\n    email?: string\n    password?: string\n    customerId?: string\n}\n\nconst getInitialState = (): AuthState => {\n    const accessToken = getAccessToken()\n    const refreshToken = getRefreshToken()\n    const userId = getUserId()\n    const customerId = getCustomerId()\n\n    console.log({accessToken, refreshToken, userId, customerId})\n\n    if (\n        !userId ||\n        !accessToken ||\n        !refreshToken ||\n        jwtDecode<{ userId: string }>(accessToken).userId !== userId\n    ) {\n        authCookieClearTokens()\n        return ({\n            accessToken: undefined,\n            refreshToken: undefined,\n            userId: undefined,\n            email: undefined,\n            password: undefined,\n            customerId: undefined,\n        });\n    }\n\n    return ({\n        accessToken,\n        refreshToken,\n        userId,\n        email: undefined,\n        password: undefined,\n        customerId,\n    });\n}\n\nexport const authSlice = createSlice({\n    name: 'auth',\n    initialState: getInitialState(),\n    reducers: {\n        clearTokens: (state) => {\n            state.accessToken = undefined\n            state.refreshToken = undefined\n            state.userId = undefined\n            authCookieClearTokens()\n        },\n        setAccessToken: (state, action: PayloadAction<string>) => {\n            state.accessToken = action.payload\n            authCookieSetAccessToken(action.payload)\n        },\n        setRefreshToken: (state, action: PayloadAction<string>) => {\n            state.refreshToken = action.payload\n            authCookieSetRefreshToken(action.payload)\n        },\n        setUserId: (state, action: PayloadAction<string>) => {\n            state.userId = action.payload\n            authCookieSetUserId(action.payload)\n        },\n        setCustomerId: (state, action: PayloadAction<string>) => {\n            state.customerId = action.payload\n            authCookieSetCustomerId(action.payload)\n        }\n    },\n})\n\n// Action creators are generated for each case reducer function\nexport const { clearTokens, setAccessToken, setRefreshToken, setUserId, setCustomerId } = authSlice.actions\n\nexport const { reducer: authReducer } = authSlice\n","/**\n * @license React\n * use-sync-external-store-with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n  (function () {\n    function is(x, y) {\n      return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n    }\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n    var React = require(\"react\"),\n      objectIs = \"function\" === typeof Object.is ? Object.is : is,\n      useSyncExternalStore = React.useSyncExternalStore,\n      useRef = React.useRef,\n      useEffect = React.useEffect,\n      useMemo = React.useMemo,\n      useDebugValue = React.useDebugValue;\n    exports.useSyncExternalStoreWithSelector = function (\n      subscribe,\n      getSnapshot,\n      getServerSnapshot,\n      selector,\n      isEqual\n    ) {\n      var instRef = useRef(null);\n      if (null === instRef.current) {\n        var inst = { hasValue: !1, value: null };\n        instRef.current = inst;\n      } else inst = instRef.current;\n      instRef = useMemo(\n        function () {\n          function memoizedSelector(nextSnapshot) {\n            if (!hasMemo) {\n              hasMemo = !0;\n              memoizedSnapshot = nextSnapshot;\n              nextSnapshot = selector(nextSnapshot);\n              if (void 0 !== isEqual && inst.hasValue) {\n                var currentSelection = inst.value;\n                if (isEqual(currentSelection, nextSnapshot))\n                  return (memoizedSelection = currentSelection);\n              }\n              return (memoizedSelection = nextSnapshot);\n            }\n            currentSelection = memoizedSelection;\n            if (objectIs(memoizedSnapshot, nextSnapshot))\n              return currentSelection;\n            var nextSelection = selector(nextSnapshot);\n            if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n              return (memoizedSnapshot = nextSnapshot), currentSelection;\n            memoizedSnapshot = nextSnapshot;\n            return (memoizedSelection = nextSelection);\n          }\n          var hasMemo = !1,\n            memoizedSnapshot,\n            memoizedSelection,\n            maybeGetServerSnapshot =\n              void 0 === getServerSnapshot ? null : getServerSnapshot;\n          return [\n            function () {\n              return memoizedSelector(getSnapshot());\n            },\n            null === maybeGetServerSnapshot\n              ? void 0\n              : function () {\n                  return memoizedSelector(maybeGetServerSnapshot());\n                }\n          ];\n        },\n        [getSnapshot, getServerSnapshot, selector, isEqual]\n      );\n      var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n      useEffect(\n        function () {\n          inst.hasValue = !0;\n          inst.value = value;\n        },\n        [value]\n      );\n      useDebugValue(value);\n      return value;\n    };\n    \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n      \"function\" ===\n        typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n      __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n  })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/use-sync-external-store-with-selector.production.js');\n} else {\n  module.exports = require('./cjs/use-sync-external-store-with-selector.development.js');\n}\n","// src/utils/react.ts\nimport * as React from \"react\";\n\n// src/utils/react-is.ts\nvar IS_REACT_19 = /* @__PURE__ */ React.version.startsWith(\"19\");\nvar REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n  IS_REACT_19 ? \"react.transitional.element\" : \"react.element\"\n);\nvar REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for(\"react.portal\");\nvar REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for(\"react.fragment\");\nvar REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for(\"react.strict_mode\");\nvar REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for(\"react.profiler\");\nvar REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for(\"react.consumer\");\nvar REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for(\"react.context\");\nvar REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for(\"react.forward_ref\");\nvar REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for(\"react.suspense\");\nvar REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n  \"react.suspense_list\"\n);\nvar REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for(\"react.memo\");\nvar REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for(\"react.lazy\");\nvar REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for(\"react.offscreen\");\nvar REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n  \"react.client.reference\"\n);\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nfunction isValidElementType(type) {\n  return typeof type === \"string\" || typeof type === \"function\" || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || typeof type === \"object\" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || type.getModuleId !== void 0) ? true : false;\n}\nfunction typeOf(object) {\n  if (typeof object === \"object\" && object !== null) {\n    const { $$typeof } = object;\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        switch (object = object.type, object) {\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n          case REACT_SUSPENSE_LIST_TYPE:\n            return object;\n          default:\n            switch (object = object && object.$$typeof, object) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n                return object;\n              case REACT_CONSUMER_TYPE:\n                return object;\n              default:\n                return $$typeof;\n            }\n        }\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n}\nfunction isContextConsumer(object) {\n  return IS_REACT_19 ? typeOf(object) === REACT_CONSUMER_TYPE : typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\n\n// src/utils/warning.ts\nfunction warning(message) {\n  if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n    console.error(message);\n  }\n  try {\n    throw new Error(message);\n  } catch (e) {\n  }\n}\n\n// src/connect/verifySubselectors.ts\nfunction verify(selector, methodName) {\n  if (!selector) {\n    throw new Error(`Unexpected value for ${methodName} in connect.`);\n  } else if (methodName === \"mapStateToProps\" || methodName === \"mapDispatchToProps\") {\n    if (!Object.prototype.hasOwnProperty.call(selector, \"dependsOnOwnProps\")) {\n      warning(\n        `The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`\n      );\n    }\n  }\n}\nfunction verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) {\n  verify(mapStateToProps, \"mapStateToProps\");\n  verify(mapDispatchToProps, \"mapDispatchToProps\");\n  verify(mergeProps, \"mergeProps\");\n}\n\n// src/connect/selectorFactory.ts\nfunction pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, {\n  areStatesEqual,\n  areOwnPropsEqual,\n  areStatePropsEqual\n}) {\n  let hasRunAtLeastOnce = false;\n  let state;\n  let ownProps;\n  let stateProps;\n  let dispatchProps;\n  let mergedProps;\n  function handleFirstCall(firstState, firstOwnProps) {\n    state = firstState;\n    ownProps = firstOwnProps;\n    stateProps = mapStateToProps(state, ownProps);\n    dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    hasRunAtLeastOnce = true;\n    return mergedProps;\n  }\n  function handleNewPropsAndNewState() {\n    stateProps = mapStateToProps(state, ownProps);\n    if (mapDispatchToProps.dependsOnOwnProps)\n      dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n  function handleNewProps() {\n    if (mapStateToProps.dependsOnOwnProps)\n      stateProps = mapStateToProps(state, ownProps);\n    if (mapDispatchToProps.dependsOnOwnProps)\n      dispatchProps = mapDispatchToProps(dispatch, ownProps);\n    mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n  function handleNewState() {\n    const nextStateProps = mapStateToProps(state, ownProps);\n    const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);\n    stateProps = nextStateProps;\n    if (statePropsChanged)\n      mergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n    return mergedProps;\n  }\n  function handleSubsequentCalls(nextState, nextOwnProps) {\n    const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);\n    const stateChanged = !areStatesEqual(\n      nextState,\n      state,\n      nextOwnProps,\n      ownProps\n    );\n    state = nextState;\n    ownProps = nextOwnProps;\n    if (propsChanged && stateChanged) return handleNewPropsAndNewState();\n    if (propsChanged) return handleNewProps();\n    if (stateChanged) return handleNewState();\n    return mergedProps;\n  }\n  return function pureFinalPropsSelector(nextState, nextOwnProps) {\n    return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);\n  };\n}\nfunction finalPropsSelectorFactory(dispatch, {\n  initMapStateToProps,\n  initMapDispatchToProps,\n  initMergeProps,\n  ...options\n}) {\n  const mapStateToProps = initMapStateToProps(dispatch, options);\n  const mapDispatchToProps = initMapDispatchToProps(dispatch, options);\n  const mergeProps = initMergeProps(dispatch, options);\n  if (process.env.NODE_ENV !== \"production\") {\n    verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps);\n  }\n  return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);\n}\n\n// src/utils/bindActionCreators.ts\nfunction bindActionCreators(actionCreators, dispatch) {\n  const boundActionCreators = {};\n  for (const key in actionCreators) {\n    const actionCreator = actionCreators[key];\n    if (typeof actionCreator === \"function\") {\n      boundActionCreators[key] = (...args) => dispatch(actionCreator(...args));\n    }\n  }\n  return boundActionCreators;\n}\n\n// src/utils/isPlainObject.ts\nfunction isPlainObject(obj) {\n  if (typeof obj !== \"object\" || obj === null) return false;\n  const proto = Object.getPrototypeOf(obj);\n  if (proto === null) return true;\n  let baseProto = proto;\n  while (Object.getPrototypeOf(baseProto) !== null) {\n    baseProto = Object.getPrototypeOf(baseProto);\n  }\n  return proto === baseProto;\n}\n\n// src/utils/verifyPlainObject.ts\nfunction verifyPlainObject(value, displayName, methodName) {\n  if (!isPlainObject(value)) {\n    warning(\n      `${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`\n    );\n  }\n}\n\n// src/connect/wrapMapToProps.ts\nfunction wrapMapToPropsConstant(getConstant) {\n  return function initConstantSelector(dispatch) {\n    const constant = getConstant(dispatch);\n    function constantSelector() {\n      return constant;\n    }\n    constantSelector.dependsOnOwnProps = false;\n    return constantSelector;\n  };\n}\nfunction getDependsOnOwnProps(mapToProps) {\n  return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;\n}\nfunction wrapMapToPropsFunc(mapToProps, methodName) {\n  return function initProxySelector(dispatch, { displayName }) {\n    const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {\n      return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, void 0);\n    };\n    proxy.dependsOnOwnProps = true;\n    proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {\n      proxy.mapToProps = mapToProps;\n      proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);\n      let props = proxy(stateOrDispatch, ownProps);\n      if (typeof props === \"function\") {\n        proxy.mapToProps = props;\n        proxy.dependsOnOwnProps = getDependsOnOwnProps(props);\n        props = proxy(stateOrDispatch, ownProps);\n      }\n      if (process.env.NODE_ENV !== \"production\")\n        verifyPlainObject(props, displayName, methodName);\n      return props;\n    };\n    return proxy;\n  };\n}\n\n// src/connect/invalidArgFactory.ts\nfunction createInvalidArgFactory(arg, name) {\n  return (dispatch, options) => {\n    throw new Error(\n      `Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`\n    );\n  };\n}\n\n// src/connect/mapDispatchToProps.ts\nfunction mapDispatchToPropsFactory(mapDispatchToProps) {\n  return mapDispatchToProps && typeof mapDispatchToProps === \"object\" ? wrapMapToPropsConstant(\n    (dispatch) => (\n      // @ts-ignore\n      bindActionCreators(mapDispatchToProps, dispatch)\n    )\n  ) : !mapDispatchToProps ? wrapMapToPropsConstant((dispatch) => ({\n    dispatch\n  })) : typeof mapDispatchToProps === \"function\" ? (\n    // @ts-ignore\n    wrapMapToPropsFunc(mapDispatchToProps, \"mapDispatchToProps\")\n  ) : createInvalidArgFactory(mapDispatchToProps, \"mapDispatchToProps\");\n}\n\n// src/connect/mapStateToProps.ts\nfunction mapStateToPropsFactory(mapStateToProps) {\n  return !mapStateToProps ? wrapMapToPropsConstant(() => ({})) : typeof mapStateToProps === \"function\" ? (\n    // @ts-ignore\n    wrapMapToPropsFunc(mapStateToProps, \"mapStateToProps\")\n  ) : createInvalidArgFactory(mapStateToProps, \"mapStateToProps\");\n}\n\n// src/connect/mergeProps.ts\nfunction defaultMergeProps(stateProps, dispatchProps, ownProps) {\n  return { ...ownProps, ...stateProps, ...dispatchProps };\n}\nfunction wrapMergePropsFunc(mergeProps) {\n  return function initMergePropsProxy(dispatch, { displayName, areMergedPropsEqual }) {\n    let hasRunOnce = false;\n    let mergedProps;\n    return function mergePropsProxy(stateProps, dispatchProps, ownProps) {\n      const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);\n      if (hasRunOnce) {\n        if (!areMergedPropsEqual(nextMergedProps, mergedProps))\n          mergedProps = nextMergedProps;\n      } else {\n        hasRunOnce = true;\n        mergedProps = nextMergedProps;\n        if (process.env.NODE_ENV !== \"production\")\n          verifyPlainObject(mergedProps, displayName, \"mergeProps\");\n      }\n      return mergedProps;\n    };\n  };\n}\nfunction mergePropsFactory(mergeProps) {\n  return !mergeProps ? () => defaultMergeProps : typeof mergeProps === \"function\" ? wrapMergePropsFunc(mergeProps) : createInvalidArgFactory(mergeProps, \"mergeProps\");\n}\n\n// src/utils/batch.ts\nfunction defaultNoopBatch(callback) {\n  callback();\n}\n\n// src/utils/Subscription.ts\nfunction createListenerCollection() {\n  let first = null;\n  let last = null;\n  return {\n    clear() {\n      first = null;\n      last = null;\n    },\n    notify() {\n      defaultNoopBatch(() => {\n        let listener = first;\n        while (listener) {\n          listener.callback();\n          listener = listener.next;\n        }\n      });\n    },\n    get() {\n      const listeners = [];\n      let listener = first;\n      while (listener) {\n        listeners.push(listener);\n        listener = listener.next;\n      }\n      return listeners;\n    },\n    subscribe(callback) {\n      let isSubscribed = true;\n      const listener = last = {\n        callback,\n        next: null,\n        prev: last\n      };\n      if (listener.prev) {\n        listener.prev.next = listener;\n      } else {\n        first = listener;\n      }\n      return function unsubscribe() {\n        if (!isSubscribed || first === null) return;\n        isSubscribed = false;\n        if (listener.next) {\n          listener.next.prev = listener.prev;\n        } else {\n          last = listener.prev;\n        }\n        if (listener.prev) {\n          listener.prev.next = listener.next;\n        } else {\n          first = listener.next;\n        }\n      };\n    }\n  };\n}\nvar nullListeners = {\n  notify() {\n  },\n  get: () => []\n};\nfunction createSubscription(store, parentSub) {\n  let unsubscribe;\n  let listeners = nullListeners;\n  let subscriptionsAmount = 0;\n  let selfSubscribed = false;\n  function addNestedSub(listener) {\n    trySubscribe();\n    const cleanupListener = listeners.subscribe(listener);\n    let removed = false;\n    return () => {\n      if (!removed) {\n        removed = true;\n        cleanupListener();\n        tryUnsubscribe();\n      }\n    };\n  }\n  function notifyNestedSubs() {\n    listeners.notify();\n  }\n  function handleChangeWrapper() {\n    if (subscription.onStateChange) {\n      subscription.onStateChange();\n    }\n  }\n  function isSubscribed() {\n    return selfSubscribed;\n  }\n  function trySubscribe() {\n    subscriptionsAmount++;\n    if (!unsubscribe) {\n      unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);\n      listeners = createListenerCollection();\n    }\n  }\n  function tryUnsubscribe() {\n    subscriptionsAmount--;\n    if (unsubscribe && subscriptionsAmount === 0) {\n      unsubscribe();\n      unsubscribe = void 0;\n      listeners.clear();\n      listeners = nullListeners;\n    }\n  }\n  function trySubscribeSelf() {\n    if (!selfSubscribed) {\n      selfSubscribed = true;\n      trySubscribe();\n    }\n  }\n  function tryUnsubscribeSelf() {\n    if (selfSubscribed) {\n      selfSubscribed = false;\n      tryUnsubscribe();\n    }\n  }\n  const subscription = {\n    addNestedSub,\n    notifyNestedSubs,\n    handleChangeWrapper,\n    isSubscribed,\n    trySubscribe: trySubscribeSelf,\n    tryUnsubscribe: tryUnsubscribeSelf,\n    getListeners: () => listeners\n  };\n  return subscription;\n}\n\n// src/utils/useIsomorphicLayoutEffect.ts\nvar canUseDOM = () => !!(typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\");\nvar isDOM = /* @__PURE__ */ canUseDOM();\nvar isRunningInReactNative = () => typeof navigator !== \"undefined\" && navigator.product === \"ReactNative\";\nvar isReactNative = /* @__PURE__ */ isRunningInReactNative();\nvar getUseIsomorphicLayoutEffect = () => isDOM || isReactNative ? React.useLayoutEffect : React.useEffect;\nvar useIsomorphicLayoutEffect = /* @__PURE__ */ getUseIsomorphicLayoutEffect();\n\n// src/utils/shallowEqual.ts\nfunction is(x, y) {\n  if (x === y) {\n    return x !== 0 || y !== 0 || 1 / x === 1 / y;\n  } else {\n    return x !== x && y !== y;\n  }\n}\nfunction shallowEqual(objA, objB) {\n  if (is(objA, objB)) return true;\n  if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n    return false;\n  }\n  const keysA = Object.keys(objA);\n  const keysB = Object.keys(objB);\n  if (keysA.length !== keysB.length) return false;\n  for (let i = 0; i < keysA.length; i++) {\n    if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n// src/utils/hoistStatics.ts\nvar REACT_STATICS = {\n  childContextTypes: true,\n  contextType: true,\n  contextTypes: true,\n  defaultProps: true,\n  displayName: true,\n  getDefaultProps: true,\n  getDerivedStateFromError: true,\n  getDerivedStateFromProps: true,\n  mixins: true,\n  propTypes: true,\n  type: true\n};\nvar KNOWN_STATICS = {\n  name: true,\n  length: true,\n  prototype: true,\n  caller: true,\n  callee: true,\n  arguments: true,\n  arity: true\n};\nvar FORWARD_REF_STATICS = {\n  $$typeof: true,\n  render: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true\n};\nvar MEMO_STATICS = {\n  $$typeof: true,\n  compare: true,\n  defaultProps: true,\n  displayName: true,\n  propTypes: true,\n  type: true\n};\nvar TYPE_STATICS = {\n  [ForwardRef]: FORWARD_REF_STATICS,\n  [Memo]: MEMO_STATICS\n};\nfunction getStatics(component) {\n  if (isMemo(component)) {\n    return MEMO_STATICS;\n  }\n  return TYPE_STATICS[component[\"$$typeof\"]] || REACT_STATICS;\n}\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent) {\n  if (typeof sourceComponent !== \"string\") {\n    if (objectPrototype) {\n      const inheritedComponent = getPrototypeOf(sourceComponent);\n      if (inheritedComponent && inheritedComponent !== objectPrototype) {\n        hoistNonReactStatics(targetComponent, inheritedComponent);\n      }\n    }\n    let keys = getOwnPropertyNames(sourceComponent);\n    if (getOwnPropertySymbols) {\n      keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n    }\n    const targetStatics = getStatics(targetComponent);\n    const sourceStatics = getStatics(sourceComponent);\n    for (let i = 0; i < keys.length; ++i) {\n      const key = keys[i];\n      if (!KNOWN_STATICS[key] && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n        const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n        try {\n          defineProperty(targetComponent, key, descriptor);\n        } catch (e) {\n        }\n      }\n    }\n  }\n  return targetComponent;\n}\n\n// src/components/Context.ts\nvar ContextKey = /* @__PURE__ */ Symbol.for(`react-redux-context`);\nvar gT = typeof globalThis !== \"undefined\" ? globalThis : (\n  /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */\n  {}\n);\nfunction getContext() {\n  if (!React.createContext) return {};\n  const contextMap = gT[ContextKey] ??= /* @__PURE__ */ new Map();\n  let realContext = contextMap.get(React.createContext);\n  if (!realContext) {\n    realContext = React.createContext(\n      null\n    );\n    if (process.env.NODE_ENV !== \"production\") {\n      realContext.displayName = \"ReactRedux\";\n    }\n    contextMap.set(React.createContext, realContext);\n  }\n  return realContext;\n}\nvar ReactReduxContext = /* @__PURE__ */ getContext();\n\n// src/components/connect.tsx\nvar NO_SUBSCRIPTION_ARRAY = [null, null];\nvar stringifyComponent = (Comp) => {\n  try {\n    return JSON.stringify(Comp);\n  } catch (err) {\n    return String(Comp);\n  }\n};\nfunction useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {\n  useIsomorphicLayoutEffect(() => effectFunc(...effectArgs), dependencies);\n}\nfunction captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs) {\n  lastWrapperProps.current = wrapperProps;\n  renderIsScheduled.current = false;\n  if (childPropsFromStoreUpdate.current) {\n    childPropsFromStoreUpdate.current = null;\n    notifyNestedSubs();\n  }\n}\nfunction subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, additionalSubscribeListener) {\n  if (!shouldHandleStateChanges) return () => {\n  };\n  let didUnsubscribe = false;\n  let lastThrownError = null;\n  const checkForUpdates = () => {\n    if (didUnsubscribe || !isMounted.current) {\n      return;\n    }\n    const latestStoreState = store.getState();\n    let newChildProps, error;\n    try {\n      newChildProps = childPropsSelector(\n        latestStoreState,\n        lastWrapperProps.current\n      );\n    } catch (e) {\n      error = e;\n      lastThrownError = e;\n    }\n    if (!error) {\n      lastThrownError = null;\n    }\n    if (newChildProps === lastChildProps.current) {\n      if (!renderIsScheduled.current) {\n        notifyNestedSubs();\n      }\n    } else {\n      lastChildProps.current = newChildProps;\n      childPropsFromStoreUpdate.current = newChildProps;\n      renderIsScheduled.current = true;\n      additionalSubscribeListener();\n    }\n  };\n  subscription.onStateChange = checkForUpdates;\n  subscription.trySubscribe();\n  checkForUpdates();\n  const unsubscribeWrapper = () => {\n    didUnsubscribe = true;\n    subscription.tryUnsubscribe();\n    subscription.onStateChange = null;\n    if (lastThrownError) {\n      throw lastThrownError;\n    }\n  };\n  return unsubscribeWrapper;\n}\nfunction strictEqual(a, b) {\n  return a === b;\n}\nvar hasWarnedAboutDeprecatedPureOption = false;\nfunction connect(mapStateToProps, mapDispatchToProps, mergeProps, {\n  // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence.\n  // @ts-ignore\n  pure,\n  areStatesEqual = strictEqual,\n  areOwnPropsEqual = shallowEqual,\n  areStatePropsEqual = shallowEqual,\n  areMergedPropsEqual = shallowEqual,\n  // use React's forwardRef to expose a ref of the wrapped component\n  forwardRef = false,\n  // the context consumer to use\n  context = ReactReduxContext\n} = {}) {\n  if (process.env.NODE_ENV !== \"production\") {\n    if (pure !== void 0 && !hasWarnedAboutDeprecatedPureOption) {\n      hasWarnedAboutDeprecatedPureOption = true;\n      warning(\n        'The `pure` option has been removed. `connect` is now always a \"pure/memoized\" component'\n      );\n    }\n  }\n  const Context = context;\n  const initMapStateToProps = mapStateToPropsFactory(mapStateToProps);\n  const initMapDispatchToProps = mapDispatchToPropsFactory(mapDispatchToProps);\n  const initMergeProps = mergePropsFactory(mergeProps);\n  const shouldHandleStateChanges = Boolean(mapStateToProps);\n  const wrapWithConnect = (WrappedComponent) => {\n    if (process.env.NODE_ENV !== \"production\") {\n      const isValid = /* @__PURE__ */ isValidElementType(WrappedComponent);\n      if (!isValid)\n        throw new Error(\n          `You must pass a component to the function returned by connect. Instead received ${stringifyComponent(\n            WrappedComponent\n          )}`\n        );\n    }\n    const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || \"Component\";\n    const displayName = `Connect(${wrappedComponentName})`;\n    const selectorFactoryOptions = {\n      shouldHandleStateChanges,\n      displayName,\n      wrappedComponentName,\n      WrappedComponent,\n      // @ts-ignore\n      initMapStateToProps,\n      initMapDispatchToProps,\n      initMergeProps,\n      areStatesEqual,\n      areStatePropsEqual,\n      areOwnPropsEqual,\n      areMergedPropsEqual\n    };\n    function ConnectFunction(props) {\n      const [propsContext, reactReduxForwardedRef, wrapperProps] = React.useMemo(() => {\n        const { reactReduxForwardedRef: reactReduxForwardedRef2, ...wrapperProps2 } = props;\n        return [props.context, reactReduxForwardedRef2, wrapperProps2];\n      }, [props]);\n      const ContextToUse = React.useMemo(() => {\n        let ResultContext = Context;\n        if (propsContext?.Consumer) {\n          if (process.env.NODE_ENV !== \"production\") {\n            const isValid = /* @__PURE__ */ isContextConsumer(\n              // @ts-ignore\n              /* @__PURE__ */ React.createElement(propsContext.Consumer, null)\n            );\n            if (!isValid) {\n              throw new Error(\n                \"You must pass a valid React context consumer as `props.context`\"\n              );\n            }\n            ResultContext = propsContext;\n          }\n        }\n        return ResultContext;\n      }, [propsContext, Context]);\n      const contextValue = React.useContext(ContextToUse);\n      const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);\n      const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);\n      if (process.env.NODE_ENV !== \"production\" && !didStoreComeFromProps && !didStoreComeFromContext) {\n        throw new Error(\n          `Could not find \"store\" in the context of \"${displayName}\". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${displayName} in connect options.`\n        );\n      }\n      const store = didStoreComeFromProps ? props.store : contextValue.store;\n      const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState;\n      const childPropsSelector = React.useMemo(() => {\n        return finalPropsSelectorFactory(store.dispatch, selectorFactoryOptions);\n      }, [store]);\n      const [subscription, notifyNestedSubs] = React.useMemo(() => {\n        if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY;\n        const subscription2 = createSubscription(\n          store,\n          didStoreComeFromProps ? void 0 : contextValue.subscription\n        );\n        const notifyNestedSubs2 = subscription2.notifyNestedSubs.bind(subscription2);\n        return [subscription2, notifyNestedSubs2];\n      }, [store, didStoreComeFromProps, contextValue]);\n      const overriddenContextValue = React.useMemo(() => {\n        if (didStoreComeFromProps) {\n          return contextValue;\n        }\n        return {\n          ...contextValue,\n          subscription\n        };\n      }, [didStoreComeFromProps, contextValue, subscription]);\n      const lastChildProps = React.useRef(void 0);\n      const lastWrapperProps = React.useRef(wrapperProps);\n      const childPropsFromStoreUpdate = React.useRef(void 0);\n      const renderIsScheduled = React.useRef(false);\n      const isMounted = React.useRef(false);\n      const latestSubscriptionCallbackError = React.useRef(\n        void 0\n      );\n      useIsomorphicLayoutEffect(() => {\n        isMounted.current = true;\n        return () => {\n          isMounted.current = false;\n        };\n      }, []);\n      const actualChildPropsSelector = React.useMemo(() => {\n        const selector = () => {\n          if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {\n            return childPropsFromStoreUpdate.current;\n          }\n          return childPropsSelector(store.getState(), wrapperProps);\n        };\n        return selector;\n      }, [store, wrapperProps]);\n      const subscribeForReact = React.useMemo(() => {\n        const subscribe = (reactListener) => {\n          if (!subscription) {\n            return () => {\n            };\n          }\n          return subscribeUpdates(\n            shouldHandleStateChanges,\n            store,\n            subscription,\n            // @ts-ignore\n            childPropsSelector,\n            lastWrapperProps,\n            lastChildProps,\n            renderIsScheduled,\n            isMounted,\n            childPropsFromStoreUpdate,\n            notifyNestedSubs,\n            reactListener\n          );\n        };\n        return subscribe;\n      }, [subscription]);\n      useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [\n        lastWrapperProps,\n        lastChildProps,\n        renderIsScheduled,\n        wrapperProps,\n        childPropsFromStoreUpdate,\n        notifyNestedSubs\n      ]);\n      let actualChildProps;\n      try {\n        actualChildProps = React.useSyncExternalStore(\n          // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing\n          subscribeForReact,\n          // TODO This is incredibly hacky. We've already processed the store update and calculated new child props,\n          // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`.\n          actualChildPropsSelector,\n          getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector\n        );\n      } catch (err) {\n        if (latestSubscriptionCallbackError.current) {\n          ;\n          err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`;\n        }\n        throw err;\n      }\n      useIsomorphicLayoutEffect(() => {\n        latestSubscriptionCallbackError.current = void 0;\n        childPropsFromStoreUpdate.current = void 0;\n        lastChildProps.current = actualChildProps;\n      });\n      const renderedWrappedComponent = React.useMemo(() => {\n        return (\n          // @ts-ignore\n          /* @__PURE__ */ React.createElement(\n            WrappedComponent,\n            {\n              ...actualChildProps,\n              ref: reactReduxForwardedRef\n            }\n          )\n        );\n      }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]);\n      const renderedChild = React.useMemo(() => {\n        if (shouldHandleStateChanges) {\n          return /* @__PURE__ */ React.createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent);\n        }\n        return renderedWrappedComponent;\n      }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);\n      return renderedChild;\n    }\n    const _Connect = React.memo(ConnectFunction);\n    const Connect = _Connect;\n    Connect.WrappedComponent = WrappedComponent;\n    Connect.displayName = ConnectFunction.displayName = displayName;\n    if (forwardRef) {\n      const _forwarded = React.forwardRef(\n        function forwardConnectRef(props, ref) {\n          return /* @__PURE__ */ React.createElement(Connect, { ...props, reactReduxForwardedRef: ref });\n        }\n      );\n      const forwarded = _forwarded;\n      forwarded.displayName = displayName;\n      forwarded.WrappedComponent = WrappedComponent;\n      return /* @__PURE__ */ hoistNonReactStatics(forwarded, WrappedComponent);\n    }\n    return /* @__PURE__ */ hoistNonReactStatics(Connect, WrappedComponent);\n  };\n  return wrapWithConnect;\n}\nvar connect_default = connect;\n\n// src/components/Provider.tsx\nfunction Provider(providerProps) {\n  const { children, context, serverState, store } = providerProps;\n  const contextValue = React.useMemo(() => {\n    const subscription = createSubscription(store);\n    const baseContextValue = {\n      store,\n      subscription,\n      getServerState: serverState ? () => serverState : void 0\n    };\n    if (process.env.NODE_ENV === \"production\") {\n      return baseContextValue;\n    } else {\n      const { identityFunctionCheck = \"once\", stabilityCheck = \"once\" } = providerProps;\n      return /* @__PURE__ */ Object.assign(baseContextValue, {\n        stabilityCheck,\n        identityFunctionCheck\n      });\n    }\n  }, [store, serverState]);\n  const previousState = React.useMemo(() => store.getState(), [store]);\n  useIsomorphicLayoutEffect(() => {\n    const { subscription } = contextValue;\n    subscription.onStateChange = subscription.notifyNestedSubs;\n    subscription.trySubscribe();\n    if (previousState !== store.getState()) {\n      subscription.notifyNestedSubs();\n    }\n    return () => {\n      subscription.tryUnsubscribe();\n      subscription.onStateChange = void 0;\n    };\n  }, [contextValue, previousState]);\n  const Context = context || ReactReduxContext;\n  return /* @__PURE__ */ React.createElement(Context.Provider, { value: contextValue }, children);\n}\nvar Provider_default = Provider;\n\n// src/hooks/useReduxContext.ts\nfunction createReduxContextHook(context = ReactReduxContext) {\n  return function useReduxContext2() {\n    const contextValue = React.useContext(context);\n    if (process.env.NODE_ENV !== \"production\" && !contextValue) {\n      throw new Error(\n        \"could not find react-redux context value; please ensure the component is wrapped in a <Provider>\"\n      );\n    }\n    return contextValue;\n  };\n}\nvar useReduxContext = /* @__PURE__ */ createReduxContextHook();\n\n// src/hooks/useStore.ts\nfunction createStoreHook(context = ReactReduxContext) {\n  const useReduxContext2 = context === ReactReduxContext ? useReduxContext : (\n    // @ts-ignore\n    createReduxContextHook(context)\n  );\n  const useStore2 = () => {\n    const { store } = useReduxContext2();\n    return store;\n  };\n  Object.assign(useStore2, {\n    withTypes: () => useStore2\n  });\n  return useStore2;\n}\nvar useStore = /* @__PURE__ */ createStoreHook();\n\n// src/hooks/useDispatch.ts\nfunction createDispatchHook(context = ReactReduxContext) {\n  const useStore2 = context === ReactReduxContext ? useStore : createStoreHook(context);\n  const useDispatch2 = () => {\n    const store = useStore2();\n    return store.dispatch;\n  };\n  Object.assign(useDispatch2, {\n    withTypes: () => useDispatch2\n  });\n  return useDispatch2;\n}\nvar useDispatch = /* @__PURE__ */ createDispatchHook();\n\n// src/hooks/useSelector.ts\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/with-selector.js\";\nvar refEquality = (a, b) => a === b;\nfunction createSelectorHook(context = ReactReduxContext) {\n  const useReduxContext2 = context === ReactReduxContext ? useReduxContext : createReduxContextHook(context);\n  const useSelector2 = (selector, equalityFnOrOptions = {}) => {\n    const { equalityFn = refEquality } = typeof equalityFnOrOptions === \"function\" ? { equalityFn: equalityFnOrOptions } : equalityFnOrOptions;\n    if (process.env.NODE_ENV !== \"production\") {\n      if (!selector) {\n        throw new Error(`You must pass a selector to useSelector`);\n      }\n      if (typeof selector !== \"function\") {\n        throw new Error(`You must pass a function as a selector to useSelector`);\n      }\n      if (typeof equalityFn !== \"function\") {\n        throw new Error(\n          `You must pass a function as an equality function to useSelector`\n        );\n      }\n    }\n    const reduxContext = useReduxContext2();\n    const { store, subscription, getServerState } = reduxContext;\n    const firstRun = React.useRef(true);\n    const wrappedSelector = React.useCallback(\n      {\n        [selector.name](state) {\n          const selected = selector(state);\n          if (process.env.NODE_ENV !== \"production\") {\n            const { devModeChecks = {} } = typeof equalityFnOrOptions === \"function\" ? {} : equalityFnOrOptions;\n            const { identityFunctionCheck, stabilityCheck } = reduxContext;\n            const {\n              identityFunctionCheck: finalIdentityFunctionCheck,\n              stabilityCheck: finalStabilityCheck\n            } = {\n              stabilityCheck,\n              identityFunctionCheck,\n              ...devModeChecks\n            };\n            if (finalStabilityCheck === \"always\" || finalStabilityCheck === \"once\" && firstRun.current) {\n              const toCompare = selector(state);\n              if (!equalityFn(selected, toCompare)) {\n                let stack = void 0;\n                try {\n                  throw new Error();\n                } catch (e) {\n                  ;\n                  ({ stack } = e);\n                }\n                console.warn(\n                  \"Selector \" + (selector.name || \"unknown\") + \" returned a different result when called with the same parameters. This can lead to unnecessary rerenders.\\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization\",\n                  {\n                    state,\n                    selected,\n                    selected2: toCompare,\n                    stack\n                  }\n                );\n              }\n            }\n            if (finalIdentityFunctionCheck === \"always\" || finalIdentityFunctionCheck === \"once\" && firstRun.current) {\n              if (selected === state) {\n                let stack = void 0;\n                try {\n                  throw new Error();\n                } catch (e) {\n                  ;\n                  ({ stack } = e);\n                }\n                console.warn(\n                  \"Selector \" + (selector.name || \"unknown\") + \" returned the root state when called. This can lead to unnecessary rerenders.\\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.\",\n                  { stack }\n                );\n              }\n            }\n            if (firstRun.current) firstRun.current = false;\n          }\n          return selected;\n        }\n      }[selector.name],\n      [selector]\n    );\n    const selectedState = useSyncExternalStoreWithSelector(\n      subscription.addNestedSub,\n      store.getState,\n      getServerState || store.getState,\n      wrappedSelector,\n      equalityFn\n    );\n    React.useDebugValue(selectedState);\n    return selectedState;\n  };\n  Object.assign(useSelector2, {\n    withTypes: () => useSelector2\n  });\n  return useSelector2;\n}\nvar useSelector = /* @__PURE__ */ createSelectorHook();\n\n// src/exports.ts\nvar batch = defaultNoopBatch;\nexport {\n  Provider_default as Provider,\n  ReactReduxContext,\n  batch,\n  connect_default as connect,\n  createDispatchHook,\n  createSelectorHook,\n  createStoreHook,\n  shallowEqual,\n  useDispatch,\n  useSelector,\n  useStore\n};\n//# sourceMappingURL=react-redux.mjs.map","import {createSlice, PayloadAction} from \"@reduxjs/toolkit\";\nimport { EventType } from \"../../../../io/client/arccos-event-bus.mjs\";\n\n\nexport interface EventBusState {\n    events: EventType[],\n}\n\nconst initialState: EventBusState = {\n    events: []\n}\n\nexport const eventBusSlice = createSlice({\n    name: 'eventBus',\n    initialState,\n    reducers: {\n        addEvent: (state, action: PayloadAction<EventType>) => {\n            state.events.push(action.payload)\n        },\n    },\n})\n\nexport const { addEvent } = eventBusSlice.actions\n\nexport const { reducer: eventBusReducer } = eventBusSlice\n","/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.21';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * 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\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    define(function() {\n      return _;\n    });\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else if (freeModule) {\n    // Export for Node.js.\n    (freeModule.exports = _)._ = _;\n    // Export for CommonJS support.\n    freeExports._ = _;\n  }\n  else {\n    // Export to the global object.\n    root._ = _;\n  }\n}.call(this));\n","import {\n  ContentConfig,\n  InitialState,\n  OfferSelectionsState,\n} from \"./initial-state.mjs\";\nimport _ from \"lodash\";\nimport { OffersResponse } from \"../api/query/offers.mjs\";\n\ndeclare global {\n  interface Window {\n    __ARCCOS_INITIAL_STATE: InitialState;\n  }\n}\n\nlet initialState: InitialState | undefined = undefined;\n\nexport const setInitialState = (state: InitialState) => {\n  initialState = state;\n};\n\nexport const getInitialState = (): InitialState => {\n  if (initialState) {\n    return initialState;\n  }\n\n  if (typeof window !== \"undefined\") {\n    return window.__ARCCOS_INITIAL_STATE;\n  }\n\n  // Return empty initial state if running on server\n  return {\n    locale: \"en\",\n    statsig: {\n      config: {},\n      user: {} as any,\n      dynamicContent: { configs: [] },\n      tests: {},\n    },\n  };\n};\n\nexport const getLocale = () => getInitialState()?.locale;\n\nexport const getStatsig = () => getInitialState()?.statsig;\n\nexport const getStatsigUser = () => getStatsig()?.user;\n\nexport const getStatsigUserCountry = () => getStatsigUser()?.country || \"US\";\n\nexport const getIsUsOrCa = () => ['US', 'CA'].includes(getStatsigUserCountry());\n\nexport const getStatsigUserStableID = () =>\n  getStatsigUser()?.customIDs?.stableID;\n\nexport const getStatsigConfig = () => getStatsig()?.config;\n\nexport const getDynamicContent = () => getStatsig()?.dynamicContent.configs;\n\nexport const getServerSideOffers = (): OffersResponse | undefined =>\n  getInitialState()?.offers;\n\nexport const getServerSideOfferSelections = ():\n  | OfferSelectionsState\n  | undefined => getInitialState()?.offerSelections;\n\n// SSR-computed isAlpsNext — stable per page load. Use for analytics enrichment.\n// Rendering code that must react to URL changes should use the live\n// `getIsAlpsNext()` from `util/alps-experiment.mts` instead.\nexport const getIsAlpsNextFromInitialState = (): boolean =>\n  getInitialState()?.isAlpsNext ?? false;\n\nexport const getMatchingConfigs = (url: string) =>\n  getDynamicContent()\n    .filter((config) => {\n      return config.urls.some((configUrl) => {\n        const regex = new RegExp(\n          `^${configUrl.replace(/\\./g, \"\\\\.\").replace(/\\*/g, \".*\")}.*$`,\n        );\n        return regex.test(url);\n      });\n    })\n    .map((config) => config.config);\n\nconst getUrl = () => {\n  if (typeof window !== \"undefined\") {\n    return `${window.location.hostname}${window.location.pathname}`\n      .replace(\"dev.\", \"\")\n      .replace(\"local.\", \"\");\n  }\n  // TODO: figure out how to get the url from event somehow without passing it around everywhere\n  return \"\";\n};\n\n// construct the dynamic content for the url by combining all matching configs in order using lodash.\n// if a future config has the same key as a previous config, the future config will overwrite the previous config, even if the value is null.\nexport const getDynamicContentForUrl = () => {\n  const url = getUrl();\n  const matchingConfigs = getMatchingConfigs(url);\n  return matchingConfigs.reduce((acc, config) => {\n    return _.mergeWith(acc, config, (objValue, srcValue) => {\n      if (_.isArray(srcValue) || srcValue === null) {\n        return srcValue;\n      }\n    });\n  }, {}) as ContentConfig;\n};\n\nexport const getDynamicContentHeader = () => getDynamicContentForUrl()?.header;\nexport const getDynamicContentHeaderPartnerLogo = () =>\n  getDynamicContentHeader()?.partner_logo;\n\nexport const getDynamicContentCreateAccount = () =>\n  getDynamicContentForUrl()?.create_account;\n\nexport const getDynamicContentCreateAccountHeader = () =>\n  getDynamicContentCreateAccount()?.header;\nexport const getDynamicContentCreateAccountHeaderFontSize = () =>\n  getDynamicContentCreateAccount()?.headerFontSize || \"6.4vw\";\nexport const getDynamicContentCreateAccountDesktopHeaderFontSize = () =>\n  getDynamicContentCreateAccount()?.desktopHeaderFontSize || \"2.8dvw\";\nexport const getDynamicContentCreateAccountBody = () =>\n  getDynamicContentCreateAccount()?.body;\nexport const getDynamicContentCreateAccountButton = () =>\n  getDynamicContentCreateAccount()?.buttonText;\nexport const getDynamicContentCreateAccountBackgroundVideo = () =>\n  getDynamicContentCreateAccount()?.backgroundVideoUrl;\nexport const getDynamicContentCreateAccountBackgroundPicture = () =>\n  getDynamicContentCreateAccount()?.backgroundPictureUrl;\n\nexport const getDynamicContentCreateAccountBackgroundPictureDesktop = () =>\n  getDynamicContentCreateAccount()?.desktopBackgroundPictureUrl;\n\nexport const getDynamicContentCreateAccountVideoButtonUrl = () =>\n  getDynamicContentCreateAccount()?.videoButtonUrl;\n\nexport const getDynamicContentEmailPlaceholder = () =>\n  getDynamicContentForUrl()?.email_placeholder;\n\nexport const getDynamicContentPasswordPlaceholder = () =>\n  getDynamicContentForUrl()?.password_placeholder;\n\nexport const getDynamicContentLogin = () => getDynamicContentForUrl()?.login;\n\nexport const getDynamicContentLoginHeaderWithEmail = () =>\n  getDynamicContentLogin()?.header_with_email;\n\nexport const getDynamicContentLoginHeaderWithoutEmail = () =>\n  getDynamicContentLogin()?.header_without_email;\n\nexport const getDynamicContentLoginSubheader = () =>\n  getDynamicContentLogin()?.subheader;\n\nexport const getDynamicContentLoginLoginButtonText = () =>\n  getDynamicContentLogin()?.login_button_text;\n\nexport const getDynamicContentLoginBackButtonText = () =>\n  getDynamicContentLogin()?.back_button_text;\n\nexport const getDynamicContentLoginBackCreateAccountButtonText = () =>\n  getDynamicContentLogin()?.back_create_account_button_text;\n\nexport const getDynamicContentPayment = () =>\n  getDynamicContentForUrl()?.payment;\n\nexport const getDynamicContentPaymentTitle = () =>\n  getDynamicContentPayment()?.header;\n\nexport const getDynamicContentPaymentLabel = () =>\n  getDynamicContentPayment()?.label;\n\nexport const getDynamicContentPaymentSubtitle = () =>\n  getDynamicContentPayment()?.body;\n\nexport const getDynamicContentPaymentProducts = () =>\n  getDynamicContentPayment()?.products;\n\nexport const getDynamicContentPaymentLinkCallout = () =>\n  getDynamicContentPayment()?.add_on ||\n  getDynamicContentPayment()?.link_gen_2_callout;\n\nexport const getDynamicContentPaymentLinkCalloutTitle = () =>\n  getDynamicContentPaymentLinkCallout()?.section_title;\n\nexport const getDynamicContentPaymentLinkCalloutImage = () =>\n  getDynamicContentPaymentLinkCallout()?.image;\n\nexport const getDynamicContentPaymentLinkCalloutBenefits = () =>\n  getDynamicContentPaymentLinkCallout()?.benefits;\n\nexport const getDynamicContentPaymentLinkCalloutButtonText = () =>\n  getDynamicContentPaymentLinkCallout()?.button_text;\n\nexport const getDynamicContentPaymentPaymentMethodsTitle = () =>\n  getDynamicContentPayment()?.payment_methods_title;\n\nexport const getDynamicContentPaymentPaymentMethods = () =>\n  getDynamicContentPayment()?.payment_methods;\n\nexport const getDynamicContentPaymentButton = () =>\n  getDynamicContentPayment()?.buttonText;\n\nexport const getDynamicContentPaymentDisclaimer = () =>\n  getDynamicContentPayment()?.disclaimer;\n\nexport const getDynamicContentPaymentDisclaimerText = () =>\n  getDynamicContentPaymentDisclaimer()?.text;\n\nexport const getDynamicContentPaymentDisclaimerLicenseAgreement = () =>\n  getDynamicContentPaymentDisclaimer()?.license_agreement;\n\nexport const getDynamicContentPaymentDisclaimerPrivacyPolicy = () =>\n  getDynamicContentPaymentDisclaimer()?.privacy_policy;\n\nexport const getDynamicSuccessContent = () =>\n  getDynamicContentForUrl()?.success;\n\nexport const getDynamicContentSuccessHeader = () =>\n  getDynamicSuccessContent().header;\n\nexport const getDynamicContentSuccessSubheader = () =>\n  getDynamicSuccessContent().subheader;\n\nexport const getDynamicContentSuccessBackgroundImage = () =>\n  getDynamicSuccessContent().background_image;\n\nexport const getDynamicContentSuccessDesktopBackgroundImage = () =>\n  getDynamicSuccessContent().desktop_background_image;\n\nexport const getDynamicContentSensorlessPopup = () =>\n  getDynamicContentForUrl()?.sensorless_popup;\n\nexport const getDynamicContentSensorlessPopupShouldShow = () =>\n  getDynamicContentSensorlessPopup()?.should_show_sensorless_popup;\n\nexport const getDynamicContentSensorlessPopupContent = () =>\n  getDynamicContentSensorlessPopup()?.sensorless_popup_content;\n\nexport const getDynamicContentOptionalSensorsCallout = () =>\n  getDynamicContentPayment()?.optional_sensors_callout;\n\nexport const getDynamicContentOptionalSensorsCalloutTitle = () =>\n  getDynamicContentOptionalSensorsCallout()?.title;\n\nexport const getDynamicContentOptionalSensorsCalloutSensorImage = () =>\n  getDynamicContentOptionalSensorsCallout()?.sensor_image;\n\nexport const getDynamicContentOptionalSensorsCalloutBodyText = () =>\n  getDynamicContentOptionalSensorsCallout()?.body_text;\n\nexport const getDynamicContentOptionalSensorsCalloutShippingDisclaimer = () =>\n  getDynamicContentOptionalSensorsCallout()?.shipping_disclaimer;\n\nexport const getDynamicContentOptionalSensorsCalloutButtonText = () =>\n  getDynamicContentOptionalSensorsCallout()?.button_text;\n\nexport const getDynamicContentLinkProPopup = () =>\n  getDynamicContentPayment()?.link_pro_popup;\n\nexport const getDynamicContentNucapLandingPage = () =>\n  getDynamicContentForUrl()?.nucap_landing_page;\n\n// Device detection (from CloudFront headers)\nexport const getIsIOS = () => getStatsigUser()?.custom?.isIOS === true;\nexport const getIsAndroid = () => getStatsigUser()?.custom?.isAndroid === true;\nexport const getIsDesktop = () => getStatsigUser()?.custom?.isDesktop === true;\nexport const getIsMobile = () => getStatsigUser()?.custom?.isMobile === true;\n","import {createSlice, PayloadAction} from \"@reduxjs/toolkit\";\nimport {useSelector} from \"../../createStore.mjs\";\nimport {Currency} from \"../../../api/query/offers.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {getServerSideOfferSelections} from \"../../../initial-state/intial-state-accessors.mjs\";\n\nexport interface OfferSelectionsState {\n    currency?: Currency\n    shouldIncludeLink?: boolean\n    shouldIncludeSensors?: boolean\n}\n\n// Function to safely get initial state that works on both client and server\nconst getInitialOfferSelections = (): OfferSelectionsState => {\n    try {\n        // This might fail during SSR, so we handle it gracefully\n        const serverSideOfferSelections = getServerSideOfferSelections();\n        return {\n            currency: serverSideOfferSelections?.currency,\n            shouldIncludeLink: serverSideOfferSelections?.shouldIncludeLink || false,\n            shouldIncludeSensors: serverSideOfferSelections?.shouldIncludeSensors || false\n        };\n    } catch (e) {\n        // Default values if we can't access server-side data\n        return {\n            currency: undefined,\n            shouldIncludeLink: false,\n            shouldIncludeSensors: false\n        };\n    }\n};\n\nconst initialState: OfferSelectionsState = getInitialOfferSelections();\n\nconst offerSelectionsState = createSlice({\n    name: 'offers',\n    initialState,\n    reducers: {\n        setUserCurrency: (state, action: PayloadAction<Currency>) => {\n            console.log('[OFFERS-SLICE] setUserCurrency:', {\n                previous: state.currency,\n                new: action.payload,\n                timestamp: Date.now()\n            })\n            state.currency = action.payload\n        },\n        setShouldIncludeLink: (state, action: PayloadAction<boolean>) => {\n            console.log('[OFFERS-SLICE] setShouldIncludeLink:', {\n                previous: state.shouldIncludeLink,\n                new: action.payload,\n                timestamp: Date.now()\n            })\n            state.shouldIncludeLink = action.payload\n        },\n        setShouldIncludeSensors: (state, action: PayloadAction<boolean>) => {\n            console.log('[OFFERS-SLICE] setShouldIncludeSensors:', {\n                previous: state.shouldIncludeSensors,\n                new: action.payload,\n                timestamp: Date.now()\n            })\n            state.shouldIncludeSensors = action.payload\n        }\n    },\n})\n\nexport const {setUserCurrency, setShouldIncludeLink, setShouldIncludeSensors} = offerSelectionsState.actions\nexport const {reducer: offerSelectionsReducer} = offerSelectionsState\n\nconst useOfferSelectionsState = () => useSelector(state => state.offerSelections)\n\nexport const useCurrency = () => useOfferSelectionsState().currency\n\n\nexport const currencyToSymbol: Record<Currency, string> = {\n    USD: '$',\n    EUR: '€',\n    GBP: '£',\n    CAD: 'CA$',\n    AUD: 'AU$',\n    JPY: '¥',\n    KRW: '₩',\n    ZAR: 'R',\n}\n\ntype FormatPriceOptions = {\n    preferredFractionDigits?: number\n}\n\nexport const useFormatPrice = () => {\n    const currency = useCurrency()\n    return (price: number | undefined, options?: FormatPriceOptions) => {\n        const {\n            preferredFractionDigits = 2\n        } = options || {}\n        if ([\n                undefined,\n                null,\n                NaN,\n                Infinity,\n                -Infinity,\n            ].includes(price) ||\n            typeof price !== 'number'\n        ) {\n            return 'ERROR'\n        }\n        if ([\n            'JPY',\n            'KRW',\n            'ZAR',\n        ].includes(currency)) {\n            return `${currencyToSymbol[currency]}${price.toFixed(0)}`\n        }\n        return `${currencyToSymbol[currency]}${price.toFixed(preferredFractionDigits)}`\n    }\n}\n\nexport const useShouldIncludeLink = () => {\n    const value = useOfferSelectionsState().shouldIncludeLink\n    console.log('[OFFERS-SLICE] useShouldIncludeLink read:', value)\n    return value\n}\n\nexport const useShouldIncludeSensors = () => {\n    const value = useOfferSelectionsState().shouldIncludeSensors\n    console.log('[OFFERS-SLICE] useShouldIncludeSensors read:', value)\n    return value\n}\n","import {createSlice} from \"@reduxjs/toolkit\";\n\nexport interface ShippingInformation  {\n    address1?: string\n    address2?: string\n    city?: string\n    country?: string\n    email?: string\n    firstName?: string\n    lastName?: string\n    state?: string\n    zip?: string\n}\n\nconst getInitialState = (): ShippingInformation => ({\n    address1: undefined,\n    address2: undefined,\n    city: undefined,\n    country: undefined,\n    email: undefined,\n    firstName: undefined,\n    lastName: undefined,\n    state: undefined,\n    zip: undefined\n})\n\nexport const addressSlice = createSlice({\n    name: 'address',\n    initialState: getInitialState(),\n    reducers: {\n        setAddress1: (state, action) => {\n            state.address1 = action.payload\n        },\n        setAddress2: (state, action) => {\n            state.address2 = action.payload\n        },\n        setCity: (state, action) => {\n            state.city = action.payload\n        },\n        setCountry: (state, action) => {\n            state.country = action.payload\n        },\n        setEmail: (state, action) => {\n            state.email = action.payload\n        },\n        setFirstName: (state, action) => {\n            state.firstName = action.payload\n        },\n        setLastName: (state, action) => {\n            state.lastName = action.payload\n        },\n        setState: (state, action) => {\n            state.state = action.payload\n        },\n        setZip: (state, action) => {\n            state.zip = action.payload\n        }\n    },\n})\n\nexport const { setAddress1, setAddress2, setCity, setCountry, setEmail, setFirstName, setLastName, setState, setZip } = addressSlice.actions\n\nexport const { reducer: addressReducer } = addressSlice\n","import {createSlice, PayloadAction} from \"@reduxjs/toolkit\";\nimport { EventType } from \"../../../../io/client/arccos-event-bus.mjs\";\n\n\nexport interface ModalState extends Object {\n    modalComponent?: JSX.Element;\n    modalProps: any;\n}\n\nconst initialState: ModalState = {\n    modalComponent: undefined,\n    modalProps: {},\n}\n\nexport const modalSlice = createSlice({\n    name: 'modal',\n    initialState,\n    reducers: {\n        openModalAction: (state, action: PayloadAction<ModalState >) => {\n            state.modalComponent = action.payload.modalComponent\n            state.modalProps = action.payload.modalProps\n        },\n        closeModalAction: (state, action: PayloadAction<JSX.Element>) => {\n            state.modalComponent = undefined\n            state.modalProps = {}\n        },\n    },\n})\n\nexport const { openModalAction, closeModalAction } = modalSlice.actions\n\nexport const { reducer: modalReducer } = modalSlice\n","import {configureStore} from '@reduxjs/toolkit'\nimport {authReducer} from \"./slices/auth/auth-slice.mjs\";\nimport {useSelector as ReduxUseSelector} from \"react-redux\";\nimport {eventBusReducer} from \"./slices/event-bus/event-bus-slice.mjs\";\nimport {offerSelectionsReducer} from \"./slices/offers/offers-slice.mjs\";\nimport {addressReducer} from \"./slices/address/address-slice.js\";\nimport {modalReducer} from \"./slices/modal/modal-slice.mjs\";\n\n\nexport const createStore = () => configureStore({\n    reducer: {\n        auth: authReducer,\n        eventBus: eventBusReducer,\n        offerSelections: offerSelectionsReducer,\n        address: addressReducer,\n        modal: modalReducer,\n    },\n})\n\nexport type RootState = ReturnType<ReturnType<typeof createStore>['getState']>\nexport type AppDispatch = ReturnType<typeof createStore>['dispatch']\n\nexport const useSelector = ReduxUseSelector.withTypes<RootState>();\n","import {useDispatch} from \"react-redux\";\nimport {useEffect} from \"react\";\nimport {addEvent} from \"./event-bus-slice.mjs\";\n\n\nexport const useEventBusReduxListener = () => {\n    const dispatch = useDispatch()\n    useEffect(() => {\n        window.arccos.listen(\n            e => dispatch(addEvent(e)),\n            true,\n        )\n    }, [])\n}\n","import {RootState, useSelector} from \"../../createStore.mjs\";\n\nexport const useEventBusEvents = () => useSelector((state: RootState) => state.eventBus.events)\n","import {useEventBusEvents} from \"../event-bus/event-bus-selectors.mjs\";\nimport {AuthEvent} from \"../../../../io/client/arccos-event-bus.mjs\";\nimport {useEffect} from \"react\";\nimport {useDispatch} from \"react-redux\";\nimport {setAccessToken, setRefreshToken} from \"./auth-slice.mjs\";\n\n\nexport const useAuthEventBusListener = () => {\n    const dispatch = useDispatch()\n    const events = useEventBusEvents()\n    // get last auth event\n    const authActions = events.filter(e => e.action === 'POST_AUTH_DATA') as AuthEvent[]\n    const lastAuthActionAccessToken = authActions?.[authActions.length - 1]?.payload?.auth?.authToken\n    const lastAuthActionRefreshToken = authActions?.[authActions.length - 1]?.payload?.auth?.accessKey\n    useEffect(() => {\n        if (lastAuthActionAccessToken) {\n            dispatch(setAccessToken(lastAuthActionAccessToken))\n        }\n        if (lastAuthActionRefreshToken) {\n            dispatch(setRefreshToken(lastAuthActionRefreshToken))\n        }\n    }, [lastAuthActionAccessToken, lastAuthActionRefreshToken, dispatch])\n}\n","/**\n * @remix-run/router v1.23.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n  /**\n   * A POP indicates a change to an arbitrary index in the history stack, such\n   * as a back or forward navigation. It does not describe the direction of the\n   * navigation, only that the current index changed.\n   *\n   * Note: This is the default action for newly created history objects.\n   */\n  Action[\"Pop\"] = \"POP\";\n  /**\n   * A PUSH indicates a new entry being added to the history stack, such as when\n   * a link is clicked and a new page loads. When this happens, all subsequent\n   * entries in the stack are lost.\n   */\n  Action[\"Push\"] = \"PUSH\";\n  /**\n   * A REPLACE indicates the entry at the current index in the history stack\n   * being replaced by a new one.\n   */\n  Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  let {\n    initialEntries = [\"/\"],\n    initialIndex,\n    v5Compat = false\n  } = options;\n  let entries; // Declare so we can access from createMemoryLocation\n  entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n  let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n  let action = Action.Pop;\n  let listener = null;\n  function clampIndex(n) {\n    return Math.min(Math.max(n, 0), entries.length - 1);\n  }\n  function getCurrentLocation() {\n    return entries[index];\n  }\n  function createMemoryLocation(to, state, key) {\n    if (state === void 0) {\n      state = null;\n    }\n    let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n    warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n    return location;\n  }\n  function createHref(to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  let history = {\n    get index() {\n      return index;\n    },\n    get action() {\n      return action;\n    },\n    get location() {\n      return getCurrentLocation();\n    },\n    createHref,\n    createURL(to) {\n      return new URL(createHref(to), \"http://localhost\");\n    },\n    encodeLocation(to) {\n      let path = typeof to === \"string\" ? parsePath(to) : to;\n      return {\n        pathname: path.pathname || \"\",\n        search: path.search || \"\",\n        hash: path.hash || \"\"\n      };\n    },\n    push(to, state) {\n      action = Action.Push;\n      let nextLocation = createMemoryLocation(to, state);\n      index += 1;\n      entries.splice(index, entries.length, nextLocation);\n      if (v5Compat && listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta: 1\n        });\n      }\n    },\n    replace(to, state) {\n      action = Action.Replace;\n      let nextLocation = createMemoryLocation(to, state);\n      entries[index] = nextLocation;\n      if (v5Compat && listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta: 0\n        });\n      }\n    },\n    go(delta) {\n      action = Action.Pop;\n      let nextIndex = clampIndex(index + delta);\n      let nextLocation = entries[nextIndex];\n      index = nextIndex;\n      if (listener) {\n        listener({\n          action,\n          location: nextLocation,\n          delta\n        });\n      }\n    },\n    listen(fn) {\n      listener = fn;\n      return () => {\n        listener = null;\n      };\n    }\n  };\n  return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  function createBrowserLocation(window, globalHistory) {\n    let {\n      pathname,\n      search,\n      hash\n    } = window.location;\n    return createLocation(\"\", {\n      pathname,\n      search,\n      hash\n    },\n    // state defaults to `null` because `window.history.state` does\n    globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n  }\n  function createBrowserHref(window, to) {\n    return typeof to === \"string\" ? to : createPath(to);\n  }\n  return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n  if (options === void 0) {\n    options = {};\n  }\n  function createHashLocation(window, globalHistory) {\n    let {\n      pathname = \"/\",\n      search = \"\",\n      hash = \"\"\n    } = parsePath(window.location.hash.substr(1));\n    // Hash URL should always have a leading / just like window.location.pathname\n    // does, so if an app ends up at a route like /#something then we add a\n    // leading slash so all of our path-matching behaves the same as if it would\n    // in a browser router.  This is particularly important when there exists a\n    // root splat route (<Route path=\"*\">) since that matches internally against\n    // \"/*\" and we'd expect /#something to 404 in a hash router app.\n    if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n      pathname = \"/\" + pathname;\n    }\n    return createLocation(\"\", {\n      pathname,\n      search,\n      hash\n    },\n    // state defaults to `null` because `window.history.state` does\n    globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n  }\n  function createHashHref(window, to) {\n    let base = window.document.querySelector(\"base\");\n    let href = \"\";\n    if (base && base.getAttribute(\"href\")) {\n      let url = window.location.href;\n      let hashIndex = url.indexOf(\"#\");\n      href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n    }\n    return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n  }\n  function validateHashLocation(location, to) {\n    warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n  }\n  return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n  if (value === false || value === null || typeof value === \"undefined\") {\n    throw new Error(message);\n  }\n}\nfunction warning(cond, message) {\n  if (!cond) {\n    // eslint-disable-next-line no-console\n    if (typeof console !== \"undefined\") console.warn(message);\n    try {\n      // Welcome to debugging history!\n      //\n      // This error is thrown as a convenience, so you can more easily\n      // find the source for a warning that appears in the console by\n      // enabling \"pause on exceptions\" in your JavaScript debugger.\n      throw new Error(message);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n  }\n}\nfunction createKey() {\n  return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n  return {\n    usr: location.state,\n    key: location.key,\n    idx: index\n  };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n  if (state === void 0) {\n    state = null;\n  }\n  let location = _extends({\n    pathname: typeof current === \"string\" ? current : current.pathname,\n    search: \"\",\n    hash: \"\"\n  }, typeof to === \"string\" ? parsePath(to) : to, {\n    state,\n    // TODO: This could be cleaned up.  push/replace should probably just take\n    // full Locations now and avoid the need to run through this flow at all\n    // But that's a pretty big refactor to the current test suite so going to\n    // keep as is for the time being and just let any incoming keys take precedence\n    key: to && to.key || key || createKey()\n  });\n  return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n  let {\n    pathname = \"/\",\n    search = \"\",\n    hash = \"\"\n  } = _ref;\n  if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n  if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n  return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n  let parsedPath = {};\n  if (path) {\n    let hashIndex = path.indexOf(\"#\");\n    if (hashIndex >= 0) {\n      parsedPath.hash = path.substr(hashIndex);\n      path = path.substr(0, hashIndex);\n    }\n    let searchIndex = path.indexOf(\"?\");\n    if (searchIndex >= 0) {\n      parsedPath.search = path.substr(searchIndex);\n      path = path.substr(0, searchIndex);\n    }\n    if (path) {\n      parsedPath.pathname = path;\n    }\n  }\n  return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n  if (options === void 0) {\n    options = {};\n  }\n  let {\n    window = document.defaultView,\n    v5Compat = false\n  } = options;\n  let globalHistory = window.history;\n  let action = Action.Pop;\n  let listener = null;\n  let index = getIndex();\n  // Index should only be null when we initialize. If not, it's because the\n  // user called history.pushState or history.replaceState directly, in which\n  // case we should log a warning as it will result in bugs.\n  if (index == null) {\n    index = 0;\n    globalHistory.replaceState(_extends({}, globalHistory.state, {\n      idx: index\n    }), \"\");\n  }\n  function getIndex() {\n    let state = globalHistory.state || {\n      idx: null\n    };\n    return state.idx;\n  }\n  function handlePop() {\n    action = Action.Pop;\n    let nextIndex = getIndex();\n    let delta = nextIndex == null ? null : nextIndex - index;\n    index = nextIndex;\n    if (listener) {\n      listener({\n        action,\n        location: history.location,\n        delta\n      });\n    }\n  }\n  function push(to, state) {\n    action = Action.Push;\n    let location = createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex() + 1;\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location);\n    // try...catch because iOS limits us to 100 pushState calls :/\n    try {\n      globalHistory.pushState(historyState, \"\", url);\n    } catch (error) {\n      // If the exception is because `state` can't be serialized, let that throw\n      // outwards just like a replace call would so the dev knows the cause\n      // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n      // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n      if (error instanceof DOMException && error.name === \"DataCloneError\") {\n        throw error;\n      }\n      // They are going to lose state here, but there is no real\n      // way to warn them about it since the page will refresh...\n      window.location.assign(url);\n    }\n    if (v5Compat && listener) {\n      listener({\n        action,\n        location: history.location,\n        delta: 1\n      });\n    }\n  }\n  function replace(to, state) {\n    action = Action.Replace;\n    let location = createLocation(history.location, to, state);\n    if (validateLocation) validateLocation(location, to);\n    index = getIndex();\n    let historyState = getHistoryState(location, index);\n    let url = history.createHref(location);\n    globalHistory.replaceState(historyState, \"\", url);\n    if (v5Compat && listener) {\n      listener({\n        action,\n        location: history.location,\n        delta: 0\n      });\n    }\n  }\n  function createURL(to) {\n    // window.location.origin is \"null\" (the literal string value) in Firefox\n    // under certain conditions, notably when serving from a local HTML file\n    // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n    let base = window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n    let href = typeof to === \"string\" ? to : createPath(to);\n    // Treating this as a full URL will strip any trailing spaces so we need to\n    // pre-encode them since they might be part of a matching splat param from\n    // an ancestor route\n    href = href.replace(/ $/, \"%20\");\n    invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n    return new URL(href, base);\n  }\n  let history = {\n    get action() {\n      return action;\n    },\n    get location() {\n      return getLocation(window, globalHistory);\n    },\n    listen(fn) {\n      if (listener) {\n        throw new Error(\"A history only accepts one active listener\");\n      }\n      window.addEventListener(PopStateEventType, handlePop);\n      listener = fn;\n      return () => {\n        window.removeEventListener(PopStateEventType, handlePop);\n        listener = null;\n      };\n    },\n    createHref(to) {\n      return createHref(window, to);\n    },\n    createURL,\n    encodeLocation(to) {\n      // Encode a Location the same way window.location would\n      let url = createURL(to);\n      return {\n        pathname: url.pathname,\n        search: url.search,\n        hash: url.hash\n      };\n    },\n    push,\n    replace,\n    go(n) {\n      return globalHistory.go(n);\n    }\n  };\n  return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n  ResultType[\"data\"] = \"data\";\n  ResultType[\"deferred\"] = \"deferred\";\n  ResultType[\"redirect\"] = \"redirect\";\n  ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set([\"lazy\", \"caseSensitive\", \"path\", \"id\", \"index\", \"children\"]);\nfunction isIndexRoute(route) {\n  return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n  if (parentPath === void 0) {\n    parentPath = [];\n  }\n  if (manifest === void 0) {\n    manifest = {};\n  }\n  return routes.map((route, index) => {\n    let treePath = [...parentPath, String(index)];\n    let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n    invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n    invariant(!manifest[id], \"Found a route id collision on id \\\"\" + id + \"\\\".  Route \" + \"id's must be globally unique within Data Router usages\");\n    if (isIndexRoute(route)) {\n      let indexRoute = _extends({}, route, mapRouteProperties(route), {\n        id\n      });\n      manifest[id] = indexRoute;\n      return indexRoute;\n    } else {\n      let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n        id,\n        children: undefined\n      });\n      manifest[id] = pathOrLayoutRoute;\n      if (route.children) {\n        pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n      }\n      return pathOrLayoutRoute;\n    }\n  });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/v6/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n  if (basename === void 0) {\n    basename = \"/\";\n  }\n  return matchRoutesImpl(routes, locationArg, basename, false);\n}\nfunction matchRoutesImpl(routes, locationArg, basename, allowPartial) {\n  let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n  let pathname = stripBasename(location.pathname || \"/\", basename);\n  if (pathname == null) {\n    return null;\n  }\n  let branches = flattenRoutes(routes);\n  rankRouteBranches(branches);\n  let matches = null;\n  for (let i = 0; matches == null && i < branches.length; ++i) {\n    // Incoming pathnames are generally encoded from either window.location\n    // or from router.navigate, but we want to match against the unencoded\n    // paths in the route definitions.  Memory router locations won't be\n    // encoded here but there also shouldn't be anything to decode so this\n    // should be a safe operation.  This avoids needing matchRoutes to be\n    // history-aware.\n    let decoded = decodePath(pathname);\n    matches = matchRouteBranch(branches[i], decoded, allowPartial);\n  }\n  return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n  let {\n    route,\n    pathname,\n    params\n  } = match;\n  return {\n    id: route.id,\n    pathname,\n    params,\n    data: loaderData[route.id],\n    handle: route.handle\n  };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n  if (branches === void 0) {\n    branches = [];\n  }\n  if (parentsMeta === void 0) {\n    parentsMeta = [];\n  }\n  if (parentPath === void 0) {\n    parentPath = \"\";\n  }\n  let flattenRoute = (route, index, relativePath) => {\n    let meta = {\n      relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n      caseSensitive: route.caseSensitive === true,\n      childrenIndex: index,\n      route\n    };\n    if (meta.relativePath.startsWith(\"/\")) {\n      invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n      meta.relativePath = meta.relativePath.slice(parentPath.length);\n    }\n    let path = joinPaths([parentPath, meta.relativePath]);\n    let routesMeta = parentsMeta.concat(meta);\n    // Add the children before adding this route to the array, so we traverse the\n    // route tree depth-first and child routes appear before their parents in\n    // the \"flattened\" version.\n    if (route.children && route.children.length > 0) {\n      invariant(\n      // Our types know better, but runtime JS may not!\n      // @ts-expect-error\n      route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n      flattenRoutes(route.children, branches, routesMeta, path);\n    }\n    // Routes without a path shouldn't ever match by themselves unless they are\n    // index routes, so don't add them to the list of possible branches.\n    if (route.path == null && !route.index) {\n      return;\n    }\n    branches.push({\n      path,\n      score: computeScore(path, route.index),\n      routesMeta\n    });\n  };\n  routes.forEach((route, index) => {\n    var _route$path;\n    // coarse-grain check for optional params\n    if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n      flattenRoute(route, index);\n    } else {\n      for (let exploded of explodeOptionalSegments(route.path)) {\n        flattenRoute(route, index, exploded);\n      }\n    }\n  });\n  return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n  let segments = path.split(\"/\");\n  if (segments.length === 0) return [];\n  let [first, ...rest] = segments;\n  // Optional path segments are denoted by a trailing `?`\n  let isOptional = first.endsWith(\"?\");\n  // Compute the corresponding required segment: `foo?` -> `foo`\n  let required = first.replace(/\\?$/, \"\");\n  if (rest.length === 0) {\n    // Intepret empty string as omitting an optional segment\n    // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n    return isOptional ? [required, \"\"] : [required];\n  }\n  let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n  let result = [];\n  // All child paths with the prefix.  Do this for all children before the\n  // optional version for all children, so we get consistent ordering where the\n  // parent optional aspect is preferred as required.  Otherwise, we can get\n  // child sections interspersed where deeper optional segments are higher than\n  // parent optional segments, where for example, /:two would explode _earlier_\n  // then /:one.  By always including the parent as required _for all children_\n  // first, we avoid this issue\n  result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\")));\n  // Then, if this is an optional value, add all child versions without\n  if (isOptional) {\n    result.push(...restExploded);\n  }\n  // for absolute paths, ensure `/` instead of empty segment\n  return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\nfunction rankRouteBranches(branches) {\n  branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n  : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:[\\w-]+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === \"*\";\nfunction computeScore(path, index) {\n  let segments = path.split(\"/\");\n  let initialScore = segments.length;\n  if (segments.some(isSplat)) {\n    initialScore += splatPenalty;\n  }\n  if (index) {\n    initialScore += indexRouteValue;\n  }\n  return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n  let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n  return siblings ?\n  // If two routes are siblings, we should try to match the earlier sibling\n  // first. This allows people to have fine-grained control over the matching\n  // behavior by simply putting routes with identical paths in the order they\n  // want them tried.\n  a[a.length - 1] - b[b.length - 1] :\n  // Otherwise, it doesn't really make sense to rank non-siblings by index,\n  // so they sort equally.\n  0;\n}\nfunction matchRouteBranch(branch, pathname, allowPartial) {\n  if (allowPartial === void 0) {\n    allowPartial = false;\n  }\n  let {\n    routesMeta\n  } = branch;\n  let matchedParams = {};\n  let matchedPathname = \"/\";\n  let matches = [];\n  for (let i = 0; i < routesMeta.length; ++i) {\n    let meta = routesMeta[i];\n    let end = i === routesMeta.length - 1;\n    let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n    let match = matchPath({\n      path: meta.relativePath,\n      caseSensitive: meta.caseSensitive,\n      end\n    }, remainingPathname);\n    let route = meta.route;\n    if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {\n      match = matchPath({\n        path: meta.relativePath,\n        caseSensitive: meta.caseSensitive,\n        end: false\n      }, remainingPathname);\n    }\n    if (!match) {\n      return null;\n    }\n    Object.assign(matchedParams, match.params);\n    matches.push({\n      // TODO: Can this as be avoided?\n      params: matchedParams,\n      pathname: joinPaths([matchedPathname, match.pathname]),\n      pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n      route\n    });\n    if (match.pathnameBase !== \"/\") {\n      matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n    }\n  }\n  return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/v6/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n  if (params === void 0) {\n    params = {};\n  }\n  let path = originalPath;\n  if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n    warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n    path = path.replace(/\\*$/, \"/*\");\n  }\n  // ensure `/` is added at the beginning if the path is absolute\n  const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n  const stringify = p => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n  const segments = path.split(/\\/+/).map((segment, index, array) => {\n    const isLastSegment = index === array.length - 1;\n    // only apply the splat if it's the last segment\n    if (isLastSegment && segment === \"*\") {\n      const star = \"*\";\n      // Apply the splat\n      return stringify(params[star]);\n    }\n    const keyMatch = segment.match(/^:([\\w-]+)(\\??)$/);\n    if (keyMatch) {\n      const [, key, optional] = keyMatch;\n      let param = params[key];\n      invariant(optional === \"?\" || param != null, \"Missing \\\":\" + key + \"\\\" param\");\n      return stringify(param);\n    }\n    // Remove any optional markers from optional static segments\n    return segment.replace(/\\?$/g, \"\");\n  })\n  // Remove empty segments\n  .filter(segment => !!segment);\n  return prefix + segments.join(\"/\");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/v6/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n  if (typeof pattern === \"string\") {\n    pattern = {\n      path: pattern,\n      caseSensitive: false,\n      end: true\n    };\n  }\n  let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n  let match = pathname.match(matcher);\n  if (!match) return null;\n  let matchedPathname = match[0];\n  let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n  let captureGroups = match.slice(1);\n  let params = compiledParams.reduce((memo, _ref, index) => {\n    let {\n      paramName,\n      isOptional\n    } = _ref;\n    // We need to compute the pathnameBase here using the raw splat value\n    // instead of using params[\"*\"] later because it will be decoded then\n    if (paramName === \"*\") {\n      let splatValue = captureGroups[index] || \"\";\n      pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n    }\n    const value = captureGroups[index];\n    if (isOptional && !value) {\n      memo[paramName] = undefined;\n    } else {\n      memo[paramName] = (value || \"\").replace(/%2F/g, \"/\");\n    }\n    return memo;\n  }, {});\n  return {\n    params,\n    pathname: matchedPathname,\n    pathnameBase,\n    pattern\n  };\n}\nfunction compilePath(path, caseSensitive, end) {\n  if (caseSensitive === void 0) {\n    caseSensitive = false;\n  }\n  if (end === void 0) {\n    end = true;\n  }\n  warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n  let params = [];\n  let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n  .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n  .replace(/[\\\\.*+^${}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n  .replace(/\\/:([\\w-]+)(\\?)?/g, (_, paramName, isOptional) => {\n    params.push({\n      paramName,\n      isOptional: isOptional != null\n    });\n    return isOptional ? \"/?([^\\\\/]+)?\" : \"/([^\\\\/]+)\";\n  });\n  if (path.endsWith(\"*\")) {\n    params.push({\n      paramName: \"*\"\n    });\n    regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n    : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n  } else if (end) {\n    // When matching to the end, ignore trailing slashes\n    regexpSource += \"\\\\/*$\";\n  } else if (path !== \"\" && path !== \"/\") {\n    // If our path is non-empty and contains anything beyond an initial slash,\n    // then we have _some_ form of path in our regex, so we should expect to\n    // match only if we find the end of this path segment.  Look for an optional\n    // non-captured trailing slash (to match a portion of the URL) or the end\n    // of the path (if we've matched to the end).  We used to do this with a\n    // word boundary but that gives false positives on routes like\n    // /user-preferences since `-` counts as a word boundary.\n    regexpSource += \"(?:(?=\\\\/|$))\";\n  } else ;\n  let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n  return [matcher, params];\n}\nfunction decodePath(value) {\n  try {\n    return value.split(\"/\").map(v => decodeURIComponent(v).replace(/\\//g, \"%2F\")).join(\"/\");\n  } catch (error) {\n    warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n    return value;\n  }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n  if (basename === \"/\") return pathname;\n  if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n    return null;\n  }\n  // We want to leave trailing slash behavior in the user's control, so if they\n  // specify a basename with a trailing slash, we should support it\n  let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n  let nextChar = pathname.charAt(startIndex);\n  if (nextChar && nextChar !== \"/\") {\n    // pathname does not start with basename/\n    return null;\n  }\n  return pathname.slice(startIndex) || \"/\";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/v6/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n  if (fromPathname === void 0) {\n    fromPathname = \"/\";\n  }\n  let {\n    pathname: toPathname,\n    search = \"\",\n    hash = \"\"\n  } = typeof to === \"string\" ? parsePath(to) : to;\n  let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n  return {\n    pathname,\n    search: normalizeSearch(search),\n    hash: normalizeHash(hash)\n  };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n  let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n  let relativeSegments = relativePath.split(\"/\");\n  relativeSegments.forEach(segment => {\n    if (segment === \"..\") {\n      // Keep the root \"\" segment so the pathname starts at /\n      if (segments.length > 1) segments.pop();\n    } else if (segment !== \".\") {\n      segments.push(segment);\n    }\n  });\n  return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n  return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"].  Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in <Link to=\\\"...\\\"> and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same.  Both of the following examples should link back to the root:\n *\n *   <Route path=\"/\">\n *     <Route path=\"accounts\" element={<Link to=\"..\"}>\n *   </Route>\n *\n *   <Route path=\"/\">\n *     <Route path=\"accounts\">\n *       <Route element={<AccountsLayout />}>       // <-- Does not contribute\n *         <Route index element={<Link to=\"..\"} />  // <-- Does not contribute\n *       </Route\n *     </Route>\n *   </Route>\n */\nfunction getPathContributingMatches(matches) {\n  return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n// Return the array of pathnames for the current route matches - used to\n// generate the routePathnames input for resolveTo()\nfunction getResolveToMatches(matches, v7_relativeSplatPath) {\n  let pathMatches = getPathContributingMatches(matches);\n  // When v7_relativeSplatPath is enabled, use the full pathname for the leaf\n  // match so we include splat values for \".\" links.  See:\n  // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329\n  if (v7_relativeSplatPath) {\n    return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);\n  }\n  return pathMatches.map(match => match.pathnameBase);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n  if (isPathRelative === void 0) {\n    isPathRelative = false;\n  }\n  let to;\n  if (typeof toArg === \"string\") {\n    to = parsePath(toArg);\n  } else {\n    to = _extends({}, toArg);\n    invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n    invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n    invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n  }\n  let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n  let toPathname = isEmptyPath ? \"/\" : to.pathname;\n  let from;\n  // Routing is relative to the current pathname if explicitly requested.\n  //\n  // If a pathname is explicitly provided in `to`, it should be relative to the\n  // route context. This is explained in `Note on `<Link to>` values` in our\n  // migration guide from v5 as a means of disambiguation between `to` values\n  // that begin with `/` and those that do not. However, this is problematic for\n  // `to` values that do not provide a pathname. `to` can simply be a search or\n  // hash string, in which case we should assume that the navigation is relative\n  // to the current location's pathname and *not* the route pathname.\n  if (toPathname == null) {\n    from = locationPathname;\n  } else {\n    let routePathnameIndex = routePathnames.length - 1;\n    // With relative=\"route\" (the default), each leading .. segment means\n    // \"go up one route\" instead of \"go up one URL segment\".  This is a key\n    // difference from how <a href> works and a major reason we call this a\n    // \"to\" value instead of a \"href\".\n    if (!isPathRelative && toPathname.startsWith(\"..\")) {\n      let toSegments = toPathname.split(\"/\");\n      while (toSegments[0] === \"..\") {\n        toSegments.shift();\n        routePathnameIndex -= 1;\n      }\n      to.pathname = toSegments.join(\"/\");\n    }\n    from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n  }\n  let path = resolvePath(to, from);\n  // Ensure the pathname has a trailing slash if the original \"to\" had one\n  let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n  // Or if this was a link to the current path which has a trailing slash\n  let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n  if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n    path.pathname += \"/\";\n  }\n  return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n  // Empty strings should be treated the same as / paths\n  return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n *\n * @deprecated The `json` method is deprecated in favor of returning raw objects.\n * This method will be removed in v7.\n */\nconst json = function json(data, init) {\n  if (init === void 0) {\n    init = {};\n  }\n  let responseInit = typeof init === \"number\" ? {\n    status: init\n  } : init;\n  let headers = new Headers(responseInit.headers);\n  if (!headers.has(\"Content-Type\")) {\n    headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n  }\n  return new Response(JSON.stringify(data), _extends({}, responseInit, {\n    headers\n  }));\n};\nclass DataWithResponseInit {\n  constructor(data, init) {\n    this.type = \"DataWithResponseInit\";\n    this.data = data;\n    this.init = init || null;\n  }\n}\n/**\n * Create \"responses\" that contain `status`/`headers` without forcing\n * serialization into an actual `Response` - used by Remix single fetch\n */\nfunction data(data, init) {\n  return new DataWithResponseInit(data, typeof init === \"number\" ? {\n    status: init\n  } : init);\n}\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n  constructor(data, responseInit) {\n    this.pendingKeysSet = new Set();\n    this.subscribers = new Set();\n    this.deferredKeys = [];\n    invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\");\n    // Set up an AbortController + Promise we can race against to exit early\n    // cancellation\n    let reject;\n    this.abortPromise = new Promise((_, r) => reject = r);\n    this.controller = new AbortController();\n    let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n    this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n    this.controller.signal.addEventListener(\"abort\", onAbort);\n    this.data = Object.entries(data).reduce((acc, _ref2) => {\n      let [key, value] = _ref2;\n      return Object.assign(acc, {\n        [key]: this.trackPromise(key, value)\n      });\n    }, {});\n    if (this.done) {\n      // All incoming values were resolved\n      this.unlistenAbortSignal();\n    }\n    this.init = responseInit;\n  }\n  trackPromise(key, value) {\n    if (!(value instanceof Promise)) {\n      return value;\n    }\n    this.deferredKeys.push(key);\n    this.pendingKeysSet.add(key);\n    // We store a little wrapper promise that will be extended with\n    // _data/_error props upon resolve/reject\n    let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n    // Register rejection listeners to avoid uncaught promise rejections on\n    // errors or aborted deferred values\n    promise.catch(() => {});\n    Object.defineProperty(promise, \"_tracked\", {\n      get: () => true\n    });\n    return promise;\n  }\n  onSettle(promise, key, error, data) {\n    if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n      this.unlistenAbortSignal();\n      Object.defineProperty(promise, \"_error\", {\n        get: () => error\n      });\n      return Promise.reject(error);\n    }\n    this.pendingKeysSet.delete(key);\n    if (this.done) {\n      // Nothing left to abort!\n      this.unlistenAbortSignal();\n    }\n    // If the promise was resolved/rejected with undefined, we'll throw an error as you\n    // should always resolve with a value or null\n    if (error === undefined && data === undefined) {\n      let undefinedError = new Error(\"Deferred data for key \\\"\" + key + \"\\\" resolved/rejected with `undefined`, \" + \"you must resolve/reject with a value or `null`.\");\n      Object.defineProperty(promise, \"_error\", {\n        get: () => undefinedError\n      });\n      this.emit(false, key);\n      return Promise.reject(undefinedError);\n    }\n    if (data === undefined) {\n      Object.defineProperty(promise, \"_error\", {\n        get: () => error\n      });\n      this.emit(false, key);\n      return Promise.reject(error);\n    }\n    Object.defineProperty(promise, \"_data\", {\n      get: () => data\n    });\n    this.emit(false, key);\n    return data;\n  }\n  emit(aborted, settledKey) {\n    this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n  }\n  subscribe(fn) {\n    this.subscribers.add(fn);\n    return () => this.subscribers.delete(fn);\n  }\n  cancel() {\n    this.controller.abort();\n    this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n    this.emit(true);\n  }\n  async resolveData(signal) {\n    let aborted = false;\n    if (!this.done) {\n      let onAbort = () => this.cancel();\n      signal.addEventListener(\"abort\", onAbort);\n      aborted = await new Promise(resolve => {\n        this.subscribe(aborted => {\n          signal.removeEventListener(\"abort\", onAbort);\n          if (aborted || this.done) {\n            resolve(aborted);\n          }\n        });\n      });\n    }\n    return aborted;\n  }\n  get done() {\n    return this.pendingKeysSet.size === 0;\n  }\n  get unwrappedData() {\n    invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n    return Object.entries(this.data).reduce((acc, _ref3) => {\n      let [key, value] = _ref3;\n      return Object.assign(acc, {\n        [key]: unwrapTrackedPromise(value)\n      });\n    }, {});\n  }\n  get pendingKeys() {\n    return Array.from(this.pendingKeysSet);\n  }\n}\nfunction isTrackedPromise(value) {\n  return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n  if (!isTrackedPromise(value)) {\n    return value;\n  }\n  if (value._error) {\n    throw value._error;\n  }\n  return value._data;\n}\n/**\n * @deprecated The `defer` method is deprecated in favor of returning raw\n * objects. This method will be removed in v7.\n */\nconst defer = function defer(data, init) {\n  if (init === void 0) {\n    init = {};\n  }\n  let responseInit = typeof init === \"number\" ? {\n    status: init\n  } : init;\n  return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirect = function redirect(url, init) {\n  if (init === void 0) {\n    init = 302;\n  }\n  let responseInit = init;\n  if (typeof responseInit === \"number\") {\n    responseInit = {\n      status: responseInit\n    };\n  } else if (typeof responseInit.status === \"undefined\") {\n    responseInit.status = 302;\n  }\n  let headers = new Headers(responseInit.headers);\n  headers.set(\"Location\", url);\n  return new Response(null, _extends({}, responseInit, {\n    headers\n  }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirectDocument = (url, init) => {\n  let response = redirect(url, init);\n  response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n  return response;\n};\n/**\n * A redirect response that will perform a `history.replaceState` instead of a\n * `history.pushState` for client-side navigation redirects.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst replace = (url, init) => {\n  let response = redirect(url, init);\n  response.headers.set(\"X-Remix-Replace\", \"true\");\n  return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n *\n * We don't export the class for public use since it's an implementation\n * detail, but we export the interface above so folks can build their own\n * abstractions around instances via isRouteErrorResponse()\n */\nclass ErrorResponseImpl {\n  constructor(status, statusText, data, internal) {\n    if (internal === void 0) {\n      internal = false;\n    }\n    this.status = status;\n    this.statusText = statusText || \"\";\n    this.internal = internal;\n    if (data instanceof Error) {\n      this.data = data.toString();\n      this.error = data;\n    } else {\n      this.data = data;\n    }\n  }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n  return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n  state: \"idle\",\n  location: undefined,\n  formMethod: undefined,\n  formAction: undefined,\n  formEncType: undefined,\n  formData: undefined,\n  json: undefined,\n  text: undefined\n};\nconst IDLE_FETCHER = {\n  state: \"idle\",\n  data: undefined,\n  formMethod: undefined,\n  formAction: undefined,\n  formEncType: undefined,\n  formData: undefined,\n  json: undefined,\n  text: undefined\n};\nconst IDLE_BLOCKER = {\n  state: \"unblocked\",\n  proceed: undefined,\n  reset: undefined,\n  location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n  hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\nconst TRANSITIONS_STORAGE_KEY = \"remix-router-transitions\";\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n  const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : undefined;\n  const isBrowser = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n  const isServer = !isBrowser;\n  invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n  let mapRouteProperties;\n  if (init.mapRouteProperties) {\n    mapRouteProperties = init.mapRouteProperties;\n  } else if (init.detectErrorBoundary) {\n    // If they are still using the deprecated version, wrap it with the new API\n    let detectErrorBoundary = init.detectErrorBoundary;\n    mapRouteProperties = route => ({\n      hasErrorBoundary: detectErrorBoundary(route)\n    });\n  } else {\n    mapRouteProperties = defaultMapRouteProperties;\n  }\n  // Routes keyed by ID\n  let manifest = {};\n  // Routes in tree format for matching\n  let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n  let inFlightDataRoutes;\n  let basename = init.basename || \"/\";\n  let dataStrategyImpl = init.dataStrategy || defaultDataStrategy;\n  let patchRoutesOnNavigationImpl = init.patchRoutesOnNavigation;\n  // Config driven behavior flags\n  let future = _extends({\n    v7_fetcherPersist: false,\n    v7_normalizeFormMethod: false,\n    v7_partialHydration: false,\n    v7_prependBasename: false,\n    v7_relativeSplatPath: false,\n    v7_skipActionErrorRevalidation: false\n  }, init.future);\n  // Cleanup function for history\n  let unlistenHistory = null;\n  // Externally-provided functions to call on all state changes\n  let subscribers = new Set();\n  // Externally-provided object to hold scroll restoration locations during routing\n  let savedScrollPositions = null;\n  // Externally-provided function to get scroll restoration keys\n  let getScrollRestorationKey = null;\n  // Externally-provided function to get current scroll position\n  let getScrollPosition = null;\n  // One-time flag to control the initial hydration scroll restoration.  Because\n  // we don't get the saved positions from <ScrollRestoration /> until _after_\n  // the initial render, we need to manually trigger a separate updateState to\n  // send along the restoreScrollPosition\n  // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n  // SSR did the initial scroll restoration.\n  let initialScrollRestored = init.hydrationData != null;\n  let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n  let initialMatchesIsFOW = false;\n  let initialErrors = null;\n  if (initialMatches == null && !patchRoutesOnNavigationImpl) {\n    // If we do not match a user-provided-route, fall back to the root\n    // to allow the error boundary to take over\n    let error = getInternalRouterError(404, {\n      pathname: init.history.location.pathname\n    });\n    let {\n      matches,\n      route\n    } = getShortCircuitMatches(dataRoutes);\n    initialMatches = matches;\n    initialErrors = {\n      [route.id]: error\n    };\n  }\n  // In SPA apps, if the user provided a patchRoutesOnNavigation implementation and\n  // our initial match is a splat route, clear them out so we run through lazy\n  // discovery on hydration in case there's a more accurate lazy route match.\n  // In SSR apps (with `hydrationData`), we expect that the server will send\n  // up the proper matched routes so we don't want to run lazy discovery on\n  // initial hydration and want to hydrate into the splat route.\n  if (initialMatches && !init.hydrationData) {\n    let fogOfWar = checkFogOfWar(initialMatches, dataRoutes, init.history.location.pathname);\n    if (fogOfWar.active) {\n      initialMatches = null;\n    }\n  }\n  let initialized;\n  if (!initialMatches) {\n    initialized = false;\n    initialMatches = [];\n    // If partial hydration and fog of war is enabled, we will be running\n    // `patchRoutesOnNavigation` during hydration so include any partial matches as\n    // the initial matches so we can properly render `HydrateFallback`'s\n    if (future.v7_partialHydration) {\n      let fogOfWar = checkFogOfWar(null, dataRoutes, init.history.location.pathname);\n      if (fogOfWar.active && fogOfWar.matches) {\n        initialMatchesIsFOW = true;\n        initialMatches = fogOfWar.matches;\n      }\n    }\n  } else if (initialMatches.some(m => m.route.lazy)) {\n    // All initialMatches need to be loaded before we're ready.  If we have lazy\n    // functions around still then we'll need to run them in initialize()\n    initialized = false;\n  } else if (!initialMatches.some(m => m.route.loader)) {\n    // If we've got no loaders to run, then we're good to go\n    initialized = true;\n  } else if (future.v7_partialHydration) {\n    // If partial hydration is enabled, we're initialized so long as we were\n    // provided with hydrationData for every route with a loader, and no loaders\n    // were marked for explicit hydration\n    let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;\n    let errors = init.hydrationData ? init.hydrationData.errors : null;\n    // If errors exist, don't consider routes below the boundary\n    if (errors) {\n      let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);\n      initialized = initialMatches.slice(0, idx + 1).every(m => !shouldLoadRouteOnHydration(m.route, loaderData, errors));\n    } else {\n      initialized = initialMatches.every(m => !shouldLoadRouteOnHydration(m.route, loaderData, errors));\n    }\n  } else {\n    // Without partial hydration - we're initialized if we were provided any\n    // hydrationData - which is expected to be complete\n    initialized = init.hydrationData != null;\n  }\n  let router;\n  let state = {\n    historyAction: init.history.action,\n    location: init.history.location,\n    matches: initialMatches,\n    initialized,\n    navigation: IDLE_NAVIGATION,\n    // Don't restore on initial updateState() if we were SSR'd\n    restoreScrollPosition: init.hydrationData != null ? false : null,\n    preventScrollReset: false,\n    revalidation: \"idle\",\n    loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n    actionData: init.hydrationData && init.hydrationData.actionData || null,\n    errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n    fetchers: new Map(),\n    blockers: new Map()\n  };\n  // -- Stateful internal variables to manage navigations --\n  // Current navigation in progress (to be committed in completeNavigation)\n  let pendingAction = Action.Pop;\n  // Should the current navigation prevent the scroll reset if scroll cannot\n  // be restored?\n  let pendingPreventScrollReset = false;\n  // AbortController for the active navigation\n  let pendingNavigationController;\n  // Should the current navigation enable document.startViewTransition?\n  let pendingViewTransitionEnabled = false;\n  // Store applied view transitions so we can apply them on POP\n  let appliedViewTransitions = new Map();\n  // Cleanup function for persisting applied transitions to sessionStorage\n  let removePageHideEventListener = null;\n  // We use this to avoid touching history in completeNavigation if a\n  // revalidation is entirely uninterrupted\n  let isUninterruptedRevalidation = false;\n  // Use this internal flag to force revalidation of all loaders:\n  //  - submissions (completed or interrupted)\n  //  - useRevalidator()\n  //  - X-Remix-Revalidate (from redirect)\n  let isRevalidationRequired = false;\n  // Use this internal array to capture routes that require revalidation due\n  // to a cancelled deferred on action submission\n  let cancelledDeferredRoutes = [];\n  // Use this internal array to capture fetcher loads that were cancelled by an\n  // action navigation and require revalidation\n  let cancelledFetcherLoads = new Set();\n  // AbortControllers for any in-flight fetchers\n  let fetchControllers = new Map();\n  // Track loads based on the order in which they started\n  let incrementingLoadId = 0;\n  // Track the outstanding pending navigation data load to be compared against\n  // the globally incrementing load when a fetcher load lands after a completed\n  // navigation\n  let pendingNavigationLoadId = -1;\n  // Fetchers that triggered data reloads as a result of their actions\n  let fetchReloadIds = new Map();\n  // Fetchers that triggered redirect navigations\n  let fetchRedirectIds = new Set();\n  // Most recent href/match for fetcher.load calls for fetchers\n  let fetchLoadMatches = new Map();\n  // Ref-count mounted fetchers so we know when it's ok to clean them up\n  let activeFetchers = new Map();\n  // Fetchers that have requested a delete when using v7_fetcherPersist,\n  // they'll be officially removed after they return to idle\n  let deletedFetchers = new Set();\n  // Store DeferredData instances for active route matches.  When a\n  // route loader returns defer() we stick one in here.  Then, when a nested\n  // promise resolves we update loaderData.  If a new navigation starts we\n  // cancel active deferreds for eliminated routes.\n  let activeDeferreds = new Map();\n  // Store blocker functions in a separate Map outside of router state since\n  // we don't need to update UI state if they change\n  let blockerFunctions = new Map();\n  // Flag to ignore the next history update, so we can revert the URL change on\n  // a POP navigation that was blocked by the user without touching router state\n  let unblockBlockerHistoryUpdate = undefined;\n  // Initialize the router, all side effects should be kicked off from here.\n  // Implemented as a Fluent API for ease of:\n  //   let router = createRouter(init).initialize();\n  function initialize() {\n    // If history informs us of a POP navigation, start the navigation but do not update\n    // state.  We'll update our own state once the navigation completes\n    unlistenHistory = init.history.listen(_ref => {\n      let {\n        action: historyAction,\n        location,\n        delta\n      } = _ref;\n      // Ignore this event if it was just us resetting the URL from a\n      // blocked POP navigation\n      if (unblockBlockerHistoryUpdate) {\n        unblockBlockerHistoryUpdate();\n        unblockBlockerHistoryUpdate = undefined;\n        return;\n      }\n      warning(blockerFunctions.size === 0 || delta != null, \"You are trying to use a blocker on a POP navigation to a location \" + \"that was not created by @remix-run/router. This will fail silently in \" + \"production. This can happen if you are navigating outside the router \" + \"via `window.history.pushState`/`window.location.hash` instead of using \" + \"router navigation APIs.  This can also happen if you are using \" + \"createHashRouter and the user manually changes the URL.\");\n      let blockerKey = shouldBlockNavigation({\n        currentLocation: state.location,\n        nextLocation: location,\n        historyAction\n      });\n      if (blockerKey && delta != null) {\n        // Restore the URL to match the current UI, but don't update router state\n        let nextHistoryUpdatePromise = new Promise(resolve => {\n          unblockBlockerHistoryUpdate = resolve;\n        });\n        init.history.go(delta * -1);\n        // Put the blocker into a blocked state\n        updateBlocker(blockerKey, {\n          state: \"blocked\",\n          location,\n          proceed() {\n            updateBlocker(blockerKey, {\n              state: \"proceeding\",\n              proceed: undefined,\n              reset: undefined,\n              location\n            });\n            // Re-do the same POP navigation we just blocked, after the url\n            // restoration is also complete.  See:\n            // https://github.com/remix-run/react-router/issues/11613\n            nextHistoryUpdatePromise.then(() => init.history.go(delta));\n          },\n          reset() {\n            let blockers = new Map(state.blockers);\n            blockers.set(blockerKey, IDLE_BLOCKER);\n            updateState({\n              blockers\n            });\n          }\n        });\n        return;\n      }\n      return startNavigation(historyAction, location);\n    });\n    if (isBrowser) {\n      // FIXME: This feels gross.  How can we cleanup the lines between\n      // scrollRestoration/appliedTransitions persistance?\n      restoreAppliedTransitions(routerWindow, appliedViewTransitions);\n      let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);\n      routerWindow.addEventListener(\"pagehide\", _saveAppliedTransitions);\n      removePageHideEventListener = () => routerWindow.removeEventListener(\"pagehide\", _saveAppliedTransitions);\n    }\n    // Kick off initial data load if needed.  Use Pop to avoid modifying history\n    // Note we don't do any handling of lazy here.  For SPA's it'll get handled\n    // in the normal navigation flow.  For SSR it's expected that lazy modules are\n    // resolved prior to router creation since we can't go into a fallbackElement\n    // UI for SSR'd apps\n    if (!state.initialized) {\n      startNavigation(Action.Pop, state.location, {\n        initialHydration: true\n      });\n    }\n    return router;\n  }\n  // Clean up a router and it's side effects\n  function dispose() {\n    if (unlistenHistory) {\n      unlistenHistory();\n    }\n    if (removePageHideEventListener) {\n      removePageHideEventListener();\n    }\n    subscribers.clear();\n    pendingNavigationController && pendingNavigationController.abort();\n    state.fetchers.forEach((_, key) => deleteFetcher(key));\n    state.blockers.forEach((_, key) => deleteBlocker(key));\n  }\n  // Subscribe to state updates for the router\n  function subscribe(fn) {\n    subscribers.add(fn);\n    return () => subscribers.delete(fn);\n  }\n  // Update our state and notify the calling context of the change\n  function updateState(newState, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    state = _extends({}, state, newState);\n    // Prep fetcher cleanup so we can tell the UI which fetcher data entries\n    // can be removed\n    let completedFetchers = [];\n    let deletedFetchersKeys = [];\n    if (future.v7_fetcherPersist) {\n      state.fetchers.forEach((fetcher, key) => {\n        if (fetcher.state === \"idle\") {\n          if (deletedFetchers.has(key)) {\n            // Unmounted from the UI and can be totally removed\n            deletedFetchersKeys.push(key);\n          } else {\n            // Returned to idle but still mounted in the UI, so semi-remains for\n            // revalidations and such\n            completedFetchers.push(key);\n          }\n        }\n      });\n    }\n    // Remove any lingering deleted fetchers that have already been removed\n    // from state.fetchers\n    deletedFetchers.forEach(key => {\n      if (!state.fetchers.has(key) && !fetchControllers.has(key)) {\n        deletedFetchersKeys.push(key);\n      }\n    });\n    // Iterate over a local copy so that if flushSync is used and we end up\n    // removing and adding a new subscriber due to the useCallback dependencies,\n    // we don't get ourselves into a loop calling the new subscriber immediately\n    [...subscribers].forEach(subscriber => subscriber(state, {\n      deletedFetchers: deletedFetchersKeys,\n      viewTransitionOpts: opts.viewTransitionOpts,\n      flushSync: opts.flushSync === true\n    }));\n    // Remove idle fetchers from state since we only care about in-flight fetchers.\n    if (future.v7_fetcherPersist) {\n      completedFetchers.forEach(key => state.fetchers.delete(key));\n      deletedFetchersKeys.forEach(key => deleteFetcher(key));\n    } else {\n      // We already called deleteFetcher() on these, can remove them from this\n      // Set now that we've handed the keys off to the data layer\n      deletedFetchersKeys.forEach(key => deletedFetchers.delete(key));\n    }\n  }\n  // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n  // and setting state.[historyAction/location/matches] to the new route.\n  // - Location is a required param\n  // - Navigation will always be set to IDLE_NAVIGATION\n  // - Can pass any other state in newState\n  function completeNavigation(location, newState, _temp) {\n    var _location$state, _location$state2;\n    let {\n      flushSync\n    } = _temp === void 0 ? {} : _temp;\n    // Deduce if we're in a loading/actionReload state:\n    // - We have committed actionData in the store\n    // - The current navigation was a mutation submission\n    // - We're past the submitting state and into the loading state\n    // - The location being loaded is not the result of a redirect\n    let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n    let actionData;\n    if (newState.actionData) {\n      if (Object.keys(newState.actionData).length > 0) {\n        actionData = newState.actionData;\n      } else {\n        // Empty actionData -> clear prior actionData due to an action error\n        actionData = null;\n      }\n    } else if (isActionReload) {\n      // Keep the current data if we're wrapping up the action reload\n      actionData = state.actionData;\n    } else {\n      // Clear actionData on any other completed navigations\n      actionData = null;\n    }\n    // Always preserve any existing loaderData from re-used routes\n    let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n    // On a successful navigation we can assume we got through all blockers\n    // so we can start fresh\n    let blockers = state.blockers;\n    if (blockers.size > 0) {\n      blockers = new Map(blockers);\n      blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n    }\n    // Always respect the user flag.  Otherwise don't reset on mutation\n    // submission navigations unless they redirect\n    let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n    // Commit any in-flight routes at the end of the HMR revalidation \"navigation\"\n    if (inFlightDataRoutes) {\n      dataRoutes = inFlightDataRoutes;\n      inFlightDataRoutes = undefined;\n    }\n    if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n      init.history.push(location, location.state);\n    } else if (pendingAction === Action.Replace) {\n      init.history.replace(location, location.state);\n    }\n    let viewTransitionOpts;\n    // On POP, enable transitions if they were enabled on the original navigation\n    if (pendingAction === Action.Pop) {\n      // Forward takes precedence so they behave like the original navigation\n      let priorPaths = appliedViewTransitions.get(state.location.pathname);\n      if (priorPaths && priorPaths.has(location.pathname)) {\n        viewTransitionOpts = {\n          currentLocation: state.location,\n          nextLocation: location\n        };\n      } else if (appliedViewTransitions.has(location.pathname)) {\n        // If we don't have a previous forward nav, assume we're popping back to\n        // the new location and enable if that location previously enabled\n        viewTransitionOpts = {\n          currentLocation: location,\n          nextLocation: state.location\n        };\n      }\n    } else if (pendingViewTransitionEnabled) {\n      // Store the applied transition on PUSH/REPLACE\n      let toPaths = appliedViewTransitions.get(state.location.pathname);\n      if (toPaths) {\n        toPaths.add(location.pathname);\n      } else {\n        toPaths = new Set([location.pathname]);\n        appliedViewTransitions.set(state.location.pathname, toPaths);\n      }\n      viewTransitionOpts = {\n        currentLocation: state.location,\n        nextLocation: location\n      };\n    }\n    updateState(_extends({}, newState, {\n      actionData,\n      loaderData,\n      historyAction: pendingAction,\n      location,\n      initialized: true,\n      navigation: IDLE_NAVIGATION,\n      revalidation: \"idle\",\n      restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n      preventScrollReset,\n      blockers\n    }), {\n      viewTransitionOpts,\n      flushSync: flushSync === true\n    });\n    // Reset stateful navigation vars\n    pendingAction = Action.Pop;\n    pendingPreventScrollReset = false;\n    pendingViewTransitionEnabled = false;\n    isUninterruptedRevalidation = false;\n    isRevalidationRequired = false;\n    cancelledDeferredRoutes = [];\n  }\n  // Trigger a navigation event, which can either be a numerical POP or a PUSH\n  // replace with an optional submission\n  async function navigate(to, opts) {\n    if (typeof to === \"number\") {\n      init.history.go(to);\n      return;\n    }\n    let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n    let {\n      path,\n      submission,\n      error\n    } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n    let currentLocation = state.location;\n    let nextLocation = createLocation(state.location, path, opts && opts.state);\n    // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n    // URL from window.location, so we need to encode it here so the behavior\n    // remains the same as POP and non-data-router usages.  new URL() does all\n    // the same encoding we'd get from a history.pushState/window.location read\n    // without having to touch history\n    nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n    let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n    let historyAction = Action.Push;\n    if (userReplace === true) {\n      historyAction = Action.Replace;\n    } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n      // By default on submissions to the current location we REPLACE so that\n      // users don't have to double-click the back button to get to the prior\n      // location.  If the user redirects to a different location from the\n      // action/loader this will be ignored and the redirect will be a PUSH\n      historyAction = Action.Replace;\n    }\n    let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n    let flushSync = (opts && opts.flushSync) === true;\n    let blockerKey = shouldBlockNavigation({\n      currentLocation,\n      nextLocation,\n      historyAction\n    });\n    if (blockerKey) {\n      // Put the blocker into a blocked state\n      updateBlocker(blockerKey, {\n        state: \"blocked\",\n        location: nextLocation,\n        proceed() {\n          updateBlocker(blockerKey, {\n            state: \"proceeding\",\n            proceed: undefined,\n            reset: undefined,\n            location: nextLocation\n          });\n          // Send the same navigation through\n          navigate(to, opts);\n        },\n        reset() {\n          let blockers = new Map(state.blockers);\n          blockers.set(blockerKey, IDLE_BLOCKER);\n          updateState({\n            blockers\n          });\n        }\n      });\n      return;\n    }\n    return await startNavigation(historyAction, nextLocation, {\n      submission,\n      // Send through the formData serialization error if we have one so we can\n      // render at the right error boundary after we match routes\n      pendingError: error,\n      preventScrollReset,\n      replace: opts && opts.replace,\n      enableViewTransition: opts && opts.viewTransition,\n      flushSync\n    });\n  }\n  // Revalidate all current loaders.  If a navigation is in progress or if this\n  // is interrupted by a navigation, allow this to \"succeed\" by calling all\n  // loaders during the next loader round\n  function revalidate() {\n    interruptActiveLoads();\n    updateState({\n      revalidation: \"loading\"\n    });\n    // If we're currently submitting an action, we don't need to start a new\n    // navigation, we'll just let the follow up loader execution call all loaders\n    if (state.navigation.state === \"submitting\") {\n      return;\n    }\n    // If we're currently in an idle state, start a new navigation for the current\n    // action/location and mark it as uninterrupted, which will skip the history\n    // update in completeNavigation\n    if (state.navigation.state === \"idle\") {\n      startNavigation(state.historyAction, state.location, {\n        startUninterruptedRevalidation: true\n      });\n      return;\n    }\n    // Otherwise, if we're currently in a loading state, just start a new\n    // navigation to the navigation.location but do not trigger an uninterrupted\n    // revalidation so that history correctly updates once the navigation completes\n    startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n      overrideNavigation: state.navigation,\n      // Proxy through any rending view transition\n      enableViewTransition: pendingViewTransitionEnabled === true\n    });\n  }\n  // Start a navigation to the given action/location.  Can optionally provide a\n  // overrideNavigation which will override the normalLoad in the case of a redirect\n  // navigation\n  async function startNavigation(historyAction, location, opts) {\n    // Abort any in-progress navigations and start a new one. Unset any ongoing\n    // uninterrupted revalidations unless told otherwise, since we want this\n    // new navigation to update history normally\n    pendingNavigationController && pendingNavigationController.abort();\n    pendingNavigationController = null;\n    pendingAction = historyAction;\n    isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n    // Save the current scroll position every time we start a new navigation,\n    // and track whether we should reset scroll on completion\n    saveScrollPosition(state.location, state.matches);\n    pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n    pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let loadingNavigation = opts && opts.overrideNavigation;\n    let matches = opts != null && opts.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ?\n    // `matchRoutes()` has already been called if we're in here via `router.initialize()`\n    state.matches : matchRoutes(routesToUse, location, basename);\n    let flushSync = (opts && opts.flushSync) === true;\n    // Short circuit if it's only a hash change and not a revalidation or\n    // mutation submission.\n    //\n    // Ignore on initial page loads because since the initial hydration will always\n    // be \"same hash\".  For example, on /page#hash and submit a <Form method=\"post\">\n    // which will default to a navigation to /page\n    if (matches && state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n      completeNavigation(location, {\n        matches\n      }, {\n        flushSync\n      });\n      return;\n    }\n    let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    // Short circuit with a 404 on the root error boundary if we match nothing\n    if (!matches) {\n      let {\n        error,\n        notFoundMatches,\n        route\n      } = handleNavigational404(location.pathname);\n      completeNavigation(location, {\n        matches: notFoundMatches,\n        loaderData: {},\n        errors: {\n          [route.id]: error\n        }\n      }, {\n        flushSync\n      });\n      return;\n    }\n    // Create a controller/Request for this navigation\n    pendingNavigationController = new AbortController();\n    let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n    let pendingActionResult;\n    if (opts && opts.pendingError) {\n      // If we have a pendingError, it means the user attempted a GET submission\n      // with binary FormData so assign here and skip to handleLoaders.  That\n      // way we handle calling loaders above the boundary etc.  It's not really\n      // different from an actionError in that sense.\n      pendingActionResult = [findNearestBoundary(matches).route.id, {\n        type: ResultType.error,\n        error: opts.pendingError\n      }];\n    } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n      // Call action if we received an action submission\n      let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, {\n        replace: opts.replace,\n        flushSync\n      });\n      if (actionResult.shortCircuited) {\n        return;\n      }\n      // If we received a 404 from handleAction, it's because we couldn't lazily\n      // discover the destination route so we don't want to call loaders\n      if (actionResult.pendingActionResult) {\n        let [routeId, result] = actionResult.pendingActionResult;\n        if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {\n          pendingNavigationController = null;\n          completeNavigation(location, {\n            matches: actionResult.matches,\n            loaderData: {},\n            errors: {\n              [routeId]: result.error\n            }\n          });\n          return;\n        }\n      }\n      matches = actionResult.matches || matches;\n      pendingActionResult = actionResult.pendingActionResult;\n      loadingNavigation = getLoadingNavigation(location, opts.submission);\n      flushSync = false;\n      // No need to do fog of war matching again on loader execution\n      fogOfWar.active = false;\n      // Create a GET request for the loaders\n      request = createClientSideRequest(init.history, request.url, request.signal);\n    }\n    // Call loaders\n    let {\n      shortCircuited,\n      matches: updatedMatches,\n      loaderData,\n      errors\n    } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult);\n    if (shortCircuited) {\n      return;\n    }\n    // Clean up now that the action/loaders have completed.  Don't clean up if\n    // we short circuited because pendingNavigationController will have already\n    // been assigned to a new controller for the next navigation\n    pendingNavigationController = null;\n    completeNavigation(location, _extends({\n      matches: updatedMatches || matches\n    }, getActionDataForCommit(pendingActionResult), {\n      loaderData,\n      errors\n    }));\n  }\n  // Call the action matched by the leaf route for this navigation and handle\n  // redirects/errors\n  async function handleAction(request, location, submission, matches, isFogOfWar, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    interruptActiveLoads();\n    // Put us in a submitting state\n    let navigation = getSubmittingNavigation(location, submission);\n    updateState({\n      navigation\n    }, {\n      flushSync: opts.flushSync === true\n    });\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n      if (discoverResult.type === \"aborted\") {\n        return {\n          shortCircuited: true\n        };\n      } else if (discoverResult.type === \"error\") {\n        let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n        return {\n          matches: discoverResult.partialMatches,\n          pendingActionResult: [boundaryId, {\n            type: ResultType.error,\n            error: discoverResult.error\n          }]\n        };\n      } else if (!discoverResult.matches) {\n        let {\n          notFoundMatches,\n          error,\n          route\n        } = handleNavigational404(location.pathname);\n        return {\n          matches: notFoundMatches,\n          pendingActionResult: [route.id, {\n            type: ResultType.error,\n            error\n          }]\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    // Call our action and get the result\n    let result;\n    let actionMatch = getTargetMatch(matches, location);\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      result = {\n        type: ResultType.error,\n        error: getInternalRouterError(405, {\n          method: request.method,\n          pathname: location.pathname,\n          routeId: actionMatch.route.id\n        })\n      };\n    } else {\n      let results = await callDataStrategy(\"action\", state, request, [actionMatch], matches, null);\n      result = results[actionMatch.route.id];\n      if (request.signal.aborted) {\n        return {\n          shortCircuited: true\n        };\n      }\n    }\n    if (isRedirectResult(result)) {\n      let replace;\n      if (opts && opts.replace != null) {\n        replace = opts.replace;\n      } else {\n        // If the user didn't explicity indicate replace behavior, replace if\n        // we redirected to the exact same location we're currently at to avoid\n        // double back-buttons\n        let location = normalizeRedirectLocation(result.response.headers.get(\"Location\"), new URL(request.url), basename);\n        replace = location === state.location.pathname + state.location.search;\n      }\n      await startRedirectNavigation(request, result, true, {\n        submission,\n        replace\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    if (isDeferredResult(result)) {\n      throw getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n    }\n    if (isErrorResult(result)) {\n      // Store off the pending error - we use it to determine which loaders\n      // to call and will commit it when we complete the navigation\n      let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n      // By default, all submissions to the current location are REPLACE\n      // navigations, but if the action threw an error that'll be rendered in\n      // an errorElement, we fall back to PUSH so that the user can use the\n      // back button to get back to the pre-submission form location to try\n      // again\n      if ((opts && opts.replace) !== true) {\n        pendingAction = Action.Push;\n      }\n      return {\n        matches,\n        pendingActionResult: [boundaryMatch.route.id, result]\n      };\n    }\n    return {\n      matches,\n      pendingActionResult: [actionMatch.route.id, result]\n    };\n  }\n  // Call all applicable loaders for the given matches, handling redirects,\n  // errors, etc.\n  async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) {\n    // Figure out the right navigation we want to use for data loading\n    let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n    // If this was a redirect from an action we don't have a \"submission\" but\n    // we have it on the loading navigation so use that if available\n    let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n    // If this is an uninterrupted revalidation, we remain in our current idle\n    // state.  If not, we need to switch to our loading state and load data,\n    // preserving any new action data or existing action data (in the case of\n    // a revalidation interrupting an actionReload)\n    // If we have partialHydration enabled, then don't update the state for the\n    // initial data load since it's not a \"navigation\"\n    let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration);\n    // When fog of war is enabled, we enter our `loading` state earlier so we\n    // can discover new routes during the `loading` state.  We skip this if\n    // we've already run actions since we would have done our matching already.\n    // If the children() function threw then, we want to proceed with the\n    // partial matches it discovered.\n    if (isFogOfWar) {\n      if (shouldUpdateNavigationState) {\n        let actionData = getUpdatedActionData(pendingActionResult);\n        updateState(_extends({\n          navigation: loadingNavigation\n        }, actionData !== undefined ? {\n          actionData\n        } : {}), {\n          flushSync\n        });\n      }\n      let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);\n      if (discoverResult.type === \"aborted\") {\n        return {\n          shortCircuited: true\n        };\n      } else if (discoverResult.type === \"error\") {\n        let boundaryId = findNearestBoundary(discoverResult.partialMatches).route.id;\n        return {\n          matches: discoverResult.partialMatches,\n          loaderData: {},\n          errors: {\n            [boundaryId]: discoverResult.error\n          }\n        };\n      } else if (!discoverResult.matches) {\n        let {\n          error,\n          notFoundMatches,\n          route\n        } = handleNavigational404(location.pathname);\n        return {\n          matches: notFoundMatches,\n          loaderData: {},\n          errors: {\n            [route.id]: error\n          }\n        };\n      } else {\n        matches = discoverResult.matches;\n      }\n    }\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.v7_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult);\n    // Cancel pending deferreds for no-longer-matched routes or routes we're\n    // about to reload.  Note that if this is an action reload we would have\n    // already cancelled all pending deferreds so this would be a no-op\n    cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n    pendingNavigationLoadId = ++incrementingLoadId;\n    // Short circuit if we have no loaders to run\n    if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n      let updatedFetchers = markFetchRedirectsDone();\n      completeNavigation(location, _extends({\n        matches,\n        loaderData: {},\n        // Commit pending error if we're short circuiting\n        errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n          [pendingActionResult[0]]: pendingActionResult[1].error\n        } : null\n      }, getActionDataForCommit(pendingActionResult), updatedFetchers ? {\n        fetchers: new Map(state.fetchers)\n      } : {}), {\n        flushSync\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    if (shouldUpdateNavigationState) {\n      let updates = {};\n      if (!isFogOfWar) {\n        // Only update navigation/actionNData if we didn't already do it above\n        updates.navigation = loadingNavigation;\n        let actionData = getUpdatedActionData(pendingActionResult);\n        if (actionData !== undefined) {\n          updates.actionData = actionData;\n        }\n      }\n      if (revalidatingFetchers.length > 0) {\n        updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);\n      }\n      updateState(updates, {\n        flushSync\n      });\n    }\n    revalidatingFetchers.forEach(rf => {\n      abortFetcher(rf.key);\n      if (rf.controller) {\n        // Fetchers use an independent AbortController so that aborting a fetcher\n        // (via deleteFetcher) does not abort the triggering navigation that\n        // triggered the revalidation\n        fetchControllers.set(rf.key, rf.controller);\n      }\n    });\n    // Proxy navigation abort through to revalidation fetchers\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n    }\n    let {\n      loaderResults,\n      fetcherResults\n    } = await callLoadersAndMaybeResolveData(state, matches, matchesToLoad, revalidatingFetchers, request);\n    if (request.signal.aborted) {\n      return {\n        shortCircuited: true\n      };\n    }\n    // Clean up _after_ loaders have completed.  Don't clean up if we short\n    // circuited because fetchControllers would have been aborted and\n    // reassigned to new controllers for the next navigation\n    if (pendingNavigationController) {\n      pendingNavigationController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n    }\n    revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n    // If any loaders returned a redirect Response, start a new REPLACE navigation\n    let redirect = findRedirect(loaderResults);\n    if (redirect) {\n      await startRedirectNavigation(request, redirect.result, true, {\n        replace\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    redirect = findRedirect(fetcherResults);\n    if (redirect) {\n      // If this redirect came from a fetcher make sure we mark it in\n      // fetchRedirectIds so it doesn't get revalidated on the next set of\n      // loader executions\n      fetchRedirectIds.add(redirect.key);\n      await startRedirectNavigation(request, redirect.result, true, {\n        replace\n      });\n      return {\n        shortCircuited: true\n      };\n    }\n    // Process and commit output from loaders\n    let {\n      loaderData,\n      errors\n    } = processLoaderData(state, matches, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds);\n    // Wire up subscribers to update loaderData as promises settle\n    activeDeferreds.forEach((deferredData, routeId) => {\n      deferredData.subscribe(aborted => {\n        // Note: No need to updateState here since the TrackedPromise on\n        // loaderData is stable across resolve/reject\n        // Remove this instance if we were aborted or if promises have settled\n        if (aborted || deferredData.done) {\n          activeDeferreds.delete(routeId);\n        }\n      });\n    });\n    // Preserve SSR errors during partial hydration\n    if (future.v7_partialHydration && initialHydration && state.errors) {\n      errors = _extends({}, state.errors, errors);\n    }\n    let updatedFetchers = markFetchRedirectsDone();\n    let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n    let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n    return _extends({\n      matches,\n      loaderData,\n      errors\n    }, shouldUpdateFetchers ? {\n      fetchers: new Map(state.fetchers)\n    } : {});\n  }\n  function getUpdatedActionData(pendingActionResult) {\n    if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {\n      // This is cast to `any` currently because `RouteData`uses any and it\n      // would be a breaking change to use any.\n      // TODO: v7 - change `RouteData` to use `unknown` instead of `any`\n      return {\n        [pendingActionResult[0]]: pendingActionResult[1].data\n      };\n    } else if (state.actionData) {\n      if (Object.keys(state.actionData).length === 0) {\n        return null;\n      } else {\n        return state.actionData;\n      }\n    }\n  }\n  function getUpdatedRevalidatingFetchers(revalidatingFetchers) {\n    revalidatingFetchers.forEach(rf => {\n      let fetcher = state.fetchers.get(rf.key);\n      let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n      state.fetchers.set(rf.key, revalidatingFetcher);\n    });\n    return new Map(state.fetchers);\n  }\n  // Trigger a fetcher load/submit for the given fetcher key\n  function fetch(key, routeId, href, opts) {\n    if (isServer) {\n      throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n    }\n    abortFetcher(key);\n    let flushSync = (opts && opts.flushSync) === true;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);\n    let matches = matchRoutes(routesToUse, normalizedPath, basename);\n    let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);\n    if (fogOfWar.active && fogOfWar.matches) {\n      matches = fogOfWar.matches;\n    }\n    if (!matches) {\n      setFetcherError(key, routeId, getInternalRouterError(404, {\n        pathname: normalizedPath\n      }), {\n        flushSync\n      });\n      return;\n    }\n    let {\n      path,\n      submission,\n      error\n    } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n    if (error) {\n      setFetcherError(key, routeId, error, {\n        flushSync\n      });\n      return;\n    }\n    let match = getTargetMatch(matches, path);\n    let preventScrollReset = (opts && opts.preventScrollReset) === true;\n    if (submission && isMutationMethod(submission.formMethod)) {\n      handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, preventScrollReset, submission);\n      return;\n    }\n    // Store off the match so we can call it's shouldRevalidate on subsequent\n    // revalidations\n    fetchLoadMatches.set(key, {\n      routeId,\n      path\n    });\n    handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, preventScrollReset, submission);\n  }\n  // Call the action for the matched fetcher.submit(), and then handle redirects,\n  // errors, and revalidation\n  async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, preventScrollReset, submission) {\n    interruptActiveLoads();\n    fetchLoadMatches.delete(key);\n    function detectAndHandle405Error(m) {\n      if (!m.route.action && !m.route.lazy) {\n        let error = getInternalRouterError(405, {\n          method: submission.formMethod,\n          pathname: path,\n          routeId: routeId\n        });\n        setFetcherError(key, routeId, error, {\n          flushSync\n        });\n        return true;\n      }\n      return false;\n    }\n    if (!isFogOfWar && detectAndHandle405Error(match)) {\n      return;\n    }\n    // Put this fetcher into it's submitting state\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {\n      flushSync\n    });\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(requestMatches, new URL(fetchRequest.url).pathname, fetchRequest.signal, key);\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        setFetcherError(key, routeId, discoverResult.error, {\n          flushSync\n        });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(key, routeId, getInternalRouterError(404, {\n          pathname: path\n        }), {\n          flushSync\n        });\n        return;\n      } else {\n        requestMatches = discoverResult.matches;\n        match = getTargetMatch(requestMatches, path);\n        if (detectAndHandle405Error(match)) {\n          return;\n        }\n      }\n    }\n    // Call the action for the fetcher\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let actionResults = await callDataStrategy(\"action\", state, fetchRequest, [match], requestMatches, key);\n    let actionResult = actionResults[match.route.id];\n    if (fetchRequest.signal.aborted) {\n      // We can delete this so long as we weren't aborted by our own fetcher\n      // re-submit which would have put _new_ controller is in fetchControllers\n      if (fetchControllers.get(key) === abortController) {\n        fetchControllers.delete(key);\n      }\n      return;\n    }\n    // When using v7_fetcherPersist, we don't want errors bubbling up to the UI\n    // or redirects processed for unmounted fetchers so we just revert them to\n    // idle\n    if (future.v7_fetcherPersist && deletedFetchers.has(key)) {\n      if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {\n        updateFetcherState(key, getDoneFetcher(undefined));\n        return;\n      }\n      // Let SuccessResult's fall through for revalidation\n    } else {\n      if (isRedirectResult(actionResult)) {\n        fetchControllers.delete(key);\n        if (pendingNavigationLoadId > originatingLoadId) {\n          // A new navigation was kicked off after our action started, so that\n          // should take precedence over this redirect navigation.  We already\n          // set isRevalidationRequired so all loaders for the new route should\n          // fire unless opted out via shouldRevalidate\n          updateFetcherState(key, getDoneFetcher(undefined));\n          return;\n        } else {\n          fetchRedirectIds.add(key);\n          updateFetcherState(key, getLoadingFetcher(submission));\n          return startRedirectNavigation(fetchRequest, actionResult, false, {\n            fetcherSubmission: submission,\n            preventScrollReset\n          });\n        }\n      }\n      // Process any non-redirect errors thrown\n      if (isErrorResult(actionResult)) {\n        setFetcherError(key, routeId, actionResult.error);\n        return;\n      }\n    }\n    if (isDeferredResult(actionResult)) {\n      throw getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n    }\n    // Start the data load for current matches, or the next location if we're\n    // in the middle of a navigation\n    let nextLocation = state.navigation.location || state.location;\n    let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let matches = state.navigation.state !== \"idle\" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n    invariant(matches, \"Didn't find any matches after fetcher action\");\n    let loadId = ++incrementingLoadId;\n    fetchReloadIds.set(key, loadId);\n    let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n    state.fetchers.set(key, loadFetcher);\n    let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.v7_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]);\n    // Put all revalidating fetchers into the loading state, except for the\n    // current fetcher which we want to keep in it's current loading state which\n    // contains it's action submission info + action data\n    revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n      let staleKey = rf.key;\n      let existingFetcher = state.fetchers.get(staleKey);\n      let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n      state.fetchers.set(staleKey, revalidatingFetcher);\n      abortFetcher(staleKey);\n      if (rf.controller) {\n        fetchControllers.set(staleKey, rf.controller);\n      }\n    });\n    updateState({\n      fetchers: new Map(state.fetchers)\n    });\n    let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n    abortController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n    let {\n      loaderResults,\n      fetcherResults\n    } = await callLoadersAndMaybeResolveData(state, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n    if (abortController.signal.aborted) {\n      return;\n    }\n    abortController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n    fetchReloadIds.delete(key);\n    fetchControllers.delete(key);\n    revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n    let redirect = findRedirect(loaderResults);\n    if (redirect) {\n      return startRedirectNavigation(revalidationRequest, redirect.result, false, {\n        preventScrollReset\n      });\n    }\n    redirect = findRedirect(fetcherResults);\n    if (redirect) {\n      // If this redirect came from a fetcher make sure we mark it in\n      // fetchRedirectIds so it doesn't get revalidated on the next set of\n      // loader executions\n      fetchRedirectIds.add(redirect.key);\n      return startRedirectNavigation(revalidationRequest, redirect.result, false, {\n        preventScrollReset\n      });\n    }\n    // Process and commit output from loaders\n    let {\n      loaderData,\n      errors\n    } = processLoaderData(state, matches, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n    // Since we let revalidations complete even if the submitting fetcher was\n    // deleted, only put it back to idle if it hasn't been deleted\n    if (state.fetchers.has(key)) {\n      let doneFetcher = getDoneFetcher(actionResult.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n    abortStaleFetchLoads(loadId);\n    // If we are currently in a navigation loading state and this fetcher is\n    // more recent than the navigation, we want the newer data so abort the\n    // navigation and complete it with the fetcher data\n    if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n      invariant(pendingAction, \"Expected pending action\");\n      pendingNavigationController && pendingNavigationController.abort();\n      completeNavigation(state.navigation.location, {\n        matches,\n        loaderData,\n        errors,\n        fetchers: new Map(state.fetchers)\n      });\n    } else {\n      // otherwise just update with the fetcher data, preserving any existing\n      // loaderData for loaders that did not need to reload.  We have to\n      // manually merge here since we aren't going through completeNavigation\n      updateState({\n        errors,\n        loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),\n        fetchers: new Map(state.fetchers)\n      });\n      isRevalidationRequired = false;\n    }\n  }\n  // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n  async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, preventScrollReset, submission) {\n    let existingFetcher = state.fetchers.get(key);\n    updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {\n      flushSync\n    });\n    let abortController = new AbortController();\n    let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n    if (isFogOfWar) {\n      let discoverResult = await discoverRoutes(matches, new URL(fetchRequest.url).pathname, fetchRequest.signal, key);\n      if (discoverResult.type === \"aborted\") {\n        return;\n      } else if (discoverResult.type === \"error\") {\n        setFetcherError(key, routeId, discoverResult.error, {\n          flushSync\n        });\n        return;\n      } else if (!discoverResult.matches) {\n        setFetcherError(key, routeId, getInternalRouterError(404, {\n          pathname: path\n        }), {\n          flushSync\n        });\n        return;\n      } else {\n        matches = discoverResult.matches;\n        match = getTargetMatch(matches, path);\n      }\n    }\n    // Call the loader for this fetcher route match\n    fetchControllers.set(key, abortController);\n    let originatingLoadId = incrementingLoadId;\n    let results = await callDataStrategy(\"loader\", state, fetchRequest, [match], matches, key);\n    let result = results[match.route.id];\n    // Deferred isn't supported for fetcher loads, await everything and treat it\n    // as a normal load.  resolveDeferredData will return undefined if this\n    // fetcher gets aborted, so we just leave result untouched and short circuit\n    // below if that happens\n    if (isDeferredResult(result)) {\n      result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n    }\n    // We can delete this so long as we weren't aborted by our our own fetcher\n    // re-load which would have put _new_ controller is in fetchControllers\n    if (fetchControllers.get(key) === abortController) {\n      fetchControllers.delete(key);\n    }\n    if (fetchRequest.signal.aborted) {\n      return;\n    }\n    // We don't want errors bubbling up or redirects followed for unmounted\n    // fetchers, so short circuit here if it was removed from the UI\n    if (deletedFetchers.has(key)) {\n      updateFetcherState(key, getDoneFetcher(undefined));\n      return;\n    }\n    // If the loader threw a redirect Response, start a new REPLACE navigation\n    if (isRedirectResult(result)) {\n      if (pendingNavigationLoadId > originatingLoadId) {\n        // A new navigation was kicked off after our loader started, so that\n        // should take precedence over this redirect navigation\n        updateFetcherState(key, getDoneFetcher(undefined));\n        return;\n      } else {\n        fetchRedirectIds.add(key);\n        await startRedirectNavigation(fetchRequest, result, false, {\n          preventScrollReset\n        });\n        return;\n      }\n    }\n    // Process any non-redirect errors thrown\n    if (isErrorResult(result)) {\n      setFetcherError(key, routeId, result.error);\n      return;\n    }\n    invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n    // Put the fetcher back into an idle state\n    updateFetcherState(key, getDoneFetcher(result.data));\n  }\n  /**\n   * Utility function to handle redirects returned from an action or loader.\n   * Normally, a redirect \"replaces\" the navigation that triggered it.  So, for\n   * example:\n   *\n   *  - user is on /a\n   *  - user clicks a link to /b\n   *  - loader for /b redirects to /c\n   *\n   * In a non-JS app the browser would track the in-flight navigation to /b and\n   * then replace it with /c when it encountered the redirect response.  In\n   * the end it would only ever update the URL bar with /c.\n   *\n   * In client-side routing using pushState/replaceState, we aim to emulate\n   * this behavior and we also do not update history until the end of the\n   * navigation (including processed redirects).  This means that we never\n   * actually touch history until we've processed redirects, so we just use\n   * the history action from the original navigation (PUSH or REPLACE).\n   */\n  async function startRedirectNavigation(request, redirect, isNavigation, _temp2) {\n    let {\n      submission,\n      fetcherSubmission,\n      preventScrollReset,\n      replace\n    } = _temp2 === void 0 ? {} : _temp2;\n    if (redirect.response.headers.has(\"X-Remix-Revalidate\")) {\n      isRevalidationRequired = true;\n    }\n    let location = redirect.response.headers.get(\"Location\");\n    invariant(location, \"Expected a Location header on the redirect Response\");\n    location = normalizeRedirectLocation(location, new URL(request.url), basename);\n    let redirectLocation = createLocation(state.location, location, {\n      _isRedirect: true\n    });\n    if (isBrowser) {\n      let isDocumentReload = false;\n      if (redirect.response.headers.has(\"X-Remix-Reload-Document\")) {\n        // Hard reload if the response contained X-Remix-Reload-Document\n        isDocumentReload = true;\n      } else if (ABSOLUTE_URL_REGEX.test(location)) {\n        const url = init.history.createURL(location);\n        isDocumentReload =\n        // Hard reload if it's an absolute URL to a new origin\n        url.origin !== routerWindow.location.origin ||\n        // Hard reload if it's an absolute URL that does not match our basename\n        stripBasename(url.pathname, basename) == null;\n      }\n      if (isDocumentReload) {\n        if (replace) {\n          routerWindow.location.replace(location);\n        } else {\n          routerWindow.location.assign(location);\n        }\n        return;\n      }\n    }\n    // There's no need to abort on redirects, since we don't detect the\n    // redirect until the action/loaders have settled\n    pendingNavigationController = null;\n    let redirectHistoryAction = replace === true || redirect.response.headers.has(\"X-Remix-Replace\") ? Action.Replace : Action.Push;\n    // Use the incoming submission if provided, fallback on the active one in\n    // state.navigation\n    let {\n      formMethod,\n      formAction,\n      formEncType\n    } = state.navigation;\n    if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n      submission = getSubmissionFromNavigation(state.navigation);\n    }\n    // If this was a 307/308 submission we want to preserve the HTTP method and\n    // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n    // redirected location\n    let activeSubmission = submission || fetcherSubmission;\n    if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n      await startNavigation(redirectHistoryAction, redirectLocation, {\n        submission: _extends({}, activeSubmission, {\n          formAction: location\n        }),\n        // Preserve these flags across redirects\n        preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n        enableViewTransition: isNavigation ? pendingViewTransitionEnabled : undefined\n      });\n    } else {\n      // If we have a navigation submission, we will preserve it through the\n      // redirect navigation\n      let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n      await startNavigation(redirectHistoryAction, redirectLocation, {\n        overrideNavigation,\n        // Send fetcher submissions through for shouldRevalidate\n        fetcherSubmission,\n        // Preserve these flags across redirects\n        preventScrollReset: preventScrollReset || pendingPreventScrollReset,\n        enableViewTransition: isNavigation ? pendingViewTransitionEnabled : undefined\n      });\n    }\n  }\n  // Utility wrapper for calling dataStrategy client-side without having to\n  // pass around the manifest, mapRouteProperties, etc.\n  async function callDataStrategy(type, state, request, matchesToLoad, matches, fetcherKey) {\n    let results;\n    let dataResults = {};\n    try {\n      results = await callDataStrategyImpl(dataStrategyImpl, type, state, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties);\n    } catch (e) {\n      // If the outer dataStrategy method throws, just return the error for all\n      // matches - and it'll naturally bubble to the root\n      matchesToLoad.forEach(m => {\n        dataResults[m.route.id] = {\n          type: ResultType.error,\n          error: e\n        };\n      });\n      return dataResults;\n    }\n    for (let [routeId, result] of Object.entries(results)) {\n      if (isRedirectDataStrategyResultResult(result)) {\n        let response = result.result;\n        dataResults[routeId] = {\n          type: ResultType.redirect,\n          response: normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, future.v7_relativeSplatPath)\n        };\n      } else {\n        dataResults[routeId] = await convertDataStrategyResultToDataResult(result);\n      }\n    }\n    return dataResults;\n  }\n  async function callLoadersAndMaybeResolveData(state, matches, matchesToLoad, fetchersToLoad, request) {\n    let currentMatches = state.matches;\n    // Kick off loaders and fetchers in parallel\n    let loaderResultsPromise = callDataStrategy(\"loader\", state, request, matchesToLoad, matches, null);\n    let fetcherResultsPromise = Promise.all(fetchersToLoad.map(async f => {\n      if (f.matches && f.match && f.controller) {\n        let results = await callDataStrategy(\"loader\", state, createClientSideRequest(init.history, f.path, f.controller.signal), [f.match], f.matches, f.key);\n        let result = results[f.match.route.id];\n        // Fetcher results are keyed by fetcher key from here on out, not routeId\n        return {\n          [f.key]: result\n        };\n      } else {\n        return Promise.resolve({\n          [f.key]: {\n            type: ResultType.error,\n            error: getInternalRouterError(404, {\n              pathname: f.path\n            })\n          }\n        });\n      }\n    }));\n    let loaderResults = await loaderResultsPromise;\n    let fetcherResults = (await fetcherResultsPromise).reduce((acc, r) => Object.assign(acc, r), {});\n    await Promise.all([resolveNavigationDeferredResults(matches, loaderResults, request.signal, currentMatches, state.loaderData), resolveFetcherDeferredResults(matches, fetcherResults, fetchersToLoad)]);\n    return {\n      loaderResults,\n      fetcherResults\n    };\n  }\n  function interruptActiveLoads() {\n    // Every interruption triggers a revalidation\n    isRevalidationRequired = true;\n    // Cancel pending route-level deferreds and mark cancelled routes for\n    // revalidation\n    cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n    // Abort in-flight fetcher loads\n    fetchLoadMatches.forEach((_, key) => {\n      if (fetchControllers.has(key)) {\n        cancelledFetcherLoads.add(key);\n      }\n      abortFetcher(key);\n    });\n  }\n  function updateFetcherState(key, fetcher, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    state.fetchers.set(key, fetcher);\n    updateState({\n      fetchers: new Map(state.fetchers)\n    }, {\n      flushSync: (opts && opts.flushSync) === true\n    });\n  }\n  function setFetcherError(key, routeId, error, opts) {\n    if (opts === void 0) {\n      opts = {};\n    }\n    let boundaryMatch = findNearestBoundary(state.matches, routeId);\n    deleteFetcher(key);\n    updateState({\n      errors: {\n        [boundaryMatch.route.id]: error\n      },\n      fetchers: new Map(state.fetchers)\n    }, {\n      flushSync: (opts && opts.flushSync) === true\n    });\n  }\n  function getFetcher(key) {\n    activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);\n    // If this fetcher was previously marked for deletion, unmark it since we\n    // have a new instance\n    if (deletedFetchers.has(key)) {\n      deletedFetchers.delete(key);\n    }\n    return state.fetchers.get(key) || IDLE_FETCHER;\n  }\n  function deleteFetcher(key) {\n    let fetcher = state.fetchers.get(key);\n    // Don't abort the controller if this is a deletion of a fetcher.submit()\n    // in it's loading phase since - we don't want to abort the corresponding\n    // revalidation and want them to complete and land\n    if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n      abortFetcher(key);\n    }\n    fetchLoadMatches.delete(key);\n    fetchReloadIds.delete(key);\n    fetchRedirectIds.delete(key);\n    // If we opted into the flag we can clear this now since we're calling\n    // deleteFetcher() at the end of updateState() and we've already handed the\n    // deleted fetcher keys off to the data layer.\n    // If not, we're eagerly calling deleteFetcher() and we need to keep this\n    // Set populated until the next updateState call, and we'll clear\n    // `deletedFetchers` then\n    if (future.v7_fetcherPersist) {\n      deletedFetchers.delete(key);\n    }\n    cancelledFetcherLoads.delete(key);\n    state.fetchers.delete(key);\n  }\n  function deleteFetcherAndUpdateState(key) {\n    let count = (activeFetchers.get(key) || 0) - 1;\n    if (count <= 0) {\n      activeFetchers.delete(key);\n      deletedFetchers.add(key);\n      if (!future.v7_fetcherPersist) {\n        deleteFetcher(key);\n      }\n    } else {\n      activeFetchers.set(key, count);\n    }\n    updateState({\n      fetchers: new Map(state.fetchers)\n    });\n  }\n  function abortFetcher(key) {\n    let controller = fetchControllers.get(key);\n    if (controller) {\n      controller.abort();\n      fetchControllers.delete(key);\n    }\n  }\n  function markFetchersDone(keys) {\n    for (let key of keys) {\n      let fetcher = getFetcher(key);\n      let doneFetcher = getDoneFetcher(fetcher.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n  }\n  function markFetchRedirectsDone() {\n    let doneKeys = [];\n    let updatedFetchers = false;\n    for (let key of fetchRedirectIds) {\n      let fetcher = state.fetchers.get(key);\n      invariant(fetcher, \"Expected fetcher: \" + key);\n      if (fetcher.state === \"loading\") {\n        fetchRedirectIds.delete(key);\n        doneKeys.push(key);\n        updatedFetchers = true;\n      }\n    }\n    markFetchersDone(doneKeys);\n    return updatedFetchers;\n  }\n  function abortStaleFetchLoads(landedId) {\n    let yeetedKeys = [];\n    for (let [key, id] of fetchReloadIds) {\n      if (id < landedId) {\n        let fetcher = state.fetchers.get(key);\n        invariant(fetcher, \"Expected fetcher: \" + key);\n        if (fetcher.state === \"loading\") {\n          abortFetcher(key);\n          fetchReloadIds.delete(key);\n          yeetedKeys.push(key);\n        }\n      }\n    }\n    markFetchersDone(yeetedKeys);\n    return yeetedKeys.length > 0;\n  }\n  function getBlocker(key, fn) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    if (blockerFunctions.get(key) !== fn) {\n      blockerFunctions.set(key, fn);\n    }\n    return blocker;\n  }\n  function deleteBlocker(key) {\n    state.blockers.delete(key);\n    blockerFunctions.delete(key);\n  }\n  // Utility function to update blockers, ensuring valid state transitions\n  function updateBlocker(key, newBlocker) {\n    let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n    // Poor mans state machine :)\n    // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n    invariant(blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\", \"Invalid blocker state transition: \" + blocker.state + \" -> \" + newBlocker.state);\n    let blockers = new Map(state.blockers);\n    blockers.set(key, newBlocker);\n    updateState({\n      blockers\n    });\n  }\n  function shouldBlockNavigation(_ref2) {\n    let {\n      currentLocation,\n      nextLocation,\n      historyAction\n    } = _ref2;\n    if (blockerFunctions.size === 0) {\n      return;\n    }\n    // We ony support a single active blocker at the moment since we don't have\n    // any compelling use cases for multi-blocker yet\n    if (blockerFunctions.size > 1) {\n      warning(false, \"A router only supports one blocker at a time\");\n    }\n    let entries = Array.from(blockerFunctions.entries());\n    let [blockerKey, blockerFunction] = entries[entries.length - 1];\n    let blocker = state.blockers.get(blockerKey);\n    if (blocker && blocker.state === \"proceeding\") {\n      // If the blocker is currently proceeding, we don't need to re-check\n      // it and can let this navigation continue\n      return;\n    }\n    // At this point, we know we're unblocked/blocked so we need to check the\n    // user-provided blocker function\n    if (blockerFunction({\n      currentLocation,\n      nextLocation,\n      historyAction\n    })) {\n      return blockerKey;\n    }\n  }\n  function handleNavigational404(pathname) {\n    let error = getInternalRouterError(404, {\n      pathname\n    });\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    let {\n      matches,\n      route\n    } = getShortCircuitMatches(routesToUse);\n    // Cancel all pending deferred on 404s since we don't keep any routes\n    cancelActiveDeferreds();\n    return {\n      notFoundMatches: matches,\n      route,\n      error\n    };\n  }\n  function cancelActiveDeferreds(predicate) {\n    let cancelledRouteIds = [];\n    activeDeferreds.forEach((dfd, routeId) => {\n      if (!predicate || predicate(routeId)) {\n        // Cancel the deferred - but do not remove from activeDeferreds here -\n        // we rely on the subscribers to do that so our tests can assert proper\n        // cleanup via _internalActiveDeferreds\n        dfd.cancel();\n        cancelledRouteIds.push(routeId);\n        activeDeferreds.delete(routeId);\n      }\n    });\n    return cancelledRouteIds;\n  }\n  // Opt in to capturing and reporting scroll positions during navigations,\n  // used by the <ScrollRestoration> component\n  function enableScrollRestoration(positions, getPosition, getKey) {\n    savedScrollPositions = positions;\n    getScrollPosition = getPosition;\n    getScrollRestorationKey = getKey || null;\n    // Perform initial hydration scroll restoration, since we miss the boat on\n    // the initial updateState() because we've not yet rendered <ScrollRestoration/>\n    // and therefore have no savedScrollPositions available\n    if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n      initialScrollRestored = true;\n      let y = getSavedScrollPosition(state.location, state.matches);\n      if (y != null) {\n        updateState({\n          restoreScrollPosition: y\n        });\n      }\n    }\n    return () => {\n      savedScrollPositions = null;\n      getScrollPosition = null;\n      getScrollRestorationKey = null;\n    };\n  }\n  function getScrollKey(location, matches) {\n    if (getScrollRestorationKey) {\n      let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n      return key || location.key;\n    }\n    return location.key;\n  }\n  function saveScrollPosition(location, matches) {\n    if (savedScrollPositions && getScrollPosition) {\n      let key = getScrollKey(location, matches);\n      savedScrollPositions[key] = getScrollPosition();\n    }\n  }\n  function getSavedScrollPosition(location, matches) {\n    if (savedScrollPositions) {\n      let key = getScrollKey(location, matches);\n      let y = savedScrollPositions[key];\n      if (typeof y === \"number\") {\n        return y;\n      }\n    }\n    return null;\n  }\n  function checkFogOfWar(matches, routesToUse, pathname) {\n    if (patchRoutesOnNavigationImpl) {\n      if (!matches) {\n        let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n        return {\n          active: true,\n          matches: fogMatches || []\n        };\n      } else {\n        if (Object.keys(matches[0].params).length > 0) {\n          // If we matched a dynamic param or a splat, it might only be because\n          // we haven't yet discovered other routes that would match with a\n          // higher score.  Call patchRoutesOnNavigation just to be sure\n          let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n          return {\n            active: true,\n            matches: partialMatches\n          };\n        }\n      }\n    }\n    return {\n      active: false,\n      matches: null\n    };\n  }\n  async function discoverRoutes(matches, pathname, signal, fetcherKey) {\n    if (!patchRoutesOnNavigationImpl) {\n      return {\n        type: \"success\",\n        matches\n      };\n    }\n    let partialMatches = matches;\n    while (true) {\n      let isNonHMR = inFlightDataRoutes == null;\n      let routesToUse = inFlightDataRoutes || dataRoutes;\n      let localManifest = manifest;\n      try {\n        await patchRoutesOnNavigationImpl({\n          signal,\n          path: pathname,\n          matches: partialMatches,\n          fetcherKey,\n          patch: (routeId, children) => {\n            if (signal.aborted) return;\n            patchRoutesImpl(routeId, children, routesToUse, localManifest, mapRouteProperties);\n          }\n        });\n      } catch (e) {\n        return {\n          type: \"error\",\n          error: e,\n          partialMatches\n        };\n      } finally {\n        // If we are not in the middle of an HMR revalidation and we changed the\n        // routes, provide a new identity so when we `updateState` at the end of\n        // this navigation/fetch `router.routes` will be a new identity and\n        // trigger a re-run of memoized `router.routes` dependencies.\n        // HMR will already update the identity and reflow when it lands\n        // `inFlightDataRoutes` in `completeNavigation`\n        if (isNonHMR && !signal.aborted) {\n          dataRoutes = [...dataRoutes];\n        }\n      }\n      if (signal.aborted) {\n        return {\n          type: \"aborted\"\n        };\n      }\n      let newMatches = matchRoutes(routesToUse, pathname, basename);\n      if (newMatches) {\n        return {\n          type: \"success\",\n          matches: newMatches\n        };\n      }\n      let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);\n      // Avoid loops if the second pass results in the same partial matches\n      if (!newPartialMatches || partialMatches.length === newPartialMatches.length && partialMatches.every((m, i) => m.route.id === newPartialMatches[i].route.id)) {\n        return {\n          type: \"success\",\n          matches: null\n        };\n      }\n      partialMatches = newPartialMatches;\n    }\n  }\n  function _internalSetRoutes(newRoutes) {\n    manifest = {};\n    inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n  }\n  function patchRoutes(routeId, children) {\n    let isNonHMR = inFlightDataRoutes == null;\n    let routesToUse = inFlightDataRoutes || dataRoutes;\n    patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties);\n    // If we are not in the middle of an HMR revalidation and we changed the\n    // routes, provide a new identity and trigger a reflow via `updateState`\n    // to re-run memoized `router.routes` dependencies.\n    // HMR will already update the identity and reflow when it lands\n    // `inFlightDataRoutes` in `completeNavigation`\n    if (isNonHMR) {\n      dataRoutes = [...dataRoutes];\n      updateState({});\n    }\n  }\n  router = {\n    get basename() {\n      return basename;\n    },\n    get future() {\n      return future;\n    },\n    get state() {\n      return state;\n    },\n    get routes() {\n      return dataRoutes;\n    },\n    get window() {\n      return routerWindow;\n    },\n    initialize,\n    subscribe,\n    enableScrollRestoration,\n    navigate,\n    fetch,\n    revalidate,\n    // Passthrough to history-aware createHref used by useHref so we get proper\n    // hash-aware URLs in DOM paths\n    createHref: to => init.history.createHref(to),\n    encodeLocation: to => init.history.encodeLocation(to),\n    getFetcher,\n    deleteFetcher: deleteFetcherAndUpdateState,\n    dispose,\n    getBlocker,\n    deleteBlocker,\n    patchRoutes,\n    _internalFetchControllers: fetchControllers,\n    _internalActiveDeferreds: activeDeferreds,\n    // TODO: Remove setRoutes, it's temporary to avoid dealing with\n    // updating the tree while validating the update algorithm.\n    _internalSetRoutes\n  };\n  return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\nfunction createStaticHandler(routes, opts) {\n  invariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n  let manifest = {};\n  let basename = (opts ? opts.basename : null) || \"/\";\n  let mapRouteProperties;\n  if (opts != null && opts.mapRouteProperties) {\n    mapRouteProperties = opts.mapRouteProperties;\n  } else if (opts != null && opts.detectErrorBoundary) {\n    // If they are still using the deprecated version, wrap it with the new API\n    let detectErrorBoundary = opts.detectErrorBoundary;\n    mapRouteProperties = route => ({\n      hasErrorBoundary: detectErrorBoundary(route)\n    });\n  } else {\n    mapRouteProperties = defaultMapRouteProperties;\n  }\n  // Config driven behavior flags\n  let future = _extends({\n    v7_relativeSplatPath: false,\n    v7_throwAbortReason: false\n  }, opts ? opts.future : null);\n  let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n  /**\n   * The query() method is intended for document requests, in which we want to\n   * call an optional action and potentially multiple loaders for all nested\n   * routes.  It returns a StaticHandlerContext object, which is very similar\n   * to the router state (location, loaderData, actionData, errors, etc.) and\n   * also adds SSR-specific information such as the statusCode and headers\n   * from action/loaders Responses.\n   *\n   * It _should_ never throw and should report all errors through the\n   * returned context.errors object, properly associating errors to their error\n   * boundary.  Additionally, it tracks _deepestRenderedBoundaryId which can be\n   * used to emulate React error boundaries during SSr by performing a second\n   * pass only down to the boundaryId.\n   *\n   * The one exception where we do not return a StaticHandlerContext is when a\n   * redirect response is returned or thrown from any action/loader.  We\n   * propagate that out and return the raw Response so the HTTP server can\n   * return it directly.\n   *\n   * - `opts.requestContext` is an optional server context that will be passed\n   *   to actions/loaders in the `context` parameter\n   * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent\n   *   the bubbling of errors which allows single-fetch-type implementations\n   *   where the client will handle the bubbling and we may need to return data\n   *   for the handling route\n   */\n  async function query(request, _temp3) {\n    let {\n      requestContext,\n      skipLoaderErrorBubbling,\n      dataStrategy\n    } = _temp3 === void 0 ? {} : _temp3;\n    let url = new URL(request.url);\n    let method = request.method;\n    let location = createLocation(\"\", createPath(url), null, \"default\");\n    let matches = matchRoutes(dataRoutes, location, basename);\n    // SSR supports HEAD requests while SPA doesn't\n    if (!isValidMethod(method) && method !== \"HEAD\") {\n      let error = getInternalRouterError(405, {\n        method\n      });\n      let {\n        matches: methodNotAllowedMatches,\n        route\n      } = getShortCircuitMatches(dataRoutes);\n      return {\n        basename,\n        location,\n        matches: methodNotAllowedMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    } else if (!matches) {\n      let error = getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n      let {\n        matches: notFoundMatches,\n        route\n      } = getShortCircuitMatches(dataRoutes);\n      return {\n        basename,\n        location,\n        matches: notFoundMatches,\n        loaderData: {},\n        actionData: null,\n        errors: {\n          [route.id]: error\n        },\n        statusCode: error.status,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    let result = await queryImpl(request, location, matches, requestContext, dataStrategy || null, skipLoaderErrorBubbling === true, null);\n    if (isResponse(result)) {\n      return result;\n    }\n    // When returning StaticHandlerContext, we patch back in the location here\n    // since we need it for React Context.  But this helps keep our submit and\n    // loadRouteData operating on a Request instead of a Location\n    return _extends({\n      location,\n      basename\n    }, result);\n  }\n  /**\n   * The queryRoute() method is intended for targeted route requests, either\n   * for fetch ?_data requests or resource route requests.  In this case, we\n   * are only ever calling a single action or loader, and we are returning the\n   * returned value directly.  In most cases, this will be a Response returned\n   * from the action/loader, but it may be a primitive or other value as well -\n   * and in such cases the calling context should handle that accordingly.\n   *\n   * We do respect the throw/return differentiation, so if an action/loader\n   * throws, then this method will throw the value.  This is important so we\n   * can do proper boundary identification in Remix where a thrown Response\n   * must go to the Catch Boundary but a returned Response is happy-path.\n   *\n   * One thing to note is that any Router-initiated Errors that make sense\n   * to associate with a status code will be thrown as an ErrorResponse\n   * instance which include the raw Error, such that the calling context can\n   * serialize the error as they see fit while including the proper response\n   * code.  Examples here are 404 and 405 errors that occur prior to reaching\n   * any user-defined loaders.\n   *\n   * - `opts.routeId` allows you to specify the specific route handler to call.\n   *   If not provided the handler will determine the proper route by matching\n   *   against `request.url`\n   * - `opts.requestContext` is an optional server context that will be passed\n   *    to actions/loaders in the `context` parameter\n   */\n  async function queryRoute(request, _temp4) {\n    let {\n      routeId,\n      requestContext,\n      dataStrategy\n    } = _temp4 === void 0 ? {} : _temp4;\n    let url = new URL(request.url);\n    let method = request.method;\n    let location = createLocation(\"\", createPath(url), null, \"default\");\n    let matches = matchRoutes(dataRoutes, location, basename);\n    // SSR supports HEAD requests while SPA doesn't\n    if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n      throw getInternalRouterError(405, {\n        method\n      });\n    } else if (!matches) {\n      throw getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n    }\n    let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n    if (routeId && !match) {\n      throw getInternalRouterError(403, {\n        pathname: location.pathname,\n        routeId\n      });\n    } else if (!match) {\n      // This should never hit I don't think?\n      throw getInternalRouterError(404, {\n        pathname: location.pathname\n      });\n    }\n    let result = await queryImpl(request, location, matches, requestContext, dataStrategy || null, false, match);\n    if (isResponse(result)) {\n      return result;\n    }\n    let error = result.errors ? Object.values(result.errors)[0] : undefined;\n    if (error !== undefined) {\n      // If we got back result.errors, that means the loader/action threw\n      // _something_ that wasn't a Response, but it's not guaranteed/required\n      // to be an `instanceof Error` either, so we have to use throw here to\n      // preserve the \"error\" state outside of queryImpl.\n      throw error;\n    }\n    // Pick off the right state value to return\n    if (result.actionData) {\n      return Object.values(result.actionData)[0];\n    }\n    if (result.loaderData) {\n      var _result$activeDeferre;\n      let data = Object.values(result.loaderData)[0];\n      if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n        data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n      }\n      return data;\n    }\n    return undefined;\n  }\n  async function queryImpl(request, location, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch) {\n    invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n    try {\n      if (isMutationMethod(request.method.toLowerCase())) {\n        let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch != null);\n        return result;\n      }\n      let result = await loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch);\n      return isResponse(result) ? result : _extends({}, result, {\n        actionData: null,\n        actionHeaders: {}\n      });\n    } catch (e) {\n      // If the user threw/returned a Response in callLoaderOrAction for a\n      // `queryRoute` call, we throw the `DataStrategyResult` to bail out early\n      // and then return or throw the raw Response here accordingly\n      if (isDataStrategyResult(e) && isResponse(e.result)) {\n        if (e.type === ResultType.error) {\n          throw e.result;\n        }\n        return e.result;\n      }\n      // Redirects are always returned since they don't propagate to catch\n      // boundaries\n      if (isRedirectResponse(e)) {\n        return e;\n      }\n      throw e;\n    }\n  }\n  async function submit(request, matches, actionMatch, requestContext, dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {\n    let result;\n    if (!actionMatch.route.action && !actionMatch.route.lazy) {\n      let error = getInternalRouterError(405, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: actionMatch.route.id\n      });\n      if (isRouteRequest) {\n        throw error;\n      }\n      result = {\n        type: ResultType.error,\n        error\n      };\n    } else {\n      let results = await callDataStrategy(\"action\", request, [actionMatch], matches, isRouteRequest, requestContext, dataStrategy);\n      result = results[actionMatch.route.id];\n      if (request.signal.aborted) {\n        throwStaticHandlerAbortedError(request, isRouteRequest, future);\n      }\n    }\n    if (isRedirectResult(result)) {\n      // Uhhhh - this should never happen, we should always throw these from\n      // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n      // can get back on the \"throw all redirect responses\" train here should\n      // this ever happen :/\n      throw new Response(null, {\n        status: result.response.status,\n        headers: {\n          Location: result.response.headers.get(\"Location\")\n        }\n      });\n    }\n    if (isDeferredResult(result)) {\n      let error = getInternalRouterError(400, {\n        type: \"defer-action\"\n      });\n      if (isRouteRequest) {\n        throw error;\n      }\n      result = {\n        type: ResultType.error,\n        error\n      };\n    }\n    if (isRouteRequest) {\n      // Note: This should only be non-Response values if we get here, since\n      // isRouteRequest should throw any Response received in callLoaderOrAction\n      if (isErrorResult(result)) {\n        throw result.error;\n      }\n      return {\n        matches: [actionMatch],\n        loaderData: {},\n        actionData: {\n          [actionMatch.route.id]: result.data\n        },\n        errors: null,\n        // Note: statusCode + headers are unused here since queryRoute will\n        // return the raw Response or value\n        statusCode: 200,\n        loaderHeaders: {},\n        actionHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    // Create a GET request for the loaders\n    let loaderRequest = new Request(request.url, {\n      headers: request.headers,\n      redirect: request.redirect,\n      signal: request.signal\n    });\n    if (isErrorResult(result)) {\n      // Store off the pending error - we use it to determine which loaders\n      // to call and will commit it when we complete the navigation\n      let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);\n      let context = await loadRouteData(loaderRequest, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]);\n      // action status codes take precedence over loader status codes\n      return _extends({}, context, {\n        statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,\n        actionData: null,\n        actionHeaders: _extends({}, result.headers ? {\n          [actionMatch.route.id]: result.headers\n        } : {})\n      });\n    }\n    let context = await loadRouteData(loaderRequest, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, null);\n    return _extends({}, context, {\n      actionData: {\n        [actionMatch.route.id]: result.data\n      }\n    }, result.statusCode ? {\n      statusCode: result.statusCode\n    } : {}, {\n      actionHeaders: result.headers ? {\n        [actionMatch.route.id]: result.headers\n      } : {}\n    });\n  }\n  async function loadRouteData(request, matches, requestContext, dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {\n    let isRouteRequest = routeMatch != null;\n    // Short circuit if we have no loaders to run (queryRoute())\n    if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n      throw getInternalRouterError(400, {\n        method: request.method,\n        pathname: new URL(request.url).pathname,\n        routeId: routeMatch == null ? void 0 : routeMatch.route.id\n      });\n    }\n    let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;\n    let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n    // Short circuit if we have no loaders to run (query())\n    if (matchesToLoad.length === 0) {\n      return {\n        matches,\n        // Add a null for all matched routes for proper revalidation on the client\n        loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n          [m.route.id]: null\n        }), {}),\n        errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {\n          [pendingActionResult[0]]: pendingActionResult[1].error\n        } : null,\n        statusCode: 200,\n        loaderHeaders: {},\n        activeDeferreds: null\n      };\n    }\n    let results = await callDataStrategy(\"loader\", request, matchesToLoad, matches, isRouteRequest, requestContext, dataStrategy);\n    if (request.signal.aborted) {\n      throwStaticHandlerAbortedError(request, isRouteRequest, future);\n    }\n    // Process and commit output from loaders\n    let activeDeferreds = new Map();\n    let context = processRouteLoaderData(matches, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling);\n    // Add a null for any non-loader matches for proper revalidation on the client\n    let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n    matches.forEach(match => {\n      if (!executedLoaders.has(match.route.id)) {\n        context.loaderData[match.route.id] = null;\n      }\n    });\n    return _extends({}, context, {\n      matches,\n      activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n    });\n  }\n  // Utility wrapper for calling dataStrategy server-side without having to\n  // pass around the manifest, mapRouteProperties, etc.\n  async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, dataStrategy) {\n    let results = await callDataStrategyImpl(dataStrategy || defaultDataStrategy, type, null, request, matchesToLoad, matches, null, manifest, mapRouteProperties, requestContext);\n    let dataResults = {};\n    await Promise.all(matches.map(async match => {\n      if (!(match.route.id in results)) {\n        return;\n      }\n      let result = results[match.route.id];\n      if (isRedirectDataStrategyResultResult(result)) {\n        let response = result.result;\n        // Throw redirects and let the server handle them with an HTTP redirect\n        throw normalizeRelativeRoutingRedirectResponse(response, request, match.route.id, matches, basename, future.v7_relativeSplatPath);\n      }\n      if (isResponse(result.result) && isRouteRequest) {\n        // For SSR single-route requests, we want to hand Responses back\n        // directly without unwrapping\n        throw result;\n      }\n      dataResults[match.route.id] = await convertDataStrategyResultToDataResult(result);\n    }));\n    return dataResults;\n  }\n  return {\n    dataRoutes,\n    query,\n    queryRoute\n  };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n  let newContext = _extends({}, context, {\n    statusCode: isRouteErrorResponse(error) ? error.status : 500,\n    errors: {\n      [context._deepestRenderedBoundaryId || routes[0].id]: error\n    }\n  });\n  return newContext;\n}\nfunction throwStaticHandlerAbortedError(request, isRouteRequest, future) {\n  if (future.v7_throwAbortReason && request.signal.reason !== undefined) {\n    throw request.signal.reason;\n  }\n  let method = isRouteRequest ? \"queryRoute\" : \"query\";\n  throw new Error(method + \"() call aborted: \" + request.method + \" \" + request.url);\n}\nfunction isSubmissionNavigation(opts) {\n  return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {\n  let contextualMatches;\n  let activeRouteMatch;\n  if (fromRouteId) {\n    // Grab matches up to the calling route so our route-relative logic is\n    // relative to the correct source route\n    contextualMatches = [];\n    for (let match of matches) {\n      contextualMatches.push(match);\n      if (match.route.id === fromRouteId) {\n        activeRouteMatch = match;\n        break;\n      }\n    }\n  } else {\n    contextualMatches = matches;\n    activeRouteMatch = matches[matches.length - 1];\n  }\n  // Resolve the relative path\n  let path = resolveTo(to ? to : \".\", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === \"path\");\n  // When `to` is not specified we inherit search/hash from the current\n  // location, unlike when to=\".\" and we just inherit the path.\n  // See https://github.com/remix-run/remix/issues/927\n  if (to == null) {\n    path.search = location.search;\n    path.hash = location.hash;\n  }\n  // Account for `?index` params when routing to the current location\n  if ((to == null || to === \"\" || to === \".\") && activeRouteMatch) {\n    let nakedIndex = hasNakedIndexQuery(path.search);\n    if (activeRouteMatch.route.index && !nakedIndex) {\n      // Add one when we're targeting an index route\n      path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n    } else if (!activeRouteMatch.route.index && nakedIndex) {\n      // Remove existing ones when we're not\n      let params = new URLSearchParams(path.search);\n      let indexValues = params.getAll(\"index\");\n      params.delete(\"index\");\n      indexValues.filter(v => v).forEach(v => params.append(\"index\", v));\n      let qs = params.toString();\n      path.search = qs ? \"?\" + qs : \"\";\n    }\n  }\n  // If we're operating within a basename, prepend it to the pathname.  If\n  // this is a root navigation, then just use the raw basename which allows\n  // the basename to have full control over the presence of a trailing slash\n  // on root actions\n  if (prependBasename && basename !== \"/\") {\n    path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n  }\n  return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n  // Return location verbatim on non-submission navigations\n  if (!opts || !isSubmissionNavigation(opts)) {\n    return {\n      path\n    };\n  }\n  if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n    return {\n      path,\n      error: getInternalRouterError(405, {\n        method: opts.formMethod\n      })\n    };\n  }\n  let getInvalidBodyError = () => ({\n    path,\n    error: getInternalRouterError(400, {\n      type: \"invalid-body\"\n    })\n  });\n  // Create a Submission on non-GET navigations\n  let rawFormMethod = opts.formMethod || \"get\";\n  let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n  let formAction = stripHashFromPath(path);\n  if (opts.body !== undefined) {\n    if (opts.formEncType === \"text/plain\") {\n      // text only support POST/PUT/PATCH/DELETE submissions\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n      // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n      Array.from(opts.body.entries()).reduce((acc, _ref3) => {\n        let [name, value] = _ref3;\n        return \"\" + acc + name + \"=\" + value + \"\\n\";\n      }, \"\") : String(opts.body);\n      return {\n        path,\n        submission: {\n          formMethod,\n          formAction,\n          formEncType: opts.formEncType,\n          formData: undefined,\n          json: undefined,\n          text\n        }\n      };\n    } else if (opts.formEncType === \"application/json\") {\n      // json only supports POST/PUT/PATCH/DELETE submissions\n      if (!isMutationMethod(formMethod)) {\n        return getInvalidBodyError();\n      }\n      try {\n        let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n        return {\n          path,\n          submission: {\n            formMethod,\n            formAction,\n            formEncType: opts.formEncType,\n            formData: undefined,\n            json,\n            text: undefined\n          }\n        };\n      } catch (e) {\n        return getInvalidBodyError();\n      }\n    }\n  }\n  invariant(typeof FormData === \"function\", \"FormData is not available in this environment\");\n  let searchParams;\n  let formData;\n  if (opts.formData) {\n    searchParams = convertFormDataToSearchParams(opts.formData);\n    formData = opts.formData;\n  } else if (opts.body instanceof FormData) {\n    searchParams = convertFormDataToSearchParams(opts.body);\n    formData = opts.body;\n  } else if (opts.body instanceof URLSearchParams) {\n    searchParams = opts.body;\n    formData = convertSearchParamsToFormData(searchParams);\n  } else if (opts.body == null) {\n    searchParams = new URLSearchParams();\n    formData = new FormData();\n  } else {\n    try {\n      searchParams = new URLSearchParams(opts.body);\n      formData = convertSearchParamsToFormData(searchParams);\n    } catch (e) {\n      return getInvalidBodyError();\n    }\n  }\n  let submission = {\n    formMethod,\n    formAction,\n    formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n    formData,\n    json: undefined,\n    text: undefined\n  };\n  if (isMutationMethod(submission.formMethod)) {\n    return {\n      path,\n      submission\n    };\n  }\n  // Flatten submission onto URLSearchParams for GET submissions\n  let parsedPath = parsePath(path);\n  // On GET navigation submissions we can drop the ?index param from the\n  // resulting location since all loaders will run.  But fetcher GET submissions\n  // only run a single loader so we need to preserve any incoming ?index params\n  if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n    searchParams.append(\"index\", \"\");\n  }\n  parsedPath.search = \"?\" + searchParams;\n  return {\n    path: createPath(parsedPath),\n    submission\n  };\n}\n// Filter out all routes at/below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId, includeBoundary) {\n  if (includeBoundary === void 0) {\n    includeBoundary = false;\n  }\n  let index = matches.findIndex(m => m.route.id === boundaryId);\n  if (index >= 0) {\n    return matches.slice(0, includeBoundary ? index + 1 : index);\n  }\n  return matches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, initialHydration, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) {\n  let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined;\n  let currentUrl = history.createURL(state.location);\n  let nextUrl = history.createURL(location);\n  // Pick navigation matches that are net-new or qualify for revalidation\n  let boundaryMatches = matches;\n  if (initialHydration && state.errors) {\n    // On initial hydration, only consider matches up to _and including_ the boundary.\n    // This is inclusive to handle cases where a server loader ran successfully,\n    // a child server loader bubbled up to this route, but this route has\n    // `clientLoader.hydrate` so we want to still run the `clientLoader` so that\n    // we have a complete version of `loaderData`\n    boundaryMatches = getLoaderMatchesUntilBoundary(matches, Object.keys(state.errors)[0], true);\n  } else if (pendingActionResult && isErrorResult(pendingActionResult[1])) {\n    // If an action threw an error, we call loaders up to, but not including the\n    // boundary\n    boundaryMatches = getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]);\n  }\n  // Don't revalidate loaders by default after action 4xx/5xx responses\n  // when the flag is enabled.  They can still opt-into revalidation via\n  // `shouldRevalidate` via `actionResult`\n  let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined;\n  let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400;\n  let navigationMatches = boundaryMatches.filter((match, index) => {\n    let {\n      route\n    } = match;\n    if (route.lazy) {\n      // We haven't loaded this route yet so we don't know if it's got a loader!\n      return true;\n    }\n    if (route.loader == null) {\n      return false;\n    }\n    if (initialHydration) {\n      return shouldLoadRouteOnHydration(route, state.loaderData, state.errors);\n    }\n    // Always call the loader on new route instances and pending defer cancellations\n    if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n      return true;\n    }\n    // This is the default implementation for when we revalidate.  If the route\n    // provides it's own implementation, then we give them full control but\n    // provide this value so they can leverage it if needed after they check\n    // their own specific use cases\n    let currentRouteMatch = state.matches[index];\n    let nextRouteMatch = match;\n    return shouldRevalidateLoader(match, _extends({\n      currentUrl,\n      currentParams: currentRouteMatch.params,\n      nextUrl,\n      nextParams: nextRouteMatch.params\n    }, submission, {\n      actionResult,\n      actionStatus,\n      defaultShouldRevalidate: shouldSkipRevalidation ? false :\n      // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n      isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n      // Search params affect all loaders\n      currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n    }));\n  });\n  // Pick fetcher.loads that need to be revalidated\n  let revalidatingFetchers = [];\n  fetchLoadMatches.forEach((f, key) => {\n    // Don't revalidate:\n    //  - on initial hydration (shouldn't be any fetchers then anyway)\n    //  - if fetcher won't be present in the subsequent render\n    //    - no longer matches the URL (v7_fetcherPersist=false)\n    //    - was unmounted but persisted due to v7_fetcherPersist=true\n    if (initialHydration || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {\n      return;\n    }\n    let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n    // If the fetcher path no longer matches, push it in with null matches so\n    // we can trigger a 404 in callLoadersAndMaybeResolveData.  Note this is\n    // currently only a use-case for Remix HMR where the route tree can change\n    // at runtime and remove a route previously loaded via a fetcher\n    if (!fetcherMatches) {\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: null,\n        match: null,\n        controller: null\n      });\n      return;\n    }\n    // Revalidating fetchers are decoupled from the route matches since they\n    // load from a static href.  They revalidate based on explicit revalidation\n    // (submission, useRevalidator, or X-Remix-Revalidate)\n    let fetcher = state.fetchers.get(key);\n    let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n    let shouldRevalidate = false;\n    if (fetchRedirectIds.has(key)) {\n      // Never trigger a revalidation of an actively redirecting fetcher\n      shouldRevalidate = false;\n    } else if (cancelledFetcherLoads.has(key)) {\n      // Always mark for revalidation if the fetcher was cancelled\n      cancelledFetcherLoads.delete(key);\n      shouldRevalidate = true;\n    } else if (fetcher && fetcher.state !== \"idle\" && fetcher.data === undefined) {\n      // If the fetcher hasn't ever completed loading yet, then this isn't a\n      // revalidation, it would just be a brand new load if an explicit\n      // revalidation is required\n      shouldRevalidate = isRevalidationRequired;\n    } else {\n      // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n      // to explicit revalidations only\n      shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n        currentUrl,\n        currentParams: state.matches[state.matches.length - 1].params,\n        nextUrl,\n        nextParams: matches[matches.length - 1].params\n      }, submission, {\n        actionResult,\n        actionStatus,\n        defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired\n      }));\n    }\n    if (shouldRevalidate) {\n      revalidatingFetchers.push({\n        key,\n        routeId: f.routeId,\n        path: f.path,\n        matches: fetcherMatches,\n        match: fetcherMatch,\n        controller: new AbortController()\n      });\n    }\n  });\n  return [navigationMatches, revalidatingFetchers];\n}\nfunction shouldLoadRouteOnHydration(route, loaderData, errors) {\n  // We dunno if we have a loader - gotta find out!\n  if (route.lazy) {\n    return true;\n  }\n  // No loader, nothing to initialize\n  if (!route.loader) {\n    return false;\n  }\n  let hasData = loaderData != null && loaderData[route.id] !== undefined;\n  let hasError = errors != null && errors[route.id] !== undefined;\n  // Don't run if we error'd during SSR\n  if (!hasData && hasError) {\n    return false;\n  }\n  // Explicitly opting-in to running on hydration\n  if (typeof route.loader === \"function\" && route.loader.hydrate === true) {\n    return true;\n  }\n  // Otherwise, run if we're not yet initialized with anything\n  return !hasData && !hasError;\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n  let isNew =\n  // [a] -> [a, b]\n  !currentMatch ||\n  // [a, b] -> [a, c]\n  match.route.id !== currentMatch.route.id;\n  // Handle the case that we don't have data for a re-used route, potentially\n  // from a prior error or from a cancelled pending deferred\n  let isMissingData = currentLoaderData[match.route.id] === undefined;\n  // Always load if this is a net-new route or we don't yet have data\n  return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n  let currentPath = currentMatch.route.path;\n  return (\n    // param change for this match, /users/123 -> /users/456\n    currentMatch.pathname !== match.pathname ||\n    // splat param changed, which is not present in match.path\n    // e.g. /files/images/avatar.jpg -> files/finances.xls\n    currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n  );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n  if (loaderMatch.route.shouldRevalidate) {\n    let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n    if (typeof routeChoice === \"boolean\") {\n      return routeChoice;\n    }\n  }\n  return arg.defaultShouldRevalidate;\n}\nfunction patchRoutesImpl(routeId, children, routesToUse, manifest, mapRouteProperties) {\n  var _childrenToPatch;\n  let childrenToPatch;\n  if (routeId) {\n    let route = manifest[routeId];\n    invariant(route, \"No route found to patch children into: routeId = \" + routeId);\n    if (!route.children) {\n      route.children = [];\n    }\n    childrenToPatch = route.children;\n  } else {\n    childrenToPatch = routesToUse;\n  }\n  // Don't patch in routes we already know about so that `patch` is idempotent\n  // to simplify user-land code. This is useful because we re-call the\n  // `patchRoutesOnNavigation` function for matched routes with params.\n  let uniqueChildren = children.filter(newRoute => !childrenToPatch.some(existingRoute => isSameRoute(newRoute, existingRoute)));\n  let newRoutes = convertRoutesToDataRoutes(uniqueChildren, mapRouteProperties, [routeId || \"_\", \"patch\", String(((_childrenToPatch = childrenToPatch) == null ? void 0 : _childrenToPatch.length) || \"0\")], manifest);\n  childrenToPatch.push(...newRoutes);\n}\nfunction isSameRoute(newRoute, existingRoute) {\n  // Most optimal check is by id\n  if (\"id\" in newRoute && \"id\" in existingRoute && newRoute.id === existingRoute.id) {\n    return true;\n  }\n  // Second is by pathing differences\n  if (!(newRoute.index === existingRoute.index && newRoute.path === existingRoute.path && newRoute.caseSensitive === existingRoute.caseSensitive)) {\n    return false;\n  }\n  // Pathless layout routes are trickier since we need to check children.\n  // If they have no children then they're the same as far as we can tell\n  if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {\n    return true;\n  }\n  // Otherwise, we look to see if every child in the new route is already\n  // represented in the existing route's children\n  return newRoute.children.every((aChild, i) => {\n    var _existingRoute$childr;\n    return (_existingRoute$childr = existingRoute.children) == null ? void 0 : _existingRoute$childr.some(bChild => isSameRoute(aChild, bChild));\n  });\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n  if (!route.lazy) {\n    return;\n  }\n  let lazyRoute = await route.lazy();\n  // If the lazy route function was executed and removed by another parallel\n  // call then we can return - first lazy() to finish wins because the return\n  // value of lazy is expected to be static\n  if (!route.lazy) {\n    return;\n  }\n  let routeToUpdate = manifest[route.id];\n  invariant(routeToUpdate, \"No route found in manifest\");\n  // Update the route in place.  This should be safe because there's no way\n  // we could yet be sitting on this route as we can't get there without\n  // resolving lazy() first.\n  //\n  // This is different than the HMR \"update\" use-case where we may actively be\n  // on the route being updated.  The main concern boils down to \"does this\n  // mutation affect any ongoing navigations or any current state.matches\n  // values?\".  If not, it should be safe to update in place.\n  let routeUpdates = {};\n  for (let lazyRouteProperty in lazyRoute) {\n    let staticRouteValue = routeToUpdate[lazyRouteProperty];\n    let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n    // This property isn't static since it should always be updated based\n    // on the route updates\n    lazyRouteProperty !== \"hasErrorBoundary\";\n    warning(!isPropertyStaticallyDefined, \"Route \\\"\" + routeToUpdate.id + \"\\\" has a static property \\\"\" + lazyRouteProperty + \"\\\" \" + \"defined but its lazy function is also returning a value for this property. \" + (\"The lazy route property \\\"\" + lazyRouteProperty + \"\\\" will be ignored.\"));\n    if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n      routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n    }\n  }\n  // Mutate the route with the provided updates.  Do this first so we pass\n  // the updated version to mapRouteProperties\n  Object.assign(routeToUpdate, routeUpdates);\n  // Mutate the `hasErrorBoundary` property on the route based on the route\n  // updates and remove the `lazy` function so we don't resolve the lazy\n  // route again.\n  Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n    lazy: undefined\n  }));\n}\n// Default implementation of `dataStrategy` which fetches all loaders in parallel\nasync function defaultDataStrategy(_ref4) {\n  let {\n    matches\n  } = _ref4;\n  let matchesToLoad = matches.filter(m => m.shouldLoad);\n  let results = await Promise.all(matchesToLoad.map(m => m.resolve()));\n  return results.reduce((acc, result, i) => Object.assign(acc, {\n    [matchesToLoad[i].route.id]: result\n  }), {});\n}\nasync function callDataStrategyImpl(dataStrategyImpl, type, state, request, matchesToLoad, matches, fetcherKey, manifest, mapRouteProperties, requestContext) {\n  let loadRouteDefinitionsPromises = matches.map(m => m.route.lazy ? loadLazyRouteModule(m.route, mapRouteProperties, manifest) : undefined);\n  let dsMatches = matches.map((match, i) => {\n    let loadRoutePromise = loadRouteDefinitionsPromises[i];\n    let shouldLoad = matchesToLoad.some(m => m.route.id === match.route.id);\n    // `resolve` encapsulates route.lazy(), executing the loader/action,\n    // and mapping return values/thrown errors to a `DataStrategyResult`.  Users\n    // can pass a callback to take fine-grained control over the execution\n    // of the loader/action\n    let resolve = async handlerOverride => {\n      if (handlerOverride && request.method === \"GET\" && (match.route.lazy || match.route.loader)) {\n        shouldLoad = true;\n      }\n      return shouldLoad ? callLoaderOrAction(type, request, match, loadRoutePromise, handlerOverride, requestContext) : Promise.resolve({\n        type: ResultType.data,\n        result: undefined\n      });\n    };\n    return _extends({}, match, {\n      shouldLoad,\n      resolve\n    });\n  });\n  // Send all matches here to allow for a middleware-type implementation.\n  // handler will be a no-op for unneeded routes and we filter those results\n  // back out below.\n  let results = await dataStrategyImpl({\n    matches: dsMatches,\n    request,\n    params: matches[0].params,\n    fetcherKey,\n    context: requestContext\n  });\n  // Wait for all routes to load here but 'swallow the error since we want\n  // it to bubble up from the `await loadRoutePromise` in `callLoaderOrAction` -\n  // called from `match.resolve()`\n  try {\n    await Promise.all(loadRouteDefinitionsPromises);\n  } catch (e) {\n    // No-op\n  }\n  return results;\n}\n// Default logic for calling a loader/action is the user has no specified a dataStrategy\nasync function callLoaderOrAction(type, request, match, loadRoutePromise, handlerOverride, staticContext) {\n  let result;\n  let onReject;\n  let runHandler = handler => {\n    // Setup a promise we can race against so that abort signals short circuit\n    let reject;\n    // This will never resolve so safe to type it as Promise<DataStrategyResult> to\n    // satisfy the function return value\n    let abortPromise = new Promise((_, r) => reject = r);\n    onReject = () => reject();\n    request.signal.addEventListener(\"abort\", onReject);\n    let actualHandler = ctx => {\n      if (typeof handler !== \"function\") {\n        return Promise.reject(new Error(\"You cannot call the handler for a route which defines a boolean \" + (\"\\\"\" + type + \"\\\" [routeId: \" + match.route.id + \"]\")));\n      }\n      return handler({\n        request,\n        params: match.params,\n        context: staticContext\n      }, ...(ctx !== undefined ? [ctx] : []));\n    };\n    let handlerPromise = (async () => {\n      try {\n        let val = await (handlerOverride ? handlerOverride(ctx => actualHandler(ctx)) : actualHandler());\n        return {\n          type: \"data\",\n          result: val\n        };\n      } catch (e) {\n        return {\n          type: \"error\",\n          result: e\n        };\n      }\n    })();\n    return Promise.race([handlerPromise, abortPromise]);\n  };\n  try {\n    let handler = match.route[type];\n    // If we have a route.lazy promise, await that first\n    if (loadRoutePromise) {\n      if (handler) {\n        // Run statically defined handler in parallel with lazy()\n        let handlerError;\n        let [value] = await Promise.all([\n        // If the handler throws, don't let it immediately bubble out,\n        // since we need to let the lazy() execution finish so we know if this\n        // route has a boundary that can handle the error\n        runHandler(handler).catch(e => {\n          handlerError = e;\n        }), loadRoutePromise]);\n        if (handlerError !== undefined) {\n          throw handlerError;\n        }\n        result = value;\n      } else {\n        // Load lazy route module, then run any returned handler\n        await loadRoutePromise;\n        handler = match.route[type];\n        if (handler) {\n          // Handler still runs even if we got interrupted to maintain consistency\n          // with un-abortable behavior of handler execution on non-lazy or\n          // previously-lazy-loaded routes\n          result = await runHandler(handler);\n        } else if (type === \"action\") {\n          let url = new URL(request.url);\n          let pathname = url.pathname + url.search;\n          throw getInternalRouterError(405, {\n            method: request.method,\n            pathname,\n            routeId: match.route.id\n          });\n        } else {\n          // lazy() route has no loader to run.  Short circuit here so we don't\n          // hit the invariant below that errors on returning undefined.\n          return {\n            type: ResultType.data,\n            result: undefined\n          };\n        }\n      }\n    } else if (!handler) {\n      let url = new URL(request.url);\n      let pathname = url.pathname + url.search;\n      throw getInternalRouterError(404, {\n        pathname\n      });\n    } else {\n      result = await runHandler(handler);\n    }\n    invariant(result.result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n  } catch (e) {\n    // We should already be catching and converting normal handler executions to\n    // DataStrategyResults and returning them, so anything that throws here is an\n    // unexpected error we still need to wrap\n    return {\n      type: ResultType.error,\n      result: e\n    };\n  } finally {\n    if (onReject) {\n      request.signal.removeEventListener(\"abort\", onReject);\n    }\n  }\n  return result;\n}\nasync function convertDataStrategyResultToDataResult(dataStrategyResult) {\n  let {\n    result,\n    type\n  } = dataStrategyResult;\n  if (isResponse(result)) {\n    let data;\n    try {\n      let contentType = result.headers.get(\"Content-Type\");\n      // Check between word boundaries instead of startsWith() due to the last\n      // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n      if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n        if (result.body == null) {\n          data = null;\n        } else {\n          data = await result.json();\n        }\n      } else {\n        data = await result.text();\n      }\n    } catch (e) {\n      return {\n        type: ResultType.error,\n        error: e\n      };\n    }\n    if (type === ResultType.error) {\n      return {\n        type: ResultType.error,\n        error: new ErrorResponseImpl(result.status, result.statusText, data),\n        statusCode: result.status,\n        headers: result.headers\n      };\n    }\n    return {\n      type: ResultType.data,\n      data,\n      statusCode: result.status,\n      headers: result.headers\n    };\n  }\n  if (type === ResultType.error) {\n    if (isDataWithResponseInit(result)) {\n      var _result$init3, _result$init4;\n      if (result.data instanceof Error) {\n        var _result$init, _result$init2;\n        return {\n          type: ResultType.error,\n          error: result.data,\n          statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n          headers: (_result$init2 = result.init) != null && _result$init2.headers ? new Headers(result.init.headers) : undefined\n        };\n      }\n      // Convert thrown data() to ErrorResponse instances\n      return {\n        type: ResultType.error,\n        error: new ErrorResponseImpl(((_result$init3 = result.init) == null ? void 0 : _result$init3.status) || 500, undefined, result.data),\n        statusCode: isRouteErrorResponse(result) ? result.status : undefined,\n        headers: (_result$init4 = result.init) != null && _result$init4.headers ? new Headers(result.init.headers) : undefined\n      };\n    }\n    return {\n      type: ResultType.error,\n      error: result,\n      statusCode: isRouteErrorResponse(result) ? result.status : undefined\n    };\n  }\n  if (isDeferredData(result)) {\n    var _result$init5, _result$init6;\n    return {\n      type: ResultType.deferred,\n      deferredData: result,\n      statusCode: (_result$init5 = result.init) == null ? void 0 : _result$init5.status,\n      headers: ((_result$init6 = result.init) == null ? void 0 : _result$init6.headers) && new Headers(result.init.headers)\n    };\n  }\n  if (isDataWithResponseInit(result)) {\n    var _result$init7, _result$init8;\n    return {\n      type: ResultType.data,\n      data: result.data,\n      statusCode: (_result$init7 = result.init) == null ? void 0 : _result$init7.status,\n      headers: (_result$init8 = result.init) != null && _result$init8.headers ? new Headers(result.init.headers) : undefined\n    };\n  }\n  return {\n    type: ResultType.data,\n    data: result\n  };\n}\n// Support relative routing in internal redirects\nfunction normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) {\n  let location = response.headers.get(\"Location\");\n  invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n  if (!ABSOLUTE_URL_REGEX.test(location)) {\n    let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1);\n    location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath);\n    response.headers.set(\"Location\", location);\n  }\n  return response;\n}\nfunction normalizeRedirectLocation(location, currentUrl, basename) {\n  if (ABSOLUTE_URL_REGEX.test(location)) {\n    // Strip off the protocol+origin for same-origin + same-basename absolute redirects\n    let normalizedLocation = location;\n    let url = normalizedLocation.startsWith(\"//\") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);\n    let isSameBasename = stripBasename(url.pathname, basename) != null;\n    if (url.origin === currentUrl.origin && isSameBasename) {\n      return url.pathname + url.search + url.hash;\n    }\n  }\n  return location;\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches.  During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n  let url = history.createURL(stripHashFromPath(location)).toString();\n  let init = {\n    signal\n  };\n  if (submission && isMutationMethod(submission.formMethod)) {\n    let {\n      formMethod,\n      formEncType\n    } = submission;\n    // Didn't think we needed this but it turns out unlike other methods, patch\n    // won't be properly normalized to uppercase and results in a 405 error.\n    // See: https://fetch.spec.whatwg.org/#concept-method\n    init.method = formMethod.toUpperCase();\n    if (formEncType === \"application/json\") {\n      init.headers = new Headers({\n        \"Content-Type\": formEncType\n      });\n      init.body = JSON.stringify(submission.json);\n    } else if (formEncType === \"text/plain\") {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = submission.text;\n    } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = convertFormDataToSearchParams(submission.formData);\n    } else {\n      // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n      init.body = submission.formData;\n    }\n  }\n  return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n  let searchParams = new URLSearchParams();\n  for (let [key, value] of formData.entries()) {\n    // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n    searchParams.append(key, typeof value === \"string\" ? value : value.name);\n  }\n  return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n  let formData = new FormData();\n  for (let [key, value] of searchParams.entries()) {\n    formData.append(key, value);\n  }\n  return formData;\n}\nfunction processRouteLoaderData(matches, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) {\n  // Fill in loaderData/errors from our loaders\n  let loaderData = {};\n  let errors = null;\n  let statusCode;\n  let foundError = false;\n  let loaderHeaders = {};\n  let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined;\n  // Process loader results into state.loaderData/state.errors\n  matches.forEach(match => {\n    if (!(match.route.id in results)) {\n      return;\n    }\n    let id = match.route.id;\n    let result = results[id];\n    invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n    if (isErrorResult(result)) {\n      let error = result.error;\n      // If we have a pending action error, we report it at the highest-route\n      // that throws a loader error, and then clear it out to indicate that\n      // it was consumed\n      if (pendingError !== undefined) {\n        error = pendingError;\n        pendingError = undefined;\n      }\n      errors = errors || {};\n      if (skipLoaderErrorBubbling) {\n        errors[id] = error;\n      } else {\n        // Look upwards from the matched route for the closest ancestor error\n        // boundary, defaulting to the root match.  Prefer higher error values\n        // if lower errors bubble to the same boundary\n        let boundaryMatch = findNearestBoundary(matches, id);\n        if (errors[boundaryMatch.route.id] == null) {\n          errors[boundaryMatch.route.id] = error;\n        }\n      }\n      // Clear our any prior loaderData for the throwing route\n      loaderData[id] = undefined;\n      // Once we find our first (highest) error, we set the status code and\n      // prevent deeper status codes from overriding\n      if (!foundError) {\n        foundError = true;\n        statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n      }\n      if (result.headers) {\n        loaderHeaders[id] = result.headers;\n      }\n    } else {\n      if (isDeferredResult(result)) {\n        activeDeferreds.set(id, result.deferredData);\n        loaderData[id] = result.deferredData.data;\n        // Error status codes always override success status codes, but if all\n        // loaders are successful we take the deepest status code.\n        if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n          statusCode = result.statusCode;\n        }\n        if (result.headers) {\n          loaderHeaders[id] = result.headers;\n        }\n      } else {\n        loaderData[id] = result.data;\n        // Error status codes always override success status codes, but if all\n        // loaders are successful we take the deepest status code.\n        if (result.statusCode && result.statusCode !== 200 && !foundError) {\n          statusCode = result.statusCode;\n        }\n        if (result.headers) {\n          loaderHeaders[id] = result.headers;\n        }\n      }\n    }\n  });\n  // If we didn't consume the pending action error (i.e., all loaders\n  // resolved), then consume it here.  Also clear out any loaderData for the\n  // throwing route\n  if (pendingError !== undefined && pendingActionResult) {\n    errors = {\n      [pendingActionResult[0]]: pendingError\n    };\n    loaderData[pendingActionResult[0]] = undefined;\n  }\n  return {\n    loaderData,\n    errors,\n    statusCode: statusCode || 200,\n    loaderHeaders\n  };\n}\nfunction processLoaderData(state, matches, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) {\n  let {\n    loaderData,\n    errors\n  } = processRouteLoaderData(matches, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble\n  );\n  // Process results from our revalidating fetchers\n  revalidatingFetchers.forEach(rf => {\n    let {\n      key,\n      match,\n      controller\n    } = rf;\n    let result = fetcherResults[key];\n    invariant(result, \"Did not find corresponding fetcher result\");\n    // Process fetcher non-redirect errors\n    if (controller && controller.signal.aborted) {\n      // Nothing to do for aborted fetchers\n      return;\n    } else if (isErrorResult(result)) {\n      let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n      if (!(errors && errors[boundaryMatch.route.id])) {\n        errors = _extends({}, errors, {\n          [boundaryMatch.route.id]: result.error\n        });\n      }\n      state.fetchers.delete(key);\n    } else if (isRedirectResult(result)) {\n      // Should never get here, redirects should get processed above, but we\n      // keep this to type narrow to a success result in the else\n      invariant(false, \"Unhandled fetcher revalidation redirect\");\n    } else if (isDeferredResult(result)) {\n      // Should never get here, deferred data should be awaited for fetchers\n      // in resolveDeferredResults\n      invariant(false, \"Unhandled fetcher deferred data\");\n    } else {\n      let doneFetcher = getDoneFetcher(result.data);\n      state.fetchers.set(key, doneFetcher);\n    }\n  });\n  return {\n    loaderData,\n    errors\n  };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n  let mergedLoaderData = _extends({}, newLoaderData);\n  for (let match of matches) {\n    let id = match.route.id;\n    if (newLoaderData.hasOwnProperty(id)) {\n      if (newLoaderData[id] !== undefined) {\n        mergedLoaderData[id] = newLoaderData[id];\n      }\n    } else if (loaderData[id] !== undefined && match.route.loader) {\n      // Preserve existing keys not included in newLoaderData and where a loader\n      // wasn't removed by HMR\n      mergedLoaderData[id] = loaderData[id];\n    }\n    if (errors && errors.hasOwnProperty(id)) {\n      // Don't keep any loader data below the boundary\n      break;\n    }\n  }\n  return mergedLoaderData;\n}\nfunction getActionDataForCommit(pendingActionResult) {\n  if (!pendingActionResult) {\n    return {};\n  }\n  return isErrorResult(pendingActionResult[1]) ? {\n    // Clear out prior actionData on errors\n    actionData: {}\n  } : {\n    actionData: {\n      [pendingActionResult[0]]: pendingActionResult[1].data\n    }\n  };\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n  let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n  return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n  // Prefer a root layout route if present, otherwise shim in a route object\n  let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === \"/\") || {\n    id: \"__shim-error-route__\"\n  };\n  return {\n    matches: [{\n      params: {},\n      pathname: \"\",\n      pathnameBase: \"\",\n      route\n    }],\n    route\n  };\n}\nfunction getInternalRouterError(status, _temp5) {\n  let {\n    pathname,\n    routeId,\n    method,\n    type,\n    message\n  } = _temp5 === void 0 ? {} : _temp5;\n  let statusText = \"Unknown Server Error\";\n  let errorMessage = \"Unknown @remix-run/router error\";\n  if (status === 400) {\n    statusText = \"Bad Request\";\n    if (method && pathname && routeId) {\n      errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n    } else if (type === \"defer-action\") {\n      errorMessage = \"defer() is not supported in actions\";\n    } else if (type === \"invalid-body\") {\n      errorMessage = \"Unable to encode submission body\";\n    }\n  } else if (status === 403) {\n    statusText = \"Forbidden\";\n    errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n  } else if (status === 404) {\n    statusText = \"Not Found\";\n    errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n  } else if (status === 405) {\n    statusText = \"Method Not Allowed\";\n    if (method && pathname && routeId) {\n      errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n    } else if (method) {\n      errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n    }\n  }\n  return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n  let entries = Object.entries(results);\n  for (let i = entries.length - 1; i >= 0; i--) {\n    let [key, result] = entries[i];\n    if (isRedirectResult(result)) {\n      return {\n        key,\n        result\n      };\n    }\n  }\n}\nfunction stripHashFromPath(path) {\n  let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n  return createPath(_extends({}, parsedPath, {\n    hash: \"\"\n  }));\n}\nfunction isHashChangeOnly(a, b) {\n  if (a.pathname !== b.pathname || a.search !== b.search) {\n    return false;\n  }\n  if (a.hash === \"\") {\n    // /page -> /page#hash\n    return b.hash !== \"\";\n  } else if (a.hash === b.hash) {\n    // /page#hash -> /page#hash\n    return true;\n  } else if (b.hash !== \"\") {\n    // /page#hash -> /page#other\n    return true;\n  }\n  // If the hash is removed the browser will re-perform a request to the server\n  // /page#hash -> /page\n  return false;\n}\nfunction isDataStrategyResult(result) {\n  return result != null && typeof result === \"object\" && \"type\" in result && \"result\" in result && (result.type === ResultType.data || result.type === ResultType.error);\n}\nfunction isRedirectDataStrategyResultResult(result) {\n  return isResponse(result.result) && redirectStatusCodes.has(result.result.status);\n}\nfunction isDeferredResult(result) {\n  return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n  return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n  return (result && result.type) === ResultType.redirect;\n}\nfunction isDataWithResponseInit(value) {\n  return typeof value === \"object\" && value != null && \"type\" in value && \"data\" in value && \"init\" in value && value.type === \"DataWithResponseInit\";\n}\nfunction isDeferredData(value) {\n  let deferred = value;\n  return deferred && typeof deferred === \"object\" && typeof deferred.data === \"object\" && typeof deferred.subscribe === \"function\" && typeof deferred.cancel === \"function\" && typeof deferred.resolveData === \"function\";\n}\nfunction isResponse(value) {\n  return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectResponse(result) {\n  if (!isResponse(result)) {\n    return false;\n  }\n  let status = result.status;\n  let location = result.headers.get(\"Location\");\n  return status >= 300 && status <= 399 && location != null;\n}\nfunction isValidMethod(method) {\n  return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n  return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveNavigationDeferredResults(matches, results, signal, currentMatches, currentLoaderData) {\n  let entries = Object.entries(results);\n  for (let index = 0; index < entries.length; index++) {\n    let [routeId, result] = entries[index];\n    let match = matches.find(m => (m == null ? void 0 : m.route.id) === routeId);\n    // If we don't have a match, then we can have a deferred result to do\n    // anything with.  This is for revalidating fetchers where the route was\n    // removed during HMR\n    if (!match) {\n      continue;\n    }\n    let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n    let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n    if (isDeferredResult(result) && isRevalidatingLoader) {\n      // Note: we do not have to touch activeDeferreds here since we race them\n      // against the signal in resolveDeferredData and they'll get aborted\n      // there if needed\n      await resolveDeferredData(result, signal, false).then(result => {\n        if (result) {\n          results[routeId] = result;\n        }\n      });\n    }\n  }\n}\nasync function resolveFetcherDeferredResults(matches, results, revalidatingFetchers) {\n  for (let index = 0; index < revalidatingFetchers.length; index++) {\n    let {\n      key,\n      routeId,\n      controller\n    } = revalidatingFetchers[index];\n    let result = results[key];\n    let match = matches.find(m => (m == null ? void 0 : m.route.id) === routeId);\n    // If we don't have a match, then we can have a deferred result to do\n    // anything with.  This is for revalidating fetchers where the route was\n    // removed during HMR\n    if (!match) {\n      continue;\n    }\n    if (isDeferredResult(result)) {\n      // Note: we do not have to touch activeDeferreds here since we race them\n      // against the signal in resolveDeferredData and they'll get aborted\n      // there if needed\n      invariant(controller, \"Expected an AbortController for revalidating fetcher deferred result\");\n      await resolveDeferredData(result, controller.signal, true).then(result => {\n        if (result) {\n          results[key] = result;\n        }\n      });\n    }\n  }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n  if (unwrap === void 0) {\n    unwrap = false;\n  }\n  let aborted = await result.deferredData.resolveData(signal);\n  if (aborted) {\n    return;\n  }\n  if (unwrap) {\n    try {\n      return {\n        type: ResultType.data,\n        data: result.deferredData.unwrappedData\n      };\n    } catch (e) {\n      // Handle any TrackedPromise._error values encountered while unwrapping\n      return {\n        type: ResultType.error,\n        error: e\n      };\n    }\n  }\n  return {\n    type: ResultType.data,\n    data: result.deferredData.data\n  };\n}\nfunction hasNakedIndexQuery(search) {\n  return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n  let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n  if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n    // Return the leaf index route when index is present\n    return matches[matches.length - 1];\n  }\n  // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n  // pathless layout routes)\n  let pathMatches = getPathContributingMatches(matches);\n  return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n  let {\n    formMethod,\n    formAction,\n    formEncType,\n    text,\n    formData,\n    json\n  } = navigation;\n  if (!formMethod || !formAction || !formEncType) {\n    return;\n  }\n  if (text != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: undefined,\n      json: undefined,\n      text\n    };\n  } else if (formData != null) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData,\n      json: undefined,\n      text: undefined\n    };\n  } else if (json !== undefined) {\n    return {\n      formMethod,\n      formAction,\n      formEncType,\n      formData: undefined,\n      json,\n      text: undefined\n    };\n  }\n}\nfunction getLoadingNavigation(location, submission) {\n  if (submission) {\n    let navigation = {\n      state: \"loading\",\n      location,\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text\n    };\n    return navigation;\n  } else {\n    let navigation = {\n      state: \"loading\",\n      location,\n      formMethod: undefined,\n      formAction: undefined,\n      formEncType: undefined,\n      formData: undefined,\n      json: undefined,\n      text: undefined\n    };\n    return navigation;\n  }\n}\nfunction getSubmittingNavigation(location, submission) {\n  let navigation = {\n    state: \"submitting\",\n    location,\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text\n  };\n  return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n  if (submission) {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: submission.formMethod,\n      formAction: submission.formAction,\n      formEncType: submission.formEncType,\n      formData: submission.formData,\n      json: submission.json,\n      text: submission.text,\n      data\n    };\n    return fetcher;\n  } else {\n    let fetcher = {\n      state: \"loading\",\n      formMethod: undefined,\n      formAction: undefined,\n      formEncType: undefined,\n      formData: undefined,\n      json: undefined,\n      text: undefined,\n      data\n    };\n    return fetcher;\n  }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n  let fetcher = {\n    state: \"submitting\",\n    formMethod: submission.formMethod,\n    formAction: submission.formAction,\n    formEncType: submission.formEncType,\n    formData: submission.formData,\n    json: submission.json,\n    text: submission.text,\n    data: existingFetcher ? existingFetcher.data : undefined\n  };\n  return fetcher;\n}\nfunction getDoneFetcher(data) {\n  let fetcher = {\n    state: \"idle\",\n    formMethod: undefined,\n    formAction: undefined,\n    formEncType: undefined,\n    formData: undefined,\n    json: undefined,\n    text: undefined,\n    data\n  };\n  return fetcher;\n}\nfunction restoreAppliedTransitions(_window, transitions) {\n  try {\n    let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);\n    if (sessionPositions) {\n      let json = JSON.parse(sessionPositions);\n      for (let [k, v] of Object.entries(json || {})) {\n        if (v && Array.isArray(v)) {\n          transitions.set(k, new Set(v || []));\n        }\n      }\n    }\n  } catch (e) {\n    // no-op, use default empty object\n  }\n}\nfunction persistAppliedTransitions(_window, transitions) {\n  if (transitions.size > 0) {\n    let json = {};\n    for (let [k, v] of transitions) {\n      json[k] = [...v];\n    }\n    try {\n      _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));\n    } catch (error) {\n      warning(false, \"Failed to save applied view transitions in sessionStorage (\" + error + \").\");\n    }\n  }\n}\n//#endregion\n\nexport { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, decodePath as UNSAFE_decodePath, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, data, defer, generatePath, getStaticContextFromError, getToPathname, isDataWithResponseInit, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, replace, resolvePath, resolveTo, stripBasename };\n//# sourceMappingURL=router.js.map\n","/**\n * React Router v6.30.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { UNSAFE_invariant, joinPaths, matchPath, UNSAFE_decodePath, UNSAFE_getResolveToMatches, UNSAFE_warning, resolveTo, parsePath, matchRoutes, Action, UNSAFE_convertRouteMatchToUiMatch, stripBasename, IDLE_BLOCKER, isRouteErrorResponse, createMemoryHistory, AbortedDeferredError, createRouter } from '@remix-run/router';\nexport { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, replace, resolvePath } from '@remix-run/router';\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nconst DataRouterContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  DataRouterContext.displayName = \"DataRouter\";\n}\nconst DataRouterStateContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  DataRouterStateContext.displayName = \"DataRouterState\";\n}\nconst AwaitContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  AwaitContext.displayName = \"Await\";\n}\n\n/**\n * A Navigator is a \"location changer\"; it's how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level `<Router>` API\n * where both the location and a navigator must be provided separately in order\n * to avoid \"tearing\" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\n\nconst NavigationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  NavigationContext.displayName = \"Navigation\";\n}\nconst LocationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  LocationContext.displayName = \"Location\";\n}\nconst RouteContext = /*#__PURE__*/React.createContext({\n  outlet: null,\n  matches: [],\n  isDataRoute: false\n});\nif (process.env.NODE_ENV !== \"production\") {\n  RouteContext.displayName = \"Route\";\n}\nconst RouteErrorContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n  RouteErrorContext.displayName = \"RouteError\";\n}\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/v6/hooks/use-href\n */\nfunction useHref(to, _temp) {\n  let {\n    relative\n  } = _temp === void 0 ? {} : _temp;\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n  // router loaded. We can help them understand how to avoid that.\n  \"useHref() may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  let {\n    basename,\n    navigator\n  } = React.useContext(NavigationContext);\n  let {\n    hash,\n    pathname,\n    search\n  } = useResolvedPath(to, {\n    relative\n  });\n  let joinedPathname = pathname;\n\n  // If we're operating within a basename, prepend it to the pathname prior\n  // to creating the href.  If this is a root navigation, then just use the raw\n  // basename which allows the basename to have full control over the presence\n  // of a trailing slash on root links\n  if (basename !== \"/\") {\n    joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n  }\n  return navigator.createHref({\n    pathname: joinedPathname,\n    search,\n    hash\n  });\n}\n\n/**\n * Returns true if this component is a descendant of a `<Router>`.\n *\n * @see https://reactrouter.com/v6/hooks/use-in-router-context\n */\nfunction useInRouterContext() {\n  return React.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/v6/hooks/use-location\n */\nfunction useLocation() {\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n  // router loaded. We can help them understand how to avoid that.\n  \"useLocation() may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  return React.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/v6/hooks/use-navigation-type\n */\nfunction useNavigationType() {\n  return React.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * `<NavLink>`.\n *\n * @see https://reactrouter.com/v6/hooks/use-match\n */\nfunction useMatch(pattern) {\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n  // router loaded. We can help them understand how to avoid that.\n  \"useMatch() may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  let {\n    pathname\n  } = useLocation();\n  return React.useMemo(() => matchPath(pattern, UNSAFE_decodePath(pathname)), [pathname, pattern]);\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\nconst navigateEffectWarning = \"You should call navigate() in a React.useEffect(), not when \" + \"your component is first rendered.\";\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(cb) {\n  let isStatic = React.useContext(NavigationContext).static;\n  if (!isStatic) {\n    // We should be able to get rid of this once react 18.3 is released\n    // See: https://github.com/facebook/react/pull/26395\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useLayoutEffect(cb);\n  }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by `<Link>`s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/v6/hooks/use-navigate\n */\nfunction useNavigate() {\n  let {\n    isDataRoute\n  } = React.useContext(RouteContext);\n  // Conditional usage is OK here because the usage of a data router is static\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n  // router loaded. We can help them understand how to avoid that.\n  \"useNavigate() may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  let dataRouterContext = React.useContext(DataRouterContext);\n  let {\n    basename,\n    future,\n    navigator\n  } = React.useContext(NavigationContext);\n  let {\n    matches\n  } = React.useContext(RouteContext);\n  let {\n    pathname: locationPathname\n  } = useLocation();\n  let routePathnamesJson = JSON.stringify(UNSAFE_getResolveToMatches(matches, future.v7_relativeSplatPath));\n  let activeRef = React.useRef(false);\n  useIsomorphicLayoutEffect(() => {\n    activeRef.current = true;\n  });\n  let navigate = React.useCallback(function (to, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n    // Short circuit here since if this happens on first render the navigate\n    // is useless because we haven't wired up our history listener yet\n    if (!activeRef.current) return;\n    if (typeof to === \"number\") {\n      navigator.go(to);\n      return;\n    }\n    let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\");\n\n    // If we're operating within a basename, prepend it to the pathname prior\n    // to handing off to history (but only if we're not in a data router,\n    // otherwise it'll prepend the basename inside of the router).\n    // If this is a root navigation, then we navigate to the raw basename\n    // which allows the basename to have full control over the presence of a\n    // trailing slash on root links\n    if (dataRouterContext == null && basename !== \"/\") {\n      path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n    }\n    (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n  }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);\n  return navigate;\n}\nconst OutletContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/v6/hooks/use-outlet-context\n */\nfunction useOutletContext() {\n  return React.useContext(OutletContext);\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by `<Outlet>` to render child routes.\n *\n * @see https://reactrouter.com/v6/hooks/use-outlet\n */\nfunction useOutlet(context) {\n  let outlet = React.useContext(RouteContext).outlet;\n  if (outlet) {\n    return /*#__PURE__*/React.createElement(OutletContext.Provider, {\n      value: context\n    }, outlet);\n  }\n  return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/v6/hooks/use-params\n */\nfunction useParams() {\n  let {\n    matches\n  } = React.useContext(RouteContext);\n  let routeMatch = matches[matches.length - 1];\n  return routeMatch ? routeMatch.params : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/v6/hooks/use-resolved-path\n */\nfunction useResolvedPath(to, _temp2) {\n  let {\n    relative\n  } = _temp2 === void 0 ? {} : _temp2;\n  let {\n    future\n  } = React.useContext(NavigationContext);\n  let {\n    matches\n  } = React.useContext(RouteContext);\n  let {\n    pathname: locationPathname\n  } = useLocation();\n  let routePathnamesJson = JSON.stringify(UNSAFE_getResolveToMatches(matches, future.v7_relativeSplatPath));\n  return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [to, routePathnamesJson, locationPathname, relative]);\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an `<Outlet>` to render their child route's\n * element.\n *\n * @see https://reactrouter.com/v6/hooks/use-routes\n */\nfunction useRoutes(routes, locationArg) {\n  return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nfunction useRoutesImpl(routes, locationArg, dataRouterState, future) {\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n  // router loaded. We can help them understand how to avoid that.\n  \"useRoutes() may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  let {\n    navigator\n  } = React.useContext(NavigationContext);\n  let {\n    matches: parentMatches\n  } = React.useContext(RouteContext);\n  let routeMatch = parentMatches[parentMatches.length - 1];\n  let parentParams = routeMatch ? routeMatch.params : {};\n  let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n  let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n  let parentRoute = routeMatch && routeMatch.route;\n  if (process.env.NODE_ENV !== \"production\") {\n    // You won't get a warning about 2 different <Routes> under a <Route>\n    // without a trailing *, but this is a best-effort warning anyway since we\n    // cannot even give the warning unless they land at the parent route.\n    //\n    // Example:\n    //\n    // <Routes>\n    //   {/* This route path MUST end with /* because otherwise\n    //       it will never match /blog/post/123 */}\n    //   <Route path=\"blog\" element={<Blog />} />\n    //   <Route path=\"blog/feed\" element={<BlogFeed />} />\n    // </Routes>\n    //\n    // function Blog() {\n    //   return (\n    //     <Routes>\n    //       <Route path=\"post/:id\" element={<Post />} />\n    //     </Routes>\n    //   );\n    // }\n    let parentPath = parentRoute && parentRoute.path || \"\";\n    warningOnce(parentPathname, !parentRoute || parentPath.endsWith(\"*\"), \"You rendered descendant <Routes> (or called `useRoutes()`) at \" + (\"\\\"\" + parentPathname + \"\\\" (under <Route path=\\\"\" + parentPath + \"\\\">) but the \") + \"parent route path has no trailing \\\"*\\\". This means if you navigate \" + \"deeper, the parent won't match anymore and therefore the child \" + \"routes will never render.\\n\\n\" + (\"Please change the parent <Route path=\\\"\" + parentPath + \"\\\"> to <Route \") + (\"path=\\\"\" + (parentPath === \"/\" ? \"*\" : parentPath + \"/*\") + \"\\\">.\"));\n  }\n  let locationFromContext = useLocation();\n  let location;\n  if (locationArg) {\n    var _parsedLocationArg$pa;\n    let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n    !(parentPathnameBase === \"/\" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, \" + \"the location pathname must begin with the portion of the URL pathname that was \" + (\"matched by all parent routes. The current pathname base is \\\"\" + parentPathnameBase + \"\\\" \") + (\"but pathname \\\"\" + parsedLocationArg.pathname + \"\\\" was given in the `location` prop.\")) : UNSAFE_invariant(false) : void 0;\n    location = parsedLocationArg;\n  } else {\n    location = locationFromContext;\n  }\n  let pathname = location.pathname || \"/\";\n  let remainingPathname = pathname;\n  if (parentPathnameBase !== \"/\") {\n    // Determine the remaining pathname by removing the # of URL segments the\n    // parentPathnameBase has, instead of removing based on character count.\n    // This is because we can't guarantee that incoming/outgoing encodings/\n    // decodings will match exactly.\n    // We decode paths before matching on a per-segment basis with\n    // decodeURIComponent(), but we re-encode pathnames via `new URL()` so they\n    // match what `window.location.pathname` would reflect.  Those don't 100%\n    // align when it comes to encoded URI characters such as % and &.\n    //\n    // So we may end up with:\n    //   pathname:           \"/descendant/a%25b/match\"\n    //   parentPathnameBase: \"/descendant/a%b\"\n    //\n    // And the direct substring removal approach won't work :/\n    let parentSegments = parentPathnameBase.replace(/^\\//, \"\").split(\"/\");\n    let segments = pathname.replace(/^\\//, \"\").split(\"/\");\n    remainingPathname = \"/\" + segments.slice(parentSegments.length).join(\"/\");\n  }\n  let matches = matchRoutes(routes, {\n    pathname: remainingPathname\n  });\n  if (process.env.NODE_ENV !== \"production\") {\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(parentRoute || matches != null, \"No routes matched location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \") : void 0;\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined || matches[matches.length - 1].route.lazy !== undefined, \"Matched leaf route at location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \" + \"does not have an element or Component. This means it will render an <Outlet /> with a \" + \"null value by default resulting in an \\\"empty\\\" page.\") : void 0;\n  }\n  let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n    params: Object.assign({}, parentParams, match.params),\n    pathname: joinPaths([parentPathnameBase,\n    // Re-encode pathnames that were decoded inside matchRoutes\n    navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n    pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase,\n    // Re-encode pathnames that were decoded inside matchRoutes\n    navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n  })), parentMatches, dataRouterState, future);\n\n  // When a user passes in a `locationArg`, the associated routes need to\n  // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n  // to use the scoped location instead of the global location.\n  if (locationArg && renderedMatches) {\n    return /*#__PURE__*/React.createElement(LocationContext.Provider, {\n      value: {\n        location: _extends({\n          pathname: \"/\",\n          search: \"\",\n          hash: \"\",\n          state: null,\n          key: \"default\"\n        }, location),\n        navigationType: Action.Pop\n      }\n    }, renderedMatches);\n  }\n  return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n  let error = useRouteError();\n  let message = isRouteErrorResponse(error) ? error.status + \" \" + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n  let stack = error instanceof Error ? error.stack : null;\n  let lightgrey = \"rgba(200,200,200, 0.5)\";\n  let preStyles = {\n    padding: \"0.5rem\",\n    backgroundColor: lightgrey\n  };\n  let codeStyles = {\n    padding: \"2px 4px\",\n    backgroundColor: lightgrey\n  };\n  let devInfo = null;\n  if (process.env.NODE_ENV !== \"production\") {\n    console.error(\"Error handled by React Router default ErrorBoundary:\", error);\n    devInfo = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"p\", null, \"\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B\"), /*#__PURE__*/React.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own \", /*#__PURE__*/React.createElement(\"code\", {\n      style: codeStyles\n    }, \"ErrorBoundary\"), \" or\", \" \", /*#__PURE__*/React.createElement(\"code\", {\n      style: codeStyles\n    }, \"errorElement\"), \" prop on your route.\"));\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Unexpected Application Error!\"), /*#__PURE__*/React.createElement(\"h3\", {\n    style: {\n      fontStyle: \"italic\"\n    }\n  }, message), stack ? /*#__PURE__*/React.createElement(\"pre\", {\n    style: preStyles\n  }, stack) : null, devInfo);\n}\nconst defaultErrorElement = /*#__PURE__*/React.createElement(DefaultErrorComponent, null);\nclass RenderErrorBoundary extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      location: props.location,\n      revalidation: props.revalidation,\n      error: props.error\n    };\n  }\n  static getDerivedStateFromError(error) {\n    return {\n      error: error\n    };\n  }\n  static getDerivedStateFromProps(props, state) {\n    // When we get into an error state, the user will likely click \"back\" to the\n    // previous page that didn't have an error. Because this wraps the entire\n    // application, that will have no effect--the error page continues to display.\n    // This gives us a mechanism to recover from the error when the location changes.\n    //\n    // Whether we're in an error state or not, we update the location in state\n    // so that when we are in an error state, it gets reset when a new location\n    // comes in and the user recovers from the error.\n    if (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") {\n      return {\n        error: props.error,\n        location: props.location,\n        revalidation: props.revalidation\n      };\n    }\n\n    // If we're not changing locations, preserve the location but still surface\n    // any new errors that may come through. We retain the existing error, we do\n    // this because the error provided from the app state may be cleared without\n    // the location changing.\n    return {\n      error: props.error !== undefined ? props.error : state.error,\n      location: state.location,\n      revalidation: props.revalidation || state.revalidation\n    };\n  }\n  componentDidCatch(error, errorInfo) {\n    console.error(\"React Router caught the following error during render\", error, errorInfo);\n  }\n  render() {\n    return this.state.error !== undefined ? /*#__PURE__*/React.createElement(RouteContext.Provider, {\n      value: this.props.routeContext\n    }, /*#__PURE__*/React.createElement(RouteErrorContext.Provider, {\n      value: this.state.error,\n      children: this.props.component\n    })) : this.props.children;\n  }\n}\nfunction RenderedRoute(_ref) {\n  let {\n    routeContext,\n    match,\n    children\n  } = _ref;\n  let dataRouterContext = React.useContext(DataRouterContext);\n\n  // Track how deep we got in our render pass to emulate SSR componentDidCatch\n  // in a DataStaticRouter\n  if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n    dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n  }\n  return /*#__PURE__*/React.createElement(RouteContext.Provider, {\n    value: routeContext\n  }, children);\n}\nfunction _renderMatches(matches, parentMatches, dataRouterState, future) {\n  var _dataRouterState;\n  if (parentMatches === void 0) {\n    parentMatches = [];\n  }\n  if (dataRouterState === void 0) {\n    dataRouterState = null;\n  }\n  if (future === void 0) {\n    future = null;\n  }\n  if (matches == null) {\n    var _future;\n    if (!dataRouterState) {\n      return null;\n    }\n    if (dataRouterState.errors) {\n      // Don't bail if we have data router errors so we can render them in the\n      // boundary.  Use the pre-matched (or shimmed) matches\n      matches = dataRouterState.matches;\n    } else if ((_future = future) != null && _future.v7_partialHydration && parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {\n      // Don't bail if we're initializing with partial hydration and we have\n      // router matches.  That means we're actively running `patchRoutesOnNavigation`\n      // so we should render down the partial matches to the appropriate\n      // `HydrateFallback`.  We only do this if `parentMatches` is empty so it\n      // only impacts the root matches for `RouterProvider` and no descendant\n      // `<Routes>`\n      matches = dataRouterState.matches;\n    } else {\n      return null;\n    }\n  }\n  let renderedMatches = matches;\n\n  // If we have data errors, trim matches to the highest error boundary\n  let errors = (_dataRouterState = dataRouterState) == null ? void 0 : _dataRouterState.errors;\n  if (errors != null) {\n    let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== undefined);\n    !(errorIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"Could not find a matching route for errors on route IDs: \" + Object.keys(errors).join(\",\")) : UNSAFE_invariant(false) : void 0;\n    renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n  }\n\n  // If we're in a partial hydration mode, detect if we need to render down to\n  // a given HydrateFallback while we load the rest of the hydration data\n  let renderFallback = false;\n  let fallbackIndex = -1;\n  if (dataRouterState && future && future.v7_partialHydration) {\n    for (let i = 0; i < renderedMatches.length; i++) {\n      let match = renderedMatches[i];\n      // Track the deepest fallback up until the first route without data\n      if (match.route.HydrateFallback || match.route.hydrateFallbackElement) {\n        fallbackIndex = i;\n      }\n      if (match.route.id) {\n        let {\n          loaderData,\n          errors\n        } = dataRouterState;\n        let needsToRunLoader = match.route.loader && loaderData[match.route.id] === undefined && (!errors || errors[match.route.id] === undefined);\n        if (match.route.lazy || needsToRunLoader) {\n          // We found the first route that's not ready to render (waiting on\n          // lazy, or has a loader that hasn't run yet).  Flag that we need to\n          // render a fallback and render up until the appropriate fallback\n          renderFallback = true;\n          if (fallbackIndex >= 0) {\n            renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);\n          } else {\n            renderedMatches = [renderedMatches[0]];\n          }\n          break;\n        }\n      }\n    }\n  }\n  return renderedMatches.reduceRight((outlet, match, index) => {\n    // Only data routers handle errors/fallbacks\n    let error;\n    let shouldRenderHydrateFallback = false;\n    let errorElement = null;\n    let hydrateFallbackElement = null;\n    if (dataRouterState) {\n      error = errors && match.route.id ? errors[match.route.id] : undefined;\n      errorElement = match.route.errorElement || defaultErrorElement;\n      if (renderFallback) {\n        if (fallbackIndex < 0 && index === 0) {\n          warningOnce(\"route-fallback\", false, \"No `HydrateFallback` element provided to render during initial hydration\");\n          shouldRenderHydrateFallback = true;\n          hydrateFallbackElement = null;\n        } else if (fallbackIndex === index) {\n          shouldRenderHydrateFallback = true;\n          hydrateFallbackElement = match.route.hydrateFallbackElement || null;\n        }\n      }\n    }\n    let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n    let getChildren = () => {\n      let children;\n      if (error) {\n        children = errorElement;\n      } else if (shouldRenderHydrateFallback) {\n        children = hydrateFallbackElement;\n      } else if (match.route.Component) {\n        // Note: This is a de-optimized path since React won't re-use the\n        // ReactElement since it's identity changes with each new\n        // React.createElement call.  We keep this so folks can use\n        // `<Route Component={...}>` in `<Routes>` but generally `Component`\n        // usage is only advised in `RouterProvider` when we can convert it to\n        // `element` ahead of time.\n        children = /*#__PURE__*/React.createElement(match.route.Component, null);\n      } else if (match.route.element) {\n        children = match.route.element;\n      } else {\n        children = outlet;\n      }\n      return /*#__PURE__*/React.createElement(RenderedRoute, {\n        match: match,\n        routeContext: {\n          outlet,\n          matches,\n          isDataRoute: dataRouterState != null\n        },\n        children: children\n      });\n    };\n    // Only wrap in an error boundary within data router usages when we have an\n    // ErrorBoundary/errorElement on this route.  Otherwise let it bubble up to\n    // an ancestor ErrorBoundary/errorElement\n    return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/React.createElement(RenderErrorBoundary, {\n      location: dataRouterState.location,\n      revalidation: dataRouterState.revalidation,\n      component: errorElement,\n      error: error,\n      children: getChildren(),\n      routeContext: {\n        outlet: null,\n        matches,\n        isDataRoute: true\n      }\n    }) : getChildren();\n  }, null);\n}\nvar DataRouterHook = /*#__PURE__*/function (DataRouterHook) {\n  DataRouterHook[\"UseBlocker\"] = \"useBlocker\";\n  DataRouterHook[\"UseRevalidator\"] = \"useRevalidator\";\n  DataRouterHook[\"UseNavigateStable\"] = \"useNavigate\";\n  return DataRouterHook;\n}(DataRouterHook || {});\nvar DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) {\n  DataRouterStateHook[\"UseBlocker\"] = \"useBlocker\";\n  DataRouterStateHook[\"UseLoaderData\"] = \"useLoaderData\";\n  DataRouterStateHook[\"UseActionData\"] = \"useActionData\";\n  DataRouterStateHook[\"UseRouteError\"] = \"useRouteError\";\n  DataRouterStateHook[\"UseNavigation\"] = \"useNavigation\";\n  DataRouterStateHook[\"UseRouteLoaderData\"] = \"useRouteLoaderData\";\n  DataRouterStateHook[\"UseMatches\"] = \"useMatches\";\n  DataRouterStateHook[\"UseRevalidator\"] = \"useRevalidator\";\n  DataRouterStateHook[\"UseNavigateStable\"] = \"useNavigate\";\n  DataRouterStateHook[\"UseRouteId\"] = \"useRouteId\";\n  return DataRouterStateHook;\n}(DataRouterStateHook || {});\nfunction getDataRouterConsoleError(hookName) {\n  return hookName + \" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router.\";\n}\nfunction useDataRouterContext(hookName) {\n  let ctx = React.useContext(DataRouterContext);\n  !ctx ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n  return ctx;\n}\nfunction useDataRouterState(hookName) {\n  let state = React.useContext(DataRouterStateContext);\n  !state ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n  return state;\n}\nfunction useRouteContext(hookName) {\n  let route = React.useContext(RouteContext);\n  !route ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n  return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName) {\n  let route = useRouteContext(hookName);\n  let thisRoute = route.matches[route.matches.length - 1];\n  !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, hookName + \" can only be used on routes that contain a unique \\\"id\\\"\") : UNSAFE_invariant(false) : void 0;\n  return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nfunction useRouteId() {\n  return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\nfunction useNavigation() {\n  let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n  return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nfunction useRevalidator() {\n  let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n  let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n  return React.useMemo(() => ({\n    revalidate: dataRouterContext.router.revalidate,\n    state: state.revalidation\n  }), [dataRouterContext.router.revalidate, state.revalidation]);\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\nfunction useMatches() {\n  let {\n    matches,\n    loaderData\n  } = useDataRouterState(DataRouterStateHook.UseMatches);\n  return React.useMemo(() => matches.map(m => UNSAFE_convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nfunction useLoaderData() {\n  let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n  let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n  if (state.errors && state.errors[routeId] != null) {\n    console.error(\"You cannot `useLoaderData` in an errorElement (routeId: \" + routeId + \")\");\n    return undefined;\n  }\n  return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nfunction useRouteLoaderData(routeId) {\n  let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n  return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nfunction useActionData() {\n  let state = useDataRouterState(DataRouterStateHook.UseActionData);\n  let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n  return state.actionData ? state.actionData[routeId] : undefined;\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error.  This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nfunction useRouteError() {\n  var _state$errors;\n  let error = React.useContext(RouteErrorContext);\n  let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n  let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n  // If this was a render error, we put it in a RouteError context inside\n  // of RenderErrorBoundary\n  if (error !== undefined) {\n    return error;\n  }\n\n  // Otherwise look for errors from our data router state\n  return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor `<Await />` value\n */\nfunction useAsyncValue() {\n  let value = React.useContext(AwaitContext);\n  return value == null ? void 0 : value._data;\n}\n\n/**\n * Returns the error from the nearest ancestor `<Await />` value\n */\nfunction useAsyncError() {\n  let value = React.useContext(AwaitContext);\n  return value == null ? void 0 : value._error;\n}\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation.  Mostly used to avoid\n * using half-filled form data.  This does not handle hard-reloads or\n * cross-origin navigations.\n */\nfunction useBlocker(shouldBlock) {\n  let {\n    router,\n    basename\n  } = useDataRouterContext(DataRouterHook.UseBlocker);\n  let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n  let [blockerKey, setBlockerKey] = React.useState(\"\");\n  let blockerFunction = React.useCallback(arg => {\n    if (typeof shouldBlock !== \"function\") {\n      return !!shouldBlock;\n    }\n    if (basename === \"/\") {\n      return shouldBlock(arg);\n    }\n\n    // If they provided us a function and we've got an active basename, strip\n    // it from the locations we expose to the user to match the behavior of\n    // useLocation\n    let {\n      currentLocation,\n      nextLocation,\n      historyAction\n    } = arg;\n    return shouldBlock({\n      currentLocation: _extends({}, currentLocation, {\n        pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n      }),\n      nextLocation: _extends({}, nextLocation, {\n        pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n      }),\n      historyAction\n    });\n  }, [basename, shouldBlock]);\n\n  // This effect is in charge of blocker key assignment and deletion (which is\n  // tightly coupled to the key)\n  React.useEffect(() => {\n    let key = String(++blockerId);\n    setBlockerKey(key);\n    return () => router.deleteBlocker(key);\n  }, [router]);\n\n  // This effect handles assigning the blockerFunction.  This is to handle\n  // unstable blocker function identities, and happens only after the prior\n  // effect so we don't get an orphaned blockerFunction in the router with a\n  // key of \"\".  Until then we just have the IDLE_BLOCKER.\n  React.useEffect(() => {\n    if (blockerKey !== \"\") {\n      router.getBlocker(blockerKey, blockerFunction);\n    }\n  }, [router, blockerKey, blockerFunction]);\n\n  // Prefer the blocker from `state` not `router.state` since DataRouterContext\n  // is memoized so this ensures we update on blocker state updates\n  return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable() {\n  let {\n    router\n  } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n  let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n  let activeRef = React.useRef(false);\n  useIsomorphicLayoutEffect(() => {\n    activeRef.current = true;\n  });\n  let navigate = React.useCallback(function (to, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n    // Short circuit here since if this happens on first render the navigate\n    // is useless because we haven't wired up our router subscriber yet\n    if (!activeRef.current) return;\n    if (typeof to === \"number\") {\n      router.navigate(to);\n    } else {\n      router.navigate(to, _extends({\n        fromRouteId: id\n      }, options));\n    }\n  }, [router, id]);\n  return navigate;\n}\nconst alreadyWarned$1 = {};\nfunction warningOnce(key, cond, message) {\n  if (!cond && !alreadyWarned$1[key]) {\n    alreadyWarned$1[key] = true;\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, message) : void 0;\n  }\n}\n\nconst alreadyWarned = {};\nfunction warnOnce(key, message) {\n  if (process.env.NODE_ENV !== \"production\" && !alreadyWarned[message]) {\n    alreadyWarned[message] = true;\n    console.warn(message);\n  }\n}\nconst logDeprecation = (flag, msg, link) => warnOnce(flag, \"\\u26A0\\uFE0F React Router Future Flag Warning: \" + msg + \". \" + (\"You can use the `\" + flag + \"` future flag to opt-in early. \") + (\"For more information, see \" + link + \".\"));\nfunction logV6DeprecationWarnings(renderFuture, routerFuture) {\n  if ((renderFuture == null ? void 0 : renderFuture.v7_startTransition) === undefined) {\n    logDeprecation(\"v7_startTransition\", \"React Router will begin wrapping state updates in `React.startTransition` in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_starttransition\");\n  }\n  if ((renderFuture == null ? void 0 : renderFuture.v7_relativeSplatPath) === undefined && (!routerFuture || routerFuture.v7_relativeSplatPath === undefined)) {\n    logDeprecation(\"v7_relativeSplatPath\", \"Relative route resolution within Splat routes is changing in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath\");\n  }\n  if (routerFuture) {\n    if (routerFuture.v7_fetcherPersist === undefined) {\n      logDeprecation(\"v7_fetcherPersist\", \"The persistence behavior of fetchers is changing in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist\");\n    }\n    if (routerFuture.v7_normalizeFormMethod === undefined) {\n      logDeprecation(\"v7_normalizeFormMethod\", \"Casing of `formMethod` fields is being normalized to uppercase in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod\");\n    }\n    if (routerFuture.v7_partialHydration === undefined) {\n      logDeprecation(\"v7_partialHydration\", \"`RouterProvider` hydration behavior is changing in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_partialhydration\");\n    }\n    if (routerFuture.v7_skipActionErrorRevalidation === undefined) {\n      logDeprecation(\"v7_skipActionErrorRevalidation\", \"The revalidation behavior after 4xx/5xx `action` responses is changing in v7\", \"https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation\");\n    }\n  }\n}\n\n/**\n  Webpack + React 17 fails to compile on any of the following because webpack\n  complains that `startTransition` doesn't exist in `React`:\n  * import { startTransition } from \"react\"\n  * import * as React from from \"react\";\n    \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n  * import * as React from from \"react\";\n    \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n  Moving it to a constant such as the following solves the Webpack/React 17 issue:\n  * import * as React from from \"react\";\n    const START_TRANSITION = \"startTransition\";\n    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n  However, that introduces webpack/terser minification issues in production builds\n  in React 18 where minification/obfuscation ends up removing the call of\n  React.startTransition entirely from the first half of the ternary.  Grabbing\n  this exported reference once up front resolves that issue.\n\n  See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n  let {\n    fallbackElement,\n    router,\n    future\n  } = _ref;\n  let [state, setStateImpl] = React.useState(router.state);\n  let {\n    v7_startTransition\n  } = future || {};\n  let setState = React.useCallback(newState => {\n    if (v7_startTransition && startTransitionImpl) {\n      startTransitionImpl(() => setStateImpl(newState));\n    } else {\n      setStateImpl(newState);\n    }\n  }, [setStateImpl, v7_startTransition]);\n\n  // Need to use a layout effect here so we are subscribed early enough to\n  // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n  React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n  React.useEffect(() => {\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(fallbackElement == null || !router.future.v7_partialHydration, \"`<RouterProvider fallbackElement>` is deprecated when using \" + \"`v7_partialHydration`, use a `HydrateFallback` component instead\") : void 0;\n    // Only log this once on initial mount\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  let navigator = React.useMemo(() => {\n    return {\n      createHref: router.createHref,\n      encodeLocation: router.encodeLocation,\n      go: n => router.navigate(n),\n      push: (to, state, opts) => router.navigate(to, {\n        state,\n        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n      }),\n      replace: (to, state, opts) => router.navigate(to, {\n        replace: true,\n        state,\n        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n      })\n    };\n  }, [router]);\n  let basename = router.basename || \"/\";\n  let dataRouterContext = React.useMemo(() => ({\n    router,\n    navigator,\n    static: false,\n    basename\n  }), [router, navigator, basename]);\n  React.useEffect(() => logV6DeprecationWarnings(future, router.future), [router, future]);\n\n  // The fragment and {null} here are important!  We need them to keep React 18's\n  // useId happy when we are server-rendering since we may have a <script> here\n  // containing the hydrated server-side staticContext (from StaticRouterProvider).\n  // useId relies on the component tree structure to generate deterministic id's\n  // so we need to ensure it remains the same on the client even though\n  // we don't need the <script> tag\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DataRouterContext.Provider, {\n    value: dataRouterContext\n  }, /*#__PURE__*/React.createElement(DataRouterStateContext.Provider, {\n    value: state\n  }, /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    location: state.location,\n    navigationType: state.historyAction,\n    navigator: navigator,\n    future: {\n      v7_relativeSplatPath: router.future.v7_relativeSplatPath\n    }\n  }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/React.createElement(DataRoutes, {\n    routes: router.routes,\n    future: router.future,\n    state: state\n  }) : fallbackElement))), null);\n}\nfunction DataRoutes(_ref2) {\n  let {\n    routes,\n    future,\n    state\n  } = _ref2;\n  return useRoutesImpl(routes, undefined, state, future);\n}\n/**\n * A `<Router>` that stores all entries in memory.\n *\n * @see https://reactrouter.com/v6/router-components/memory-router\n */\nfunction MemoryRouter(_ref3) {\n  let {\n    basename,\n    children,\n    initialEntries,\n    initialIndex,\n    future\n  } = _ref3;\n  let historyRef = React.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createMemoryHistory({\n      initialEntries,\n      initialIndex,\n      v5Compat: true\n    });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React.useState({\n    action: history.action,\n    location: history.location\n  });\n  let {\n    v7_startTransition\n  } = future || {};\n  let setState = React.useCallback(newState => {\n    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n  }, [setStateImpl, v7_startTransition]);\n  React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  React.useEffect(() => logV6DeprecationWarnings(future), [future]);\n  return /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    children: children,\n    location: state.location,\n    navigationType: state.action,\n    navigator: history,\n    future: future\n  });\n}\n/**\n * Changes the current location.\n *\n * Note: This API is mostly useful in React.Component subclasses that are not\n * able to use hooks. In functional components, we recommend you use the\n * `useNavigate` hook instead.\n *\n * @see https://reactrouter.com/v6/components/navigate\n */\nfunction Navigate(_ref4) {\n  let {\n    to,\n    replace,\n    state,\n    relative\n  } = _ref4;\n  !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of\n  // the router loaded. We can help them understand how to avoid that.\n  \"<Navigate> may be used only in the context of a <Router> component.\") : UNSAFE_invariant(false) : void 0;\n  let {\n    future,\n    static: isStatic\n  } = React.useContext(NavigationContext);\n  process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(!isStatic, \"<Navigate> must not be used on the initial render in a <StaticRouter>. \" + \"This is a no-op, but you should modify your code so the <Navigate> is \" + \"only ever rendered in response to some user interaction or state change.\") : void 0;\n  let {\n    matches\n  } = React.useContext(RouteContext);\n  let {\n    pathname: locationPathname\n  } = useLocation();\n  let navigate = useNavigate();\n\n  // Resolve the path outside of the effect so that when effects run twice in\n  // StrictMode they navigate to the same place\n  let path = resolveTo(to, UNSAFE_getResolveToMatches(matches, future.v7_relativeSplatPath), locationPathname, relative === \"path\");\n  let jsonPath = JSON.stringify(path);\n  React.useEffect(() => navigate(JSON.parse(jsonPath), {\n    replace,\n    state,\n    relative\n  }), [navigate, jsonPath, relative, replace, state]);\n  return null;\n}\n/**\n * Renders the child route's element, if there is one.\n *\n * @see https://reactrouter.com/v6/components/outlet\n */\nfunction Outlet(props) {\n  return useOutlet(props.context);\n}\n/**\n * Declares an element that should be rendered at a certain URL path.\n *\n * @see https://reactrouter.com/v6/components/route\n */\nfunction Route(_props) {\n  process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"A <Route> is only ever to be used as the child of <Routes> element, \" + \"never rendered directly. Please wrap your <Route> in a <Routes>.\") : UNSAFE_invariant(false) ;\n}\n/**\n * Provides location context for the rest of the app.\n *\n * Note: You usually won't render a `<Router>` directly. Instead, you'll render a\n * router that is more specific to your environment such as a `<BrowserRouter>`\n * in web browsers or a `<StaticRouter>` for server rendering.\n *\n * @see https://reactrouter.com/v6/router-components/router\n */\nfunction Router(_ref5) {\n  let {\n    basename: basenameProp = \"/\",\n    children = null,\n    location: locationProp,\n    navigationType = Action.Pop,\n    navigator,\n    static: staticProp = false,\n    future\n  } = _ref5;\n  !!useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"You cannot render a <Router> inside another <Router>.\" + \" You should never have more than one in your app.\") : UNSAFE_invariant(false) : void 0;\n\n  // Preserve trailing slashes on basename, so we can let the user control\n  // the enforcement of trailing slashes throughout the app\n  let basename = basenameProp.replace(/^\\/*/, \"/\");\n  let navigationContext = React.useMemo(() => ({\n    basename,\n    navigator,\n    static: staticProp,\n    future: _extends({\n      v7_relativeSplatPath: false\n    }, future)\n  }), [basename, future, navigator, staticProp]);\n  if (typeof locationProp === \"string\") {\n    locationProp = parsePath(locationProp);\n  }\n  let {\n    pathname = \"/\",\n    search = \"\",\n    hash = \"\",\n    state = null,\n    key = \"default\"\n  } = locationProp;\n  let locationContext = React.useMemo(() => {\n    let trailingPathname = stripBasename(pathname, basename);\n    if (trailingPathname == null) {\n      return null;\n    }\n    return {\n      location: {\n        pathname: trailingPathname,\n        search,\n        hash,\n        state,\n        key\n      },\n      navigationType\n    };\n  }, [basename, pathname, search, hash, state, key, navigationType]);\n  process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(locationContext != null, \"<Router basename=\\\"\" + basename + \"\\\"> is not able to match the URL \" + (\"\\\"\" + pathname + search + hash + \"\\\" because it does not start with the \") + \"basename, so the <Router> won't render anything.\") : void 0;\n  if (locationContext == null) {\n    return null;\n  }\n  return /*#__PURE__*/React.createElement(NavigationContext.Provider, {\n    value: navigationContext\n  }, /*#__PURE__*/React.createElement(LocationContext.Provider, {\n    children: children,\n    value: locationContext\n  }));\n}\n/**\n * A container for a nested tree of `<Route>` elements that renders the branch\n * that best matches the current location.\n *\n * @see https://reactrouter.com/v6/components/routes\n */\nfunction Routes(_ref6) {\n  let {\n    children,\n    location\n  } = _ref6;\n  return useRoutes(createRoutesFromChildren(children), location);\n}\n/**\n * Component to use for rendering lazily loaded data from returning defer()\n * in a loader function\n */\nfunction Await(_ref7) {\n  let {\n    children,\n    errorElement,\n    resolve\n  } = _ref7;\n  return /*#__PURE__*/React.createElement(AwaitErrorBoundary, {\n    resolve: resolve,\n    errorElement: errorElement\n  }, /*#__PURE__*/React.createElement(ResolveAwait, null, children));\n}\nvar AwaitRenderStatus = /*#__PURE__*/function (AwaitRenderStatus) {\n  AwaitRenderStatus[AwaitRenderStatus[\"pending\"] = 0] = \"pending\";\n  AwaitRenderStatus[AwaitRenderStatus[\"success\"] = 1] = \"success\";\n  AwaitRenderStatus[AwaitRenderStatus[\"error\"] = 2] = \"error\";\n  return AwaitRenderStatus;\n}(AwaitRenderStatus || {});\nconst neverSettledPromise = new Promise(() => {});\nclass AwaitErrorBoundary extends React.Component {\n  constructor(props) {\n    super(props);\n    this.state = {\n      error: null\n    };\n  }\n  static getDerivedStateFromError(error) {\n    return {\n      error\n    };\n  }\n  componentDidCatch(error, errorInfo) {\n    console.error(\"<Await> caught the following error during render\", error, errorInfo);\n  }\n  render() {\n    let {\n      children,\n      errorElement,\n      resolve\n    } = this.props;\n    let promise = null;\n    let status = AwaitRenderStatus.pending;\n    if (!(resolve instanceof Promise)) {\n      // Didn't get a promise - provide as a resolved promise\n      status = AwaitRenderStatus.success;\n      promise = Promise.resolve();\n      Object.defineProperty(promise, \"_tracked\", {\n        get: () => true\n      });\n      Object.defineProperty(promise, \"_data\", {\n        get: () => resolve\n      });\n    } else if (this.state.error) {\n      // Caught a render error, provide it as a rejected promise\n      status = AwaitRenderStatus.error;\n      let renderError = this.state.error;\n      promise = Promise.reject().catch(() => {}); // Avoid unhandled rejection warnings\n      Object.defineProperty(promise, \"_tracked\", {\n        get: () => true\n      });\n      Object.defineProperty(promise, \"_error\", {\n        get: () => renderError\n      });\n    } else if (resolve._tracked) {\n      // Already tracked promise - check contents\n      promise = resolve;\n      status = \"_error\" in promise ? AwaitRenderStatus.error : \"_data\" in promise ? AwaitRenderStatus.success : AwaitRenderStatus.pending;\n    } else {\n      // Raw (untracked) promise - track it\n      status = AwaitRenderStatus.pending;\n      Object.defineProperty(resolve, \"_tracked\", {\n        get: () => true\n      });\n      promise = resolve.then(data => Object.defineProperty(resolve, \"_data\", {\n        get: () => data\n      }), error => Object.defineProperty(resolve, \"_error\", {\n        get: () => error\n      }));\n    }\n    if (status === AwaitRenderStatus.error && promise._error instanceof AbortedDeferredError) {\n      // Freeze the UI by throwing a never resolved promise\n      throw neverSettledPromise;\n    }\n    if (status === AwaitRenderStatus.error && !errorElement) {\n      // No errorElement, throw to the nearest route-level error boundary\n      throw promise._error;\n    }\n    if (status === AwaitRenderStatus.error) {\n      // Render via our errorElement\n      return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n        value: promise,\n        children: errorElement\n      });\n    }\n    if (status === AwaitRenderStatus.success) {\n      // Render children with resolved value\n      return /*#__PURE__*/React.createElement(AwaitContext.Provider, {\n        value: promise,\n        children: children\n      });\n    }\n\n    // Throw to the suspense boundary\n    throw promise;\n  }\n}\n\n/**\n * @private\n * Indirection to leverage useAsyncValue for a render-prop API on `<Await>`\n */\nfunction ResolveAwait(_ref8) {\n  let {\n    children\n  } = _ref8;\n  let data = useAsyncValue();\n  let toRender = typeof children === \"function\" ? children(data) : children;\n  return /*#__PURE__*/React.createElement(React.Fragment, null, toRender);\n}\n\n///////////////////////////////////////////////////////////////////////////////\n// UTILS\n///////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a route config from a React \"children\" object, which is usually\n * either a `<Route>` element or an array of them. Used internally by\n * `<Routes>` to create a route config from its children.\n *\n * @see https://reactrouter.com/v6/utils/create-routes-from-children\n */\nfunction createRoutesFromChildren(children, parentPath) {\n  if (parentPath === void 0) {\n    parentPath = [];\n  }\n  let routes = [];\n  React.Children.forEach(children, (element, index) => {\n    if (! /*#__PURE__*/React.isValidElement(element)) {\n      // Ignore non-elements. This allows people to more easily inline\n      // conditionals in their route config.\n      return;\n    }\n    let treePath = [...parentPath, index];\n    if (element.type === React.Fragment) {\n      // Transparently support React.Fragment and its children.\n      routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));\n      return;\n    }\n    !(element.type === Route) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"[\" + (typeof element.type === \"string\" ? element.type : element.type.name) + \"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>\") : UNSAFE_invariant(false) : void 0;\n    !(!element.props.index || !element.props.children) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"An index route cannot have child routes.\") : UNSAFE_invariant(false) : void 0;\n    let route = {\n      id: element.props.id || treePath.join(\"-\"),\n      caseSensitive: element.props.caseSensitive,\n      element: element.props.element,\n      Component: element.props.Component,\n      index: element.props.index,\n      path: element.props.path,\n      loader: element.props.loader,\n      action: element.props.action,\n      errorElement: element.props.errorElement,\n      ErrorBoundary: element.props.ErrorBoundary,\n      hasErrorBoundary: element.props.ErrorBoundary != null || element.props.errorElement != null,\n      shouldRevalidate: element.props.shouldRevalidate,\n      handle: element.props.handle,\n      lazy: element.props.lazy\n    };\n    if (element.props.children) {\n      route.children = createRoutesFromChildren(element.props.children, treePath);\n    }\n    routes.push(route);\n  });\n  return routes;\n}\n\n/**\n * Renders the result of `matchRoutes()` into a React element.\n */\nfunction renderMatches(matches) {\n  return _renderMatches(matches);\n}\n\nfunction mapRouteProperties(route) {\n  let updates = {\n    // Note: this check also occurs in createRoutesFromChildren so update\n    // there if you change this -- please and thank you!\n    hasErrorBoundary: route.ErrorBoundary != null || route.errorElement != null\n  };\n  if (route.Component) {\n    if (process.env.NODE_ENV !== \"production\") {\n      if (route.element) {\n        process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"You should not include both `Component` and `element` on your route - \" + \"`Component` will be used.\") : void 0;\n      }\n    }\n    Object.assign(updates, {\n      element: /*#__PURE__*/React.createElement(route.Component),\n      Component: undefined\n    });\n  }\n  if (route.HydrateFallback) {\n    if (process.env.NODE_ENV !== \"production\") {\n      if (route.hydrateFallbackElement) {\n        process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - \" + \"`HydrateFallback` will be used.\") : void 0;\n      }\n    }\n    Object.assign(updates, {\n      hydrateFallbackElement: /*#__PURE__*/React.createElement(route.HydrateFallback),\n      HydrateFallback: undefined\n    });\n  }\n  if (route.ErrorBoundary) {\n    if (process.env.NODE_ENV !== \"production\") {\n      if (route.errorElement) {\n        process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"You should not include both `ErrorBoundary` and `errorElement` on your route - \" + \"`ErrorBoundary` will be used.\") : void 0;\n      }\n    }\n    Object.assign(updates, {\n      errorElement: /*#__PURE__*/React.createElement(route.ErrorBoundary),\n      ErrorBoundary: undefined\n    });\n  }\n  return updates;\n}\nfunction createMemoryRouter(routes, opts) {\n  return createRouter({\n    basename: opts == null ? void 0 : opts.basename,\n    future: _extends({}, opts == null ? void 0 : opts.future, {\n      v7_prependBasename: true\n    }),\n    history: createMemoryHistory({\n      initialEntries: opts == null ? void 0 : opts.initialEntries,\n      initialIndex: opts == null ? void 0 : opts.initialIndex\n    }),\n    hydrationData: opts == null ? void 0 : opts.hydrationData,\n    routes,\n    mapRouteProperties,\n    dataStrategy: opts == null ? void 0 : opts.dataStrategy,\n    patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation\n  }).initialize();\n}\n\nexport { Await, MemoryRouter, Navigate, Outlet, Route, Router, RouterProvider, Routes, DataRouterContext as UNSAFE_DataRouterContext, DataRouterStateContext as UNSAFE_DataRouterStateContext, LocationContext as UNSAFE_LocationContext, NavigationContext as UNSAFE_NavigationContext, RouteContext as UNSAFE_RouteContext, logV6DeprecationWarnings as UNSAFE_logV6DeprecationWarnings, mapRouteProperties as UNSAFE_mapRouteProperties, useRouteId as UNSAFE_useRouteId, useRoutesImpl as UNSAFE_useRoutesImpl, createMemoryRouter, createRoutesFromChildren, createRoutesFromChildren as createRoutesFromElements, renderMatches, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes };\n//# sourceMappingURL=index.js.map\n","var RELEASE_TRAIN = 'basil';\n\nvar runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {\n  return version === 3 ? 'v3' : version;\n};\n\nvar ORIGIN = 'https://js.stripe.com';\nvar STRIPE_JS_URL = \"\".concat(ORIGIN, \"/\").concat(RELEASE_TRAIN, \"/stripe.js\");\nvar V3_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/v3\\/?(\\?.*)?$/;\nvar STRIPE_JS_URL_REGEX = /^https:\\/\\/js\\.stripe\\.com\\/(v3|[a-z]+)\\/stripe\\.js(\\?.*)?$/;\nvar EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';\n\nvar isStripeJSURL = function isStripeJSURL(url) {\n  return V3_URL_REGEX.test(url) || STRIPE_JS_URL_REGEX.test(url);\n};\n\nvar findScript = function findScript() {\n  var scripts = document.querySelectorAll(\"script[src^=\\\"\".concat(ORIGIN, \"\\\"]\"));\n\n  for (var i = 0; i < scripts.length; i++) {\n    var script = scripts[i];\n\n    if (!isStripeJSURL(script.src)) {\n      continue;\n    }\n\n    return script;\n  }\n\n  return null;\n};\n\nvar injectScript = function injectScript(params) {\n  var queryString = params && !params.advancedFraudSignals ? '?advancedFraudSignals=false' : '';\n  var script = document.createElement('script');\n  script.src = \"\".concat(STRIPE_JS_URL).concat(queryString);\n  var headOrBody = document.head || document.body;\n\n  if (!headOrBody) {\n    throw new Error('Expected document.body not to be null. Stripe.js requires a <body> element.');\n  }\n\n  headOrBody.appendChild(script);\n  return script;\n};\n\nvar registerWrapper = function registerWrapper(stripe, startTime) {\n  if (!stripe || !stripe._registerWrapper) {\n    return;\n  }\n\n  stripe._registerWrapper({\n    name: 'stripe-js',\n    version: \"7.9.0\",\n    startTime: startTime\n  });\n};\n\nvar stripePromise$1 = null;\nvar onErrorListener = null;\nvar onLoadListener = null;\n\nvar onError = function onError(reject) {\n  return function (cause) {\n    reject(new Error('Failed to load Stripe.js', {\n      cause: cause\n    }));\n  };\n};\n\nvar onLoad = function onLoad(resolve, reject) {\n  return function () {\n    if (window.Stripe) {\n      resolve(window.Stripe);\n    } else {\n      reject(new Error('Stripe.js not available'));\n    }\n  };\n};\n\nvar loadScript = function loadScript(params) {\n  // Ensure that we only attempt to load Stripe.js at most once\n  if (stripePromise$1 !== null) {\n    return stripePromise$1;\n  }\n\n  stripePromise$1 = new Promise(function (resolve, reject) {\n    if (typeof window === 'undefined' || typeof document === 'undefined') {\n      // Resolve to null when imported server side. This makes the module\n      // safe to import in an isomorphic code base.\n      resolve(null);\n      return;\n    }\n\n    if (window.Stripe && params) {\n      console.warn(EXISTING_SCRIPT_MESSAGE);\n    }\n\n    if (window.Stripe) {\n      resolve(window.Stripe);\n      return;\n    }\n\n    try {\n      var script = findScript();\n\n      if (script && params) {\n        console.warn(EXISTING_SCRIPT_MESSAGE);\n      } else if (!script) {\n        script = injectScript(params);\n      } else if (script && onLoadListener !== null && onErrorListener !== null) {\n        var _script$parentNode;\n\n        // remove event listeners\n        script.removeEventListener('load', onLoadListener);\n        script.removeEventListener('error', onErrorListener); // if script exists, but we are reloading due to an error,\n        // reload script to trigger 'load' event\n\n        (_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 ? void 0 : _script$parentNode.removeChild(script);\n        script = injectScript(params);\n      }\n\n      onLoadListener = onLoad(resolve, reject);\n      onErrorListener = onError(reject);\n      script.addEventListener('load', onLoadListener);\n      script.addEventListener('error', onErrorListener);\n    } catch (error) {\n      reject(error);\n      return;\n    }\n  }); // Resets stripePromise on error\n\n  return stripePromise$1[\"catch\"](function (error) {\n    stripePromise$1 = null;\n    return Promise.reject(error);\n  });\n};\nvar initStripe = function initStripe(maybeStripe, args, startTime) {\n  if (maybeStripe === null) {\n    return null;\n  }\n\n  var pk = args[0];\n  var isTestKey = pk.match(/^pk_test/); // @ts-expect-error this is not publicly typed\n\n  var version = runtimeVersionToUrlVersion(maybeStripe.version);\n  var expectedVersion = RELEASE_TRAIN;\n\n  if (isTestKey && version !== expectedVersion) {\n    console.warn(\"Stripe.js@\".concat(version, \" was loaded on the page, but @stripe/stripe-js@\").concat(\"7.9.0\", \" expected Stripe.js@\").concat(expectedVersion, \". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning\"));\n  }\n\n  var stripe = maybeStripe.apply(undefined, args);\n  registerWrapper(stripe, startTime);\n  return stripe;\n}; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nvar stripePromise;\nvar loadCalled = false;\n\nvar getStripePromise = function getStripePromise() {\n  if (stripePromise) {\n    return stripePromise;\n  }\n\n  stripePromise = loadScript(null)[\"catch\"](function (error) {\n    // clear cache on error\n    stripePromise = null;\n    return Promise.reject(error);\n  });\n  return stripePromise;\n}; // Execute our own script injection after a tick to give users time to do their\n// own script injection.\n\n\nPromise.resolve().then(function () {\n  return getStripePromise();\n})[\"catch\"](function (error) {\n  if (!loadCalled) {\n    console.warn(error);\n  }\n});\nvar loadStripe = function loadStripe() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  loadCalled = true;\n  var startTime = Date.now(); // if previous attempts are unsuccessful, will re-load script\n\n  return getStripePromise().then(function (maybeStripe) {\n    return initStripe(maybeStripe, args, startTime);\n  });\n};\n\nexport { loadStripe };\n","export default function(t,e,l,n,r){for(e=e.split?e.split(\".\"):e,n=0;n<e.length;n++)t=t?t[e[n]]:r;return t===r?l:t}\n//# sourceMappingURL=dlv.es.js.map\n","var n=\"function\",t=\"string\",e=\"undefined\",r=\"boolean\",o=\"object\",u=\"array\",c=\"number\",i=\"symbol\",a=\"null\",f=\"error\",s=\"typeError\",l=\"syntaxError\",p=\"asyncFunction\",d=\"generatorFunction\",y=\"asyncGeneratorFunction\",g=function(){},m=\"any\",v=\"*\",b=\"none\",h=\"hidden\",O=\"__\",S=\"form\",j=\"input\",A=\"button\",E=\"select\",N=\"change\",w=\"submit\",D=/^\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)$/,z=/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Z=/^\\{[\\s\\S]*\\}$|^\\[[\\s\\S]*\\]$/,P=typeof process!==e?process:{},x=P.env&&P.env.NODE_ENV||\"\",C=\"production\"===x,F=\"staging\"===x,L=\"development\"===x,$=typeof document!==e,T=$&&\"localhost\"===window.location.hostname,_=null!=P.versions&&null!=P.versions.node,k=typeof Deno!==e&&typeof Deno.core!==e,B=typeof self===o&&self.constructor&&\"DedicatedWorkerGlobalScope\"===self.constructor.name,G=$&&\"nodejs\"===window.name||typeof navigator!==e&&typeof navigator.userAgent!==e&&(navigator.userAgent.includes(\"Node.js\")||navigator.userAgent.includes(\"jsdom\"));function M(n,t){return t.charAt(0)[n]()+t.slice(1)}var U=M.bind(null,\"toUpperCase\"),H=M.bind(null,\"toLowerCase\");function J(n){return Y(n)?U(a):typeof n===o?yn(n):Object.prototype.toString.call(n).slice(8,-1)}function R(n,t){void 0===t&&(t=!0);var e=J(n);return t?H(e):e}function V(n,t){return typeof t===n}var W=V.bind(null,n),q=V.bind(null,t),I=V.bind(null,e);function K(n){return!I(n)}var Q=V.bind(null,r),X=V.bind(null,i);function Y(n){return null===n}function nn(n){return R(n)===c&&!isNaN(n)}function tn(n){return!isNaN(parseFloat(n))}function en(n){return!!W(n)&&/^class /.test(Function.prototype.toString.call(n))}function rn(n){return R(n)===u}function on(n){if(!un(n))return!1;for(var t=n;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(n)===t}function un(n){return n&&(typeof n===o||null!==n)}function cn(n){if(!q(n)||!Z.test(n))return!1;try{JSON.parse(n)}catch(n){return!1}return!0}function an(n){if(Y(n))return!0;switch(typeof n){case t:case c:case i:case e:case r:return!0;default:return!1}}function fn(n,t){return on(n)&&W(n[t])}function sn(n){return!!n&&!!(!I(Promise)&&n instanceof Promise||n.then&&W(n.then))}function ln(n){return un(n)&&W(n.throw)&&W(n.return)&&W(n.next)}function pn(n){return R(n)===d}function dn(n){return R(n)===p}function yn(n){return W(n.constructor)?n.constructor.name:null}function gn(n){return n instanceof Set}function mn(n){return n instanceof Map}function vn(n){return n instanceof RegExp}function bn(n){return!(!n.constructor||!W(n.constructor.isBuffer))&&n.constructor.isBuffer(n)}function hn(n){return n instanceof Error||q(n.message)&&n.constructor&&nn(n.constructor.stackTraceLimit)}function On(n){return un(n)&&q(n.message)&&q(n.name)}function Sn(n,t){if(\"object\"!=typeof t||Y(t))return!1;if(t instanceof n)return!0;var e=R(new n(\"\"));if(hn(t))for(;t;){if(R(t)===e)return!0;t=Object.getPrototypeOf(t)}return!1}var jn=Sn.bind(null,TypeError),An=Sn.bind(null,SyntaxError);function En(n){if(!W(n))return!1;var t=/{(\\r|\\n|\\s)*}/gm,e=g+\"\";return e===(n.toString().match(t)||[\"\"])[0].replace(t,e)}function Nn(n){try{if(nn(n.length)&&W(n.callee))return!0}catch(n){if(-1!==n.message.indexOf(\"callee\"))return!0}return!1}function wn(n){return!(q(n)&&\"false\"===n.toLowerCase()||!n)}function Dn(n){return!n}function zn(n){return!0===n}function Zn(n){return!1===n}function Pn(n){return!(n.length>320)&&z.test(n)}function xn(n){return n instanceof Date||W(n.toDateString)&&W(n.getDate)&&W(n.setDate)}function Cn(n){return D.test(n)}function Fn(n){return!(!Y(n)&&(rn(n)?n.length:gn(n)||mn(n)?n.size:on(n)&&Object.keys(n).length))}function Ln(n){return NodeList.prototype.isPrototypeOf(n)}function $n(n,t){var e=n instanceof Element||n instanceof HTMLDocument;return e&&t?Tn(n,t):e}function Tn(n,t){return void 0===t&&(t=\"\"),n&&n.nodeName===t.toUpperCase()}function _n(n){var t=[].slice.call(arguments,1);return function(){return n.apply(void 0,[].slice.call(arguments).concat(t))}}var kn=_n($n,S),Bn=_n($n,A),Gn=_n($n,j),Mn=_n($n,E);function Un(n,t){if(!n||getComputedStyle(n).visibility===h)return!0;for(;n;){if(null!=t&&n===t)return!1;if(getComputedStyle(n).display===b)return!0;n=n.parentElement}return!1}function Hn(n){return n?rn(n)?n:[n]:[]}export{v as ALL,m as ANY,u as ARRAY,p as ASYNC_FUNCTION,y as ASYNC_GENERATOR_FUNCTION,r as BOOLEAN,A as BUTTON,N as CHANGE,x as ENV,f as ERROR,S as FORM,n as FUNCTION,d as GENERATOR_FUNCTION,h as HIDDEN,j as INPUT,b as NONE,a as NULL,c as NUMBER,o as OBJECT,O as PREFIX,z as REGEX_EMAIL,D as REGEX_ISO,Z as REGEX_JSON,E as SELECT,t as STRING,w as SUBMIT,i as SYMBOL,l as SYNTAX_ERROR,s as TYPE_ERROR,e as UNDEFINED,yn as ctorName,Hn as ensureArray,R as getType,J as getTypeName,Nn as isArguments,rn as isArray,dn as isAsyncFunction,Q as isBoolean,$ as isBrowser,bn as isBuffer,Bn as isButton,en as isClass,xn as isDate,K as isDefined,k as isDeno,L as isDev,$n as isElement,Pn as isEmail,Fn as isEmpty,hn as isError,On as isErrorLike,Zn as isFalse,Dn as isFalsy,kn as isForm,W as isFunction,ln as isGenerator,pn as isGeneratorFunction,Un as isHidden,Gn as isInput,Cn as isIsoDate,G as isJsDom,cn as isJson,T as isLocalHost,mn as isMap,fn as isMethod,En as isNoOp,_ as isNode,Ln as isNodeList,Tn as isNodeType,Y as isNull,nn as isNumber,tn as isNumberLike,on as isObject,un as isObjectLike,an as isPrimitive,C as isProd,sn as isPromise,vn as isRegex,Mn as isSelect,gn as isSet,F as isStaging,q as isString,X as isSymbol,An as isSyntaxError,zn as isTrue,wn as isTruthy,jn as isTypeError,I as isUndefined,B as isWebWorker,g as noOp};\n//# sourceMappingURL=analytics-util-types.module.js.map\n","export{default as dotProp}from\"dlv\";import{isBrowser as e,isString as r,isRegex as t}from\"@analytics/type-utils\";function n(e){try{return decodeURIComponent(e.replace(/\\+/g,\" \"))}catch(e){return null}}function o(){if(e){var r=navigator,t=r.languages;return r.userLanguage||(t&&t.length?t[0]:r.language)}}function a(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}}function i(r){if(!e)return!1;var t=r||document.referrer;if(t){var n=window.document.location.port,o=t.split(\"/\")[2];return n&&(o=o.replace(\":\"+n,\"\")),o!==window.location.hostname}return!1}function u(n){if(!e)return!0;var o=document.getElementsByTagName(\"script\");return!!Object.keys(o).filter(function(e){var a=o[e].src;return r(n)?-1!==a.indexOf(n):!!t(n)&&a.match(n)}).length}function c(e,r){var t=(e.split(\"?\")||[,])[1];if(!t||-1===t.indexOf(r))return e;var n=new RegExp(\"(\\\\&|\\\\?)\"+r+'([_A-Za-z0-9\"+=.\\\\/\\\\-@%]+)',\"g\"),o=(\"?\"+t).replace(n,\"\").replace(/^&/,\"?\");return e.replace(\"?\"+t,o)}function l(e,r){return n((RegExp(e+\"=(.+?)(&|$)\").exec(r)||[,\"\"])[1])}function s(r){return function(e){for(var r,t=Object.create(null),o=/([^&=]+)=?([^&]*)/g;r=o.exec(e);){var a=n(r[1]),i=n(r[2]);if(a)if(\"[]\"===a.substring(a.length-2)){var u=t[a=a.substring(0,a.length-2)]||(t[a]=[]);t[a]=Array.isArray(u)?u:[],t[a].push(i)}else t[a]=\"\"===i||i}for(var c in t){var l=c.split(\"[\");l.length>1&&(m(t,l.map(function(e){return e.replace(/[?[\\]\\\\ ]/g,\"\")}),t[c]),delete t[c])}return t}(function(r){if(r){var t=r.match(/\\?(.*)/);return t&&t[1]?t[1].split(\"#\")[0]:\"\"}return e&&window.location.search.substring(1)}(r))}function m(e,r,t){for(var n=r.length-1,o=0;o<n;++o){var a=r[o];if(\"__proto__\"===a||\"constructor\"===a)break;a in e||(e[a]={}),e=e[a]}e[r[n]]=t}function f(r,t){return e?new Promise(function(e,n){if(window.history&&window.history.replaceState){var o=window.location.href,a=c(o,r);o!==a&&history.replaceState({},\"\",a)}return t&&t(),e()}):Promise.resolve()}function g(r){if(!e)return null;var t=document.createElement(\"a\");return t.setAttribute(\"href\",r),t.hostname}function p(e){return(g(e)||\"\").split(\".\").slice(-2).join(\".\")}function x(e){var r=e.split(\".\");return r.length>1?r.slice(0,-1).join(\".\"):e}var d={trimTld:x,getDomainBase:p,getDomainHost:g},v=\"google\";function h(r,t){if(!e)return!1;var n={source:\"(direct)\",medium:\"(none)\",campaign:\"(not set)\"};r&&i(r)&&(n.referrer=r);var o=function(r){if(!r||!e)return!1;var t=p(r),n=document.createElement(\"a\");if(n.href=r,n.hostname.indexOf(v)>-1&&(t=v),y[t]){var o=y[t],a=new RegExp((\"string\"==typeof o?o:o.p)+\"=.*?([^&#]*|$)\",\"gi\"),u=n.search.match(a);return{source:o.n||x(t),medium:\"organic\",term:(u?u[0].split(\"=\")[1]:\"\")||\"(not provided)\"}}var c=i(r)?\"referral\":\"internal\";return{source:n.hostname,medium:c}}(r);o&&Object.keys(o).length&&(n=Object.assign({},n,o));var a=s(t),u=Object.keys(a);if(!u.length)return n;var c=u.reduce(function(e,r){return r.match(/^utm_/)&&(e[\"\"+r.replace(/^utm_/,\"\")]=a[r]),r.match(/^(d|g)clid/)&&(e.source=v,e.medium=a.gclid?\"cpc\":\"cpm\",e[r]=a[r]),e},{});return Object.assign({},n,c)}var w=\"q\",y={\"daum.net\":w,\"eniro.se\":\"search_word\",\"naver.com\":\"query\",\"yahoo.com\":\"p\",\"msn.com\":w,\"aol.com\":w,\"ask.com\":w,\"baidu.com\":\"wd\",\"yandex.com\":\"text\",\"rambler.ru\":\"words\",google:w,\"bing.com\":{p:w,n:\"live\"}};function b(){for(var e=\"\",r=0,t=4294967295*Math.random()|0;r++<36;){var n=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\"[r-1],o=15&t;e+=\"-\"==n||\"4\"==n?n:(\"x\"==n?o:3&o|8).toString(16),t=r%8==0?4294967295*Math.random()|0:t>>4}return e}function O(e,r){var t,n,o,a=null,i=0,u=function(){i=new Date,a=null,o=e.apply(t,n)};return function(){var c=new Date;i||(i=c);var l=r-(c-i);return t=this,n=arguments,l<=0?(clearTimeout(a),a=null,i=c,o=e.apply(t,n)):a||(a=setTimeout(u,l)),o}}export{n as decodeUri,o as getBrowserLocale,a as getTimeZone,i as isExternalReferrer,u as isScriptLoaded,c as paramsClean,l as paramsGet,s as paramsParse,f as paramsRemove,h as parseReferrer,O as throttle,d as url,b as uuid};\n//# sourceMappingURL=analytics-utils.module.js.map\n","import{PREFIX as t,OBJECT as e,UNDEFINED as r}from\"@analytics/type-utils\";var n=\"global\",o=t+n+t,l=typeof self===e&&self.self===self&&self||typeof global===e&&global[n]===global&&global||void 0;function f(t){return l[o][t]}function a(t,e){return l[o][t]=e}function i(t){delete l[o][t]}function u(t,e,r){var n;try{if(s(t)){var o=window[t];n=o[e].bind(o)}}catch(t){}return n||r}l[o]||(l[o]={});var c={};function s(t){if(typeof c[t]!==r)return c[t];try{var e=window[t];e.setItem(r,r),e.removeItem(r)}catch(e){return c[t]=!1}return c[t]=!0}export{n as GLOBAL,o as KEY,f as get,l as globalContext,s as hasSupport,i as remove,a as set,u as wrap};\n//# sourceMappingURL=analytics-util-global-storage.module.js.map\n","import{uuid as e,getBrowserLocale as n,getTimeZone as t,paramsParse as r,dotProp as i}from\"analytics-utils\";import{get as a,remove as o,set as u,globalContext as c,KEY as s}from\"@analytics/global-storage-utils\";import{isObject as l,PREFIX as f,isFunction as d,isBoolean as p,isString as m,isBrowser as g,isArray as v}from\"@analytics/type-utils\";function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},h.apply(null,arguments)}var y=\"function\",b=\"undefined\",I=\"reducer\",w=\"@@redux/\",E=w+\"INIT\",P=w+Math.random().toString(36),S=/* #__PURE__ */function(){return typeof Symbol===y&&Symbol.observable||\"@@observable\"}(),N=\" != \"+y;function O(e,n,t){var r;if(typeof n===y&&typeof t===b&&(t=n,n=void 0),typeof t!==b){if(typeof t!==y)throw new Error(\"enhancer\"+N);return t(O)(e,n)}if(typeof e!==y)throw new Error(I+N);var i=e,a=n,o=[],u=o,c=!1;function s(){u===o&&(u=o.slice())}function f(){return a}function d(e){if(typeof e!==y)throw new Error(\"Listener\"+N);var n=!0;return s(),u.push(e),function(){if(n){n=!1,s();var t=u.indexOf(e);u.splice(t,1)}}}function p(e){if(!l(e))throw new Error(\"Act != obj\");if(typeof e.type===b)throw new Error(\"ActType \"+b);if(c)throw new Error(\"Dispatch in \"+I);try{c=!0,a=i(a,e)}finally{c=!1}for(var n=o=u,t=0;t<n.length;t++)(0,n[t])();return e}return p({type:E}),(r={dispatch:p,subscribe:d,getState:f,replaceReducer:function(e){if(typeof e!==y)throw new Error(\"next \"+I+N);i=e,p({type:E})}})[S]=function(){var e,n=d;return(e={subscribe:function(e){if(\"object\"!=typeof e)throw new TypeError(\"Observer != obj\");function t(){e.next&&e.next(f())}return t(),{unsubscribe:n(t)}}})[S]=function(){return this},e},r}function A(e,n){var t=n&&n.type;return\"action \"+(t&&t.toString()||\"?\")+I+\" \"+e+\" returns \"+b}function _(){var e=[].slice.call(arguments);return 0===e.length?function(e){return e}:1===e.length?e[0]:e.reduce(function(e,n){return function(){return e(n.apply(void 0,[].slice.call(arguments)))}})}function k(){var e=arguments;return function(n){return function(t,r,i){var a,o=n(t,r,i),u=o.dispatch,c={getState:o.getState,dispatch:function(e){return u(e)}};return a=[].slice.call(e).map(function(e){return e(c)}),h({},o,{dispatch:u=_.apply(void 0,a)(o.dispatch)})}}}var x=f+\"anon_id\",j=f+\"user_id\",T=f+\"user_traits\",z={__proto__:null,ANON_ID:x,USER_ID:j,USER_TRAITS:T},M=\"analytics\",q=\"userId\",U=\"anonymousId\",V=[\"bootstrap\",\"params\",\"campaign\",\"initializeStart\",\"initialize\",\"initializeEnd\",\"ready\",\"resetStart\",\"reset\",\"resetEnd\",\"pageStart\",\"page\",\"pageEnd\",\"pageAborted\",\"trackStart\",\"track\",\"trackEnd\",\"trackAborted\",\"identifyStart\",\"identify\",\"identifyEnd\",\"identifyAborted\",\"userIdChanged\",\"registerPlugins\",\"enablePlugin\",\"disablePlugin\",\"online\",\"offline\",\"setItemStart\",\"setItem\",\"setItemEnd\",\"setItemAborted\",\"removeItemStart\",\"removeItem\",\"removeItemEnd\",\"removeItemAborted\"],L=[\"name\",\"EVENTS\",\"config\",\"loaded\"],C=V.reduce(function(e,n){return e[n]=n,e},{registerPluginType:function(e){return\"registerPlugin:\"+e},pluginReadyType:function(e){return\"ready:\"+e}}),R=/^utm_/,$=/^an_prop_/,D=/^an_trait_/;function B(e){var n=e.storage.setItem;return function(t){return function(r){return function(i){if(i.type===C.bootstrap){var a=i.params,o=i.user,u=i.persistedUser,c=i.initialUser,s=u.userId===o.userId;u.anonymousId!==o.anonymousId&&n(x,o.anonymousId),s||n(j,o.userId),c.traits&&n(T,h({},s&&u.traits?u.traits:{},c.traits));var l=Object.keys(i.params);if(l.length){var f=a.an_uid,d=a.an_event,p=l.reduce(function(e,n){if(n.match(R)||n.match(/^(d|g)clid/)){var t=n.replace(R,\"\");e.campaign[\"campaign\"===t?\"name\":t]=a[n]}return n.match($)&&(e.props[n.replace($,\"\")]=a[n]),n.match(D)&&(e.traits[n.replace(D,\"\")]=a[n]),e},{campaign:{},props:{},traits:{}});t.dispatch(h({type:C.params,raw:a},p,f?{userId:f}:{})),f&&setTimeout(function(){return e.identify(f,p.traits)},0),d&&setTimeout(function(){return e.track(d,p.props)},0),Object.keys(p.campaign).length&&t.dispatch({type:C.campaign,campaign:p.campaign})}}return r(i)}}}}function X(e){return function(n,t){if(void 0===n&&(n={}),void 0===t&&(t={}),t.type===C.setItemEnd){if(t.key===x)return h({},n,{anonymousId:t.value});if(t.key===j)return h({},n,{userId:t.value})}switch(t.type){case C.identify:return Object.assign({},n,{userId:t.userId,traits:h({},n.traits,t.traits)});case C.reset:return[j,x,T].forEach(function(n){e.removeItem(n)}),Object.assign({},n,{userId:null,anonymousId:null,traits:{}});default:return n}}}function J(e){return{userId:e.getItem(j),anonymousId:e.getItem(x),traits:e.getItem(T)}}var W=function(e){return f+\"TEMP\"+f+e};function H(n){var t=n.storage,r=t.setItem,i=t.removeItem,a=t.getItem;return function(n){return function(t){return function(u){var c=u.userId,s=u.traits,l=u.options;if(u.type===C.reset&&([j,T,x].forEach(function(e){i(e)}),[q,U,\"traits\"].forEach(function(e){o(W(e))})),u.type===C.identify){a(x)||r(x,e());var f=a(j),d=a(T)||{};f&&f!==c&&n.dispatch({type:C.userIdChanged,old:{userId:f,traits:d},new:{userId:c,traits:s},options:l}),c&&r(j,c),s&&r(T,h({},d,s))}return t(u)}}}}var F={};function G(e,n){F[e]&&d(F[e])&&(F[e](n),delete F[e])}function K(e,n,t){return new Promise(function(r,i){return n()?r(e):t<1?i(h({},e,{queue:!0})):new Promise(function(e){return setTimeout(e,10)}).then(function(a){return K(e,n,t-10).then(r,i)})})}function Q(e){return{abort:e}}function Y(e,n,t){var r={},i=n(),a=e.getState(),o=a.plugins,u=a.queue,c=a.user;if(!a.context.offline&&u&&u.actions&&u.actions.length){var s=u.actions.reduce(function(e,n,t){return o[n.plugin].loaded?(e.process.push(n),e.processIndex.push(t)):(e.requeue.push(n),e.requeueIndex.push(t)),e},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(s.processIndex&&s.processIndex.length){s.processIndex.forEach(function(n){var a=u.actions[n],s=a.plugin,f=a.payload.type,p=i[s][f];if(p&&d(p)){var m,g=function(e,n){return void 0===e&&(e={}),void 0===n&&(n={}),[q,U].reduce(function(t,r){return e.hasOwnProperty(r)&&n[r]&&n[r]!==e[r]&&(t[r]=n[r]),t},e)}(a.payload,c),v=r[g.meta.rid];if(!v&&(m=p({payload:g,config:o[s].config,instance:t,abort:Q}))&&l(m)&&m.abort)return void(r[g.meta.rid]=!0);if(!v){var y=f+\":\"+s;e.dispatch(h({},g,{type:y,_:{called:y,from:\"queueDrain\"}}))}}});var f=u.actions.filter(function(e,n){return!~s.processIndex.indexOf(n)});u.actions=f}}}var Z=function(e){var n=e.data,t=e.action,r=e.instance,i=e.state,a=e.allPlugins,o=e.allMatches,u=e.store,c=e.EVENTS;try{var s=i.plugins,f=i.context,p=t.type,m=p.match(ee),g=n.exact.map(function(e){return e.pluginName});m&&(g=o.during.map(function(e){return e.pluginName}));var v=function(e,n){return function(t,r,i){var a=r.config,o=r.name,u=o+\".\"+t.type;i&&(u=i.event);var c=t.type.match(ee)?function(e,n,t,r,i){return function(a,o){var u=r?r.name:e,c=o&&se(o)?o:t;if(r&&(!(c=o&&se(o)?o:[e]).includes(e)||1!==c.length))throw new Error(\"Method \"+n+\" can only abort \"+e+\" plugin. \"+JSON.stringify(c)+\" input valid\");return h({},i,{abort:{reason:a,plugins:c,caller:n,_:u}})}}(o,u,n,i,t):function(e,n){return function(){throw new Error(e.type+\" action not cancellable. Remove abort in \"+n)}}(t,u);return{payload:de(t),instance:e,config:a||{},abort:c}}}(r,g),y=n.exact.reduce(function(e,n){var t=n.pluginName,r=n.methodName,i=!1;return r.match(/^initialize/)||r.match(/^reset/)||(i=!s[t].loaded),f.offline&&r.match(/^(page|track|identify)/)&&(i=!0),e[\"\"+t]=i,e},{});return Promise.resolve(n.exact.reduce(function(e,i,o){var u=i.pluginName;return Promise.resolve(e).then(function(e){function i(){return Promise.resolve(e)}var o=function(){if(n.namespaced&&n.namespaced[u])return Promise.resolve(n.namespaced[u].reduce(function(e,n,t){return Promise.resolve(e).then(function(e){return n.method&&d(n.method)?(function(e,n){var t=fe(e);if(t&&t.name===n){var r=fe(t.method);throw new Error([n+\" plugin is calling method \"+e,\"Plugins cant call self\",\"Use \"+t.method+\" \"+(r?\"or \"+r.method:\"\")+\" in \"+n+\" plugin insteadof \"+e].join(\"\\n\"))}}(n.methodName,n.pluginName),Promise.resolve(n.method({payload:e,instance:r,abort:(t=e,i=u,o=n.pluginName,function(e,n){return h({},t,{abort:{reason:e,plugins:n||[i],caller:p,from:o||i}})}),config:ie(n.pluginName,s,a),plugins:s})).then(function(n){var t=l(n)?n:{};return Promise.resolve(h({},e,t))})):e;var t,i,o})},Promise.resolve(t))).then(function(n){e[u]=n});e[u]=t}();return o&&o.then?o.then(i):i()})},Promise.resolve({}))).then(function(e){return Promise.resolve(n.exact.reduce(function(t,i,o){try{var c=n.exact.length===o+1,f=i.pluginName,d=a[f];return Promise.resolve(t).then(function(n){var t=e[f]?e[f]:{};if(m&&(t=n),ue(t,f))return re({data:t,method:p,instance:r,pluginName:f,store:u}),Promise.resolve(n);if(ue(n,f))return c&&re({data:n,method:p,instance:r,store:u}),Promise.resolve(n);if(y.hasOwnProperty(f)&&!0===y[f])return u.dispatch({type:\"queue\",plugin:f,payload:t,_:{called:\"queue\",from:\"queueMechanism\"}}),Promise.resolve(n);var i=v(e[f],a[f]);return Promise.resolve(d[p]({abort:i.abort,payload:t,instance:r,config:ie(f,s,a),plugins:s})).then(function(i){var a=l(i)?i:{},o=h({},n,a),c=e[f];if(ue(c,f))re({data:c,method:p,instance:r,pluginName:f,store:u});else{var s=p+\":\"+f;(s.match(/:/g)||[]).length<2&&!p.match(ne)&&!p.match(te)&&r.dispatch(h({},m?o:t,{type:s,_:{called:s,from:\"submethod\"}}))}return Promise.resolve(o)})})}catch(e){return Promise.reject(e)}},Promise.resolve(t))).then(function(e){if(!(p.match(ee)||p.match(/^registerPlugin/)||p.match(te)||p.match(ne)||p.match(/^params/)||p.match(/^userIdChanged/))){if(c.plugins.includes(p),e._&&e._.originalAction===p)return e;var t=h({},e,{_:{originalAction:e.type,called:e.type,from:\"engineEnd\"}});ce(e,n.exact.length)&&!p.match(/End$/)&&(t=h({},t,{type:e.type+\"Aborted\"})),u.dispatch(t)}return e})})}catch(e){return Promise.reject(e)}},ee=/Start$/,ne=/^bootstrap/,te=/^ready/;function re(e){var n=e.pluginName,t=e.method+\"Aborted\"+(n?\":\"+n:\"\");e.store.dispatch(h({},e.data,{type:t,_:{called:t,from:\"abort\"}}))}function ie(e,n,t){var r=n[e]||t[e];return r&&r.config?r.config:{}}function ae(e,n){return n.reduce(function(n,t){return t[e]?n.concat({methodName:e,pluginName:t.name,method:t[e]}):n},[])}function oe(e,n){var t=e.replace(ee,\"\"),r=n?\":\"+n:\"\";return[\"\"+e+r,\"\"+t+r,t+\"End\"+r]}function ue(e,n){var t=e.abort;return!!t&&(!0===t||le(t,n)||t&&le(t.plugins,n))}function ce(e,n){var t=e.abort;if(!t)return!1;if(!0===t||m(t))return!0;var r=t.plugins;return se(t)&&t.length===n||se(r)&&r.length===n}function se(e){return Array.isArray(e)}function le(e,n){return!(!e||!se(e))&&e.includes(n)}function fe(e){var n=e.match(/(.*):(.*)/);return!!n&&{method:n[1],name:n[2]}}function de(e){return Object.keys(e).reduce(function(n,t){return\"type\"===t||(n[t]=l(e[t])?Object.assign({},e[t]):e[t]),n},{})}function pe(e,n,t){var r={};return function(i){return function(a){return function(o){try{var u,c=function(e){return u?e:a(f)},s=o.type,l=o.plugins,f=o;if(o.abort)return Promise.resolve(a(o));if(s===C.enablePlugin&&i.dispatch({type:C.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),s===C.disablePlugin&&setTimeout(function(){return G(o.meta.rid,{payload:o})},0),s===C.initializeEnd){var m=n(),g=Object.keys(m),v=g.filter(function(e){return l.includes(e)}).map(function(e){return m[e]}),y=[],b=[],I=o.disabled,w=v.map(function(e){var n=e.loaded,t=e.name,a=e.config;return K(e,function(){return n({config:a})},1e4).then(function(n){return r[t]||(i.dispatch({type:C.pluginReadyType(t),name:t,events:Object.keys(e).filter(function(e){return!L.includes(e)})}),r[t]=!0),y=y.concat(t),e}).catch(function(e){if(e instanceof Error)throw new Error(e);return b=b.concat(e.name),e})});Promise.all(w).then(function(e){var n={plugins:y,failed:b,disabled:I};setTimeout(function(){g.length===w.length+I.length&&i.dispatch(h({},{type:C.ready},n))},0)})}var E=function(){if(s!==C.bootstrap)return/^ready:([^:]*)$/.test(s)&&setTimeout(function(){return Y(i,n,e)},0),Promise.resolve(function(e,n,t,r,i){try{var a=d(n)?n():n,o=e.type,u=o.replace(ee,\"\");if(e._&&e._.called)return Promise.resolve(e);var c=t.getState(),s=(m=a,void 0===(g=c.plugins)&&(g={}),void 0===(v=e.options)&&(v={}),Object.keys(m).filter(function(e){var n=v.plugins||{};return p(n[e])?n[e]:!1!==n.all&&(!g[e]||!1!==g[e].enabled)}).map(function(e){return m[e]}));o===C.initializeStart&&e.fromEnable&&(s=Object.keys(c.plugins).filter(function(n){var t=c.plugins[n];return e.plugins.includes(n)&&!t.initialized}).map(function(e){return a[e]}));var l=s.map(function(e){return e.name}),f=function(e,n){var t=oe(e).map(function(e){return ae(e,n)});return n.reduce(function(t,r){var i=r.name,a=oe(e,i).map(function(e){return ae(e,n)}),o=a[0],u=a[1],c=a[2];return o.length&&(t.beforeNS[i]=o),u.length&&(t.duringNS[i]=u),c.length&&(t.afterNS[i]=c),t},{before:t[0],beforeNS:{},during:t[1],duringNS:{},after:t[2],afterNS:{}})}(o,s);return Promise.resolve(Z({action:e,data:{exact:f.before,namespaced:f.beforeNS},state:c,allPlugins:a,allMatches:f,instance:t,store:r,EVENTS:i})).then(function(e){function n(){var n=function(){if(o.match(ee))return Promise.resolve(Z({action:h({},s,{type:u+\"End\"}),data:{exact:f.after,namespaced:f.afterNS},state:c,allPlugins:a,allMatches:f,instance:t,store:r,EVENTS:i})).then(function(e){e.meta&&e.meta.hasCallback&&G(e.meta.rid,{payload:e})})}();return n&&n.then?n.then(function(){return e}):e}if(ce(e,l.length))return e;var s,d=function(){if(o!==u)return Promise.resolve(Z({action:h({},e,{type:u}),data:{exact:f.during,namespaced:f.duringNS},state:c,allPlugins:a,allMatches:f,instance:t,store:r,EVENTS:i})).then(function(e){s=e});s=e}();return d&&d.then?d.then(n):n()})}catch(e){return Promise.reject(e)}var m,g,v}(o,n,e,i,t)).then(function(e){var n=a(e);return u=1,n})}();return Promise.resolve(E&&E.then?E.then(c):c(E))}catch(e){return Promise.reject(e)}}}}}function me(e){return function(n){return function(n){return function(t){var r=t.type,i=t.key,a=t.value,o=t.options;if(r===C.setItem||r===C.removeItem){if(t.abort)return n(t);r===C.setItem?e.setItem(i,a,o):e.removeItem(i,o)}return n(t)}}}}var ge=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(n,t){e[t]=e[t].concat(n)},this.removeMiddleware=function(n,t){var r=e[t].findIndex(function(e){return e===n});-1!==r&&(e[t]=[].concat(e[t].slice(0,r),e[t].slice(r+1)))},this.dynamicMiddlewares=function(n){return function(t){return function(r){return function(i){var a={getState:t.getState,dispatch:function(e){return t.dispatch(e)}},o=e[n].map(function(e){return e(a)});return _.apply(void 0,o)(r)(i)}}}}};function ve(e){return function(n,t){void 0===n&&(n={});var r={};if(\"initialize:aborted\"===t.type)return n;if(/^registerPlugin:([^:]*)$/.test(t.type)){var i=he(t.type,\"registerPlugin\"),a=e()[i];if(!a||!i)return n;var o=t.enabled,u=a.config;return r[i]={enabled:o,initialized:!!o&&Boolean(!a.initialize),loaded:!!o&&Boolean(a.loaded({config:u})),config:u},h({},n,r)}if(/^initialize:([^:]*)$/.test(t.type)){var c=he(t.type,C.initialize),s=e()[c];return s&&c?(r[c]=h({},n[c],{initialized:!0,loaded:Boolean(s.loaded({config:s.config}))}),h({},n,r)):n}if(/^ready:([^:]*)$/.test(t.type))return r[t.name]=h({},n[t.name],{loaded:!0}),h({},n,r);switch(t.type){case C.disablePlugin:return h({},n,ye(t.plugins,!1,n));case C.enablePlugin:return h({},n,ye(t.plugins,!0,n));default:return n}}}function he(e,n){return e.substring(n.length+1,e.length)}function ye(e,n,t){return e.reduce(function(e,r){return e[r]=h({},t[r],{enabled:n}),e},t)}function be(e){try{return JSON.parse(JSON.stringify(e))}catch(e){}return e}var Ie={last:{},history:[]};function we(e,n){void 0===e&&(e=Ie);var t=n.options,r=n.meta;if(n.type===C.track){var i=be(h({event:n.event,properties:n.properties},Object.keys(t).length&&{options:t},{meta:r}));return h({},e,{last:i,history:e.history.concat(i)})}return e}var Ee={actions:[]};function Pe(e,n){void 0===e&&(e=Ee);var t=n.payload;switch(n.type){case\"queue\":var r;return r=t&&t.type&&t.type===C.identify?[n].concat(e.actions):e.actions.concat(n),h({},e,{actions:r});case\"dequeue\":return[];default:return e}}var Se=/#.*$/;function Ne(e){var n=/(http[s]?:\\/\\/)?([^\\/\\s]+\\/)(.*)/g.exec(e);return\"/\"+(n&&n[3]?n[3].split(\"?\")[0].replace(Se,\"\"):\"\")}var Oe,Ae,_e,ke,xe=function(e){if(void 0===e&&(e={}),!g)return e;var n=document,t=n.title,r=n.referrer,i=window,a=i.location,o=i.innerWidth,u=i.innerHeight,c=a.hash,s=a.search,l=function(e){var n=function(){if(g)for(var e,n=document.getElementsByTagName(\"link\"),t=0;e=n[t];t++)if(\"canonical\"===e.getAttribute(\"rel\"))return e.getAttribute(\"href\")}();return n?n.match(/\\?/)?n:n+e:window.location.href.replace(Se,\"\")}(s),f={title:t,url:l,path:Ne(l),hash:c,search:s,width:o,height:u};return r&&\"\"!==r&&(f.referrer=r),h({},f,e)},je={last:{},history:[]};function Te(e,n){void 0===e&&(e=je);var t=n.options;if(n.type===C.page){var r=be(h({properties:n.properties,meta:n.meta},Object.keys(t).length&&{options:t}));return h({},e,{last:r,history:e.history.concat(r)})}return e}Oe=function(){if(!g)return!1;var e=navigator.appVersion;return~e.indexOf(\"Win\")?\"Windows\":~e.indexOf(\"Mac\")?\"MacOS\":~e.indexOf(\"X11\")?\"UNIX\":~e.indexOf(\"Linux\")?\"Linux\":\"Unknown OS\"}(),Ae=g?document.referrer:null,_e=n(),ke=t();var ze={initialized:!1,sessionId:e(),app:null,version:null,debug:!1,offline:!!g&&!navigator.onLine,os:{name:Oe},userAgent:g?navigator.userAgent:\"node\",library:{name:M,version:\"0.13.1\"},timezone:ke,locale:_e,campaign:{},referrer:Ae};function Me(e,n){void 0===e&&(e=ze);var t=e.initialized,r=n.campaign;switch(n.type){case C.campaign:return h({},e,{campaign:r});case C.offline:return h({},e,{offline:!0});case C.online:return h({},e,{offline:!1});default:return t?e:h({},ze,e,{initialized:!0})}}var qe=[\"plugins\",\"reducers\",\"storage\"];function Ue(e,n,t){if(g){var r=window[(t?\"add\":\"remove\")+\"EventListener\"];e.split(\" \").forEach(function(e){r(e,n)})}}function Ve(e){var n=Ue.bind(null,\"online offline\",function(n){return Promise.resolve(!navigator.onLine).then(e)});return n(!0),function(e){return n(!1)}}function Le(){return u(M,[]),function(e){return function(n,t,r){var i=e(n,t,r),a=i.dispatch;return Object.assign(i,{dispatch:function(e){return c[s][M].push(e.action||e),a(e)}})}}}function Ce(e){return function(){return _(_.apply(null,arguments),Le())}}function Re(e){return e?v(e)?e:[e]:[]}function $e(n,t,r){void 0===n&&(n={});var i,a,o=e();return t&&(F[o]=(i=t,a=function(e){for(var n,t=e||Array.prototype.slice.call(arguments),r=0;r<t.length;r++)if(d(t[r])){n=t[r];break}return n}(r),function(e){a&&a(e),i(e)})),h({},n,{rid:o,ts:(new Date).getTime()},t?{hasCallback:!0}:{})}function De(n){void 0===n&&(n={});var t=n.reducers||{},c=n.initialUser||{},s=(n.plugins||[]).reduce(function(e,n){if(d(n))return e.middlewares=e.middlewares.concat(n),e;if(n.NAMESPACE&&(n.name=n.NAMESPACE),!n.name)throw new Error(\"https://lytics.dev/errors/1\");n.config||(n.config={});var t=n.EVENTS?Object.keys(n.EVENTS).map(function(e){return n.EVENTS[e]}):[];e.pluginEnabled[n.name]=!(!1===n.enabled||!1===n.config.enabled),delete n.enabled,n.methods&&(e.methods[n.name]=Object.keys(n.methods).reduce(function(e,t){var r;return e[t]=(r=n.methods[t],function(){for(var e=Array.prototype.slice.call(arguments),n=new Array(r.length),t=0;t<e.length;t++)n[t]=e[t];return n[n.length]=Z,r.apply({instance:Z},n)}),e},{}),delete n.methods);var r=Object.keys(n).concat(t),i=new Set(e.events.concat(r));if(e.events=Array.from(i),e.pluginsArray=e.pluginsArray.concat(n),e.plugins[n.name])throw new Error(n.name+\"AlreadyLoaded\");return e.plugins[n.name]=n,e.plugins[n.name].loaded||(e.plugins[n.name].loaded=function(){return!0}),e},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),f=n.storage?n.storage:{getItem:a,setItem:u,removeItem:o},p=function(e){return function(n,t,r){return t.getState(\"user\")[n]||(r&&l(r)&&r[n]?r[n]:J(e)[n]||a(W(n))||null)}}(f),v=s.plugins,w=s.events.filter(function(e){return!L.includes(e)}).sort(),S=new Set(w.concat(V).filter(function(e){return!L.includes(e)})),N=Array.from(S).sort(),j=function(){return v},T=new ge,z=T.addMiddleware,M=T.removeMiddleware,R=T.dynamicMiddlewares,$=function(){throw new Error(\"Abort disabled inListener\")},D=r(),F=J(f),G=h({},F,c,D.an_uid?{userId:D.an_uid}:{},D.an_aid?{anonymousId:D.an_aid}:{});G.anonymousId||(G.anonymousId=e());var K=h({enable:function(e,n){return new Promise(function(t){se.dispatch({type:C.enablePlugin,plugins:Re(e),_:{originalAction:C.enablePlugin}},t,[n])})},disable:function(e,n){return new Promise(function(t){se.dispatch({type:C.disablePlugin,plugins:Re(e),_:{originalAction:C.disablePlugin}},t,[n])})}},s.methods),Q=!1,Z={identify:function(e,n,t,r){try{var i=m(e)?e:null,a=l(e)?e:n,o=t||{},c=Z.user();u(W(q),i);var s=i||a.userId||p(q,Z,a);return Promise.resolve(new Promise(function(e){se.dispatch(h({type:C.identifyStart,userId:s,traits:a||{},options:o,anonymousId:c.anonymousId},c.id&&c.id!==i&&{previousId:c.id}),e,[n,t,r])}))}catch(e){return Promise.reject(e)}},track:function(e,n,t,r){try{var i=l(e)?e.event:e;if(!i||!m(i))throw new Error(\"EventMissing\");var a=l(e)?e:n||{},o=l(t)?t:{};return Promise.resolve(new Promise(function(e){se.dispatch({type:C.trackStart,event:i,properties:a,options:o,userId:p(q,Z,n),anonymousId:p(U,Z,n)},e,[n,t,r])}))}catch(e){return Promise.reject(e)}},page:function(e,n,t){try{var r=l(e)?e:{},i=l(n)?n:{};return Promise.resolve(new Promise(function(a){se.dispatch({type:C.pageStart,properties:xe(r),options:i,userId:p(q,Z,r),anonymousId:p(U,Z,r)},a,[e,n,t])}))}catch(e){return Promise.reject(e)}},user:function(e){if(e===q||\"id\"===e)return p(q,Z);if(e===U||\"anonId\"===e)return p(U,Z);var n=Z.getState(\"user\");return e?i(n,e):n},reset:function(e){return new Promise(function(n){se.dispatch({type:C.resetStart},n,e)})},ready:function(e){return Q&&e({plugins:K,instance:Z}),Z.on(C.ready,function(n){e&&e(n),Q=!0})},on:function(e,n){if(!e||!d(n))return!1;if(e===C.bootstrap)throw new Error(\".on disabled for \"+e);var t=/Start$|Start:/;if(\"*\"===e){var r=function(e){return function(e){return function(r){return r.type.match(t)&&n({payload:r,instance:Z,plugins:v}),e(r)}}},i=function(e){return function(e){return function(r){return r.type.match(t)||n({payload:r,instance:Z,plugins:v}),e(r)}}};return z(r,Be),z(i,Xe),function(){M(r,Be),M(i,Xe)}}var a=e.match(t)?Be:Xe,o=function(t){return function(t){return function(r){return r.type===e&&n({payload:r,instance:Z,plugins:v,abort:$}),t(r)}}};return z(o,a),function(){return M(o,a)}},once:function(e,n){if(!e||!d(n))return!1;if(e===C.bootstrap)throw new Error(\".once disabled for \"+e);var t=Z.on(e,function(e){n({payload:e.payload,instance:Z,plugins:v,abort:$}),t()});return t},getState:function(e){var n=se.getState();return e?i(n,e):Object.assign({},n)},dispatch:function(e){var n=m(e)?{type:e}:e;if(V.includes(n.type))throw new Error(\"reserved action \"+n.type);var t=h({},n,{_:h({originalAction:n.type},e._||{})});se.dispatch(t)},enablePlugin:K.enable,disablePlugin:K.disable,plugins:K,storage:{getItem:f.getItem,setItem:function(e,n,t){se.dispatch({type:C.setItemStart,key:e,value:n,options:t})},removeItem:function(e,n){se.dispatch({type:C.removeItemStart,key:e,options:n})}},setAnonymousId:function(e,n){Z.storage.setItem(x,e,n)},events:{core:V,plugins:w}},ee=s.middlewares.concat([function(e){return function(e){return function(n){return n.meta||(n.meta=$e()),e(n)}}},R(Be),pe(Z,j,{all:N,plugins:w}),me(f),B(Z),H(Z),R(Xe)]),ne={context:Me,user:X(f),page:Te,track:we,plugins:ve(j),queue:Pe},te=_,re=_;if(g&&n.debug){var ie=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;ie&&(te=ie({trace:!0,traceLimit:25})),re=function(){return 0===arguments.length?Le():l(typeof arguments[0])?Ce():Ce().apply(null,arguments)}}var ae,oe=function(e){return Object.keys(e).reduce(function(n,t){return qe.includes(t)||(n[t]=e[t]),n},{})}(n),ue=s.pluginsArray.reduce(function(e,n){var t=n.name,r=n.config,i=n.loaded,a=s.pluginEnabled[t];return e[t]={enabled:a,initialized:!!a&&Boolean(!n.initialize),loaded:Boolean(i({config:r})),config:r},e},{}),ce={context:oe,user:G,plugins:ue},se=O(function(e){for(var n=Object.keys(e),t={},r=0;r<n.length;r++){var i=n[r];typeof e[i]===y&&(t[i]=e[i])}var a,o=Object.keys(t);try{!function(e){Object.keys(e).forEach(function(n){var t=e[n];if(typeof t(void 0,{type:E})===b||typeof t(void 0,{type:P})===b)throw new Error(I+\" \"+n+\" \"+b)})}(t)}catch(e){a=e}return function(e,n){if(void 0===e&&(e={}),a)throw a;for(var r=!1,i={},u=0;u<o.length;u++){var c=o[u],s=e[c],l=(0,t[c])(s,n);if(typeof l===b){var f=A(c,n);throw new Error(f)}i[c]=l,r=r||l!==s}return r?i:e}}(h({},ne,t)),ce,re(te(k.apply(void 0,ee))));se.dispatch=(ae=se.dispatch,function(e,n,t){var r=h({},e,{meta:$e(e.meta,n,Re(t))});return ae.apply(null,[r])});var le=Object.keys(v);se.dispatch({type:C.bootstrap,plugins:le,config:oe,params:D,user:G,initialUser:c,persistedUser:F});var fe=le.filter(function(e){return s.pluginEnabled[e]}),de=le.filter(function(e){return!s.pluginEnabled[e]});return se.dispatch({type:C.registerPlugins,plugins:le,enabled:s.pluginEnabled}),s.pluginsArray.map(function(e,n){var t=e.bootstrap,r=e.config,i=e.name;t&&d(t)&&t({instance:Z,config:r,payload:e}),se.dispatch({type:C.registerPluginType(i),name:i,enabled:s.pluginEnabled[i],plugin:e}),s.pluginsArray.length===n+1&&se.dispatch({type:C.initializeStart,plugins:fe,disabled:de})}),Ve(function(e){se.dispatch({type:e?C.offline:C.online})}),function(e,n,t){setInterval(function(){return Y(e,n,t)},3e3)}(se,j,Z),Z}var Be=\"before\",Xe=\"after\";export{De as Analytics,z as CONSTANTS,C as EVENTS,De as default,De as init};\n//# sourceMappingURL=core.module.js.map\n","import{set as e,get as o,remove as n}from\"@analytics/global-storage-utils\";var t=\"cookie\",i=a(),r=d,c=d;function u(e){return i?d(e,\"\",-1):n(e)}function a(){if(void 0!==i)return i;var e=t+t;try{d(e,e),i=-1!==document.cookie.indexOf(e),u(e)}catch(e){i=!1}return i}function d(n,t,r,c,u,a){if(\"undefined\"!=typeof window){var d=arguments.length>1;return!1===i&&(d?e(n,t):o(n)),d?document.cookie=n+\"=\"+encodeURIComponent(t)+(r?\"; expires=\"+new Date(+new Date+1e3*r).toUTCString()+(c?\"; path=\"+c:\"\")+(u?\"; domain=\"+u:\"\")+(a?\"; secure\":\"\"):\"\"):decodeURIComponent(((\"; \"+document.cookie).split(\"; \"+n+\"=\")[1]||\"\").split(\";\")[0])}}export{t as COOKIE,r as getCookie,a as hasCookies,u as removeCookie,c as setCookie};\n//# sourceMappingURL=analytics-util-cookie.module.js.map\n","import{hasSupport as t,wrap as e,get as l,set as o,remove as a}from\"@analytics/global-storage-utils\";var r=\"localStorage\",m=t.bind(null,r),g=e(r,\"getItem\",l),i=e(r,\"setItem\",o),s=e(r,\"removeItem\",a);export{r as LOCAL_STORAGE,g as getItem,m as hasLocalStorage,s as removeItem,i as setItem};\n//# sourceMappingURL=analytics-util-localstorage.module.js.map\n","import{hasSupport as e,wrap as t,get as o,set as r,remove as s}from\"@analytics/global-storage-utils\";var a=\"sessionStorage\",l=e.bind(null,a),m=t(a,\"getItem\",o),i=t(a,\"setItem\",r),g=t(a,\"removeItem\",s);export{a as SESSION_STORAGE,m as getSessionItem,l as hasSessionStorage,g as removeSessionItem,i as setSessionItem};\n//# sourceMappingURL=analytics-util-session-storage.module.js.map\n","import{get as t,GLOBAL as o,set as e,remove as r}from\"@analytics/global-storage-utils\";export{GLOBAL,globalContext}from\"@analytics/global-storage-utils\";import{hasCookies as a,getCookie as i,COOKIE as s,setCookie as n,removeCookie as l}from\"@analytics/cookie-utils\";export{COOKIE,getCookie,hasCookies,removeCookie,setCookie}from\"@analytics/cookie-utils\";import{hasLocalStorage as u,LOCAL_STORAGE as c}from\"@analytics/localstorage-utils\";export{LOCAL_STORAGE,hasLocalStorage}from\"@analytics/localstorage-utils\";import{hasSessionStorage as g,SESSION_STORAGE as f}from\"@analytics/session-storage-utils\";export{SESSION_STORAGE,hasSessionStorage}from\"@analytics/session-storage-utils\";import{isObject as m,isUndefined as S,ANY as p,isString as v,ALL as y}from\"@analytics/type-utils\";export{ALL,ANY}from\"@analytics/type-utils\";function I(t){var o=t;try{if(\"true\"===(o=JSON.parse(t)))return!0;if(\"false\"===o)return!1;if(m(o))return o;parseFloat(o)===o&&(o=parseFloat(o))}catch(t){}if(null!==o&&\"\"!==o)return o}var k=u(),O=g(),x=a();function C(o,e){if(o){var r=A(e),a=!N(r),s=d(r)?I(localStorage.getItem(o)):void 0;if(a&&!S(s))return s;var n=h(r)?I(i(o)):void 0;if(a&&n)return n;var l=E(r)?I(sessionStorage.getItem(o)):void 0;if(a&&l)return l;var u=t(o);return a?u:{localStorage:s,sessionStorage:l,cookie:n,global:u}}}function L(r,a,l){if(r&&!S(a)){var u={},g=A(l),m=JSON.stringify(a),p=!N(g);return d(g)&&(u[c]=F(c,a,I(localStorage.getItem(r))),localStorage.setItem(r,m),p)?u[c]:h(g)&&(u[s]=F(s,a,I(i(r))),n(r,m),p)?u[s]:E(g)&&(u[f]=F(f,a,I(sessionStorage.getItem(r))),sessionStorage.setItem(r,m),p)?u[f]:(u[o]=F(o,a,t(r)),e(r,a),p?u[o]:u)}}function b(t,e){if(t){var a=A(e),i=C(t,y),n={};return!S(i.localStorage)&&d(a)&&(localStorage.removeItem(t),n[c]=i.localStorage),!S(i.cookie)&&h(a)&&(l(t),n[s]=i.cookie),!S(i.sessionStorage)&&E(a)&&(sessionStorage.removeItem(t),n[f]=i.sessionStorage),!S(i.global)&&G(a,o)&&(r(t),n[o]=i.global),n}}function A(t){return t?v(t)?t:t.storage:p}function d(t){return k&&G(t,c)}function h(t){return x&&G(t,s)}function E(t){return O&&G(t,f)}function N(t){return t===y||\"all\"===t}function G(t,o){return t===p||t===o||N(t)}function F(t,o,e){return{location:t,current:o,previous:e}}var J={setItem:L,getItem:C,removeItem:b};export{J as default,C as getItem,b as removeItem,L as setItem};\n//# sourceMappingURL=analytics-util-storage.module.js.map\n","import { Analytics } from '@analytics/core';\nexport { CONSTANTS, EVENTS } from '@analytics/core';\nimport storage from '@analytics/storage-utils';\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    enumerableOnly && (symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    })), keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = null != arguments[i] ? arguments[i] : {};\n    i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n      Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n    });\n  }\n  return target;\n}\n\n// See ../packages/analytics-core for source code\nfunction analyticsLib() {\n  var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var defaultSettings = {\n    storage: storage\n  };\n  return Analytics(_objectSpread2(_objectSpread2({}, defaultSettings), opts));\n}\n\nexport { analyticsLib as Analytics, analyticsLib as default, analyticsLib as init };\n","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\n}\n\n/* global dataLayer */\nvar config$1 = {\n  debug: false,\n  containerId: null // assumesPageview: true,\n\n  /**\n   * Google tag manager plugin\n   * @link https://getanalytics.io/plugins/google-tag-manager/\n   * @link https://developers.google.com/tag-manager/\n   * @param {object} pluginConfig - Plugin settings\n   * @param {string} pluginConfig.containerId - The Container ID uniquely identifies the GTM Container.\n   * @return {object} Analytics plugin\n   * @example\n   *\n   * googleTagManager({\n   *   containerId: 'GTM-123xyz'\n   * })\n   */\n\n};\nfunction googleTagManager$1() {\n  var pluginConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  // Allow for userland overides of base methods\n  return {\n    NAMESPACE: 'google-tag-manager',\n    config: _objectSpread({}, config$1, pluginConfig),\n    initialize: function initialize(_ref) {\n      var config = _ref.config;\n      var containerId = config.containerId;\n\n      if (!containerId) {\n        throw new Error('No google tag manager containerId defined');\n      }\n\n      if (!scriptLoaded()) {\n        /* eslint-disable */\n        (function (w, d, s, l, i) {\n          w[l] = w[l] || [];\n          w[l].push({\n            'gtm.start': new Date().getTime(),\n            event: 'gtm.js'\n          });\n          var f = d.getElementsByTagName(s)[0],\n              j = d.createElement(s),\n              dl = l != 'dataLayer' ? '&l=' + l : '';\n          j.async = true;\n          j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n          f.parentNode.insertBefore(j, f);\n        })(window, document, 'script', 'dataLayer', containerId);\n        /* eslint-enable */\n\n      }\n    },\n    page: function page(_ref2) {\n      var payload = _ref2.payload,\n          options = _ref2.options,\n          instance = _ref2.instance;\n\n      if (typeof dataLayer !== 'undefined') {\n        dataLayer.push(payload.properties);\n      }\n    },\n    track: function track(_ref3) {\n      var payload = _ref3.payload,\n          options = _ref3.options,\n          config = _ref3.config;\n\n      if (typeof dataLayer !== 'undefined') {\n        var anonymousId = payload.anonymousId,\n            userId = payload.userId,\n            properties = payload.properties,\n            category = payload.category;\n        var formattedPayload = properties;\n\n        if (userId) {\n          formattedPayload.userId = userId;\n        }\n\n        if (anonymousId) {\n          formattedPayload.anonymousId = anonymousId;\n        }\n\n        if (!category) {\n          formattedPayload.category = 'All';\n        }\n\n        if (config.debug) {\n          console.log('gtag push', _objectSpread({\n            event: payload.event\n          }, formattedPayload));\n        }\n\n        dataLayer.push(_objectSpread({\n          event: payload.event\n        }, formattedPayload));\n      }\n    },\n    loaded: function loaded() {\n      var hasDataLayer = !!(window.dataLayer && Array.prototype.push !== window.dataLayer.push);\n      return scriptLoaded() && hasDataLayer;\n    }\n  };\n}\n\nfunction scriptLoaded() {\n  var scripts = document.getElementsByTagName('script');\n  return !!Object.keys(scripts).filter(function (key) {\n    var src = scripts[key].src;\n    return src.match(/googletagmanager\\.com\\/gtm\\.js/);\n  }).length;\n}\n\n/* This module will shake out unused code and work in browser and node 🎉 */\n\nvar index = googleTagManager$1;\n\nexport default index;\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/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n  extendStatics = Object.setPrototypeOf ||\n      ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n      function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n  return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n  if (typeof b !== \"function\" && b !== null)\n      throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n  extendStatics(d, b);\n  function __() { this.constructor = d; }\n  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __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\nexport function __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\nexport function __decorate(decorators, target, key, desc) {\n  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n  if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n  else for (var i = decorators.length - 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 = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n  return g.next = verb(0), g[\"throw\"] = verb(1), g[\"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 = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n  function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n  function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\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\nvar ownKeys = function(o) {\n  ownKeys = Object.getOwnPropertyNames || function (o) {\n    var ar = [];\n    for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n    return ar;\n  };\n  return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\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, inner;\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      if (async) inner = dispose;\n    }\n    if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n    if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\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  var r, s = 0;\n  function next() {\n    while (r = env.stack.pop()) {\n      try {\n        if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n        if (r.dispose) {\n          var result = r.dispose.call(r.value);\n          if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n        }\n        else s |= 1;\n      }\n      catch (e) {\n        fail(e);\n      }\n    }\n    if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n    if (env.hasError) throw env.error;\n  }\n  return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n  if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n      return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n          return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n      });\n  }\n  return path;\n}\n\nexport default {\n  __extends,\n  __assign,\n  __rest,\n  __decorate,\n  __param,\n  __esDecorate,\n  __runInitializers,\n  __propKey,\n  __setFunctionName,\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  __rewriteRelativeImportExtension,\n};\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n  return ([\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]]\n  ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n  var i = buf && offset || 0;\n\n  if (typeof(options) == 'string') {\n    buf = options === 'binary' ? new Array(16) : null;\n    options = null;\n  }\n  options = options || {};\n\n  var rnds = options.random || (options.rng || rng)();\n\n  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n  rnds[6] = (rnds[6] & 0x0f) | 0x40;\n  rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n  // Copy bytes to buffer, if provided\n  if (buf) {\n    for (var ii = 0; ii < 16; ++ii) {\n      buf[i + ii] = rnds[ii];\n    }\n  }\n\n  return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/*!\n * Core functionality for Snowplow JavaScript trackers v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __spreadArray, __assign } from 'tslib';\nimport { v4 } from 'uuid';\n\nvar version$1 = \"3.24.6\";\n\n/*\n * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io)\n * and Contributors (http://phpjs.org/authors)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/**\n * Decodes a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to decode\n * @returns The decoded string\n */\nfunction base64urldecode(data) {\n    if (!data) {\n        return data;\n    }\n    var padding = 4 - (data.length % 4);\n    switch (padding) {\n        case 2:\n            data += '==';\n            break;\n        case 3:\n            data += '=';\n            break;\n    }\n    var b64Data = data.replace(/-/g, '+').replace(/_/g, '/');\n    return base64decode(b64Data);\n}\n/**\n * Encodes a string into a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to encode\n * @returns The url safe Base 64 string\n */\nfunction base64urlencode(data) {\n    if (!data) {\n        return data;\n    }\n    var enc = base64encode(data);\n    return enc.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nvar b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n/**\n * Encode string as base64.\n * Any type can be passed, but will be stringified\n *\n * @param data - string to encode\n * @returns base64-encoded string\n */\nfunction base64encode(data) {\n    // discuss at: http://phpjs.org/functions/base64_encode/\n    // original by: Tyler Akins (http://rumkin.com)\n    // improved by: Bayron Guevara\n    // improved by: Thunder.m\n    // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n    // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n    // improved by: Rafał Kukawski (http://kukawski.pl)\n    // bugfixed by: Pellentesque Malesuada\n    // example 1: base64_encode('Kevin van Zonneveld');\n    // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n    // example 2: base64_encode('a');\n    // returns 2: 'YQ=='\n    // example 3: base64_encode('✓ à la mode');\n    // returns 3: '4pyTIMOgIGxhIG1vZGU='\n    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0;\n    var tmp_arr = [];\n    if (!data) {\n        return data;\n    }\n    data = unescape(encodeURIComponent(data));\n    do {\n        // pack three octets into four hexets\n        o1 = data.charCodeAt(i++);\n        o2 = data.charCodeAt(i++);\n        o3 = data.charCodeAt(i++);\n        bits = (o1 << 16) | (o2 << 8) | o3;\n        h1 = (bits >> 18) & 0x3f;\n        h2 = (bits >> 12) & 0x3f;\n        h3 = (bits >> 6) & 0x3f;\n        h4 = bits & 0x3f;\n        // use hexets to index into b64, and append result to encoded string\n        tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n    } while (i < data.length);\n    var enc = tmp_arr.join('');\n    var r = data.length % 3;\n    return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n}\n/**\n * Decode base64 to string\n *\n * @param data - base64 to string\n * @returns decoded string\n */\nfunction base64decode(encodedData) {\n    //  discuss at: http://locutus.io/php/base64_decode/\n    // original by: Tyler Akins (http://rumkin.com)\n    // improved by: Thunder.m\n    // improved by: Kevin van Zonneveld (http://kvz.io)\n    // improved by: Kevin van Zonneveld (http://kvz.io)\n    //    input by: Aman Gupta\n    //    input by: Brett Zamir (http://brett-zamir.me)\n    // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n    // bugfixed by: Pellentesque Malesuada\n    // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n    // improved by: Indigo744\n    //   example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')\n    //   returns 1: 'Kevin van Zonneveld'\n    //   example 2: base64_decode('YQ==')\n    //   returns 2: 'a'\n    //   example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')\n    //   returns 3: '✓ à la mode'\n    // decodeUTF8string()\n    // Internal function to decode properly UTF8 string\n    // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n    var decodeUTF8string = function (str) {\n        // Going backwards: from bytestream, to percent-encoding, to original string.\n        return decodeURIComponent(str\n            .split('')\n            .map(function (c) {\n            return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n        })\n            .join(''));\n    };\n    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = '';\n    var tmpArr = [];\n    if (!encodedData) {\n        return encodedData;\n    }\n    encodedData += '';\n    do {\n        // unpack four hexets into three octets using index points in b64\n        h1 = b64.indexOf(encodedData.charAt(i++));\n        h2 = b64.indexOf(encodedData.charAt(i++));\n        h3 = b64.indexOf(encodedData.charAt(i++));\n        h4 = b64.indexOf(encodedData.charAt(i++));\n        bits = (h1 << 18) | (h2 << 12) | (h3 << 6) | h4;\n        o1 = (bits >> 16) & 0xff;\n        o2 = (bits >> 8) & 0xff;\n        o3 = bits & 0xff;\n        if (h3 === 64) {\n            tmpArr[ac++] = String.fromCharCode(o1);\n        }\n        else if (h4 === 64) {\n            tmpArr[ac++] = String.fromCharCode(o1, o2);\n        }\n        else {\n            tmpArr[ac++] = String.fromCharCode(o1, o2, o3);\n        }\n    } while (i < encodedData.length);\n    dec = tmpArr.join('');\n    return decodeUTF8string(dec.replace(/\\0+$/, ''));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nfunction payloadBuilder() {\n    var dict = {}, allJson = [], jsonForProcessing = [], contextEntitiesForProcessing = [];\n    var processor;\n    var add = function (key, value) {\n        if (value != null && value !== '') {\n            // null also checks undefined\n            dict[key] = value;\n        }\n    };\n    var addDict = function (dict) {\n        for (var key in dict) {\n            if (Object.prototype.hasOwnProperty.call(dict, key)) {\n                add(key, dict[key]);\n            }\n        }\n    };\n    var addJson = function (keyIfEncoded, keyIfNotEncoded, json) {\n        if (json && isNonEmptyJson(json)) {\n            var jsonWithKeys = { keyIfEncoded: keyIfEncoded, keyIfNotEncoded: keyIfNotEncoded, json: json };\n            jsonForProcessing.push(jsonWithKeys);\n            allJson.push(jsonWithKeys);\n        }\n    };\n    var addContextEntity = function (entity) {\n        contextEntitiesForProcessing.push(entity);\n    };\n    return {\n        add: add,\n        addDict: addDict,\n        addJson: addJson,\n        addContextEntity: addContextEntity,\n        getPayload: function () { return dict; },\n        getJson: function () { return allJson; },\n        withJsonProcessor: function (jsonProcessor) {\n            processor = jsonProcessor;\n        },\n        build: function () {\n            processor === null || processor === void 0 ? void 0 : processor(this, jsonForProcessing, contextEntitiesForProcessing);\n            return dict;\n        }\n    };\n}\n/**\n * A helper to build a Snowplow request from a set of name-value pairs, provided using the add methods.\n * Will base64 encode JSON, if desired, on build\n *\n * @returns The request builder, with add and build methods\n */\nfunction payloadJsonProcessor(encodeBase64) {\n    return function (payloadBuilder, jsonForProcessing, contextEntitiesForProcessing) {\n        var add = function (json, keyIfEncoded, keyIfNotEncoded) {\n            var str = JSON.stringify(json);\n            if (encodeBase64) {\n                payloadBuilder.add(keyIfEncoded, base64urlencode(str));\n            }\n            else {\n                payloadBuilder.add(keyIfNotEncoded, str);\n            }\n        };\n        var getContextFromPayload = function () {\n            var payload = payloadBuilder.getPayload();\n            if (encodeBase64 ? payload.cx : payload.co) {\n                return JSON.parse(encodeBase64 ? base64urldecode(payload.cx) : payload.co);\n            }\n            return undefined;\n        };\n        var combineContexts = function (originalContext, newContext) {\n            var context = originalContext || getContextFromPayload();\n            if (context) {\n                context.data = context.data.concat(newContext.data);\n            }\n            else {\n                context = newContext;\n            }\n            return context;\n        };\n        var context = undefined;\n        for (var _i = 0, jsonForProcessing_1 = jsonForProcessing; _i < jsonForProcessing_1.length; _i++) {\n            var json = jsonForProcessing_1[_i];\n            if (json.keyIfEncoded === 'cx') {\n                context = combineContexts(context, json.json);\n            }\n            else {\n                add(json.json, json.keyIfEncoded, json.keyIfNotEncoded);\n            }\n        }\n        jsonForProcessing.length = 0;\n        if (contextEntitiesForProcessing.length) {\n            var newContext = {\n                schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n                data: __spreadArray([], contextEntitiesForProcessing, true)\n            };\n            context = combineContexts(context, newContext);\n            contextEntitiesForProcessing.length = 0;\n        }\n        if (context) {\n            add(context, 'cx', 'co');\n        }\n    };\n}\n/**\n * Is property a non-empty JSON?\n * @param property - Checks if object is non-empty json\n */\nfunction isNonEmptyJson(property) {\n    if (!isJson(property)) {\n        return false;\n    }\n    for (var key in property) {\n        if (Object.prototype.hasOwnProperty.call(property, key)) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Is property a JSON?\n * @param property - Checks if object is json\n */\nfunction isJson(property) {\n    return (typeof property !== 'undefined' &&\n        property !== null &&\n        (property.constructor === {}.constructor || property.constructor === [].constructor));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar label = 'Snowplow: ';\nvar LOG_LEVEL;\n(function (LOG_LEVEL) {\n    LOG_LEVEL[LOG_LEVEL[\"none\"] = 0] = \"none\";\n    LOG_LEVEL[LOG_LEVEL[\"error\"] = 1] = \"error\";\n    LOG_LEVEL[LOG_LEVEL[\"warn\"] = 2] = \"warn\";\n    LOG_LEVEL[LOG_LEVEL[\"debug\"] = 3] = \"debug\";\n    LOG_LEVEL[LOG_LEVEL[\"info\"] = 4] = \"info\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nvar LOG = logger();\nfunction logger(logLevel) {\n    if (logLevel === void 0) { logLevel = LOG_LEVEL.warn; }\n    function setLogLevel(level) {\n        if (LOG_LEVEL[level]) {\n            logLevel = level;\n        }\n        else {\n            logLevel = LOG_LEVEL.warn;\n        }\n    }\n    /**\n     * Log errors, with or without error object\n     */\n    function error(message, error) {\n        var extraParams = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            extraParams[_i - 2] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.error && typeof console !== 'undefined') {\n            var logMsg = label + message + '\\n';\n            if (error) {\n                console.error.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n            }\n            else {\n                console.error.apply(console, __spreadArray([logMsg], extraParams, false));\n            }\n        }\n    }\n    /**\n     * Log warnings, with or without error object\n     */\n    function warn(message, error) {\n        var extraParams = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            extraParams[_i - 2] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.warn && typeof console !== 'undefined') {\n            var logMsg = label + message;\n            if (error) {\n                console.warn.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n            }\n            else {\n                console.warn.apply(console, __spreadArray([logMsg], extraParams, false));\n            }\n        }\n    }\n    /**\n     * Log debug messages\n     */\n    function debug(message) {\n        var extraParams = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            extraParams[_i - 1] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.debug && typeof console !== 'undefined') {\n            console.debug.apply(console, __spreadArray([label + message], extraParams, false));\n        }\n    }\n    /**\n     * Log info messages\n     */\n    function info(message) {\n        var extraParams = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            extraParams[_i - 1] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.info && typeof console !== 'undefined') {\n            console.info.apply(console, __spreadArray([label + message], extraParams, false));\n        }\n    }\n    return { setLogLevel: setLogLevel, warn: warn, error: error, debug: debug, info: info };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Contains helper functions to aid in the addition and removal of Global Contexts\n */\nfunction globalContexts() {\n    var globalPrimitives = [];\n    var conditionalProviders = [];\n    /**\n     * Returns all applicable global contexts for a specified event\n     * @param event - The event to check for applicable global contexts for\n     * @returns An array of contexts\n     */\n    var assembleAllContexts = function (event) {\n        var eventSchema = getUsefulSchema(event);\n        var eventType = getEventType(event);\n        var contexts = [];\n        var generatedPrimitives = generatePrimitives(globalPrimitives, event, eventType, eventSchema);\n        contexts.push.apply(contexts, generatedPrimitives);\n        var generatedConditionals = generateConditionals(conditionalProviders, event, eventType, eventSchema);\n        contexts.push.apply(contexts, generatedConditionals);\n        return contexts;\n    };\n    return {\n        getGlobalPrimitives: function () {\n            return globalPrimitives;\n        },\n        getConditionalProviders: function () {\n            return conditionalProviders;\n        },\n        addGlobalContexts: function (contexts) {\n            var acceptedConditionalContexts = [];\n            var acceptedContextPrimitives = [];\n            for (var _i = 0, contexts_1 = contexts; _i < contexts_1.length; _i++) {\n                var context = contexts_1[_i];\n                if (isConditionalContextProvider(context)) {\n                    acceptedConditionalContexts.push(context);\n                }\n                else if (isContextPrimitive(context)) {\n                    acceptedContextPrimitives.push(context);\n                }\n            }\n            globalPrimitives = globalPrimitives.concat(acceptedContextPrimitives);\n            conditionalProviders = conditionalProviders.concat(acceptedConditionalContexts);\n        },\n        clearGlobalContexts: function () {\n            conditionalProviders = [];\n            globalPrimitives = [];\n        },\n        removeGlobalContexts: function (contexts) {\n            var _loop_1 = function (context) {\n                if (isConditionalContextProvider(context)) {\n                    conditionalProviders = conditionalProviders.filter(function (item) { return !compareProvider(context, item); });\n                }\n                else if (isContextPrimitive(context)) {\n                    globalPrimitives = globalPrimitives.filter(function (item) { return !compareProvider(context, item); });\n                }\n            };\n            for (var _i = 0, contexts_2 = contexts; _i < contexts_2.length; _i++) {\n                var context = contexts_2[_i];\n                _loop_1(context);\n            }\n        },\n        getApplicableContexts: function (event) {\n            return assembleAllContexts(event);\n        }\n    };\n}\nfunction pluginContexts(plugins) {\n    /**\n     * Add common contexts to every event\n     *\n     * @param array - additionalContexts List of user-defined contexts\n     * @returns userContexts combined with commonContexts\n     */\n    return {\n        addPluginContexts: function (additionalContexts) {\n            var combinedContexts = additionalContexts ? __spreadArray([], additionalContexts, true) : [];\n            plugins.forEach(function (plugin) {\n                try {\n                    if (plugin.contexts) {\n                        combinedContexts.push.apply(combinedContexts, plugin.contexts());\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Error adding plugin contexts', ex);\n                }\n            });\n            return combinedContexts;\n        }\n    };\n}\n/**\n * Find dynamic context generating functions and return their results to be merged into the static contexts\n * Combine an array of unchanging contexts with the result of a context-creating function\n *\n * @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions\n * @param Parameters - to pass to dynamic context callbacks\n * @returns An array of Self Describing JSON context\n */\nfunction resolveDynamicContext(dynamicOrStaticContexts) {\n    var _a;\n    var extraParams = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        extraParams[_i - 1] = arguments[_i];\n    }\n    return ((_a = dynamicOrStaticContexts === null || dynamicOrStaticContexts === void 0 ? void 0 : dynamicOrStaticContexts.map(function (context) {\n        if (typeof context === 'function') {\n            try {\n                return context.apply(void 0, extraParams);\n            }\n            catch (e) {\n                //TODO: provide warning\n                return undefined;\n            }\n        }\n        else {\n            return context;\n        }\n    }).filter(Boolean)) !== null && _a !== void 0 ? _a : []);\n}\n/**\n * Slices a schema into its composite parts. Useful for ruleset filtering.\n * @param input - A schema string\n * @returns The vendor, schema name, major, minor and patch information of a schema string\n */\nfunction getSchemaParts(input) {\n    var re = new RegExp('^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$');\n    var matches = re.exec(input);\n    if (matches !== null)\n        return matches.slice(1, 6);\n    return undefined;\n}\n/**\n * Validates the vendor section of a schema string contains allowed wildcard values\n * @param parts - Array of parts from a schema string\n * @returns Whether the vendor validation parts are a valid combination\n */\nfunction validateVendorParts(parts) {\n    if (parts[0] === '*' || parts[1] === '*') {\n        return false; // no wildcard in first or second part\n    }\n    if (parts.slice(2).length > 0) {\n        var asterisk = false;\n        for (var _i = 0, _a = parts.slice(2); _i < _a.length; _i++) {\n            var part = _a[_i];\n            if (part === '*')\n                // mark when we've found a wildcard\n                asterisk = true;\n            else if (asterisk)\n                // invalid if alpha parts come after wildcard\n                return false;\n        }\n        return true;\n    }\n    else if (parts.length == 2)\n        return true;\n    return false;\n}\n/**\n * Validates the vendor part of a schema string is valid for a rule set\n * @param input - Vendor part of a schema string\n * @returns Whether the vendor validation string is valid\n */\nfunction validateVendor(input) {\n    var parts = input.split('.');\n    if (parts && parts.length > 1)\n        return validateVendorParts(parts);\n    return false;\n}\n/**\n * Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset\n * @param input - A Schema string\n * @returns The sections of a schema string that are used to match rules in a ruleset\n */\nfunction getRuleParts(input) {\n    var re = new RegExp('^iglu:((?:(?:[a-zA-Z0-9-_]+|\\\\*).)+(?:[a-zA-Z0-9-_]+|\\\\*))/([a-zA-Z0-9-_.]+|\\\\*)/jsonschema/([1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)$');\n    var matches = re.exec(input);\n    if (matches !== null && validateVendor(matches[1]))\n        return matches.slice(1, 6);\n    return undefined;\n}\n/**\n * Ensures the rules specified in a schema string of a ruleset are valid\n * @param input - A Schema string\n * @returns if there rule is valid\n */\nfunction isValidRule(input) {\n    var ruleParts = getRuleParts(input);\n    if (ruleParts) {\n        var vendor = ruleParts[0];\n        return ruleParts.length === 5 && validateVendor(vendor);\n    }\n    return false;\n}\n/**\n * Check if a variable is an Array containing only strings\n * @param input - The variable to validate\n * @returns True if the input is an array containing only strings\n */\nfunction isStringArray(input) {\n    return (Array.isArray(input) &&\n        input.every(function (x) {\n            return typeof x === 'string';\n        }));\n}\n/**\n * Validates whether a rule set is an array of valid ruleset strings\n * @param input - The Array of rule set arguments\n * @returns True is the input is an array of valid rules\n */\nfunction isValidRuleSetArg(input) {\n    if (isStringArray(input))\n        return input.every(function (x) {\n            return isValidRule(x);\n        });\n    else if (typeof input === 'string')\n        return isValidRule(input);\n    return false;\n}\n/**\n * Check if a variable is a valid, non-empty Self Describing JSON\n * @param input - The variable to validate\n * @returns True if a valid Self Describing JSON\n */\nfunction isSelfDescribingJson(input) {\n    var sdj = input;\n    if (isNonEmptyJson(sdj))\n        if ('schema' in sdj && 'data' in sdj)\n            return typeof sdj.schema === 'string' && typeof sdj.data === 'object';\n    return false;\n}\n/**\n * Validates if the input object contains the expected properties of a ruleset\n * @param input - The object containing a rule set\n * @returns True if a valid rule set\n */\nfunction isRuleSet(input) {\n    var ruleSet = input;\n    var ruleCount = 0;\n    if (input != null && typeof input === 'object' && !Array.isArray(input)) {\n        if (Object.prototype.hasOwnProperty.call(ruleSet, 'accept')) {\n            if (isValidRuleSetArg(ruleSet['accept'])) {\n                ruleCount += 1;\n            }\n            else {\n                return false;\n            }\n        }\n        if (Object.prototype.hasOwnProperty.call(ruleSet, 'reject')) {\n            if (isValidRuleSetArg(ruleSet['reject'])) {\n                ruleCount += 1;\n            }\n            else {\n                return false;\n            }\n        }\n        // if either 'reject' or 'accept' or both exists,\n        // we have a valid ruleset\n        return ruleCount > 0 && ruleCount <= 2;\n    }\n    return false;\n}\n/**\n * Validates if the function can be a valid context generator function\n * @param input - The function to be validated\n */\nfunction isContextCallbackFunction(input) {\n    return typeof input === 'function' && input.length <= 1;\n}\n/**\n * Validates if the function can be a valid context primitive function or self describing json\n * @param input - The function or orbject to be validated\n * @returns True if either a Context Generator or Self Describing JSON\n */\nfunction isContextPrimitive(input) {\n    return isContextCallbackFunction(input) || isSelfDescribingJson(input);\n}\n/**\n * Validates if an array is a valid shape to be a Filter Provider\n * @param input - The Array of Context filter callbacks\n */\nfunction isFilterProvider(input) {\n    if (Array.isArray(input)) {\n        if (input.length === 2) {\n            if (Array.isArray(input[1])) {\n                return isContextCallbackFunction(input[0]) && input[1].every(isContextPrimitive);\n            }\n            return isContextCallbackFunction(input[0]) && isContextPrimitive(input[1]);\n        }\n    }\n    return false;\n}\n/**\n * Validates if an array is a valid shape to be an array of rule sets\n * @param input - The Array of Rule Sets\n */\nfunction isRuleSetProvider(input) {\n    if (Array.isArray(input) && input.length === 2) {\n        if (!isRuleSet(input[0]))\n            return false;\n        if (Array.isArray(input[1]))\n            return input[1].every(isContextPrimitive);\n        return isContextPrimitive(input[1]);\n    }\n    return false;\n}\n/**\n * Checks if an input array is either a filter provider or a rule set provider\n * @param input - An array of filter providers or rule set providers\n * @returns Whether the array is a valid {@link ConditionalContextProvider}\n */\nfunction isConditionalContextProvider(input) {\n    return isFilterProvider(input) || isRuleSetProvider(input);\n}\n/**\n * Checks if a given schema matches any rules within the provided rule set\n * @param ruleSet - The rule set containing rules to match schema against\n * @param schema - The schema to be matched against the rule set\n */\nfunction matchSchemaAgainstRuleSet(ruleSet, schema) {\n    var rejectCount = 0;\n    var acceptCount = 0;\n    var acceptRules = ruleSet['accept'];\n    if (Array.isArray(acceptRules)) {\n        if (ruleSet.accept.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n            acceptCount++;\n        }\n    }\n    else if (typeof acceptRules === 'string') {\n        if (matchSchemaAgainstRule(acceptRules, schema)) {\n            acceptCount++;\n        }\n    }\n    var rejectRules = ruleSet['reject'];\n    if (Array.isArray(rejectRules)) {\n        if (ruleSet.reject.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n            rejectCount++;\n        }\n    }\n    else if (typeof rejectRules === 'string') {\n        if (matchSchemaAgainstRule(rejectRules, schema)) {\n            rejectCount++;\n        }\n    }\n    if (acceptCount > 0 && rejectCount === 0) {\n        return true;\n    }\n    else if (acceptCount === 0 && rejectCount > 0) {\n        return false;\n    }\n    return false;\n}\n/**\n * Checks if a given schema matches a specific rule from a rule set\n * @param rule - The rule to match schema against\n * @param schema - The schema to be matched against the rule\n */\nfunction matchSchemaAgainstRule(rule, schema) {\n    if (!isValidRule(rule))\n        return false;\n    var ruleParts = getRuleParts(rule);\n    var schemaParts = getSchemaParts(schema);\n    if (ruleParts && schemaParts) {\n        if (!matchVendor(ruleParts[0], schemaParts[0]))\n            return false;\n        for (var i = 1; i < 5; i++) {\n            if (!matchPart(ruleParts[i], schemaParts[i]))\n                return false;\n        }\n        return true; // if it hasn't failed, it passes\n    }\n    return false;\n}\nfunction matchVendor(rule, vendor) {\n    // rule and vendor must have same number of elements\n    var vendorParts = vendor.split('.');\n    var ruleParts = rule.split('.');\n    if (vendorParts && ruleParts) {\n        if (vendorParts.length !== ruleParts.length)\n            return false;\n        for (var i = 0; i < ruleParts.length; i++) {\n            if (!matchPart(vendorParts[i], ruleParts[i]))\n                return false;\n        }\n        return true;\n    }\n    return false;\n}\nfunction matchPart(rule, schema) {\n    // parts should be the string nested between slashes in the URI: /example/\n    return (rule && schema && rule === '*') || rule === schema;\n}\n// Returns the \"useful\" schema, i.e. what would someone want to use to identify events.\n// For some events this is the 'e' property but for unstructured events, this is the\n// 'schema' from the 'ue_px' field.\nfunction getUsefulSchema(sb) {\n    var eventJson = sb.getJson();\n    for (var _i = 0, eventJson_1 = eventJson; _i < eventJson_1.length; _i++) {\n        var json = eventJson_1[_i];\n        if (json.keyIfEncoded === 'ue_px' && typeof json.json['data'] === 'object') {\n            var schema = json.json['data']['schema'];\n            if (typeof schema == 'string') {\n                return schema;\n            }\n        }\n    }\n    return '';\n}\nfunction getEventType(payloadBuilder) {\n    var eventType = payloadBuilder.getPayload()['e'];\n    return typeof eventType === 'string' ? eventType : '';\n}\nfunction buildGenerator(generator, event, eventType, eventSchema) {\n    var contextGeneratorResult = undefined;\n    try {\n        // try to evaluate context generator\n        var args = {\n            event: event.getPayload(),\n            eventType: eventType,\n            eventSchema: eventSchema\n        };\n        contextGeneratorResult = generator(args);\n        // determine if the produced result is a valid SDJ\n        if (Array.isArray(contextGeneratorResult) && contextGeneratorResult.every(isSelfDescribingJson)) {\n            return contextGeneratorResult;\n        }\n        else if (isSelfDescribingJson(contextGeneratorResult)) {\n            return contextGeneratorResult;\n        }\n        else {\n            return undefined;\n        }\n    }\n    catch (error) {\n        contextGeneratorResult = undefined;\n    }\n    return contextGeneratorResult;\n}\nfunction normalizeToArray(input) {\n    if (Array.isArray(input)) {\n        return input;\n    }\n    return Array.of(input);\n}\nfunction generatePrimitives(contextPrimitives, event, eventType, eventSchema) {\n    var _a;\n    var normalizedInputs = normalizeToArray(contextPrimitives);\n    var partialEvaluate = function (primitive) {\n        var result = evaluatePrimitive(primitive, event, eventType, eventSchema);\n        if (result && result.length !== 0) {\n            return result;\n        }\n        return undefined;\n    };\n    var generatedContexts = normalizedInputs.map(partialEvaluate);\n    return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\nfunction evaluatePrimitive(contextPrimitive, event, eventType, eventSchema) {\n    if (isSelfDescribingJson(contextPrimitive)) {\n        return [contextPrimitive];\n    }\n    else if (isContextCallbackFunction(contextPrimitive)) {\n        var generatorOutput = buildGenerator(contextPrimitive, event, eventType, eventSchema);\n        if (isSelfDescribingJson(generatorOutput)) {\n            return [generatorOutput];\n        }\n        else if (Array.isArray(generatorOutput)) {\n            return generatorOutput;\n        }\n    }\n    return undefined;\n}\nfunction evaluateProvider(provider, event, eventType, eventSchema) {\n    if (isFilterProvider(provider)) {\n        var filter = provider[0];\n        var filterResult = false;\n        try {\n            var args = {\n                event: event.getPayload(),\n                eventType: eventType,\n                eventSchema: eventSchema\n            };\n            filterResult = filter(args);\n        }\n        catch (error) {\n            filterResult = false;\n        }\n        if (filterResult === true) {\n            return generatePrimitives(provider[1], event, eventType, eventSchema);\n        }\n    }\n    else if (isRuleSetProvider(provider)) {\n        if (matchSchemaAgainstRuleSet(provider[0], eventSchema)) {\n            return generatePrimitives(provider[1], event, eventType, eventSchema);\n        }\n    }\n    return [];\n}\nfunction compareProviderPart(a, b) {\n    if (typeof a === 'function')\n        return a === b;\n    return JSON.stringify(a) === JSON.stringify(b);\n}\nfunction compareProvider(a, b) {\n    if (isConditionalContextProvider(a)) {\n        if (!isConditionalContextProvider(b))\n            return false;\n        var ruleA = a[0], primitivesA = a[1];\n        var ruleB = b[0], primitivesB_1 = b[1];\n        if (!compareProviderPart(ruleA, ruleB))\n            return false;\n        if (Array.isArray(primitivesA)) {\n            if (!Array.isArray(primitivesB_1))\n                return false;\n            if (primitivesA.length !== primitivesB_1.length)\n                return false;\n            return primitivesA.reduce(function (matches, a, i) { return matches && compareProviderPart(a, primitivesB_1[i]); }, true);\n        }\n        else {\n            if (Array.isArray(primitivesB_1))\n                return false;\n            return compareProviderPart(primitivesA, primitivesB_1);\n        }\n    }\n    else if (isContextPrimitive(a)) {\n        if (!isContextPrimitive(b))\n            return false;\n        return compareProviderPart(a, b);\n    }\n    return false;\n}\nfunction generateConditionals(providers, event, eventType, eventSchema) {\n    var _a;\n    var normalizedInput = normalizeToArray(providers);\n    var partialEvaluate = function (provider) {\n        var result = evaluateProvider(provider, event, eventType, eventSchema);\n        if (result && result.length !== 0) {\n            return result;\n        }\n        return undefined;\n    };\n    var generatedContexts = normalizedInput.map(partialEvaluate);\n    return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Transform optional/old-behavior number timestamp into`Timestamp` ADT\n *\n * @param timestamp - optional number or timestamp object\n * @returns correct timestamp object\n */\nfunction getTimestamp(timestamp) {\n    if (timestamp == null) {\n        return { type: 'dtm', value: new Date().getTime() };\n    }\n    else if (typeof timestamp === 'number') {\n        return { type: 'dtm', value: timestamp };\n    }\n    else if (timestamp.type === 'ttm') {\n        // We can return timestamp here, but this is safer fallback\n        return { type: 'ttm', value: timestamp.value };\n    }\n    else {\n        return { type: 'dtm', value: timestamp.value || new Date().getTime() };\n    }\n}\n/**\n * Create a tracker core object\n *\n * @param base64 - Whether to base 64 encode contexts and self describing event JSONs\n * @param corePlugins - The core plugins to be processed with each event\n * @param callback - Function applied to every payload dictionary object\n * @returns Tracker core\n */\nfunction trackerCore(configuration) {\n    if (configuration === void 0) { configuration = {}; }\n    function newCore(base64, corePlugins, callback) {\n        var pluginContextsHelper = pluginContexts(corePlugins), globalContextsHelper = globalContexts();\n        var encodeBase64 = base64, payloadPairs = {}; // Dictionary of key-value pairs which get added to every payload, e.g. tracker version\n        /**\n         * Wraps an array of custom contexts in a self-describing JSON\n         *\n         * @param contexts - Array of custom context self-describing JSONs\n         * @returns Outer JSON\n         */\n        function completeContexts(contexts) {\n            if (contexts && contexts.length) {\n                return {\n                    schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n                    data: contexts\n                };\n            }\n            return undefined;\n        }\n        /**\n         * Adds all global contexts to a contexts array\n         *\n         * @param pb - PayloadData\n         * @param contexts - Custom contexts relating to the event\n         */\n        function attachGlobalContexts(pb, contexts) {\n            var applicableContexts = globalContextsHelper.getApplicableContexts(pb);\n            var returnedContexts = [];\n            if (contexts && contexts.length) {\n                returnedContexts.push.apply(returnedContexts, contexts);\n            }\n            if (applicableContexts && applicableContexts.length) {\n                returnedContexts.push.apply(returnedContexts, applicableContexts);\n            }\n            return returnedContexts;\n        }\n        /**\n         * Gets called by every trackXXX method\n         * Adds context and payloadPairs name-value pairs to the payload\n         * Applies the callback to the built payload\n         *\n         * @param pb - Payload\n         * @param context - Custom contexts relating to the event\n         * @param timestamp - Timestamp of the event\n         * @returns Payload after the callback is applied\n         */\n        function track(pb, context, timestamp) {\n            pb.withJsonProcessor(payloadJsonProcessor(encodeBase64));\n            pb.add('eid', v4());\n            pb.addDict(payloadPairs);\n            var tstamp = getTimestamp(timestamp);\n            pb.add(tstamp.type, tstamp.value.toString());\n            var allContexts = attachGlobalContexts(pb, pluginContextsHelper.addPluginContexts(context));\n            var wrappedContexts = completeContexts(allContexts);\n            if (wrappedContexts !== undefined) {\n                pb.addJson('cx', 'co', wrappedContexts);\n            }\n            corePlugins.forEach(function (plugin) {\n                try {\n                    if (plugin.beforeTrack) {\n                        plugin.beforeTrack(pb);\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Plugin beforeTrack', ex);\n                }\n            });\n            if (typeof callback === 'function') {\n                callback(pb);\n            }\n            var finalPayload = pb.build();\n            corePlugins.forEach(function (plugin) {\n                try {\n                    if (plugin.afterTrack) {\n                        plugin.afterTrack(finalPayload);\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Plugin afterTrack', ex);\n                }\n            });\n            return finalPayload;\n        }\n        /**\n         * Set a persistent key-value pair to be added to every payload\n         *\n         * @param key - Field name\n         * @param value - Field value\n         */\n        function addPayloadPair(key, value) {\n            payloadPairs[key] = value;\n        }\n        var core = {\n            track: track,\n            addPayloadPair: addPayloadPair,\n            getBase64Encoding: function () {\n                return encodeBase64;\n            },\n            setBase64Encoding: function (encode) {\n                encodeBase64 = encode;\n            },\n            addPayloadDict: function (dict) {\n                for (var key in dict) {\n                    if (Object.prototype.hasOwnProperty.call(dict, key)) {\n                        payloadPairs[key] = dict[key];\n                    }\n                }\n            },\n            resetPayloadPairs: function (dict) {\n                payloadPairs = isJson(dict) ? dict : {};\n            },\n            setTrackerVersion: function (version) {\n                addPayloadPair('tv', version);\n            },\n            setTrackerNamespace: function (name) {\n                addPayloadPair('tna', name);\n            },\n            setAppId: function (appId) {\n                addPayloadPair('aid', appId);\n            },\n            setPlatform: function (value) {\n                addPayloadPair('p', value);\n            },\n            setUserId: function (userId) {\n                addPayloadPair('uid', userId);\n            },\n            setScreenResolution: function (width, height) {\n                addPayloadPair('res', width + 'x' + height);\n            },\n            setViewport: function (width, height) {\n                addPayloadPair('vp', width + 'x' + height);\n            },\n            setColorDepth: function (depth) {\n                addPayloadPair('cd', depth);\n            },\n            setTimezone: function (timezone) {\n                addPayloadPair('tz', timezone);\n            },\n            setLang: function (lang) {\n                addPayloadPair('lang', lang);\n            },\n            setIpAddress: function (ip) {\n                addPayloadPair('ip', ip);\n            },\n            setUseragent: function (useragent) {\n                addPayloadPair('ua', useragent);\n            },\n            addGlobalContexts: function (contexts) {\n                globalContextsHelper.addGlobalContexts(contexts);\n            },\n            clearGlobalContexts: function () {\n                globalContextsHelper.clearGlobalContexts();\n            },\n            removeGlobalContexts: function (contexts) {\n                globalContextsHelper.removeGlobalContexts(contexts);\n            }\n        };\n        return core;\n    }\n    var base64 = configuration.base64, corePlugins = configuration.corePlugins, callback = configuration.callback, plugins = corePlugins !== null && corePlugins !== void 0 ? corePlugins : [], partialCore = newCore(base64 !== null && base64 !== void 0 ? base64 : true, plugins, callback), core = __assign(__assign({}, partialCore), { addPlugin: function (configuration) {\n            var _a, _b;\n            var plugin = configuration.plugin;\n            plugins.push(plugin);\n            (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n            (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n        } });\n    plugins === null || plugins === void 0 ? void 0 : plugins.forEach(function (plugin) {\n        var _a, _b;\n        (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n        (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n    });\n    return core;\n}\n/**\n * Build a self-describing event\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - Contains the properties and schema location for the event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSelfDescribingEvent(event) {\n    var _a = event.event, schema = _a.schema, data = _a.data, pb = payloadBuilder();\n    var ueJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0',\n        data: { schema: schema, data: data }\n    };\n    pb.add('e', 'ue');\n    pb.addJson('ue_px', 'ue_pr', ueJson);\n    return pb;\n}\n/**\n * Build a Page View Event\n * Represents a Page View, which is typically fired as soon as possible when a web page\n * is loaded within the users browser. Often also fired on \"virtual page views\" within\n * Single Page Applications (SPA).\n *\n * @param event - Contains the properties for the Page View event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPageView(event) {\n    var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, pb = payloadBuilder();\n    pb.add('e', 'pv'); // 'pv' for Page View\n    pb.add('url', pageUrl);\n    pb.add('page', pageTitle);\n    pb.add('refr', referrer);\n    return pb;\n}\n/**\n * Build a Page Ping Event\n * Fires when activity tracking is enabled in the browser.\n * Tracks same information as the last tracked Page View and includes scroll\n * information from the current page view\n *\n * @param event - Contains the properties for the Page Ping event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPagePing(event) {\n    var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, minXOffset = event.minXOffset, maxXOffset = event.maxXOffset, minYOffset = event.minYOffset, maxYOffset = event.maxYOffset, pb = payloadBuilder();\n    pb.add('e', 'pp'); // 'pp' for Page Ping\n    pb.add('url', pageUrl);\n    pb.add('page', pageTitle);\n    pb.add('refr', referrer);\n    if (minXOffset && !isNaN(Number(minXOffset)))\n        pb.add('pp_mix', minXOffset.toString());\n    if (maxXOffset && !isNaN(Number(maxXOffset)))\n        pb.add('pp_max', maxXOffset.toString());\n    if (minYOffset && !isNaN(Number(minYOffset)))\n        pb.add('pp_miy', minYOffset.toString());\n    if (maxYOffset && !isNaN(Number(maxYOffset)))\n        pb.add('pp_may', maxYOffset.toString());\n    return pb;\n}\n/**\n * Build a Structured Event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - Contains the properties for the Structured event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildStructEvent(event) {\n    var category = event.category, action = event.action, label = event.label, property = event.property, value = event.value, pb = payloadBuilder();\n    pb.add('e', 'se'); // 'se' for Structured Event\n    pb.add('se_ca', category);\n    pb.add('se_ac', action);\n    pb.add('se_la', label);\n    pb.add('se_pr', property);\n    pb.add('se_va', value == null ? undefined : value.toString());\n    return pb;\n}\n/**\n * Build an Ecommerce Transaction Event\n * Allows for tracking common ecommerce events, this event is usually used when\n * a consumer completes a transaction.\n *\n * @param event - Contains the properties for the Ecommerce Transactoion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransaction(event) {\n    var orderId = event.orderId, total = event.total, affiliation = event.affiliation, tax = event.tax, shipping = event.shipping, city = event.city, state = event.state, country = event.country, currency = event.currency, pb = payloadBuilder();\n    pb.add('e', 'tr'); // 'tr' for Transaction\n    pb.add('tr_id', orderId);\n    pb.add('tr_af', affiliation);\n    pb.add('tr_tt', total);\n    pb.add('tr_tx', tax);\n    pb.add('tr_sh', shipping);\n    pb.add('tr_ci', city);\n    pb.add('tr_st', state);\n    pb.add('tr_co', country);\n    pb.add('tr_cu', currency);\n    return pb;\n}\n/**\n * Build an Ecommerce Transaction Item Event\n * Related to the {@link buildEcommerceTransaction}\n * Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events\n *\n * @param event - Contains the properties for the Ecommerce Transaction Item event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransactionItem(event) {\n    var orderId = event.orderId, sku = event.sku, price = event.price, name = event.name, category = event.category, quantity = event.quantity, currency = event.currency, pb = payloadBuilder();\n    pb.add('e', 'ti'); // 'tr' for Transaction Item\n    pb.add('ti_id', orderId);\n    pb.add('ti_sk', sku);\n    pb.add('ti_nm', name);\n    pb.add('ti_ca', category);\n    pb.add('ti_pr', price);\n    pb.add('ti_qu', quantity);\n    pb.add('ti_cu', currency);\n    return pb;\n}\n/**\n * Build a Scren View Event\n * Similar to a Page View but less focused on typical web properties\n * Often used for mobile applications as the user is presented with\n * new views as they performance navigation events\n *\n * @param event - Contains the properties for the Screen View event. One or more properties must be included.\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildScreenView(event) {\n    var name = event.name, id = event.id;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0',\n            data: removeEmptyProperties({ name: name, id: id })\n        }\n    });\n}\n/**\n * Build a Link Click Event\n * Used when a user clicks on a link on a webpage, typically an anchor tag `<a>`\n *\n * @param event - Contains the properties for the Link Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildLinkClick(event) {\n    var targetUrl = event.targetUrl, elementId = event.elementId, elementClasses = event.elementClasses, elementTarget = event.elementTarget, elementContent = event.elementContent;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1',\n        data: removeEmptyProperties({ targetUrl: targetUrl, elementId: elementId, elementClasses: elementClasses, elementTarget: elementTarget, elementContent: elementContent })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Impression Event\n * Used to track an advertisement impression\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Impression event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdImpression(event) {\n    var impressionId = event.impressionId, costModel = event.costModel, cost = event.cost, targetUrl = event.targetUrl, bannerId = event.bannerId, zoneId = event.zoneId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            impressionId: impressionId,\n            costModel: costModel,\n            cost: cost,\n            targetUrl: targetUrl,\n            bannerId: bannerId,\n            zoneId: zoneId,\n            advertiserId: advertiserId,\n            campaignId: campaignId\n        })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Click Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdClick(event) {\n    var targetUrl = event.targetUrl, clickId = event.clickId, costModel = event.costModel, cost = event.cost, bannerId = event.bannerId, zoneId = event.zoneId, impressionId = event.impressionId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            targetUrl: targetUrl,\n            clickId: clickId,\n            costModel: costModel,\n            cost: cost,\n            bannerId: bannerId,\n            zoneId: zoneId,\n            impressionId: impressionId,\n            advertiserId: advertiserId,\n            campaignId: campaignId\n        })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Conversion Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Conversion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdConversion(event) {\n    var conversionId = event.conversionId, costModel = event.costModel, cost = event.cost, category = event.category, action = event.action, property = event.property, initialValue = event.initialValue, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            conversionId: conversionId,\n            costModel: costModel,\n            cost: cost,\n            category: category,\n            action: action,\n            property: property,\n            initialValue: initialValue,\n            advertiserId: advertiserId,\n            campaignId: campaignId\n        })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Social Interaction Event\n * Social tracking will be used to track the way users interact\n * with Facebook, Twitter and Google + widgets\n * e.g. to capture “like this” or “tweet this” events.\n *\n * @param event - Contains the properties for the Social Interaction event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSocialInteraction(event) {\n    var action = event.action, network = event.network, target = event.target;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0',\n        data: removeEmptyProperties({ action: action, network: network, target: target })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Add To Cart Event\n * For tracking users adding items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Add To Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAddToCart(event) {\n    var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0',\n            data: removeEmptyProperties({\n                sku: sku,\n                quantity: quantity,\n                name: name,\n                category: category,\n                unitPrice: unitPrice,\n                currency: currency\n            })\n        }\n    });\n}\n/**\n * Build a Remove From Cart Event\n * For tracking users removing items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Remove From Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildRemoveFromCart(event) {\n    var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0',\n            data: removeEmptyProperties({\n                sku: sku,\n                quantity: quantity,\n                name: name,\n                category: category,\n                unitPrice: unitPrice,\n                currency: currency\n            })\n        }\n    });\n}\n/**\n * Build a Form Focus or Change Form Event based on schema property\n * When a user focuses on a form element or when a user makes a\n * change to a form element.\n *\n * @param event - Contains the properties for the Form Focus or Change Form event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormFocusOrChange(event) {\n    var event_schema = '';\n    var schema = event.schema, formId = event.formId, elementId = event.elementId, nodeName = event.nodeName, elementClasses = event.elementClasses, value = event.value, type = event.type;\n    var event_data = { formId: formId, elementId: elementId, nodeName: nodeName, elementClasses: elementClasses, value: value };\n    if (schema === 'change_form') {\n        event_schema = 'iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0';\n        event_data.type = type;\n    }\n    else if (schema === 'focus_form') {\n        event_schema = 'iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0';\n        event_data.elementType = type;\n    }\n    return buildSelfDescribingEvent({\n        event: {\n            schema: event_schema,\n            data: removeEmptyProperties(event_data, { value: true })\n        }\n    });\n}\n/**\n * Build a Form Submission Event\n * Used to track when a user submits a form\n *\n * @param event - Contains the properties for the Form Submission event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormSubmission(event) {\n    var formId = event.formId, formClasses = event.formClasses, elements = event.elements;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0',\n            data: removeEmptyProperties({ formId: formId, formClasses: formClasses, elements: elements })\n        }\n    });\n}\n/**\n * Build a Site Search Event\n * Used when a user performs a search action on a page\n *\n * @param event - Contains the properties for the Site Search event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSiteSearch(event) {\n    var terms = event.terms, filters = event.filters, totalResults = event.totalResults, pageResults = event.pageResults;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0',\n            data: removeEmptyProperties({ terms: terms, filters: filters, totalResults: totalResults, pageResults: pageResults })\n        }\n    });\n}\n/**\n * Build a Consent Withdrawn Event\n * Used for tracking when a user withdraws their consent\n *\n * @param event - Contains the properties for the Consent Withdrawn event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentWithdrawn(event) {\n    var all = event.all, id = event.id, version = event.version, name = event.name, description = event.description;\n    var documentJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n        data: removeEmptyProperties({ id: id, version: version, name: name, description: description })\n    };\n    return {\n        event: buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0',\n                data: removeEmptyProperties({\n                    all: all\n                })\n            }\n        }),\n        context: [documentJson]\n    };\n}\n/**\n * Build a Consent Granted Event\n * Used for tracking when a user grants their consent\n *\n * @param event - Contains the properties for the Consent Granted event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentGranted(event) {\n    var expiry = event.expiry, id = event.id, version = event.version, name = event.name, description = event.description;\n    var documentJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n        data: removeEmptyProperties({ id: id, version: version, name: name, description: description })\n    };\n    return {\n        event: buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0',\n                data: removeEmptyProperties({\n                    expiry: expiry\n                })\n            }\n        }),\n        context: [documentJson]\n    };\n}\n/**\n * Returns a copy of a JSON with undefined and null properties removed\n *\n * @param event - JSON object to clean\n * @param exemptFields - Set of fields which should not be removed even if empty\n * @returns A cleaned copy of eventJson\n */\nfunction removeEmptyProperties(event, exemptFields) {\n    if (exemptFields === void 0) { exemptFields = {}; }\n    var ret = {};\n    for (var k in event) {\n        if (exemptFields[k] || (event[k] !== null && typeof event[k] !== 'undefined')) {\n            ret[k] = event[k];\n        }\n    }\n    return ret;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar version = version$1;\n\nexport { LOG, LOG_LEVEL, buildAdClick, buildAdConversion, buildAdImpression, buildAddToCart, buildConsentGranted, buildConsentWithdrawn, buildEcommerceTransaction, buildEcommerceTransactionItem, buildFormFocusOrChange, buildFormSubmission, buildLinkClick, buildPagePing, buildPageView, buildRemoveFromCart, buildScreenView, buildSelfDescribingEvent, buildSiteSearch, buildSocialInteraction, buildStructEvent, getRuleParts, getSchemaParts, globalContexts, isConditionalContextProvider, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isJson, isNonEmptyJson, isRuleSet, isRuleSetProvider, isSelfDescribingJson, isStringArray, isValidRule, isValidRuleSetArg, matchSchemaAgainstRule, matchSchemaAgainstRuleSet, payloadBuilder, payloadJsonProcessor, pluginContexts, removeEmptyProperties, resolveDynamicContext, trackerCore, validateVendor, validateVendorParts, version };\n//# sourceMappingURL=index.module.js.map\n","(function() {\n  var base64map\n      = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n  crypt = {\n    // Bit-wise rotation left\n    rotl: function(n, b) {\n      return (n << b) | (n >>> (32 - b));\n    },\n\n    // Bit-wise rotation right\n    rotr: function(n, b) {\n      return (n << (32 - b)) | (n >>> b);\n    },\n\n    // Swap big-endian to little-endian and vice versa\n    endian: function(n) {\n      // If number given, swap endian\n      if (n.constructor == Number) {\n        return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n      }\n\n      // Else, assume array and swap all items\n      for (var i = 0; i < n.length; i++)\n        n[i] = crypt.endian(n[i]);\n      return n;\n    },\n\n    // Generate an array of any length of random bytes\n    randomBytes: function(n) {\n      for (var bytes = []; n > 0; n--)\n        bytes.push(Math.floor(Math.random() * 256));\n      return bytes;\n    },\n\n    // Convert a byte array to big-endian 32-bit words\n    bytesToWords: function(bytes) {\n      for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n        words[b >>> 5] |= bytes[i] << (24 - b % 32);\n      return words;\n    },\n\n    // Convert big-endian 32-bit words to a byte array\n    wordsToBytes: function(words) {\n      for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n        bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n      return bytes;\n    },\n\n    // Convert a byte array to a hex string\n    bytesToHex: function(bytes) {\n      for (var hex = [], i = 0; i < bytes.length; i++) {\n        hex.push((bytes[i] >>> 4).toString(16));\n        hex.push((bytes[i] & 0xF).toString(16));\n      }\n      return hex.join('');\n    },\n\n    // Convert a hex string to a byte array\n    hexToBytes: function(hex) {\n      for (var bytes = [], c = 0; c < hex.length; c += 2)\n        bytes.push(parseInt(hex.substr(c, 2), 16));\n      return bytes;\n    },\n\n    // Convert a byte array to a base-64 string\n    bytesToBase64: function(bytes) {\n      for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n        var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n        for (var j = 0; j < 4; j++)\n          if (i * 8 + j * 6 <= bytes.length * 8)\n            base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n          else\n            base64.push('=');\n      }\n      return base64.join('');\n    },\n\n    // Convert a base-64 string to a byte array\n    base64ToBytes: function(base64) {\n      // Remove non-base-64 characters\n      base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n      for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n          imod4 = ++i % 4) {\n        if (imod4 == 0) continue;\n        bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n            & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n            | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n      }\n      return bytes;\n    }\n  };\n\n  module.exports = crypt;\n})();\n","var charenc = {\n  // UTF-8 encoding\n  utf8: {\n    // Convert a string to a byte array\n    stringToBytes: function(str) {\n      return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n    },\n\n    // Convert a byte array to a string\n    bytesToString: function(bytes) {\n      return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n    }\n  },\n\n  // Binary encoding\n  bin: {\n    // Convert a string to a byte array\n    stringToBytes: function(str) {\n      for (var bytes = [], i = 0; i < str.length; i++)\n        bytes.push(str.charCodeAt(i) & 0xFF);\n      return bytes;\n    },\n\n    // Convert a byte array to a string\n    bytesToString: function(bytes) {\n      for (var str = [], i = 0; i < bytes.length; i++)\n        str.push(String.fromCharCode(bytes[i]));\n      return str.join('');\n    }\n  }\n};\n\nmodule.exports = charenc;\n","(function() {\n  var crypt = require('crypt'),\n      utf8 = require('charenc').utf8,\n      bin = require('charenc').bin,\n\n  // The core\n  sha1 = function (message) {\n    // Convert to byte array\n    if (message.constructor == String)\n      message = utf8.stringToBytes(message);\n    else if (typeof Buffer !== 'undefined' && typeof Buffer.isBuffer == 'function' && Buffer.isBuffer(message))\n      message = Array.prototype.slice.call(message, 0);\n    else if (!Array.isArray(message))\n      message = message.toString();\n\n    // otherwise assume byte array\n\n    var m  = crypt.bytesToWords(message),\n        l  = message.length * 8,\n        w  = [],\n        H0 =  1732584193,\n        H1 = -271733879,\n        H2 = -1732584194,\n        H3 =  271733878,\n        H4 = -1009589776;\n\n    // Padding\n    m[l >> 5] |= 0x80 << (24 - l % 32);\n    m[((l + 64 >>> 9) << 4) + 15] = l;\n\n    for (var i = 0; i < m.length; i += 16) {\n      var a = H0,\n          b = H1,\n          c = H2,\n          d = H3,\n          e = H4;\n\n      for (var j = 0; j < 80; j++) {\n\n        if (j < 16)\n          w[j] = m[i + j];\n        else {\n          var n = w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16];\n          w[j] = (n << 1) | (n >>> 31);\n        }\n\n        var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (\n                j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :\n                j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :\n                j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :\n                         (H1 ^ H2 ^ H3) - 899497514);\n\n        H4 = H3;\n        H3 = H2;\n        H2 = (H1 << 30) | (H1 >>> 2);\n        H1 = H0;\n        H0 = t;\n      }\n\n      H0 += a;\n      H1 += b;\n      H2 += c;\n      H3 += d;\n      H4 += e;\n    }\n\n    return [H0, H1, H2, H3, H4];\n  },\n\n  // Public API\n  api = function (message, options) {\n    var digestbytes = crypt.wordsToBytes(sha1(message));\n    return options && options.asBytes ? digestbytes :\n        options && options.asString ? bin.bytesToString(digestbytes) :\n        crypt.bytesToHex(digestbytes);\n  };\n\n  api._blocksize = 16;\n  api._digestsize = 20;\n\n  module.exports = api;\n})();\n","// Unique ID creation requires a high quality random # generator.  In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API.  We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n                      (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n  // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n  var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n  module.exports = function whatwgRNG() {\n    getRandomValues(rnds8);\n    return rnds8;\n  };\n} else {\n  // Math.random()-based (RNG)\n  //\n  // If all else fails, use Math.random().  It's fast, but is of unspecified\n  // quality.\n  var rnds = new Array(16);\n\n  module.exports = function mathRNG() {\n    for (var i = 0, r; i < 16; i++) {\n      if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n      rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n    }\n\n    return rnds;\n  };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n  var i = offset || 0;\n  var bth = byteToHex;\n  // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n  return ([\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]], '-',\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]],\n    bth[buf[i++]], bth[buf[i++]]\n  ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n  var i = buf && offset || 0;\n  var b = buf || [];\n\n  options = options || {};\n  var node = options.node || _nodeId;\n  var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n  // node and clockseq need to be initialized to random values if they're not\n  // specified.  We do this lazily to minimize issues related to insufficient\n  // system entropy.  See #189\n  if (node == null || clockseq == null) {\n    var seedBytes = rng();\n    if (node == null) {\n      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n      node = _nodeId = [\n        seedBytes[0] | 0x01,\n        seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n      ];\n    }\n    if (clockseq == null) {\n      // Per 4.2.2, randomize (14 bit) clockseq\n      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n    }\n  }\n\n  // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so\n  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n  var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n  // Per 4.2.1.2, use count of uuid's generated during the current clock\n  // cycle to simulate higher resolution clock\n  var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n  // Time since last uuid creation (in msecs)\n  var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n  // Per 4.2.1.2, Bump clockseq on clock regression\n  if (dt < 0 && options.clockseq === undefined) {\n    clockseq = clockseq + 1 & 0x3fff;\n  }\n\n  // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n  // time interval\n  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n    nsecs = 0;\n  }\n\n  // Per 4.2.1.2 Throw error if too many uuids are requested\n  if (nsecs >= 10000) {\n    throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n  }\n\n  _lastMSecs = msecs;\n  _lastNSecs = nsecs;\n  _clockseq = clockseq;\n\n  // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n  msecs += 12219292800000;\n\n  // `time_low`\n  var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n  b[i++] = tl >>> 24 & 0xff;\n  b[i++] = tl >>> 16 & 0xff;\n  b[i++] = tl >>> 8 & 0xff;\n  b[i++] = tl & 0xff;\n\n  // `time_mid`\n  var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n  b[i++] = tmh >>> 8 & 0xff;\n  b[i++] = tmh & 0xff;\n\n  // `time_high_and_version`\n  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n  b[i++] = tmh >>> 16 & 0xff;\n\n  // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n  b[i++] = clockseq >>> 8 | 0x80;\n\n  // `clock_seq_low`\n  b[i++] = clockseq & 0xff;\n\n  // `node`\n  for (var n = 0; n < 6; ++n) {\n    b[i + n] = node[n];\n  }\n\n  return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n  var i = buf && offset || 0;\n\n  if (typeof(options) == 'string') {\n    buf = options === 'binary' ? new Array(16) : null;\n    options = null;\n  }\n  options = options || {};\n\n  var rnds = options.random || (options.rng || rng)();\n\n  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n  rnds[6] = (rnds[6] & 0x0f) | 0x40;\n  rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n  // Copy bytes to buffer, if provided\n  if (buf) {\n    for (var ii = 0; ii < 16; ++ii) {\n      buf[i + ii] = rnds[ii];\n    }\n  }\n\n  return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/*!\n * Core functionality for Snowplow Browser trackers v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { LOG, trackerCore, buildPageView, buildPagePing } from '@snowplow/tracker-core';\nimport { __assign, __spreadArray } from 'tslib';\nimport hash from 'sha1';\nimport { v4 } from 'uuid';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Attempt to get a value from localStorage\n *\n * @param string - key\n * @returns string The value obtained from localStorage, or\n *                undefined if localStorage is inaccessible\n */\nfunction attemptGetLocalStorage(key) {\n    try {\n        var localStorageAlias = window.localStorage, exp = localStorageAlias.getItem(key + '.expires');\n        if (exp === null || +exp > Date.now()) {\n            return localStorageAlias.getItem(key);\n        }\n        else {\n            localStorageAlias.removeItem(key);\n            localStorageAlias.removeItem(key + '.expires');\n        }\n        return undefined;\n    }\n    catch (e) {\n        return undefined;\n    }\n}\n/**\n * Attempt to write a value to localStorage\n *\n * @param string - key\n * @param string - value\n * @param number - ttl Time to live in seconds, defaults to 2 years from Date.now()\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptWriteLocalStorage(key, value, ttl) {\n    if (ttl === void 0) { ttl = 63072000; }\n    try {\n        var localStorageAlias = window.localStorage, t = Date.now() + ttl * 1000;\n        localStorageAlias.setItem(\"\".concat(key, \".expires\"), t.toString());\n        localStorageAlias.setItem(key, value);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n/**\n * Attempt to delete a value from localStorage\n *\n * @param string - key\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptDeleteLocalStorage(key) {\n    try {\n        var localStorageAlias = window.localStorage;\n        localStorageAlias.removeItem(key);\n        localStorageAlias.removeItem(key + '.expires');\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n/**\n * Attempt to get a value from sessionStorage\n *\n * @param string - key\n * @returns string The value obtained from sessionStorage, or\n *                undefined if sessionStorage is inaccessible\n */\nfunction attemptGetSessionStorage(key) {\n    try {\n        return window.sessionStorage.getItem(key);\n    }\n    catch (e) {\n        return undefined;\n    }\n}\n/**\n * Attempt to write a value to sessionStorage\n *\n * @param string - key\n * @param string - value\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptWriteSessionStorage(key, value) {\n    try {\n        window.sessionStorage.setItem(key, value);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n\nvar DEFAULT_CROSS_DOMAIN_LINKER_PARAMS = {\n    sessionId: true,\n    sourceId: true,\n    sourcePlatform: false,\n    userId: false,\n    reason: false\n};\nfunction createCrossDomainParameterValue(isExtendedFormat, attributeConfiguration, attributeValues) {\n    var _a;\n    var crossDomainParameterValue;\n    var timestamp = new Date().getTime();\n    var config = __assign(__assign({}, DEFAULT_CROSS_DOMAIN_LINKER_PARAMS), attributeConfiguration);\n    var domainUserId = attributeValues.domainUserId, userId = attributeValues.userId, sessionId = attributeValues.sessionId, sourceId = attributeValues.sourceId, sourcePlatform = attributeValues.sourcePlatform, event = attributeValues.event;\n    var eventTarget = event.currentTarget;\n    var reason = typeof config.reason === 'function' ? config.reason(event) : (_a = eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.textContent) === null || _a === void 0 ? void 0 : _a.trim();\n    if (isExtendedFormat) {\n        /* Index is used by Enrich, so it should not be changed. */\n        crossDomainParameterValue = [\n            domainUserId,\n            timestamp,\n            config.sessionId && sessionId,\n            config.userId && urlSafeBase64Encode(userId || ''),\n            config.sourceId && urlSafeBase64Encode(sourceId || ''),\n            config.sourcePlatform && sourcePlatform,\n            config.reason && urlSafeBase64Encode(reason || ''),\n        ]\n            .map(function (attribute) { return attribute || ''; })\n            .join('.')\n            // Remove trailing dots\n            .replace(/([.]*$)/, '');\n    }\n    else {\n        crossDomainParameterValue = attributeValues.domainUserId + '.' + timestamp;\n    }\n    return crossDomainParameterValue;\n}\n/**\n *\n * The url-safe variation emits - and _ instead of + and / characters. Also removes = sign padding.\n * @param {string} str The string to encode in a URL safe manner\n * @return {string}\n */\nfunction urlSafeBase64Encode(str) {\n    return btoa(str).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/\\=+$/, '');\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Checks if an object is a string\n * @param str - The object to check\n */\nfunction isString(str) {\n    if (str && typeof str.valueOf() === 'string') {\n        return true;\n    }\n    return false;\n}\n/**\n * Checks if an object is an integer\n * @param int - The object to check\n */\nfunction isInteger(int) {\n    return ((Number.isInteger && Number.isInteger(int)) || (typeof int === 'number' && isFinite(int) && Math.floor(int) === int));\n}\n/**\n * Checks if the input parameter is a function\n * @param func - The object to check\n */\nfunction isFunction(func) {\n    if (func && typeof func === 'function') {\n        return true;\n    }\n    return false;\n}\n/**\n * Cleans up the page title\n */\nfunction fixupTitle(title) {\n    if (!isString(title)) {\n        title = title.text || '';\n        var tmp = document.getElementsByTagName('title');\n        if (tmp && tmp[0] != null) {\n            title = tmp[0].text;\n        }\n    }\n    return title;\n}\n/**\n * Extract hostname from URL\n */\nfunction getHostName(url) {\n    // scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n    var e = new RegExp('^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)'), matches = e.exec(url);\n    return matches ? matches[1] : url;\n}\n/**\n * Fix-up domain\n */\nfunction fixupDomain(domain) {\n    var dl = domain.length;\n    // remove trailing '.'\n    if (domain.charAt(--dl) === '.') {\n        domain = domain.slice(0, dl);\n    }\n    // remove leading '*'\n    if (domain.slice(0, 2) === '*.') {\n        domain = domain.slice(1);\n    }\n    return domain;\n}\n/**\n * Get page referrer. In the case of a single-page app,\n * if the URL changes without the page reloading, pass\n * in the old URL. It will be returned unless overriden\n * by a \"refer(r)er\" parameter in the querystring.\n *\n * @param string - oldLocation Optional.\n * @returns string The referrer\n */\nfunction getReferrer(oldLocation) {\n    var windowAlias = window, fromQs = fromQuerystring('referrer', windowAlias.location.href) || fromQuerystring('referer', windowAlias.location.href);\n    // Short-circuit\n    if (fromQs) {\n        return fromQs;\n    }\n    // In the case of a single-page app, return the old URL\n    if (oldLocation) {\n        return oldLocation;\n    }\n    try {\n        if (windowAlias.top) {\n            return windowAlias.top.document.referrer;\n        }\n        else if (windowAlias.parent) {\n            return windowAlias.parent.document.referrer;\n        }\n    }\n    catch (_a) { }\n    return document.referrer;\n}\n/**\n * Cross-browser helper function to add event handler\n */\nfunction addEventListener(element, eventType, eventHandler, options) {\n    if (element.addEventListener) {\n        element.addEventListener(eventType, eventHandler, options);\n        return true;\n    }\n    // IE Support\n    if (element.attachEvent) {\n        return element.attachEvent('on' + eventType, eventHandler);\n    }\n    element['on' + eventType] = eventHandler;\n}\n/**\n * Return value from name-value pair in querystring\n */\nfunction fromQuerystring(field, url) {\n    var match = new RegExp('^[^#]*[?&]' + field + '=([^&#]*)').exec(url);\n    if (!match) {\n        return null;\n    }\n    return decodeURIComponent(match[1].replace(/\\+/g, ' '));\n}\n/**\n * Add a name-value pair to the querystring of a URL\n *\n * @param string - url URL to decorate\n * @param string - name Name of the querystring pair\n * @param string - value Value of the querystring pair\n */\nfunction decorateQuerystring(url, name, value) {\n    var initialQsParams = name + '=' + value;\n    var hashSplit = url.split('#');\n    var qsSplit = hashSplit[0].split('?');\n    var beforeQuerystring = qsSplit.shift();\n    // Necessary because a querystring may contain multiple question marks\n    var querystring = qsSplit.join('?');\n    if (!querystring) {\n        querystring = initialQsParams;\n    }\n    else {\n        // Whether this is the first time the link has been decorated\n        var initialDecoration = true;\n        var qsFields = querystring.split('&');\n        for (var i = 0; i < qsFields.length; i++) {\n            if (qsFields[i].substr(0, name.length + 1) === name + '=') {\n                initialDecoration = false;\n                qsFields[i] = initialQsParams;\n                querystring = qsFields.join('&');\n                break;\n            }\n        }\n        if (initialDecoration) {\n            querystring = initialQsParams + '&' + querystring;\n        }\n    }\n    hashSplit[0] = beforeQuerystring + '?' + querystring;\n    return hashSplit.join('#');\n}\n/**\n * Finds the root domain\n */\nfunction findRootDomain(sameSite, secure) {\n    var windowLocationHostnameAlias = window.location.hostname, cookiePrefix = '_sp_root_domain_test_', cookieName = cookiePrefix + new Date().getTime(), cookieValue = '_test_value_' + new Date().getTime();\n    var locationParts = windowLocationHostnameAlias.split('.');\n    for (var idx = locationParts.length - 2; idx >= 0; idx--) {\n        var currentDomain = locationParts.slice(idx).join('.');\n        cookie(cookieName, cookieValue, 0, '/', currentDomain, sameSite, secure);\n        if (cookie(cookieName) === cookieValue) {\n            // Clean up created cookie(s)\n            deleteCookie(cookieName, currentDomain, sameSite, secure);\n            var cookieNames = getCookiesWithPrefix(cookiePrefix);\n            for (var i = 0; i < cookieNames.length; i++) {\n                deleteCookie(cookieNames[i], currentDomain, sameSite, secure);\n            }\n            return currentDomain;\n        }\n    }\n    // Cookies cannot be read\n    return windowLocationHostnameAlias;\n}\n/**\n * Checks whether a value is present within an array\n *\n * @param val - The value to check for\n * @param array - The array to check within\n * @returns boolean Whether it exists\n */\nfunction isValueInArray(val, array) {\n    for (var i = 0; i < array.length; i++) {\n        if (array[i] === val) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Deletes an arbitrary cookie by setting the expiration date to the past\n *\n * @param cookieName - The name of the cookie to delete\n * @param domainName - The domain the cookie is in\n */\nfunction deleteCookie(cookieName, domainName, sameSite, secure) {\n    cookie(cookieName, '', -1, '/', domainName, sameSite, secure);\n}\n/**\n * Fetches the name of all cookies beginning with a certain prefix\n *\n * @param cookiePrefix - The prefix to check for\n * @returns array The cookies that begin with the prefix\n */\nfunction getCookiesWithPrefix(cookiePrefix) {\n    var cookies = document.cookie.split('; ');\n    var cookieNames = [];\n    for (var i = 0; i < cookies.length; i++) {\n        if (cookies[i].substring(0, cookiePrefix.length) === cookiePrefix) {\n            cookieNames.push(cookies[i]);\n        }\n    }\n    return cookieNames;\n}\n/**\n * Get and set the cookies associated with the current document in browser\n * This implementation always returns a string, returns the cookie value if only name is specified\n *\n * @param name - The cookie name (required)\n * @param value - The cookie value\n * @param ttl - The cookie Time To Live (seconds)\n * @param path - The cookies path\n * @param domain - The cookies domain\n * @param samesite - The cookies samesite attribute\n * @param secure - Boolean to specify if cookie should be secure\n * @returns string The cookies value\n */\nfunction cookie(name, value, ttl, path, domain, samesite, secure) {\n    if (arguments.length > 1) {\n        return (document.cookie =\n            name +\n                '=' +\n                encodeURIComponent(value !== null && value !== void 0 ? value : '') +\n                (ttl ? '; Expires=' + new Date(+new Date() + ttl * 1000).toUTCString() : '') +\n                (path ? '; Path=' + path : '') +\n                (domain ? '; Domain=' + domain : '') +\n                (samesite ? '; SameSite=' + samesite : '') +\n                (secure ? '; Secure' : ''));\n    }\n    return decodeURIComponent((('; ' + document.cookie).split('; ' + name + '=')[1] || '').split(';')[0]);\n}\n/**\n * Parses an object and returns either the\n * integer or undefined.\n *\n * @param obj - The object to parse\n * @returns the result of the parse operation\n */\nfunction parseAndValidateInt(obj) {\n    var result = parseInt(obj);\n    return isNaN(result) ? undefined : result;\n}\n/**\n * Parses an object and returns either the\n * number or undefined.\n *\n * @param obj - The object to parse\n * @returns the result of the parse operation\n */\nfunction parseAndValidateFloat(obj) {\n    var result = parseFloat(obj);\n    return isNaN(result) ? undefined : result;\n}\n/**\n * Convert a criterion object to a filter function\n *\n * @param object - criterion Either {allowlist: [array of allowable strings]}\n *                             or {denylist: [array of allowable strings]}\n *                             or {filter: function (elt) {return whether to track the element}\n * @param boolean - byClass Whether to allowlist/denylist based on an element's classes (for forms)\n *                        or name attribute (for fields)\n */\nfunction getFilterByClass(criterion) {\n    // If the criterion argument is not an object, add listeners to all elements\n    if (criterion == null || typeof criterion !== 'object' || Array.isArray(criterion)) {\n        return function () {\n            return true;\n        };\n    }\n    var inclusive = Object.prototype.hasOwnProperty.call(criterion, 'allowlist');\n    var specifiedClassesSet = getSpecifiedClassesSet(criterion);\n    return getFilter(criterion, function (elt) {\n        return checkClass(elt, specifiedClassesSet) === inclusive;\n    });\n}\n/**\n * Convert a criterion object to a filter function\n *\n * @param object - criterion Either {allowlist: [array of allowable strings]}\n *                             or {denylist: [array of allowable strings]}\n *                             or {filter: function (elt) {return whether to track the element}\n */\nfunction getFilterByName(criterion) {\n    // If the criterion argument is not an object, add listeners to all elements\n    if (criterion == null || typeof criterion !== 'object' || Array.isArray(criterion)) {\n        return function () {\n            return true;\n        };\n    }\n    var inclusive = criterion.hasOwnProperty('allowlist');\n    var specifiedClassesSet = getSpecifiedClassesSet(criterion);\n    return getFilter(criterion, function (elt) {\n        return elt.name in specifiedClassesSet === inclusive;\n    });\n}\n/**\n * List the classes of a DOM element without using elt.classList (for compatibility with IE 9)\n */\nfunction getCssClasses(elt) {\n    return elt.className.match(/\\S+/g) || [];\n}\n/**\n * Check whether an element has at least one class from a given list\n */\nfunction checkClass(elt, classList) {\n    var classes = getCssClasses(elt);\n    for (var _i = 0, classes_1 = classes; _i < classes_1.length; _i++) {\n        var className = classes_1[_i];\n        if (classList[className]) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getFilter(criterion, fallbackFilter) {\n    if (criterion.hasOwnProperty('filter') && criterion.filter) {\n        return criterion.filter;\n    }\n    return fallbackFilter;\n}\nfunction getSpecifiedClassesSet(criterion) {\n    // Convert the array of classes to an object of the form {class1: true, class2: true, ...}\n    var specifiedClassesSet = {};\n    var specifiedClasses = criterion.allowlist || criterion.denylist;\n    if (specifiedClasses) {\n        if (!Array.isArray(specifiedClasses)) {\n            specifiedClasses = [specifiedClasses];\n        }\n        for (var i = 0; i < specifiedClasses.length; i++) {\n            specifiedClassesSet[specifiedClasses[i]] = true;\n        }\n    }\n    return specifiedClassesSet;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/*\n * Checks whether sessionStorage is available, in a way that\n * does not throw a SecurityError in Firefox if \"always ask\"\n * is enabled for cookies (https://github.com/snowplow/snowplow/issues/163).\n */\nfunction hasSessionStorage() {\n    try {\n        return !!window.sessionStorage;\n    }\n    catch (e) {\n        return true; // SecurityError when referencing it means it exists\n    }\n}\n/*\n * Checks whether localStorage is available, in a way that\n * does not throw a SecurityError in Firefox if \"always ask\"\n * is enabled for cookies (https://github.com/snowplow/snowplow/issues/163).\n */\nfunction hasLocalStorage() {\n    try {\n        return !!window.localStorage;\n    }\n    catch (e) {\n        return true; // SecurityError when referencing it means it exists\n    }\n}\n/*\n * Checks whether localStorage is accessible\n * sets and removes an item to handle private IOS5 browsing\n * (http://git.io/jFB2Xw)\n */\nfunction localStorageAccessible() {\n    var mod = 'modernizr';\n    if (!hasLocalStorage()) {\n        return false;\n    }\n    try {\n        var ls = window.localStorage;\n        ls.setItem(mod, mod);\n        ls.removeItem(mod);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n\nvar WEB_PAGE_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0';\nvar BROWSER_CONTEXT_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0';\nvar CLIENT_SESSION_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2';\nvar PAYLOAD_DATA_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4';\n\n/**\n * Object handling sending events to a collector.\n * Instantiated once per tracker instance.\n *\n * @param id - The Snowplow function name (used to generate the localStorage key)\n * @param sharedSate - Stores reference to the outbound queue so it can unload the page when all queues are empty\n * @param useLocalStorage - Whether to use localStorage at all\n * @param eventMethod - if null will use 'beacon' otherwise can be set to 'post', 'get', or 'beacon' to force.\n * @param postPath - The path where events are to be posted\n * @param bufferSize - How many events to batch in localStorage before sending them all\n * @param maxPostBytes - Maximum combined size in bytes of the event JSONs in a POST request\n * @param maxGetBytes - Maximum size in bytes of the complete event URL string in a GET request. 0 for no limit.\n * @param useStm - Whether to add timestamp to events\n * @param maxLocalStorageQueueSize - Maximum number of queued events we will attempt to store in local storage\n * @param connectionTimeout - Defines how long to wait before aborting the request\n * @param anonymousTracking - Defines whether to set the SP-Anonymous header for anonymous tracking on GET and POST\n * @param customHeaders - Allows custom headers to be defined and passed on XMLHttpRequest requests\n * @param withCredentials - Sets the value of the withCredentials flag on XMLHttpRequest (GET and POST) requests\n * @param retryStatusCodes – Failure HTTP response status codes from Collector for which sending events should be retried (they can override the `dontRetryStatusCodes`)\n * @param dontRetryStatusCodes – Failure HTTP response status codes from Collector for which sending events should not be retried\n * @param idService - Id service full URL. This URL will be added to the queue and will be called using a GET method.\n * @param retryFailedRequests - Whether to retry failed requests - Takes precedent over `retryStatusCodes` and `dontRetryStatusCodes`\n * @param onRequestSuccess - Function called when a request succeeds\n * @param onRequestFailure - Function called when a request does not succeed\n * @returns object OutQueueManager instance\n */\nfunction OutQueueManager(id, sharedSate, useLocalStorage, eventMethod, postPath, bufferSize, maxPostBytes, maxGetBytes, useStm, maxLocalStorageQueueSize, connectionTimeout, anonymousTracking, customHeaders, withCredentials, retryStatusCodes, dontRetryStatusCodes, idService, retryFailedRequests, onRequestSuccess, onRequestFailure) {\n    if (retryFailedRequests === void 0) { retryFailedRequests = true; }\n    var executingQueue = false, configCollectorUrl, outQueue = [], idServiceCalled = false;\n    //Force to lower case if its a string\n    eventMethod = typeof eventMethod === 'string' ? eventMethod.toLowerCase() : eventMethod;\n    // Use the Beacon API if eventMethod is set true, 'true', or 'beacon'.\n    var isBeaconRequested = eventMethod === true || eventMethod === 'beacon' || eventMethod === 'true', \n    // Fall back to POST or GET for browsers which don't support Beacon API\n    isBeaconAvailable = Boolean(isBeaconRequested &&\n        window.navigator &&\n        typeof window.navigator.sendBeacon === 'function' &&\n        !hasWebKitBeaconBug(window.navigator.userAgent)), useBeacon = isBeaconAvailable && isBeaconRequested, \n    // Use GET if specified\n    isGetRequested = eventMethod === 'get', \n    // Don't use XhrHttpRequest for browsers which don't support CORS XMLHttpRequests (e.g. IE <= 9)\n    useXhr = Boolean(window.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest()), \n    // Use POST if specified\n    usePost = !isGetRequested && useXhr && (eventMethod === 'post' || isBeaconRequested), \n    // Resolve all options and capabilities and decide path\n    path = usePost ? postPath : '/i', \n    // Different queue names for GET and POST since they are stored differently\n    queueName = \"snowplowOutQueue_\".concat(id, \"_\").concat(usePost ? 'post2' : 'get');\n    // Ensure we don't set headers when beacon is the requested eventMethod as we might fallback to POST\n    // and end up sending them in older browsers which don't support beacon leading to inconsistencies\n    if (isBeaconRequested)\n        customHeaders = {};\n    // Get buffer size or set 1 if unable to buffer\n    bufferSize = (useLocalStorage && localStorageAccessible() && usePost && bufferSize) || 1;\n    if (useLocalStorage) {\n        // Catch any JSON parse errors or localStorage that might be thrown\n        try {\n            var localStorageQueue = window.localStorage.getItem(queueName);\n            outQueue = localStorageQueue ? JSON.parse(localStorageQueue) : [];\n        }\n        catch (e) { }\n    }\n    // Initialize to and empty array if we didn't get anything out of localStorage\n    if (!Array.isArray(outQueue)) {\n        outQueue = [];\n    }\n    // Used by pageUnloadGuard\n    sharedSate.outQueues.push(outQueue);\n    if (useXhr && bufferSize > 1) {\n        sharedSate.bufferFlushers.push(function (sync) {\n            if (!executingQueue) {\n                executeQueue(sync);\n            }\n        });\n    }\n    /*\n     * Convert a dictionary to a querystring\n     * The context field is the last in the querystring\n     */\n    function getQuerystring(request) {\n        var querystring = '?', lowPriorityKeys = { co: true, cx: true }, firstPair = true;\n        for (var key in request) {\n            if (request.hasOwnProperty(key) && !lowPriorityKeys.hasOwnProperty(key)) {\n                if (!firstPair) {\n                    querystring += '&';\n                }\n                else {\n                    firstPair = false;\n                }\n                querystring += encodeURIComponent(key) + '=' + encodeURIComponent(request[key]);\n            }\n        }\n        for (var contextKey in lowPriorityKeys) {\n            if (request.hasOwnProperty(contextKey) && lowPriorityKeys.hasOwnProperty(contextKey)) {\n                querystring += '&' + contextKey + '=' + encodeURIComponent(request[contextKey]);\n            }\n        }\n        return querystring;\n    }\n    /*\n     * Convert numeric fields to strings to match payload_data schema\n     */\n    function getBody(request) {\n        var cleanedRequest = Object.keys(request)\n            .map(function (k) { return [k, request[k]]; })\n            .reduce(function (acc, _a) {\n            var key = _a[0], value = _a[1];\n            acc[key] = value.toString();\n            return acc;\n        }, {});\n        return {\n            evt: cleanedRequest,\n            bytes: getUTF8Length(JSON.stringify(cleanedRequest))\n        };\n    }\n    /**\n     * Count the number of bytes a string will occupy when UTF-8 encoded\n     * Taken from http://stackoverflow.com/questions/2848462/count-bytes-in-textarea-using-javascript/\n     *\n     * @param string - s\n     * @returns number Length of s in bytes when UTF-8 encoded\n     */\n    function getUTF8Length(s) {\n        var len = 0;\n        for (var i = 0; i < s.length; i++) {\n            var code = s.charCodeAt(i);\n            if (code <= 0x7f) {\n                len += 1;\n            }\n            else if (code <= 0x7ff) {\n                len += 2;\n            }\n            else if (code >= 0xd800 && code <= 0xdfff) {\n                // Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2\n                // (Assume next char is the other [valid] half and just skip it)\n                len += 4;\n                i++;\n            }\n            else if (code < 0xffff) {\n                len += 3;\n            }\n            else {\n                len += 4;\n            }\n        }\n        return len;\n    }\n    var postable = function (queue) {\n        return typeof queue[0] === 'object' && 'evt' in queue[0];\n    };\n    /**\n     * Send event as POST request right away without going to queue. Used when the request surpasses maxGetBytes or maxPostBytes\n     * @param body POST request body\n     * @param configCollectorUrl full collector URL with path\n     */\n    function sendPostRequestWithoutQueueing(body, configCollectorUrl) {\n        var xhr = initializeXMLHttpRequest(configCollectorUrl, true, false);\n        var batch = attachStmToEvent([body.evt]);\n        xhr.onreadystatechange = function () {\n            if (xhr.readyState === 4) {\n                if (isSuccessfulRequest(xhr.status)) {\n                    onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(batch);\n                }\n                else {\n                    onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure({\n                        status: xhr.status,\n                        message: xhr.statusText,\n                        events: batch,\n                        willRetry: false\n                    });\n                }\n            }\n        };\n        xhr.send(encloseInPayloadDataEnvelope(batch));\n    }\n    function removeEventsFromQueue(numberToSend) {\n        for (var deleteCount = 0; deleteCount < numberToSend; deleteCount++) {\n            outQueue.shift();\n        }\n        if (useLocalStorage) {\n            attemptWriteLocalStorage(queueName, JSON.stringify(outQueue.slice(0, maxLocalStorageQueueSize)));\n        }\n    }\n    function setXhrCallbacks(xhr, numberToSend, batch) {\n        xhr.onreadystatechange = function () {\n            if (xhr.readyState === 4) {\n                clearTimeout(xhrTimeout);\n                if (isSuccessfulRequest(xhr.status)) {\n                    removeEventsFromQueue(numberToSend);\n                    onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(batch);\n                    executeQueue();\n                }\n                else {\n                    var willRetry = shouldRetryForStatusCode(xhr.status);\n                    if (!willRetry) {\n                        LOG.error(\"Status \".concat(xhr.status, \", will not retry.\"));\n                        removeEventsFromQueue(numberToSend);\n                    }\n                    onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure({\n                        status: xhr.status,\n                        message: xhr.statusText,\n                        events: batch,\n                        willRetry: willRetry\n                    });\n                    executingQueue = false;\n                }\n            }\n        };\n        // Time out POST requests after connectionTimeout\n        var xhrTimeout = setTimeout(function () {\n            xhr.abort();\n            if (!retryFailedRequests) {\n                removeEventsFromQueue(numberToSend);\n            }\n            onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure({\n                status: 0,\n                message: 'timeout',\n                events: batch,\n                willRetry: retryFailedRequests\n            });\n            executingQueue = false;\n        }, connectionTimeout);\n    }\n    /*\n     * Queue for submission to the collector and start processing queue\n     */\n    function enqueueRequest(request, url) {\n        configCollectorUrl = url + path;\n        var eventTooBigWarning = function (bytes, maxBytes) {\n            return LOG.warn('Event (' + bytes + 'B) too big, max is ' + maxBytes);\n        };\n        if (usePost) {\n            var body = getBody(request);\n            if (body.bytes >= maxPostBytes) {\n                eventTooBigWarning(body.bytes, maxPostBytes);\n                sendPostRequestWithoutQueueing(body, configCollectorUrl);\n                return;\n            }\n            else {\n                outQueue.push(body);\n            }\n        }\n        else {\n            var querystring = getQuerystring(request);\n            if (maxGetBytes > 0) {\n                var requestUrl = createGetUrl(querystring);\n                var bytes = getUTF8Length(requestUrl);\n                if (bytes >= maxGetBytes) {\n                    eventTooBigWarning(bytes, maxGetBytes);\n                    if (useXhr) {\n                        var body = getBody(request);\n                        var postUrl = url + postPath;\n                        sendPostRequestWithoutQueueing(body, postUrl);\n                    }\n                    return;\n                }\n            }\n            outQueue.push(querystring);\n        }\n        var savedToLocalStorage = false;\n        if (useLocalStorage) {\n            savedToLocalStorage = attemptWriteLocalStorage(queueName, JSON.stringify(outQueue.slice(0, maxLocalStorageQueueSize)));\n        }\n        // If we're not processing the queue, we'll start.\n        if (!executingQueue && (!savedToLocalStorage || outQueue.length >= bufferSize)) {\n            executeQueue();\n        }\n    }\n    /*\n     * Run through the queue of requests, sending them one at a time.\n     * Stops processing when we run out of queued requests, or we get an error.\n     */\n    function executeQueue(sync) {\n        if (sync === void 0) { sync = false; }\n        // Failsafe in case there is some way for a bad value like \"null\" to end up in the outQueue\n        while (outQueue.length && typeof outQueue[0] !== 'string' && typeof outQueue[0] !== 'object') {\n            outQueue.shift();\n        }\n        if (!outQueue.length) {\n            executingQueue = false;\n            return;\n        }\n        // Let's check that we have a URL\n        if (!isString(configCollectorUrl)) {\n            throw 'No collector configured';\n        }\n        executingQueue = true;\n        if (idService && !idServiceCalled) {\n            var xhr_1 = initializeXMLHttpRequest(idService, false, sync);\n            idServiceCalled = true;\n            xhr_1.timeout = connectionTimeout;\n            xhr_1.onreadystatechange = function () {\n                if (xhr_1.readyState === 4) {\n                    executeQueue();\n                }\n            };\n            xhr_1.send();\n            return;\n        }\n        if (useXhr) {\n            // Keep track of number of events to delete from queue\n            var chooseHowManyToSend = function (queue) {\n                var numberToSend = 0, byteCount = 0;\n                while (numberToSend < queue.length) {\n                    byteCount += queue[numberToSend].bytes;\n                    if (byteCount >= maxPostBytes) {\n                        break;\n                    }\n                    else {\n                        numberToSend += 1;\n                    }\n                }\n                return numberToSend;\n            };\n            var url = void 0, xhr = void 0, numberToSend = void 0;\n            if (postable(outQueue)) {\n                url = configCollectorUrl;\n                xhr = initializeXMLHttpRequest(url, true, sync);\n                numberToSend = chooseHowManyToSend(outQueue);\n            }\n            else {\n                url = createGetUrl(outQueue[0]);\n                xhr = initializeXMLHttpRequest(url, false, sync);\n                numberToSend = 1;\n            }\n            if (!postable(outQueue)) {\n                // If not postable then it's a GET so just send it\n                setXhrCallbacks(xhr, numberToSend, [url]);\n                xhr.send();\n            }\n            else {\n                var batch = outQueue.slice(0, numberToSend);\n                if (batch.length > 0) {\n                    var beaconStatus = false;\n                    var eventBatch = batch.map(function (x) {\n                        return x.evt;\n                    });\n                    if (useBeacon) {\n                        var blob = new Blob([encloseInPayloadDataEnvelope(attachStmToEvent(eventBatch))], {\n                            type: 'application/json'\n                        });\n                        try {\n                            beaconStatus = window.navigator.sendBeacon(url, blob);\n                        }\n                        catch (error) {\n                            beaconStatus = false;\n                        }\n                    }\n                    // When beaconStatus is true, we can't _guarantee_ that it was successful (beacon queues asynchronously)\n                    // but the browser has taken it out of our hands, so we want to flush the queue assuming it will do its job\n                    if (beaconStatus === true) {\n                        removeEventsFromQueue(numberToSend);\n                        onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(batch);\n                        executeQueue();\n                    }\n                    else {\n                        var batch_1 = attachStmToEvent(eventBatch);\n                        setXhrCallbacks(xhr, numberToSend, batch_1);\n                        xhr.send(encloseInPayloadDataEnvelope(batch_1));\n                    }\n                }\n            }\n        }\n        else if (!anonymousTracking && !postable(outQueue)) {\n            // We can't send with this technique if anonymous tracking is on as we can't attach the header\n            var image = new Image(1, 1), loading_1 = true;\n            image.onload = function () {\n                if (!loading_1)\n                    return;\n                loading_1 = false;\n                outQueue.shift();\n                if (useLocalStorage) {\n                    attemptWriteLocalStorage(queueName, JSON.stringify(outQueue.slice(0, maxLocalStorageQueueSize)));\n                }\n                executeQueue();\n            };\n            image.onerror = function () {\n                if (!loading_1)\n                    return;\n                loading_1 = false;\n                executingQueue = false;\n            };\n            image.src = createGetUrl(outQueue[0]);\n            setTimeout(function () {\n                if (loading_1 && executingQueue) {\n                    loading_1 = false;\n                    executeQueue();\n                }\n            }, connectionTimeout);\n        }\n        else {\n            executingQueue = false;\n        }\n    }\n    /**\n     * Determines whether a request was successful, based on its status code\n     * Anything in the 2xx range is considered successful\n     *\n     * @param statusCode The status code of the request\n     * @returns Whether the request was successful\n     */\n    function isSuccessfulRequest(statusCode) {\n        return statusCode >= 200 && statusCode < 300;\n    }\n    function shouldRetryForStatusCode(statusCode) {\n        // success, don't retry\n        if (isSuccessfulRequest(statusCode)) {\n            return false;\n        }\n        if (!retryFailedRequests) {\n            return false;\n        }\n        // retry if status code among custom user-supplied retry codes\n        if (retryStatusCodes.includes(statusCode)) {\n            return true;\n        }\n        // retry if status code *not* among the don't retry codes\n        return !dontRetryStatusCodes.includes(statusCode);\n    }\n    /**\n     * Open an XMLHttpRequest for a given endpoint with the correct credentials and header\n     *\n     * @param string - url The destination URL\n     * @returns object The XMLHttpRequest\n     */\n    function initializeXMLHttpRequest(url, post, sync) {\n        var xhr = new XMLHttpRequest();\n        if (post) {\n            xhr.open('POST', url, !sync);\n            xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');\n        }\n        else {\n            xhr.open('GET', url, !sync);\n        }\n        xhr.withCredentials = withCredentials;\n        if (anonymousTracking) {\n            xhr.setRequestHeader('SP-Anonymous', '*');\n        }\n        for (var header in customHeaders) {\n            if (Object.prototype.hasOwnProperty.call(customHeaders, header)) {\n                xhr.setRequestHeader(header, customHeaders[header]);\n            }\n        }\n        return xhr;\n    }\n    /**\n     * Enclose an array of events in a self-describing payload_data JSON string\n     *\n     * @param array - events Batch of events\n     * @returns string payload_data self-describing JSON\n     */\n    function encloseInPayloadDataEnvelope(events) {\n        return JSON.stringify({\n            schema: PAYLOAD_DATA_SCHEMA,\n            data: events\n        });\n    }\n    /**\n     * Attaches the STM field to outbound POST events.\n     *\n     * @param events - the events to attach the STM to\n     */\n    function attachStmToEvent(events) {\n        var stm = new Date().getTime().toString();\n        for (var i = 0; i < events.length; i++) {\n            events[i]['stm'] = stm;\n        }\n        return events;\n    }\n    /**\n     * Creates the full URL for sending the GET request. Will append `stm` if enabled\n     *\n     * @param nextRequest - the query string of the next request\n     */\n    function createGetUrl(nextRequest) {\n        if (useStm) {\n            return configCollectorUrl + nextRequest.replace('?', '?stm=' + new Date().getTime() + '&');\n        }\n        return configCollectorUrl + nextRequest;\n    }\n    return {\n        enqueueRequest: enqueueRequest,\n        executeQueue: function () {\n            if (!executingQueue) {\n                executeQueue();\n            }\n        },\n        setUseLocalStorage: function (localStorage) {\n            useLocalStorage = localStorage;\n        },\n        setAnonymousTracking: function (anonymous) {\n            anonymousTracking = anonymous;\n        },\n        setCollectorUrl: function (url) {\n            configCollectorUrl = url + path;\n        },\n        setBufferSize: function (newBufferSize) {\n            bufferSize = newBufferSize;\n        }\n    };\n    function hasWebKitBeaconBug(useragent) {\n        return (isIosVersionLessThanOrEqualTo(13, useragent) ||\n            (isMacosxVersionLessThanOrEqualTo(10, 15, useragent) && isSafari(useragent)));\n        function isIosVersionLessThanOrEqualTo(major, useragent) {\n            var match = useragent.match('(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/');\n            if (match && match.length) {\n                return parseInt(match[0]) <= major;\n            }\n            return false;\n        }\n        function isMacosxVersionLessThanOrEqualTo(major, minor, useragent) {\n            var match = useragent.match('(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/');\n            if (match && match.length) {\n                return parseInt(match[0]) <= major || (parseInt(match[0]) === major && parseInt(match[1]) <= minor);\n            }\n            return false;\n        }\n        function isSafari(useragent) {\n            return useragent.match('Version/.* Safari/') && !isChromiumBased(useragent);\n        }\n        function isChromiumBased(useragent) {\n            return useragent.match('Chrom(e|ium)');\n        }\n    }\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/*\n * Extract parameter from URL\n */\nfunction getParameter(url, name) {\n    // scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n    var e = new RegExp('^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)'), matches = e.exec(url);\n    if (matches && (matches === null || matches === void 0 ? void 0 : matches.length) > 1) {\n        return fromQuerystring(name, matches[1]);\n    }\n    return null;\n}\n/*\n * Fix-up URL when page rendered from search engine cache or translated page.\n */\nfunction fixupUrl(hostName, href, referrer) {\n    var _a;\n    if (hostName === 'translate.googleusercontent.com') {\n        // Google\n        if (referrer === '') {\n            referrer = href;\n        }\n        href = (_a = getParameter(href, 'u')) !== null && _a !== void 0 ? _a : '';\n        hostName = getHostName(href);\n    }\n    else if (hostName === 'cc.bingj.com' || // Bing & Yahoo\n        hostName === 'webcache.googleusercontent.com' // Google\n    ) {\n        href = document.links[0].href;\n        hostName = getHostName(href);\n    }\n    return [hostName, href, referrer];\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Indices of cookie values\n */\nvar cookieDisabledIndex = 0, domainUserIdIndex = 1, createTsIndex = 2, visitCountIndex = 3, nowTsIndex = 4, lastVisitTsIndex = 5, sessionIdIndex = 6, previousSessionIdIndex = 7, firstEventIdIndex = 8, firstEventTsInMsIndex = 9, eventIndexIndex = 10;\nfunction emptyIdCookie() {\n    var idCookie = ['1', '', 0, 0, 0, undefined, '', '', '', undefined, 0];\n    return idCookie;\n}\n/**\n * Parses the cookie values from its string representation.\n *\n * @param id Cookie value as string\n * @param domainUserId Domain user ID to be used in case of empty cookie string\n * @returns Parsed ID cookie tuple\n */\nfunction parseIdCookie(id, domainUserId, memorizedSessionId, memorizedVisitCount) {\n    var now = new Date(), nowTs = Math.round(now.getTime() / 1000), tmpContainer;\n    if (id) {\n        tmpContainer = id.split('.');\n        // cookies enabled\n        tmpContainer.unshift('0');\n    }\n    else {\n        tmpContainer = [\n            // cookies disabled\n            '1',\n            // Domain user ID\n            domainUserId,\n            // Creation timestamp - seconds since Unix epoch\n            nowTs,\n            // visitCount - 0 = no previous visit\n            memorizedVisitCount,\n            // Current visit timestamp\n            nowTs,\n            // Last visit timestamp - blank meaning no previous visit\n            '',\n            // Session ID\n            memorizedSessionId,\n        ];\n    }\n    if (!tmpContainer[sessionIdIndex] || tmpContainer[sessionIdIndex] === 'undefined') {\n        // session id\n        tmpContainer[sessionIdIndex] = v4();\n    }\n    if (!tmpContainer[previousSessionIdIndex] || tmpContainer[previousSessionIdIndex] === 'undefined') {\n        // previous session id\n        tmpContainer[previousSessionIdIndex] = '';\n    }\n    if (!tmpContainer[firstEventIdIndex] || tmpContainer[firstEventIdIndex] === 'undefined') {\n        // firstEventId - blank meaning no previous event\n        tmpContainer[firstEventIdIndex] = '';\n    }\n    if (!tmpContainer[firstEventTsInMsIndex] || tmpContainer[firstEventTsInMsIndex] === 'undefined') {\n        // firstEventTs - blank meaning no previous event\n        tmpContainer[firstEventTsInMsIndex] = '';\n    }\n    if (!tmpContainer[eventIndexIndex] || tmpContainer[eventIndexIndex] === 'undefined') {\n        // eventIndex – 0 = no previous event\n        tmpContainer[eventIndexIndex] = 0;\n    }\n    var parseIntOr = function (value, defaultValue) {\n        var parsed = parseInt(value);\n        return isNaN(parsed) ? defaultValue : parsed;\n    };\n    var parseIntOrUndefined = function (value) { return (value ? parseIntOr(value, undefined) : undefined); };\n    var parsed = [\n        tmpContainer[cookieDisabledIndex],\n        tmpContainer[domainUserIdIndex],\n        parseIntOr(tmpContainer[createTsIndex], nowTs),\n        parseIntOr(tmpContainer[visitCountIndex], memorizedVisitCount),\n        parseIntOr(tmpContainer[nowTsIndex], nowTs),\n        parseIntOrUndefined(tmpContainer[lastVisitTsIndex]),\n        tmpContainer[sessionIdIndex],\n        tmpContainer[previousSessionIdIndex],\n        tmpContainer[firstEventIdIndex],\n        parseIntOrUndefined(tmpContainer[firstEventTsInMsIndex]),\n        parseIntOr(tmpContainer[eventIndexIndex], 0),\n    ];\n    return parsed;\n}\n/**\n * Initializes the domain user ID if not already present in the cookie. Sets an empty string if anonymous tracking.\n *\n * @param idCookie Parsed cookie\n * @param configAnonymousTracking Whether anonymous tracking is enabled\n * @returns Domain user ID\n */\nfunction initializeDomainUserId(idCookie, configAnonymousTracking) {\n    var domainUserId;\n    if (idCookie[domainUserIdIndex]) {\n        domainUserId = idCookie[domainUserIdIndex];\n    }\n    else if (!configAnonymousTracking) {\n        domainUserId = v4();\n        idCookie[domainUserIdIndex] = domainUserId;\n    }\n    else {\n        domainUserId = '';\n        idCookie[domainUserIdIndex] = domainUserId;\n    }\n    return domainUserId;\n}\n/**\n * Starts a new session with a new ID.\n * Sets the previous session, last visit timestamp, and increments visit count if cookies enabled.\n * First event references are reset and will be updated in `updateFirstEventInIdCookie`.\n *\n * @param idCookie Parsed cookie\n * @param options.configStateStorageStrategy Cookie storage strategy\n * @param options.configAnonymousTracking If anonymous tracking is enabled\n * @param options.memorizedVisitCount Visit count to be used if cookies not enabled\n * @param options.onSessionUpdateCallback Session callback triggered on every session update\n * @returns New session ID\n */\nfunction startNewIdCookieSession(idCookie, options) {\n    if (options === void 0) { options = { memorizedVisitCount: 1 }; }\n    var memorizedVisitCount = options.memorizedVisitCount;\n    // If cookies are enabled, base visit count and session ID on the cookies\n    if (cookiesEnabledInIdCookie(idCookie)) {\n        // Store the previous session ID\n        idCookie[previousSessionIdIndex] = idCookie[sessionIdIndex];\n        // Set lastVisitTs to currentVisitTs\n        idCookie[lastVisitTsIndex] = idCookie[nowTsIndex];\n        // Increment the session ID\n        idCookie[visitCountIndex]++;\n    }\n    else {\n        idCookie[visitCountIndex] = memorizedVisitCount;\n    }\n    // Create a new sessionId\n    var sessionId = v4();\n    idCookie[sessionIdIndex] = sessionId;\n    // Reset event index and first event references\n    idCookie[eventIndexIndex] = 0;\n    idCookie[firstEventIdIndex] = '';\n    idCookie[firstEventTsInMsIndex] = undefined;\n    return sessionId;\n}\n/**\n * Update now timestamp in cookie.\n *\n * @param idCookie Parsed cookie\n */\nfunction updateNowTsInIdCookie(idCookie) {\n    idCookie[nowTsIndex] = Math.round(new Date().getTime() / 1000);\n}\n/**\n * Updates the first event references according to the event payload if first event in session.\n *\n * @param idCookie Parsed cookie\n * @param payloadBuilder Event payload builder\n */\nfunction updateFirstEventInIdCookie(idCookie, payloadBuilder) {\n    // Update first event references if new session or not present\n    if (idCookie[eventIndexIndex] === 0) {\n        var payload = payloadBuilder.build();\n        idCookie[firstEventIdIndex] = payload['eid'];\n        var ts = (payload['dtm'] || payload['ttm']);\n        idCookie[firstEventTsInMsIndex] = ts ? parseInt(ts) : undefined;\n    }\n}\n/**\n * Increments event index counter.\n *\n * @param idCookie Parsed cookie\n */\nfunction incrementEventIndexInIdCookie(idCookie) {\n    idCookie[eventIndexIndex] += 1;\n}\n/**\n * Serializes parsed cookie to string representation.\n *\n * @param idCookie Parsed cookie\n * @returns String cookie value\n */\nfunction serializeIdCookie(idCookie, configAnonymousTracking) {\n    var anonymizedIdCookie = __spreadArray([], idCookie, true);\n    if (configAnonymousTracking) {\n        anonymizedIdCookie[domainUserIdIndex] = '';\n        anonymizedIdCookie[previousSessionIdIndex] = '';\n    }\n    anonymizedIdCookie.shift();\n    return anonymizedIdCookie.join('.');\n}\n/**\n * Transforms the parsed cookie into a client session context entity.\n *\n * @param idCookie Parsed cookie\n * @param configStateStorageStrategy Cookie storage strategy\n * @param configAnonymousTracking If anonymous tracking is enabled\n * @returns Client session context entity\n */\nfunction clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking) {\n    var firstEventTsInMs = idCookie[firstEventTsInMsIndex];\n    var clientSession = {\n        userId: configAnonymousTracking\n            ? '00000000-0000-0000-0000-000000000000' // TODO: use uuid.NIL when we upgrade to uuid v8.3\n            : idCookie[domainUserIdIndex],\n        sessionId: idCookie[sessionIdIndex],\n        eventIndex: idCookie[eventIndexIndex],\n        sessionIndex: idCookie[visitCountIndex],\n        previousSessionId: configAnonymousTracking ? null : idCookie[previousSessionIdIndex] || null,\n        storageMechanism: configStateStorageStrategy == 'localStorage' ? 'LOCAL_STORAGE' : 'COOKIE_1',\n        firstEventId: idCookie[firstEventIdIndex] || null,\n        firstEventTimestamp: firstEventTsInMs ? new Date(firstEventTsInMs).toISOString() : null\n    };\n    return clientSession;\n}\nfunction sessionIdFromIdCookie(idCookie) {\n    return idCookie[sessionIdIndex];\n}\nfunction domainUserIdFromIdCookie(idCookie) {\n    return idCookie[domainUserIdIndex];\n}\nfunction visitCountFromIdCookie(idCookie) {\n    return idCookie[visitCountIndex];\n}\nfunction cookiesEnabledInIdCookie(idCookie) {\n    return idCookie[cookieDisabledIndex] === '0';\n}\nfunction eventIndexFromIdCookie(idCookie) {\n    return idCookie[eventIndexIndex];\n}\n\nfunction useResizeObserver() {\n    return 'ResizeObserver' in window;\n}\nvar resizeObserverInitialized = false;\nfunction initializeResizeObserver() {\n    if (resizeObserverInitialized) {\n        return;\n    }\n    if (!document || !document.body || !document.documentElement) {\n        return;\n    }\n    resizeObserverInitialized = true;\n    var resizeObserver = new ResizeObserver(function (entries) {\n        for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n            var entry = entries_1[_i];\n            if (entry.target === document.body || entry.target === document.documentElement) {\n                cachedProperties = readBrowserProperties();\n            }\n        }\n    });\n    resizeObserver.observe(document.body);\n    resizeObserver.observe(document.documentElement);\n}\nvar cachedProperties;\n/* Separator used for dimension values e.g. widthxheight */\nvar DIMENSION_SEPARATOR = 'x';\n/**\n * Gets various browser properties (that are expensive to read!)\n * - Will use a \"ResizeObserver\" approach in modern browsers to update cached properties only on change\n * - Will fallback to a direct read approach without cache in old browsers\n *\n * @returns BrowserProperties\n */\nfunction getBrowserProperties() {\n    if (!useResizeObserver()) {\n        return readBrowserProperties();\n    }\n    if (!cachedProperties) {\n        cachedProperties = readBrowserProperties();\n    }\n    initializeResizeObserver();\n    return cachedProperties;\n}\n/**\n * Reads the browser properties - expensive call!\n *\n * @returns BrowserProperties\n */\nfunction readBrowserProperties() {\n    return {\n        viewport: floorDimensionFields(detectViewport()),\n        documentSize: floorDimensionFields(detectDocumentSize()),\n        resolution: floorDimensionFields(detectScreenResolution()),\n        colorDepth: screen.colorDepth,\n        devicePixelRatio: window.devicePixelRatio,\n        cookiesEnabled: window.navigator.cookieEnabled,\n        online: window.navigator.onLine,\n        browserLanguage: window.navigator.language || window.navigator.userLanguage,\n        documentLanguage: document.documentElement.lang,\n        webdriver: window.navigator.webdriver,\n        deviceMemory: window.navigator.deviceMemory,\n        hardwareConcurrency: window.navigator.hardwareConcurrency\n    };\n}\n/**\n * Gets the current viewport.\n *\n * Code based on:\n * - http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\n * - http://responsejs.com/labs/dimensions/\n */\nfunction detectViewport() {\n    var width, height;\n    if ('innerWidth' in window) {\n        width = window['innerWidth'];\n        height = window['innerHeight'];\n    }\n    else {\n        var e = document.documentElement || document.body;\n        width = e['clientWidth'];\n        height = e['clientHeight'];\n    }\n    return Math.max(0, width) + DIMENSION_SEPARATOR + Math.max(0, height);\n}\n/**\n * Gets the dimensions of the current\n * document.\n *\n * Code based on:\n * - http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\n */\nfunction detectDocumentSize() {\n    var de = document.documentElement, // Alias\n    be = document.body, \n    // document.body may not have rendered, so check whether be.offsetHeight is null\n    bodyHeight = be ? Math.max(be.offsetHeight, be.scrollHeight) : 0;\n    var w = Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth);\n    var h = Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight, bodyHeight);\n    return isNaN(w) || isNaN(h) ? '' : w + DIMENSION_SEPARATOR + h;\n}\nfunction detectScreenResolution() {\n    return screen.width + DIMENSION_SEPARATOR + screen.height;\n}\nfunction floorDimensionFields(field) {\n    return (field &&\n        field\n            .split(DIMENSION_SEPARATOR)\n            .map(function (dimension) { return Math.floor(Number(dimension)); })\n            .join(DIMENSION_SEPARATOR));\n}\n\n/**\n * The Snowplow Tracker\n *\n * @param trackerId - The unique identifier of the tracker\n * @param namespace - The namespace of the tracker object\n * @param version - The current version of the JavaScript Tracker\n * @param endpoint - The collector endpoint to send events to, with or without protocol\n * @param sharedState - An object containing state which is shared across tracker instances\n * @param trackerConfiguration - Dictionary of configuration options\n */\nfunction Tracker(trackerId, namespace, version, endpoint, sharedState, trackerConfiguration) {\n    if (trackerConfiguration === void 0) { trackerConfiguration = {}; }\n    var browserPlugins = [];\n    var newTracker = function (trackerId, namespace, version, endpoint, state, trackerConfiguration) {\n        /************************************************************\n         * Private members\n         ************************************************************/\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;\n        //use POST if eventMethod isn't present on the newTrackerConfiguration\n        trackerConfiguration.eventMethod = (_a = trackerConfiguration.eventMethod) !== null && _a !== void 0 ? _a : 'post';\n        var getStateStorageStrategy = function (config) { var _a; return (_a = config.stateStorageStrategy) !== null && _a !== void 0 ? _a : 'cookieAndLocalStorage'; }, getAnonymousSessionTracking = function (config) {\n            var _a, _b;\n            if (typeof config.anonymousTracking === 'boolean') {\n                return false;\n            }\n            return (_b = ((_a = config.anonymousTracking) === null || _a === void 0 ? void 0 : _a.withSessionTracking) === true) !== null && _b !== void 0 ? _b : false;\n        }, getAnonymousServerTracking = function (config) {\n            var _a, _b;\n            if (typeof config.anonymousTracking === 'boolean') {\n                return false;\n            }\n            return (_b = ((_a = config.anonymousTracking) === null || _a === void 0 ? void 0 : _a.withServerAnonymisation) === true) !== null && _b !== void 0 ? _b : false;\n        }, getAnonymousTracking = function (config) { return !!config.anonymousTracking; }, isBrowserContextAvailable = (_c = (_b = trackerConfiguration === null || trackerConfiguration === void 0 ? void 0 : trackerConfiguration.contexts) === null || _b === void 0 ? void 0 : _b.browser) !== null && _c !== void 0 ? _c : false, isWebPageContextAvailable = (_e = (_d = trackerConfiguration === null || trackerConfiguration === void 0 ? void 0 : trackerConfiguration.contexts) === null || _d === void 0 ? void 0 : _d.webPage) !== null && _e !== void 0 ? _e : true, getExtendedCrossDomainTrackingConfiguration = function (crossDomainTrackingConfig) {\n            if (typeof crossDomainTrackingConfig === 'boolean') {\n                return { useExtendedCrossDomainLinker: crossDomainTrackingConfig };\n            }\n            return {\n                useExtendedCrossDomainLinker: true,\n                collectCrossDomainAttributes: crossDomainTrackingConfig\n            };\n        };\n        // Get all injected plugins\n        browserPlugins.push(getBrowserDataPlugin());\n        /* When including the Web Page context, we add the relevant internal plugins */\n        if (isWebPageContextAvailable) {\n            browserPlugins.push(getWebPagePlugin());\n        }\n        if (isBrowserContextAvailable) {\n            browserPlugins.push(getBrowserContextPlugin());\n        }\n        browserPlugins.push.apply(browserPlugins, ((_f = trackerConfiguration.plugins) !== null && _f !== void 0 ? _f : []));\n        var // Tracker core\n        core = trackerCore({\n            base64: trackerConfiguration.encodeBase64,\n            corePlugins: browserPlugins,\n            callback: sendRequest\n        }), \n        // Aliases\n        documentCharset = document.characterSet || document.charset, \n        // Current URL and Referrer URL\n        locationArray = fixupUrl(window.location.hostname, window.location.href, getReferrer()), domainAlias = fixupDomain(locationArray[0]), locationHrefAlias = locationArray[1], configReferrerUrl = locationArray[2], customReferrer, \n        // Platform defaults to web for this tracker\n        configPlatform = (_g = trackerConfiguration.platform) !== null && _g !== void 0 ? _g : 'web', \n        // Snowplow collector URL\n        configCollectorUrl = asCollectorUrl(endpoint), \n        // Custom path for post requests (to get around adblockers)\n        configPostPath = (_h = trackerConfiguration.postPath) !== null && _h !== void 0 ? _h : '/com.snowplowanalytics.snowplow/tp2', \n        // Site ID\n        configTrackerSiteId = (_j = trackerConfiguration.appId) !== null && _j !== void 0 ? _j : '', \n        // Document URL\n        configCustomUrl, \n        // Document title\n        lastDocumentTitle = document.title, \n        // Custom title\n        lastConfigTitle, \n        // Indicates that the lastConfigTitle was set from a trackPageView call\n        // Custom title configured this way has a shorter lifespan than when set using setDocumentTitle.\n        // It only lasts until the next trackPageView call.\n        lastConfigTitleFromTrackPageView = false, \n        // Controls whether activity tracking page ping event timers are reset on page view events\n        resetActivityTrackingOnPageView = (_k = trackerConfiguration.resetActivityTrackingOnPageView) !== null && _k !== void 0 ? _k : true, \n        // Disallow hash tags in URL. TODO: Should this be set to true by default?\n        configDiscardHashTag, \n        // Disallow brace in URL.\n        configDiscardBrace, \n        // First-party cookie name prefix\n        configCookieNamePrefix = (_l = trackerConfiguration.cookieName) !== null && _l !== void 0 ? _l : '_sp_', \n        // First-party cookie domain\n        // User agent defaults to origin hostname\n        configCookieDomain = (_m = trackerConfiguration.cookieDomain) !== null && _m !== void 0 ? _m : undefined, \n        // First-party cookie path\n        // Default is user agent defined.\n        configCookiePath = '/', \n        // First-party cookie samesite attribute\n        configCookieSameSite = (_o = trackerConfiguration.cookieSameSite) !== null && _o !== void 0 ? _o : 'None', \n        // First-party cookie secure attribute\n        configCookieSecure = (_p = trackerConfiguration.cookieSecure) !== null && _p !== void 0 ? _p : true, \n        // Do Not Track browser feature\n        dnt = window.navigator.doNotTrack || window.navigator.msDoNotTrack || window.doNotTrack, \n        // Do Not Track\n        configDoNotTrack = typeof trackerConfiguration.respectDoNotTrack !== 'undefined'\n            ? trackerConfiguration.respectDoNotTrack && (dnt === 'yes' || dnt === '1')\n            : false, \n        // Opt out of cookie tracking\n        configOptOutCookie, \n        // Life of the visitor cookie (in seconds)\n        configVisitorCookieTimeout = (_q = trackerConfiguration.cookieLifetime) !== null && _q !== void 0 ? _q : 63072000, // 2 years\n        // Life of the session cookie (in seconds)\n        configSessionCookieTimeout = (_r = trackerConfiguration.sessionCookieTimeout) !== null && _r !== void 0 ? _r : 1800, // 30 minutes\n        // Allows tracking user session (using cookies or local storage), can only be used with anonymousTracking\n        configAnonymousSessionTracking = getAnonymousSessionTracking(trackerConfiguration), \n        // Will send a header to server to prevent returning cookie and capturing IP\n        configAnonymousServerTracking = getAnonymousServerTracking(trackerConfiguration), \n        // Sets tracker to work in anonymous mode without accessing client storage\n        configAnonymousTracking = getAnonymousTracking(trackerConfiguration), \n        // Strategy defining how to store the state: cookie, localStorage, cookieAndLocalStorage or none\n        configStateStorageStrategy = getStateStorageStrategy(trackerConfiguration), \n        // Last activity timestamp\n        lastActivityTime, \n        // The last time an event was fired on the page - used to invalidate session if cookies are disabled\n        lastEventTime = new Date().getTime(), \n        // How are we scrolling?\n        minXOffset, maxXOffset, minYOffset, maxYOffset, \n        // Domain hash value\n        domainHash, \n        // Domain unique user ID\n        domainUserId, \n        // ID for the current session\n        memorizedSessionId, \n        // Index for the current session - kept in memory in case cookies are disabled\n        memorizedVisitCount = 1, \n        // Business-defined unique user ID\n        businessUserId, \n        // Manager for local storage queue\n        outQueue = OutQueueManager(trackerId, state, configStateStorageStrategy == 'localStorage' || configStateStorageStrategy == 'cookieAndLocalStorage', trackerConfiguration.eventMethod, configPostPath, (_s = trackerConfiguration.bufferSize) !== null && _s !== void 0 ? _s : 1, (_t = trackerConfiguration.maxPostBytes) !== null && _t !== void 0 ? _t : 40000, (_u = trackerConfiguration.maxGetBytes) !== null && _u !== void 0 ? _u : 0, (_v = trackerConfiguration.useStm) !== null && _v !== void 0 ? _v : true, (_w = trackerConfiguration.maxLocalStorageQueueSize) !== null && _w !== void 0 ? _w : 1000, (_x = trackerConfiguration.connectionTimeout) !== null && _x !== void 0 ? _x : 5000, configAnonymousServerTracking, (_y = trackerConfiguration.customHeaders) !== null && _y !== void 0 ? _y : {}, (_z = trackerConfiguration.withCredentials) !== null && _z !== void 0 ? _z : true, (_0 = trackerConfiguration.retryStatusCodes) !== null && _0 !== void 0 ? _0 : [], ((_1 = trackerConfiguration.dontRetryStatusCodes) !== null && _1 !== void 0 ? _1 : []).concat([400, 401, 403, 410, 422]), trackerConfiguration.idService, trackerConfiguration.retryFailedRequests, trackerConfiguration.onRequestSuccess, trackerConfiguration.onRequestFailure), \n        // Whether pageViewId should be regenerated after each trackPageView. Affect web_page context\n        preservePageViewId = false, \n        // Whether pageViewId should be kept the same until the page URL changes. Affects web_page context\n        preservePageViewIdForUrl = (_2 = trackerConfiguration.preservePageViewIdForUrl) !== null && _2 !== void 0 ? _2 : false, \n        // The pageViewId of the last page view event or undefined if no page view tracked yet. Used to determine if pageViewId should be regenerated for a new page view.\n        lastSentPageViewId = undefined, \n        // Activity tracking config for callback and page ping variants\n        activityTrackingConfig = {\n            enabled: false,\n            installed: false,\n            configurations: {}\n        }, configSessionContext = (_4 = (_3 = trackerConfiguration.contexts) === null || _3 === void 0 ? void 0 : _3.session) !== null && _4 !== void 0 ? _4 : false, toOptoutByCookie, onSessionUpdateCallback = trackerConfiguration.onSessionUpdateCallback, manualSessionUpdateCalled = false, _5 = getExtendedCrossDomainTrackingConfiguration(trackerConfiguration.useExtendedCrossDomainLinker || false), useExtendedCrossDomainLinker = _5.useExtendedCrossDomainLinker, collectCrossDomainAttributes = _5.collectCrossDomainAttributes;\n        if (trackerConfiguration.hasOwnProperty('discoverRootDomain') && trackerConfiguration.discoverRootDomain) {\n            configCookieDomain = findRootDomain(configCookieSameSite, configCookieSecure);\n        }\n        var _6 = getBrowserProperties(), browserLanguage = _6.browserLanguage, resolution = _6.resolution, colorDepth = _6.colorDepth, cookiesEnabled = _6.cookiesEnabled;\n        // Set up unchanging name-value pairs\n        core.setTrackerVersion(version);\n        core.setTrackerNamespace(namespace);\n        core.setAppId(configTrackerSiteId);\n        core.setPlatform(configPlatform);\n        core.addPayloadPair('cookie', cookiesEnabled ? '1' : '0');\n        core.addPayloadPair('cs', documentCharset);\n        core.addPayloadPair('lang', browserLanguage);\n        core.addPayloadPair('res', resolution);\n        core.addPayloadPair('cd', colorDepth);\n        /*\n         * Initialize tracker\n         */\n        updateDomainHash();\n        initializeIdsAndCookies();\n        if (trackerConfiguration.crossDomainLinker) {\n            decorateLinks(trackerConfiguration.crossDomainLinker);\n        }\n        /**\n         * Recalculate the domain, URL, and referrer\n         */\n        function refreshUrl() {\n            locationArray = fixupUrl(window.location.hostname, window.location.href, getReferrer());\n            // If this is a single-page app and the page URL has changed, then:\n            //   - if the new URL's querystring contains a \"refer(r)er\" parameter, use it as the referrer\n            //   - otherwise use the old URL as the referer\n            if (locationArray[1] !== locationHrefAlias) {\n                configReferrerUrl = getReferrer(locationHrefAlias);\n            }\n            domainAlias = fixupDomain(locationArray[0]);\n            locationHrefAlias = locationArray[1];\n        }\n        /**\n         * Create link handler to decorate the querystring of a link (onClick/onMouseDown)\n         *\n         * @param event - e The event targeting the link\n         */\n        function addLinkDecorationHandler(extended) {\n            var CROSS_DOMAIN_PARAMETER_NAME = '_sp';\n            return function (evt) {\n                var elt = evt.currentTarget;\n                var crossDomainParameterValue = createCrossDomainParameterValue(extended, collectCrossDomainAttributes, {\n                    domainUserId: domainUserId,\n                    userId: businessUserId || undefined,\n                    sessionId: memorizedSessionId,\n                    sourceId: configTrackerSiteId,\n                    sourcePlatform: configPlatform,\n                    event: evt\n                });\n                if (elt === null || elt === void 0 ? void 0 : elt.href) {\n                    elt.href = decorateQuerystring(elt.href, CROSS_DOMAIN_PARAMETER_NAME, crossDomainParameterValue);\n                }\n            };\n        }\n        /**\n         * Enable querystring decoration for links passing a filter\n         * Whenever such a link is clicked on or navigated to via the keyboard,\n         * add \"_sp={{duid}}.{{timestamp}}\" to its querystring\n         *\n         * @param crossDomainLinker - Function used to determine which links to decorate\n         */\n        function decorateLinks(crossDomainLinker) {\n            var crossDomainLinkHandler = addLinkDecorationHandler(useExtendedCrossDomainLinker);\n            for (var i = 0; i < document.links.length; i++) {\n                var elt = document.links[i];\n                if (!elt.spDecorationEnabled && crossDomainLinker(elt)) {\n                    elt.addEventListener('click', crossDomainLinkHandler, true);\n                    elt.addEventListener('mousedown', crossDomainLinkHandler, true);\n                    // Don't add event listeners more than once\n                    elt.spDecorationEnabled = true;\n                }\n            }\n        }\n        /*\n         * Removes hash tag from the URL\n         *\n         * URLs are purified before being recorded in the cookie,\n         * or before being sent as GET parameters\n         */\n        function purify(url) {\n            var targetPattern;\n            if (configDiscardHashTag) {\n                targetPattern = new RegExp('#.*');\n                url = url.replace(targetPattern, '');\n            }\n            if (configDiscardBrace) {\n                targetPattern = new RegExp('[{}]', 'g');\n                url = url.replace(targetPattern, '');\n            }\n            return url;\n        }\n        /*\n         * Extract scheme/protocol from URL\n         */\n        function getProtocolScheme(url) {\n            var e = new RegExp('^([a-z]+):'), matches = e.exec(url);\n            return matches ? matches[1] : null;\n        }\n        /*\n         * Resolve relative reference\n         *\n         * Note: not as described in rfc3986 section 5.2\n         */\n        function resolveRelativeReference(baseUrl, url) {\n            var protocol = getProtocolScheme(url), i;\n            if (protocol) {\n                return url;\n            }\n            if (url.slice(0, 1) === '/') {\n                return getProtocolScheme(baseUrl) + '://' + getHostName(baseUrl) + url;\n            }\n            baseUrl = purify(baseUrl);\n            if ((i = baseUrl.indexOf('?')) >= 0) {\n                baseUrl = baseUrl.slice(0, i);\n            }\n            if ((i = baseUrl.lastIndexOf('/')) !== baseUrl.length - 1) {\n                baseUrl = baseUrl.slice(0, i + 1);\n            }\n            return baseUrl + url;\n        }\n        /*\n         * Send request\n         */\n        function sendRequest(request) {\n            if (!(configDoNotTrack || toOptoutByCookie)) {\n                outQueue.enqueueRequest(request.build(), configCollectorUrl);\n            }\n        }\n        /*\n         * Get cookie name with prefix and domain hash\n         */\n        function getSnowplowCookieName(baseName) {\n            return configCookieNamePrefix + baseName + '.' + domainHash;\n        }\n        /*\n         * Cookie getter.\n         */\n        function getSnowplowCookieValue(cookieName) {\n            var fullName = getSnowplowCookieName(cookieName);\n            if (configStateStorageStrategy == 'localStorage') {\n                return attemptGetLocalStorage(fullName);\n            }\n            else if (configStateStorageStrategy == 'cookie' || configStateStorageStrategy == 'cookieAndLocalStorage') {\n                return cookie(fullName);\n            }\n            return undefined;\n        }\n        /*\n         * Update domain hash\n         */\n        function updateDomainHash() {\n            refreshUrl();\n            domainHash = hash((configCookieDomain || domainAlias) + (configCookiePath || '/')).slice(0, 4); // 4 hexits = 16 bits\n        }\n        /*\n         * Process all \"activity\" events.\n         * For performance, this function must have low overhead.\n         */\n        function activityHandler() {\n            var now = new Date();\n            lastActivityTime = now.getTime();\n        }\n        /*\n         * Process all \"scroll\" events.\n         */\n        function scrollHandler() {\n            updateMaxScrolls();\n            activityHandler();\n        }\n        /*\n         * Returns [pageXOffset, pageYOffset]\n         */\n        function getPageOffsets() {\n            var documentElement = document.documentElement;\n            if (documentElement) {\n                return [documentElement.scrollLeft || window.pageXOffset, documentElement.scrollTop || window.pageYOffset];\n            }\n            return [0, 0];\n        }\n        /*\n         * Quick initialization/reset of max scroll levels\n         */\n        function resetMaxScrolls() {\n            var offsets = getPageOffsets();\n            var x = offsets[0];\n            minXOffset = x;\n            maxXOffset = x;\n            var y = offsets[1];\n            minYOffset = y;\n            maxYOffset = y;\n        }\n        /*\n         * Check the max scroll levels, updating as necessary\n         */\n        function updateMaxScrolls() {\n            var offsets = getPageOffsets();\n            var x = offsets[0];\n            if (x < minXOffset) {\n                minXOffset = x;\n            }\n            else if (x > maxXOffset) {\n                maxXOffset = x;\n            }\n            var y = offsets[1];\n            if (y < minYOffset) {\n                minYOffset = y;\n            }\n            else if (y > maxYOffset) {\n                maxYOffset = y;\n            }\n        }\n        /*\n         * Prevents offsets from being decimal or NaN\n         * See https://github.com/snowplow/snowplow-javascript-tracker/issues/324\n         */\n        function cleanOffset(offset) {\n            return Math.round(offset);\n        }\n        /**\n         * Sets or renews the session cookie.\n         * Responsible for calling the `onSessionUpdateCallback` callback.\n         * @returns {boolean} If the value persisted in cookies or LocalStorage\n         */\n        function setSessionCookie() {\n            var cookieName = getSnowplowCookieName('ses');\n            var cookieValue = '*';\n            return persistValue(cookieName, cookieValue, configSessionCookieTimeout);\n        }\n        /**\n         * @mutates idCookie\n         * @param {ParsedIdCookie} idCookie\n         * @returns {boolean} If the value persisted in cookies or LocalStorage\n         */\n        function setDomainUserIdCookie(idCookie) {\n            var cookieName = getSnowplowCookieName('id');\n            var cookieValue = serializeIdCookie(idCookie, configAnonymousTracking);\n            return persistValue(cookieName, cookieValue, configVisitorCookieTimeout);\n        }\n        /**\n         * no-op if anonymousTracking enabled, will still set cookies if anonymousSessionTracking is enabled\n         * Sets a cookie based on the storage strategy:\n         * - if 'localStorage': attempts to write to local storage\n         * - if 'cookie' or 'cookieAndLocalStorage': writes to cookies\n         * - otherwise: no-op\n         * @param {string} name Name/key of the value to persist\n         * @param {string} value\n         * @param {number} timeout Used as the expiration date for cookies or as a TTL to be checked on LocalStorage\n         * @returns {boolean} If the operation was successful or not\n         */\n        function persistValue(name, value, timeout) {\n            if (configAnonymousTracking && !configAnonymousSessionTracking) {\n                return false;\n            }\n            if (configStateStorageStrategy == 'localStorage') {\n                return attemptWriteLocalStorage(name, value, timeout);\n            }\n            else if (configStateStorageStrategy == 'cookie' || configStateStorageStrategy == 'cookieAndLocalStorage') {\n                cookie(name, value, timeout, configCookiePath, configCookieDomain, configCookieSameSite, configCookieSecure);\n                return document.cookie.indexOf(\"\".concat(name, \"=\")) !== -1 ? true : false;\n            }\n            return false;\n        }\n        /**\n         * Clears all cookie and local storage for id and ses values\n         */\n        function clearUserDataAndCookies(configuration) {\n            var idname = getSnowplowCookieName('id');\n            var sesname = getSnowplowCookieName('ses');\n            attemptDeleteLocalStorage(idname);\n            attemptDeleteLocalStorage(sesname);\n            deleteCookie(idname, configCookieDomain, configCookieSameSite, configCookieSecure);\n            deleteCookie(sesname, configCookieDomain, configCookieSameSite, configCookieSecure);\n            if (!(configuration === null || configuration === void 0 ? void 0 : configuration.preserveSession)) {\n                memorizedSessionId = v4();\n                memorizedVisitCount = 1;\n            }\n            if (!(configuration === null || configuration === void 0 ? void 0 : configuration.preserveUser)) {\n                domainUserId = configAnonymousTracking ? '' : v4();\n                businessUserId = null;\n            }\n        }\n        /**\n         * Toggle Anonymous Tracking\n         */\n        function toggleAnonymousTracking(configuration) {\n            if (configuration && configuration.stateStorageStrategy) {\n                trackerConfiguration.stateStorageStrategy = configuration.stateStorageStrategy;\n                configStateStorageStrategy = getStateStorageStrategy(trackerConfiguration);\n            }\n            configAnonymousTracking = getAnonymousTracking(trackerConfiguration);\n            configAnonymousSessionTracking = getAnonymousSessionTracking(trackerConfiguration);\n            configAnonymousServerTracking = getAnonymousServerTracking(trackerConfiguration);\n            outQueue.setUseLocalStorage(configStateStorageStrategy == 'localStorage' || configStateStorageStrategy == 'cookieAndLocalStorage');\n            outQueue.setAnonymousTracking(configAnonymousServerTracking);\n        }\n        /*\n         * Load the domain user ID and the session ID\n         * Set the cookies (if cookies are enabled)\n         */\n        function initializeIdsAndCookies() {\n            if (configAnonymousTracking && !configAnonymousSessionTracking) {\n                return;\n            }\n            var sesCookieSet = configStateStorageStrategy != 'none' && !!getSnowplowCookieValue('ses');\n            var idCookie = loadDomainUserIdCookie();\n            domainUserId = initializeDomainUserId(idCookie, configAnonymousTracking);\n            if (!sesCookieSet) {\n                memorizedSessionId = startNewIdCookieSession(idCookie);\n            }\n            else {\n                memorizedSessionId = sessionIdFromIdCookie(idCookie);\n            }\n            memorizedVisitCount = visitCountFromIdCookie(idCookie);\n            if (configStateStorageStrategy != 'none') {\n                setSessionCookie();\n                // Update currentVisitTs\n                updateNowTsInIdCookie(idCookie);\n                setDomainUserIdCookie(idCookie);\n            }\n        }\n        /*\n         * Load visitor ID cookie\n         */\n        function loadDomainUserIdCookie() {\n            if (configStateStorageStrategy == 'none') {\n                return emptyIdCookie();\n            }\n            var id = getSnowplowCookieValue('id') || undefined;\n            return parseIdCookie(id, domainUserId, memorizedSessionId, memorizedVisitCount);\n        }\n        /**\n         * Adds the protocol in front of our collector URL\n         *\n         * @param string - collectorUrl The collector URL with or without protocol\n         * @returns string collectorUrl The tracker URL with protocol\n         */\n        function asCollectorUrl(collectorUrl) {\n            if (collectorUrl.indexOf('http') === 0) {\n                return collectorUrl;\n            }\n            return ('https:' === document.location.protocol ? 'https' : 'http') + '://' + collectorUrl;\n        }\n        /**\n         * Initialize new `pageViewId` if it shouldn't be preserved.\n         * Should be called when `trackPageView` is invoked\n         */\n        function resetPageView() {\n            if (!preservePageViewId || state.pageViewId == null) {\n                state.pageViewId = v4();\n                state.pageViewUrl = configCustomUrl || locationHrefAlias;\n            }\n        }\n        /**\n         * Safe function to get `pageViewId`.\n         * Generates it if it wasn't initialized by other tracker\n         */\n        function getPageViewId() {\n            if (shouldGenerateNewPageViewId()) {\n                state.pageViewId = v4();\n                state.pageViewUrl = configCustomUrl || locationHrefAlias;\n            }\n            return state.pageViewId;\n        }\n        function shouldGenerateNewPageViewId() {\n            // If pageViewId is not initialized, generate it\n            if (state.pageViewId == null) {\n                return true;\n            }\n            // If pageViewId should be preserved regardless of the URL, don't generate a new one\n            if (preservePageViewId || !preservePageViewIdForUrl) {\n                return false;\n            }\n            // If doesn't have previous URL in state, generate a new pageViewId\n            if (state.pageViewUrl === undefined) {\n                return true;\n            }\n            var current = configCustomUrl || locationHrefAlias;\n            // If full preserve is enabled, compare the full URL\n            if (preservePageViewIdForUrl === true || preservePageViewIdForUrl == 'full' || !('URL' in window)) {\n                return state.pageViewUrl != current;\n            }\n            var currentUrl = new URL(current);\n            var previousUrl = new URL(state.pageViewUrl);\n            // If pathname preserve is enabled, compare the pathname\n            if (preservePageViewIdForUrl == 'pathname') {\n                return currentUrl.pathname != previousUrl.pathname;\n            }\n            // If pathname and search preserve is enabled, compare the pathname and search\n            if (preservePageViewIdForUrl == 'pathnameAndSearch') {\n                return currentUrl.pathname != previousUrl.pathname || currentUrl.search != previousUrl.search;\n            }\n            return false;\n        }\n        /**\n         * Safe function to get `tabId`.\n         * Generates it if it is not yet initialized. Shared between trackers.\n         */\n        function getTabId() {\n            if (configStateStorageStrategy === 'none' || configAnonymousTracking || !isWebPageContextAvailable) {\n                return null;\n            }\n            var SESSION_STORAGE_TAB_ID = '_sp_tab_id';\n            var tabId = attemptGetSessionStorage(SESSION_STORAGE_TAB_ID);\n            if (!tabId) {\n                attemptWriteSessionStorage(SESSION_STORAGE_TAB_ID, v4());\n                tabId = attemptGetSessionStorage(SESSION_STORAGE_TAB_ID);\n            }\n            return tabId || null;\n        }\n        /**\n         * Put together a web page context with a unique UUID for the page view\n         *\n         * @returns web_page context\n         */\n        function getWebPagePlugin() {\n            return {\n                contexts: function () {\n                    return [\n                        {\n                            schema: WEB_PAGE_SCHEMA,\n                            data: {\n                                id: getPageViewId()\n                            }\n                        },\n                    ];\n                }\n            };\n        }\n        function getBrowserContextPlugin() {\n            return {\n                contexts: function () {\n                    return [\n                        {\n                            schema: BROWSER_CONTEXT_SCHEMA,\n                            data: __assign(__assign({}, getBrowserProperties()), { tabId: getTabId() })\n                        },\n                    ];\n                }\n            };\n        }\n        /*\n         * Attaches common web fields to every request (resolution, url, referrer, etc.)\n         * Also sets the required cookies.\n         */\n        function getBrowserDataPlugin() {\n            var anonymizeOr = function (value) { return (configAnonymousTracking ? null : value); };\n            var anonymizeSessionOr = function (value) {\n                return configAnonymousSessionTracking ? value : anonymizeOr(value);\n            };\n            return {\n                beforeTrack: function (payloadBuilder) {\n                    var existingSession = getSnowplowCookieValue('ses'), idCookie = loadDomainUserIdCookie();\n                    var isFirstEventInSession = eventIndexFromIdCookie(idCookie) === 0;\n                    if (configOptOutCookie) {\n                        toOptoutByCookie = !!cookie(configOptOutCookie);\n                    }\n                    else {\n                        toOptoutByCookie = false;\n                    }\n                    if (configDoNotTrack || toOptoutByCookie) {\n                        clearUserDataAndCookies();\n                        return;\n                    }\n                    // If cookies are enabled, base visit count and session ID on the cookies\n                    if (cookiesEnabledInIdCookie(idCookie)) {\n                        // New session?\n                        if (!existingSession && configStateStorageStrategy != 'none') {\n                            memorizedSessionId = startNewIdCookieSession(idCookie);\n                        }\n                        else {\n                            memorizedSessionId = sessionIdFromIdCookie(idCookie);\n                        }\n                        memorizedVisitCount = visitCountFromIdCookie(idCookie);\n                    }\n                    else if (new Date().getTime() - lastEventTime > configSessionCookieTimeout * 1000) {\n                        memorizedVisitCount++;\n                        memorizedSessionId = startNewIdCookieSession(idCookie, {\n                            memorizedVisitCount: memorizedVisitCount\n                        });\n                    }\n                    // Update cookie\n                    updateNowTsInIdCookie(idCookie);\n                    updateFirstEventInIdCookie(idCookie, payloadBuilder);\n                    incrementEventIndexInIdCookie(idCookie);\n                    var _a = getBrowserProperties(), viewport = _a.viewport, documentSize = _a.documentSize;\n                    payloadBuilder.add('vp', viewport);\n                    payloadBuilder.add('ds', documentSize);\n                    payloadBuilder.add('vid', anonymizeSessionOr(memorizedVisitCount));\n                    payloadBuilder.add('sid', anonymizeSessionOr(memorizedSessionId));\n                    payloadBuilder.add('duid', anonymizeOr(domainUserIdFromIdCookie(idCookie))); // Always load from cookie as this is better etiquette than in-memory values\n                    payloadBuilder.add('uid', anonymizeOr(businessUserId));\n                    refreshUrl();\n                    payloadBuilder.add('refr', purify(customReferrer || configReferrerUrl));\n                    // Add the page URL last as it may take us over the IE limit (and we don't always need it)\n                    payloadBuilder.add('url', purify(configCustomUrl || locationHrefAlias));\n                    var clientSession = clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking);\n                    if (configSessionContext && (!configAnonymousTracking || configAnonymousSessionTracking)) {\n                        addSessionContextToPayload(payloadBuilder, clientSession);\n                    }\n                    // Update cookies\n                    if (configStateStorageStrategy != 'none') {\n                        setDomainUserIdCookie(idCookie);\n                        var sessionIdentifierPersisted = setSessionCookie();\n                        if ((!existingSession || isFirstEventInSession) &&\n                            sessionIdentifierPersisted &&\n                            onSessionUpdateCallback &&\n                            !manualSessionUpdateCalled) {\n                            onSessionUpdateCallback(clientSession);\n                            manualSessionUpdateCalled = false;\n                        }\n                    }\n                    lastEventTime = new Date().getTime();\n                }\n            };\n        }\n        function addSessionContextToPayload(payloadBuilder, clientSession) {\n            var sessionContext = {\n                schema: CLIENT_SESSION_SCHEMA,\n                data: clientSession\n            };\n            payloadBuilder.addContextEntity(sessionContext);\n        }\n        /**\n         * Expires current session and starts a new session.\n         */\n        function newSession() {\n            // If cookies are enabled, base visit count and session ID on the cookies\n            var idCookie = loadDomainUserIdCookie();\n            // When cookies are enabled\n            if (cookiesEnabledInIdCookie(idCookie)) {\n                // When cookie/local storage is enabled - make a new session\n                if (configStateStorageStrategy != 'none') {\n                    memorizedSessionId = startNewIdCookieSession(idCookie);\n                }\n                else {\n                    memorizedSessionId = sessionIdFromIdCookie(idCookie);\n                }\n                memorizedVisitCount = visitCountFromIdCookie(idCookie);\n            }\n            else {\n                memorizedVisitCount++;\n                memorizedSessionId = startNewIdCookieSession(idCookie, {\n                    memorizedVisitCount: memorizedVisitCount\n                });\n            }\n            updateNowTsInIdCookie(idCookie);\n            // Update cookies\n            if (configStateStorageStrategy != 'none') {\n                var clientSession = clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking);\n                setDomainUserIdCookie(idCookie);\n                var sessionIdentifierPersisted = setSessionCookie();\n                if (sessionIdentifierPersisted && onSessionUpdateCallback) {\n                    manualSessionUpdateCalled = true;\n                    onSessionUpdateCallback(clientSession);\n                }\n            }\n            lastEventTime = new Date().getTime();\n        }\n        /**\n         * Combine an array of unchanging contexts with the result of a context-creating function\n         *\n         * @param staticContexts - Array of custom contexts\n         * @param contextCallback - Function returning an array of contexts\n         */\n        function finalizeContexts(staticContexts, contextCallback) {\n            return (staticContexts || []).concat(contextCallback ? contextCallback() : []);\n        }\n        function logPageView(_a) {\n            var title = _a.title, context = _a.context, timestamp = _a.timestamp, contextCallback = _a.contextCallback;\n            refreshUrl();\n            if (lastSentPageViewId && lastSentPageViewId == getPageViewId()) {\n                // Do not reset pageViewId if a page view was not tracked yet or a different page view ID was used (in order to support multiple trackers with shared state)\n                resetPageView();\n            }\n            lastSentPageViewId = getPageViewId();\n            // So we know what document.title was at the time of trackPageView\n            lastDocumentTitle = document.title;\n            if (title) {\n                lastConfigTitle = title;\n                lastConfigTitleFromTrackPageView = true;\n            }\n            else if (lastConfigTitleFromTrackPageView) {\n                lastConfigTitle = null;\n            }\n            // Fixup page title\n            var pageTitle = fixupTitle(lastConfigTitle || lastDocumentTitle);\n            // Log page view\n            core.track(buildPageView({\n                pageUrl: purify(configCustomUrl || locationHrefAlias),\n                pageTitle: pageTitle,\n                referrer: purify(customReferrer || configReferrerUrl)\n            }), finalizeContexts(context, contextCallback), timestamp);\n            // Send ping (to log that user has stayed on page)\n            var now = new Date();\n            var installingActivityTracking = false;\n            if (activityTrackingConfig.enabled && !activityTrackingConfig.installed) {\n                activityTrackingConfig.installed = true;\n                installingActivityTracking = true;\n                // Add mousewheel event handler, detect passive event listeners for performance\n                var detectPassiveEvents_1 = {\n                    update: function update() {\n                        if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n                            var passive_1 = false;\n                            var options = Object.defineProperty({}, 'passive', {\n                                get: function get() {\n                                    passive_1 = true;\n                                },\n                                set: function set() { }\n                            });\n                            // note: have to set and remove a no-op listener instead of null\n                            // (which was used previously), because Edge v15 throws an error\n                            // when providing a null callback.\n                            // https://github.com/rafrex/detect-passive-events/pull/3\n                            var noop = function noop() { };\n                            window.addEventListener('testPassiveEventSupport', noop, options);\n                            window.removeEventListener('testPassiveEventSupport', noop, options);\n                            detectPassiveEvents_1.hasSupport = passive_1;\n                        }\n                    }\n                };\n                detectPassiveEvents_1.update();\n                // Detect available wheel event\n                var wheelEvent = 'onwheel' in document.createElement('div')\n                    ? 'wheel' // Modern browsers support \"wheel\"\n                    : document.onmousewheel !== undefined\n                        ? 'mousewheel' // Webkit and IE support at least \"mousewheel\"\n                        : 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox\n                if (Object.prototype.hasOwnProperty.call(detectPassiveEvents_1, 'hasSupport')) {\n                    addEventListener(document, wheelEvent, activityHandler, { passive: true });\n                }\n                else {\n                    addEventListener(document, wheelEvent, activityHandler);\n                }\n                // Capture our initial scroll points\n                resetMaxScrolls();\n                // Add event handlers; cross-browser compatibility here varies significantly\n                // @see http://quirksmode.org/dom/events\n                var documentHandlers = [\n                    'click',\n                    'mouseup',\n                    'mousedown',\n                    'mousemove',\n                    'keypress',\n                    'keydown',\n                    'keyup',\n                    'touchend',\n                    'touchstart',\n                ];\n                var windowHandlers = ['resize', 'focus', 'blur'];\n                var listener = function (_, handler) {\n                    if (handler === void 0) { handler = activityHandler; }\n                    return function (ev) {\n                        return addEventListener(document, ev, handler);\n                    };\n                };\n                documentHandlers.forEach(listener(document));\n                windowHandlers.forEach(listener(window));\n                listener(window, scrollHandler)('scroll');\n            }\n            if (activityTrackingConfig.enabled && (resetActivityTrackingOnPageView || installingActivityTracking)) {\n                // Periodic check for activity.\n                lastActivityTime = now.getTime();\n                var key = void 0;\n                for (key in activityTrackingConfig.configurations) {\n                    var config = activityTrackingConfig.configurations[key];\n                    if (config) {\n                        //Clear page ping heartbeat on new page view\n                        window.clearInterval(config.activityInterval);\n                        scheduleActivityInterval(config, context, contextCallback);\n                    }\n                }\n            }\n        }\n        function scheduleActivityInterval(config, context, contextCallback) {\n            var executePagePing = function (cb, context) {\n                refreshUrl();\n                cb({ context: context, pageViewId: getPageViewId(), minXOffset: minXOffset, minYOffset: minYOffset, maxXOffset: maxXOffset, maxYOffset: maxYOffset });\n                resetMaxScrolls();\n            };\n            var timeout = function () {\n                var now = new Date();\n                // There was activity during the heart beat period;\n                // on average, this is going to overstate the visitDuration by configHeartBeatTimer/2\n                if (lastActivityTime + config.configMinimumVisitLength > now.getTime()) {\n                    executePagePing(config.callback, finalizeContexts(context, contextCallback));\n                }\n                config.activityInterval = window.setInterval(heartbeat, config.configHeartBeatTimer);\n            };\n            var heartbeat = function () {\n                var now = new Date();\n                // There was activity during the heart beat period;\n                // on average, this is going to overstate the visitDuration by configHeartBeatTimer/2\n                if (lastActivityTime + config.configHeartBeatTimer > now.getTime()) {\n                    executePagePing(config.callback, finalizeContexts(context, contextCallback));\n                }\n            };\n            if (config.configMinimumVisitLength === 0) {\n                config.activityInterval = window.setInterval(heartbeat, config.configHeartBeatTimer);\n            }\n            else {\n                config.activityInterval = window.setTimeout(timeout, config.configMinimumVisitLength);\n            }\n        }\n        /**\n         * Configure the activity tracking and ensures integer values for min visit and heartbeat\n         */\n        function configureActivityTracking(configuration) {\n            var minimumVisitLength = configuration.minimumVisitLength, heartbeatDelay = configuration.heartbeatDelay, callback = configuration.callback;\n            if (isInteger(minimumVisitLength) && isInteger(heartbeatDelay)) {\n                return {\n                    configMinimumVisitLength: minimumVisitLength * 1000,\n                    configHeartBeatTimer: heartbeatDelay * 1000,\n                    callback: callback\n                };\n            }\n            LOG.error('Activity tracking minimumVisitLength & heartbeatDelay must be integers');\n            return undefined;\n        }\n        /**\n         * Log that a user is still viewing a given page by sending a page ping.\n         * Not part of the public API - only called from logPageView() above.\n         */\n        function logPagePing(_a) {\n            var context = _a.context, minXOffset = _a.minXOffset, minYOffset = _a.minYOffset, maxXOffset = _a.maxXOffset, maxYOffset = _a.maxYOffset;\n            var newDocumentTitle = document.title;\n            if (newDocumentTitle !== lastDocumentTitle) {\n                lastDocumentTitle = newDocumentTitle;\n                lastConfigTitle = undefined;\n            }\n            core.track(buildPagePing({\n                pageUrl: purify(configCustomUrl || locationHrefAlias),\n                pageTitle: fixupTitle(lastConfigTitle || lastDocumentTitle),\n                referrer: purify(customReferrer || configReferrerUrl),\n                minXOffset: cleanOffset(minXOffset),\n                maxXOffset: cleanOffset(maxXOffset),\n                minYOffset: cleanOffset(minYOffset),\n                maxYOffset: cleanOffset(maxYOffset)\n            }), context);\n        }\n        function disableActivityTrackingAction(actionKey) {\n            var callbackConfiguration = activityTrackingConfig.configurations[actionKey];\n            if ((callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.configMinimumVisitLength) === 0) {\n                window.clearTimeout(callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.activityInterval);\n            }\n            else {\n                window.clearInterval(callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.activityInterval);\n            }\n            activityTrackingConfig.configurations[actionKey] = undefined;\n        }\n        var apiMethods = {\n            getDomainSessionIndex: function () {\n                return memorizedVisitCount;\n            },\n            getPageViewId: getPageViewId,\n            getTabId: getTabId,\n            newSession: newSession,\n            getCookieName: function (basename) {\n                return getSnowplowCookieName(basename);\n            },\n            getUserId: function () {\n                return businessUserId;\n            },\n            getDomainUserId: function () {\n                return loadDomainUserIdCookie()[1];\n            },\n            getDomainUserInfo: function () {\n                return loadDomainUserIdCookie();\n            },\n            setReferrerUrl: function (url) {\n                customReferrer = url;\n            },\n            setCustomUrl: function (url) {\n                refreshUrl();\n                configCustomUrl = resolveRelativeReference(locationHrefAlias, url);\n            },\n            setDocumentTitle: function (title) {\n                // So we know what document.title was at the time of trackPageView\n                lastDocumentTitle = document.title;\n                lastConfigTitle = title;\n                lastConfigTitleFromTrackPageView = false;\n            },\n            discardHashTag: function (enableFilter) {\n                configDiscardHashTag = enableFilter;\n            },\n            discardBrace: function (enableFilter) {\n                configDiscardBrace = enableFilter;\n            },\n            setCookiePath: function (path) {\n                configCookiePath = path;\n                updateDomainHash();\n            },\n            setVisitorCookieTimeout: function (timeout) {\n                configVisitorCookieTimeout = timeout;\n            },\n            crossDomainLinker: function (crossDomainLinkerCriterion) {\n                decorateLinks(crossDomainLinkerCriterion);\n            },\n            enableActivityTracking: function (configuration) {\n                if (!activityTrackingConfig.configurations.pagePing) {\n                    activityTrackingConfig.enabled = true;\n                    activityTrackingConfig.configurations.pagePing = configureActivityTracking(__assign(__assign({}, configuration), { callback: logPagePing }));\n                }\n            },\n            enableActivityTrackingCallback: function (configuration) {\n                if (!activityTrackingConfig.configurations.callback) {\n                    activityTrackingConfig.enabled = true;\n                    activityTrackingConfig.configurations.callback = configureActivityTracking(configuration);\n                }\n            },\n            disableActivityTracking: function () {\n                disableActivityTrackingAction('pagePing');\n            },\n            disableActivityTrackingCallback: function () {\n                disableActivityTrackingAction('callback');\n            },\n            updatePageActivity: function () {\n                activityHandler();\n            },\n            setOptOutCookie: function (name) {\n                configOptOutCookie = name;\n            },\n            setUserId: function (userId) {\n                businessUserId = userId;\n            },\n            setUserIdFromLocation: function (querystringField) {\n                refreshUrl();\n                businessUserId = fromQuerystring(querystringField, locationHrefAlias);\n            },\n            setUserIdFromReferrer: function (querystringField) {\n                refreshUrl();\n                businessUserId = fromQuerystring(querystringField, configReferrerUrl);\n            },\n            setUserIdFromCookie: function (cookieName) {\n                businessUserId = cookie(cookieName);\n            },\n            setCollectorUrl: function (collectorUrl) {\n                configCollectorUrl = asCollectorUrl(collectorUrl);\n                outQueue.setCollectorUrl(configCollectorUrl);\n            },\n            setBufferSize: function (newBufferSize) {\n                outQueue.setBufferSize(newBufferSize);\n            },\n            flushBuffer: function (configuration) {\n                if (configuration === void 0) { configuration = {}; }\n                outQueue.executeQueue();\n                if (configuration.newBufferSize) {\n                    outQueue.setBufferSize(configuration.newBufferSize);\n                }\n            },\n            trackPageView: function (event) {\n                if (event === void 0) { event = {}; }\n                logPageView(event);\n            },\n            preservePageViewId: function () {\n                preservePageViewId = true;\n            },\n            preservePageViewIdForUrl: function (preserve) {\n                preservePageViewIdForUrl = preserve;\n            },\n            disableAnonymousTracking: function (configuration) {\n                trackerConfiguration.anonymousTracking = false;\n                toggleAnonymousTracking(configuration);\n                initializeIdsAndCookies();\n                outQueue.executeQueue(); // There might be some events in the queue we've been unable to send in anonymous mode\n            },\n            enableAnonymousTracking: function (configuration) {\n                var _a;\n                trackerConfiguration.anonymousTracking = (_a = (configuration && (configuration === null || configuration === void 0 ? void 0 : configuration.options))) !== null && _a !== void 0 ? _a : true;\n                toggleAnonymousTracking(configuration);\n                // Reset the page view, if not tracking the session, so can't stitch user into new events on the page view id\n                if (!configAnonymousSessionTracking) {\n                    resetPageView();\n                }\n            },\n            clearUserData: clearUserDataAndCookies\n        };\n        return __assign(__assign({}, apiMethods), { id: trackerId, namespace: namespace, core: core, sharedState: state });\n    };\n    // Initialise the tracker\n    var partialTracker = newTracker(trackerId, namespace, version, endpoint, sharedState, trackerConfiguration), tracker = __assign(__assign({}, partialTracker), { addPlugin: function (configuration) {\n            var _a, _b;\n            tracker.core.addPlugin(configuration);\n            (_b = (_a = configuration.plugin).activateBrowserPlugin) === null || _b === void 0 ? void 0 : _b.call(_a, tracker);\n        } });\n    // Initialise each plugin with the tracker\n    browserPlugins.forEach(function (p) {\n        var _a;\n        (_a = p.activateBrowserPlugin) === null || _a === void 0 ? void 0 : _a.call(p, tracker);\n    });\n    return tracker;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar namedTrackers = {};\n/**\n * Dispatch function to all specified trackers\n *\n * @param trackers - An optional list of trackers to send the event to, or will send to all trackers\n * @param fn - The function which will run against each tracker\n */\nfunction dispatchToTrackers(trackers, fn) {\n    try {\n        getTrackers(trackers !== null && trackers !== void 0 ? trackers : allTrackerNames()).forEach(fn);\n    }\n    catch (ex) {\n        LOG.error('Function failed', ex);\n    }\n}\n/**\n * Dispatch function to all specified trackers from the supplied collection\n *\n * @param trackers - An optional list of trackers to send the event to, or will send to all trackers\n * @param trackerCollection - The collection which the trackers will be selected from\n * @param fn - The function which will run against each tracker\n */\nfunction dispatchToTrackersInCollection(trackers, trackerCollection, fn) {\n    try {\n        getTrackersFromCollection(trackers !== null && trackers !== void 0 ? trackers : Object.keys(trackerCollection), trackerCollection).forEach(fn);\n    }\n    catch (ex) {\n        LOG.error('Function failed', ex);\n    }\n}\n/**\n * Checks if a tracker has been created for a particular identifier\n * @param trackerId - The unique identifier of the tracker\n */\nfunction trackerExists(trackerId) {\n    return namedTrackers.hasOwnProperty(trackerId);\n}\n/**\n * Creates a Tracker and adds it to the internal collection\n * @param trackerId - The unique identifier of the tracker\n * @param namespace - The namespace of the tracker, tracked with each event as `tna`\n * @param version - The current version of the tracker library\n * @param endpoint - The endpoint to send events to\n * @param sharedState - The instance of shared state to use for this tracker\n * @param configuration - The configuration to use for this tracker instance\n */\nfunction addTracker(trackerId, namespace, version, endpoint, sharedState, configuration) {\n    if (!namedTrackers.hasOwnProperty(trackerId)) {\n        namedTrackers[trackerId] = Tracker(trackerId, namespace, version, endpoint, sharedState, configuration);\n        return namedTrackers[trackerId];\n    }\n    return null;\n}\n/**\n * Gets a single instance of the internal tracker object\n * @param trackerId - The unique identifier of the tracker\n * @returns The tracker instance, or null if not found\n */\nfunction getTracker(trackerId) {\n    if (namedTrackers.hasOwnProperty(trackerId)) {\n        return namedTrackers[trackerId];\n    }\n    LOG.warn(trackerId + ' not configured');\n    return null;\n}\n/**\n * Gets an array of tracker instances based on the list of identifiers\n * @param trackerIds - An array of unique identifiers of the trackers\n * @returns The tracker instances, or empty list if none found\n */\nfunction getTrackers(trackerIds) {\n    return getTrackersFromCollection(trackerIds, namedTrackers);\n}\n/**\n * Gets all the trackers as a object, keyed by their unique identifiers\n */\nfunction allTrackers() {\n    return namedTrackers;\n}\n/**\n * Returns all the unique tracker identifiers\n */\nfunction allTrackerNames() {\n    return Object.keys(namedTrackers);\n}\nfunction getTrackersFromCollection(trackerIds, trackerCollection) {\n    var trackers = [];\n    for (var _i = 0, trackerIds_1 = trackerIds; _i < trackerIds_1.length; _i++) {\n        var id = trackerIds_1[_i];\n        if (trackerCollection.hasOwnProperty(id)) {\n            trackers.push(trackerCollection[id]);\n        }\n        else {\n            LOG.warn(id + ' not configured');\n        }\n    }\n    return trackers;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * A set of variables which are shared among all initialised trackers\n */\nvar SharedState = /** @class */ (function () {\n    function SharedState() {\n        /* List of request queues - one per Tracker instance */\n        this.outQueues = [];\n        this.bufferFlushers = [];\n        /* DOM Ready */\n        this.hasLoaded = false;\n        this.registeredOnLoadHandlers = [];\n    }\n    return SharedState;\n}());\nfunction createSharedState() {\n    var sharedState = new SharedState(), documentAlias = document, windowAlias = window;\n    /*\n     * Handle page visibility event\n     * Works everywhere except IE9\n     */\n    function visibilityChangeHandler() {\n        if (documentAlias.visibilityState == 'hidden') {\n            // Flush all POST queues\n            sharedState.bufferFlushers.forEach(function (flusher) {\n                flusher(false);\n            });\n        }\n    }\n    function flushBuffers() {\n        // Flush all POST queues\n        sharedState.bufferFlushers.forEach(function (flusher) {\n            flusher(false);\n        });\n    }\n    /*\n     * Handler for onload event\n     */\n    function loadHandler() {\n        var i;\n        if (!sharedState.hasLoaded) {\n            sharedState.hasLoaded = true;\n            for (i = 0; i < sharedState.registeredOnLoadHandlers.length; i++) {\n                sharedState.registeredOnLoadHandlers[i]();\n            }\n        }\n        return true;\n    }\n    /*\n     * Add onload or DOM ready handler\n     */\n    function addReadyListener() {\n        if (documentAlias.addEventListener) {\n            documentAlias.addEventListener('DOMContentLoaded', function ready() {\n                documentAlias.removeEventListener('DOMContentLoaded', ready, false);\n                loadHandler();\n            });\n        }\n        else if (documentAlias.attachEvent) {\n            documentAlias.attachEvent('onreadystatechange', function ready() {\n                if (documentAlias.readyState === 'complete') {\n                    documentAlias.detachEvent('onreadystatechange', ready);\n                    loadHandler();\n                }\n            });\n        }\n        // fallback\n        addEventListener(windowAlias, 'load', loadHandler, false);\n    }\n    /************************************************************\n     * Constructor\n     ************************************************************/\n    // initialize the Snowplow singleton\n    if (documentAlias.visibilityState) {\n        // Flush for mobile and modern browsers\n        addEventListener(documentAlias, 'visibilitychange', visibilityChangeHandler, false);\n    }\n    // Last attempt at flushing in beforeunload\n    addEventListener(windowAlias, 'beforeunload', flushBuffers, false);\n    if (document.readyState === 'loading') {\n        addReadyListener();\n    }\n    else {\n        loadHandler();\n    }\n    return sharedState;\n}\n\nexport { SharedState, addEventListener, addTracker, allTrackerNames, allTrackers, attemptDeleteLocalStorage, attemptGetLocalStorage, attemptGetSessionStorage, attemptWriteLocalStorage, attemptWriteSessionStorage, cookie, createCrossDomainParameterValue, createSharedState, decorateQuerystring, deleteCookie, dispatchToTrackers, dispatchToTrackersInCollection, findRootDomain, fixupDomain, fixupTitle, fixupUrl, fromQuerystring, getCookiesWithPrefix, getCssClasses, getFilterByClass, getFilterByName, getHostName, getReferrer, getTracker, getTrackers, hasLocalStorage, hasSessionStorage, isFunction, isInteger, isString, isValueInArray, localStorageAccessible, parseAndValidateFloat, parseAndValidateInt, trackerExists, urlSafeBase64Encode };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Browser tracker for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackers, createSharedState, addTracker } from '@snowplow/browser-tracker-core';\nimport { buildStructEvent, buildSelfDescribingEvent, version } from '@snowplow/tracker-core';\nexport { version } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Expires current session and starts a new session.\n *\n * @param trackers - The tracker identifiers which will have their session refreshed\n */\nfunction newSession(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.newSession();\n    });\n}\n/**\n * Override referrer\n *\n * @param url - Custom Referrer which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setReferrerUrl(url, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setReferrerUrl(url);\n    });\n}\n/**\n * Override url\n *\n * @param url - Custom URL which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCustomUrl(url, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCustomUrl(url);\n    });\n}\n/**\n * Override document.title\n *\n * @param title - Document title which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setDocumentTitle(title, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setDocumentTitle(title);\n    });\n}\n/**\n * Strip hash tag (or anchor) from URL\n *\n * @param enable - Whether to enable stripping of hash\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction discardHashTag(enable, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.discardHashTag(enable);\n    });\n}\n/**\n * Strip braces from URL\n *\n * @param enable - Whther to enable stripping of braces\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction discardBrace(enable, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.discardBrace(enable);\n    });\n}\n/**\n * Set first-party cookie path\n *\n * @param path - The path which will be used when setting cookies\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCookiePath(path, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCookiePath(path);\n    });\n}\n/**\n * Set visitor cookie timeout (in seconds)\n *\n * @param timeout - The timeout until cookies will expire\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setVisitorCookieTimeout(timeout, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setVisitorCookieTimeout(timeout);\n    });\n}\n/**\n * Enable querystring decoration for links passing a filter\n *\n * @param crossDomainLinker - Function used to determine which links to decorate\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction crossDomainLinker(crossDomainLinkerCriterion, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.crossDomainLinker(crossDomainLinkerCriterion);\n    });\n}\n/**\n * Enables page activity tracking (sends page pings to the Collector regularly).\n *\n * @param configuration - The activity tracking configuration\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction enableActivityTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableActivityTracking(configuration);\n    });\n}\n/**\n * Enables page activity tracking (replaces collector ping with callback).\n *\n * @param configuration - The activity tracking callback configuration\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction enableActivityTrackingCallback(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableActivityTrackingCallback(configuration);\n    });\n}\n/**\n * Disables page activity tracking.\n *\n * @param trackers - The tracker identifiers the activity tracking will be disabled.\n */\nfunction disableActivityTracking(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableActivityTracking();\n    });\n}\n/**\n * Disables page activity tracking callback.\n *\n * @param trackers - The tracker identifiers the activity tracking callback will be disabled.\n */\nfunction disableActivityTrackingCallback(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableActivityTrackingCallback();\n    });\n}\n/**\n * Triggers the activityHandler manually to allow external user defined activity. i.e. While watching a video\n *\n * @param trackers - The tracker identifiers which will be updated\n */\nfunction updatePageActivity(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.updatePageActivity();\n    });\n}\n/**\n * Sets the opt out cookie.\n *\n * @param name - of the opt out cookie\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setOptOutCookie(name, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setOptOutCookie(name);\n    });\n}\n/**\n * Set the business-defined user ID for this user.\n *\n * @param userId - The business-defined user ID\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserId(userId, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserId(userId);\n    });\n}\n/**\n * Set the business-defined user ID for this user using the location querystring.\n *\n * @param querystringField - Name of a querystring name-value pair\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromLocation(querystringField, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromLocation(querystringField);\n    });\n}\n/**\n * Set the business-defined user ID for this user using the referrer querystring.\n *\n * @param querystringField - Name of a querystring name-value pair\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromReferrer(querystringField, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromReferrer(querystringField);\n    });\n}\n/**\n * Set the business-defined user ID for this user to the value of a cookie.\n *\n * @param cookieName - Name of the cookie whose value will be assigned to businessUserId\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromCookie(cookieName, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromCookie(cookieName);\n    });\n}\n/**\n * Specify the Snowplow collector URL. Specific http or https to force it\n * or leave it off to match the website protocol.\n *\n * @param collectorUrl - The collector URL, with or without protocol\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCollectorUrl(collectorUrl, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCollectorUrl(collectorUrl);\n    });\n}\n/**\n * Set the buffer size\n * Can be useful if you want to stop batching requests to ensure events start\n * sending closer to event creation\n *\n * @param newBufferSize - The value with which to update the bufferSize to\n * @param trackers - The tracker identifiers which will be flushed\n */\nfunction setBufferSize(newBufferSize, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setBufferSize(newBufferSize);\n    });\n}\n/**\n * Send all events in the outQueue\n * Only need to use this when sending events with a bufferSize of at least 2\n *\n * @param configuration - The configuration to use following flushing the buffer\n * @param trackers - The tracker identifiers which will be flushed\n */\nfunction flushBuffer(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.flushBuffer(configuration);\n    });\n}\n/**\n * Track a visit to a web page\n *\n * @param event - The Page View Event properties\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackPageView(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.trackPageView(event);\n    });\n}\n/**\n * Track a structured event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - The Structured Event properties\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackStructEvent(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.track(buildStructEvent(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track a self-describing event happening on this page.\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackSelfDescribingEvent(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.track(buildSelfDescribingEvent({ event: event.event }), event.context, event.timestamp);\n    });\n}\n/**\n * All provided contexts will be sent with every event\n *\n * @param contexts - An array of contexts or conditional contexts\n * @param trackers - The tracker identifiers which the global contexts will be added to\n */\nfunction addGlobalContexts(contexts, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.addGlobalContexts(contexts);\n    });\n}\n/**\n * All provided contexts will no longer be sent with every event\n *\n * @param contexts - An array of contexts or conditional contexts\n * @param trackers - The tracker identifiers which the global contexts will be remove from\n */\nfunction removeGlobalContexts(contexts, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.removeGlobalContexts(contexts);\n    });\n}\n/**\n * Clear all global contexts that are sent with events\n *\n * @param trackers - The tracker identifiers which the global contexts will be cleared from\n */\nfunction clearGlobalContexts(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.clearGlobalContexts();\n    });\n}\n/**\n * Stop regenerating `pageViewId` (available from `web_page` context)\n *\n * @param trackers - The tracker identifiers which the event will preserve their Page View Ids\n */\nfunction preservePageViewId(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.preservePageViewId();\n    });\n}\n/**\n * Disables anonymous tracking if active (ie. tracker initialized with `anonymousTracking`)\n * For stateStorageStrategy override, uses supplied value first,\n * falls back to one defined in initial config, otherwise uses cookieAndLocalStorage.\n *\n * @param configuration - The configuration for disabling anonymous tracking\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction disableAnonymousTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableAnonymousTracking(configuration);\n    });\n}\n/**\n * Enables anonymous tracking (ie. tracker initialized without `anonymousTracking`)\n *\n * @param configuration - The configuration for enabling anonymous tracking\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction enableAnonymousTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableAnonymousTracking(configuration);\n    });\n}\n/**\n * Clears all cookies and local storage containing user and session identifiers\n *\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction clearUserData(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.clearUserData(configuration);\n    });\n}\n/**\n * Add a plugin into the plugin collection after trackers have already been initialised\n *\n * @param configuration - The plugin to add\n * @param trackers - The tracker identifiers which the plugin will be added to\n */\nfunction addPlugin(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.addPlugin(configuration);\n    });\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar state = typeof window !== 'undefined' ? createSharedState() : undefined;\n/**\n * Initialise a new tracker\n *\n * @param trackerId - The tracker id - also known as tracker namespace\n * @param endpoint - Collector endpoint in the form collector.mysite.com\n * @param configuration - The initialisation options of the tracker\n */\nfunction newTracker(trackerId, endpoint, configuration) {\n    if (configuration === void 0) { configuration = {}; }\n    if (state) {\n        return addTracker(trackerId, trackerId, \"js-\".concat(version), endpoint, state, configuration);\n    }\n    else {\n        return undefined;\n    }\n}\n\nexport { addGlobalContexts, addPlugin, clearGlobalContexts, clearUserData, crossDomainLinker, disableActivityTracking, disableActivityTrackingCallback, disableAnonymousTracking, discardBrace, discardHashTag, enableActivityTracking, enableActivityTrackingCallback, enableAnonymousTracking, flushBuffer, newSession, newTracker, preservePageViewId, removeGlobalContexts, setBufferSize, setCollectorUrl, setCookiePath, setCustomUrl, setDocumentTitle, setOptOutCookie, setReferrerUrl, setUserId, setUserIdFromCookie, setUserIdFromLocation, setUserIdFromReferrer, setVisitorCookieTimeout, trackPageView, trackSelfDescribingEvent, trackStructEvent, updatePageActivity };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Ad tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { buildAdImpression, buildAdClick, buildAdConversion } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\n/**\n * Adds advertisement tracking functions\n */\nfunction AdTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Track an ad being served\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackAdImpression(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildAdImpression(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track an ad being clicked\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackAdClick(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildAdClick(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track an ad conversion event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackAdConversion(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildAdConversion(event), event.context, event.timestamp);\n    });\n}\n\nexport { AdTrackingPlugin, trackAdClick, trackAdConversion, trackAdImpression };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches Client Hints to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nvar uaClientHints;\n/**\n * This function makes sure that the expected array is returned as an array instead of an object.\n * It handles a problem that in some cases the `navigator.userAgentData.brands` was returned as an object instead of array.\n */\nfunction forceArray(array) {\n    if (Array.isArray(array))\n        return array;\n    if (Object.prototype.toString.call(array) === '[object Object]') {\n        return Object.keys(array).map(function (e) {\n            return array[e];\n        });\n    }\n    return [];\n}\n/**\n * Returns the client-hints brands, ensuring no additional properties.\n */\nfunction getBrands(brands) {\n    return brands.map(function (b) {\n        var brand = b.brand, version = b.version;\n        return { brand: brand, version: version };\n    });\n}\n/**\n * Validates whether userAgentData is compliant to the client-hints interface.\n * https://wicg.github.io/ua-client-hints/#interface\n */\nfunction validClientHints(hints) {\n    if (!hints || typeof hints.isMobile !== 'boolean' || !Array.isArray(hints.brands)) {\n        return false;\n    }\n    if (hints.brands.length === 0 ||\n        hints.brands.some(function (brand) { return typeof brand.brand !== 'string' || typeof brand.version !== 'string'; })) {\n        return false;\n    }\n    return true;\n}\n/**\n * Attaches Client Hint information where available\n * @param includeHighEntropy - Should high entropy values be included\n */\nfunction ClientHintsPlugin(includeHighEntropy) {\n    var populateClientHints = function () {\n        var navigatorAlias = navigator;\n        var uaData = navigatorAlias.userAgentData;\n        if (uaData) {\n            var candidateHints_1;\n            candidateHints_1 = {\n                isMobile: uaData.mobile,\n                brands: getBrands(forceArray(uaData.brands))\n            };\n            if (includeHighEntropy && uaData.getHighEntropyValues) {\n                uaData\n                    .getHighEntropyValues(['platform', 'platformVersion', 'architecture', 'model', 'uaFullVersion'])\n                    .then(function (res) {\n                    candidateHints_1.architecture = res.architecture;\n                    candidateHints_1.model = res.model;\n                    candidateHints_1.platform = res.platform;\n                    candidateHints_1.uaFullVersion = res.uaFullVersion;\n                    candidateHints_1.platformVersion = res.platformVersion;\n                });\n            }\n            if (validClientHints(candidateHints_1)) {\n                uaClientHints = candidateHints_1;\n            }\n        }\n    };\n    return {\n        activateBrowserPlugin: function () {\n            if (!uaClientHints) {\n                populateClientHints();\n            }\n        },\n        contexts: function () {\n            if (uaClientHints) {\n                return [\n                    {\n                        schema: 'iglu:org.ietf/http_client_hints/jsonschema/1-0-0',\n                        data: uaClientHints\n                    },\n                ];\n            }\n            return [];\n        }\n    };\n}\n\nexport { ClientHintsPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Consent and GDPR data for Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { buildConsentGranted, buildConsentWithdrawn } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar gdprBasis;\n(function (gdprBasis) {\n    gdprBasis[\"consent\"] = \"consent\";\n    gdprBasis[\"contract\"] = \"contract\";\n    gdprBasis[\"legalObligation\"] = \"legal_obligation\";\n    gdprBasis[\"vitalInterests\"] = \"vital_interests\";\n    gdprBasis[\"publicTask\"] = \"public_task\";\n    gdprBasis[\"legitimateInterests\"] = \"legitimate_interests\";\n})(gdprBasis || (gdprBasis = {}));\nvar _trackers = {};\nvar _context = {};\nvar LOG;\n/**\n * The Consent Plugin\n *\n * Adds Consent Granted and Withdrawn events\n * and the ability to add the GDPR context to events\n */\nfunction ConsentPlugin() {\n    var trackerId;\n    return {\n        activateBrowserPlugin: function (tracker) {\n            trackerId = tracker.id;\n            _trackers[tracker.id] = tracker;\n        },\n        contexts: function () {\n            if (_context[trackerId]) {\n                return [\n                    {\n                        schema: 'iglu:com.snowplowanalytics.snowplow/gdpr/jsonschema/1-0-0',\n                        data: _context[trackerId]\n                    },\n                ];\n            }\n            return [];\n        },\n        logger: function (logger) {\n            LOG = logger;\n        }\n    };\n}\n/**\n * Enable the GDPR context for each event\n * @param configuration - the configuration for the GDPR context\n * @param trackers - The tracker identifiers which should have the GDPR context enabled\n */\nfunction enableGdprContext(configuration, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var basisForProcessing = configuration.basisForProcessing, documentId = configuration.documentId, documentVersion = configuration.documentVersion, documentDescription = configuration.documentDescription;\n    var basis = gdprBasis[basisForProcessing];\n    if (!basis) {\n        LOG.warn('enableGdprContext: basisForProcessing must be one of: consent, contract, legalObligation, vitalInterests, publicTask, legitimateInterests');\n        return;\n    }\n    else {\n        trackers.forEach(function (t) {\n            if (_trackers[t]) {\n                _context[t] = {\n                    basisForProcessing: basis,\n                    documentId: documentId !== null && documentId !== void 0 ? documentId : null,\n                    documentVersion: documentVersion !== null && documentVersion !== void 0 ? documentVersion : null,\n                    documentDescription: documentDescription !== null && documentDescription !== void 0 ? documentDescription : null\n                };\n            }\n        });\n    }\n}\n/**\n * Track a consent granted action\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackConsentGranted(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        var builtEvent = buildConsentGranted(event);\n        t.core.track(builtEvent.event, event.context ? event.context.concat(builtEvent.context) : builtEvent.context, event.timestamp);\n    });\n}\n/**\n * Track a consent withdrawn action\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackConsentWithdrawn(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        var builtEvent = buildConsentWithdrawn(event);\n        t.core.track(builtEvent.event, event.context ? event.context.concat(builtEvent.context) : builtEvent.context, event.timestamp);\n    });\n}\n\nexport { ConsentPlugin, enableGdprContext, gdprBasis, trackConsentGranted, trackConsentWithdrawn };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Ecommerce tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { buildEcommerceTransaction, buildEcommerceTransactionItem, buildAddToCart, buildRemoveFromCart } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nfunction ecommerceTransactionTemplate() {\n    return {\n        items: []\n    };\n}\nvar _trackers = {};\nvar _transactions = {};\n/**\n * Adds ecommerce and cart tracking\n */\nfunction EcommercePlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n            _transactions[tracker.id] = ecommerceTransactionTemplate();\n        }\n    };\n}\n/**\n * Track an ecommerce transaction\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction addTrans(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (t) {\n        if (_transactions[t]) {\n            _transactions[t].transaction = event;\n        }\n    });\n}\n/**\n * Track an ecommerce transaction item\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction addItem(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (t) {\n        if (_transactions[t]) {\n            _transactions[t].items.push(event);\n        }\n    });\n}\n/**\n * Commit the ecommerce transaction\n *\n * @remarks\n * This call will send the data specified with addTrans, ddItem methods to the tracking server.\n */\nfunction trackTrans(trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        var transaction = _transactions[t.id].transaction;\n        if (transaction) {\n            t.core.track(buildEcommerceTransaction(transaction), transaction.context, transaction.timestamp);\n        }\n        for (var i = 0; i < _transactions[t.id].items.length; i++) {\n            var item = _transactions[t.id].items[i];\n            t.core.track(buildEcommerceTransactionItem(item), item.context, item.timestamp);\n        }\n        _transactions[t.id] = ecommerceTransactionTemplate();\n    });\n}\n/**\n * Track an add-to-cart event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackAddToCart(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildAddToCart(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track a remove-from-cart event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackRemoveFromCart(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildRemoveFromCart(event), event.context, event.timestamp);\n    });\n}\n\nexport { EcommercePlugin, addItem, addTrans, trackAddToCart, trackRemoveFromCart, trackTrans };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Enhanced Ecommerce tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection, parseAndValidateFloat, parseAndValidateInt } from '@snowplow/browser-tracker-core';\nimport { buildSelfDescribingEvent } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nvar _context = {};\n/**\n * For tracking GA Enhanced Ecommerce events and contexts\n * {@link https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce}\n */\nfunction EnhancedEcommercePlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n            _context[tracker.id] = [];\n        }\n    };\n}\n/**\n * Track a GA Enhanced Ecommerce Action with all stored\n * Enhanced Ecommerce contexts\n *\n * @param event\n * @param trackers\n */\nfunction trackEnhancedEcommerceAction(event, trackers) {\n    if (event === void 0) { event = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        var combinedContexts = _context[t.id].concat(event.context || []);\n        _context[t.id].length = 0;\n        t.core.track(buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.google.analytics.enhanced-ecommerce/action/jsonschema/1-0-0',\n                data: {\n                    action: event.action\n                }\n            }\n        }), combinedContexts, event.timestamp);\n    });\n}\n/**\n * Adds a GA Enhanced Ecommerce Action Context\n *\n * @param context - The context to be stored\n * @param trackers - The tracker identifiers which the context will be stored against\n */\nfunction addEnhancedEcommerceActionContext(context, trackers) {\n    if (context === void 0) { context = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var id = context.id, affiliation = context.affiliation, revenue = context.revenue, tax = context.tax, shipping = context.shipping, coupon = context.coupon, list = context.list, step = context.step, option = context.option, currency = context.currency;\n    trackers.forEach(function (trackerId) {\n        if (_context[trackerId]) {\n            _context[trackerId].push({\n                schema: 'iglu:com.google.analytics.enhanced-ecommerce/actionFieldObject/jsonschema/1-0-0',\n                data: {\n                    id: id,\n                    affiliation: affiliation,\n                    revenue: parseAndValidateFloat(revenue),\n                    tax: parseAndValidateFloat(tax),\n                    shipping: parseAndValidateFloat(shipping),\n                    coupon: coupon,\n                    list: list,\n                    step: parseAndValidateInt(step),\n                    option: option,\n                    currency: currency\n                }\n            });\n        }\n    });\n}\n/**\n * Adds a GA Enhanced Ecommerce Impression Context\n *\n * @param context - The context to be stored\n * @param trackers - The tracker identifiers which the context will be stored against\n */\nfunction addEnhancedEcommerceImpressionContext(context, trackers) {\n    if (context === void 0) { context = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var id = context.id, name = context.name, list = context.list, brand = context.brand, category = context.category, variant = context.variant, position = context.position, price = context.price, currency = context.currency;\n    trackers.forEach(function (trackerId) {\n        if (_context[trackerId]) {\n            _context[trackerId].push({\n                schema: 'iglu:com.google.analytics.enhanced-ecommerce/impressionFieldObject/jsonschema/1-0-0',\n                data: {\n                    id: id,\n                    name: name,\n                    list: list,\n                    brand: brand,\n                    category: category,\n                    variant: variant,\n                    position: parseAndValidateInt(position),\n                    price: parseAndValidateFloat(price),\n                    currency: currency\n                }\n            });\n        }\n    });\n}\n/**\n * Adds a GA Enhanced Ecommerce Product Context\n *\n * @param context - The context to be stored\n * @param trackers - The tracker identifiers which the context will be stored against\n */\nfunction addEnhancedEcommerceProductContext(context, trackers) {\n    if (context === void 0) { context = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var id = context.id, name = context.name, list = context.list, brand = context.brand, category = context.category, variant = context.variant, price = context.price, quantity = context.quantity, coupon = context.coupon, position = context.position, currency = context.currency;\n    trackers.forEach(function (trackerId) {\n        if (_context[trackerId]) {\n            _context[trackerId].push({\n                schema: 'iglu:com.google.analytics.enhanced-ecommerce/productFieldObject/jsonschema/1-0-0',\n                data: {\n                    id: id,\n                    name: name,\n                    list: list,\n                    brand: brand,\n                    category: category,\n                    variant: variant,\n                    price: parseAndValidateFloat(price),\n                    quantity: parseAndValidateInt(quantity),\n                    coupon: coupon,\n                    position: parseAndValidateInt(position),\n                    currency: currency\n                }\n            });\n        }\n    });\n}\n/**\n * Adds a GA Enhanced Ecommerce Promo Context\n *\n * @param context - The context to be stored\n * @param trackers - The tracker identifiers which the context will be stored against\n */\nfunction addEnhancedEcommercePromoContext(context, trackers) {\n    if (context === void 0) { context = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var id = context.id, name = context.name, creative = context.creative, position = context.position, currency = context.currency;\n    trackers.forEach(function (trackerId) {\n        if (_context[trackerId]) {\n            _context[trackerId].push({\n                schema: 'iglu:com.google.analytics.enhanced-ecommerce/promoFieldObject/jsonschema/1-0-0',\n                data: {\n                    id: id,\n                    name: name,\n                    creative: creative,\n                    position: position,\n                    currency: currency\n                }\n            });\n        }\n    });\n}\n\nexport { EnhancedEcommercePlugin, addEnhancedEcommerceActionContext, addEnhancedEcommerceImpressionContext, addEnhancedEcommerceProductContext, addEnhancedEcommercePromoContext, trackEnhancedEcommerceAction };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Error tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection, addEventListener, isFunction } from '@snowplow/browser-tracker-core';\nimport { buildSelfDescribingEvent } from '@snowplow/tracker-core';\n\n/**\n * Truncate string if it's longer than 8192 chars\n *\n * @param string - The stack trace to truncate\n * @param maxLength - The maximum length of the truncated string. Default = 8192\n * @returns The truncated string\n */\nfunction truncateString(string, maxLength) {\n    if (maxLength === void 0) { maxLength = 8192; }\n    if (string && string.length > maxLength) {\n        var truncatedString = string.substring(0, maxLength);\n        return truncatedString;\n    }\n    return string;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nfunction ErrorTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Send error as self-describing event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackError(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var message = event.message, filename = event.filename, lineno = event.lineno, colno = event.colno, error = event.error, context = event.context, timestamp = event.timestamp, stack = error && truncateString(error.stack, 8192), truncatedMessage = message && truncateString(message, 2048);\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1',\n                data: {\n                    programmingLanguage: 'JAVASCRIPT',\n                    message: truncatedMessage !== null && truncatedMessage !== void 0 ? truncatedMessage : \"JS Exception. Browser doesn't support ErrorEvent API\",\n                    stackTrace: stack,\n                    lineNumber: lineno,\n                    lineColumn: colno,\n                    fileName: filename\n                }\n            }\n        }), context, timestamp);\n    });\n}\n/**\n * Enable automatic error tracking, added event handler for 'error' event on window\n * @param configuration - The error tracking configuration\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction enableErrorTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var filter = configuration.filter, contextAdder = configuration.contextAdder, context = configuration.context, captureError = function (errorEvent) {\n        if ((filter && isFunction(filter) && filter(errorEvent)) || filter == null) {\n            sendError({ errorEvent: errorEvent, commonContext: context, contextAdder: contextAdder }, trackers);\n        }\n    };\n    addEventListener(window, 'error', captureError, true);\n}\nfunction sendError(_a, trackers) {\n    var errorEvent = _a.errorEvent, commonContext = _a.commonContext, contextAdder = _a.contextAdder;\n    var context = commonContext || [];\n    if (contextAdder && isFunction(contextAdder)) {\n        context = context.concat(contextAdder(errorEvent));\n    }\n    trackError({\n        message: errorEvent.message,\n        filename: errorEvent.filename,\n        lineno: errorEvent.lineno,\n        colno: errorEvent.colno,\n        error: errorEvent.error,\n        context: context\n    }, trackers);\n}\n\nexport { ErrorTrackingPlugin, enableErrorTracking, trackError };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Form tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { addEventListener, getCssClasses, getFilterByClass, getFilterByName } from '@snowplow/browser-tracker-core';\nimport { buildFormFocusOrChange, resolveDynamicContext, buildFormSubmission } from '@snowplow/tracker-core';\n\n/** Events to capture in form tracking */\nvar FormTrackingEvent;\n(function (FormTrackingEvent) {\n    /** Form field changed event */\n    FormTrackingEvent[\"CHANGE_FORM\"] = \"change_form\";\n    /** Form field focused event */\n    FormTrackingEvent[\"FOCUS_FORM\"] = \"focus_form\";\n    /** Form submitted event */\n    FormTrackingEvent[\"SUBMIT_FORM\"] = \"submit_form\";\n})(FormTrackingEvent || (FormTrackingEvent = {}));\nvar defaultFormTrackingEvents = [\n    FormTrackingEvent.CHANGE_FORM,\n    FormTrackingEvent.FOCUS_FORM,\n    FormTrackingEvent.SUBMIT_FORM,\n];\nvar innerElementTags = ['textarea', 'input', 'select'];\nvar defaultTransformFn = function (x) { return x; };\n/*\n * Add submission event listeners to all form elements\n * Add value change event listeners to all mutable inner form elements\n */\nfunction addFormListeners(tracker, configuration) {\n    var _a;\n    var options = configuration.options, context = configuration.context, trackingMarker = tracker.id + 'form', config = getConfigurationForOptions(options);\n    var forms = (_a = config.forms) !== null && _a !== void 0 ? _a : document.getElementsByTagName('form');\n    Array.prototype.slice.call(forms).forEach(function (form) {\n        if (config.formFilter(form)) {\n            Array.prototype.slice.call(innerElementTags).forEach(function (tagname) {\n                Array.prototype.slice\n                    .call(form.getElementsByTagName(tagname))\n                    .forEach(function (innerElement) {\n                    if (config.fieldFilter(innerElement) &&\n                        !innerElement[trackingMarker] &&\n                        innerElement.type.toLowerCase() !== 'password') {\n                        if (config.eventFilter(FormTrackingEvent.FOCUS_FORM)) {\n                            addEventListener(innerElement, 'focus', getFormChangeListener(tracker, config, 'focus_form', context), false);\n                        }\n                        if (config.eventFilter(FormTrackingEvent.CHANGE_FORM)) {\n                            addEventListener(innerElement, 'change', getFormChangeListener(tracker, config, 'change_form', context), false);\n                        }\n                        innerElement[trackingMarker] = true;\n                    }\n                });\n            });\n            if (!form[trackingMarker]) {\n                if (config.eventFilter(FormTrackingEvent.SUBMIT_FORM)) {\n                    addEventListener(form, 'submit', getFormSubmissionListener(tracker, config, trackingMarker, context));\n                }\n                form[trackingMarker] = true;\n            }\n        }\n    });\n}\n/**\n * Check if forms array is a collection of HTML form elements or a filter or undefined\n */\nfunction isCollectionOfHTMLFormElements(forms) {\n    return forms != null && Array.prototype.slice.call(forms).length > 0;\n}\n/*\n * Configures form tracking: which forms and fields will be tracked, and the context to attach\n */\nfunction getConfigurationForOptions(options) {\n    if (options) {\n        var formFilter = function (_) { return true; };\n        var forms = null;\n        if (isCollectionOfHTMLFormElements(options.forms)) {\n            // options.forms is a collection of HTML form elements\n            forms = options.forms;\n        }\n        else {\n            // options.forms is null or a filter\n            formFilter = getFilterByClass(options.forms);\n        }\n        return {\n            forms: forms,\n            formFilter: formFilter,\n            fieldFilter: getFilterByName(options.fields),\n            fieldTransform: getTransform(options.fields),\n            eventFilter: function (event) { var _a; return ((_a = options.events) !== null && _a !== void 0 ? _a : defaultFormTrackingEvents).indexOf(event) > -1; }\n        };\n    }\n    else {\n        return {\n            forms: null,\n            formFilter: function () { return true; },\n            fieldFilter: function () { return true; },\n            fieldTransform: defaultTransformFn,\n            eventFilter: function () { return true; }\n        };\n    }\n}\n/**\n * Convert a criterion object to a transform function\n *\n * @param object - criterion {transform: function (elt) {return the result of transform function applied to element}\n */\nfunction getTransform(criterion) {\n    if (criterion && Object.prototype.hasOwnProperty.call(criterion, 'transform')) {\n        return criterion.transform;\n    }\n    return defaultTransformFn;\n}\n/*\n * Get an identifier for a form, input, textarea, or select element\n */\nfunction getElementIdentifier(elt) {\n    var properties = ['name', 'id', 'type', 'nodeName'];\n    for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n        var propName = properties_1[_i];\n        if (elt[propName] != false && typeof elt[propName] === 'string') {\n            return elt[propName];\n        }\n    }\n    return null;\n}\n/*\n * Identifies the parent form in which an element is contained\n */\nfunction getParentFormIdentifier(elt) {\n    while (elt && elt.nodeName && elt.nodeName.toUpperCase() !== 'HTML' && elt.nodeName.toUpperCase() !== 'FORM') {\n        elt = elt.parentNode;\n    }\n    if (elt && elt.nodeName && elt.nodeName.toUpperCase() === 'FORM') {\n        return getElementIdentifier(elt);\n    }\n    return null;\n}\n/*\n * Returns a list of the input, textarea, and select elements inside a form along with their values\n */\nfunction getInnerFormElements(trackingMarker, elt) {\n    var innerElements = [];\n    Array.prototype.slice.call(innerElementTags).forEach(function (tagname) {\n        var trackedChildren = Array.prototype.slice.call(elt.getElementsByTagName(tagname)).filter(function (child) {\n            return child.hasOwnProperty(trackingMarker);\n        });\n        Array.prototype.slice.call(trackedChildren).forEach(function (child) {\n            if (child.type === 'submit') {\n                return;\n            }\n            var elementJson = {\n                elementData: {\n                    name: getElementIdentifier(child),\n                    value: child.value,\n                    nodeName: child.nodeName\n                },\n                originalElement: child\n            };\n            if (child.type && child.nodeName.toUpperCase() === 'INPUT') {\n                elementJson.elementData.type = child.type;\n            }\n            if ((child.type === 'checkbox' || child.type === 'radio') && !child.checked) {\n                elementJson.elementData.value = null;\n            }\n            innerElements.push(elementJson);\n        });\n    });\n    return innerElements;\n}\n/*\n * Return function to handle form field change event\n */\nfunction getFormChangeListener(tracker, config, event_type, context) {\n    return function (e) {\n        var _a, _b;\n        var elt = e.target;\n        if (elt) {\n            var type = elt.nodeName && elt.nodeName.toUpperCase() === 'INPUT' ? elt.type : null;\n            var value = elt.type === 'checkbox' && !elt.checked\n                ? null\n                : config.fieldTransform(elt.value, elt, elt);\n            if (event_type === 'change_form' || (type !== 'checkbox' && type !== 'radio')) {\n                tracker.core.track(buildFormFocusOrChange({\n                    schema: event_type,\n                    formId: (_a = getParentFormIdentifier(elt)) !== null && _a !== void 0 ? _a : '',\n                    elementId: (_b = getElementIdentifier(elt)) !== null && _b !== void 0 ? _b : '',\n                    nodeName: elt.nodeName,\n                    type: type,\n                    elementClasses: getCssClasses(elt),\n                    value: value !== null && value !== void 0 ? value : null\n                }), resolveDynamicContext(context, elt, type, value));\n            }\n        }\n    };\n}\n/*\n * Return function to handle form submission event\n */\nfunction getFormSubmissionListener(tracker, config, trackingMarker, context) {\n    return function (e) {\n        var _a;\n        var elt = e.target;\n        var innerElements = getInnerFormElements(trackingMarker, elt);\n        innerElements.forEach(function (innerElement) {\n            var _a;\n            var eltData = innerElement.elementData;\n            eltData.value = (_a = config.fieldTransform(eltData.value, eltData, innerElement.originalElement)) !== null && _a !== void 0 ? _a : eltData.value;\n        });\n        var elementsData = innerElements.map(function (elt) { return elt.elementData; });\n        tracker.core.track(buildFormSubmission({\n            formId: (_a = getElementIdentifier(elt)) !== null && _a !== void 0 ? _a : '',\n            formClasses: getCssClasses(elt),\n            elements: elementsData\n        }), resolveDynamicContext(context, elt, elementsData));\n    };\n}\n\nvar _trackers = {};\n/**\n * A plugin which enabled automatic form tracking\n */\nfunction FormTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Enables automatic form tracking\n * An event will be fired when a form field is changed or a form submitted.\n * This can be called multiple times: only forms not already tracked will be tracked.\n *\n * @param configuration - The form tracking configuration\n * @param trackers - The tracker identifiers which the events will be sent to\n */\nfunction enableFormTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (t) {\n        if (_trackers[t]) {\n            if (_trackers[t].sharedState.hasLoaded) {\n                addFormListeners(_trackers[t], configuration);\n            }\n            else {\n                _trackers[t].sharedState.registeredOnLoadHandlers.push(function () {\n                    addFormListeners(_trackers[t], configuration);\n                });\n            }\n        }\n    });\n}\n\nexport { FormTrackingPlugin, enableFormTracking };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches GA cookie data to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __assign, __spreadArray } from 'tslib';\nimport { cookie } from '@snowplow/browser-tracker-core';\n\nvar UNIVERSAL_ANALYTICS_COOKIES_SCHEMA = 'iglu:com.google.analytics/cookies/jsonschema/1-0-0';\nvar GOOGLE_ANALYTICS_4_COOKIES_SCHEMA = 'iglu:com.google.ga4/cookies/jsonschema/1-0-0';\n\nvar defaultPluginOptions = {\n    ua: true,\n    ga4: false,\n    ga4MeasurementId: '',\n    cookiePrefix: []\n};\n/**\n * Captures the GA cookies on a page and sends as context on each event\n * @param pluginOptions.ua - Send Universal Analytics specific cookie values.\n * @param pluginOptions.ga4 - Send Google Analytics 4 specific cookie values.\n * @param pluginOptions.ga4MeasurementId - Measurement id/ids to search the Google Analytics 4 session cookie. Can be a single measurement id as a string or an array of measurement id strings. The cookie has the form of _ga_<container-id> where <container-id> is the data stream container id.\n * @param pluginOptions.cookiePrefix - Cookie prefix set on the Google Analytics 4 cookies using the cookie_prefix option of the gtag.js tracker.\n */\nfunction GaCookiesPlugin(pluginOptions) {\n    if (pluginOptions === void 0) { pluginOptions = defaultPluginOptions; }\n    return {\n        contexts: function () {\n            var contexts = [];\n            var _a = __assign(__assign({}, defaultPluginOptions), pluginOptions), ga4 = _a.ga4, ga4MeasurementId = _a.ga4MeasurementId, ua = _a.ua, cookiePrefix = _a.cookiePrefix;\n            var GA_USER_COOKIE = '_ga';\n            var GA4_MEASUREMENT_ID_PREFIX = 'G-';\n            var GA4_COOKIE_PREFIX = '_ga_';\n            if (ua) {\n                var uaCookiesContext_1 = {\n                    schema: UNIVERSAL_ANALYTICS_COOKIES_SCHEMA,\n                    data: {}\n                };\n                ['__utma', '__utmb', '__utmc', '__utmv', '__utmz', GA_USER_COOKIE].forEach(function (cookieType) {\n                    var value = cookie(cookieType);\n                    if (value) {\n                        uaCookiesContext_1.data[cookieType] = value;\n                    }\n                });\n                contexts.push(uaCookiesContext_1);\n            }\n            if (ga4) {\n                var cookiePrefixes = Array.isArray(cookiePrefix) ? __spreadArray([], cookiePrefix, true) : [cookiePrefix];\n                /* We also will search for the default (no prefix) in every case. */\n                cookiePrefixes.unshift('');\n                cookiePrefixes.forEach(function (prefix) {\n                    var userCookie = cookie(prefix + GA_USER_COOKIE);\n                    var sessionCookies = [];\n                    if (ga4MeasurementId) {\n                        var measurementIdentifiers = Array.isArray(ga4MeasurementId) ? __spreadArray([], ga4MeasurementId, true) : [ga4MeasurementId];\n                        measurementIdentifiers.forEach(function (cookieIdentifier) {\n                            var sessionCookieValue = cookie(prefix + cookieIdentifier.replace(GA4_MEASUREMENT_ID_PREFIX, GA4_COOKIE_PREFIX));\n                            if (sessionCookieValue) {\n                                sessionCookies.push({\n                                    measurement_id: cookieIdentifier,\n                                    session_cookie: sessionCookieValue\n                                });\n                            }\n                        });\n                    }\n                    if (!userCookie && !sessionCookies.length) {\n                        return;\n                    }\n                    var ga4CookiesContext = {\n                        schema: GOOGLE_ANALYTICS_4_COOKIES_SCHEMA,\n                        data: {\n                            _ga: userCookie,\n                            session_cookies: sessionCookies.length ? sessionCookies : undefined,\n                            cookie_prefix: prefix || undefined\n                        }\n                    };\n                    contexts.push(ga4CookiesContext);\n                });\n            }\n            return contexts;\n        }\n    };\n}\n\nexport { GaCookiesPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches Geolocation data to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nvar geolocation, geolocationContextAdded = false;\n/**\n * Captures the geolocation information from the users browser\n * The geolocation will be cached and will be only be requested once\n * @param enableAtLoad - Should the geolocation context be populated immediately\n *\n * @remarks\n * Enabling this will produce a popup for the user asking for permission to read their location information\n */\nfunction GeolocationPlugin(enableAtLoad) {\n    if (enableAtLoad === void 0) { enableAtLoad = false; }\n    var trackerId;\n    return {\n        activateBrowserPlugin: function (tracker) {\n            trackerId = tracker.id;\n            _trackers[tracker.id] = [false, undefined];\n            if (enableAtLoad) {\n                enableGeolocationContext([trackerId]);\n            }\n        },\n        contexts: function () {\n            var _a;\n            var context = (_a = _trackers[trackerId]) === null || _a === void 0 ? void 0 : _a[1];\n            if (context) {\n                return [context];\n            }\n            return [];\n        }\n    };\n}\n/**\n * Attempts to create a context using the geolocation API\n *\n * @param trackers - The tracker identifiers which the context will be sent to\n */\nfunction enableGeolocationContext(trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var navigatorAlias = navigator;\n    trackers.forEach(function (t) {\n        //Mark as enabled\n        _trackers[t] = [true, geolocation]; // Geolocation might still be undefined but it could also be set already\n    });\n    if (!geolocationContextAdded && navigatorAlias.geolocation && navigatorAlias.geolocation.getCurrentPosition) {\n        geolocationContextAdded = true;\n        navigatorAlias.geolocation.getCurrentPosition(function (position) {\n            var coords = position.coords;\n            geolocation = {\n                schema: 'iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0',\n                data: {\n                    latitude: coords.latitude,\n                    longitude: coords.longitude,\n                    latitudeLongitudeAccuracy: coords.accuracy,\n                    altitude: coords.altitude,\n                    altitudeAccuracy: coords.altitudeAccuracy,\n                    bearing: coords.heading,\n                    speed: coords.speed,\n                    timestamp: Math.round(position.timestamp)\n                }\n            };\n            // Ensure all trackers with geolocation enabled have the context set\n            for (var key in _trackers) {\n                if (Object.prototype.hasOwnProperty.call(_trackers, key) && _trackers[key][0]) {\n                    _trackers[key] = [true, geolocation];\n                }\n            }\n        });\n    }\n}\n\nexport { GeolocationPlugin, enableGeolocationContext };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Link Click tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection, getFilterByClass, addEventListener, getHostName, getCssClasses } from '@snowplow/browser-tracker-core';\nimport { buildLinkClick, resolveDynamicContext } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nvar _configuration = {};\n/**\n * Link click tracking\n *\n * Will automatically tracking link clicks once enabled with 'enableLinkClickTracking'\n * or you can manually track link clicks with 'trackLinkClick'\n */\nfunction LinkClickTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Enable link click tracking\n *\n * @remarks\n * The default behaviour is to use actual click events. However, some browsers\n * (e.g., Firefox, Opera, and Konqueror) don't generate click events for the middle mouse button.\n *\n * To capture more \"clicks\", the pseudo click-handler uses mousedown + mouseup events.\n * This is not industry standard and is vulnerable to false positives (e.g., drag events).\n */\nfunction enableLinkClickTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (id) {\n        if (_trackers[id]) {\n            if (_trackers[id].sharedState.hasLoaded) {\n                // the load event has already fired, add the click listeners now\n                configureLinkClickTracking(configuration, id);\n                addClickListeners(id);\n            }\n            else {\n                // defer until page has loaded\n                _trackers[id].sharedState.registeredOnLoadHandlers.push(function () {\n                    configureLinkClickTracking(configuration, id);\n                    addClickListeners(id);\n                });\n            }\n        }\n    });\n}\n/**\n * Add click event listeners to links which have been added to the page since the\n * last time enableLinkClickTracking or refreshLinkClickTracking was used\n *\n * @param trackers - The tracker identifiers which the have their link click state refreshed\n */\nfunction refreshLinkClickTracking(trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (id) {\n        if (_trackers[id]) {\n            if (_trackers[id].sharedState.hasLoaded) {\n                addClickListeners(id);\n            }\n            else {\n                _trackers[id].sharedState.registeredOnLoadHandlers.push(function () {\n                    addClickListeners(id);\n                });\n            }\n        }\n    });\n}\n/**\n * Manually log a click\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackLinkClick(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildLinkClick(event), event.context, event.timestamp);\n    });\n}\n/*\n * Process clicks\n */\nfunction processClick(tracker, sourceElement, context) {\n    var parentElement, tag, elementId, elementClasses, elementTarget, elementContent;\n    while ((parentElement = sourceElement.parentElement) !== null &&\n        parentElement != null &&\n        (tag = sourceElement.tagName.toUpperCase()) !== 'A' &&\n        tag !== 'AREA') {\n        sourceElement = parentElement;\n    }\n    var anchorElement = sourceElement;\n    if (anchorElement.href != null) {\n        // browsers, such as Safari, don't downcase hostname and href\n        var originalSourceHostName = anchorElement.hostname || getHostName(anchorElement.href), sourceHostName = originalSourceHostName.toLowerCase(), sourceHref = anchorElement.href.replace(originalSourceHostName, sourceHostName), scriptProtocol = new RegExp('^(javascript|vbscript|jscript|mocha|livescript|ecmascript):', 'i');\n        // Ignore script pseudo-protocol links\n        if (!scriptProtocol.test(sourceHref)) {\n            elementId = anchorElement.id;\n            elementClasses = getCssClasses(anchorElement);\n            elementTarget = anchorElement.target;\n            elementContent = _configuration[tracker.id].linkTrackingContent ? anchorElement.innerHTML : undefined;\n            // decodeUrl %xx\n            sourceHref = unescape(sourceHref);\n            tracker.core.track(buildLinkClick({\n                targetUrl: sourceHref,\n                elementId: elementId,\n                elementClasses: elementClasses,\n                elementTarget: elementTarget,\n                elementContent: elementContent\n            }), resolveDynamicContext(context, sourceElement));\n        }\n    }\n}\n/*\n * Return function to handle click event\n */\nfunction getClickHandler(tracker, context) {\n    return function (evt) {\n        var button, target;\n        evt = evt || window.event;\n        button = evt.which || evt.button;\n        target = evt.target || evt.srcElement;\n        // Using evt.type (added in IE4), we avoid defining separate handlers for mouseup and mousedown.\n        if (evt.type === 'click') {\n            if (target) {\n                processClick(_trackers[tracker], target, context);\n            }\n        }\n        else if (evt.type === 'mousedown') {\n            if ((button === 1 || button === 2) && target) {\n                _configuration[tracker].lastButton = button;\n                _configuration[tracker].lastTarget = target;\n            }\n            else {\n                _configuration[tracker].lastButton = _configuration[tracker].lastTarget = null;\n            }\n        }\n        else if (evt.type === 'mouseup') {\n            if (button === _configuration[tracker].lastButton && target === _configuration[tracker].lastTarget) {\n                processClick(_trackers[tracker], target, context);\n            }\n            _configuration[tracker].lastButton = _configuration[tracker].lastTarget = null;\n        }\n    };\n}\n/*\n * Add click listener to a DOM element\n */\nfunction addClickListener(tracker, element) {\n    if (_configuration[tracker].linkTrackingPseudoClicks) {\n        // for simplicity and performance, we ignore drag events\n        addEventListener(element, 'mouseup', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n        addEventListener(element, 'mousedown', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n    }\n    else {\n        addEventListener(element, 'click', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n    }\n}\n/*\n * Configures link click tracking: how to filter which links will be tracked,\n * whether to use pseudo click tracking, and what context to attach to link_click events\n */\nfunction configureLinkClickTracking(_a, tracker) {\n    var _b = _a === void 0 ? {} : _a, options = _b.options, pseudoClicks = _b.pseudoClicks, trackContent = _b.trackContent, context = _b.context;\n    _configuration[tracker] = {\n        linkTrackingContent: trackContent,\n        linkTrackingContext: context,\n        linkTrackingPseudoClicks: pseudoClicks,\n        linkTrackingFilter: getFilterByClass(options)\n    };\n}\n/*\n * Add click handlers to anchor and AREA elements, except those to be ignored\n */\nfunction addClickListeners(trackerId) {\n    var _a, _b;\n    var linkElements = document.links, i;\n    for (i = 0; i < linkElements.length; i++) {\n        // Add a listener to link elements which pass the filter and aren't already tracked\n        if (((_b = (_a = _configuration[trackerId]).linkTrackingFilter) === null || _b === void 0 ? void 0 : _b.call(_a, linkElements[i])) && !linkElements[i][trackerId]) {\n            addClickListener(trackerId, linkElements[i]);\n            linkElements[i][trackerId] = true;\n        }\n    }\n}\n\nexport { LinkClickTrackingPlugin, enableLinkClickTracking, refreshLinkClickTracking, trackLinkClick };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches OptimizelyX data to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { parseAndValidateInt } from '@snowplow/browser-tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Adds Opimizely X context to events\n */\nfunction OptimizelyXPlugin() {\n    /**\n     * Check that *both* optimizely and optimizely.get exist\n     *\n     * @param property - optimizely data property\n     */\n    function getOptimizelyXData(property) {\n        var windowOptimizelyAlias = window.optimizely;\n        var data;\n        if (windowOptimizelyAlias && typeof windowOptimizelyAlias.get === 'function') {\n            data = windowOptimizelyAlias.get(property);\n        }\n        return data;\n    }\n    /**\n     * Get data for OptimizelyX contexts - active experiments on current page\n     *\n     * @returns Array content of lite optimizely lite context\n     */\n    function getOptimizelyXSummary() {\n        var state = getOptimizelyXData('state');\n        if (state == null)\n            return [];\n        var experiment_ids = state.getActiveExperimentIds() || [];\n        var variationMap = state.getVariationMap();\n        var visitor = getOptimizelyXData('visitor');\n        return experiment_ids.map(function (activeExperiment) {\n            var variation = variationMap[activeExperiment];\n            var variationName = (variation && variation.name && variation.name.toString()) || null;\n            var variationId = variation && variation.id;\n            var visitorId = (visitor && visitor.visitorId && visitor.visitorId.toString()) || null;\n            return {\n                experimentId: parseAndValidateInt(activeExperiment) || null,\n                variationName: variationName,\n                variation: parseAndValidateInt(variationId) || null,\n                visitorId: visitorId\n            };\n        });\n    }\n    /**\n     * Creates an OptimizelyX context containing only data required to join\n     * event to experiment data\n     *\n     * @returns Array of custom contexts\n     */\n    function getOptimizelyXSummaryContexts() {\n        return getOptimizelyXSummary().map(function (experiment) {\n            return {\n                schema: 'iglu:com.optimizely.optimizelyx/summary/jsonschema/1-0-0',\n                data: experiment\n            };\n        });\n    }\n    return {\n        contexts: function () {\n            // Add Optimizely Contexts\n            if (window.optimizely) {\n                return getOptimizelyXSummaryContexts();\n            }\n            return [];\n        }\n    };\n}\n\nexport { OptimizelyXPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches Performance Timing data to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Adds Performance Timing context to events\n *\n * @remarks\n * May not be fully populated when inital Page View fires\n * Often a good idea to take the latest performance timing context\n * for a given page view id when analysing in the warehouse\n */\nfunction PerformanceTimingPlugin() {\n    /**\n     * Creates a context from the window.performance.timing object\n     *\n     * @returns object PerformanceTiming context\n     */\n    function getPerformanceTimingContext() {\n        var windowAlias = window, performanceAlias = windowAlias.performance ||\n            windowAlias.mozPerformance ||\n            windowAlias.msPerformance ||\n            windowAlias.webkitPerformance, performanceTimingAlias = performanceAlias.timing;\n        if (performanceAlias) {\n            var performanceTiming = {\n                navigationStart: performanceTimingAlias.navigationStart,\n                redirectStart: performanceTimingAlias.redirectStart,\n                redirectEnd: performanceTimingAlias.redirectEnd,\n                fetchStart: performanceTimingAlias.fetchStart,\n                domainLookupStart: performanceTimingAlias.domainLookupStart,\n                domainLookupEnd: performanceTimingAlias.domainLookupEnd,\n                connectStart: performanceTimingAlias.connectStart,\n                secureConnectionStart: performanceTimingAlias.secureConnectionStart,\n                connectEnd: performanceTimingAlias.connectEnd,\n                requestStart: performanceTimingAlias.requestStart,\n                responseStart: performanceTimingAlias.responseStart,\n                responseEnd: performanceTimingAlias.responseEnd,\n                unloadEventStart: performanceTimingAlias.unloadEventStart,\n                unloadEventEnd: performanceTimingAlias.unloadEventEnd,\n                domLoading: performanceTimingAlias.domLoading,\n                domInteractive: performanceTimingAlias.domInteractive,\n                domContentLoadedEventStart: performanceTimingAlias.domContentLoadedEventStart,\n                domContentLoadedEventEnd: performanceTimingAlias.domContentLoadedEventEnd,\n                domComplete: performanceTimingAlias.domComplete,\n                loadEventStart: performanceTimingAlias.loadEventStart,\n                loadEventEnd: performanceTimingAlias.loadEventEnd,\n                msFirstPaint: performanceTimingAlias.msFirstPaint,\n                chromeFirstPaint: performanceTimingAlias.chromeFirstPaint,\n                requestEnd: performanceTimingAlias.requestEnd,\n                proxyStart: performanceTimingAlias.proxyStart,\n                proxyEnd: performanceTimingAlias.proxyEnd\n            };\n            return [\n                {\n                    schema: 'iglu:org.w3/PerformanceTiming/jsonschema/1-0-0',\n                    data: performanceTiming\n                },\n            ];\n        }\n        return [];\n    }\n    return {\n        contexts: function () { return getPerformanceTimingContext(); }\n    };\n}\n\nexport { PerformanceTimingPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Site tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { buildSocialInteraction, buildSiteSearch, buildSelfDescribingEvent } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nfunction SiteTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Track a social interaction event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackSocialInteraction(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildSocialInteraction(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track an internal search event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackSiteSearch(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildSiteSearch(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track a timing event (such as the time taken for a resource to load)\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackTiming(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var category = event.category, variable = event.variable, timing = event.timing, label = event.label, context = event.context, timestamp = event.timestamp;\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/timing/jsonschema/1-0-0',\n                data: {\n                    category: category,\n                    variable: variable,\n                    timing: timing,\n                    label: label\n                }\n            }\n        }), context, timestamp);\n    });\n}\n\nexport { SiteTrackingPlugin, trackSiteSearch, trackSocialInteraction, trackTiming };\n//# sourceMappingURL=index.module.js.map\n","/* jstz.min.js Version: 1.0.6 Build date: 2019-09-09 */\n!function(e){var a=function(){\"use strict\";var e=\"s\",s={DAY:864e5,HOUR:36e5,MINUTE:6e4,SECOND:1e3,BASELINE_YEAR:2014,MAX_SCORE:864e6,AMBIGUITIES:{\"America/Denver\":[\"America/Mazatlan\"],\"America/Chicago\":[\"America/Mexico_City\"],\"America/Asuncion\":[\"America/Campo_Grande\",\"America/Santiago\"],\"America/Montevideo\":[\"America/Sao_Paulo\",\"America/Santiago\"],\"Asia/Beirut\":[\"Asia/Amman\",\"Asia/Jerusalem\",\"Europe/Helsinki\",\"Asia/Damascus\",\"Africa/Cairo\",\"Asia/Gaza\",\"Europe/Minsk\",\"Africa/Windhoek\"],\"Pacific/Auckland\":[\"Pacific/Fiji\"],\"America/Los_Angeles\":[\"America/Santa_Isabel\"],\"America/New_York\":[\"America/Havana\"],\"America/Halifax\":[\"America/Goose_Bay\"],\"America/Godthab\":[\"America/Miquelon\"],\"Asia/Dubai\":[\"Asia/Yerevan\"],\"Asia/Jakarta\":[\"Asia/Krasnoyarsk\"],\"Asia/Shanghai\":[\"Asia/Irkutsk\",\"Australia/Perth\"],\"Australia/Sydney\":[\"Australia/Lord_Howe\"],\"Asia/Tokyo\":[\"Asia/Yakutsk\"],\"Asia/Dhaka\":[\"Asia/Omsk\"],\"Asia/Baku\":[\"Asia/Yerevan\"],\"Australia/Brisbane\":[\"Asia/Vladivostok\"],\"Pacific/Noumea\":[\"Asia/Vladivostok\"],\"Pacific/Majuro\":[\"Asia/Kamchatka\",\"Pacific/Fiji\"],\"Pacific/Tongatapu\":[\"Pacific/Apia\"],\"Asia/Baghdad\":[\"Europe/Minsk\",\"Europe/Moscow\"],\"Asia/Karachi\":[\"Asia/Yekaterinburg\"],\"Africa/Johannesburg\":[\"Asia/Gaza\",\"Africa/Cairo\"]}},i=function(e){var a=-e.getTimezoneOffset();return null!==a?a:0},r=function(){for(var e=[],a=0;a<=11;a++)for(var r=1;r<=28;r++){var n=i(new Date(s.BASELINE_YEAR,a,r));e?e&&e[e.length-1]!==n&&e.push(n):e.push()}return e},n=function(){var a=0,s=r();return s.length>1&&(a=s[0]-s[1]),s.length>3?s[0]+\",1,weird\":a<0?s[0]+\",1\":a>0?s[1]+\",1,\"+e:s[0]+\",0\"},o=function(){var e,a;if(Intl&&\"undefined\"!=typeof Intl&&\"undefined\"!=typeof Intl.DateTimeFormat&&(e=Intl.DateTimeFormat(),\"undefined\"!=typeof e&&\"undefined\"!=typeof e.resolvedOptions))return a=e.resolvedOptions().timeZone,a&&(a.indexOf(\"/\")>-1||\"UTC\"===a)?a:void 0},t=function(e){for(var a=new Date(e,0,1,0,0,1,0).getTime(),s=new Date(e,12,31,23,59,59).getTime(),i=a,r=new Date(i).getTimezoneOffset(),n=null,o=null;i<s-864e5;){var t=new Date(i),A=t.getTimezoneOffset();A!==r&&(A<r&&(n=t),A>r&&(o=t),r=A),i+=864e5}return!(!n||!o)&&{s:u(n).getTime(),e:u(o).getTime()}},u=function f(e,a,i){\"undefined\"==typeof a&&(a=s.DAY,i=s.HOUR);for(var r=new Date(e.getTime()-a).getTime(),n=e.getTime()+a,o=new Date(r).getTimezoneOffset(),t=r,u=null;t<n-i;){var A=new Date(t),c=A.getTimezoneOffset();if(c!==o){u=A;break}t+=i}return a===s.DAY?f(u,s.HOUR,s.MINUTE):a===s.HOUR?f(u,s.MINUTE,s.SECOND):u},A=function(e,a,s,i){if(\"N/A\"!==s)return s;if(\"Asia/Beirut\"===a){if(\"Africa/Cairo\"===i.name&&13983768e5===e[6].s&&14116788e5===e[6].e)return 0;if(\"Asia/Jerusalem\"===i.name&&13959648e5===e[6].s&&14118588e5===e[6].e)return 0}else if(\"America/Santiago\"===a){if(\"America/Asuncion\"===i.name&&14124816e5===e[6].s&&1397358e6===e[6].e)return 0;if(\"America/Campo_Grande\"===i.name&&14136912e5===e[6].s&&13925196e5===e[6].e)return 0}else if(\"America/Montevideo\"===a){if(\"America/Sao_Paulo\"===i.name&&14136876e5===e[6].s&&1392516e6===e[6].e)return 0}else if(\"Pacific/Auckland\"===a&&\"Pacific/Fiji\"===i.name&&14142456e5===e[6].s&&13961016e5===e[6].e)return 0;return s},c=function(e,i){for(var r=function(a){for(var r=0,n=0;n<e.length;n++)if(a.rules[n]&&e[n]){if(!(e[n].s>=a.rules[n].s&&e[n].e<=a.rules[n].e)){r=\"N/A\";break}if(r=0,r+=Math.abs(e[n].s-a.rules[n].s),r+=Math.abs(a.rules[n].e-e[n].e),r>s.MAX_SCORE){r=\"N/A\";break}}return r=A(e,i,r,a)},n={},o=a.olson.dst_rules.zones,t=o.length,u=s.AMBIGUITIES[i],c=0;c<t;c++){var m=o[c],l=r(o[c]);\"N/A\"!==l&&(n[m.name]=l)}for(var f in n)if(n.hasOwnProperty(f))for(var d=0;d<u.length;d++)if(u[d]===f)return f;return i},m=function(e){var s=function(){for(var e=[],s=0;s<a.olson.dst_rules.years.length;s++){var i=t(a.olson.dst_rules.years[s]);e.push(i)}return e},i=function(e){for(var a=0;a<e.length;a++)if(e[a]!==!1)return!0;return!1},r=s(),n=i(r);return n?c(r,e):e},l=function(e){var i=!1,t=n();return(e||\"undefined\"==typeof e)&&(i=o()),i||(i=a.olson.timezones[t],\"undefined\"!=typeof s.AMBIGUITIES[i]&&(i=m(i))),{name:function(){return i},using_intl:e||\"undefined\"==typeof e,needle:t,offsets:r()}};return{determine:l}}();a.olson=a.olson||{},a.olson.timezones={\"-720,0\":\"Etc/GMT+12\",\"-660,0\":\"Pacific/Pago_Pago\",\"-660,1,s\":\"Pacific/Apia\",\"-600,1\":\"America/Adak\",\"-600,0\":\"Pacific/Honolulu\",\"-570,0\":\"Pacific/Marquesas\",\"-540,0\":\"Pacific/Gambier\",\"-540,1\":\"America/Anchorage\",\"-480,1\":\"America/Los_Angeles\",\"-480,0\":\"Pacific/Pitcairn\",\"-420,0\":\"America/Phoenix\",\"-420,1\":\"America/Denver\",\"-360,0\":\"America/Guatemala\",\"-360,1\":\"America/Chicago\",\"-360,1,s\":\"Pacific/Easter\",\"-300,0\":\"America/Bogota\",\"-300,1\":\"America/New_York\",\"-270,0\":\"America/Caracas\",\"-240,1\":\"America/Halifax\",\"-240,0\":\"America/Santo_Domingo\",\"-240,1,s\":\"America/Asuncion\",\"-210,1\":\"America/St_Johns\",\"-180,1\":\"America/Godthab\",\"-180,0\":\"America/Buenos_Aires\",\"-180,1,s\":\"America/Montevideo\",\"-120,0\":\"America/Noronha\",\"-120,1\":\"America/Noronha\",\"-60,1\":\"Atlantic/Azores\",\"-60,0\":\"Atlantic/Cape_Verde\",\"0,0\":\"UTC\",\"0,1\":\"Europe/London\",\"0,1,weird\":\"Africa/Casablanca\",\"60,1\":\"Europe/Berlin\",\"60,0\":\"Africa/Lagos\",\"60,1,weird\":\"Africa/Casablanca\",\"120,1\":\"Asia/Beirut\",\"120,1,weird\":\"Africa/Cairo\",\"120,0\":\"Africa/Johannesburg\",\"180,0\":\"Asia/Baghdad\",\"180,1\":\"Europe/Moscow\",\"210,1\":\"Asia/Tehran\",\"240,0\":\"Asia/Dubai\",\"240,1\":\"Asia/Baku\",\"270,0\":\"Asia/Kabul\",\"300,1\":\"Asia/Yekaterinburg\",\"300,0\":\"Asia/Karachi\",\"330,0\":\"Asia/Calcutta\",\"345,0\":\"Asia/Katmandu\",\"360,0\":\"Asia/Dhaka\",\"360,1\":\"Asia/Omsk\",\"390,0\":\"Asia/Rangoon\",\"420,1\":\"Asia/Krasnoyarsk\",\"420,0\":\"Asia/Jakarta\",\"480,0\":\"Asia/Shanghai\",\"480,1\":\"Asia/Irkutsk\",\"525,0\":\"Australia/Eucla\",\"525,1,s\":\"Australia/Eucla\",\"540,1\":\"Asia/Yakutsk\",\"540,0\":\"Asia/Tokyo\",\"570,0\":\"Australia/Darwin\",\"570,1,s\":\"Australia/Adelaide\",\"600,0\":\"Australia/Brisbane\",\"600,1\":\"Asia/Vladivostok\",\"600,1,s\":\"Australia/Sydney\",\"630,1,s\":\"Australia/Lord_Howe\",\"660,1\":\"Asia/Kamchatka\",\"660,0\":\"Pacific/Noumea\",\"690,0\":\"Pacific/Norfolk\",\"720,1,s\":\"Pacific/Auckland\",\"720,0\":\"Pacific/Majuro\",\"765,1,s\":\"Pacific/Chatham\",\"780,0\":\"Pacific/Tongatapu\",\"780,1,s\":\"Pacific/Apia\",\"840,0\":\"Pacific/Kiritimati\"},a.olson.dst_rules={years:[2008,2009,2010,2011,2012,2013,2014],zones:[{name:\"Africa/Cairo\",rules:[{e:12199572e5,s:12090744e5},{e:1250802e6,s:1240524e6},{e:12858804e5,s:12840696e5},!1,!1,!1,{e:14116788e5,s:1406844e6}]},{name:\"America/Asuncion\",rules:[{e:12050316e5,s:12243888e5},{e:12364812e5,s:12558384e5},{e:12709548e5,s:12860784e5},{e:13024044e5,s:1317528e6},{e:1333854e6,s:13495824e5},{e:1364094e6,s:1381032e6},{e:13955436e5,s:14124816e5}]},{name:\"America/Campo_Grande\",rules:[{e:12032172e5,s:12243888e5},{e:12346668e5,s:12558384e5},{e:12667212e5,s:1287288e6},{e:12981708e5,s:13187376e5},{e:13302252e5,s:1350792e6},{e:136107e7,s:13822416e5},{e:13925196e5,s:14136912e5}]},{name:\"America/Goose_Bay\",rules:[{e:122559486e4,s:120503526e4},{e:125704446e4,s:123648486e4},{e:128909886e4,s:126853926e4},{e:13205556e5,s:129998886e4},{e:13520052e5,s:13314456e5},{e:13834548e5,s:13628952e5},{e:14149044e5,s:13943448e5}]},{name:\"America/Havana\",rules:[{e:12249972e5,s:12056436e5},{e:12564468e5,s:12364884e5},{e:12885012e5,s:12685428e5},{e:13211604e5,s:13005972e5},{e:13520052e5,s:13332564e5},{e:13834548e5,s:13628916e5},{e:14149044e5,s:13943412e5}]},{name:\"America/Mazatlan\",rules:[{e:1225008e6,s:12074724e5},{e:12564576e5,s:1238922e6},{e:1288512e6,s:12703716e5},{e:13199616e5,s:13018212e5},{e:13514112e5,s:13332708e5},{e:13828608e5,s:13653252e5},{e:14143104e5,s:13967748e5}]},{name:\"America/Mexico_City\",rules:[{e:12250044e5,s:12074688e5},{e:1256454e6,s:12389184e5},{e:12885084e5,s:1270368e6},{e:1319958e6,s:13018176e5},{e:13514076e5,s:13332672e5},{e:13828572e5,s:13653216e5},{e:14143068e5,s:13967712e5}]},{name:\"America/Miquelon\",rules:[{e:12255984e5,s:12050388e5},{e:1257048e6,s:12364884e5},{e:12891024e5,s:12685428e5},{e:1320552e6,s:12999924e5},{e:13520016e5,s:1331442e6},{e:13834512e5,s:13628916e5},{e:14149008e5,s:13943412e5}]},{name:\"America/Santa_Isabel\",rules:[{e:12250116e5,s:1207476e6},{e:12564612e5,s:12389256e5},{e:12891204e5,s:12685608e5},{e:132057e7,s:13000104e5},{e:13520196e5,s:133146e7},{e:13834692e5,s:13629096e5},{e:14149188e5,s:13943592e5}]},{name:\"America/Santiago\",rules:[{e:1206846e6,s:1223784e6},{e:1237086e6,s:12552336e5},{e:127035e7,s:12866832e5},{e:13048236e5,s:13138992e5},{e:13356684e5,s:13465584e5},{e:1367118e6,s:13786128e5},{e:13985676e5,s:14100624e5}]},{name:\"America/Sao_Paulo\",rules:[{e:12032136e5,s:12243852e5},{e:12346632e5,s:12558348e5},{e:12667176e5,s:12872844e5},{e:12981672e5,s:1318734e6},{e:13302216e5,s:13507884e5},{e:13610664e5,s:1382238e6},{e:1392516e6,s:14136876e5}]},{name:\"Asia/Amman\",rules:[{e:1225404e6,s:12066552e5},{e:12568536e5,s:12381048e5},{e:12883032e5,s:12695544e5},{e:13197528e5,s:13016088e5},!1,!1,{e:14147064e5,s:13959576e5}]},{name:\"Asia/Damascus\",rules:[{e:12254868e5,s:120726e7},{e:125685e7,s:12381048e5},{e:12882996e5,s:12701592e5},{e:13197492e5,s:13016088e5},{e:13511988e5,s:13330584e5},{e:13826484e5,s:1364508e6},{e:14147028e5,s:13959576e5}]},{name:\"Asia/Dubai\",rules:[!1,!1,!1,!1,!1,!1,!1]},{name:\"Asia/Gaza\",rules:[{e:12199572e5,s:12066552e5},{e:12520152e5,s:12381048e5},{e:1281474e6,s:126964086e4},{e:1312146e6,s:130160886e4},{e:13481784e5,s:13330584e5},{e:13802292e5,s:1364508e6},{e:1414098e6,s:13959576e5}]},{name:\"Asia/Irkutsk\",rules:[{e:12249576e5,s:12068136e5},{e:12564072e5,s:12382632e5},{e:12884616e5,s:12697128e5},!1,!1,!1,!1]},{name:\"Asia/Jerusalem\",rules:[{e:12231612e5,s:12066624e5},{e:1254006e6,s:1238112e6},{e:1284246e6,s:12695616e5},{e:131751e7,s:1301616e6},{e:13483548e5,s:13330656e5},{e:13828284e5,s:13645152e5},{e:1414278e6,s:13959648e5}]},{name:\"Asia/Kamchatka\",rules:[{e:12249432e5,s:12067992e5},{e:12563928e5,s:12382488e5},{e:12884508e5,s:12696984e5},!1,!1,!1,!1]},{name:\"Asia/Krasnoyarsk\",rules:[{e:12249612e5,s:12068172e5},{e:12564108e5,s:12382668e5},{e:12884652e5,s:12697164e5},!1,!1,!1,!1]},{name:\"Asia/Omsk\",rules:[{e:12249648e5,s:12068208e5},{e:12564144e5,s:12382704e5},{e:12884688e5,s:126972e7},!1,!1,!1,!1]},{name:\"Asia/Vladivostok\",rules:[{e:12249504e5,s:12068064e5},{e:12564e8,s:1238256e6},{e:12884544e5,s:12697056e5},!1,!1,!1,!1]},{name:\"Asia/Yakutsk\",rules:[{e:1224954e6,s:120681e7},{e:12564036e5,s:12382596e5},{e:1288458e6,s:12697092e5},!1,!1,!1,!1]},{name:\"Asia/Yekaterinburg\",rules:[{e:12249684e5,s:12068244e5},{e:1256418e6,s:1238274e6},{e:12884724e5,s:12697236e5},!1,!1,!1,!1]},{name:\"Asia/Yerevan\",rules:[{e:1224972e6,s:1206828e6},{e:12564216e5,s:12382776e5},{e:1288476e6,s:12697272e5},{e:13199256e5,s:13011768e5},!1,!1,!1]},{name:\"Australia/Lord_Howe\",rules:[{e:12074076e5,s:12231342e5},{e:12388572e5,s:12545838e5},{e:12703068e5,s:12860334e5},{e:13017564e5,s:1317483e6},{e:1333206e6,s:13495374e5},{e:13652604e5,s:1380987e6},{e:139671e7,s:14124366e5}]},{name:\"Australia/Perth\",rules:[{e:12068136e5,s:12249576e5},!1,!1,!1,!1,!1,!1]},{name:\"Europe/Helsinki\",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:\"Europe/Minsk\",rules:[{e:12249792e5,s:12068352e5},{e:12564288e5,s:12382848e5},{e:12884832e5,s:12697344e5},!1,!1,!1,!1]},{name:\"Europe/Moscow\",rules:[{e:12249756e5,s:12068316e5},{e:12564252e5,s:12382812e5},{e:12884796e5,s:12697308e5},!1,!1,!1,!1]},{name:\"Pacific/Apia\",rules:[!1,!1,!1,{e:13017528e5,s:13168728e5},{e:13332024e5,s:13489272e5},{e:13652568e5,s:13803768e5},{e:13967064e5,s:14118264e5}]},{name:\"Pacific/Fiji\",rules:[!1,!1,{e:12696984e5,s:12878424e5},{e:13271544e5,s:1319292e6},{e:1358604e6,s:13507416e5},{e:139005e7,s:1382796e6},{e:14215032e5,s:14148504e5}]},{name:\"Europe/London\",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:\"Africa/Windhoek\",rules:[{e:12207492e5,s:120744e7},{e:12521988e5,s:12388896e5},{e:12836484e5,s:12703392e5},{e:1315098e6,s:13017888e5},{e:13465476e5,s:13332384e5},{e:13779972e5,s:13652928e5},{e:14100516e5,s:13967424e5}]}]},\"undefined\"!=typeof module&&\"undefined\"!=typeof module.exports?module.exports=a:\"undefined\"!=typeof define&&null!==define&&null!=define.amd?define([],function(){return a}):\"undefined\"==typeof e?window.jstz=a:e.jstz=a}();","/*!\n * Attaches timezone to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { determine } from 'jstimezonedetect';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Populated the Timezone field of the canonical event model\n *\n * @remarks\n * Uses Intl where availble and has fallback in older browsers\n */\nfunction TimezonePlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            tracker.core.setTimezone(determine(typeof Intl !== 'undefined').name());\n        }\n    };\n}\n\nexport { TimezonePlugin };\n//# sourceMappingURL=index.module.js.map\n","import { newTracker, setCustomUrl, setReferrerUrl, trackPageView, clearUserData, setUserId, clearGlobalContexts, enableActivityTracking, addGlobalContexts, removeGlobalContexts, disableAnonymousTracking, enableAnonymousTracking, addPlugin, trackStructEvent, trackSelfDescribingEvent } from '@snowplow/browser-tracker';\nimport { AdTrackingPlugin, trackAdConversion, trackAdClick, trackAdImpression } from '@snowplow/browser-plugin-ad-tracking';\nimport { ClientHintsPlugin } from '@snowplow/browser-plugin-client-hints';\nimport { ConsentPlugin, enableGdprContext, trackConsentWithdrawn, trackConsentGranted } from '@snowplow/browser-plugin-consent';\nimport { EcommercePlugin, trackRemoveFromCart, trackAddToCart } from '@snowplow/browser-plugin-ecommerce';\nimport { EnhancedEcommercePlugin, addEnhancedEcommercePromoContext, addEnhancedEcommerceProductContext, addEnhancedEcommerceImpressionContext, addEnhancedEcommerceActionContext } from '@snowplow/browser-plugin-enhanced-ecommerce';\nimport { ErrorTrackingPlugin, enableErrorTracking, trackError } from '@snowplow/browser-plugin-error-tracking';\nimport { FormTrackingPlugin, enableFormTracking } from '@snowplow/browser-plugin-form-tracking';\nimport { GaCookiesPlugin } from '@snowplow/browser-plugin-ga-cookies';\nimport { GeolocationPlugin } from '@snowplow/browser-plugin-geolocation';\nimport { LinkClickTrackingPlugin, refreshLinkClickTracking, enableLinkClickTracking, trackLinkClick } from '@snowplow/browser-plugin-link-click-tracking';\nimport { OptimizelyXPlugin } from '@snowplow/browser-plugin-optimizely-x';\nimport { PerformanceTimingPlugin } from '@snowplow/browser-plugin-performance-timing';\nimport { SiteTrackingPlugin, trackTiming, trackSiteSearch, trackSocialInteraction } from '@snowplow/browser-plugin-site-tracking';\nimport { TimezonePlugin } from '@snowplow/browser-plugin-timezone';\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nvar defaultConfig = {\n  /* See description below */\n  name: 'snowplow',\n  trackerSettings: {}\n};\n/**\n * Snowplow analytics integration\n * @link https://getanalytics.io/plugins/snowplow/\n * @link https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/\n * @param {Object} pluginConfig - Plugin settings\n * @param {string} pluginConfig.collectorUrl - The URL to a Snowplow collector\n * @param {string} [pluginConfig.name] - The name to identify this instance of the tracker, use if using multiple tracker instances ('snowplow' default)\n * @param {Object} [pluginConfig.trackerSettings] - The arg map to pass to the Snowplow Tracker\n * @param {string} [pluginConfig.trackerSettings.appId] - The appId to identify this application\n * @param {string} [pluginConfig.trackerSettings.platform] - Platform of tracking (\"web\" default)\n * @param {string} [pluginConfig.trackerSettings.cookieDomain] - Domain to set cookie against\n * @param {string} [pluginConfig.trackerSettings.discoverRootDomain] - Automatically discover root domain\n * @param {string} [pluginConfig.trackerSettings.cookieName] - Prefix for cookies (\"_sp_\" default)\n * @param {string} [pluginConfig.trackerSettings.cookieSameSite] - SameSite cookie setting (\"None\" default)\n * @param {boolean} [pluginConfig.trackerSettings.cookieSecure] - Secure cookie setting (true default)\n * @param {boolean} [pluginConfig.trackerSettings.encodeBase64] - Encode JSON objects as Base64 (true default)\n * @param {bolean} [pluginConfig.trackerSettings.respectDoNotTrack] - Respect do not track (consider analytics-plugin-do-not-track) (false default)\n * @param {string} [pluginConfig.trackerSettings.eventMethod] - Method to send events, GET, POST, Beacon (POST default)\n * @param {number} [pluginConfig.trackerSettings.bufferSize] - Amount of events to buffer before sending (1 default)\n * @param {number} [pluginConfig.trackerSettings.maxPostBytes] - Maximum size of POST or Beacon before sending (40000 default)\n * @param {string} [pluginConfig.trackerSettings.crossDomainLinker] - function to configure which links to add cross domain linking\n * @param {number} [pluginConfig.trackerSettings.cookieLifetime] - Cookie lifetime (63072000 default)\n * @param {string} [pluginConfig.trackerSettings.stateStorageStrategy] - Use cookies and/or localstorage (\"cookieAndLocalStorage\" default)\n * @param {number} [pluginConfig.trackerSettings.maxLocalStorageQueueSize] - Maximum numbers of events to buffer in localstorage to prevent filling local storage (1000 default)\n * @param {boolean} [pluginConfig.trackerSettings.resetActivityTrackingOnPageView] - Flag to decide whether to reset page ping timers on virtual page view (true default)\n * @param {boolean} [pluginConfig.trackerSettings.connectionTimeout] - The timeout, in milliseconds, before GET and POST requests will timeout (5000 default) (Snowplow JS 2.15.0+)\n * @param {(Object|boolean)} [pluginConfig.trackerSettings.anonymousTracking] - Flag to enable anonymous tracking functionality (false default)\n * @param {boolean} [pluginConfig.trackerSettings.anonymousTracking.withSessionTracking] - Flag to enable whether to continue tracking sessions in anonymous tracking mode (false default)\n * @param {boolean} [pluginConfig.trackerSettings.anonymousTracking.withServerAnonymisation] - Flag which prevents collector from returning and capturing cookies and capturing ip address (false default)\n * @param {Object} [pluginConfig.trackerSettings.contexts] - The auto contexts for each event\n * @param {boolean} [pluginConfig.trackerSettings.contexts.webPage] - The webpage context, containing the page view id. (true default)\n * @param {boolean} [pluginConfig.trackerSettings.contexts.performanceTiming] - Add performance timing information\n * @param {(Object|boolean)} [pluginConfig.trackerSettings.contexts.clientHints] - Add Client Hint information (Snowplow JS 2.15.0+)\n * @param {boolean} [pluginConfig.trackerSettings.contexts.clientHints.includeHighEntropy] - Capture High Entropy Client Hints (Snowplow JS 2.15.0+)\n * @param {boolean} [pluginConfig.trackerSettings.contexts.gaCookies] - Add gaCookie information\n * @param {boolean} [pluginConfig.trackerSettings.contexts.geolocation] - Add browser geolocation information\n * @param {boolean} [pluginConfig.trackerSettings.contexts.optimizelyXSummary] - Add browser geolocation information\n * @param {Array} [pluginConfig.trackerSettings.plugins] - Additional plugins to include at tracker initialisation. See https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/plugins/\n * @return {Object} Analytics plugin\n *\n * @example\n * // Minimal recommended configuration\n * snowplowPlugin({\n *   name: 'snowplow',\n *   collectorUrl: 'collector.mysite.com',\n *   trackerSettings: {\n *     appId: 'myApp'\n *   }\n * })\n */\n\nfunction snowplowPlugin() {\n  var pluginConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n  var config = _objectSpread(_objectSpread({}, defaultConfig), pluginConfig);\n\n  var _loaded = false;\n  return {\n    name: config.name,\n    config: config,\n    initialize: function initialize() {\n      var collectorUrl = config.collectorUrl,\n          name = config.name,\n          trackerSettings = config.trackerSettings;\n\n      if (!collectorUrl) {\n        throw new Error('No collector url defined');\n      }\n\n      if (!trackerSettings.contexts) {\n        trackerSettings.contexts = {};\n      }\n\n      trackerSettings.plugins = [].concat(_toConsumableArray(trackerSettings.plugins || []), [AdTrackingPlugin(), ConsentPlugin(), EcommercePlugin(), EnhancedEcommercePlugin(), ErrorTrackingPlugin(), FormTrackingPlugin(), LinkClickTrackingPlugin(), SiteTrackingPlugin(), TimezonePlugin()]);\n\n      if (trackerSettings.contexts.performanceTiming) {\n        trackerSettings.plugins.push(PerformanceTimingPlugin());\n      }\n\n      if (trackerSettings.contexts.clientHints) {\n        trackerSettings.plugins.push(ClientHintsPlugin(trackerSettings.contexts.clientHints === true ? false : trackerSettings.contexts.clientHints.includeHighEntropy));\n      }\n\n      if (trackerSettings.contexts.gaCookies) {\n        trackerSettings.plugins.push(GaCookiesPlugin());\n      }\n\n      if (trackerSettings.contexts.geolocation) {\n        trackerSettings.plugins.push(GeolocationPlugin());\n      }\n\n      if (trackerSettings.contexts.optimizelyXSummary) {\n        trackerSettings.plugins.push(OptimizelyXPlugin());\n      }\n\n      newTracker(name, collectorUrl, trackerSettings);\n      _loaded = true;\n    },\n\n    /**\n     * Snowplow page view event https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/tracking-events/\n     * @example\n     *\n     * // Enable some automatic tracking before page event\n     * analytics.on('initialize:snowplow', ({instance}) => {\n     *   instance.plugins.snowplow.enableActivityTracking(10,10);\n     *   instance.plugins.snowplow.enableLinkClickTracking();\n     * });\n     *\n     * // Track page\n     * analytics.page();\n     *\n     * // or Track page view with additional entities\n     * analytics.page({\n     *   contexts: [{\n     *     schema: 'iglu:com.acme/blog_post/jsonschema/1-0-0',\n     *     data: {\n     *       title: 'Re-thinking the structure of event data',\n     *       category: 'Data Insights',\n     *       author: 'Cara Baestlein',\n     *       datePublished: '2020-01-24'\n     *     }\n     *   }]\n     * });\n     */\n    page: function page(_ref) {\n      var payload = _ref.payload;\n      var properties = payload.properties;\n      var name = config.name;\n      if (!_loaded) return; // Use url and referrer values from Analaytics\n\n      setCustomUrl(properties.url, [name]);\n      setReferrerUrl(properties.referrer, [name]); // Track Page View event\n\n      trackPageView({\n        title: properties.title,\n        context: properties.contexts,\n        dynamicContexts: properties.dynamicContexts\n      }, [name]);\n    },\n\n    /**\n     * Reset Snowplow domain_userid and all session information store in cookies and/or local storage\n     * Also resets the user_id set with identify and setUserId\n     * Also resets all global contexts\n     */\n    reset: function reset() {\n      var name = config.name;\n      if (!_loaded) return;\n      clearUserData({}, [name]);\n      setUserId(undefined, [name]);\n\n      clearGlobalContexts([name]);\n    },\n\n    /**\n     * Snowplow track event https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/tracking-events/\n     * All Snowplow 'track' and 'add' functions are available, remove 'track' or 'add' when calling analytics.track\n     * i.e. analytics.track('adImpression', ..., ..., ...);\n     * @example\n     *\n     * // Track structured event\n     * analytics.track('playedVideo', {\n     *   category: 'Videos',\n     *   label: 'Fall Campaign',\n     *   value: 42\n     * })\n     *\n     * // or Track Self Describing event\n     * analytics.track('selfDescribingEvent', {\n     *   schema: 'iglu:com.acme/video_played/jsonschema/1-0-0',\n     *   data: {\n     *     id: 42,\n     *     title: 'Fall Campaign'\n     *   }\n     * })\n     *\n     * // or Track Self Describing event with additional entities\n     * analytics.track('selfDescribingEvent', {\n     *   schema: 'iglu:com.acme/video_played/jsonschema/1-0-0',\n     *   data: {\n     *     id: 42,\n     *     title: 'Fall Campaign',\n     *     videoTimestampInMs: 1104\n     *   },\n     *   contexts: [{\n     *     schema: 'iglu:com.acme/product/jsonschema/1-0-0',\n     *     data: {\n     *       id: 'f9cb6cb6-5ca8-47a6-9035-d9c6ac13029e',\n     *       category: 'clothing',\n     *       subCategory: 'socks',\n     *       price: 3.99\n     *     }\n     *   }]\n     * })\n     *\n     * // or Track Enchanced Ecommerce event with product context\n     * analytics.track('EnhancedEcommerceProductContext', {\n     *   id: 'P12345',\n     *   name: 'Android Warhol T-Shirt',\n     *   list: 'Search Results',\n     *   brand: 'Google',\n     *   category: 'Apparel/T-Shirts',\n     *   variant: 'Black',\n     *   quantity: 1\n     * });\n     * analytics.track('EnhancedEcommerceAction', {\n     *   action: 'add'\n     * });\n     */\n    track: function track(_ref2) {\n      var payload = _ref2.payload;\n      var event = payload.event,\n          properties = payload.properties;\n      var name = config.name;\n      if (!_loaded) return;\n\n      _track(name, event, properties);\n    },\n\n    /**\n     * Set Snowplow user_id with setUserId\n     * @example\n     *\n     * analytics.identify('user-id-xyz');\n     */\n    identify: function identify(_ref3) {\n      var payload = _ref3.payload;\n      var userId = payload.userId;\n      var name = config.name;\n      if (!_loaded) return;\n\n      if (userId) {\n        setUserId(userId, [name]);\n      }\n    },\n    loaded: function loaded() {\n      return _loaded;\n    },\n    methods: {\n      /**\n       * Enables Activity Tracking\n       * Generates page ping events based on user activity on page\n       * Should be called before first page view event\n       * @param {number} [minimumVisitLength] - Minimum visit length before first page ping event fires\n       * @param {number} [heartbeat] - Period where user must be active to fire the next page ping\n       */\n      enableActivityTracking: function enableActivityTracking$1(minimumVisitLength, heartbeat) {\n        var name = config.name;\n\n        enableActivityTracking({\n          minimumVisitLength: minimumVisitLength,\n          heartbeatDelay: heartbeat\n        }, [name]);\n      },\n\n      /**\n       * Refresh Link Click Tracking\n       */\n      refreshLinkClickTracking: function refreshLinkClickTracking$1() {\n        var name = config.name;\n\n        refreshLinkClickTracking([name]);\n      },\n\n      /**\n       * Allows for refreshing of form tracking\n       * Use when forms are added to page\n       * @param {Object} [formTrackingConfig] - Optional form tracking configuration\n       * @param {string[]} [formTrackingConfig.blacklist] - An array of CSS classes which should be ignored by form tracking\n       * @param {string[]} [formTrackingConfig.whitelist] - An array of the CSS classes of form elements which you do want to be tracked\n       * @param {Object} [formTrackingConfig.fields] - An object that describes how to filter and transform form elements\n       * @param {formFieldsFilter} [formTrackingConfig.fields.filter] - A function which determines which fields should be tracked. The function should take one argument, the form element, and return a boolean\n       * @param {formFieldsTransform} [formTrackingConfig.fields.transform] - An array of CSS classes which should be ignored by link click tracking\n       * @param {Context[]} [contexts] - Optional array of custom contexts to attach to every form track event\n       */\n      enableFormTracking: function enableFormTracking$1(formTrackingConfig, contexts) {\n        var name = config.name;\n\n        enableFormTracking({\n          context: contexts,\n          options: formTrackingConfig\n        }, [name]);\n      },\n\n      /**\n       * Adds the GDPR Context to all events\n       * @param {string} [basisForProcessing] - Required. GDPR basis for data collection & processing\n       * @param {string} [documentId] - ID for document detailing basis for processing\n       * @param {string} [documentVersion] - Version of document detailing basis for processing\n       * @param {string} [documentDescription] - Description of document detailing basis for processing\n       */\n      enableGdprContext: function enableGdprContext$1(basisForProcessing, documentId, documentVersion, documentDescription) {\n        var name = config.name;\n\n        enableGdprContext({\n          basisForProcessing: basisForProcessing,\n          documentId: documentId,\n          documentVersion: documentVersion,\n          documentDescription: documentDescription\n        }, [name]);\n      },\n\n      /**\n       * Enables automatic link click tracking\n       * @param {Object} [filter] - An object to specify which links to include in tracking\n       * @param {linkClickFilter} [filter.filter] - A function which determines which links should be tracked\n       * @param {string[]} [filter.blacklist] - An array of CSS classes which should be ignored by link click tracking\n       * @param {string[]} [filter.whitelist] - An array of the CSS classes of links which you do want to be tracked\n       * @param {boolean} [pseudoClicks] - Allows middle clicks to track in Firefox. Can cause false positives. Recommended to enable.\n       * @param {boolean} [content] - Set to true to capture the innerHTML of the clicked link\n       * @param {Context[]} [contexts] - An array of custom contexts to attach to every link click event\n       */\n      enableLinkClickTracking: function enableLinkClickTracking$1(filter, pseudoClicks, content, contexts) {\n        var name = config.name;\n\n        enableLinkClickTracking({\n          options: filter,\n          pseudoClicks: pseudoClicks,\n          trackContent: content,\n          context: contexts\n        }, [name]);\n      },\n\n      /**\n       * Enables automatic error tracking\n       * @param {errorFilter} [filter] - A function which determines which ErrorEvents should be tracked.\n       * @param {errorContexts} [contextAdder] - A function to build custom contexts\n       */\n      enableErrorTracking: function enableErrorTracking$1(filter, contextAdder) {\n        var name = config.name;\n\n        enableErrorTracking({\n          filter: filter,\n          contextAdder: contextAdder\n        }, [name]);\n      },\n\n      /**\n       * Allows contexts to be sent with every event, or a subset of events as defined in the ruleset\n       * @param {GlobalContexts} globalContexts - Array of global contexts to be added to every event\n       */\n      addGlobalContexts: function addGlobalContexts$1(globalContexts) {\n        var name = config.name;\n\n        addGlobalContexts(globalContexts, [name]);\n      },\n\n      /**\n       * Removes global contexts by matching on the schema name\n       * @param {Context[]} globalContexts\n       */\n      removeGlobalContexts: function removeGlobalContexts$1(globalContexts) {\n        var name = config.name;\n\n        removeGlobalContexts(globalContexts, [name]);\n      },\n\n      /**\n       * Clears all Global Contexts\n       */\n      clearGlobalContexts: function clearGlobalContexts$1() {\n        var name = config.name;\n\n        clearGlobalContexts([name]);\n      },\n\n      /**\n       * Disables Anonymous Tracking\n       * https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/tracker-setup/additional-options/\n       * @param {string} stateStorageStrategy - Use to switch storage strategy, or don't use to leave the same\n       */\n      disableAnonymousTracking: function disableAnonymousTracking$1(stateStorageStrategy) {\n        var name = config.name;\n\n        disableAnonymousTracking({\n          stateStorageStrategy: stateStorageStrategy\n        }, [name]);\n      },\n\n      /**\n       * Enables Anonymous Tracking\n       * https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/tracker-setup/additional-options/\n       * @param {Object} anonymousTrackingArgs - Configures anonymous tracking features\n       * @param {boolean} anonymousTrackingArgs.withSessionTracking - Enables session tracking when enabling Anonymous Tracking\n       * @param {boolean} anonymousTrackingArgs.withServerAnonymisation - Prevents collector from returning cookies and capturing ip address\n       * @param {string} stateStorageStrategy - Use to switch storage strategy, or don't use to leave the same\n       */\n      enableAnonymousTracking: function enableAnonymousTracking$1(anonymousTrackingArgs, stateStorageStrategy) {\n        var name = config.name;\n\n        enableAnonymousTracking({\n          options: anonymousTrackingArgs,\n          stateStorageStrategy: stateStorageStrategy\n        }, [name]);\n      },\n\n      /**\n       * Adds a plugin to the available plugins\n       * https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-trackers/javascript-tracker/javascript-tracker-v3/plugins/\n       * @param {Object} plugin - The Plugin to include\n       */\n      addPlugin: function addPlugin$1(plugin) {\n        var name = config.name;\n\n        addPlugin(plugin, [name]);\n      }\n    }\n  };\n}\n\nfunction _track(name, event, properties) {\n  if (event && properties) {\n    // Map V2 naming into V3 naming\n    if (properties.contexts && !properties.context) {\n      properties.context = properties.contexts;\n    }\n\n    switch (event.toLowerCase()) {\n      case 'selfdescribingevent':\n      case 'unstructevent':\n        trackSelfDescribingEvent({\n          event: properties,\n          context: properties.context\n        }, [name]);\n        break;\n\n      case 'socialinteraction':\n        trackSocialInteraction(properties, [name]);\n        break;\n\n      case 'adimpression':\n        trackAdImpression(properties, [name]);\n        break;\n\n      case 'adclick':\n        trackAdClick(properties, [name]);\n        break;\n\n      case 'adconversion':\n        trackAdConversion(properties, [name]);\n        break;\n\n      case 'linkclick':\n        trackLinkClick(properties, [name]);\n        break;\n\n      case 'addtocart':\n        trackAddToCart(properties, [name]);\n        break;\n\n      case 'removefromcart':\n        trackRemoveFromCart(properties, [name]);\n        break;\n\n      case 'sitesearch':\n        trackSiteSearch(properties, [name]);\n        break;\n\n      case 'consentgranted':\n        trackConsentGranted(properties, [name]);\n        break;\n\n      case 'consentwithdrawn':\n        trackConsentWithdrawn(properties, [name]);\n        break;\n\n      case 'error':\n        trackError(properties, [name]);\n        break;\n\n      case 'enhancedecommerceactioncontext':\n        addEnhancedEcommerceActionContext(properties, [name]);\n        break;\n\n      case 'enhancedecommerceimpressioncontext':\n        addEnhancedEcommerceImpressionContext(properties, [name]);\n        break;\n\n      case 'enhancedecommerceproductcontext':\n        addEnhancedEcommerceProductContext(properties, [name]);\n        break;\n\n      case 'enhancedecommercepromocontext':\n        addEnhancedEcommercePromoContext(properties, [name]);\n        break;\n\n      case 'enhancedecommerceaction':\n        snowplow(\"trackEnhancedEcommerceAction:\".concat(name), properties.action);\n        break;\n\n      case 'timing':\n        trackTiming(properties, [name]);\n\n      case 'structevent':\n      default:\n        trackStructEvent({\n          category: properties.category || 'All',\n          action: event || properties.actions,\n          label: properties.label,\n          property: properties.property,\n          value: properties.value,\n          context: properties.context\n        }, [name]);\n        break;\n    }\n  }\n}\n/**\n * @typedef {Object} Context\n * @property {string} schema - The Schema which describes the context\n * @property {Object} data - The data object which conforms to the schema\n */\n\n/**\n * A function which determines which links should be tracked\n * @callback linkClickFilter\n * @param {Object} element\n * @return {boolean} true if the element should be tracked\n */\n\n/**\n * A function which determines which ErrorEvents should be tracked\n * @callback errorFilter\n * @param {Object} errorEvent\n * @return {boolean} true if the error should be tracked\n */\n\n/**\n * A function which determines which ErrorEvents should be tracked\n * @callback errorContexts\n * @param {Object} errorEvent\n * @return {Context[]} Array of context to be included with the error tracking event\n */\n\n/**\n * A function which determines which fields should be tracked\n * @callback formFieldsFilter\n * @param {Object} formElement\n * @return {boolean} true if the form field should be tracked\n */\n\n/**\n * Transforms a form elements value\n * @callback formFieldsTransform\n * @param {Object} formElement\n * @return {string} The value to replace this form elements value with\n */\n\n/**\n * @typedef {Object} GlobalContexts\n * @property {Context[]} contexts - The contexts to add\n * @property {GlobalContextFilter|GlobalContextRuleset} [filterConditions] - The Schema which describes the context\n */\n\n/**\n * A function which determines which contexts should be sent\n * @callback GlobalContextFilter\n * @param {Object} event\n * @param {string} event.eventType This argument is a string taken from the event payload field, e. e.g. pv, pp, se\n * @param {string} event.eventSchema The schema of the event\n * @return {boolean} true if the context should be included with the event\n */\n\n/**\n * @typedef {Object} GlobalContextRuleset\n * @property {string[]} [accept] - A list of schemas to attach this context to\n * @property {string[]} [reject] - A list of schemas to not attach this context too\n */\n\nvar index = snowplowPlugin ;\n\nexport { index as default };\n","/**\n * React Router DOM v6.30.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { UNSAFE_mapRouteProperties, UNSAFE_logV6DeprecationWarnings, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker } from 'react-router';\nexport { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';\nimport { stripBasename, UNSAFE_warning, createRouter, createBrowserHistory, createHashHistory, UNSAFE_ErrorResponseImpl, UNSAFE_invariant, joinPaths, IDLE_FETCHER, matchPath } from '@remix-run/router';\nexport { UNSAFE_ErrorResponseImpl } from '@remix-run/router';\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\n\nconst defaultMethod = \"get\";\nconst defaultEncType = \"application/x-www-form-urlencoded\";\nfunction isHtmlElement(object) {\n  return object != null && typeof object.tagName === \"string\";\n}\nfunction isButtonElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\nfunction isFormElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\nfunction isInputElement(object) {\n  return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\nfunction isModifiedEvent(event) {\n  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\nfunction shouldProcessLinkClick(event, target) {\n  return event.button === 0 && (\n  // Ignore everything but left clicks\n  !target || target === \"_self\") &&\n  // Let browser handle \"target=_blank\" etc.\n  !isModifiedEvent(event) // Ignore clicks with modifier keys\n  ;\n}\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n *   let searchParams = new URLSearchParams([\n *     ['sort', 'name'],\n *     ['sort', 'price']\n *   ]);\n *\n * you can do:\n *\n *   let searchParams = createSearchParams({\n *     sort: ['name', 'price']\n *   });\n */\nfunction createSearchParams(init) {\n  if (init === void 0) {\n    init = \"\";\n  }\n  return new URLSearchParams(typeof init === \"string\" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {\n    let value = init[key];\n    return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);\n  }, []));\n}\nfunction getSearchParamsForLocation(locationSearch, defaultSearchParams) {\n  let searchParams = createSearchParams(locationSearch);\n  if (defaultSearchParams) {\n    // Use `defaultSearchParams.forEach(...)` here instead of iterating of\n    // `defaultSearchParams.keys()` to work-around a bug in Firefox related to\n    // web extensions. Relevant Bugzilla tickets:\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=1414602\n    // https://bugzilla.mozilla.org/show_bug.cgi?id=1023984\n    defaultSearchParams.forEach((_, key) => {\n      if (!searchParams.has(key)) {\n        defaultSearchParams.getAll(key).forEach(value => {\n          searchParams.append(key, value);\n        });\n      }\n    });\n  }\n  return searchParams;\n}\n// One-time check for submitter support\nlet _formDataSupportsSubmitter = null;\nfunction isFormDataSubmitterSupported() {\n  if (_formDataSupportsSubmitter === null) {\n    try {\n      new FormData(document.createElement(\"form\"),\n      // @ts-expect-error if FormData supports the submitter parameter, this will throw\n      0);\n      _formDataSupportsSubmitter = false;\n    } catch (e) {\n      _formDataSupportsSubmitter = true;\n    }\n  }\n  return _formDataSupportsSubmitter;\n}\nconst supportedFormEncTypes = new Set([\"application/x-www-form-urlencoded\", \"multipart/form-data\", \"text/plain\"]);\nfunction getFormEncType(encType) {\n  if (encType != null && !supportedFormEncTypes.has(encType)) {\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"\\\"\" + encType + \"\\\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` \" + (\"and will default to \\\"\" + defaultEncType + \"\\\"\")) : void 0;\n    return null;\n  }\n  return encType;\n}\nfunction getFormSubmissionInfo(target, basename) {\n  let method;\n  let action;\n  let encType;\n  let formData;\n  let body;\n  if (isFormElement(target)) {\n    // When grabbing the action from the element, it will have had the basename\n    // prefixed to ensure non-JS scenarios work, so strip it since we'll\n    // re-prefix in the router\n    let attr = target.getAttribute(\"action\");\n    action = attr ? stripBasename(attr, basename) : null;\n    method = target.getAttribute(\"method\") || defaultMethod;\n    encType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n    formData = new FormData(target);\n  } else if (isButtonElement(target) || isInputElement(target) && (target.type === \"submit\" || target.type === \"image\")) {\n    let form = target.form;\n    if (form == null) {\n      throw new Error(\"Cannot submit a <button> or <input type=\\\"submit\\\"> without a <form>\");\n    }\n    // <button>/<input type=\"submit\"> may override attributes of <form>\n    // When grabbing the action from the element, it will have had the basename\n    // prefixed to ensure non-JS scenarios work, so strip it since we'll\n    // re-prefix in the router\n    let attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n    action = attr ? stripBasename(attr, basename) : null;\n    method = target.getAttribute(\"formmethod\") || form.getAttribute(\"method\") || defaultMethod;\n    encType = getFormEncType(target.getAttribute(\"formenctype\")) || getFormEncType(form.getAttribute(\"enctype\")) || defaultEncType;\n    // Build a FormData object populated from a form and submitter\n    formData = new FormData(form, target);\n    // If this browser doesn't support the `FormData(el, submitter)` format,\n    // then tack on the submitter value at the end.  This is a lightweight\n    // solution that is not 100% spec compliant.  For complete support in older\n    // browsers, consider using the `formdata-submitter-polyfill` package\n    if (!isFormDataSubmitterSupported()) {\n      let {\n        name,\n        type,\n        value\n      } = target;\n      if (type === \"image\") {\n        let prefix = name ? name + \".\" : \"\";\n        formData.append(prefix + \"x\", \"0\");\n        formData.append(prefix + \"y\", \"0\");\n      } else if (name) {\n        formData.append(name, value);\n      }\n    }\n  } else if (isHtmlElement(target)) {\n    throw new Error(\"Cannot submit element that is not <form>, <button>, or \" + \"<input type=\\\"submit|image\\\">\");\n  } else {\n    method = defaultMethod;\n    action = null;\n    encType = defaultEncType;\n    body = target;\n  }\n  // Send body for <Form encType=\"text/plain\" so we encode it into text\n  if (formData && encType === \"text/plain\") {\n    body = formData;\n    formData = undefined;\n  }\n  return {\n    action,\n    method: method.toLowerCase(),\n    encType,\n    formData,\n    body\n  };\n}\n\nconst _excluded = [\"onClick\", \"relative\", \"reloadDocument\", \"replace\", \"state\", \"target\", \"to\", \"preventScrollReset\", \"viewTransition\"],\n  _excluded2 = [\"aria-current\", \"caseSensitive\", \"className\", \"end\", \"style\", \"to\", \"viewTransition\", \"children\"],\n  _excluded3 = [\"fetcherKey\", \"navigate\", \"reloadDocument\", \"replace\", \"state\", \"method\", \"action\", \"onSubmit\", \"relative\", \"preventScrollReset\", \"viewTransition\"];\n// HEY YOU! DON'T TOUCH THIS VARIABLE!\n//\n// It is replaced with the proper version at build time via a babel plugin in\n// the rollup config.\n//\n// Export a global property onto the window for React Router detection by the\n// Core Web Vitals Technology Report.  This way they can configure the `wappalyzer`\n// to detect and properly classify live websites as being built with React Router:\n// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json\nconst REACT_ROUTER_VERSION = \"6\";\ntry {\n  window.__reactRouterVersion = REACT_ROUTER_VERSION;\n} catch (e) {\n  // no-op\n}\nfunction createBrowserRouter(routes, opts) {\n  return createRouter({\n    basename: opts == null ? void 0 : opts.basename,\n    future: _extends({}, opts == null ? void 0 : opts.future, {\n      v7_prependBasename: true\n    }),\n    history: createBrowserHistory({\n      window: opts == null ? void 0 : opts.window\n    }),\n    hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n    routes,\n    mapRouteProperties: UNSAFE_mapRouteProperties,\n    dataStrategy: opts == null ? void 0 : opts.dataStrategy,\n    patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation,\n    window: opts == null ? void 0 : opts.window\n  }).initialize();\n}\nfunction createHashRouter(routes, opts) {\n  return createRouter({\n    basename: opts == null ? void 0 : opts.basename,\n    future: _extends({}, opts == null ? void 0 : opts.future, {\n      v7_prependBasename: true\n    }),\n    history: createHashHistory({\n      window: opts == null ? void 0 : opts.window\n    }),\n    hydrationData: (opts == null ? void 0 : opts.hydrationData) || parseHydrationData(),\n    routes,\n    mapRouteProperties: UNSAFE_mapRouteProperties,\n    dataStrategy: opts == null ? void 0 : opts.dataStrategy,\n    patchRoutesOnNavigation: opts == null ? void 0 : opts.patchRoutesOnNavigation,\n    window: opts == null ? void 0 : opts.window\n  }).initialize();\n}\nfunction parseHydrationData() {\n  var _window;\n  let state = (_window = window) == null ? void 0 : _window.__staticRouterHydrationData;\n  if (state && state.errors) {\n    state = _extends({}, state, {\n      errors: deserializeErrors(state.errors)\n    });\n  }\n  return state;\n}\nfunction deserializeErrors(errors) {\n  if (!errors) return null;\n  let entries = Object.entries(errors);\n  let serialized = {};\n  for (let [key, val] of entries) {\n    // Hey you!  If you change this, please change the corresponding logic in\n    // serializeErrors in react-router-dom/server.tsx :)\n    if (val && val.__type === \"RouteErrorResponse\") {\n      serialized[key] = new UNSAFE_ErrorResponseImpl(val.status, val.statusText, val.data, val.internal === true);\n    } else if (val && val.__type === \"Error\") {\n      // Attempt to reconstruct the right type of Error (i.e., ReferenceError)\n      if (val.__subType) {\n        let ErrorConstructor = window[val.__subType];\n        if (typeof ErrorConstructor === \"function\") {\n          try {\n            // @ts-expect-error\n            let error = new ErrorConstructor(val.message);\n            // Wipe away the client-side stack trace.  Nothing to fill it in with\n            // because we don't serialize SSR stack traces for security reasons\n            error.stack = \"\";\n            serialized[key] = error;\n          } catch (e) {\n            // no-op - fall through and create a normal Error\n          }\n        }\n      }\n      if (serialized[key] == null) {\n        let error = new Error(val.message);\n        // Wipe away the client-side stack trace.  Nothing to fill it in with\n        // because we don't serialize SSR stack traces for security reasons\n        error.stack = \"\";\n        serialized[key] = error;\n      }\n    } else {\n      serialized[key] = val;\n    }\n  }\n  return serialized;\n}\nconst ViewTransitionContext = /*#__PURE__*/React.createContext({\n  isTransitioning: false\n});\nif (process.env.NODE_ENV !== \"production\") {\n  ViewTransitionContext.displayName = \"ViewTransition\";\n}\nconst FetchersContext = /*#__PURE__*/React.createContext(new Map());\nif (process.env.NODE_ENV !== \"production\") {\n  FetchersContext.displayName = \"Fetchers\";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n/**\n  Webpack + React 17 fails to compile on any of the following because webpack\n  complains that `startTransition` doesn't exist in `React`:\n  * import { startTransition } from \"react\"\n  * import * as React from from \"react\";\n    \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n  * import * as React from from \"react\";\n    \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n  Moving it to a constant such as the following solves the Webpack/React 17 issue:\n  * import * as React from from \"react\";\n    const START_TRANSITION = \"startTransition\";\n    START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n  However, that introduces webpack/terser minification issues in production builds\n  in React 18 where minification/obfuscation ends up removing the call of\n  React.startTransition entirely from the first half of the ternary.  Grabbing\n  this exported reference once up front resolves that issue.\n\n  See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\nconst FLUSH_SYNC = \"flushSync\";\nconst flushSyncImpl = ReactDOM[FLUSH_SYNC];\nconst USE_ID = \"useId\";\nconst useIdImpl = React[USE_ID];\nfunction startTransitionSafe(cb) {\n  if (startTransitionImpl) {\n    startTransitionImpl(cb);\n  } else {\n    cb();\n  }\n}\nfunction flushSyncSafe(cb) {\n  if (flushSyncImpl) {\n    flushSyncImpl(cb);\n  } else {\n    cb();\n  }\n}\nclass Deferred {\n  constructor() {\n    this.status = \"pending\";\n    this.promise = new Promise((resolve, reject) => {\n      this.resolve = value => {\n        if (this.status === \"pending\") {\n          this.status = \"resolved\";\n          resolve(value);\n        }\n      };\n      this.reject = reason => {\n        if (this.status === \"pending\") {\n          this.status = \"rejected\";\n          reject(reason);\n        }\n      };\n    });\n  }\n}\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n  let {\n    fallbackElement,\n    router,\n    future\n  } = _ref;\n  let [state, setStateImpl] = React.useState(router.state);\n  let [pendingState, setPendingState] = React.useState();\n  let [vtContext, setVtContext] = React.useState({\n    isTransitioning: false\n  });\n  let [renderDfd, setRenderDfd] = React.useState();\n  let [transition, setTransition] = React.useState();\n  let [interruption, setInterruption] = React.useState();\n  let fetcherData = React.useRef(new Map());\n  let {\n    v7_startTransition\n  } = future || {};\n  let optInStartTransition = React.useCallback(cb => {\n    if (v7_startTransition) {\n      startTransitionSafe(cb);\n    } else {\n      cb();\n    }\n  }, [v7_startTransition]);\n  let setState = React.useCallback((newState, _ref2) => {\n    let {\n      deletedFetchers,\n      flushSync: flushSync,\n      viewTransitionOpts: viewTransitionOpts\n    } = _ref2;\n    newState.fetchers.forEach((fetcher, key) => {\n      if (fetcher.data !== undefined) {\n        fetcherData.current.set(key, fetcher.data);\n      }\n    });\n    deletedFetchers.forEach(key => fetcherData.current.delete(key));\n    let isViewTransitionUnavailable = router.window == null || router.window.document == null || typeof router.window.document.startViewTransition !== \"function\";\n    // If this isn't a view transition or it's not available in this browser,\n    // just update and be done with it\n    if (!viewTransitionOpts || isViewTransitionUnavailable) {\n      if (flushSync) {\n        flushSyncSafe(() => setStateImpl(newState));\n      } else {\n        optInStartTransition(() => setStateImpl(newState));\n      }\n      return;\n    }\n    // flushSync + startViewTransition\n    if (flushSync) {\n      // Flush through the context to mark DOM elements as transition=ing\n      flushSyncSafe(() => {\n        // Cancel any pending transitions\n        if (transition) {\n          renderDfd && renderDfd.resolve();\n          transition.skipTransition();\n        }\n        setVtContext({\n          isTransitioning: true,\n          flushSync: true,\n          currentLocation: viewTransitionOpts.currentLocation,\n          nextLocation: viewTransitionOpts.nextLocation\n        });\n      });\n      // Update the DOM\n      let t = router.window.document.startViewTransition(() => {\n        flushSyncSafe(() => setStateImpl(newState));\n      });\n      // Clean up after the animation completes\n      t.finished.finally(() => {\n        flushSyncSafe(() => {\n          setRenderDfd(undefined);\n          setTransition(undefined);\n          setPendingState(undefined);\n          setVtContext({\n            isTransitioning: false\n          });\n        });\n      });\n      flushSyncSafe(() => setTransition(t));\n      return;\n    }\n    // startTransition + startViewTransition\n    if (transition) {\n      // Interrupting an in-progress transition, cancel and let everything flush\n      // out, and then kick off a new transition from the interruption state\n      renderDfd && renderDfd.resolve();\n      transition.skipTransition();\n      setInterruption({\n        state: newState,\n        currentLocation: viewTransitionOpts.currentLocation,\n        nextLocation: viewTransitionOpts.nextLocation\n      });\n    } else {\n      // Completed navigation update with opted-in view transitions, let 'er rip\n      setPendingState(newState);\n      setVtContext({\n        isTransitioning: true,\n        flushSync: false,\n        currentLocation: viewTransitionOpts.currentLocation,\n        nextLocation: viewTransitionOpts.nextLocation\n      });\n    }\n  }, [router.window, transition, renderDfd, fetcherData, optInStartTransition]);\n  // Need to use a layout effect here so we are subscribed early enough to\n  // pick up on any render-driven redirects/navigations (useEffect/<Navigate>)\n  React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n  // When we start a view transition, create a Deferred we can use for the\n  // eventual \"completed\" render\n  React.useEffect(() => {\n    if (vtContext.isTransitioning && !vtContext.flushSync) {\n      setRenderDfd(new Deferred());\n    }\n  }, [vtContext]);\n  // Once the deferred is created, kick off startViewTransition() to update the\n  // DOM and then wait on the Deferred to resolve (indicating the DOM update has\n  // happened)\n  React.useEffect(() => {\n    if (renderDfd && pendingState && router.window) {\n      let newState = pendingState;\n      let renderPromise = renderDfd.promise;\n      let transition = router.window.document.startViewTransition(async () => {\n        optInStartTransition(() => setStateImpl(newState));\n        await renderPromise;\n      });\n      transition.finished.finally(() => {\n        setRenderDfd(undefined);\n        setTransition(undefined);\n        setPendingState(undefined);\n        setVtContext({\n          isTransitioning: false\n        });\n      });\n      setTransition(transition);\n    }\n  }, [optInStartTransition, pendingState, renderDfd, router.window]);\n  // When the new location finally renders and is committed to the DOM, this\n  // effect will run to resolve the transition\n  React.useEffect(() => {\n    if (renderDfd && pendingState && state.location.key === pendingState.location.key) {\n      renderDfd.resolve();\n    }\n  }, [renderDfd, transition, state.location, pendingState]);\n  // If we get interrupted with a new navigation during a transition, we skip\n  // the active transition, let it cleanup, then kick it off again here\n  React.useEffect(() => {\n    if (!vtContext.isTransitioning && interruption) {\n      setPendingState(interruption.state);\n      setVtContext({\n        isTransitioning: true,\n        flushSync: false,\n        currentLocation: interruption.currentLocation,\n        nextLocation: interruption.nextLocation\n      });\n      setInterruption(undefined);\n    }\n  }, [vtContext.isTransitioning, interruption]);\n  React.useEffect(() => {\n    process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(fallbackElement == null || !router.future.v7_partialHydration, \"`<RouterProvider fallbackElement>` is deprecated when using \" + \"`v7_partialHydration`, use a `HydrateFallback` component instead\") : void 0;\n    // Only log this once on initial mount\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  let navigator = React.useMemo(() => {\n    return {\n      createHref: router.createHref,\n      encodeLocation: router.encodeLocation,\n      go: n => router.navigate(n),\n      push: (to, state, opts) => router.navigate(to, {\n        state,\n        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n      }),\n      replace: (to, state, opts) => router.navigate(to, {\n        replace: true,\n        state,\n        preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n      })\n    };\n  }, [router]);\n  let basename = router.basename || \"/\";\n  let dataRouterContext = React.useMemo(() => ({\n    router,\n    navigator,\n    static: false,\n    basename\n  }), [router, navigator, basename]);\n  let routerFuture = React.useMemo(() => ({\n    v7_relativeSplatPath: router.future.v7_relativeSplatPath\n  }), [router.future.v7_relativeSplatPath]);\n  React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future, router.future), [future, router.future]);\n  // The fragment and {null} here are important!  We need them to keep React 18's\n  // useId happy when we are server-rendering since we may have a <script> here\n  // containing the hydrated server-side staticContext (from StaticRouterProvider).\n  // useId relies on the component tree structure to generate deterministic id's\n  // so we need to ensure it remains the same on the client even though\n  // we don't need the <script> tag\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UNSAFE_DataRouterContext.Provider, {\n    value: dataRouterContext\n  }, /*#__PURE__*/React.createElement(UNSAFE_DataRouterStateContext.Provider, {\n    value: state\n  }, /*#__PURE__*/React.createElement(FetchersContext.Provider, {\n    value: fetcherData.current\n  }, /*#__PURE__*/React.createElement(ViewTransitionContext.Provider, {\n    value: vtContext\n  }, /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    location: state.location,\n    navigationType: state.historyAction,\n    navigator: navigator,\n    future: routerFuture\n  }, state.initialized || router.future.v7_partialHydration ? /*#__PURE__*/React.createElement(MemoizedDataRoutes, {\n    routes: router.routes,\n    future: router.future,\n    state: state\n  }) : fallbackElement))))), null);\n}\n// Memoize to avoid re-renders when updating `ViewTransitionContext`\nconst MemoizedDataRoutes = /*#__PURE__*/React.memo(DataRoutes);\nfunction DataRoutes(_ref3) {\n  let {\n    routes,\n    future,\n    state\n  } = _ref3;\n  return UNSAFE_useRoutesImpl(routes, undefined, state, future);\n}\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nfunction BrowserRouter(_ref4) {\n  let {\n    basename,\n    children,\n    future,\n    window\n  } = _ref4;\n  let historyRef = React.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createBrowserHistory({\n      window,\n      v5Compat: true\n    });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React.useState({\n    action: history.action,\n    location: history.location\n  });\n  let {\n    v7_startTransition\n  } = future || {};\n  let setState = React.useCallback(newState => {\n    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n  }, [setStateImpl, v7_startTransition]);\n  React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);\n  return /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    children: children,\n    location: state.location,\n    navigationType: state.action,\n    navigator: history,\n    future: future\n  });\n}\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nfunction HashRouter(_ref5) {\n  let {\n    basename,\n    children,\n    future,\n    window\n  } = _ref5;\n  let historyRef = React.useRef();\n  if (historyRef.current == null) {\n    historyRef.current = createHashHistory({\n      window,\n      v5Compat: true\n    });\n  }\n  let history = historyRef.current;\n  let [state, setStateImpl] = React.useState({\n    action: history.action,\n    location: history.location\n  });\n  let {\n    v7_startTransition\n  } = future || {};\n  let setState = React.useCallback(newState => {\n    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n  }, [setStateImpl, v7_startTransition]);\n  React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);\n  return /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    children: children,\n    location: state.location,\n    navigationType: state.action,\n    navigator: history,\n    future: future\n  });\n}\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter(_ref6) {\n  let {\n    basename,\n    children,\n    future,\n    history\n  } = _ref6;\n  let [state, setStateImpl] = React.useState({\n    action: history.action,\n    location: history.location\n  });\n  let {\n    v7_startTransition\n  } = future || {};\n  let setState = React.useCallback(newState => {\n    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n  }, [setStateImpl, v7_startTransition]);\n  React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n  React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);\n  return /*#__PURE__*/React.createElement(Router, {\n    basename: basename,\n    children: children,\n    location: state.location,\n    navigationType: state.action,\n    navigator: history,\n    future: future\n  });\n}\nif (process.env.NODE_ENV !== \"production\") {\n  HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n/**\n * The public API for rendering a history-aware `<a>`.\n */\nconst Link = /*#__PURE__*/React.forwardRef(function LinkWithRef(_ref7, ref) {\n  let {\n      onClick,\n      relative,\n      reloadDocument,\n      replace,\n      state,\n      target,\n      to,\n      preventScrollReset,\n      viewTransition\n    } = _ref7,\n    rest = _objectWithoutPropertiesLoose(_ref7, _excluded);\n  let {\n    basename\n  } = React.useContext(UNSAFE_NavigationContext);\n  // Rendered into <a href> for absolute URLs\n  let absoluteHref;\n  let isExternal = false;\n  if (typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to)) {\n    // Render the absolute href server- and client-side\n    absoluteHref = to;\n    // Only check for external origins client-side\n    if (isBrowser) {\n      try {\n        let currentUrl = new URL(window.location.href);\n        let targetUrl = to.startsWith(\"//\") ? new URL(currentUrl.protocol + to) : new URL(to);\n        let path = stripBasename(targetUrl.pathname, basename);\n        if (targetUrl.origin === currentUrl.origin && path != null) {\n          // Strip the protocol/origin/basename for same-origin absolute URLs\n          to = path + targetUrl.search + targetUrl.hash;\n        } else {\n          isExternal = true;\n        }\n      } catch (e) {\n        // We can't do external URL detection without a valid URL\n        process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"<Link to=\\\"\" + to + \"\\\"> contains an invalid URL which will probably break \" + \"when clicked - please update to a valid URL path.\") : void 0;\n      }\n    }\n  }\n  // Rendered into <a href> for relative URLs\n  let href = useHref(to, {\n    relative\n  });\n  let internalOnClick = useLinkClickHandler(to, {\n    replace,\n    state,\n    target,\n    preventScrollReset,\n    relative,\n    viewTransition\n  });\n  function handleClick(event) {\n    if (onClick) onClick(event);\n    if (!event.defaultPrevented) {\n      internalOnClick(event);\n    }\n  }\n  return (\n    /*#__PURE__*/\n    // eslint-disable-next-line jsx-a11y/anchor-has-content\n    React.createElement(\"a\", _extends({}, rest, {\n      href: absoluteHref || href,\n      onClick: isExternal || reloadDocument ? onClick : handleClick,\n      ref: ref,\n      target: target\n    }))\n  );\n});\nif (process.env.NODE_ENV !== \"production\") {\n  Link.displayName = \"Link\";\n}\n/**\n * A `<Link>` wrapper that knows if it's \"active\" or not.\n */\nconst NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref8, ref) {\n  let {\n      \"aria-current\": ariaCurrentProp = \"page\",\n      caseSensitive = false,\n      className: classNameProp = \"\",\n      end = false,\n      style: styleProp,\n      to,\n      viewTransition,\n      children\n    } = _ref8,\n    rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);\n  let path = useResolvedPath(to, {\n    relative: rest.relative\n  });\n  let location = useLocation();\n  let routerState = React.useContext(UNSAFE_DataRouterStateContext);\n  let {\n    navigator,\n    basename\n  } = React.useContext(UNSAFE_NavigationContext);\n  let isTransitioning = routerState != null &&\n  // Conditional usage is OK here because the usage of a data router is static\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  useViewTransitionState(path) && viewTransition === true;\n  let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;\n  let locationPathname = location.pathname;\n  let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;\n  if (!caseSensitive) {\n    locationPathname = locationPathname.toLowerCase();\n    nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;\n    toPathname = toPathname.toLowerCase();\n  }\n  if (nextLocationPathname && basename) {\n    nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;\n  }\n  // If the `to` has a trailing slash, look at that exact spot.  Otherwise,\n  // we're looking for a slash _after_ what's in `to`.  For example:\n  //\n  // <NavLink to=\"/users\"> and <NavLink to=\"/users/\">\n  // both want to look for a / at index 6 to match URL `/users/matt`\n  const endSlashPosition = toPathname !== \"/\" && toPathname.endsWith(\"/\") ? toPathname.length - 1 : toPathname.length;\n  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === \"/\";\n  let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === \"/\");\n  let renderProps = {\n    isActive,\n    isPending,\n    isTransitioning\n  };\n  let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n  let className;\n  if (typeof classNameProp === \"function\") {\n    className = classNameProp(renderProps);\n  } else {\n    // If the className prop is not a function, we use a default `active`\n    // class for <NavLink />s that are active. In v5 `active` was the default\n    // value for `activeClassName`, but we are removing that API and can still\n    // use the old default behavior for a cleaner upgrade path and keep the\n    // simple styling rules working as they currently do.\n    className = [classNameProp, isActive ? \"active\" : null, isPending ? \"pending\" : null, isTransitioning ? \"transitioning\" : null].filter(Boolean).join(\" \");\n  }\n  let style = typeof styleProp === \"function\" ? styleProp(renderProps) : styleProp;\n  return /*#__PURE__*/React.createElement(Link, _extends({}, rest, {\n    \"aria-current\": ariaCurrent,\n    className: className,\n    ref: ref,\n    style: style,\n    to: to,\n    viewTransition: viewTransition\n  }), typeof children === \"function\" ? children(renderProps) : children);\n});\nif (process.env.NODE_ENV !== \"production\") {\n  NavLink.displayName = \"NavLink\";\n}\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nconst Form = /*#__PURE__*/React.forwardRef((_ref9, forwardedRef) => {\n  let {\n      fetcherKey,\n      navigate,\n      reloadDocument,\n      replace,\n      state,\n      method = defaultMethod,\n      action,\n      onSubmit,\n      relative,\n      preventScrollReset,\n      viewTransition\n    } = _ref9,\n    props = _objectWithoutPropertiesLoose(_ref9, _excluded3);\n  let submit = useSubmit();\n  let formAction = useFormAction(action, {\n    relative\n  });\n  let formMethod = method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n  let submitHandler = event => {\n    onSubmit && onSubmit(event);\n    if (event.defaultPrevented) return;\n    event.preventDefault();\n    let submitter = event.nativeEvent.submitter;\n    let submitMethod = (submitter == null ? void 0 : submitter.getAttribute(\"formmethod\")) || method;\n    submit(submitter || event.currentTarget, {\n      fetcherKey,\n      method: submitMethod,\n      navigate,\n      replace,\n      state,\n      relative,\n      preventScrollReset,\n      viewTransition\n    });\n  };\n  return /*#__PURE__*/React.createElement(\"form\", _extends({\n    ref: forwardedRef,\n    method: formMethod,\n    action: formAction,\n    onSubmit: reloadDocument ? onSubmit : submitHandler\n  }, props));\n});\nif (process.env.NODE_ENV !== \"production\") {\n  Form.displayName = \"Form\";\n}\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\nfunction ScrollRestoration(_ref10) {\n  let {\n    getKey,\n    storageKey\n  } = _ref10;\n  useScrollRestoration({\n    getKey,\n    storageKey\n  });\n  return null;\n}\nif (process.env.NODE_ENV !== \"production\") {\n  ScrollRestoration.displayName = \"ScrollRestoration\";\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\nvar DataRouterHook;\n(function (DataRouterHook) {\n  DataRouterHook[\"UseScrollRestoration\"] = \"useScrollRestoration\";\n  DataRouterHook[\"UseSubmit\"] = \"useSubmit\";\n  DataRouterHook[\"UseSubmitFetcher\"] = \"useSubmitFetcher\";\n  DataRouterHook[\"UseFetcher\"] = \"useFetcher\";\n  DataRouterHook[\"useViewTransitionState\"] = \"useViewTransitionState\";\n})(DataRouterHook || (DataRouterHook = {}));\nvar DataRouterStateHook;\n(function (DataRouterStateHook) {\n  DataRouterStateHook[\"UseFetcher\"] = \"useFetcher\";\n  DataRouterStateHook[\"UseFetchers\"] = \"useFetchers\";\n  DataRouterStateHook[\"UseScrollRestoration\"] = \"useScrollRestoration\";\n})(DataRouterStateHook || (DataRouterStateHook = {}));\n// Internal hooks\nfunction getDataRouterConsoleError(hookName) {\n  return hookName + \" must be used within a data router.  See https://reactrouter.com/v6/routers/picking-a-router.\";\n}\nfunction useDataRouterContext(hookName) {\n  let ctx = React.useContext(UNSAFE_DataRouterContext);\n  !ctx ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n  return ctx;\n}\nfunction useDataRouterState(hookName) {\n  let state = React.useContext(UNSAFE_DataRouterStateContext);\n  !state ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n  return state;\n}\n// External hooks\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nfunction useLinkClickHandler(to, _temp) {\n  let {\n    target,\n    replace: replaceProp,\n    state,\n    preventScrollReset,\n    relative,\n    viewTransition\n  } = _temp === void 0 ? {} : _temp;\n  let navigate = useNavigate();\n  let location = useLocation();\n  let path = useResolvedPath(to, {\n    relative\n  });\n  return React.useCallback(event => {\n    if (shouldProcessLinkClick(event, target)) {\n      event.preventDefault();\n      // If the URL hasn't changed, a regular <a> will do a replace instead of\n      // a push, so do the same here unless the replace prop is explicitly set\n      let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);\n      navigate(to, {\n        replace,\n        state,\n        preventScrollReset,\n        relative,\n        viewTransition\n      });\n    }\n  }, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);\n}\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nfunction useSearchParams(defaultInit) {\n  process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(typeof URLSearchParams !== \"undefined\", \"You cannot use the `useSearchParams` hook in a browser that does not \" + \"support the URLSearchParams API. If you need to support Internet \" + \"Explorer 11, we recommend you load a polyfill such as \" + \"https://github.com/ungap/url-search-params.\") : void 0;\n  let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n  let hasSetSearchParamsRef = React.useRef(false);\n  let location = useLocation();\n  let searchParams = React.useMemo(() =>\n  // Only merge in the defaults if we haven't yet called setSearchParams.\n  // Once we call that we want those to take precedence, otherwise you can't\n  // remove a param with setSearchParams({}) if it has an initial value\n  getSearchParamsForLocation(location.search, hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current), [location.search]);\n  let navigate = useNavigate();\n  let setSearchParams = React.useCallback((nextInit, navigateOptions) => {\n    const newSearchParams = createSearchParams(typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit);\n    hasSetSearchParamsRef.current = true;\n    navigate(\"?\" + newSearchParams, navigateOptions);\n  }, [navigate, searchParams]);\n  return [searchParams, setSearchParams];\n}\nfunction validateClientSideSubmission() {\n  if (typeof document === \"undefined\") {\n    throw new Error(\"You are calling submit during the server render. \" + \"Try calling submit within a `useEffect` or callback instead.\");\n  }\n}\nlet fetcherId = 0;\nlet getUniqueFetcherId = () => \"__\" + String(++fetcherId) + \"__\";\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nfunction useSubmit() {\n  let {\n    router\n  } = useDataRouterContext(DataRouterHook.UseSubmit);\n  let {\n    basename\n  } = React.useContext(UNSAFE_NavigationContext);\n  let currentRouteId = UNSAFE_useRouteId();\n  return React.useCallback(function (target, options) {\n    if (options === void 0) {\n      options = {};\n    }\n    validateClientSideSubmission();\n    let {\n      action,\n      method,\n      encType,\n      formData,\n      body\n    } = getFormSubmissionInfo(target, basename);\n    if (options.navigate === false) {\n      let key = options.fetcherKey || getUniqueFetcherId();\n      router.fetch(key, currentRouteId, options.action || action, {\n        preventScrollReset: options.preventScrollReset,\n        formData,\n        body,\n        formMethod: options.method || method,\n        formEncType: options.encType || encType,\n        flushSync: options.flushSync\n      });\n    } else {\n      router.navigate(options.action || action, {\n        preventScrollReset: options.preventScrollReset,\n        formData,\n        body,\n        formMethod: options.method || method,\n        formEncType: options.encType || encType,\n        replace: options.replace,\n        state: options.state,\n        fromRouteId: currentRouteId,\n        flushSync: options.flushSync,\n        viewTransition: options.viewTransition\n      });\n    }\n  }, [router, basename, currentRouteId]);\n}\n// v7: Eventually we should deprecate this entirely in favor of using the\n// router method directly?\nfunction useFormAction(action, _temp2) {\n  let {\n    relative\n  } = _temp2 === void 0 ? {} : _temp2;\n  let {\n    basename\n  } = React.useContext(UNSAFE_NavigationContext);\n  let routeContext = React.useContext(UNSAFE_RouteContext);\n  !routeContext ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"useFormAction must be used inside a RouteContext\") : UNSAFE_invariant(false) : void 0;\n  let [match] = routeContext.matches.slice(-1);\n  // Shallow clone path so we can modify it below, otherwise we modify the\n  // object referenced by useMemo inside useResolvedPath\n  let path = _extends({}, useResolvedPath(action ? action : \".\", {\n    relative\n  }));\n  // If no action was specified, browsers will persist current search params\n  // when determining the path, so match that behavior\n  // https://github.com/remix-run/remix/issues/927\n  let location = useLocation();\n  if (action == null) {\n    // Safe to write to this directly here since if action was undefined, we\n    // would have called useResolvedPath(\".\") which will never include a search\n    path.search = location.search;\n    // When grabbing search params from the URL, remove any included ?index param\n    // since it might not apply to our contextual route.  We add it back based\n    // on match.route.index below\n    let params = new URLSearchParams(path.search);\n    let indexValues = params.getAll(\"index\");\n    let hasNakedIndexParam = indexValues.some(v => v === \"\");\n    if (hasNakedIndexParam) {\n      params.delete(\"index\");\n      indexValues.filter(v => v).forEach(v => params.append(\"index\", v));\n      let qs = params.toString();\n      path.search = qs ? \"?\" + qs : \"\";\n    }\n  }\n  if ((!action || action === \".\") && match.route.index) {\n    path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n  }\n  // If we're operating within a basename, prepend it to the pathname prior\n  // to creating the form action.  If this is a root navigation, then just use\n  // the raw basename which allows the basename to have full control over the\n  // presence of a trailing slash on root actions\n  if (basename !== \"/\") {\n    path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n  }\n  return createPath(path);\n}\n// TODO: (v7) Change the useFetcher generic default from `any` to `unknown`\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\nfunction useFetcher(_temp3) {\n  var _route$matches;\n  let {\n    key\n  } = _temp3 === void 0 ? {} : _temp3;\n  let {\n    router\n  } = useDataRouterContext(DataRouterHook.UseFetcher);\n  let state = useDataRouterState(DataRouterStateHook.UseFetcher);\n  let fetcherData = React.useContext(FetchersContext);\n  let route = React.useContext(UNSAFE_RouteContext);\n  let routeId = (_route$matches = route.matches[route.matches.length - 1]) == null ? void 0 : _route$matches.route.id;\n  !fetcherData ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"useFetcher must be used inside a FetchersContext\") : UNSAFE_invariant(false) : void 0;\n  !route ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"useFetcher must be used inside a RouteContext\") : UNSAFE_invariant(false) : void 0;\n  !(routeId != null) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"useFetcher can only be used on routes that contain a unique \\\"id\\\"\") : UNSAFE_invariant(false) : void 0;\n  // Fetcher key handling\n  // OK to call conditionally to feature detect `useId`\n  // eslint-disable-next-line react-hooks/rules-of-hooks\n  let defaultKey = useIdImpl ? useIdImpl() : \"\";\n  let [fetcherKey, setFetcherKey] = React.useState(key || defaultKey);\n  if (key && key !== fetcherKey) {\n    setFetcherKey(key);\n  } else if (!fetcherKey) {\n    // We will only fall through here when `useId` is not available\n    setFetcherKey(getUniqueFetcherId());\n  }\n  // Registration/cleanup\n  React.useEffect(() => {\n    router.getFetcher(fetcherKey);\n    return () => {\n      // Tell the router we've unmounted - if v7_fetcherPersist is enabled this\n      // will not delete immediately but instead queue up a delete after the\n      // fetcher returns to an `idle` state\n      router.deleteFetcher(fetcherKey);\n    };\n  }, [router, fetcherKey]);\n  // Fetcher additions\n  let load = React.useCallback((href, opts) => {\n    !routeId ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"No routeId available for fetcher.load()\") : UNSAFE_invariant(false) : void 0;\n    router.fetch(fetcherKey, routeId, href, opts);\n  }, [fetcherKey, routeId, router]);\n  let submitImpl = useSubmit();\n  let submit = React.useCallback((target, opts) => {\n    submitImpl(target, _extends({}, opts, {\n      navigate: false,\n      fetcherKey\n    }));\n  }, [fetcherKey, submitImpl]);\n  let FetcherForm = React.useMemo(() => {\n    let FetcherForm = /*#__PURE__*/React.forwardRef((props, ref) => {\n      return /*#__PURE__*/React.createElement(Form, _extends({}, props, {\n        navigate: false,\n        fetcherKey: fetcherKey,\n        ref: ref\n      }));\n    });\n    if (process.env.NODE_ENV !== \"production\") {\n      FetcherForm.displayName = \"fetcher.Form\";\n    }\n    return FetcherForm;\n  }, [fetcherKey]);\n  // Exposed FetcherWithComponents\n  let fetcher = state.fetchers.get(fetcherKey) || IDLE_FETCHER;\n  let data = fetcherData.get(fetcherKey);\n  let fetcherWithComponents = React.useMemo(() => _extends({\n    Form: FetcherForm,\n    submit,\n    load\n  }, fetcher, {\n    data\n  }), [FetcherForm, submit, load, fetcher, data]);\n  return fetcherWithComponents;\n}\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\nfunction useFetchers() {\n  let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n  return Array.from(state.fetchers.entries()).map(_ref11 => {\n    let [key, fetcher] = _ref11;\n    return _extends({}, fetcher, {\n      key\n    });\n  });\n}\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions = {};\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration(_temp4) {\n  let {\n    getKey,\n    storageKey\n  } = _temp4 === void 0 ? {} : _temp4;\n  let {\n    router\n  } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n  let {\n    restoreScrollPosition,\n    preventScrollReset\n  } = useDataRouterState(DataRouterStateHook.UseScrollRestoration);\n  let {\n    basename\n  } = React.useContext(UNSAFE_NavigationContext);\n  let location = useLocation();\n  let matches = useMatches();\n  let navigation = useNavigation();\n  // Trigger manual scroll restoration while we're active\n  React.useEffect(() => {\n    window.history.scrollRestoration = \"manual\";\n    return () => {\n      window.history.scrollRestoration = \"auto\";\n    };\n  }, []);\n  // Save positions on pagehide\n  usePageHide(React.useCallback(() => {\n    if (navigation.state === \"idle\") {\n      let key = (getKey ? getKey(location, matches) : null) || location.key;\n      savedScrollPositions[key] = window.scrollY;\n    }\n    try {\n      sessionStorage.setItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY, JSON.stringify(savedScrollPositions));\n    } catch (error) {\n      process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, \"Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (\" + error + \").\") : void 0;\n    }\n    window.history.scrollRestoration = \"auto\";\n  }, [storageKey, getKey, navigation.state, location, matches]));\n  // Read in any saved scroll locations\n  if (typeof document !== \"undefined\") {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useLayoutEffect(() => {\n      try {\n        let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);\n        if (sessionPositions) {\n          savedScrollPositions = JSON.parse(sessionPositions);\n        }\n      } catch (e) {\n        // no-op, use default empty object\n      }\n    }, [storageKey]);\n    // Enable scroll restoration in the router\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useLayoutEffect(() => {\n      let getKeyWithoutBasename = getKey && basename !== \"/\" ? (location, matches) => getKey( // Strip the basename to match useLocation()\n      _extends({}, location, {\n        pathname: stripBasename(location.pathname, basename) || location.pathname\n      }), matches) : getKey;\n      let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKeyWithoutBasename);\n      return () => disableScrollRestoration && disableScrollRestoration();\n    }, [router, basename, getKey]);\n    // Restore scrolling when state.restoreScrollPosition changes\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    React.useLayoutEffect(() => {\n      // Explicit false means don't do anything (used for submissions)\n      if (restoreScrollPosition === false) {\n        return;\n      }\n      // been here before, scroll to it\n      if (typeof restoreScrollPosition === \"number\") {\n        window.scrollTo(0, restoreScrollPosition);\n        return;\n      }\n      // try to scroll to the hash\n      if (location.hash) {\n        let el = document.getElementById(decodeURIComponent(location.hash.slice(1)));\n        if (el) {\n          el.scrollIntoView();\n          return;\n        }\n      }\n      // Don't reset if this navigation opted out\n      if (preventScrollReset === true) {\n        return;\n      }\n      // otherwise go to the top on new locations\n      window.scrollTo(0, 0);\n    }, [location, restoreScrollPosition, preventScrollReset]);\n  }\n}\n/**\n * Setup a callback to be fired on the window's `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction useBeforeUnload(callback, options) {\n  let {\n    capture\n  } = options || {};\n  React.useEffect(() => {\n    let opts = capture != null ? {\n      capture\n    } : undefined;\n    window.addEventListener(\"beforeunload\", callback, opts);\n    return () => {\n      window.removeEventListener(\"beforeunload\", callback, opts);\n    };\n  }, [callback, capture]);\n}\n/**\n * Setup a callback to be fired on the window's `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.  This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(callback, options) {\n  let {\n    capture\n  } = options || {};\n  React.useEffect(() => {\n    let opts = capture != null ? {\n      capture\n    } : undefined;\n    window.addEventListener(\"pagehide\", callback, opts);\n    return () => {\n      window.removeEventListener(\"pagehide\", callback, opts);\n    };\n  }, [callback, capture]);\n}\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open.  Use at your own risk.\n */\nfunction usePrompt(_ref12) {\n  let {\n    when,\n    message\n  } = _ref12;\n  let blocker = useBlocker(when);\n  React.useEffect(() => {\n    if (blocker.state === \"blocked\") {\n      let proceed = window.confirm(message);\n      if (proceed) {\n        // This timeout is needed to avoid a weird \"race\" on POP navigations\n        // between the `window.history` revert navigation and the result of\n        // `window.confirm`\n        setTimeout(blocker.proceed, 0);\n      } else {\n        blocker.reset();\n      }\n    }\n  }, [blocker, message]);\n  React.useEffect(() => {\n    if (blocker.state === \"blocked\" && !when) {\n      blocker.reset();\n    }\n  }, [blocker, when]);\n}\n/**\n * Return a boolean indicating if there is an active view transition to the\n * given href.  You can use this value to render CSS classes or viewTransitionName\n * styles onto your elements\n *\n * @param href The destination href\n * @param [opts.relative] Relative routing type (\"route\" | \"path\")\n */\nfunction useViewTransitionState(to, opts) {\n  if (opts === void 0) {\n    opts = {};\n  }\n  let vtContext = React.useContext(ViewTransitionContext);\n  !(vtContext != null) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  \" + \"Did you accidentally import `RouterProvider` from `react-router`?\") : UNSAFE_invariant(false) : void 0;\n  let {\n    basename\n  } = useDataRouterContext(DataRouterHook.useViewTransitionState);\n  let path = useResolvedPath(to, {\n    relative: opts.relative\n  });\n  if (!vtContext.isTransitioning) {\n    return false;\n  }\n  let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;\n  let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;\n  // Transition is active if we're going to or coming from the indicated\n  // destination.  This ensures that other PUSH navigations that reverse\n  // an indicated transition apply.  I.e., on the list view you have:\n  //\n  //   <NavLink to=\"/details/1\" viewTransition>\n  //\n  // If you click the breadcrumb back to the list view:\n  //\n  //   <NavLink to=\"/list\" viewTransition>\n  //\n  // We should apply the transition because it's indicated as active going\n  // from /list -> /details/1 and therefore should be active on the reverse\n  // (even though this isn't strictly a POP reverse)\n  return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;\n}\n//#endregion\n\nexport { BrowserRouter, Form, HashRouter, Link, NavLink, RouterProvider, ScrollRestoration, FetchersContext as UNSAFE_FetchersContext, ViewTransitionContext as UNSAFE_ViewTransitionContext, useScrollRestoration as UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createSearchParams, HistoryRouter as unstable_HistoryRouter, usePrompt as unstable_usePrompt, useBeforeUnload, useFetcher, useFetchers, useFormAction, useLinkClickHandler, useSearchParams, useSubmit, useViewTransitionState };\n//# sourceMappingURL=index.js.map\n","export const getRawQueryParams = () => {\n    if (typeof window === 'undefined') return {}\n\n    return getRawQueryParamsFromUrl(window.location.href)\n}\n\nexport const getRawQueryParamsFromUrl = (url: string) => {\n    const search = new URL(url).search\n    const params = new URLSearchParams(search)\n    const queryParams: Record<string, string> = {}\n    for (const [key, value] of params) {\n        queryParams[key] = decodeURIComponent(value)\n    }\n    return queryParams\n}\n\nexport const setQueryParam = (key: string, value: string | undefined) => {\n    const search = window.location.search\n    const params = new URLSearchParams(search)\n    if (value === undefined) {\n        params.delete(key)\n    } else {\n        params.set(key, value)\n    }\n    window.history.replaceState({}, '', `${window.location.pathname}?${params}`)\n}\n\nexport const queryParamKeys = {\n    userId: 'userId',\n    email: 'email',\n    accessKey: 'accessKey',\n    secret: 'secret',\n}\n\nexport const getUserId = () => getRawQueryParams()[queryParamKeys.userId]\nexport const setUserId = (userId: string) => setQueryParam(queryParamKeys.userId, userId)\n\nexport const getEmail = () => getRawQueryParams()[queryParamKeys.email]\nexport const setEmail = (email: string) => setQueryParam(queryParamKeys.email, email)\n","import {getRawQueryParams, getRawQueryParamsFromUrl} from \"../data/url/query-params.mts\";\n\nexport const PARTNERS = [\n    'ping',\n    'taylormade',\n    'clubchampion-instore',\n    'golfweek',\n    'clubchampion',\n    'cobra',\n    'dunlopsports',\n    'mmg',\n    'easports',\n    'referrals',\n    'skillest',\n    'affiliate',\n    'gbc',\n    'tpc',\n    'cap-in-app',\n    'za',\n    'titleist',\n    'team-titleist',\n    'onsite',\n    'smart-laser',\n    'link-pro'\n] as const\nexport type Partner = typeof PARTNERS[number]\n\nexport const isValidPartner = (str: string): str is Partner => {\n    return PARTNERS.includes(str as Partner)\n}\n\nexport const TAYLORMADE_DOMAINS = [\n    'taylormade.local.arccosgolf.com',\n    'taylormade.dev.arccosgolf.com',\n    'taylormade.arccosgolf.com',\n]\nexport const PING_DOMAINS = [\n    'ping.local.arccosgolf.com',\n    'ping.dev.arccosgolf.com',\n    'ping.arccosgolf.com',\n]\nexport const CLUB_CHAMPION_INSTORE_DOMAINS = [\n    'instore.clubchampion.local.arccosgolf.com',\n    'instore.clubchampion.dev.arccosgolf.com',\n    'instore.clubchampion.arccosgolf.com',\n]\nexport const SENSORLESS_DOMAINS = [\n    'trynow.local.arccosgolf.com',\n    'trynow.dev.arccosgolf.com',\n    'trynow.arccosgolf.com',\n]\nexport const CLUB_CHAMPION_DOMAINS = [\n    'clubchampion.local.arccosgolf.com',\n    'clubchampion.dev.arccosgolf.com',\n    'clubchampion.arccosgolf.com',\n]\nexport const COBRA_DOMAINS = [\n    'cobra.local.arccosgolf.com',\n    'cobra.dev.arccosgolf.com',\n    'cobra.arccosgolf.com',\n]\nexport const DUNLOP_SPORTS_DOMAINS = [\n    'dunlopsports.local.arccosgolf.com',\n    'dunlopsports.dev.arccosgolf.com',\n    'dunlopsports.arccosgolf.com',\n]\nexport const MMG_DOMAINS = [\n    'mmg.local.arccosgolf.com',\n    'mmg.dev.arccosgolf.com',\n    'mmg.arccosgolf.com',\n]\nexport const EA_SPORTS_DOMAINS = [\n    'easports.local.arccosgolf.com',\n    'easports.dev.arccosgolf.com',\n    'easports.arccosgolf.com',\n]\nexport const REFERRALS_DOMAINS = [\n    'join.local.arccosgolf.com',\n    'join.dev.arccosgolf.com',\n    'join.arccosgolf.com',\n]\nexport const SKILLEST_DOMAINS = [\n    'skillest.local.arccosgolf.com',\n    'skillest.dev.arccosgolf.com',\n    'skillest.arccosgolf.com',\n]\nexport const TITLEIST_DOMAINS = [\n    'titleist.local.arccosgolf.com',\n    'titleist.dev.arccosgolf.com',\n    'titleist.arccosgolf.com',\n]\nexport const TEAM_TITLEIST_DOMAINS = [\n    'team-titleist.local.arccosgolf.com',\n    'team-titleist.dev.arccosgolf.com',\n    'team-titleist.arccosgolf.com',\n]\nexport const AFFILIATE_DOMAINS = [\n    'subscribe.local.arccosgolf.com',\n    'subscribe.dev.arccosgolf.com',\n    'subscribe.arccosgolf.com',\n    'activate.local.arccosgolf.com',\n    'activate.dev.arccosgolf.com',\n    'activate.arccosgolf.com',\n]\n\nconst getPartnerFromDomainFromUrl = (url: string): Partner | undefined => {\n    const host = new URL(url).hostname\n    if (TAYLORMADE_DOMAINS.includes(host)) {\n        return 'taylormade'\n    }\n    if (PING_DOMAINS.includes(host)) {\n        return 'ping'\n    }\n    if (CLUB_CHAMPION_INSTORE_DOMAINS.includes(host)) {\n        return 'clubchampion-instore'\n    }\n    if (CLUB_CHAMPION_DOMAINS.includes(host)) {\n        return 'clubchampion'\n    }\n    if (COBRA_DOMAINS.includes(host)) {\n        return 'cobra'\n    }\n    if (DUNLOP_SPORTS_DOMAINS.includes(host)) {\n        return 'dunlopsports'\n    }\n    if (MMG_DOMAINS.includes(host)) {\n        return 'mmg'\n    }\n    if (EA_SPORTS_DOMAINS.includes(host)) {\n        return 'easports'\n    }\n    if (REFERRALS_DOMAINS.includes(host)) {\n        return 'referrals'\n    }\n    if (SKILLEST_DOMAINS.includes(host)) {\n        return 'skillest'\n    }\n    if (TITLEIST_DOMAINS.includes(host)) {\n        return 'titleist'\n    }\n    if (TEAM_TITLEIST_DOMAINS.includes(host)) {\n        return 'team-titleist'\n    }\n    if (AFFILIATE_DOMAINS.includes(host)) {\n        return 'affiliate'\n    }\n    return undefined\n}\n\nexport const getPathPartnerFromWindowLocation = (): Partner | undefined => {\n    return getPathPartnerFromUrl(window.location.href)\n}\n\nexport const getPathPartnerFromUrl = (url: string): Partner | undefined => {\n    const pathPartner = new URL(url).pathname.split('/')[1]\n    if (isValidPartner(pathPartner)) {\n        return pathPartner\n    }\n    return undefined\n}\n\nexport const getPartnerFromUrl = (url: string): Partner | undefined => {\n    const domainPartner = getPartnerFromDomainFromUrl(url)\n    const pathPartner = getPathPartnerFromUrl(url)\n    const queryParamPartner = getRawQueryParamsFromUrl(url).partner\n    if (pathPartner) {\n        return pathPartner\n    }\n    if (domainPartner) {\n        return domainPartner\n    }\n    if (queryParamPartner && isValidPartner(queryParamPartner)) {\n        return queryParamPartner\n    }\n}\n\nexport const getPartnerFromWindowLocation = (): Partner | undefined => {\n    if (typeof window === 'undefined') {\n        throw new Error('getPartnerFromWindowLocation called on server')\n    }\n    return getPartnerFromUrl(window.location.href)\n}\n\nexport const isSensorlessDomain = () => {\n    return SENSORLESS_DOMAINS.includes(window.location.hostname)\n}\n\nexport const isSensorlessDomainFromHost = (host: string) => {\n    return SENSORLESS_DOMAINS.includes(host)\n}\n\nexport const ONSITE_EVENT_PARTNERS: Partner[] = [\n    'team-titleist',\n    'onsite',\n]\n\nexport const isOnsiteEventPartner = (partner: Partner | string | undefined): boolean => {\n    return ONSITE_EVENT_PARTNERS.includes(partner as Partner)\n}\n\nconst ONSITE_VISUAL_PARENT: Partial<Record<Partner, Partner>> = {\n    'team-titleist': 'titleist',\n}\n\nexport const getStatsigPartner = (partner: string | undefined): string | undefined => {\n    return ONSITE_VISUAL_PARENT[partner as Partner] ?? partner\n}\nconst partnersWithSkillest: Partner[] = [\n    'ping',\n    'taylormade',\n    'clubchampion-instore',\n    'golfweek',\n    'clubchampion',\n    'cobra',\n    'dunlopsports',\n    // 'mmg',\n    'easports',\n    'referrals',\n    // 'skillest',\n    'affiliate',\n    'gbc',\n    'tpc',\n    'cap-in-app',\n    // 'za',\n    // 'titleist',\n]\n\nexport const getShouldOfferSkillest = () => {\n    const partner = getPartnerFromWindowLocation()\n    return partnersWithSkillest.includes(partner)\n}","import { useNavigate as realUseNavigate } from 'react-router-dom'\nimport {getPathPartnerFromUrl, getPathPartnerFromWindowLocation} from \"./partner-selectors.mjs\";\nimport {useCallback} from \"react\";\nexport enum Page {\n    LANDING_PAGE = '/',\n    PAYMENT = '/payment',\n    SUCCESS = '/success',\n}\n\ntype navigateOptions = {\n    to: Page\n    additionalParams?: Record<string, any>\n    includeHost?: boolean\n}\n\nexport const getUrlWithAdditionalParams = (options: navigateOptions) => {\n    const pathPartner = getPathPartnerFromWindowLocation()\n    const params = new URLSearchParams(window.location.search)\n    for (const [key, value] of Object.entries(options.additionalParams || {})) {\n        params.set(key, value)\n    }\n    return `${options.includeHost ? window.location.protocol + '//' + window.location.host : ''}${pathPartner ? `/${pathPartner}` : ''}${options.to}?${params.toString()}`\n}\n\nexport const useNavigate = (): (options: navigateOptions) => void => {\n    const navigate = realUseNavigate()\n    return useCallback((options) => {\n        navigate(getUrlWithAdditionalParams(options))\n    }, [navigate])\n}\n\nexport const isOnPage = (page: Page): boolean => {\n    return isOnPageWithLocation(page, window.location.pathname)\n}\n\nexport const isOnPageWithLocation = (page: Page, pathname: string): boolean => {\n    const pathPartner = getPathPartnerFromWindowLocation()\n    if (pathPartner) {\n        return pathname.replace(/\\/$/, '') === `/${pathPartner}${page}`.replace(/\\/$/, '')\n    }\n    return pathname === page\n}\n\nexport const getPageNameFromUrl = (url: string): string => {\n    const pathPartner = getPathPartnerFromUrl(url)\n    const path = new URL(url).pathname\n    if (pathPartner) {\n        return path.replace(`/${pathPartner}`, '') as Page\n    }\n    // return enum key from path\n    return Object.keys(Page).find(key => Page[key as keyof typeof Page] === path) as Page\n}\n\nexport const isOldIphone = () => {\n    const userAgent = navigator.userAgent\n\n    // Check if the device is an iPhone\n    if (/iPhone/i.test(userAgent)) {\n        // Extract the iPhone model\n        const match = userAgent.match(/iPhone OS (\\d+)/)\n\n        if (match?.[1]) {\n            const version = parseInt(match[1], 10)\n\n            // Redirect if the iPhone is iPhone 11 or earlier\n            if (version <= 13) { // iPhone 11 is on iOS 13 and below\n                return true\n            }\n        }\n    }\n    return false\n}\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar initialized = false;\r\nexports.init = function (pixelId, advancedMatching, options) {\r\n    if (advancedMatching === void 0) { advancedMatching = {}; }\r\n    if (options === void 0) { options = { autoConfig: true }; }\r\n    if (typeof window === 'undefined')\r\n        return initialized;\r\n    if (initialized)\r\n        return initialized;\r\n    if (typeof pixelId !== 'string' || pixelId.trim().length === 0)\r\n        throw new TypeError('pixelId should be a non empty \"string\"');\r\n    if (typeof advancedMatching !== 'object')\r\n        throw new TypeError('advancedMatching should be of type \"object\"');\r\n    if (typeof options !== 'object')\r\n        throw new TypeError('options should be of type \"object\"');\r\n    /* tslint:disable */\r\n    // Facebook Pixel Code -->\r\n    var v = (function (f, b, e, v, n, t, s) {\r\n        if (f.fbq)\r\n            return;\r\n        n = f.fbq = function () {\r\n            n.callMethod ?\r\n                n.callMethod.apply(n, arguments) : n.queue.push(arguments);\r\n        };\r\n        if (!f._fbq)\r\n            f._fbq = n;\r\n        n.push = n;\r\n        n.loaded = !0;\r\n        n.version = '2.0';\r\n        n.queue = [];\r\n        t = b.createElement(e);\r\n        t.async = !0;\r\n        t.src = v;\r\n        s = b.getElementsByTagName(e)[0];\r\n        s.parentNode.insertBefore(t, s);\r\n    })(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');\r\n    // End Facebook Pixel Code -->\r\n    /* tslint:enable */\r\n    var fbq = window.fbq;\r\n    fbq('track', 'PageView');\r\n    if (options.autoConfig === false) {\r\n        fbq('set', 'autoConfig', false, pixelId);\r\n    }\r\n    fbq('init', pixelId, advancedMatching);\r\n    initialized = true;\r\n    return initialized;\r\n};\r\nexports.track = function (trackType, options) {\r\n    if (typeof window !== 'undefined' && initialized && 'fbq' in window) {\r\n        if (options)\r\n            window.fbq('track', trackType, options);\r\n        else\r\n            window.fbq('track', trackType);\r\n        return true;\r\n    }\r\n    else {\r\n        return false;\r\n    }\r\n};\r\nexports.trackCustom = function (trackType, options) {\r\n    if (typeof window !== 'undefined' && initialized && 'fbq' in window) {\r\n        if (options)\r\n            window.fbq('trackCustom', trackType, options);\r\n        else\r\n            window.fbq('trackCustom', trackType);\r\n        return true;\r\n    }\r\n    else {\r\n        return false;\r\n    }\r\n};\r\n","/*!\n * Button Click tracking for Snowplow v3.24.6 (https://github.com/snowplow/snowplow-javascript-tracker)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { buildSelfDescribingEvent, removeEmptyProperties, resolveDynamicContext } from '@snowplow/tracker-core';\n\n/**\n * Convert any {@link Filter} or undefined into a {@link FilterFunction}\n *\n * @param filter - The filter to convert\n * @returns The filter function\n */\nfunction filterFunctionFromFilter(filter) {\n    // If a function is provided, return it as-is\n    if (typeof filter === 'function') {\n        return filter;\n    }\n    if (typeof filter === 'object') {\n        // If an allowlist is provided, return a function which matches the allowlist\n        if ('allowlist' in filter) {\n            return function (element) {\n                var classes = Array.from((element === null || element === void 0 ? void 0 : element.classList) || []);\n                return classes.some(function (className) { return filter.allowlist.includes(className); });\n            };\n        }\n        // If a denylist is provided, return a function which matches the denylist\n        if ('denylist' in filter) {\n            return function (element) {\n                var classes = Array.from((element === null || element === void 0 ? void 0 : element.classList) || []);\n                return !classes.some(function (className) { return filter.denylist.includes(className); });\n            };\n        }\n    }\n    // Return a function that will match all buttons if no filter is provided\n    return function () { return true; };\n}\n/**\n * Creates a {@link ButtonClickEvent} from a button element\n *\n * @param button - The button element to create the event from\n * @returns The button click event\n */\nfunction createEventFromButton(button) {\n    var ret = {};\n    if (button.tagName === 'INPUT') {\n        ret.label = button.dataset.spButtonLabel || button.value;\n    }\n    else {\n        ret.label = button.dataset.spButtonLabel || button.innerText;\n    }\n    button.id && (ret.id = button.id);\n    button.name && (ret.name = button.name);\n    button.classList.length && (ret.classes = Array.from(button.classList));\n    return ret;\n}\n\n/**\n * Build a Button Click Event\n * Used when a user clicks on a <button> tag on a webpage\n *\n * @param event - Contains the properties for the Button Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildButtonClick(event) {\n    var label = event.label, id = event.id, classes = event.classes, name = event.name;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/button_click/jsonschema/1-0-0',\n        data: removeEmptyProperties({ label: label, id: id, classes: classes, name: name })\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n\nvar _trackers = {};\n// The event listeners added to the document, for each tracker\n// This allows them to be removed with `removeEventListener` if button click tracking is disabled\nvar _listeners = {};\n/**\n * Button click tracking\n *\n * Will automatically tracking button clicks once enabled with 'enableButtonClickTracking'\n * or you can manually track button clicks with 'trackButtonClick'\n */\nfunction ButtonClickTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Manually log a click\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackButtonClick(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildButtonClick(event), event.context, event.timestamp);\n    });\n}\n/**\n * Enable automatic click tracking for all `<button>` and `<input type=\"button\">` elements on the page\n *\n * @param configuration  - The configuration for automatic button click tracking\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction enableButtonClickTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    // Ensure that click tracking uses the latest configuration\n    // In the case of `enableButtonClickTracking` being called multiple times in a row\n    disableButtonClickTracking();\n    trackers.forEach(function (trackerId) {\n        var _a, _b;\n        // Store the configuration for this tracker, if it doesn't already exist\n        // This allows us to enable click tracking for a tracker if it has been disabled\n        _listeners[trackerId] = function (event) {\n            eventHandler(event, trackerId, filterFunctionFromFilter(configuration.filter), configuration.context);\n        };\n        var addClickListener = function () {\n            document.addEventListener('click', _listeners[trackerId]);\n        };\n        if ((_a = _trackers[trackerId]) === null || _a === void 0 ? void 0 : _a.sharedState.hasLoaded) {\n            // the load event has already fired, add the click listeners now\n            addClickListener();\n        }\n        else {\n            // defer until page has loaded\n            (_b = _trackers[trackerId]) === null || _b === void 0 ? void 0 : _b.sharedState.registeredOnLoadHandlers.push(addClickListener);\n        }\n    });\n}\n/**\n * Disable automatic click tracking for all `<button>` and `<input type=\"button\">` elements on the page\n *\n * Can be re-enabled with {@link enableButtonClickTracking}\n */\nfunction disableButtonClickTracking() {\n    for (var trackerId in _trackers) {\n        if (_listeners[trackerId]) {\n            document.removeEventListener('click', _listeners[trackerId]);\n        }\n    }\n}\n/**\n * Handle a click event\n *\n * @param event - The click event\n * @param trackerId - The tracker identifier which the event will be sent to\n * @param filter - The filter function to use for button click tracking\n * @param context - The dynamic context which will be evaluated for each button click event\n */\nfunction eventHandler(event, trackerId, filter, context) {\n    var elem = event.target;\n    while (elem) {\n        if (elem instanceof HTMLButtonElement || (elem instanceof HTMLInputElement && elem.type === 'button')) {\n            if (filter(elem)) {\n                var buttonClickEvent = createEventFromButton(elem);\n                buttonClickEvent.context = resolveDynamicContext(context, buttonClickEvent);\n                trackButtonClick(buttonClickEvent, [trackerId]);\n            }\n            // presume nested buttons aren't a thing\n            return;\n        }\n        elem = elem.parentElement;\n    }\n}\n\nexport { ButtonClickTrackingPlugin, disableButtonClickTracking, enableButtonClickTracking, trackButtonClick };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches Client Hints to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nvar uaClientHints;\n/**\n * This function makes sure that the expected array is returned as an array instead of an object.\n * It handles a problem that in some cases the `navigator.userAgentData.brands` was returned as an object instead of array.\n */\nfunction forceArray(array) {\n    if (Array.isArray(array))\n        return array;\n    if (Object.prototype.toString.call(array) === '[object Object]') {\n        return Object.keys(array).map(function (e) {\n            return array[e];\n        });\n    }\n    return [];\n}\n/**\n * Returns the client-hints brands, ensuring no additional properties.\n */\nfunction getBrands(brands) {\n    return brands.map(function (b) {\n        var brand = b.brand, version = b.version;\n        return { brand: brand, version: version };\n    });\n}\n/**\n * Validates whether userAgentData is compliant to the client-hints interface.\n * https://wicg.github.io/ua-client-hints/#interface\n */\nfunction validClientHints(hints) {\n    if (!hints || typeof hints.isMobile !== 'boolean' || !Array.isArray(hints.brands)) {\n        return false;\n    }\n    if (hints.brands.length === 0 ||\n        hints.brands.some(function (brand) { return typeof brand.brand !== 'string' || typeof brand.version !== 'string'; })) {\n        return false;\n    }\n    return true;\n}\n/**\n * Attaches Client Hint information where available\n * @param includeHighEntropy - Should high entropy values be included\n */\nfunction ClientHintsPlugin(includeHighEntropy) {\n    var populateClientHints = function () {\n        var navigatorAlias = navigator;\n        var uaData = navigatorAlias.userAgentData;\n        if (uaData) {\n            var candidateHints_1;\n            candidateHints_1 = {\n                isMobile: uaData.mobile,\n                brands: getBrands(forceArray(uaData.brands))\n            };\n            if (includeHighEntropy && uaData.getHighEntropyValues) {\n                uaData\n                    .getHighEntropyValues(['platform', 'platformVersion', 'architecture', 'model', 'uaFullVersion'])\n                    .then(function (res) {\n                    candidateHints_1.architecture = res.architecture;\n                    candidateHints_1.model = res.model;\n                    candidateHints_1.platform = res.platform;\n                    candidateHints_1.uaFullVersion = res.uaFullVersion;\n                    candidateHints_1.platformVersion = res.platformVersion;\n                });\n            }\n            if (validClientHints(candidateHints_1)) {\n                uaClientHints = candidateHints_1;\n            }\n        }\n    };\n    return {\n        activateBrowserPlugin: function () {\n            if (!uaClientHints) {\n                populateClientHints();\n            }\n        },\n        contexts: function () {\n            if (uaClientHints) {\n                return [\n                    {\n                        schema: 'iglu:org.ietf/http_client_hints/jsonschema/1-0-0',\n                        data: uaClientHints\n                    },\n                ];\n            }\n            return [];\n        }\n    };\n}\n\nexport { ClientHintsPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Error tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection, addEventListener, isFunction } from '@snowplow/browser-tracker-core';\nimport { buildSelfDescribingEvent } from '@snowplow/tracker-core';\n\n/**\n * Truncate string if it's longer than 8192 chars\n *\n * @param string - The stack trace to truncate\n * @param maxLength - The maximum length of the truncated string. Default = 8192\n * @returns The truncated string\n */\nfunction truncateString(string, maxLength) {\n    if (maxLength === void 0) { maxLength = 8192; }\n    if (string && string.length > maxLength) {\n        var truncatedString = string.substring(0, maxLength);\n        return truncatedString;\n    }\n    return string;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nfunction ErrorTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Send error as self-describing event\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackError(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var message = event.message, filename = event.filename, lineno = event.lineno, colno = event.colno, error = event.error, context = event.context, timestamp = event.timestamp, stack = error && truncateString(error.stack, 8192), truncatedMessage = message && truncateString(message, 2048);\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/application_error/jsonschema/1-0-1',\n                data: {\n                    programmingLanguage: 'JAVASCRIPT',\n                    message: truncatedMessage !== null && truncatedMessage !== void 0 ? truncatedMessage : \"JS Exception. Browser doesn't support ErrorEvent API\",\n                    stackTrace: stack,\n                    lineNumber: lineno,\n                    lineColumn: colno,\n                    fileName: filename\n                }\n            }\n        }), context, timestamp);\n    });\n}\n/**\n * Enable automatic error tracking, added event handler for 'error' event on window\n * @param configuration - The error tracking configuration\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction enableErrorTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    var filter = configuration.filter, contextAdder = configuration.contextAdder, context = configuration.context, captureError = function (errorEvent) {\n        if ((filter && isFunction(filter) && filter(errorEvent)) || filter == null) {\n            sendError({ errorEvent: errorEvent, commonContext: context, contextAdder: contextAdder }, trackers);\n        }\n    };\n    addEventListener(window, 'error', captureError, true);\n}\nfunction sendError(_a, trackers) {\n    var errorEvent = _a.errorEvent, commonContext = _a.commonContext, contextAdder = _a.contextAdder;\n    var context = commonContext || [];\n    if (contextAdder && isFunction(contextAdder)) {\n        context = context.concat(contextAdder(errorEvent));\n    }\n    trackError({\n        message: errorEvent.message,\n        filename: errorEvent.filename,\n        lineno: errorEvent.lineno,\n        colno: errorEvent.colno,\n        error: errorEvent.error,\n        context: context\n    }, trackers);\n}\n\nexport { ErrorTrackingPlugin, enableErrorTracking, trackError };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches GA cookie data to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __assign, __spreadArray } from 'tslib';\nimport { cookie } from '@snowplow/browser-tracker-core';\n\nvar UNIVERSAL_ANALYTICS_COOKIES_SCHEMA = 'iglu:com.google.analytics/cookies/jsonschema/1-0-0';\nvar GOOGLE_ANALYTICS_4_COOKIES_SCHEMA = 'iglu:com.google.ga4/cookies/jsonschema/1-0-0';\n\nvar defaultPluginOptions = {\n    ua: true,\n    ga4: false,\n    ga4MeasurementId: '',\n    cookiePrefix: []\n};\n/**\n * Captures the GA cookies on a page and sends as context on each event\n * @param pluginOptions.ua - Send Universal Analytics specific cookie values.\n * @param pluginOptions.ga4 - Send Google Analytics 4 specific cookie values.\n * @param pluginOptions.ga4MeasurementId - Measurement id/ids to search the Google Analytics 4 session cookie. Can be a single measurement id as a string or an array of measurement id strings. The cookie has the form of _ga_<container-id> where <container-id> is the data stream container id.\n * @param pluginOptions.cookiePrefix - Cookie prefix set on the Google Analytics 4 cookies using the cookie_prefix option of the gtag.js tracker.\n */\nfunction GaCookiesPlugin(pluginOptions) {\n    if (pluginOptions === void 0) { pluginOptions = defaultPluginOptions; }\n    return {\n        contexts: function () {\n            var contexts = [];\n            var _a = __assign(__assign({}, defaultPluginOptions), pluginOptions), ga4 = _a.ga4, ga4MeasurementId = _a.ga4MeasurementId, ua = _a.ua, cookiePrefix = _a.cookiePrefix;\n            var GA_USER_COOKIE = '_ga';\n            var GA4_MEASUREMENT_ID_PREFIX = 'G-';\n            var GA4_COOKIE_PREFIX = '_ga_';\n            if (ua) {\n                var uaCookiesContext_1 = {\n                    schema: UNIVERSAL_ANALYTICS_COOKIES_SCHEMA,\n                    data: {}\n                };\n                ['__utma', '__utmb', '__utmc', '__utmv', '__utmz', GA_USER_COOKIE].forEach(function (cookieType) {\n                    var value = cookie(cookieType);\n                    if (value) {\n                        uaCookiesContext_1.data[cookieType] = value;\n                    }\n                });\n                contexts.push(uaCookiesContext_1);\n            }\n            if (ga4) {\n                var cookiePrefixes = Array.isArray(cookiePrefix) ? __spreadArray([], cookiePrefix, true) : [cookiePrefix];\n                /* We also will search for the default (no prefix) in every case. */\n                cookiePrefixes.unshift('');\n                cookiePrefixes.forEach(function (prefix) {\n                    var userCookie = cookie(prefix + GA_USER_COOKIE);\n                    var sessionCookies = [];\n                    if (ga4MeasurementId) {\n                        var measurementIdentifiers = Array.isArray(ga4MeasurementId) ? __spreadArray([], ga4MeasurementId, true) : [ga4MeasurementId];\n                        measurementIdentifiers.forEach(function (cookieIdentifier) {\n                            var sessionCookieValue = cookie(prefix + cookieIdentifier.replace(GA4_MEASUREMENT_ID_PREFIX, GA4_COOKIE_PREFIX));\n                            if (sessionCookieValue) {\n                                sessionCookies.push({\n                                    measurement_id: cookieIdentifier,\n                                    session_cookie: sessionCookieValue\n                                });\n                            }\n                        });\n                    }\n                    if (!userCookie && !sessionCookies.length) {\n                        return;\n                    }\n                    var ga4CookiesContext = {\n                        schema: GOOGLE_ANALYTICS_4_COOKIES_SCHEMA,\n                        data: {\n                            _ga: userCookie,\n                            session_cookies: sessionCookies.length ? sessionCookies : undefined,\n                            cookie_prefix: prefix || undefined\n                        }\n                    };\n                    contexts.push(ga4CookiesContext);\n                });\n            }\n            return contexts;\n        }\n    };\n}\n\nexport { GaCookiesPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Link Click tracking for Snowplow v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackersInCollection, getFilterByClass, addEventListener, getHostName, getCssClasses } from '@snowplow/browser-tracker-core';\nimport { buildLinkClick, resolveDynamicContext } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar _trackers = {};\nvar _configuration = {};\n/**\n * Link click tracking\n *\n * Will automatically tracking link clicks once enabled with 'enableLinkClickTracking'\n * or you can manually track link clicks with 'trackLinkClick'\n */\nfunction LinkClickTrackingPlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            _trackers[tracker.id] = tracker;\n        }\n    };\n}\n/**\n * Enable link click tracking\n *\n * @remarks\n * The default behaviour is to use actual click events. However, some browsers\n * (e.g., Firefox, Opera, and Konqueror) don't generate click events for the middle mouse button.\n *\n * To capture more \"clicks\", the pseudo click-handler uses mousedown + mouseup events.\n * This is not industry standard and is vulnerable to false positives (e.g., drag events).\n */\nfunction enableLinkClickTracking(configuration, trackers) {\n    if (configuration === void 0) { configuration = {}; }\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (id) {\n        if (_trackers[id]) {\n            if (_trackers[id].sharedState.hasLoaded) {\n                // the load event has already fired, add the click listeners now\n                configureLinkClickTracking(configuration, id);\n                addClickListeners(id);\n            }\n            else {\n                // defer until page has loaded\n                _trackers[id].sharedState.registeredOnLoadHandlers.push(function () {\n                    configureLinkClickTracking(configuration, id);\n                    addClickListeners(id);\n                });\n            }\n        }\n    });\n}\n/**\n * Add click event listeners to links which have been added to the page since the\n * last time enableLinkClickTracking or refreshLinkClickTracking was used\n *\n * @param trackers - The tracker identifiers which the have their link click state refreshed\n */\nfunction refreshLinkClickTracking(trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    trackers.forEach(function (id) {\n        if (_trackers[id]) {\n            if (_trackers[id].sharedState.hasLoaded) {\n                addClickListeners(id);\n            }\n            else {\n                _trackers[id].sharedState.registeredOnLoadHandlers.push(function () {\n                    addClickListeners(id);\n                });\n            }\n        }\n    });\n}\n/**\n * Manually log a click\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackLinkClick(event, trackers) {\n    if (trackers === void 0) { trackers = Object.keys(_trackers); }\n    dispatchToTrackersInCollection(trackers, _trackers, function (t) {\n        t.core.track(buildLinkClick(event), event.context, event.timestamp);\n    });\n}\n/*\n * Process clicks\n */\nfunction processClick(tracker, sourceElement, context) {\n    var parentElement, tag, elementId, elementClasses, elementTarget, elementContent;\n    while ((parentElement = sourceElement.parentElement) !== null &&\n        parentElement != null &&\n        (tag = sourceElement.tagName.toUpperCase()) !== 'A' &&\n        tag !== 'AREA') {\n        sourceElement = parentElement;\n    }\n    var anchorElement = sourceElement;\n    if (anchorElement.href != null) {\n        // browsers, such as Safari, don't downcase hostname and href\n        var originalSourceHostName = anchorElement.hostname || getHostName(anchorElement.href), sourceHostName = originalSourceHostName.toLowerCase(), sourceHref = anchorElement.href.replace(originalSourceHostName, sourceHostName), scriptProtocol = new RegExp('^(javascript|vbscript|jscript|mocha|livescript|ecmascript):', 'i');\n        // Ignore script pseudo-protocol links\n        if (!scriptProtocol.test(sourceHref)) {\n            elementId = anchorElement.id;\n            elementClasses = getCssClasses(anchorElement);\n            elementTarget = anchorElement.target;\n            elementContent = _configuration[tracker.id].linkTrackingContent ? anchorElement.innerHTML : undefined;\n            // decodeUrl %xx\n            sourceHref = unescape(sourceHref);\n            tracker.core.track(buildLinkClick({\n                targetUrl: sourceHref,\n                elementId: elementId,\n                elementClasses: elementClasses,\n                elementTarget: elementTarget,\n                elementContent: elementContent\n            }), resolveDynamicContext(context, sourceElement));\n        }\n    }\n}\n/*\n * Return function to handle click event\n */\nfunction getClickHandler(tracker, context) {\n    return function (evt) {\n        var button, target;\n        evt = evt || window.event;\n        button = evt.which || evt.button;\n        target = evt.target || evt.srcElement;\n        // Using evt.type (added in IE4), we avoid defining separate handlers for mouseup and mousedown.\n        if (evt.type === 'click') {\n            if (target) {\n                processClick(_trackers[tracker], target, context);\n            }\n        }\n        else if (evt.type === 'mousedown') {\n            if ((button === 1 || button === 2) && target) {\n                _configuration[tracker].lastButton = button;\n                _configuration[tracker].lastTarget = target;\n            }\n            else {\n                _configuration[tracker].lastButton = _configuration[tracker].lastTarget = null;\n            }\n        }\n        else if (evt.type === 'mouseup') {\n            if (button === _configuration[tracker].lastButton && target === _configuration[tracker].lastTarget) {\n                processClick(_trackers[tracker], target, context);\n            }\n            _configuration[tracker].lastButton = _configuration[tracker].lastTarget = null;\n        }\n    };\n}\n/*\n * Add click listener to a DOM element\n */\nfunction addClickListener(tracker, element) {\n    if (_configuration[tracker].linkTrackingPseudoClicks) {\n        // for simplicity and performance, we ignore drag events\n        addEventListener(element, 'mouseup', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n        addEventListener(element, 'mousedown', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n    }\n    else {\n        addEventListener(element, 'click', getClickHandler(tracker, _configuration[tracker].linkTrackingContext), false);\n    }\n}\n/*\n * Configures link click tracking: how to filter which links will be tracked,\n * whether to use pseudo click tracking, and what context to attach to link_click events\n */\nfunction configureLinkClickTracking(_a, tracker) {\n    var _b = _a === void 0 ? {} : _a, options = _b.options, pseudoClicks = _b.pseudoClicks, trackContent = _b.trackContent, context = _b.context;\n    _configuration[tracker] = {\n        linkTrackingContent: trackContent,\n        linkTrackingContext: context,\n        linkTrackingPseudoClicks: pseudoClicks,\n        linkTrackingFilter: getFilterByClass(options)\n    };\n}\n/*\n * Add click handlers to anchor and AREA elements, except those to be ignored\n */\nfunction addClickListeners(trackerId) {\n    var _a, _b;\n    var linkElements = document.links, i;\n    for (i = 0; i < linkElements.length; i++) {\n        // Add a listener to link elements which pass the filter and aren't already tracked\n        if (((_b = (_a = _configuration[trackerId]).linkTrackingFilter) === null || _b === void 0 ? void 0 : _b.call(_a, linkElements[i])) && !linkElements[i][trackerId]) {\n            addClickListener(trackerId, linkElements[i]);\n            linkElements[i][trackerId] = true;\n        }\n    }\n}\n\nexport { LinkClickTrackingPlugin, enableLinkClickTracking, refreshLinkClickTracking, trackLinkClick };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches Performance Navigation Timing data to Snowplow events v3.24.6 (https://docs.snowplow.io/)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nvar PERFORMANCE_NAVIGATION_TIMING_SCHEMA = 'iglu:org.w3/PerformanceNavigationTiming/jsonschema/1-0-0';\n\n/**\n * Creates a context from the PerformanceNavigationTiming object\n *\n * @returns object PerformanceNavigationTiming context\n */\nfunction getPerformanceNavigationTimingContext() {\n    var performanceAlias = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};\n    if (performanceAlias.getEntriesByType) {\n        var performanceNavigationTiming = performanceAlias.getEntriesByType('navigation')[0];\n        if (!performanceNavigationTiming) {\n            return [];\n        }\n        return constructNavigationTimingContext(performanceNavigationTiming);\n    }\n    return [];\n}\nfunction constructNavigationTimingContext(performanceNavigationTimingInstance) {\n    var performanceNavigationKeys = [\n        'entryType',\n        'duration',\n        'nextHopProtocol',\n        'workerStart',\n        'redirectStart',\n        'redirectEnd',\n        'fetchStart',\n        'domainLookupStart',\n        'domainLookupEnd',\n        'connectStart',\n        'secureConnectionStart',\n        'connectEnd',\n        'requestStart',\n        'responseStart',\n        'responseEnd',\n        'transferSize',\n        'encodedBodySize',\n        'decodedBodySize',\n        'serverTiming',\n        'unloadEventStart',\n        'unloadEventEnd',\n        'domInteractive',\n        'domContentLoadedEventStart',\n        'domContentLoadedEventEnd',\n        'domComplete',\n        'loadEventStart',\n        'loadEventEnd',\n        'type',\n        'redirectCount',\n        'activationStart',\n        'deliveryType',\n    ];\n    var performanceContextData = performanceNavigationKeys.reduce(function (accum, key) {\n        var performanceValue = performanceNavigationTimingInstance[key];\n        if (key === 'serverTiming' && Array.isArray(performanceValue)) {\n            accum[key] = performanceValue.length\n                ? performanceValue.map(function (_a) {\n                    var description = _a.description, duration = _a.duration, name = _a.name;\n                    return ({\n                        description: description,\n                        duration: duration,\n                        name: name\n                    });\n                })\n                : undefined;\n        }\n        else if (performanceValue) {\n            accum[key] = performanceValue;\n        }\n        return accum;\n    }, {});\n    return [\n        {\n            schema: PERFORMANCE_NAVIGATION_TIMING_SCHEMA,\n            data: performanceContextData\n        },\n    ];\n}\n\nvar navigationTimingEntry;\n/**\n * Adds Performance Navigation Timing context to events\n *\n * @remarks\n * May not be fully populated when initial Page View fires\n * Often a good idea to take the latest performance timing context\n * for a given page view id when analyzing in the warehouse\n */\nfunction PerformanceNavigationTimingPlugin() {\n    return {\n        activateBrowserPlugin: function () {\n            /* Setup a PerformanceObserver to allow caching of a completed navigation timing entry. We don't need to query the API after that. */\n            if (typeof PerformanceObserver !== 'undefined') {\n                var perfObserver = new PerformanceObserver(function (observedEntries) {\n                    var observedNavigationTiming = observedEntries.getEntries()[0];\n                    /* We mark the entry as final by the measurement of loadEventEnd which is the final in the processing model  */\n                    if (observedNavigationTiming.loadEventEnd > 0) {\n                        navigationTimingEntry = constructNavigationTimingContext(observedNavigationTiming);\n                    }\n                });\n                perfObserver.observe({\n                    type: 'navigation',\n                    buffered: true\n                });\n            }\n        },\n        contexts: function () { return navigationTimingEntry || getPerformanceNavigationTimingContext(); }\n    };\n}\n\nexport { PerformanceNavigationTimingPlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Attaches timezone to Snowplow events v3.24.6 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { determine } from 'jstimezonedetect';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Populated the Timezone field of the canonical event model\n *\n * @remarks\n * Uses Intl where availble and has fallback in older browsers\n */\nfunction TimezonePlugin() {\n    return {\n        activateBrowserPlugin: function (tracker) {\n            tracker.core.setTimezone(determine(typeof Intl !== 'undefined').name());\n        }\n    };\n}\n\nexport { TimezonePlugin };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Adds the capability to track web performance metrics categorized as Web Vitals. v3.24.6 (https://github.com/snowplow/snowplow-javascript-tracker)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __assign } from 'tslib';\nimport { dispatchToTrackersInCollection } from '@snowplow/browser-tracker-core';\nimport { LOG, buildSelfDescribingEvent, resolveDynamicContext } from '@snowplow/tracker-core';\n\nvar WEB_VITALS_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/web_vitals/jsonschema/1-0-0';\n\n/**\n * Attach page listeners to collect the Web Vitals values\n * @param {() => void} callback\n */\nfunction attachWebVitalsPageListeners(callback) {\n    // Safari does not fire \"visibilitychange\" on the tab close\n    // So we have 2 options: lose Safari data, or lose LCP/CLS that depends on \"visibilitychange\" logic.\n    // Current solution: if LCP/CLS supported, use `onHidden` otherwise, use `pagehide` to fire the callback in the end.\n    //\n    // More details: https://github.com/treosh/web-vitals-reporter/issues/3\n    var supportedEntryTypes = (PerformanceObserver && PerformanceObserver.supportedEntryTypes) || [];\n    var isLatestVisibilityChangeSupported = supportedEntryTypes.indexOf('layout-shift') !== -1;\n    if (isLatestVisibilityChangeSupported) {\n        var onVisibilityChange_1 = function () {\n            if (document.visibilityState === 'hidden') {\n                callback();\n                window.removeEventListener('visibilitychange', onVisibilityChange_1, true);\n            }\n        };\n        window.addEventListener('visibilitychange', onVisibilityChange_1, true);\n    }\n    else {\n        window.addEventListener('pagehide', callback, { capture: true, once: true });\n    }\n}\n/**\n *\n * @param {string} webVitalsSource Web Vitals script source.\n * @returns {string} The script element of the Web Vitals script. Used for attaching listeners on it.\n */\nfunction createWebVitalsScript(webVitalsSource) {\n    var webVitalsScript = document.createElement('script');\n    webVitalsScript.setAttribute('src', webVitalsSource);\n    webVitalsScript.setAttribute('async', '1');\n    webVitalsScript.addEventListener('error', function () {\n        LOG.error(\"Failed to load \".concat(webVitalsSource));\n    });\n    document.head.appendChild(webVitalsScript);\n    return webVitalsScript;\n}\n/**\n *\n * Adds the Web Vitals measurements on the object used by the trackers to store metric properties.\n * @param {Record<string, unknown>} webVitalsObject\n * @return {void}\n */\nfunction webVitalsListener(webVitalsObject) {\n    function addWebVitalsMeasurement(metricSchemaName) {\n        return function (arg) {\n            webVitalsObject[metricSchemaName] = arg.value;\n            webVitalsObject.navigationType = arg.navigationType;\n        };\n    }\n    if (!window.webVitals) {\n        LOG.warn('The window.webVitals API is currently unavailable. web_vitals events will not be collected.');\n        return;\n    }\n    var webVitals = window.webVitals;\n    webVitals.onCLS(addWebVitalsMeasurement('cls'));\n    webVitals.onFID(addWebVitalsMeasurement('fid'));\n    webVitals.onLCP(addWebVitalsMeasurement('lcp'));\n    webVitals.onFCP(addWebVitalsMeasurement('fcp'));\n    webVitals.onINP(addWebVitalsMeasurement('inp'));\n    webVitals.onTTFB(addWebVitalsMeasurement('ttfb'));\n}\n\nvar _trackers = {};\nvar WEB_VITALS_SOURCE = 'https://unpkg.com/web-vitals@3/dist/web-vitals.iife.js';\nvar listenersAttached = false;\nvar defaultPluginOptions = {\n    loadWebVitalsScript: true,\n    webVitalsSource: WEB_VITALS_SOURCE,\n    context: []\n};\n/**\n * Adds Web Vitals measurement events\n *\n * @param pluginOptions.loadWebVitalsScript - Should the plugin immediately load the Core Web Vitals measurement script from UNPKG CDN.\n * @param pluginOptions.webVitalsSource - The URL endpoint the Web Vitals script should be loaded from. Defaults to the UNPKG CDN.\n * @remarks\n */\nfunction WebVitalsPlugin(pluginOptions) {\n    if (pluginOptions === void 0) { pluginOptions = defaultPluginOptions; }\n    var webVitalsObject = {};\n    var options = __assign(__assign({}, defaultPluginOptions), pluginOptions);\n    var trackerId;\n    var webVitalsScript;\n    return {\n        activateBrowserPlugin: function (tracker) {\n            trackerId = tracker.id;\n            _trackers[trackerId] = tracker;\n            function sendWebVitals() {\n                if (!Object.keys(webVitalsObject).length) {\n                    return;\n                }\n                dispatchToTrackersInCollection(Object.keys(_trackers), _trackers, function (t) {\n                    var _a;\n                    t.core.track(buildSelfDescribingEvent({\n                        event: {\n                            schema: WEB_VITALS_SCHEMA,\n                            data: webVitalsObject\n                        }\n                    }), resolveDynamicContext((_a = options.context) !== null && _a !== void 0 ? _a : [], webVitalsObject));\n                });\n            }\n            if (options.loadWebVitalsScript) {\n                webVitalsScript = createWebVitalsScript(options.webVitalsSource);\n            }\n            /*\n             * Attach page listeners only once per page.\n             * Prevent multiple trackers from attaching listeners multiple times.\n             */\n            if (!listenersAttached) {\n                if (webVitalsScript) {\n                    webVitalsScript.addEventListener('load', function () { return webVitalsListener(webVitalsObject); });\n                }\n                else {\n                    webVitalsListener(webVitalsObject);\n                }\n                attachWebVitalsPageListeners(sendWebVitals);\n                listenersAttached = true;\n            }\n            return;\n        }\n    };\n}\n\nexport { WebVitalsPlugin };\n//# sourceMappingURL=index.module.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","// This is a magic string replaced by rollup\n\nconst SDK_VERSION = \"8.55.0\" ;\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { SDK_VERSION } from './version.js';\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ = globalThis ;\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 versionedCarrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n  return versionedCarrier[name] || (versionedCarrier[name] = creator());\n}\n\nexport { GLOBAL_OBJ, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { getGlobalSingleton, GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = [\n  'debug',\n  'info',\n  'warn',\n  'error',\n  'log',\n  'assert',\n  'trace',\n] ;\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 (DEBUG_BUILD) {\n    CONSOLE_LEVELS.forEach(name => {\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\n/**\n * This is a logger singleton which either logs things or no-ops if logging is not enabled.\n * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.\n */\nconst logger = getGlobalSingleton('logger', makeLogger);\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","const STACKTRACE_FRAME_LIMIT = 50;\nconst UNKNOWN_FUNCTION = '?';\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, skipFirstLines = 0, framesToPop = 0) => {\n    const frames = [];\n    const lines = stack.split('\\n');\n\n    for (let i = skipFirstLines; 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 + framesToPop) {\n        break;\n      }\n    }\n\n    return stripSentryFramesAndReverse(frames.slice(framesToPop));\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(getLastStackFrame(localStack).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(getLastStackFrame(localStack).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(getLastStackFrame(localStack).function || '')) {\n      localStack.pop();\n    }\n  }\n\n  return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n    ...frame,\n    filename: frame.filename || getLastStackFrame(localStack).filename,\n    function: frame.function || UNKNOWN_FUNCTION,\n  }));\n}\n\nfunction getLastStackFrame(arr) {\n  return arr[arr.length - 1] || {};\n}\n\nconst defaultFunctionName = '<anonymous>';\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 * Get's stack frames from an event without needing to check for undefined properties.\n */\nfunction getFramesFromEvent(event) {\n  const exception = event.exception;\n\n  if (exception) {\n    const frames = [];\n    try {\n      // @ts-expect-error Object could be undefined\n      exception.values.forEach(value => {\n        // @ts-expect-error Value could be undefined\n        if (value.stacktrace.frames) {\n          // @ts-expect-error Value could be undefined\n          frames.push(...value.stacktrace.frames);\n        }\n      });\n      return frames;\n    } catch (_oO) {\n      return undefined;\n    }\n  }\n  return undefined;\n}\n\nexport { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../logger.js';\nimport { getFunctionName } from '../stacktrace.js';\n\n// We keep the handlers globally\nconst handlers = {};\nconst instrumented = {};\n\n/** Add a handler function. */\nfunction addHandler(type, handler) {\n  handlers[type] = handlers[type] || [];\n  (handlers[type] ).push(handler);\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/** Maybe run an instrumentation function, unless it was already called. */\nfunction maybeInstrument(type, instrumentFn) {\n  if (!instrumented[type]) {\n    instrumented[type] = true;\n    try {\n      instrumentFn();\n    } catch (e) {\n      DEBUG_BUILD && logger.error(`Error while instrumenting ${type}`, e);\n    }\n  }\n}\n\n/** Trigger handlers for a given instrumentation type. */\nfunction triggerHandlers(type, data) {\n  const typeHandlers = type && handlers[type];\n  if (!typeHandlers) {\n    return;\n  }\n\n  for (const handler of typeHandlers) {\n    try {\n      handler(data);\n    } catch (e) {\n      DEBUG_BUILD &&\n        logger.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nexport { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers };\n//# sourceMappingURL=handlers.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnErrorHandler = null;\n\n/**\n * Add an instrumentation handler for when an error is captured by the global error handler.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalErrorInstrumentationHandler(handler) {\n  const type = 'error';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentError);\n}\n\nfunction instrumentError() {\n  _oldOnErrorHandler = GLOBAL_OBJ.onerror;\n\n  // Note: The reason we are doing window.onerror instead of window.addEventListener('error')\n  // is that we are using this handler in the Loader Script, to handle buffered errors consistently\n  GLOBAL_OBJ.onerror = function (\n    msg,\n    url,\n    line,\n    column,\n    error,\n  ) {\n    const handlerData = {\n      column,\n      error,\n      line,\n      msg,\n      url,\n    };\n    triggerHandlers('error', handlerData);\n\n    if (_oldOnErrorHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnErrorHandler.apply(this, arguments);\n    }\n\n    return false;\n  };\n\n  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalErrorInstrumentationHandler };\n//# sourceMappingURL=globalError.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\nlet _oldOnUnhandledRejectionHandler = null;\n\n/**\n * Add an instrumentation handler for when an unhandled promise rejection is captured.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addGlobalUnhandledRejectionInstrumentationHandler(\n  handler,\n) {\n  const type = 'unhandledrejection';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentUnhandledRejection);\n}\n\nfunction instrumentUnhandledRejection() {\n  _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection;\n\n  // Note: The reason we are doing window.onunhandledrejection instead of window.addEventListener('unhandledrejection')\n  // is that we are using this handler in the Loader Script, to handle buffered rejections consistently\n  GLOBAL_OBJ.onunhandledrejection = function (e) {\n    const handlerData = e;\n    triggerHandlers('unhandledrejection', handlerData);\n\n    if (_oldOnUnhandledRejectionHandler) {\n      // eslint-disable-next-line prefer-rest-params\n      return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n    }\n\n    return true;\n  };\n\n  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { addGlobalUnhandledRejectionInstrumentationHandler };\n//# sourceMappingURL=globalUnhandledRejection.js.map\n","import { SDK_VERSION } from './utils-hoist/version.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\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  // This ensures a Sentry carrier exists\n  getSentryCarrier(GLOBAL_OBJ);\n  return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nfunction getSentryCarrier(carrier) {\n  const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n  // For now: First SDK that sets the .version property wins\n  __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n  // Intentionally populating and returning the version of \"this\" SDK instance\n  // rather than what's set in .version so that \"this\" SDK always gets its carrier\n  return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\nexport { getMainCarrier, getSentryCarrier };\n//# sourceMappingURL=carrier.js.map\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    case '[object WebAssembly.Exception]':\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 string is parameterized\n * {@link isParameterizedString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isParameterizedString(wat) {\n  return (\n    typeof wat === 'object' &&\n    wat !== null &&\n    '__sentry_template_string__' in wat &&\n    '__sentry_template_values__' in wat\n  );\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 || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal, or a class instance.\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\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'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, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { isString } from './is.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\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  if (!elem) {\n    return '<unknown>';\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 '<unknown>';\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\n  if (!elem || !elem.tagName) {\n    return '';\n  }\n\n  // @ts-expect-error WINDOW has HTMLElement\n  if (WINDOW.HTMLElement) {\n    // If using the component name annotation plugin, this value may be available on the DOM node\n    if (elem instanceof HTMLElement && elem.dataset) {\n      if (elem.dataset['sentryComponent']) {\n        return elem.dataset['sentryComponent'];\n      }\n      if (elem.dataset['sentryElement']) {\n        return elem.dataset['sentryElement'];\n      }\n    }\n  }\n\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    const className = elem.className;\n    if (className && isString(className)) {\n      const classes = className.split(/\\s+/);\n      for (const c of classes) {\n        out.push(`.${c}`);\n      }\n    }\n  }\n  const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n  for (const k of allowedAttrs) {\n    const attr = elem.getAttribute(k);\n    if (attr) {\n      out.push(`[${k}=\"${attr}\"]`);\n    }\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 existence 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<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n *\n * @deprecated This method is deprecated and will be removed in the next major version.\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\n/**\n * Given a DOM element, traverses up the tree until it finds the first ancestor node\n * that has the `data-sentry-component` or `data-sentry-element` attribute with `data-sentry-component` taking\n * precedence. This attribute is added at build-time by projects that have the component name annotation plugin installed.\n *\n * @returns a string representation of the component for the provided DOM element, or `null` if not found\n */\nfunction getComponentName(elem) {\n  // @ts-expect-error WINDOW has HTMLElement\n  if (!WINDOW.HTMLElement) {\n    return null;\n  }\n\n  let currentElem = elem ;\n  const MAX_TRAVERSE_HEIGHT = 5;\n  for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) {\n    if (!currentElem) {\n      return null;\n    }\n\n    if (currentElem instanceof HTMLElement) {\n      if (currentElem.dataset['sentryComponent']) {\n        return currentElem.dataset['sentryComponent'];\n      }\n      if (currentElem.dataset['sentryElement']) {\n        return currentElem.dataset['sentryElement'];\n      }\n    }\n\n    currentElem = currentElem.parentNode;\n  }\n\n  return null;\n}\n\nexport { getComponentName, getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.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 */\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 { htmlTreeAsString } from './browser.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\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, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (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  try {\n    source[name] = wrapped;\n  } catch (e) {\n    DEBUG_BUILD && logger.log(`Failed to replace method \"${name}\" in object`, source);\n  }\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    DEBUG_BUILD && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n  }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\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 */\n// eslint-disable-next-line @typescript-eslint/ban-types\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 *\n * @deprecated This function is deprecated and will be removed in the next major version of the SDK.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction urlEncode(object) {\n  return Object.entries(object)\n    .map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)\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 argument 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 '<unknown>';\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  const firstKey = keys[0];\n\n  if (!firstKey) {\n    return '[object has no keys]';\n  }\n\n  if (firstKey.length >= maxLength) {\n    return truncate(firstKey, 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 (isPojo(inputValue)) {\n    // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n    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.getOwnPropertyNames(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\nfunction isPojo(input) {\n  if (!isPlainObject(input)) {\n    return false;\n  }\n\n  try {\n    const name = (Object.getPrototypeOf(input) ).constructor.name;\n    return !name || name === 'Object';\n  } catch (e2) {\n    return true;\n  }\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    // this will catch both undefined and null\n    case wat == undefined:\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 { GLOBAL_OBJ } from './worldwide.js';\n\nconst ONE_SECOND_IN_MS = 1000;\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n *\n * TODO(v8): Return type should be rounded.\n */\nfunction dateTimestampInSeconds() {\n  return Date.now() / ONE_SECOND_IN_MS;\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 createUnixTimestampInSecondsFunc() {\n  const { performance } = GLOBAL_OBJ ;\n  if (!performance || !performance.now) {\n    return dateTimestampInSeconds;\n  }\n\n  // Some browser and environments don't have a timeOrigin, so we fallback to\n  // using Date.now() to compute the starting time.\n  const approxStartingTimeOrigin = Date.now() - performance.now();\n  const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin;\n\n  // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current\n  // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed.\n  //\n  // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the\n  // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and\n  // correct for this.\n  // See: https://github.com/getsentry/sentry-javascript/issues/2590\n  // See: https://github.com/mdn/content/issues/4713\n  // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6\n  return () => {\n    return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS;\n  };\n}\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 * 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 = createUnixTimestampInSecondsFunc();\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n *\n * @deprecated This variable will be removed in the next major version.\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 } = GLOBAL_OBJ ;\n  if (!performance || !performance.now) {\n    // eslint-disable-next-line deprecation/deprecation\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      // eslint-disable-next-line deprecation/deprecation\n      _browserPerformanceTimeOriginMode = 'timeOrigin';\n      return performance.timeOrigin;\n    } else {\n      // eslint-disable-next-line deprecation/deprecation\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  // eslint-disable-next-line deprecation/deprecation\n  _browserPerformanceTimeOriginMode = 'dateNow';\n  return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds };\n//# sourceMappingURL=time.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 = () => {\n        // crypto.getRandomValues might return undefined instead of the typed array\n        // in old Chromium versions (e.g. 23.0.1235.0 (151422))\n        // However, `typedArray` is still filled in-place.\n        // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray\n        const typedArray = new Uint8Array(1);\n        crypto.getRandomValues(typedArray);\n        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n        return typedArray[0];\n      };\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 || '<unknown>';\n  }\n  return eventId || '<unknown>';\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\nfunction _parseInt(input) {\n  return parseInt(input || '', 10);\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]);\n  const minor = _parseInt(match[2]);\n  const patch = _parseInt(match[3]);\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  // We guard here to ensure this is not larger than the existing number of lines\n  const lineIndex = Math.min(maxLines - 1, sourceLine);\n\n  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n  frame.context_line = snipLine(lines[lineIndex], 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  if (isAlreadyCaptured(exception)) {\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\nfunction isAlreadyCaptured(exception) {\n  try {\n    return (exception ).__sentry_captured__;\n  } catch (e) {} // eslint-disable-line no-empty\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 *\n * @deprecated This function has been deprecated and will not be replaced.\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 { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\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        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 './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport './utils-hoist/syncpromise.js';\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 { uuid4 } from './misc.js';\n\n/**\n * Returns a new minimal propagation context.\n *\n * @deprecated Use `generateTraceId` and `generateSpanId` instead.\n */\nfunction generatePropagationContext() {\n  return {\n    traceId: generateTraceId(),\n    spanId: generateSpanId(),\n  };\n}\n\n/**\n * Generate a random, valid trace ID.\n */\nfunction generateTraceId() {\n  return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nfunction generateSpanId() {\n  return uuid4().substring(16);\n}\n\nexport { generatePropagationContext, generateSpanId, generateTraceId };\n//# sourceMappingURL=propagationContext.js.map\n","/**\n * Shallow merge two objects.\n * Does not mutate the passed in objects.\n * Undefined/empty values in the merge object will overwrite existing values.\n *\n * By default, this merges 2 levels deep.\n */\nfunction merge(initialObj, mergeObj, levels = 2) {\n  // If the merge value is not an object, or we have no merge levels left,\n  // we just set the value to the merge value\n  if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {\n    return mergeObj;\n  }\n\n  // If the merge object is an empty object, and the initial object is not undefined, we return the initial object\n  if (initialObj && mergeObj && Object.keys(mergeObj).length === 0) {\n    return initialObj;\n  }\n\n  // Clone object\n  const output = { ...initialObj };\n\n  // Merge values into output, resursively\n  for (const key in mergeObj) {\n    if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {\n      output[key] = merge(output[key], mergeObj[key], levels - 1);\n    }\n  }\n\n  return output;\n}\n\nexport { merge };\n//# sourceMappingURL=merge.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _setSpanForScope(scope, span) {\n  if (span) {\n    addNonEnumerableProperty(scope , SCOPE_SPAN_FIELD, span);\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete (scope )[SCOPE_SPAN_FIELD];\n  }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nfunction _getSpanForScope(scope) {\n  return scope[SCOPE_SPAN_FIELD];\n}\n\nexport { _getSpanForScope, _setSpanForScope };\n//# sourceMappingURL=spanOnScope.js.map\n","import { updateSession } from './session.js';\nimport { isPlainObject } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { generateTraceId, generateSpanId } from './utils-hoist/propagationContext.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\nimport { merge } from './utils/merge.js';\nimport { _setSpanForScope, _getSpanForScope } from './utils/spanOnScope.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.\n */\nclass ScopeClass  {\n  /** Flag if notifying is happening. */\n\n  /** Callback for client to receive scope changes. */\n\n  /** Callback list that will be called during event processing. */\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\n  /**\n   * Transaction Name\n   *\n   * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects.\n   * It's purpose is to assign a transaction to the scope that's added to non-transaction events.\n   */\n\n  /** Session */\n\n  /** Request Mode Session Status */\n  // eslint-disable-next-line deprecation/deprecation\n\n  /** The client on this scope */\n\n  /** Contains the last event id of a captured event.  */\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 = {\n      traceId: generateTraceId(),\n      spanId: generateSpanId(),\n    };\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clone() {\n    const newScope = new ScopeClass();\n    newScope._breadcrumbs = [...this._breadcrumbs];\n    newScope._tags = { ...this._tags };\n    newScope._extra = { ...this._extra };\n    newScope._contexts = { ...this._contexts };\n    if (this._contexts.flags) {\n      // We need to copy the `values` array so insertions on a cloned scope\n      // won't affect the original array.\n      newScope._contexts.flags = {\n        values: [...this._contexts.flags.values],\n      };\n    }\n\n    newScope._user = this._user;\n    newScope._level = this._level;\n    newScope._session = this._session;\n    newScope._transactionName = this._transactionName;\n    newScope._fingerprint = this._fingerprint;\n    newScope._eventProcessors = [...this._eventProcessors];\n    newScope._requestSession = this._requestSession;\n    newScope._attachments = [...this._attachments];\n    newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n    newScope._propagationContext = { ...this._propagationContext };\n    newScope._client = this._client;\n    newScope._lastEventId = this._lastEventId;\n\n    _setSpanForScope(newScope, _getSpanForScope(this));\n\n    return newScope;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setClient(client) {\n    this._client = client;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setLastEventId(lastEventId) {\n    this._lastEventId = lastEventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getClient() {\n    return this._client ;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   lastEventId() {\n    return this._lastEventId;\n  }\n\n  /**\n   * @inheritDoc\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    // If null is passed we want to unset everything, but still define keys,\n    // so that later down in the pipeline any existing values are cleared.\n    this._user = user || {\n      email: undefined,\n      id: undefined,\n      ip_address: undefined,\n      username: undefined,\n    };\n\n    if (this._session) {\n      updateSession(this._session, { user });\n    }\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  // eslint-disable-next-line deprecation/deprecation\n   getRequestSession() {\n    return this._requestSession;\n  }\n\n  /**\n   * @inheritDoc\n   */\n  // eslint-disable-next-line deprecation/deprecation\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(level) {\n    this._level = level;\n    this._notifyScopeListeners();\n    return this;\n  }\n\n  /**\n   * Sets the transaction name on the scope so that the name of e.g. taken server route or\n   * the page location is attached to future events.\n   *\n   * IMPORTANT: Calling this function does NOT change the name of the currently active\n   * root span. If you want to change the name of the active root span, use\n   * `Sentry.updateSpanName(rootSpan, 'new name')` instead.\n   *\n   * By default, the SDK updates the scope's transaction name automatically on sensible\n   * occasions, such as a page navigation or when handling a new request on the server.\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   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    const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n    const [scopeInstance, requestSession] =\n      scopeToMerge instanceof Scope\n        ? // eslint-disable-next-line deprecation/deprecation\n          [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()]\n        : isPlainObject(scopeToMerge)\n          ? [captureContext , (captureContext ).requestSession]\n          : [];\n\n    const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {};\n\n    this._tags = { ...this._tags, ...tags };\n    this._extra = { ...this._extra, ...extra };\n    this._contexts = { ...this._contexts, ...contexts };\n\n    if (user && Object.keys(user).length) {\n      this._user = user;\n    }\n\n    if (level) {\n      this._level = level;\n    }\n\n    if (fingerprint.length) {\n      this._fingerprint = fingerprint;\n    }\n\n    if (propagationContext) {\n      this._propagationContext = propagationContext;\n    }\n\n    if (requestSession) {\n      this._requestSession = requestSession;\n    }\n\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   clear() {\n    // client is not cleared here on purpose!\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._session = undefined;\n    _setSpanForScope(this, undefined);\n    this._attachments = [];\n    this.setPropagationContext({ traceId: generateTraceId() });\n\n    this._notifyScopeListeners();\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    this._breadcrumbs.push(mergedBreadcrumb);\n    if (this._breadcrumbs.length > maxCrumbs) {\n      this._breadcrumbs = this._breadcrumbs.slice(-maxCrumbs);\n      if (this._client) {\n        this._client.recordDroppedEvent('buffer_overflow', 'log_item');\n      }\n    }\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   clearAttachments() {\n    this._attachments = [];\n    return this;\n  }\n\n  /** @inheritDoc */\n   getScopeData() {\n    return {\n      breadcrumbs: this._breadcrumbs,\n      attachments: this._attachments,\n      contexts: this._contexts,\n      tags: this._tags,\n      extra: this._extra,\n      user: this._user,\n      level: this._level,\n      fingerprint: this._fingerprint || [],\n      eventProcessors: this._eventProcessors,\n      propagationContext: this._propagationContext,\n      sdkProcessingMetadata: this._sdkProcessingMetadata,\n      transactionName: this._transactionName,\n      span: _getSpanForScope(this),\n    };\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setSDKProcessingMetadata(newData) {\n    this._sdkProcessingMetadata = merge(this._sdkProcessingMetadata, newData, 2);\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setPropagationContext(\n    context,\n  ) {\n    this._propagationContext = {\n      // eslint-disable-next-line deprecation/deprecation\n      spanId: generateSpanId(),\n      ...context,\n    };\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   getPropagationContext() {\n    return this._propagationContext;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureException(exception, hint) {\n    const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture exception!');\n      return eventId;\n    }\n\n    const syntheticException = new Error('Sentry syntheticException');\n\n    this._client.captureException(\n      exception,\n      {\n        originalException: exception,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\n    );\n\n    return eventId;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureMessage(message, level, hint) {\n    const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture message!');\n      return eventId;\n    }\n\n    const syntheticException = new Error(message);\n\n    this._client.captureMessage(\n      message,\n      level,\n      {\n        originalException: message,\n        syntheticException,\n        ...hint,\n        event_id: eventId,\n      },\n      this,\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\n    if (!this._client) {\n      logger.warn('No client configured on scope - will not capture event!');\n      return eventId;\n    }\n\n    this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n    return eventId;\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/**\n * Holds additional event information.\n */\nconst Scope = ScopeClass;\n\n/**\n * Holds additional event information.\n */\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { Scope } from './scope.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/** Get the default current scope. */\nfunction getDefaultCurrentScope() {\n  return getGlobalSingleton('defaultCurrentScope', () => new Scope());\n}\n\n/** Get the default isolation scope. */\nfunction getDefaultIsolationScope() {\n  return getGlobalSingleton('defaultIsolationScope', () => new Scope());\n}\n\nexport { getDefaultCurrentScope, getDefaultIsolationScope };\n//# sourceMappingURL=defaultScopes.js.map\n","import { getDefaultCurrentScope, getDefaultIsolationScope } from '../defaultScopes.js';\nimport { Scope } from '../scope.js';\nimport { isThenable } from '../utils-hoist/is.js';\nimport { getMainCarrier, getSentryCarrier } from '../carrier.js';\n\n/**\n * This is an object that holds a stack of scopes.\n */\nclass AsyncContextStack {\n\n   constructor(scope, isolationScope) {\n    let assignedScope;\n    if (!scope) {\n      assignedScope = new Scope();\n    } else {\n      assignedScope = scope;\n    }\n\n    let assignedIsolationScope;\n    if (!isolationScope) {\n      assignedIsolationScope = new Scope();\n    } else {\n      assignedIsolationScope = isolationScope;\n    }\n\n    // scope stack for domains or the process\n    this._stack = [{ scope: assignedScope }];\n    this._isolationScope = assignedIsolationScope;\n  }\n\n  /**\n   * Fork a scope for the stack.\n   */\n   withScope(callback) {\n    const scope = this._pushScope();\n\n    let maybePromiseResult;\n    try {\n      maybePromiseResult = callback(scope);\n    } catch (e) {\n      this._popScope();\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      // @ts-expect-error - isThenable returns the wrong type\n      return maybePromiseResult.then(\n        res => {\n          this._popScope();\n          return res;\n        },\n        e => {\n          this._popScope();\n          throw e;\n        },\n      );\n    }\n\n    this._popScope();\n    return maybePromiseResult;\n  }\n\n  /**\n   * Get the client of the stack.\n   */\n   getClient() {\n    return this.getStackTop().client ;\n  }\n\n  /**\n   * Returns the scope of the top stack.\n   */\n   getScope() {\n    return this.getStackTop().scope;\n  }\n\n  /**\n   * Get the isolation scope for the stack.\n   */\n   getIsolationScope() {\n    return this._isolationScope;\n  }\n\n  /**\n   * Returns the topmost scope layer in the order domain > local > process.\n   */\n   getStackTop() {\n    return this._stack[this._stack.length - 1] ;\n  }\n\n  /**\n   * Push a scope to the stack.\n   */\n   _pushScope() {\n    // We want to clone the content of prev scope\n    const scope = this.getScope().clone();\n    this._stack.push({\n      client: this.getClient(),\n      scope,\n    });\n    return scope;\n  }\n\n  /**\n   * Pop a scope from the stack.\n   */\n   _popScope() {\n    if (this._stack.length <= 1) return false;\n    return !!this._stack.pop();\n  }\n}\n\n/**\n * Get the global async context stack.\n * This will be removed during the v8 cycle and is only here to make migration easier.\n */\nfunction getAsyncContextStack() {\n  const registry = getMainCarrier();\n  const sentry = getSentryCarrier(registry);\n\n  return (sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()));\n}\n\nfunction withScope(callback) {\n  return getAsyncContextStack().withScope(callback);\n}\n\nfunction withSetScope(scope, callback) {\n  const stack = getAsyncContextStack() ;\n  return stack.withScope(() => {\n    stack.getStackTop().scope = scope;\n    return callback(scope);\n  });\n}\n\nfunction withIsolationScope(callback) {\n  return getAsyncContextStack().withScope(() => {\n    return callback(getAsyncContextStack().getIsolationScope());\n  });\n}\n\n/**\n * Get the stack-based async context strategy.\n */\nfunction getStackAsyncContextStrategy() {\n  return {\n    withIsolationScope,\n    withScope,\n    withSetScope,\n    withSetIsolationScope: (_isolationScope, callback) => {\n      return withIsolationScope(callback);\n    },\n    getCurrentScope: () => getAsyncContextStack().getScope(),\n    getIsolationScope: () => getAsyncContextStack().getIsolationScope(),\n  };\n}\n\nexport { AsyncContextStack, getStackAsyncContextStrategy };\n//# sourceMappingURL=stackStrategy.js.map\n","import { getMainCarrier, getSentryCarrier } from '../carrier.js';\nimport { getStackAsyncContextStrategy } from './stackStrategy.js';\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  const sentry = getSentryCarrier(registry);\n  sentry.acs = strategy;\n}\n\n/**\n * Get the current async context strategy.\n * If none has been setup, the default will be used.\n */\nfunction getAsyncContextStrategy(carrier) {\n  const sentry = getSentryCarrier(carrier);\n\n  if (sentry.acs) {\n    return sentry.acs;\n  }\n\n  // Otherwise, use the default one (stack)\n  return getStackAsyncContextStrategy();\n}\n\nexport { getAsyncContextStrategy, setAsyncContextStrategy };\n//# sourceMappingURL=index.js.map\n","import { getAsyncContextStrategy } from './asyncContext/index.js';\nimport { getMainCarrier } from './carrier.js';\nimport { Scope } from './scope.js';\nimport { dropUndefinedKeys } from './utils-hoist/object.js';\nimport { getGlobalSingleton } from './utils-hoist/worldwide.js';\n\n/**\n * Get the currently active scope.\n */\nfunction getCurrentScope() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getCurrentScope();\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current execution context.\n */\nfunction getIsolationScope() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  return acs.getIsolationScope();\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n  return getGlobalSingleton('globalScope', () => new Scope());\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\n/**\n * Either creates a new active scope, or sets the given scope as active scope in the given callback.\n */\nfunction withScope(\n  ...rest\n) {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [scope, callback] = rest;\n\n    if (!scope) {\n      return acs.withScope(callback);\n    }\n\n    return acs.withSetScope(scope, callback);\n  }\n\n  return acs.withScope(rest[0]);\n}\n\n/**\n * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no\n * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the\n * case, for example, in the browser).\n *\n * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.\n *\n * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in \"normal\"\n * applications directly because it comes with pitfalls. Use at your own risk!\n */\n\n/**\n * Either creates a new active isolation scope, or sets the given isolation scope as active scope in the given callback.\n */\nfunction withIsolationScope(\n  ...rest\n\n) {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n\n  // If a scope is defined, we want to make this the active scope instead of the default one\n  if (rest.length === 2) {\n    const [isolationScope, callback] = rest;\n\n    if (!isolationScope) {\n      return acs.withIsolationScope(callback);\n    }\n\n    return acs.withSetIsolationScope(isolationScope, callback);\n  }\n\n  return acs.withIsolationScope(rest[0]);\n}\n\n/**\n * Get the currently active client.\n */\nfunction getClient() {\n  return getCurrentScope().getClient();\n}\n\n/**\n * Get a trace context for the given scope.\n */\nfunction getTraceContextFromScope(scope) {\n  const propagationContext = scope.getPropagationContext();\n\n  // TODO(v9): Use generateSpanId() instead of spanId\n  // eslint-disable-next-line deprecation/deprecation\n  const { traceId, spanId, parentSpanId } = propagationContext;\n\n  const traceContext = dropUndefinedKeys({\n    trace_id: traceId,\n    span_id: spanId,\n    parent_span_id: parentSpanId,\n  });\n\n  return traceContext;\n}\n\nexport { getClient, getCurrentScope, getGlobalScope, getIsolationScope, getTraceContextFromScope, withIsolationScope, withScope };\n//# sourceMappingURL=currentScopes.js.map\n","import { dropUndefinedKeys } from '../utils-hoist/object.js';\n\n/**\n * key: bucketKey\n * value: [exportKey, MetricSummary]\n */\n\nconst METRICS_SPAN_FIELD = '_sentryMetrics';\n\n/**\n * Fetches the metric summary if it exists for the passed span\n */\nfunction getMetricSummaryJsonForSpan(span) {\n  const storage = (span )[METRICS_SPAN_FIELD];\n\n  if (!storage) {\n    return undefined;\n  }\n  const output = {};\n\n  for (const [, [exportKey, summary]] of storage) {\n    const arr = output[exportKey] || (output[exportKey] = []);\n    arr.push(dropUndefinedKeys(summary));\n  }\n\n  return output;\n}\n\n/**\n * Updates the metric summary on a span.\n */\nfunction updateMetricSummaryOnSpan(\n  span,\n  metricType,\n  sanitizedName,\n  value,\n  unit,\n  tags,\n  bucketKey,\n) {\n  const existingStorage = (span )[METRICS_SPAN_FIELD];\n  const storage =\n    existingStorage ||\n    ((span )[METRICS_SPAN_FIELD] = new Map());\n\n  const exportKey = `${metricType}:${sanitizedName}@${unit}`;\n  const bucketItem = storage.get(bucketKey);\n\n  if (bucketItem) {\n    const [, summary] = bucketItem;\n    storage.set(bucketKey, [\n      exportKey,\n      {\n        min: Math.min(summary.min, value),\n        max: Math.max(summary.max, value),\n        count: (summary.count += 1),\n        sum: (summary.sum += value),\n        tags: summary.tags,\n      },\n    ]);\n  } else {\n    storage.set(bucketKey, [\n      exportKey,\n      {\n        min: value,\n        max: value,\n        count: 1,\n        sum: value,\n        tags,\n      },\n    ]);\n  }\n}\n\nexport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan };\n//# sourceMappingURL=metric-summary.js.map\n","/**\n * Use this attribute to represent the source of a span.\n * Should be one of: custom, url, route, view, component, task, unknown\n *\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source';\n\n/**\n * Use this attribute to represent the sample rate used for a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate';\n\n/**\n * Use this attribute to represent the operation of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';\n\n/**\n * Use this attribute to represent the origin of a span.\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';\n\n/** The reason why an idle span finished. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = 'sentry.idle_span_finish_reason';\n\n/** The unit of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = 'sentry.measurement_unit';\n\n/** The value of a measurement, which may be stored as a TimedEvent. */\nconst SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = 'sentry.measurement_value';\n\n/**\n * A custom span name set by users guaranteed to be taken over any automatically\n * inferred name. This attribute is removed before the span is sent.\n *\n * @internal only meant for internal SDK usage\n * @hidden\n */\nconst SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = 'sentry.custom_span_name';\n\n/**\n * The id of the profile that this span occurred in.\n */\nconst SEMANTIC_ATTRIBUTE_PROFILE_ID = 'sentry.profile_id';\n\nconst SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = 'sentry.exclusive_time';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_HIT = 'cache.hit';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_KEY = 'cache.key';\n\nconst SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = 'cache.item_size';\n\n/** TODO: Remove these once we update to latest semantic conventions */\nconst SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = 'http.request.method';\nconst SEMANTIC_ATTRIBUTE_URL_FULL = 'url.full';\n\nexport { SEMANTIC_ATTRIBUTE_CACHE_HIT, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_URL_FULL };\n//# sourceMappingURL=semanticAttributes.js.map\n","const SPAN_STATUS_UNSET = 0;\nconst SPAN_STATUS_OK = 1;\nconst SPAN_STATUS_ERROR = 2;\n\n/**\n * Converts a HTTP status code into a sentry status with a message.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\n// https://develop.sentry.dev/sdk/event-payloads/span/\nfunction getSpanStatusFromHttpCode(httpStatus) {\n  if (httpStatus < 400 && httpStatus >= 100) {\n    return { code: SPAN_STATUS_OK };\n  }\n\n  if (httpStatus >= 400 && httpStatus < 500) {\n    switch (httpStatus) {\n      case 401:\n        return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };\n      case 403:\n        return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };\n      case 404:\n        return { code: SPAN_STATUS_ERROR, message: 'not_found' };\n      case 409:\n        return { code: SPAN_STATUS_ERROR, message: 'already_exists' };\n      case 413:\n        return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };\n      case 429:\n        return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };\n      case 499:\n        return { code: SPAN_STATUS_ERROR, message: 'cancelled' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };\n    }\n  }\n\n  if (httpStatus >= 500 && httpStatus < 600) {\n    switch (httpStatus) {\n      case 501:\n        return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };\n      case 503:\n        return { code: SPAN_STATUS_ERROR, message: 'unavailable' };\n      case 504:\n        return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };\n      default:\n        return { code: SPAN_STATUS_ERROR, message: 'internal_error' };\n    }\n  }\n\n  return { code: SPAN_STATUS_ERROR, message: 'unknown_error' };\n}\n\n/**\n * Sets the Http status attributes on the current span based on the http code.\n * Additionally, the span's status is updated, depending on the http code.\n */\nfunction setHttpStatus(span, httpStatus) {\n  span.setAttribute('http.response.status_code', httpStatus);\n\n  const spanStatus = getSpanStatusFromHttpCode(httpStatus);\n  if (spanStatus.message !== 'unknown_error') {\n    span.setStatus(spanStatus);\n  }\n}\n\nexport { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus };\n//# sourceMappingURL=spanstatus.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isString } from './is.js';\nimport { logger } from './logger.js';\n\n/**\n * @deprecated Use a `\"baggage\"` string directly\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  const baggageObject = parseBaggageHeader(baggageHeader);\n\n  if (!baggageObject) {\n    return undefined;\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 * Take a baggage header and parse it into an object.\n */\nfunction parseBaggageHeader(\n  baggageHeader,\n) {\n  if (!baggageHeader || (!isString(baggageHeader) && !Array.isArray(baggageHeader))) {\n    return undefined;\n  }\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    return baggageHeader.reduce((acc, curr) => {\n      const currBaggageObject = baggageHeaderToObject(curr);\n      Object.entries(currBaggageObject).forEach(([key, value]) => {\n        acc[key] = value;\n      });\n      return acc;\n    }, {});\n  }\n\n  return baggageHeaderToObject(baggageHeader);\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      if (key && value) {\n        acc[key] = value;\n      }\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      DEBUG_BUILD &&\n        logger.warn(\n          `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n        );\n      return baggageHeader;\n    } else {\n      return newBaggageHeader;\n    }\n  }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { generateTraceId, generateSpanId } from './propagationContext.js';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here\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 a propagation context from incoming headers or\n * creates a minimal new one if the headers are undefined.\n */\nfunction propagationContextFromHeaders(\n  sentryTrace,\n  baggage,\n) {\n  const traceparentData = extractTraceparentData(sentryTrace);\n  const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n  if (!traceparentData || !traceparentData.traceId) {\n    return { traceId: generateTraceId(), spanId: generateSpanId() };\n  }\n\n  const { traceId, parentSpanId, parentSampled } = traceparentData;\n\n  const virtualSpanId = generateSpanId();\n\n  return {\n    traceId,\n    parentSpanId,\n    spanId: virtualSpanId,\n    sampled: parentSampled,\n    dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it\n  };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n  traceId = generateTraceId(),\n  spanId = generateSpanId(),\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, propagationContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getCurrentScope } from '../currentScopes.js';\nimport { getMetricSummaryJsonForSpan, updateMetricSummaryOnSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { SPAN_STATUS_UNSET, SPAN_STATUS_OK } from '../tracing/spanstatus.js';\nimport { consoleSandbox } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { _getSpanForScope } from './spanOnScope.js';\n\n// These are aligned with OpenTelemetry trace flags\nconst TRACE_FLAG_NONE = 0x0;\nconst TRACE_FLAG_SAMPLED = 0x1;\n\n// todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`\nlet hasShownSpanDropWarning = false;\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in an event.\n * By default, this will only include trace_id, span_id & parent_span_id.\n * If `includeAllData` is true, it will also include data, op, status & origin.\n */\nfunction spanToTransactionTraceContext(span) {\n  const { spanId: span_id, traceId: trace_id } = span.spanContext();\n  const { data, op, parent_span_id, status, origin } = spanToJSON(span);\n\n  return dropUndefinedKeys({\n    parent_span_id,\n    span_id,\n    trace_id,\n    data,\n    op,\n    status,\n    origin,\n  });\n}\n\n/**\n * Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.\n */\nfunction spanToTraceContext(span) {\n  const { spanId, traceId: trace_id, isRemote } = span.spanContext();\n\n  // If the span is remote, we use a random/virtual span as span_id to the trace context,\n  // and the remote span as parent_span_id\n  const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;\n  const span_id = isRemote ? generateSpanId() : spanId;\n\n  return dropUndefinedKeys({\n    parent_span_id,\n    span_id,\n    trace_id,\n  });\n}\n\n/**\n * Convert a Span to a Sentry trace header.\n */\nfunction spanToTraceHeader(span) {\n  const { traceId, spanId } = span.spanContext();\n  const sampled = spanIsSampled(span);\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\n/**\n * Convert a span time input into a timestamp in seconds.\n */\nfunction spanTimeInputToSeconds(input) {\n  if (typeof input === 'number') {\n    return ensureTimestampInSeconds(input);\n  }\n\n  if (Array.isArray(input)) {\n    // See {@link HrTime} for the array-based time format\n    return input[0] + input[1] / 1e9;\n  }\n\n  if (input instanceof Date) {\n    return ensureTimestampInSeconds(input.getTime());\n  }\n\n  return timestampInSeconds();\n}\n\n/**\n * Converts a timestamp to second, if it was in milliseconds, or keeps it as second.\n */\nfunction ensureTimestampInSeconds(timestamp) {\n  const isMs = timestamp > 9999999999;\n  return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Convert a span to a JSON representation.\n */\n// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).\n// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.\n// And `spanToJSON` needs the Span class from `span.ts` to check here.\nfunction spanToJSON(span) {\n  if (spanIsSentrySpan(span)) {\n    return span.getSpanJSON();\n  }\n\n  try {\n    const { spanId: span_id, traceId: trace_id } = span.spanContext();\n\n    // Handle a span from @opentelemetry/sdk-base-trace's `Span` class\n    if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {\n      const { attributes, startTime, name, endTime, parentSpanId, status } = span;\n\n      return dropUndefinedKeys({\n        span_id,\n        trace_id,\n        data: attributes,\n        description: name,\n        parent_span_id: parentSpanId,\n        start_timestamp: spanTimeInputToSeconds(startTime),\n        // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time\n        timestamp: spanTimeInputToSeconds(endTime) || undefined,\n        status: getStatusMessage(status),\n        op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n        origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n        _metrics_summary: getMetricSummaryJsonForSpan(span),\n      });\n    }\n\n    // Finally, at least we have `spanContext()`....\n    return {\n      span_id,\n      trace_id,\n    };\n  } catch (e) {\n    return {};\n  }\n}\n\nfunction spanIsOpenTelemetrySdkTraceBaseSpan(span) {\n  const castSpan = span ;\n  return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;\n}\n\n/** Exported only for tests. */\n\n/**\n * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.\n * :( So instead we approximate this by checking if it has the `getSpanJSON` method.\n */\nfunction spanIsSentrySpan(span) {\n  return typeof (span ).getSpanJSON === 'function';\n}\n\n/**\n * Returns true if a span is sampled.\n * In most cases, you should just use `span.isRecording()` instead.\n * However, this has a slightly different semantic, as it also returns false if the span is finished.\n * So in the case where this distinction is important, use this method.\n */\nfunction spanIsSampled(span) {\n  // We align our trace flags with the ones OpenTelemetry use\n  // So we also check for sampled the same way they do.\n  const { traceFlags } = span.spanContext();\n  return traceFlags === TRACE_FLAG_SAMPLED;\n}\n\n/** Get the status message to use for a JSON representation of a span. */\nfunction getStatusMessage(status) {\n  if (!status || status.code === SPAN_STATUS_UNSET) {\n    return undefined;\n  }\n\n  if (status.code === SPAN_STATUS_OK) {\n    return 'ok';\n  }\n\n  return status.message || 'unknown_error';\n}\n\nconst CHILD_SPANS_FIELD = '_sentryChildSpans';\nconst ROOT_SPAN_FIELD = '_sentryRootSpan';\n\n/**\n * Adds an opaque child span reference to a span.\n */\nfunction addChildSpanToSpan(span, childSpan) {\n  // We store the root span reference on the child span\n  // We need this for `getRootSpan()` to work\n  const rootSpan = span[ROOT_SPAN_FIELD] || span;\n  addNonEnumerableProperty(childSpan , ROOT_SPAN_FIELD, rootSpan);\n\n  // We store a list of child spans on the parent span\n  // We need this for `getSpanDescendants()` to work\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].add(childSpan);\n  } else {\n    addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));\n  }\n}\n\n/** This is only used internally by Idle Spans. */\nfunction removeChildSpanFromSpan(span, childSpan) {\n  if (span[CHILD_SPANS_FIELD]) {\n    span[CHILD_SPANS_FIELD].delete(childSpan);\n  }\n}\n\n/**\n * Returns an array of the given span and all of its descendants.\n */\nfunction getSpanDescendants(span) {\n  const resultSet = new Set();\n\n  function addSpanChildren(span) {\n    // This exit condition is required to not infinitely loop in case of a circular dependency.\n    if (resultSet.has(span)) {\n      return;\n      // We want to ignore unsampled spans (e.g. non recording spans)\n    } else if (spanIsSampled(span)) {\n      resultSet.add(span);\n      const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];\n      for (const childSpan of childSpans) {\n        addSpanChildren(childSpan);\n      }\n    }\n  }\n\n  addSpanChildren(span);\n\n  return Array.from(resultSet);\n}\n\n/**\n * Returns the root span of a given span.\n */\nfunction getRootSpan(span) {\n  return span[ROOT_SPAN_FIELD] || span;\n}\n\n/**\n * Returns the currently active span.\n */\nfunction getActiveSpan() {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getActiveSpan) {\n    return acs.getActiveSpan();\n  }\n\n  return _getSpanForScope(getCurrentScope());\n}\n\n/**\n * Updates the metric summary on the currently active span\n */\nfunction updateMetricSummaryOnActiveSpan(\n  metricType,\n  sanitizedName,\n  value,\n  unit,\n  tags,\n  bucketKey,\n) {\n  const span = getActiveSpan();\n  if (span) {\n    updateMetricSummaryOnSpan(span, metricType, sanitizedName, value, unit, tags, bucketKey);\n  }\n}\n\n/**\n * Logs a warning once if `beforeSendSpan` is used to drop spans.\n *\n * todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`.\n */\nfunction showSpanDropWarning() {\n  if (!hasShownSpanDropWarning) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.warn(\n        '[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.',\n      );\n    });\n    hasShownSpanDropWarning = true;\n  }\n}\n\n/**\n * Updates the name of the given span and ensures that the span name is not\n * overwritten by the Sentry SDK.\n *\n * Use this function instead of `span.updateName()` if you want to make sure that\n * your name is kept. For some spans, for example root `http.server` spans the\n * Sentry SDK would otherwise overwrite the span name with a high-quality name\n * it infers when the span ends.\n *\n * Use this function in server code or when your span is started on the server\n * and on the client (browser). If you only update a span name on the client,\n * you can also use `span.updateName()` the SDK does not overwrite the name.\n *\n * @param span - The span to update the name of.\n * @param name - The name to set on the span.\n */\nfunction updateSpanName(span, name) {\n  span.updateName(name);\n  span.setAttributes({\n    [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n    [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,\n  });\n}\n\nexport { TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED, addChildSpanToSpan, getActiveSpan, getRootSpan, getSpanDescendants, getStatusMessage, removeChildSpanFromSpan, showSpanDropWarning, spanIsSampled, spanTimeInputToSeconds, spanToJSON, spanToTraceContext, spanToTraceHeader, spanToTransactionTraceContext, updateMetricSummaryOnActiveSpan, updateSpanName };\n//# sourceMappingURL=spanUtils.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { addGlobalErrorInstrumentationHandler } from '../utils-hoist/instrument/globalError.js';\nimport { addGlobalUnhandledRejectionInstrumentationHandler } from '../utils-hoist/instrument/globalUnhandledRejection.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getActiveSpan, getRootSpan } from '../utils/spanUtils.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Ensure that global errors automatically set the active span status.\n */\nfunction registerSpanErrorInstrumentation() {\n  if (errorsInstrumented) {\n    return;\n  }\n\n  errorsInstrumented = true;\n  addGlobalErrorInstrumentationHandler(errorCallback);\n  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active root span as failed\n */\nfunction errorCallback() {\n  const activeSpan = getActiveSpan();\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n  if (rootSpan) {\n    const message = 'internal_error';\n    DEBUG_BUILD && logger.log(`[Tracing] Root span: ${message} -> Global error occurred`);\n    rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message });\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 { registerSpanErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { addNonEnumerableProperty } from '../utils-hoist/object.js';\n\nconst SCOPE_ON_START_SPAN_FIELD = '_sentryScope';\nconst ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope';\n\n/** Store the scope & isolation scope for a span, which can the be used when it is finished. */\nfunction setCapturedScopesOnSpan(span, scope, isolationScope) {\n  if (span) {\n    addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope);\n    addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope);\n  }\n}\n\n/**\n * Grabs the scope and isolation scope off a span that were active when the span was started.\n */\nfunction getCapturedScopesOnSpan(span) {\n  return {\n    scope: (span )[SCOPE_ON_START_SPAN_FIELD],\n    isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD],\n  };\n}\n\nexport { getCapturedScopesOnSpan, setCapturedScopesOnSpan };\n//# sourceMappingURL=utils.js.map\n","import { getClient } from '../currentScopes.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 = getClient();\n  const options = maybeOptions || (client && client.getOptions());\n  // eslint-disable-next-line deprecation/deprecation\n  return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","import { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils.js';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nclass SentryNonRecordingSpan  {\n\n   constructor(spanContext = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n  }\n\n  /** @inheritdoc */\n   spanContext() {\n    return {\n      spanId: this._spanId,\n      traceId: this._traceId,\n      traceFlags: TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n   end(_timestamp) {}\n\n  /** @inheritdoc */\n   setAttribute(_key, _value) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   setAttributes(_values) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   setStatus(_status) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   updateName(_name) {\n    return this;\n  }\n\n  /** @inheritdoc */\n   isRecording() {\n    return false;\n  }\n\n  /** @inheritdoc */\n   addEvent(\n    _name,\n    _attributesOrStartTime,\n    _startTime,\n  ) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLink(_link) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLinks(_links) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   recordException(_exception, _time) {\n    // noop\n  }\n}\n\nexport { SentryNonRecordingSpan };\n//# sourceMappingURL=sentryNonRecordingSpan.js.map\n","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getClient } from '../currentScopes.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';\nimport { baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\nimport { dropUndefinedKeys, addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { getRootSpan, spanToJSON, spanIsSampled } from '../utils/spanUtils.js';\n\n/**\n * If you change this value, also update the terser plugin config to\n * avoid minification of the object property!\n */\nconst FROZEN_DSC_FIELD = '_frozenDsc';\n\n/**\n * Freeze the given DSC on the given span.\n */\nfunction freezeDscOnSpan(span, dsc) {\n  const spanWithMaybeDsc = span ;\n  addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc);\n}\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatches the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(trace_id, client) {\n  const options = client.getOptions();\n\n  const { publicKey: public_key } = client.getDsn() || {};\n\n  const dsc = dropUndefinedKeys({\n    environment: options.environment || DEFAULT_ENVIRONMENT,\n    release: options.release,\n    public_key,\n    trace_id,\n  }) ;\n\n  client.emit('createDsc', dsc);\n\n  return dsc;\n}\n\n/**\n * Get the dynamic sampling context for the currently active scopes.\n */\nfunction getDynamicSamplingContextFromScope(client, scope) {\n  const propagationContext = scope.getPropagationContext();\n  return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client);\n}\n\n/**\n * Creates a dynamic sampling context from a span (and client and scope)\n *\n * @param span the span from which a few values like the root span name and sample rate are extracted.\n *\n * @returns a dynamic sampling context\n */\nfunction getDynamicSamplingContextFromSpan(span) {\n  const client = getClient();\n  if (!client) {\n    return {};\n  }\n\n  const rootSpan = getRootSpan(span);\n\n  // For core implementation, we freeze the DSC onto the span as a non-enumerable property\n  const frozenDsc = (rootSpan )[FROZEN_DSC_FIELD];\n  if (frozenDsc) {\n    return frozenDsc;\n  }\n\n  // For OpenTelemetry, we freeze the DSC on the trace state\n  const traceState = rootSpan.spanContext().traceState;\n  const traceStateDsc = traceState && traceState.get('sentry.dsc');\n\n  // If the span has a DSC, we want it to take precedence\n  const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc);\n\n  if (dscOnTraceState) {\n    return dscOnTraceState;\n  }\n\n  // Else, we generate it from the span\n  const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client);\n  const jsonSpan = spanToJSON(rootSpan);\n  const attributes = jsonSpan.data || {};\n  const maybeSampleRate = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];\n\n  if (maybeSampleRate != null) {\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 = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n  // after JSON conversion, txn.name becomes jsonSpan.description\n  const name = jsonSpan.description;\n  if (source !== 'url' && name) {\n    dsc.transaction = name;\n  }\n\n  // How can we even land here with hasTracingEnabled() returning false?\n  // Otel creates a Non-recording span in Tracing Without Performance mode when handling incoming requests\n  // So we end up with an active span that is not sampled (neither positively nor negatively)\n  if (hasTracingEnabled()) {\n    dsc.sampled = String(spanIsSampled(rootSpan));\n  }\n\n  client.emit('createDsc', dsc, rootSpan);\n\n  return dsc;\n}\n\n/**\n * Convert a Span to a baggage header.\n */\nfunction spanToBaggageHeader(span) {\n  const dsc = getDynamicSamplingContextFromSpan(span);\n  return dynamicSamplingContextToSentryBaggageHeader(dsc);\n}\n\nexport { freezeDscOnSpan, getDynamicSamplingContextFromClient, getDynamicSamplingContextFromScope, getDynamicSamplingContextFromSpan, spanToBaggageHeader };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { spanToJSON, spanIsSampled, getRootSpan } from '../utils/spanUtils.js';\n\n/**\n * Print a log message for a started span.\n */\nfunction logSpanStart(span) {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >', parent_span_id: parentSpanId } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n\n  const sampled = spanIsSampled(span);\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const header = `[Tracing] Starting ${sampled ? 'sampled' : 'unsampled'} ${isRootSpan ? 'root ' : ''}span`;\n\n  const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`];\n\n  if (parentSpanId) {\n    infoParts.push(`parent ID: ${parentSpanId}`);\n  }\n\n  if (!isRootSpan) {\n    const { op, description } = spanToJSON(rootSpan);\n    infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`);\n    if (op) {\n      infoParts.push(`root op: ${op}`);\n    }\n    if (description) {\n      infoParts.push(`root description: ${description}`);\n    }\n  }\n\n  logger.log(`${header}\n  ${infoParts.join('\\n  ')}`);\n}\n\n/**\n * Print a log message for an ended span.\n */\nfunction logSpanEnd(span) {\n  if (!DEBUG_BUILD) return;\n\n  const { description = '< unknown name >', op = '< unknown op >' } = spanToJSON(span);\n  const { spanId } = span.spanContext();\n  const rootSpan = getRootSpan(span);\n  const isRootSpan = rootSpan === span;\n\n  const msg = `[Tracing] Finishing \"${op}\" ${isRootSpan ? 'root ' : ''}span \"${description}\" with ID ${spanId}`;\n  logger.log(msg);\n}\n\nexport { logSpanEnd, logSpanStart };\n//# sourceMappingURL=logSpans.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\n\n/**\n * Parse a sample rate from a given value.\n * This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).\n * If a string is passed, we try to convert it to a number.\n *\n * Any invalid sample rate will return `undefined`.\n */\nfunction parseSampleRate(sampleRate) {\n  if (typeof sampleRate === 'boolean') {\n    return Number(sampleRate);\n  }\n\n  const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;\n  if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n          sampleRate,\n        )} of type ${JSON.stringify(typeof sampleRate)}.`,\n      );\n    return undefined;\n  }\n\n  return rate;\n}\n\nexport { parseSampleRate };\n//# sourceMappingURL=parseSampleRate.js.map\n","import { getIsolationScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { parseSampleRate } from '../utils/parseSampleRate.js';\n\n/**\n * Makes a sampling decision for the given options.\n *\n * Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n */\nfunction sampleSpan(\n  options,\n  samplingContext,\n) {\n  // nothing to do if tracing is not enabled\n  if (!hasTracingEnabled(options)) {\n    return [false];\n  }\n\n  // Casting this from unknown, as the type of `sdkProcessingMetadata` is only changed in v9 and `normalizedRequest` is set in SentryHttpInstrumentation\n  const normalizedRequest = getIsolationScope().getScopeData().sdkProcessingMetadata\n    .normalizedRequest ;\n\n  const enhancedSamplingContext = {\n    ...samplingContext,\n    normalizedRequest: samplingContext.normalizedRequest || normalizedRequest,\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(enhancedSamplingContext);\n  } else if (enhancedSamplingContext.parentSampled !== undefined) {\n    sampleRate = enhancedSamplingContext.parentSampled;\n  } else if (typeof options.tracesSampleRate !== 'undefined') {\n    sampleRate = options.tracesSampleRate;\n  } else {\n    // When `enableTracing === true`, we use a sample rate of 100%\n    sampleRate = 1;\n  }\n\n  // Since this is coming from the user (or from a function provided by the user), who knows what we might get.\n  // (The only valid values are booleans or numbers between 0 and 1.)\n  const parsedSampleRate = parseSampleRate(sampleRate);\n\n  if (parsedSampleRate === undefined) {\n    DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n    return [false];\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 (!parsedSampleRate) {\n    DEBUG_BUILD &&\n      logger.log(\n        `[Tracing] Discarding transaction because ${\n          typeof options.tracesSampler === 'function'\n            ? 'tracesSampler returned 0 or false'\n            : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n        }`,\n      );\n    return [false, parsedSampleRate];\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 shouldSample = Math.random() < parsedSampleRate;\n\n  // if we're not going to keep it, we're done\n  if (!shouldSample) {\n    DEBUG_BUILD &&\n      logger.log(\n        `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n          sampleRate,\n        )})`,\n      );\n    return [false, parsedSampleRate];\n  }\n\n  return [true, parsedSampleRate];\n}\n\nexport { sampleSpan };\n//# sourceMappingURL=sampling.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { consoleSandbox, 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    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(`Invalid Sentry Dsn: ${str}`);\n    });\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 (!DEBUG_BUILD) {\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","/* 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 *\n * @deprecated This function is deprecated and will be removed in the next major version.\n */\n// TODO(v9): Move this function into normalize() directly\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 { 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 normalized 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  // eslint-disable-next-line deprecation/deprecation\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    ['boolean', 'string'].includes(typeof value) ||\n    (typeof value === 'number' && Number.isFinite(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' && !Number.isFinite(value)) {\n      return `[${value}]`;\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\n/**\n * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint\n * across platforms and working directory.\n *\n * @param url The URL to be normalized.\n * @param basePath The application base path.\n * @returns The normalized URL.\n */\nfunction normalizeUrlToBase(url, basePath) {\n  const escapedBase = basePath\n    // Backslash to forward\n    .replace(/\\\\/g, '/')\n    // Escape RegExp special characters\n    .replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n\n  let newUrl = url;\n  try {\n    newUrl = decodeURI(url);\n  } catch (_Oo) {\n    // Sometime this breaks\n  }\n  return (\n    newUrl\n      .replace(/\\\\/g, '/')\n      .replace(/webpack:\\/?/g, '') // Remove intermediate base path\n      // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n      .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///')\n  );\n}\n\nexport { normalize, normalizeToSize, normalizeUrlToBase };\n//# sourceMappingURL=normalize.js.map\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\nimport { GLOBAL_OBJ } from './worldwide.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 array.\n */\nfunction encodeUTF8(input) {\n  return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.encodePolyfill\n    ? GLOBAL_OBJ.__SENTRY__.encodePolyfill(input)\n    : new TextEncoder().encode(input);\n}\n\n/**\n * Decode a UTF8 array to string.\n */\nfunction decodeUTF8(input) {\n  return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.decodePolyfill\n    ? GLOBAL_OBJ.__SENTRY__.decodePolyfill(input)\n    : new TextDecoder().decode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope) {\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), next];\n    } else {\n      parts.push(typeof next === 'string' ? encodeUTF8(next) : 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.stringify()` 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(env) {\n  let buffer = typeof env === 'string' ? encodeUTF8(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(decodeUTF8(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 envelope item for a single span\n */\nfunction createSpanEnvelopeItem(spanJson) {\n  const spanHeaders = {\n    type: 'span',\n  };\n\n  return [spanHeaders, spanJson];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(attachment) {\n  const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data) : 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  profile_chunk: 'profile',\n  replay_event: 'replay',\n  replay_recording: 'replay',\n  check_in: 'monitor',\n  feedback: 'feedback',\n  span: 'span',\n  statsd: 'metric_bucket',\n  raw_security: 'security',\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 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, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { getDynamicSamplingContextFromSpan } from './tracing/dynamicSamplingContext.js';\nimport { dsnToString } from './utils-hoist/dsn.js';\nimport { getSdkMetadataForEnvelopeHeader, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem } from './utils-hoist/envelope.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport { spanToJSON, showSpanDropWarning } from './utils/spanUtils.js';\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 adjust 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\n/**\n * Create envelope from Span item.\n *\n * Takes an optional client and runs spans through `beforeSendSpan` if available.\n */\nfunction createSpanEnvelope(spans, client) {\n  function dscHasRequiredProps(dsc) {\n    return !!dsc.trace_id && !!dsc.public_key;\n  }\n\n  // For the moment we'll obtain the DSC from the first span in the array\n  // This might need to be changed if we permit sending multiple spans from\n  // different segments in one envelope\n  const dsc = getDynamicSamplingContextFromSpan(spans[0]);\n\n  const dsn = client && client.getDsn();\n  const tunnel = client && client.getOptions().tunnel;\n\n  const headers = {\n    sent_at: new Date().toISOString(),\n    ...(dscHasRequiredProps(dsc) && { trace: dsc }),\n    ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n  };\n\n  const beforeSendSpan = client && client.getOptions().beforeSendSpan;\n  const convertToSpanJSON = beforeSendSpan\n    ? (span) => {\n        const spanJson = beforeSendSpan(spanToJSON(span) );\n        if (!spanJson) {\n          showSpanDropWarning();\n        }\n        return spanJson;\n      }\n    : (span) => spanToJSON(span);\n\n  const items = [];\n  for (const span of spans) {\n    const spanJson = convertToSpanJSON(span);\n    if (spanJson) {\n      items.push(createSpanEnvelopeItem(spanJson));\n    }\n  }\n\n  return createEnvelope(headers, items);\n}\n\nexport { createEventEnvelope, createSessionEnvelope, createSpanEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getRootSpan, getActiveSpan } from '../utils/spanUtils.js';\n\n/**\n * Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span\n * as the 4th parameter.\n */\nfunction setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {\n  const rootSpan = activeSpan && getRootSpan(activeSpan);\n\n  if (rootSpan) {\n    DEBUG_BUILD && logger.log(`[Measurement] Setting measurement on root span: ${name} = ${value} ${unit}`);\n    rootSpan.addEvent(name, {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value,\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit ,\n    });\n  }\n}\n\n/**\n * Convert timed events to measurements.\n */\nfunction timedEventsToMeasurements(events) {\n  if (!events || events.length === 0) {\n    return undefined;\n  }\n\n  const measurements = {};\n  events.forEach(event => {\n    const attributes = event.attributes || {};\n    const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT] ;\n    const value = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE] ;\n\n    if (typeof unit === 'string' && typeof value === 'number') {\n      measurements[event.name] = { value, unit };\n    }\n  });\n\n  return measurements;\n}\n\nexport { setMeasurement, timedEventsToMeasurements };\n//# sourceMappingURL=measurement.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { createSpanEnvelope } from '../envelope.js';\nimport { getMetricSummaryJsonForSpan } from '../metrics/metric-summary.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_PROFILE_ID, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { generateTraceId, generateSpanId } from '../utils-hoist/propagationContext.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { TRACE_FLAG_SAMPLED, TRACE_FLAG_NONE, spanTimeInputToSeconds, getStatusMessage, getRootSpan, spanToJSON, getSpanDescendants, spanToTransactionTraceContext } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext.js';\nimport { logSpanEnd } from './logSpans.js';\nimport { timedEventsToMeasurements } from './measurement.js';\nimport { getCapturedScopesOnSpan } from './utils.js';\n\nconst MAX_SPAN_COUNT = 1000;\n\n/**\n * Span contains all data about a span\n */\nclass SentrySpan  {\n\n  /** Epoch timestamp in seconds when the span started. */\n\n  /** Epoch timestamp in seconds when the span ended. */\n\n  /** Internal keeper of the status */\n\n  /** The timed events added to this span. */\n\n  /** if true, treat span as a standalone span (not part of a transaction) */\n\n  /**\n   * You should never call the constructor manually, always use `Sentry.startSpan()`\n   * or other span methods.\n   * @internal\n   * @hideconstructor\n   * @hidden\n   */\n   constructor(spanContext = {}) {\n    this._traceId = spanContext.traceId || generateTraceId();\n    this._spanId = spanContext.spanId || generateSpanId();\n    this._startTime = spanContext.startTimestamp || timestampInSeconds();\n\n    this._attributes = {};\n    this.setAttributes({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op,\n      ...spanContext.attributes,\n    });\n\n    this._name = spanContext.name;\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.endTimestamp) {\n      this._endTime = spanContext.endTimestamp;\n    }\n\n    this._events = [];\n\n    this._isStandaloneSpan = spanContext.isStandalone;\n\n    // If the span is already ended, ensure we finalize the span immediately\n    if (this._endTime) {\n      this._onSpanEnded();\n    }\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLink(_link) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   addLinks(_links) {\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but it is needed for being compliant with the OTEL Span interface.\n   *\n   * @hidden\n   * @internal\n   */\n   recordException(_exception, _time) {\n    // noop\n  }\n\n  /** @inheritdoc */\n   spanContext() {\n    const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this;\n    return {\n      spanId,\n      traceId,\n      traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE,\n    };\n  }\n\n  /** @inheritdoc */\n   setAttribute(key, value) {\n    if (value === undefined) {\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete this._attributes[key];\n    } else {\n      this._attributes[key] = value;\n    }\n\n    return this;\n  }\n\n  /** @inheritdoc */\n   setAttributes(attributes) {\n    Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key]));\n    return this;\n  }\n\n  /**\n   * This should generally not be used,\n   * but we need it for browser tracing where we want to adjust the start time afterwards.\n   * USE THIS WITH CAUTION!\n   *\n   * @hidden\n   * @internal\n   */\n   updateStartTime(timeInput) {\n    this._startTime = spanTimeInputToSeconds(timeInput);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   setStatus(value) {\n    this._status = value;\n    return this;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   updateName(name) {\n    this._name = name;\n    this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');\n    return this;\n  }\n\n  /** @inheritdoc */\n   end(endTimestamp) {\n    // If already ended, skip\n    if (this._endTime) {\n      return;\n    }\n\n    this._endTime = spanTimeInputToSeconds(endTimestamp);\n    logSpanEnd(this);\n\n    this._onSpanEnded();\n  }\n\n  /**\n   * Get JSON representation of this span.\n   *\n   * @hidden\n   * @internal This method is purely for internal purposes and should not be used outside\n   * of SDK code. If you need to get a JSON representation of a span,\n   * use `spanToJSON(span)` instead.\n   */\n   getSpanJSON() {\n    return dropUndefinedKeys({\n      data: this._attributes,\n      description: this._name,\n      op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP],\n      parent_span_id: this._parentSpanId,\n      span_id: this._spanId,\n      start_timestamp: this._startTime,\n      status: getStatusMessage(this._status),\n      timestamp: this._endTime,\n      trace_id: this._traceId,\n      origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,\n      _metrics_summary: getMetricSummaryJsonForSpan(this),\n      profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] ,\n      exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME] ,\n      measurements: timedEventsToMeasurements(this._events),\n      is_segment: (this._isStandaloneSpan && getRootSpan(this) === this) || undefined,\n      segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : undefined,\n    });\n  }\n\n  /** @inheritdoc */\n   isRecording() {\n    return !this._endTime && !!this._sampled;\n  }\n\n  /**\n   * @inheritdoc\n   */\n   addEvent(\n    name,\n    attributesOrStartTime,\n    startTime,\n  ) {\n    DEBUG_BUILD && logger.log('[Tracing] Adding an event to span:', name);\n\n    const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds();\n    const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {};\n\n    const event = {\n      name,\n      time: spanTimeInputToSeconds(time),\n      attributes,\n    };\n\n    this._events.push(event);\n\n    return this;\n  }\n\n  /**\n   * This method should generally not be used,\n   * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set.\n   * USE THIS WITH CAUTION!\n   * @internal\n   * @hidden\n   * @experimental\n   */\n   isStandaloneSpan() {\n    return !!this._isStandaloneSpan;\n  }\n\n  /** Emit `spanEnd` when the span is ended. */\n   _onSpanEnded() {\n    const client = getClient();\n    if (client) {\n      client.emit('spanEnd', this);\n    }\n\n    // A segment span is basically the root span of a local span tree.\n    // So for now, this is either what we previously refer to as the root span,\n    // or a standalone span.\n    const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this);\n\n    if (!isSegmentSpan) {\n      return;\n    }\n\n    // if this is a standalone span, we send it immediately\n    if (this._isStandaloneSpan) {\n      if (this._sampled) {\n        sendSpanEnvelope(createSpanEnvelope([this], client));\n      } else {\n        DEBUG_BUILD &&\n          logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');\n        if (client) {\n          client.recordDroppedEvent('sample_rate', 'span');\n        }\n      }\n      return;\n    }\n\n    const transactionEvent = this._convertSpanToTransaction();\n    if (transactionEvent) {\n      const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope();\n      scope.captureEvent(transactionEvent);\n    }\n  }\n\n  /**\n   * Finish the transaction & prepare the event to send to Sentry.\n   */\n   _convertSpanToTransaction() {\n    // We can only convert finished spans\n    if (!isFullFinishedSpan(spanToJSON(this))) {\n      return undefined;\n    }\n\n    if (!this._name) {\n      DEBUG_BUILD && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n      this._name = '<unlabeled transaction>';\n    }\n\n    const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this);\n    const scope = capturedSpanScope || getCurrentScope();\n    const client = scope.getClient() || getClient();\n\n    if (this._sampled !== true) {\n      // At this point if `sampled !== true` we want to discard the transaction.\n      DEBUG_BUILD && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n      if (client) {\n        client.recordDroppedEvent('sample_rate', 'transaction');\n      }\n\n      return undefined;\n    }\n\n    // The transaction span itself as well as any potential standalone spans should be filtered out\n    const finishedSpans = getSpanDescendants(this).filter(span => span !== this && !isStandaloneSpan(span));\n\n    const spans = finishedSpans.map(span => spanToJSON(span)).filter(isFullFinishedSpan);\n\n    const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] ;\n\n    // remove internal root span attributes we don't need to send.\n    /* eslint-disable @typescript-eslint/no-dynamic-delete */\n    delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    spans.forEach(span => {\n      span.data && delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];\n    });\n    // eslint-enabled-next-line @typescript-eslint/no-dynamic-delete\n\n    const transaction = {\n      contexts: {\n        trace: spanToTransactionTraceContext(this),\n      },\n      spans:\n        // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here\n        // we do not use spans anymore after this point\n        spans.length > MAX_SPAN_COUNT\n          ? spans.sort((a, b) => a.start_timestamp - b.start_timestamp).slice(0, MAX_SPAN_COUNT)\n          : spans,\n      start_timestamp: this._startTime,\n      timestamp: this._endTime,\n      transaction: this._name,\n      type: 'transaction',\n      sdkProcessingMetadata: {\n        capturedSpanScope,\n        capturedSpanIsolationScope,\n        ...dropUndefinedKeys({\n          dynamicSamplingContext: getDynamicSamplingContextFromSpan(this),\n        }),\n      },\n      _metrics_summary: getMetricSummaryJsonForSpan(this),\n      ...(source && {\n        transaction_info: {\n          source,\n        },\n      }),\n    };\n\n    const measurements = timedEventsToMeasurements(this._events);\n    const hasMeasurements = measurements && Object.keys(measurements).length;\n\n    if (hasMeasurements) {\n      DEBUG_BUILD &&\n        logger.log(\n          '[Measurements] Adding measurements to transaction event',\n          JSON.stringify(measurements, undefined, 2),\n        );\n      transaction.measurements = measurements;\n    }\n\n    return transaction;\n  }\n}\n\nfunction isSpanTimeInput(value) {\n  return (value && typeof value === 'number') || value instanceof Date || Array.isArray(value);\n}\n\n// We want to filter out any incomplete SpanJSON objects\nfunction isFullFinishedSpan(input) {\n  return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id;\n}\n\n/** `SentrySpan`s can be sent as a standalone span rather than belonging to a transaction */\nfunction isStandaloneSpan(span) {\n  return span instanceof SentrySpan && span.isStandaloneSpan();\n}\n\n/**\n * Sends a `SpanEnvelope`.\n *\n * Note: If the envelope's spans are dropped, e.g. via `beforeSendSpan`,\n * the envelope will not be sent either.\n */\nfunction sendSpanEnvelope(envelope) {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const spanItems = envelope[1];\n  if (!spanItems || spanItems.length === 0) {\n    client.recordDroppedEvent('before_send', 'span');\n    return;\n  }\n\n  // sendEnvelope should not throw\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  client.sendEnvelope(envelope);\n}\n\nexport { SentrySpan };\n//# sourceMappingURL=sentrySpan.js.map\n","import { getMainCarrier } from '../carrier.js';\nimport { withScope, getCurrentScope, getIsolationScope, getClient } from '../currentScopes.js';\nimport { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { generateTraceId } from '../utils-hoist/propagationContext.js';\nimport { propagationContextFromHeaders } from '../utils-hoist/tracing.js';\nimport { handleCallbackErrors } from '../utils/handleCallbackErrors.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope, _getSpanForScope } from '../utils/spanOnScope.js';\nimport { spanToJSON, addChildSpanToSpan, spanIsSampled, spanTimeInputToSeconds, getRootSpan } from '../utils/spanUtils.js';\nimport { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';\nimport { logSpanStart } from './logSpans.js';\nimport { sampleSpan } from './sampling.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SentrySpan } from './sentrySpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { setCapturedScopesOnSpan } from './utils.js';\n\nconst SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';\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.getActiveSpan()`, 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 * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpan(options, callback) {\n  const acs = getAcs();\n  if (acs.startSpan) {\n    return acs.startSpan(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  return withScope(options.scope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope);\n\n      const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n      const activeSpan = shouldSkipSpan\n        ? new SentryNonRecordingSpan()\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      _setSpanForScope(scope, activeSpan);\n\n      return handleCallbackErrors(\n        () => callback(activeSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n        () => activeSpan.end(),\n      );\n    });\n  });\n}\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. You'll have to call `span.end()` manually.\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 * You'll always get a span passed to the callback,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startSpanManual(options, callback) {\n  const acs = getAcs();\n  if (acs.startSpanManual) {\n    return acs.startSpanManual(options, callback);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  return withScope(options.scope, () => {\n    // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n    const wrapper = getActiveSpanWrapper(customParentSpan);\n\n    return wrapper(() => {\n      const scope = getCurrentScope();\n      const parentSpan = getParentSpan(scope);\n\n      const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n      const activeSpan = shouldSkipSpan\n        ? new SentryNonRecordingSpan()\n        : createChildOrRootSpan({\n            parentSpan,\n            spanArguments,\n            forceTransaction,\n            scope,\n          });\n\n      _setSpanForScope(scope, activeSpan);\n\n      function finishAndSetSpan() {\n        activeSpan.end();\n      }\n\n      return handleCallbackErrors(\n        () => callback(activeSpan, finishAndSetSpan),\n        () => {\n          // Only update the span status if it hasn't been changed yet, and the span is not yet finished\n          const { status } = spanToJSON(activeSpan);\n          if (activeSpan.isRecording() && (!status || status === 'ok')) {\n            activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n          }\n        },\n      );\n    });\n  });\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.getActiveSpan()`.\n *\n * If you want to create a span that is set as active, use {@link startSpan}.\n *\n * This function will always return a span,\n * it may just be a non-recording span if the span is not sampled or if tracing is disabled.\n */\nfunction startInactiveSpan(options) {\n  const acs = getAcs();\n  if (acs.startInactiveSpan) {\n    return acs.startInactiveSpan(options);\n  }\n\n  const spanArguments = parseSentrySpanArguments(options);\n  const { forceTransaction, parentSpan: customParentSpan } = options;\n\n  // If `options.scope` is defined, we use this as as a wrapper,\n  // If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`\n  const wrapper = options.scope\n    ? (callback) => withScope(options.scope, callback)\n    : customParentSpan !== undefined\n      ? (callback) => withActiveSpan(customParentSpan, callback)\n      : (callback) => callback();\n\n  return wrapper(() => {\n    const scope = getCurrentScope();\n    const parentSpan = getParentSpan(scope);\n\n    const shouldSkipSpan = options.onlyIfParent && !parentSpan;\n\n    if (shouldSkipSpan) {\n      return new SentryNonRecordingSpan();\n    }\n\n    return createChildOrRootSpan({\n      parentSpan,\n      spanArguments,\n      forceTransaction,\n      scope,\n    });\n  });\n}\n\n/**\n * Continue a trace from `sentry-trace` and `baggage` values.\n * These values can be obtained from incoming request headers, or in the browser from `<meta name=\"sentry-trace\">`\n * and `<meta name=\"baggage\">` HTML tags.\n *\n * Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically\n * be attached to the incoming trace.\n */\nconst continueTrace = (\n  options\n\n,\n  callback,\n) => {\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.continueTrace) {\n    return acs.continueTrace(options, callback);\n  }\n\n  const { sentryTrace, baggage } = options;\n\n  return withScope(scope => {\n    const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n    scope.setPropagationContext(propagationContext);\n    return callback();\n  });\n};\n\n/**\n * Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be\n * passed `null` to start an entirely new span tree.\n *\n * @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,\n * spans started within the callback will not be attached to a parent span.\n * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.\n * @returns the value returned from the provided callback function.\n */\nfunction withActiveSpan(span, callback) {\n  const acs = getAcs();\n  if (acs.withActiveSpan) {\n    return acs.withActiveSpan(span, callback);\n  }\n\n  return withScope(scope => {\n    _setSpanForScope(scope, span || undefined);\n    return callback(scope);\n  });\n}\n\n/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */\nfunction suppressTracing(callback) {\n  const acs = getAcs();\n\n  if (acs.suppressTracing) {\n    return acs.suppressTracing(callback);\n  }\n\n  return withScope(scope => {\n    scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });\n    return callback();\n  });\n}\n\n/**\n * Starts a new trace for the duration of the provided callback. Spans started within the\n * callback will be part of the new trace instead of a potentially previously started trace.\n *\n * Important: Only use this function if you want to override the default trace lifetime and\n * propagation mechanism of the SDK for the duration and scope of the provided callback.\n * The newly created trace will also be the root of a new distributed trace, for example if\n * you make http requests within the callback.\n * This function might be useful if the operation you want to instrument should not be part\n * of a potentially ongoing trace.\n *\n * Default behavior:\n * - Server-side: A new trace is started for each incoming request.\n * - Browser: A new trace is started for each page our route. Navigating to a new route\n *            or page will automatically create a new trace.\n */\nfunction startNewTrace(callback) {\n  return withScope(scope => {\n    scope.setPropagationContext({ traceId: generateTraceId() });\n    DEBUG_BUILD && logger.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);\n    return withActiveSpan(null, callback);\n  });\n}\n\nfunction createChildOrRootSpan({\n  parentSpan,\n  spanArguments,\n  forceTransaction,\n  scope,\n}\n\n) {\n  if (!hasTracingEnabled()) {\n    return new SentryNonRecordingSpan();\n  }\n\n  const isolationScope = getIsolationScope();\n\n  let span;\n  if (parentSpan && !forceTransaction) {\n    span = _startChildSpan(parentSpan, scope, spanArguments);\n    addChildSpanToSpan(parentSpan, span);\n  } else if (parentSpan) {\n    // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope\n    const dsc = getDynamicSamplingContextFromSpan(parentSpan);\n    const { traceId, spanId: parentSpanId } = parentSpan.spanContext();\n    const parentSampled = spanIsSampled(parentSpan);\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      parentSampled,\n    );\n\n    freezeDscOnSpan(span, dsc);\n  } else {\n    const {\n      traceId,\n      dsc,\n      parentSpanId,\n      sampled: parentSampled,\n    } = {\n      ...isolationScope.getPropagationContext(),\n      ...scope.getPropagationContext(),\n    };\n\n    span = _startRootSpan(\n      {\n        traceId,\n        parentSpanId,\n        ...spanArguments,\n      },\n      scope,\n      parentSampled,\n    );\n\n    if (dsc) {\n      freezeDscOnSpan(span, dsc);\n    }\n  }\n\n  logSpanStart(span);\n\n  setCapturedScopesOnSpan(span, scope, isolationScope);\n\n  return span;\n}\n\n/**\n * This converts StartSpanOptions to SentrySpanArguments.\n * For the most part (for now) we accept the same options,\n * but some of them need to be transformed.\n */\nfunction parseSentrySpanArguments(options) {\n  const exp = options.experimental || {};\n  const initialCtx = {\n    isStandalone: exp.standalone,\n    ...options,\n  };\n\n  if (options.startTime) {\n    const ctx = { ...initialCtx };\n    ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);\n    delete ctx.startTime;\n    return ctx;\n  }\n\n  return initialCtx;\n}\n\nfunction getAcs() {\n  const carrier = getMainCarrier();\n  return getAsyncContextStrategy(carrier);\n}\n\nfunction _startRootSpan(spanArguments, scope, parentSampled) {\n  const client = getClient();\n  const options = (client && client.getOptions()) || {};\n\n  const { name = '', attributes } = spanArguments;\n  const [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY]\n    ? [false]\n    : sampleSpan(options, {\n        name,\n        parentSampled,\n        attributes,\n        transactionContext: {\n          name,\n          parentSampled,\n        },\n      });\n\n  const rootSpan = new SentrySpan({\n    ...spanArguments,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',\n      ...spanArguments.attributes,\n    },\n    sampled,\n  });\n  if (sampleRate !== undefined) {\n    rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate);\n  }\n\n  if (client) {\n    client.emit('spanStart', rootSpan);\n  }\n\n  return rootSpan;\n}\n\n/**\n * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.\n * This inherits the sampling decision from the parent span.\n */\nfunction _startChildSpan(parentSpan, scope, spanArguments) {\n  const { spanId, traceId } = parentSpan.spanContext();\n  const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);\n\n  const childSpan = sampled\n    ? new SentrySpan({\n        ...spanArguments,\n        parentSpanId: spanId,\n        traceId,\n        sampled,\n      })\n    : new SentryNonRecordingSpan({ traceId });\n\n  addChildSpanToSpan(parentSpan, childSpan);\n\n  const client = getClient();\n  if (client) {\n    client.emit('spanStart', childSpan);\n    // If it has an endTimestamp, it's already ended\n    if (spanArguments.endTimestamp) {\n      client.emit('spanEnd', childSpan);\n    }\n  }\n\n  return childSpan;\n}\n\nfunction getParentSpan(scope) {\n  const span = _getSpanForScope(scope) ;\n\n  if (!span) {\n    return undefined;\n  }\n\n  const client = getClient();\n  const options = client ? client.getOptions() : {};\n  if (options.parentSpanIsAlwaysRootSpan) {\n    return getRootSpan(span) ;\n  }\n\n  return span;\n}\n\nfunction getActiveSpanWrapper(parentSpan) {\n  return parentSpan !== undefined\n    ? (callback) => {\n        return withActiveSpan(parentSpan, callback);\n      }\n    : (callback) => callback();\n}\n\nexport { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };\n//# sourceMappingURL=trace.js.map\n","import { getClient, getCurrentScope } from '../currentScopes.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '../semanticAttributes.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\nimport { _setSpanForScope } from '../utils/spanOnScope.js';\nimport { getActiveSpan, spanTimeInputToSeconds, getSpanDescendants, spanToJSON, removeChildSpanFromSpan } from '../utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';\nimport { SPAN_STATUS_ERROR } from './spanstatus.js';\nimport { startInactiveSpan } from './trace.js';\n\nconst TRACING_DEFAULTS = {\n  idleTimeout: 1000,\n  finalTimeout: 30000,\n  childSpanTimeout: 15000,\n};\n\nconst FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';\nconst FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';\nconst FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';\nconst FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';\n\n/**\n * An idle span is a span that automatically finishes. It does this by tracking child spans as activities.\n * An idle span is always the active span.\n */\nfunction startIdleSpan(startSpanOptions, options = {}) {\n  // Activities store a list of active spans\n  const activities = new Map();\n\n  // We should not use heartbeat if we finished a span\n  let _finished = false;\n\n  // Timer that tracks idleTimeout\n  let _idleTimeoutID;\n\n  // The reason why the span was finished\n  let _finishReason = FINISH_REASON_EXTERNAL_FINISH;\n\n  let _autoFinishAllowed = !options.disableAutoFinish;\n\n  const _cleanupHooks = [];\n\n  const {\n    idleTimeout = TRACING_DEFAULTS.idleTimeout,\n    finalTimeout = TRACING_DEFAULTS.finalTimeout,\n    childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,\n    beforeSpanEnd,\n  } = options;\n\n  const client = getClient();\n\n  if (!client || !hasTracingEnabled()) {\n    return new SentryNonRecordingSpan();\n  }\n\n  const scope = getCurrentScope();\n  const previousActiveSpan = getActiveSpan();\n  const span = _startIdleSpan(startSpanOptions);\n\n  // We patch span.end to ensure we can run some things before the span is ended\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  span.end = new Proxy(span.end, {\n    apply(target, thisArg, args) {\n      if (beforeSpanEnd) {\n        beforeSpanEnd(span);\n      }\n\n      // Just ensuring that this keeps working, even if we ever have more arguments here\n      const [definedEndTimestamp, ...rest] = args;\n      const timestamp = definedEndTimestamp || timestampInSeconds();\n      const spanEndTimestamp = spanTimeInputToSeconds(timestamp);\n\n      // Ensure we end with the last span timestamp, if possible\n      const spans = getSpanDescendants(span).filter(child => child !== span);\n\n      // If we have no spans, we just end, nothing else to do here\n      if (!spans.length) {\n        onIdleSpanEnded(spanEndTimestamp);\n        return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);\n      }\n\n      const childEndTimestamps = spans\n        .map(span => spanToJSON(span).timestamp)\n        .filter(timestamp => !!timestamp) ;\n      const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : undefined;\n\n      // In reality this should always exist here, but type-wise it may be undefined...\n      const spanStartTimestamp = spanToJSON(span).start_timestamp;\n\n      // The final endTimestamp should:\n      // * Never be before the span start timestamp\n      // * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp\n      // * Otherwise be the passed end timestamp\n      // Final timestamp can never be after finalTimeout\n      const endTimestamp = Math.min(\n        spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,\n        Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),\n      );\n\n      onIdleSpanEnded(endTimestamp);\n      return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);\n    },\n  });\n\n  /**\n   * Cancels the existing idle timeout, if there is one.\n   */\n  function _cancelIdleTimeout() {\n    if (_idleTimeoutID) {\n      clearTimeout(_idleTimeoutID);\n      _idleTimeoutID = undefined;\n    }\n  }\n\n  /**\n   * Restarts idle timeout, if there is no running idle timeout it will start one.\n   */\n  function _restartIdleTimeout(endTimestamp) {\n    _cancelIdleTimeout();\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && activities.size === 0 && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_IDLE_TIMEOUT;\n        span.end(endTimestamp);\n      }\n    }, idleTimeout);\n  }\n\n  /**\n   * Restarts child span timeout, if there is none running it will start one.\n   */\n  function _restartChildSpanTimeout(endTimestamp) {\n    _idleTimeoutID = setTimeout(() => {\n      if (!_finished && _autoFinishAllowed) {\n        _finishReason = FINISH_REASON_HEARTBEAT_FAILED;\n        span.end(endTimestamp);\n      }\n    }, childSpanTimeout);\n  }\n\n  /**\n   * Start tracking a specific activity.\n   * @param spanId The span id that represents the activity\n   */\n  function _pushActivity(spanId) {\n    _cancelIdleTimeout();\n    activities.set(spanId, true);\n\n    const endTimestamp = timestampInSeconds();\n    // We need to add the timeout here to have the real endtimestamp of the idle span\n    // Remember timestampInSeconds is in seconds, timeout is in ms\n    _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);\n  }\n\n  /**\n   * Remove an activity from usage\n   * @param spanId The span id that represents the activity\n   */\n  function _popActivity(spanId) {\n    if (activities.has(spanId)) {\n      activities.delete(spanId);\n    }\n\n    if (activities.size === 0) {\n      const endTimestamp = timestampInSeconds();\n      // We need to add the timeout here to have the real endtimestamp of the idle span\n      // Remember timestampInSeconds is in seconds, timeout is in ms\n      _restartIdleTimeout(endTimestamp + idleTimeout / 1000);\n    }\n  }\n\n  function onIdleSpanEnded(endTimestamp) {\n    _finished = true;\n    activities.clear();\n\n    _cleanupHooks.forEach(cleanup => cleanup());\n\n    _setSpanForScope(scope, previousActiveSpan);\n\n    const spanJSON = spanToJSON(span);\n\n    const { start_timestamp: startTimestamp } = spanJSON;\n    // This should never happen, but to make TS happy...\n    if (!startTimestamp) {\n      return;\n    }\n\n    const attributes = spanJSON.data || {};\n    if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {\n      span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);\n    }\n\n    logger.log(`[Tracing] Idle span \"${spanJSON.op}\" finished`);\n\n    const childSpans = getSpanDescendants(span).filter(child => child !== span);\n\n    let discardedSpans = 0;\n    childSpans.forEach(childSpan => {\n      // We cancel all pending spans with status \"cancelled\" to indicate the idle span was finished early\n      if (childSpan.isRecording()) {\n        childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'cancelled' });\n        childSpan.end(endTimestamp);\n        DEBUG_BUILD &&\n          logger.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));\n      }\n\n      const childSpanJSON = spanToJSON(childSpan);\n      const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;\n\n      const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;\n\n      // Add a delta with idle timeout so that we prevent false positives\n      const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;\n      const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;\n\n      if (DEBUG_BUILD) {\n        const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);\n        if (!spanStartedBeforeIdleSpanEnd) {\n          logger.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);\n        } else if (!spanEndedBeforeFinalTimeout) {\n          logger.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);\n        }\n      }\n\n      if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {\n        removeChildSpanFromSpan(span, childSpan);\n        discardedSpans++;\n      }\n    });\n\n    if (discardedSpans > 0) {\n      span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);\n    }\n  }\n\n  _cleanupHooks.push(\n    client.on('spanStart', startedSpan => {\n      // If we already finished the idle span,\n      // or if this is the idle span itself being started,\n      // or if the started span has already been closed,\n      // we don't care about it for activity\n      if (_finished || startedSpan === span || !!spanToJSON(startedSpan).timestamp) {\n        return;\n      }\n\n      const allSpans = getSpanDescendants(span);\n\n      // If the span that was just started is a child of the idle span, we should track it\n      if (allSpans.includes(startedSpan)) {\n        _pushActivity(startedSpan.spanContext().spanId);\n      }\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('spanEnd', endedSpan => {\n      if (_finished) {\n        return;\n      }\n\n      _popActivity(endedSpan.spanContext().spanId);\n    }),\n  );\n\n  _cleanupHooks.push(\n    client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {\n      if (spanToAllowAutoFinish === span) {\n        _autoFinishAllowed = true;\n        _restartIdleTimeout();\n\n        if (activities.size) {\n          _restartChildSpanTimeout();\n        }\n      }\n    }),\n  );\n\n  // We only start the initial idle timeout if we are not delaying the auto finish\n  if (!options.disableAutoFinish) {\n    _restartIdleTimeout();\n  }\n\n  setTimeout(() => {\n    if (!_finished) {\n      span.setStatus({ code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' });\n      _finishReason = FINISH_REASON_FINAL_TIMEOUT;\n      span.end();\n    }\n  }, finalTimeout);\n\n  return span;\n}\n\nfunction _startIdleSpan(options) {\n  const span = startInactiveSpan(options);\n\n  _setSpanForScope(getCurrentScope(), span);\n\n  DEBUG_BUILD && logger.log('[Tracing] Started span is an idle span');\n\n  return span;\n}\n\nexport { TRACING_DEFAULTS, startIdleSpan };\n//# sourceMappingURL=idleSpan.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { SyncPromise } from './utils-hoist/syncpromise.js';\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      DEBUG_BUILD && processor.id && result === null && 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 { notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\nlet parsedStackResults;\nlet lastKeysCount;\nlet cachedFilenameDebugIds;\n\n/**\n * Returns a map of filenames to debug identifiers.\n */\nfunction getFilenameToDebugIdMap(stackParser) {\n  const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n  if (!debugIdMap) {\n    return {};\n  }\n\n  const debugIdKeys = Object.keys(debugIdMap);\n\n  // If the count of registered globals hasn't changed since the last call, we\n  // can just return the cached result.\n  if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) {\n    return cachedFilenameDebugIds;\n  }\n\n  lastKeysCount = debugIdKeys.length;\n\n  // Build a map of filename -> debug_id.\n  cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => {\n    if (!parsedStackResults) {\n      parsedStackResults = {};\n    }\n\n    const result = parsedStackResults[stackKey];\n\n    if (result) {\n      acc[result[0]] = result[1];\n    } else {\n      const parsedStack = stackParser(stackKey);\n\n      for (let i = parsedStack.length - 1; i >= 0; i--) {\n        const stackFrame = parsedStack[i];\n        const filename = stackFrame && stackFrame.filename;\n        const debugId = debugIdMap[stackKey];\n\n        if (filename && debugId) {\n          acc[filename] = debugId;\n          parsedStackResults[stackKey] = [filename, debugId];\n          break;\n        }\n      }\n    }\n\n    return acc;\n  }, {});\n\n  return cachedFilenameDebugIds;\n}\n\n/**\n * Returns a list of debug images for the given resources.\n */\nfunction getDebugImagesForResources(\n  stackParser,\n  resource_paths,\n) {\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\n\n  if (!filenameDebugIdMap) {\n    return [];\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\nexport { getDebugImagesForResources, getFilenameToDebugIdMap };\n//# sourceMappingURL=debug-ids.js.map\n","import { getDynamicSamplingContextFromSpan } from '../tracing/dynamicSamplingContext.js';\nimport { dropUndefinedKeys } from '../utils-hoist/object.js';\nimport { merge } from './merge.js';\nimport { spanToTraceContext, getRootSpan, spanToJSON } from './spanUtils.js';\n\n/**\n * Applies data from the scope to the event and runs all event processors on it.\n */\nfunction applyScopeDataToEvent(event, data) {\n  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;\n\n  // Apply general data\n  applyDataToEvent(event, data);\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 (span) {\n    applySpanToEvent(event, span);\n  }\n\n  applyFingerprintToEvent(event, fingerprint);\n  applyBreadcrumbsToEvent(event, breadcrumbs);\n  applySdkMetadataToEvent(event, sdkProcessingMetadata);\n}\n\n/** Merge data of two scopes together. */\nfunction mergeScopeData(data, mergeData) {\n  const {\n    extra,\n    tags,\n    user,\n    contexts,\n    level,\n    sdkProcessingMetadata,\n    breadcrumbs,\n    fingerprint,\n    eventProcessors,\n    attachments,\n    propagationContext,\n    transactionName,\n    span,\n  } = mergeData;\n\n  mergeAndOverwriteScopeData(data, 'extra', extra);\n  mergeAndOverwriteScopeData(data, 'tags', tags);\n  mergeAndOverwriteScopeData(data, 'user', user);\n  mergeAndOverwriteScopeData(data, 'contexts', contexts);\n\n  data.sdkProcessingMetadata = merge(data.sdkProcessingMetadata, sdkProcessingMetadata, 2);\n\n  if (level) {\n    data.level = level;\n  }\n\n  if (transactionName) {\n    data.transactionName = transactionName;\n  }\n\n  if (span) {\n    data.span = span;\n  }\n\n  if (breadcrumbs.length) {\n    data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs];\n  }\n\n  if (fingerprint.length) {\n    data.fingerprint = [...data.fingerprint, ...fingerprint];\n  }\n\n  if (eventProcessors.length) {\n    data.eventProcessors = [...data.eventProcessors, ...eventProcessors];\n  }\n\n  if (attachments.length) {\n    data.attachments = [...data.attachments, ...attachments];\n  }\n\n  data.propagationContext = { ...data.propagationContext, ...propagationContext };\n}\n\n/**\n * Merges certain scope data. Undefined values will overwrite any existing values.\n * Exported only for tests.\n */\nfunction mergeAndOverwriteScopeData\n\n(data, prop, mergeVal) {\n  data[prop] = merge(data[prop], mergeVal, 1);\n}\n\nfunction applyDataToEvent(event, data) {\n  const { extra, tags, user, contexts, level, transactionName } = data;\n\n  const cleanedExtra = dropUndefinedKeys(extra);\n  if (cleanedExtra && Object.keys(cleanedExtra).length) {\n    event.extra = { ...cleanedExtra, ...event.extra };\n  }\n\n  const cleanedTags = dropUndefinedKeys(tags);\n  if (cleanedTags && Object.keys(cleanedTags).length) {\n    event.tags = { ...cleanedTags, ...event.tags };\n  }\n\n  const cleanedUser = dropUndefinedKeys(user);\n  if (cleanedUser && Object.keys(cleanedUser).length) {\n    event.user = { ...cleanedUser, ...event.user };\n  }\n\n  const cleanedContexts = dropUndefinedKeys(contexts);\n  if (cleanedContexts && Object.keys(cleanedContexts).length) {\n    event.contexts = { ...cleanedContexts, ...event.contexts };\n  }\n\n  if (level) {\n    event.level = level;\n  }\n\n  // transaction events get their `transaction` from the root span name\n  if (transactionName && event.type !== 'transaction') {\n    event.transaction = transactionName;\n  }\n}\n\nfunction applyBreadcrumbsToEvent(event, breadcrumbs) {\n  const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs];\n  event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined;\n}\n\nfunction applySdkMetadataToEvent(event, sdkProcessingMetadata) {\n  event.sdkProcessingMetadata = {\n    ...event.sdkProcessingMetadata,\n    ...sdkProcessingMetadata,\n  };\n}\n\nfunction applySpanToEvent(event, span) {\n  event.contexts = {\n    trace: spanToTraceContext(span),\n    ...event.contexts,\n  };\n\n  event.sdkProcessingMetadata = {\n    dynamicSamplingContext: getDynamicSamplingContextFromSpan(span),\n    ...event.sdkProcessingMetadata,\n  };\n\n  const rootSpan = getRootSpan(span);\n  const transactionName = spanToJSON(rootSpan).description;\n  if (transactionName && !event.transaction && event.type === 'transaction') {\n    event.transaction = transactionName;\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 */\nfunction applyFingerprintToEvent(event, fingerprint) {\n  // Make sure it's an array first and we actually have something in place\n  event.fingerprint = event.fingerprint\n    ? Array.isArray(event.fingerprint)\n      ? event.fingerprint\n      : [event.fingerprint]\n    : [];\n\n  // If we have something on the scope, then merge it with event\n  if (fingerprint) {\n    event.fingerprint = event.fingerprint.concat(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\nexport { applyScopeDataToEvent, mergeAndOverwriteScopeData, mergeScopeData };\n//# sourceMappingURL=applyScopeDataToEvent.js.map\n","import { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { getGlobalScope } from '../currentScopes.js';\nimport { notifyEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\nimport { getFilenameToDebugIdMap } from '../utils-hoist/debug-ids.js';\nimport { uuid4, addExceptionMechanism } from '../utils-hoist/misc.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { truncate } from '../utils-hoist/string.js';\nimport { dateTimestampInSeconds } from '../utils-hoist/time.js';\nimport { mergeScopeData, applyScopeDataToEvent } from './applyScopeDataToEvent.js';\n\n/**\n * This type makes sure that we get either a CaptureContext, OR an EventHint.\n * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:\n * { user: { id: '123' }, mechanism: { handled: false } }\n */\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @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  isolationScope,\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  if (client) {\n    client.emit('applyFrameMetadata', event);\n  }\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  const finalScope = getFinalScope(scope, hint.captureContext);\n\n  if (hint.mechanism) {\n    addExceptionMechanism(prepared, hint.mechanism);\n  }\n\n  const clientEventProcessors = client ? client.getEventProcessors() : [];\n\n  // This should be the last thing called, since we want that\n  // {@link Scope.addEventProcessor} gets the finished prepared event.\n  // Merge scope data together\n  const data = getGlobalScope().getScopeData();\n\n  if (isolationScope) {\n    const isolationData = isolationScope.getScopeData();\n    mergeScopeData(data, isolationData);\n  }\n\n  if (finalScope) {\n    const finalScopeData = finalScope.getScopeData();\n    mergeScopeData(data, finalScopeData);\n  }\n\n  const attachments = [...(hint.attachments || []), ...data.attachments];\n  if (attachments.length) {\n    hint.attachments = attachments;\n  }\n\n  applyScopeDataToEvent(prepared, data);\n\n  const eventProcessors = [\n    ...clientEventProcessors,\n    // Run scope event processors _after_ all other processors\n    ...data.eventProcessors,\n  ];\n\n  const result = notifyEventProcessors(eventProcessors, prepared, hint);\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 *\n * Only exported for tests.\n *\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n  const { environment, release, dist, maxValueLength = 250 } = options;\n\n  // empty strings do not make sense for environment, release, and dist\n  // so we handle them the same as if they were not provided\n  event.environment = event.environment || environment || DEFAULT_ENVIRONMENT;\n\n  if (!event.release && release) {\n    event.release = release;\n  }\n\n  if (!event.dist && dist) {\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\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n  // Build a map of filename -> debug_id\n  const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser);\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 (filenameDebugIdMap && 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.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => {\n    images.push({\n      type: 'sourcemap',\n      code_file: filename,\n      debug_id,\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      return {\n        ...span,\n        ...(span.data && {\n          data: normalize(span.data, depth, maxBreadth),\n        }),\n      };\n    });\n  }\n\n  // event.contexts.flags (FeatureFlagContext) stores context for our feature\n  // flag integrations. It has a greater nesting depth than our other typed\n  // Contexts, so we re-normalize with a fixed depth of 3 here. We do not want\n  // to skip this in case of conflicting, user-provided context.\n  if (event.contexts && event.contexts.flags && normalized.contexts) {\n    normalized.contexts.flags = normalize(event.contexts.flags, 3, maxBreadth);\n  }\n\n  return normalized;\n}\n\nfunction getFinalScope(\n  scope,\n  captureContext,\n) {\n  if (!captureContext) {\n    return scope;\n  }\n\n  const finalScope = scope ? scope.clone() : new Scope();\n  finalScope.update(captureContext);\n  return finalScope;\n}\n\n/**\n * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.\n * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.\n */\nfunction parseEventHintOrCaptureContext(\n  hint,\n) {\n  if (!hint) {\n    return undefined;\n  }\n\n  // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext\n  if (hintIsScopeOrFunction(hint)) {\n    return { captureContext: hint };\n  }\n\n  if (hintIsScopeContext(hint)) {\n    return {\n      captureContext: hint,\n    };\n  }\n\n  return hint;\n}\n\nfunction hintIsScopeOrFunction(\n  hint,\n) {\n  return hint instanceof Scope || typeof hint === 'function';\n}\n\nconst captureContextKeys = [\n  'user',\n  'level',\n  'extra',\n  'contexts',\n  'tags',\n  'fingerprint',\n  'requestSession',\n  'propagationContext',\n] ;\n\nfunction hintIsScopeContext(hint) {\n  return Object.keys(hint).some(key => captureContextKeys.includes(key ));\n}\n\nexport { applyClientOptions, applyDebugIds, applyDebugMeta, parseEventHintOrCaptureContext, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { getCurrentScope, getIsolationScope, getClient, withIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { makeSession, updateSession, closeSession } from './session.js';\nimport { isThenable } from './utils-hoist/is.js';\nimport { logger } from './utils-hoist/logger.js';\nimport { uuid4 } from './utils-hoist/misc.js';\nimport { timestampInSeconds } from './utils-hoist/time.js';\nimport { GLOBAL_OBJ } from './utils-hoist/worldwide.js';\nimport { parseEventHintOrCaptureContext } from './utils/prepareEvent.js';\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception The exception to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\nfunction captureException(exception, hint) {\n  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));\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 captureContext Define the level of the message or pass in additional data to attach to the message.\n * @returns the id of the captured message.\n */\nfunction captureMessage(message, captureContext) {\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 getCurrentScope().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 * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\nfunction captureEvent(event, hint) {\n  return getCurrentScope().captureEvent(event, hint);\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 */\nfunction setContext(name, context) {\n  getIsolationScope().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  getIsolationScope().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  getIsolationScope().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  getIsolationScope().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  getIsolationScope().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  getIsolationScope().setUser(user);\n}\n\n/**\n * The last error event id of the isolation scope.\n *\n * Warning: This function really returns the last recorded error event id on the current\n * isolation scope. If you call this function after handling a certain error and another error\n * is captured in between, the last one is returned instead of the one you might expect.\n * Also, ids of events that were never sent to Sentry (for example because\n * they were dropped in `beforeSend`) could be returned.\n *\n * @returns The last event id of the isolation scope.\n */\nfunction lastEventId() {\n  return getIsolationScope().lastEventId();\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 scope = getCurrentScope();\n  const client = getClient();\n  if (!client) {\n    DEBUG_BUILD && logger.warn('Cannot capture check-in. No client defined.');\n  } else if (!client.captureCheckIn) {\n    DEBUG_BUILD && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n  } else {\n    return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n  }\n\n  return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n  monitorSlug,\n  callback,\n  upsertMonitorConfig,\n) {\n  const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n  const now = timestampInSeconds();\n\n  function finishCheckIn(status) {\n    captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n  }\n\n  return withIsolationScope(() => {\n    let maybePromiseResult;\n    try {\n      maybePromiseResult = callback();\n    } catch (e) {\n      finishCheckIn('error');\n      throw e;\n    }\n\n    if (isThenable(maybePromiseResult)) {\n      Promise.resolve(maybePromiseResult).then(\n        () => {\n          finishCheckIn('ok');\n        },\n        e => {\n          finishCheckIn('error');\n          throw e;\n        },\n      );\n    } else {\n      finishCheckIn('ok');\n    }\n\n    return maybePromiseResult;\n  });\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 = getClient();\n  if (client) {\n    return client.flush(timeout);\n  }\n  DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n  const client = getClient();\n  if (client) {\n    return client.close(timeout);\n  }\n  DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n  return Promise.resolve(false);\n}\n\n/**\n * Returns true if Sentry has been properly initialized.\n */\nfunction isInitialized() {\n  return !!getClient();\n}\n\n/** If the SDK is initialized & enabled. */\nfunction isEnabled() {\n  const client = getClient();\n  return !!client && client.getOptions().enabled !== false && !!client.getTransport();\n}\n\n/**\n * Add an event processor.\n * This will be added to the current isolation scope, ensuring any event that is processed in the current execution\n * context will have the processor applied.\n */\nfunction addEventProcessor(callback) {\n  getIsolationScope().addEventProcessor(callback);\n}\n\n/**\n * Start a session on the current isolation scope.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns the new active session\n */\nfunction startSession(context) {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\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: currentScope.getUser() || isolationScope.getUser(),\n    ...(userAgent && { userAgent }),\n    ...context,\n  });\n\n  // End existing session if there's one\n  const currentSession = isolationScope.getSession();\n  if (currentSession && currentSession.status === 'ok') {\n    updateSession(currentSession, { status: 'exited' });\n  }\n\n  endSession();\n\n  // Afterwards we set the new session on the scope\n  isolationScope.setSession(session);\n\n  // TODO (v8): Remove this and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  currentScope.setSession(session);\n\n  return session;\n}\n\n/**\n * End the session on the current isolation scope.\n */\nfunction endSession() {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session) {\n    closeSession(session);\n  }\n  _sendSessionUpdate();\n\n  // the session is over; take it off of the scope\n  isolationScope.setSession();\n\n  // TODO (v8): Remove this and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  currentScope.setSession();\n}\n\n/**\n * Sends the current Session on the scope\n */\nfunction _sendSessionUpdate() {\n  const isolationScope = getIsolationScope();\n  const currentScope = getCurrentScope();\n  const client = getClient();\n  // TODO (v8): Remove currentScope and only use the isolation scope(?).\n  // For v7 though, we can't \"soft-break\" people using getCurrentHub().getScope().setSession()\n  const session = currentScope.getSession() || isolationScope.getSession();\n  if (session && client) {\n    client.captureSession(session);\n  }\n}\n\n/**\n * Sends the current session on the scope to Sentry\n *\n * @param end If set the session will be marked as exited and removed from the scope.\n *            Defaults to `false`.\n */\nfunction captureSession(end = false) {\n  // both send the update and pull the session from the scope\n  if (end) {\n    endSession();\n    return;\n  }\n\n  // only send the update\n  _sendSessionUpdate();\n}\n\nexport { addEventProcessor, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, endSession, flush, isEnabled, isInitialized, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startSession, withMonitor };\n//# sourceMappingURL=exports.js.map\n","import { makeDsn, dsnToString } from './utils-hoist/dsn.js';\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  const params = {\n    sentry_version: SENTRY_API_VERSION,\n  };\n\n  if (dsn.publicKey) {\n    // We send only the minimum set of required information. See\n    // https://github.com/getsentry/sentry-javascript/issues/2572.\n    params.sentry_key = dsn.publicKey;\n  }\n\n  if (sdkInfo) {\n    params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`;\n  }\n\n  return new URLSearchParams(params).toString();\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(dsn, tunnel, sdkInfo) {\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 === 'onClose') {\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 { getClient } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './utils-hoist/logger.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 * preserve 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.values(integrationsByName);\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    const resolvedUserIntegrations = userIntegrations(defaultIntegrations);\n    integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];\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 = finalIntegrations.findIndex(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/**\n * Execute the `afterAllSetup` hooks of the given integrations.\n */\nfunction afterSetupIntegrations(client, integrations) {\n  for (const integration of integrations) {\n    // guard against empty provided integrations\n    if (integration && integration.afterAllSetup) {\n      integration.afterAllSetup(client);\n    }\n  }\n}\n\n/** Setup a single integration.  */\nfunction setupIntegration(client, integration, integrationIndex) {\n  if (integrationIndex[integration.name]) {\n    DEBUG_BUILD && logger.log(`Integration skipped because it was already installed: ${integration.name}`);\n    return;\n  }\n  integrationIndex[integration.name] = integration;\n\n  // `setupOnce` is only called the first time\n  if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === 'function') {\n    integration.setupOnce();\n    installedIntegrations.push(integration.name);\n  }\n\n  // `setup` is run for each client\n  if (integration.setup && typeof integration.setup === 'function') {\n    integration.setup(client);\n  }\n\n  if (typeof integration.preprocessEvent === 'function') {\n    const callback = integration.preprocessEvent.bind(integration) ;\n    client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n  }\n\n  if (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  DEBUG_BUILD && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current scope's client. */\nfunction addIntegration(integration) {\n  const client = getClient();\n\n  if (!client) {\n    DEBUG_BUILD && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n    return;\n  }\n\n  client.addIntegration(integration);\n}\n\n/**\n * Define an integration function that can be used to create an integration instance.\n * Note that this by design hides the implementation details of the integration, as they are considered internal.\n */\nfunction defineIntegration(fn) {\n  return fn;\n}\n\nexport { addIntegration, afterSetupIntegrations, defineIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.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","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n\n   constructor(\n     message,\n    logLevel = 'warn',\n  ) {\n    super(message);this.message = message;\n    this.logLevel = logLevel;\n  }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","import { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { getTraceContextFromScope, getCurrentScope, getIsolationScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegration, afterSetupIntegrations, setupIntegrations } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromScope } from './tracing/dynamicSamplingContext.js';\nimport { createClientReportEnvelope } from './utils-hoist/clientreport.js';\nimport { makeDsn, dsnToString } from './utils-hoist/dsn.js';\nimport { addItemToEnvelope, createAttachmentEnvelopeItem } from './utils-hoist/envelope.js';\nimport { SentryError } from './utils-hoist/error.js';\nimport { isPrimitive, isThenable, isPlainObject, isParameterizedString } from './utils-hoist/is.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.js';\nimport { uuid4, checkOrSetAlreadyCaught } from './utils-hoist/misc.js';\nimport { resolvedSyncPromise, SyncPromise, rejectedSyncPromise } from './utils-hoist/syncpromise.js';\nimport { parseSampleRate } from './utils/parseSampleRate.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\nimport { showSpanDropWarning } from './utils/spanUtils.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<NodeOptions> {\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  /** 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._numProcessing = 0;\n    this._outcomes = {};\n    this._hooks = {};\n    this._eventProcessors = [];\n\n    if (options.dsn) {\n      this._dsn = makeDsn(options.dsn);\n    } else {\n      DEBUG_BUILD && logger.warn('No DSN provided, client will not send events.');\n    }\n\n    if (this._dsn) {\n      const url = getEnvelopeEndpointWithUrlEncodedAuth(\n        this._dsn,\n        options.tunnel,\n        options._metadata ? options._metadata.sdk : undefined,\n      );\n      this._transport = options.transport({\n        tunnel: this._options.tunnel,\n        recordDroppedEvent: this.recordDroppedEvent.bind(this),\n        ...options.transportOptions,\n        url,\n      });\n    }\n\n    // TODO(v9): Remove this deprecation warning\n    const tracingOptions = ['enableTracing', 'tracesSampleRate', 'tracesSampler'] ;\n    const undefinedOption = tracingOptions.find(option => option in options && options[option] == undefined);\n    if (undefinedOption) {\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn(\n          `[Sentry] Deprecation warning: \\`${undefinedOption}\\` is set to undefined, which leads to tracing being enabled. In v9, a value of \\`undefined\\` will result in tracing being disabled.`,\n        );\n      });\n    }\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureException(exception, hint, scope) {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (checkOrSetAlreadyCaught(exception)) {\n      DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    this._process(\n      this.eventFromException(exception, hintWithEventId).then(event =>\n        this._captureEvent(event, hintWithEventId, scope),\n      ),\n    );\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureMessage(\n    message,\n    level,\n    hint,\n    currentScope,\n  ) {\n    const hintWithEventId = {\n      event_id: uuid4(),\n      ...hint,\n    };\n\n    const eventMessage = isParameterizedString(message) ? message : String(message);\n\n    const promisedEvent = isPrimitive(message)\n      ? this.eventFromMessage(eventMessage, level, hintWithEventId)\n      : this.eventFromException(message, hintWithEventId);\n\n    this._process(promisedEvent.then(event => this._captureEvent(event, hintWithEventId, currentScope)));\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureEvent(event, hint, currentScope) {\n    const eventId = uuid4();\n\n    // ensure we haven't captured this very object before\n    if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n      DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n      return eventId;\n    }\n\n    const hintWithEventId = {\n      event_id: eventId,\n      ...hint,\n    };\n\n    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n    const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope;\n\n    this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope));\n\n    return hintWithEventId.event_id;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   captureSession(session) {\n    if (!(typeof session.release === 'string')) {\n      DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n    } else {\n      this.sendSession(session);\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\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      this.emit('flush');\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      this.emit('close');\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  /** @inheritdoc */\n   init() {\n    if (\n      this._isEnabled() ||\n      // Force integrations to be setup even if no DSN was set when we have\n      // Spotlight enabled. This is particularly important for browser as we\n      // don't support the `spotlight` option there and rely on the users\n      // adding the `spotlightBrowserIntegration()` to their integrations which\n      // wouldn't get initialized with the check below when there's no DSN set.\n      this._options.integrations.some(({ name }) => name.startsWith('Spotlight'))\n    ) {\n      this._setupIntegrations();\n    }\n  }\n\n  /**\n   * Gets an installed integration by its name.\n   *\n   * @returns The installed integration or `undefined` if no integration with that `name` was installed.\n   */\n   getIntegrationByName(integrationName) {\n    return this._integrations[integrationName] ;\n  }\n\n  /**\n   * @inheritDoc\n   */\n   addIntegration(integration) {\n    const isAlreadyInstalled = this._integrations[integration.name];\n\n    // This hook takes care of only installing if not already installed\n    setupIntegration(this, integration, this._integrations);\n    // Here we need to check manually to make sure to not run this multiple times\n    if (!isAlreadyInstalled) {\n      afterSetupIntegrations(this, [integration]);\n    }\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(env, createAttachmentEnvelopeItem(attachment));\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\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(env);\n  }\n\n  /**\n   * @inheritDoc\n   */\n   recordDroppedEvent(reason, category, eventOrCount) {\n    if (this._options.sendClientReports) {\n      // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload\n      // If event is passed as third argument, we assume this is a count of 1\n      const count = typeof eventOrCount === 'number' ? eventOrCount : 1;\n\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<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n      // With typescript 4.1 we could even use template literal types\n      const key = `${reason}:${category}`;\n      DEBUG_BUILD && logger.log(`Recording outcome: \"${key}\"${count > 1 ? ` (${count} times)` : ''}`);\n      this._outcomes[key] = (this._outcomes[key] || 0) + count;\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    const hooks = (this._hooks[hook] = this._hooks[hook] || []);\n\n    // @ts-expect-error We assume the types are correct\n    hooks.push(callback);\n\n    // This function returns a callback execution handler that, when invoked,\n    // deregisters a callback. This is crucial for managing instances where callbacks\n    // need to be unregistered to prevent self-referencing in callback closures,\n    // ensuring proper garbage collection.\n    return () => {\n      // @ts-expect-error We assume the types are correct\n      const cbIndex = hooks.indexOf(callback);\n      if (cbIndex > -1) {\n        hooks.splice(cbIndex, 1);\n      }\n    };\n  }\n\n  /** @inheritdoc */\n\n  /** @inheritdoc */\n   emit(hook, ...rest) {\n    const callbacks = this._hooks[hook];\n    if (callbacks) {\n      callbacks.forEach(callback => callback(...rest));\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        DEBUG_BUILD && logger.error('Error while sending envelope:', reason);\n        return reason;\n      });\n    }\n\n    DEBUG_BUILD && logger.error('Transport disabled');\n\n    return resolvedSyncPromise({});\n  }\n\n  /* eslint-enable @typescript-eslint/unified-signatures */\n\n  /** Setup integrations for this client. */\n   _setupIntegrations() {\n    const { integrations } = this._options;\n    this._integrations = setupIntegrations(this, integrations);\n    afterSetupIntegrations(this, integrations);\n  }\n\n  /** Updates existing session based on the provided event */\n   _updateSessionFromEvent(session, event) {\n    let crashed = event.level === 'fatal';\n    let errored = false;\n    const exceptions = event.exception && 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 currentScope A scope containing event metadata.\n   * @returns A new event with more information.\n   */\n   _prepareEvent(\n    event,\n    hint,\n    currentScope = getCurrentScope(),\n    isolationScope = getIsolationScope(),\n  ) {\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    if (!event.type) {\n      isolationScope.setLastEventId(event.event_id || hint.event_id);\n    }\n\n    return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {\n      if (evt === null) {\n        return evt;\n      }\n\n      evt.contexts = {\n        trace: getTraceContextFromScope(currentScope),\n        ...evt.contexts,\n      };\n\n      const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope);\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 (DEBUG_BUILD) {\n          // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n          // control flow, log just the message (no stack) as a log-level log.\n          if (reason instanceof SentryError && reason.logLevel === 'log') {\n            logger.log(reason.message);\n          } else {\n            logger.warn(reason);\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 currentScope A scope containing event metadata.\n   * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n   */\n   _processEvent(event, hint, currentScope) {\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    const parsedSampleRate = typeof sampleRate === 'undefined' ? undefined : parseSampleRate(sampleRate);\n    if (isError && typeof parsedSampleRate === 'number' && Math.random() > parsedSampleRate) {\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    const sdkProcessingMetadata = event.sdkProcessingMetadata || {};\n    const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope;\n\n    return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope)\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(this, options, prepared, hint);\n        return _validateBeforeSendResult(result, beforeSendLabel);\n      })\n      .then(processedEvent => {\n        if (processedEvent === null) {\n          this.recordDroppedEvent('before_send', dataCategory, event);\n          if (isTransaction) {\n            const spans = event.spans || [];\n            // the transaction itself counts as one span, plus all the child spans that are added\n            const spanCount = 1 + spans.length;\n            this.recordDroppedEvent('before_send', 'span', spanCount);\n          }\n          throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n        }\n\n        const session = currentScope && currentScope.getSession();\n        if (!isTransaction && session) {\n          this._updateSessionFromEvent(session, processedEvent);\n        }\n\n        if (isTransaction) {\n          const spanCountBefore =\n            (processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing) ||\n            0;\n          const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0;\n\n          const droppedSpanCount = spanCountBefore - spanCountAfter;\n          if (droppedSpanCount > 0) {\n            this.recordDroppedEvent('before_send', 'span', droppedSpanCount);\n          }\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   * Clears outcomes on this client and returns them.\n   */\n   _clearOutcomes() {\n    const outcomes = this._outcomes;\n    this._outcomes = {};\n    return Object.entries(outcomes).map(([key, quantity]) => {\n      const [reason, category] = key.split(':') ;\n      return {\n        reason,\n        category,\n        quantity,\n      };\n    });\n  }\n\n  /**\n   * Sends client reports as an envelope.\n   */\n   _flushOutcomes() {\n    DEBUG_BUILD && logger.log('Flushing outcomes...');\n\n    const outcomes = this._clearOutcomes();\n\n    if (outcomes.length === 0) {\n      DEBUG_BUILD && logger.log('No outcomes to send');\n      return;\n    }\n\n    // This is really the only place where we want to check for a DSN and only send outcomes then\n    if (!this._dsn) {\n      DEBUG_BUILD && logger.log('No dsn provided, will not send outcomes');\n      return;\n    }\n\n    DEBUG_BUILD && logger.log('Sending outcomes:', outcomes);\n\n    const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.sendEnvelope(envelope);\n  }\n\n  /**\n   * @inheritDoc\n   */\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\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  client,\n  options,\n  event,\n  hint,\n) {\n  const { beforeSend, beforeSendTransaction, beforeSendSpan } = options;\n\n  if (isErrorEvent(event) && beforeSend) {\n    return beforeSend(event, hint);\n  }\n\n  if (isTransactionEvent(event)) {\n    if (event.spans && beforeSendSpan) {\n      const processedSpans = [];\n      for (const span of event.spans) {\n        const processedSpan = beforeSendSpan(span);\n        if (processedSpan) {\n          processedSpans.push(processedSpan);\n        } else {\n          showSpanDropWarning();\n          client.recordDroppedEvent('before_send', 'span');\n        }\n      }\n      event.spans = processedSpans;\n    }\n\n    if (beforeSendTransaction) {\n      if (event.spans) {\n        // We store the # of spans before processing in SDK metadata,\n        // so we can compare it afterwards to determine how many spans were dropped\n        const spanCountBefore = event.spans.length;\n        event.sdkProcessingMetadata = {\n          ...event.sdkProcessingMetadata,\n          spanCountBeforeProcessing: spanCountBefore,\n        };\n      }\n      return beforeSendTransaction(event, hint);\n    }\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 { getCurrentScope } from './currentScopes.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { logger, consoleSandbox } from './utils-hoist/logger.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 (DEBUG_BUILD) {\n      logger.enable();\n    } else {\n      // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n      consoleSandbox(() => {\n        // eslint-disable-next-line no-console\n        console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n      });\n    }\n  }\n  const scope = getCurrentScope();\n  scope.update(options.initialScope);\n\n  const client = new clientClass(options);\n  setCurrentClient(client);\n  client.init();\n  return client;\n}\n\n/**\n * Make the given client the current client.\n */\nfunction setCurrentClient(client) {\n  getCurrentScope().setClient(client);\n}\n\nexport { initAndBind, setCurrentClient };\n//# sourceMappingURL=sdk.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<T>\n   * @returns Removed promise.\n   */\n  function remove(task) {\n    return buffer.splice(buffer.indexOf(task), 1)[0] || Promise.resolve(undefined);\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<T>; In previous versions this used to be `task:\n   *        PromiseLike<T>`, 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","// 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, dataCategory) {\n  return limits[dataCategory] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, dataCategory, now = Date.now()) {\n  return disabledUntil(limits, dataCategory) > 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     *     <header>,<header>,..\n     * where each <header> is of the form\n     *     <retry_after>: <categories>: <scope>: <reason_code>: <namespaces>\n     * where\n     *     <retry_after> is a delay in seconds\n     *     <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n     *         <category>;<category>;...\n     *     <scope> is what's being limited (org, project, or key) - ignored by SDK\n     *     <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n     *     <namespaces> Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected.\n     *         Only present if rate limit applies to the metric_bucket data category.\n     */\n    for (const limit of rateLimitHeader.trim().split(',')) {\n      const [retryAfter, categories, , , namespaces] = limit.split(':', 5) ;\n      const headerDelay = parseInt(retryAfter, 10);\n      const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n      if (!categories) {\n        updatedRateLimits.all = now + delay;\n      } else {\n        for (const category of categories.split(';')) {\n          if (category === 'metric_bucket') {\n            // namespaces will be present when category === 'metric_bucket'\n            if (!namespaces || namespaces.split(';').includes('custom')) {\n              updatedRateLimits[category] = now + delay;\n            }\n          } else {\n            updatedRateLimits[category] = now + delay;\n          }\n        }\n      }\n    }\n  } else if (retryAfterHeader) {\n    updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n  } else if (statusCode === 429) {\n    updatedRateLimits.all = now + 60 * 1000;\n  }\n\n  return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { forEachEnvelopeItem, envelopeItemTypeToDataCategory, createEnvelope, serializeEnvelope } from '../utils-hoist/envelope.js';\nimport { SentryError } from '../utils-hoist/error.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { makePromiseBuffer } from '../utils-hoist/promisebuffer.js';\nimport { isRateLimited, updateRateLimits } from '../utils-hoist/ratelimit.js';\nimport { resolvedSyncPromise } from '../utils-hoist/syncpromise.js';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 64;\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 dataCategory = envelopeItemTypeToDataCategory(type);\n      if (isRateLimited(rateLimits, dataCategory)) {\n        const event = getEventForEnvelopeItem(item, type);\n        options.recordDroppedEvent('ratelimit_backoff', dataCategory, 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    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) }).then(\n        response => {\n          // We don't want to throw on NOK responses, but we want to at least log them\n          if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n            DEBUG_BUILD && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n          }\n\n          rateLimits = updateRateLimits(rateLimits, response);\n          return response;\n        },\n        error => {\n          recordEnvelopeLoss('network_error');\n          throw error;\n        },\n      );\n\n    return buffer.add(requestTask).then(\n      result => result,\n      error => {\n        if (error instanceof SentryError) {\n          DEBUG_BUILD && logger.error('Skipped sending event because buffer is full.');\n          recordEnvelopeLoss('queue_overflow');\n          return resolvedSyncPromise({});\n        } else {\n          throw error;\n        }\n      },\n    );\n  }\n\n  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","/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nfunction isSentryRequestUrl(url, client) {\n  const dsn = client && client.getDsn();\n  const tunnel = client && client.getOptions().tunnel;\n  return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n  if (!tunnel) {\n    return false;\n  }\n\n  return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n  return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n  return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","import { SDK_VERSION } from '../utils-hoist/version.js';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nfunction applySdkMetadata(options, name, names = [name], source = 'npm') {\n  const metadata = options._metadata || {};\n\n  if (!metadata.sdk) {\n    metadata.sdk = {\n      name: `sentry.javascript.${name}`,\n      packages: names.map(name => ({\n        name: `${source}:@sentry/${name}`,\n        version: SDK_VERSION,\n      })),\n      version: SDK_VERSION,\n    };\n  }\n\n  options._metadata = metadata;\n}\n\nexport { applySdkMetadata };\n//# sourceMappingURL=sdkMetadata.js.map\n","import { getAsyncContextStrategy } from '../asyncContext/index.js';\nimport { getMainCarrier } from '../carrier.js';\nimport { getClient, getCurrentScope } from '../currentScopes.js';\nimport { isEnabled } from '../exports.js';\nimport '../tracing/errors.js';\nimport '../utils-hoist/debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport '../debug-build.js';\nimport '../utils-hoist/time.js';\nimport { getActiveSpan, spanToTraceHeader } from './spanUtils.js';\nimport { TRACEPARENT_REGEXP, generateSentryTraceHeader } from '../utils-hoist/tracing.js';\nimport { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope } from '../tracing/dynamicSamplingContext.js';\nimport { dynamicSamplingContextToSentryBaggageHeader } from '../utils-hoist/baggage.js';\n\n/**\n * Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation\n * context) and serializes it to `sentry-trace` and `baggage` values to strings. These values can be used to propagate\n * a trace via our tracing Http headers or Html `<meta>` tags.\n *\n * This function also applies some validation to the generated sentry-trace and baggage values to ensure that\n * only valid strings are returned.\n *\n * @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header\n * or meta tag name.\n */\nfunction getTraceData(options = {}) {\n  const client = getClient();\n  if (!isEnabled() || !client) {\n    return {};\n  }\n\n  const carrier = getMainCarrier();\n  const acs = getAsyncContextStrategy(carrier);\n  if (acs.getTraceData) {\n    return acs.getTraceData(options);\n  }\n\n  const scope = getCurrentScope();\n  const span = options.span || getActiveSpan();\n  const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);\n  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);\n  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);\n\n  const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);\n  if (!isValidSentryTraceHeader) {\n    logger.warn('Invalid sentry-trace data. Cannot generate trace data');\n    return {};\n  }\n\n  return {\n    'sentry-trace': sentryTrace,\n    baggage,\n  };\n}\n\n/**\n * Get a sentry-trace header value for the given scope.\n */\nfunction scopeToTraceHeader(scope) {\n  // TODO(v9): Use generateSpanId() instead of spanId\n  // eslint-disable-next-line deprecation/deprecation\n  const { traceId, sampled, spanId } = scope.getPropagationContext();\n  return generateSentryTraceHeader(traceId, spanId, sampled);\n}\n\nexport { getTraceData };\n//# sourceMappingURL=traceData.js.map\n","import { getClient, getIsolationScope } from './currentScopes.js';\nimport { consoleSandbox } from './utils-hoist/logger.js';\nimport { dateTimestampInSeconds } from './utils-hoist/time.js';\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 * 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 */\nfunction addBreadcrumb(breadcrumb, hint) {\n  const client = getClient();\n  const isolationScope = getIsolationScope();\n\n  if (!client) return;\n\n  const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = 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  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n}\n\nexport { addBreadcrumb };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { getClient } from '../currentScopes.js';\nimport { defineIntegration } from '../integration.js';\nimport { getOriginalFunction } from '../utils-hoist/object.js';\n\nlet originalFunctionToString;\n\nconst INTEGRATION_NAME = 'FunctionToString';\n\nconst SETUP_CLIENTS = new WeakMap();\n\nconst _functionToStringIntegration = (() => {\n  return {\n    name: INTEGRATION_NAME,\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        Function.prototype.toString = function ( ...args) {\n          const originalFunction = getOriginalFunction(this);\n          const context =\n            SETUP_CLIENTS.has(getClient() ) && originalFunction !== undefined ? originalFunction : this;\n          return originalFunctionToString.apply(context, args);\n        };\n      } catch (e) {\n        // ignore errors here, just don't patch this\n      }\n    },\n    setup(client) {\n      SETUP_CLIENTS.set(client, true);\n    },\n  };\n}) ;\n\n/**\n * Patch toString calls to return proper name for wrapped functions.\n *\n * ```js\n * Sentry.init({\n *   integrations: [\n *     functionToStringIntegration(),\n *   ],\n * });\n * ```\n */\nconst functionToStringIntegration = defineIntegration(_functionToStringIntegration);\n\nexport { functionToStringIntegration };\n//# sourceMappingURL=functiontostring.js.map\n","import { DEBUG_BUILD } from '../debug-build.js';\nimport { defineIntegration } from '../integration.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getEventDescription } from '../utils-hoist/misc.js';\nimport { stringMatchesSomePattern } from '../utils-hoist/string.js';\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 = [\n  /^Script error\\.?$/,\n  /^Javascript error: Script error\\.? on line 0$/,\n  /^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.\n  /^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker\n  \"undefined is not an object (evaluating 'a.L')\", // Random error that happens but not actionable or noticeable to end-users.\n  'can\\'t redefine non-configurable property \"solana\"', // Probably a browser extension or custom browser (Brave) throwing this error\n  \"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)\", // Error thrown by GTM, seemingly not affecting end-users\n  \"Can't find variable: _AutofillCallbackHandler\", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/\n  /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\\d+, MethodName:simulateEvent, ParamCount:\\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps\n];\n\n/** Options for the InboundFilters integration */\n\nconst INTEGRATION_NAME = 'InboundFilters';\nconst _inboundFiltersIntegration = ((options = {}) => {\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, _hint, client) {\n      const clientOptions = client.getOptions();\n      const mergedOptions = _mergeOptions(options, clientOptions);\n      return _shouldDropEvent(event, mergedOptions) ? null : event;\n    },\n  };\n}) ;\n\nconst inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration);\n\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: [...(internalOptions.ignoreTransactions || []), ...(clientOptions.ignoreTransactions || [])],\n    ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n  };\n}\n\nfunction _shouldDropEvent(event, options) {\n  if (options.ignoreInternal && _isSentryError(event)) {\n    DEBUG_BUILD &&\n      logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n    return true;\n  }\n  if (_isIgnoredError(event, options.ignoreErrors)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n      );\n    return true;\n  }\n  if (_isUselessError(event)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to not having an error message, error type or stacktrace.\\nEvent: ${getEventDescription(\n          event,\n        )}`,\n      );\n    return true;\n  }\n  if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n      );\n    return true;\n  }\n  if (_isDeniedUrl(event, options.denyUrls)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n      );\n    return true;\n  }\n  if (!_isAllowedUrl(event, options.allowUrls)) {\n    DEBUG_BUILD &&\n      logger.warn(\n        `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n          event,\n        )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n      );\n    return true;\n  }\n  return false;\n}\n\nfunction _isIgnoredError(event, 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    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  return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n  try {\n    // @ts-expect-error can't be a sentry error if undefined\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 !== '<anonymous>' && 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    DEBUG_BUILD && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n    return null;\n  }\n}\n\nfunction _isUselessError(event) {\n  if (event.type) {\n    // event is not an error\n    return false;\n  }\n\n  // We only want to consider events for dropping that actually have recorded exception values.\n  if (!event.exception || !event.exception.values || event.exception.values.length === 0) {\n    return false;\n  }\n\n  return (\n    // No top-level message\n    !event.message &&\n    // There are no exception values that have a stacktrace, a non-generic-Error type or value\n    !event.exception.values.some(value => value.stacktrace || (value.type && value.type !== 'Error') || value.value)\n  );\n}\n\nexport { inboundFiltersIntegration };\n//# sourceMappingURL=inboundfilters.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  // Recursively call this function in order to walk down a chain of errors\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    ...(exception.type === 'AggregateError' && { 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","/**\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 <a/> 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  return (urlPath.split(/[?#]/, 1) )[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n *\n * @deprecated This function will be removed in the next major version.\n */\n// TODO(v9): Hoist this function into the places where we use it. (as it stands only react router v6 instrumentation)\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 name\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        // TODO: Use new URL global if it exists\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","import { CONSOLE_LEVELS, originalConsoleMethods } from '../logger.js';\nimport { fill } from '../object.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a console.xxx method is called.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addConsoleInstrumentationHandler(handler) {\n  const type = 'console';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentConsole);\n}\n\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        const handlerData = { args, level };\n        triggerHandlers('console', handlerData);\n\n        const log = originalConsoleMethods[level];\n        log && log.apply(GLOBAL_OBJ.console, args);\n      };\n    });\n  });\n}\n\nexport { addConsoleInstrumentationHandler };\n//# sourceMappingURL=console.js.map\n","/**\n * @deprecated This variable has been deprecated and will be removed in the next major version.\n */\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\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 (\n    level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n  ) ;\n}\n\nexport { severityLevelFromString, validSeverityLevels };\n//# sourceMappingURL=severity.js.map\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { getFramesFromEvent } from '../utils-hoist/stacktrace.js';\n\nconst INTEGRATION_NAME = 'Dedupe';\n\nconst _dedupeIntegration = (() => {\n  let previousEvent;\n\n  return {\n    name: INTEGRATION_NAME,\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, previousEvent)) {\n          DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n          return null;\n        }\n      } catch (_oO) {} // eslint-disable-line no-empty\n\n      return (previousEvent = currentEvent);\n    },\n  };\n}) ;\n\n/**\n * Deduplication filter.\n */\nconst dedupeIntegration = defineIntegration(_dedupeIntegration);\n\n/** only exported for tests. */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n  if (!previousEvent) {\n    return false;\n  }\n\n  if (_isSameMessageEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n    return true;\n  }\n\n  return false;\n}\n\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n  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\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\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    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const frameA = previousFrames[i];\n    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\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\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\nfunction _getExceptionFromEvent(event) {\n  return event.exception && event.exception.values && event.exception.values[0];\n}\n\nexport { _shouldDropEvent, dedupeIntegration };\n//# sourceMappingURL=dedupe.js.map\n","import { defineIntegration } from '../integration.js';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { isError, isPlainObject } from '../utils-hoist/is.js';\nimport { logger } from '../utils-hoist/logger.js';\nimport { normalize } from '../utils-hoist/normalize.js';\nimport { addNonEnumerableProperty } from '../utils-hoist/object.js';\nimport { truncate } from '../utils-hoist/string.js';\n\nconst INTEGRATION_NAME = 'ExtraErrorData';\n\n/**\n * Extract additional data for from original exceptions.\n */\nconst _extraErrorDataIntegration = ((options = {}) => {\n  const { depth = 3, captureErrorCause = true } = options;\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event, hint, client) {\n      const { maxValueLength = 250 } = client.getOptions();\n      return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);\n    },\n  };\n}) ;\n\nconst extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration);\n\nfunction _enhanceEventWithErrorData(\n  event,\n  hint = {},\n  depth,\n  captureErrorCause,\n  maxValueLength,\n) {\n  if (!hint.originalException || !isError(hint.originalException)) {\n    return event;\n  }\n  const exceptionName = (hint.originalException ).name || hint.originalException.constructor.name;\n\n  const errorData = _extractErrorData(hint.originalException , captureErrorCause, maxValueLength);\n\n  if (errorData) {\n    const contexts = {\n      ...event.contexts,\n    };\n\n    const normalizedErrorData = normalize(errorData, depth);\n\n    if (isPlainObject(normalizedErrorData)) {\n      // We mark the error data as \"already normalized\" here, because we don't want other normalization procedures to\n      // potentially truncate the data we just already normalized, with a certain depth setting.\n      addNonEnumerableProperty(normalizedErrorData, '__sentry_skip_normalization__', true);\n      contexts[exceptionName] = normalizedErrorData;\n    }\n\n    return {\n      ...event,\n      contexts,\n    };\n  }\n\n  return event;\n}\n\n/**\n * Extract extra information from the Error object\n */\nfunction _extractErrorData(\n  error,\n  captureErrorCause,\n  maxValueLength,\n) {\n  // We are trying to enhance already existing event, so no harm done if it won't succeed\n  try {\n    const nativeKeys = [\n      'name',\n      'message',\n      'stack',\n      'line',\n      'column',\n      'fileName',\n      'lineNumber',\n      'columnNumber',\n      'toJSON',\n    ];\n\n    const extraErrorInfo = {};\n\n    // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.\n    for (const key of Object.keys(error)) {\n      if (nativeKeys.indexOf(key) !== -1) {\n        continue;\n      }\n      const value = error[key];\n      extraErrorInfo[key] = isError(value) || typeof value === 'string' ? truncate(`${value}`, maxValueLength) : value;\n    }\n\n    // Error.cause is a standard property that is non enumerable, we therefore need to access it separately.\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause\n    if (captureErrorCause && error.cause !== undefined) {\n      extraErrorInfo.cause = isError(error.cause) ? error.cause.toString() : error.cause;\n    }\n\n    // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)\n    if (typeof error.toJSON === 'function') {\n      const serializedError = error.toJSON() ;\n\n      for (const key of Object.keys(serializedError)) {\n        const value = serializedError[key];\n        extraErrorInfo[key] = isError(value) ? value.toString() : value;\n      }\n    }\n\n    return extraErrorInfo;\n  } catch (oO) {\n    DEBUG_BUILD && logger.error('Unable to extract extra data from the Error object:', oO);\n  }\n\n  return null;\n}\n\nexport { extraErrorDataIntegration };\n//# sourceMappingURL=extraerrordata.js.map\n","import { defineIntegration } from '../integration.js';\nimport { timestampInSeconds } from '../utils-hoist/time.js';\n\nconst INTEGRATION_NAME = 'SessionTiming';\n\nconst _sessionTimingIntegration = (() => {\n  const startTime = timestampInSeconds() * 1000;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event) {\n      const now = timestampInSeconds() * 1000;\n\n      return {\n        ...event,\n        extra: {\n          ...event.extra,\n          ['session:start']: startTime,\n          ['session:duration']: now - startTime,\n          ['session:end']: now,\n        },\n      };\n    },\n  };\n}) ;\n\n/**\n * This function adds duration since the sessionTimingIntegration was initialized\n * till the time event was sent.\n *\n * @deprecated This integration is deprecated and will be removed in the next major version of the SDK.\n * To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).\n */\nconst sessionTimingIntegration = defineIntegration(_sessionTimingIntegration);\n\nexport { sessionTimingIntegration };\n//# sourceMappingURL=sessiontiming.js.map\n","import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from './semanticAttributes.js';\nimport './tracing/errors.js';\nimport { isInstanceOf } from './utils-hoist/is.js';\nimport './utils-hoist/debug-build.js';\nimport './utils-hoist/logger.js';\nimport './utils-hoist/time.js';\nimport './utils-hoist/syncpromise.js';\nimport { parseUrl } from './utils-hoist/url.js';\nimport { SENTRY_BAGGAGE_KEY_PREFIX } from './utils-hoist/baggage.js';\nimport './debug-build.js';\nimport { hasTracingEnabled } from './utils/hasTracingEnabled.js';\nimport { getActiveSpan } from './utils/spanUtils.js';\nimport { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js';\nimport { setHttpStatus, SPAN_STATUS_ERROR } from './tracing/spanstatus.js';\nimport { startInactiveSpan } from './tracing/trace.js';\nimport { getTraceData } from './utils/traceData.js';\n\n/**\n * Create and track fetch request spans for usage in combination with `addFetchInstrumentationHandler`.\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction instrumentFetchRequest(\n  handlerData,\n  shouldCreateSpan,\n  shouldAttachHeaders,\n  spans,\n  spanOrigin = 'auto.http.browser',\n) {\n  if (!handlerData.fetchData) {\n    return undefined;\n  }\n\n  const shouldCreateSpanResult = hasTracingEnabled() && 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      endSpan(span, handlerData);\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n    return undefined;\n  }\n\n  const { method, url } = handlerData.fetchData;\n\n  const fullUrl = getFullURL(url);\n  const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n  const hasParent = !!getActiveSpan();\n\n  const span =\n    shouldCreateSpanResult && hasParent\n      ? startInactiveSpan({\n          name: `${method} ${url}`,\n          attributes: {\n            url,\n            type: 'fetch',\n            'http.method': method,\n            'http.url': fullUrl,\n            'server.address': host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin,\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  handlerData.fetchData.__span = span.spanContext().spanId;\n  spans[span.spanContext().spanId] = span;\n\n  if (shouldAttachHeaders(handlerData.fetchData.url)) {\n    const request = handlerData.args[0];\n\n    const options = handlerData.args[1] || {};\n\n    const headers = _addTracingHeadersToFetchRequest(\n      request,\n      options,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasTracingEnabled() && hasParent ? span : undefined,\n    );\n    if (headers) {\n      // Ensure this is actually set, if no options have been passed previously\n      handlerData.args[1] = options;\n      options.headers = headers;\n    }\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,\n  fetchOptionsObj\n\n,\n  span,\n) {\n  const traceHeaders = getTraceData({ span });\n  const sentryTrace = traceHeaders['sentry-trace'];\n  const baggage = traceHeaders.baggage;\n\n  // Nothing to do, when we return undefined here, the original headers will be used\n  if (!sentryTrace) {\n    return undefined;\n  }\n\n  const headers = fetchOptionsObj.headers || (isRequest(request) ? request.headers : undefined);\n\n  if (!headers) {\n    return { ...traceHeaders };\n  } else if (isHeaders(headers)) {\n    const newHeaders = new Headers(headers);\n    newHeaders.set('sentry-trace', sentryTrace);\n\n    if (baggage) {\n      const prevBaggageHeader = newHeaders.get('baggage');\n      if (prevBaggageHeader) {\n        const prevHeaderStrippedFromSentryBaggage = stripBaggageHeaderOfSentryBaggageValues(prevBaggageHeader);\n        newHeaders.set(\n          'baggage',\n          // If there are non-sentry entries (i.e. if the stripped string is non-empty/truthy) combine the stripped header and sentry baggage header\n          // otherwise just set the sentry baggage header\n          prevHeaderStrippedFromSentryBaggage ? `${prevHeaderStrippedFromSentryBaggage},${baggage}` : baggage,\n        );\n      } else {\n        newHeaders.set('baggage', baggage);\n      }\n    }\n\n    return newHeaders;\n  } else if (Array.isArray(headers)) {\n    const newHeaders = [\n      ...headers\n        // Remove any existing sentry-trace headers\n        .filter(header => {\n          return !(Array.isArray(header) && header[0] === 'sentry-trace');\n        })\n        // Get rid of previous sentry baggage values in baggage header\n        .map(header => {\n          if (Array.isArray(header) && header[0] === 'baggage' && typeof header[1] === 'string') {\n            const [headerName, headerValue, ...rest] = header;\n            return [headerName, stripBaggageHeaderOfSentryBaggageValues(headerValue), ...rest];\n          } else {\n            return header;\n          }\n        }),\n      // Attach the new sentry-trace header\n      ['sentry-trace', sentryTrace],\n    ];\n\n    if (baggage) {\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', baggage]);\n    }\n\n    return newHeaders ;\n  } else {\n    const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n    let newBaggageHeaders = [];\n\n    if (Array.isArray(existingBaggageHeader)) {\n      newBaggageHeaders = existingBaggageHeader\n        .map(headerItem =>\n          typeof headerItem === 'string' ? stripBaggageHeaderOfSentryBaggageValues(headerItem) : headerItem,\n        )\n        .filter(headerItem => headerItem === '');\n    } else if (existingBaggageHeader) {\n      newBaggageHeaders.push(stripBaggageHeaderOfSentryBaggageValues(existingBaggageHeader));\n    }\n\n    if (baggage) {\n      newBaggageHeaders.push(baggage);\n    }\n\n    return {\n      ...(headers ),\n      'sentry-trace': sentryTrace,\n      baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n    };\n  }\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers.\n *\n * @deprecated This function will not be exported anymore in v9.\n */\nfunction addTracingHeadersToFetchRequest(\n  request,\n  _client,\n  _scope,\n  fetchOptionsObj\n\n,\n  span,\n) {\n  return _addTracingHeadersToFetchRequest(request , fetchOptionsObj, span);\n}\n\nfunction getFullURL(url) {\n  try {\n    const parsed = new URL(url);\n    return parsed.href;\n  } catch (e) {\n    return undefined;\n  }\n}\n\nfunction endSpan(span, handlerData) {\n  if (handlerData.response) {\n    setHttpStatus(span, handlerData.response.status);\n\n    const contentLength =\n      handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n    if (contentLength) {\n      const contentLengthNum = parseInt(contentLength);\n      if (contentLengthNum > 0) {\n        span.setAttribute('http.response_content_length', contentLengthNum);\n      }\n    }\n  } else if (handlerData.error) {\n    span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n  }\n  span.end();\n}\n\nfunction stripBaggageHeaderOfSentryBaggageValues(baggageHeader) {\n  return (\n    baggageHeader\n      .split(',')\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      .filter(baggageEntry => !baggageEntry.split('=')[0].startsWith(SENTRY_BAGGAGE_KEY_PREFIX))\n      .join(',')\n  );\n}\n\nfunction isRequest(request) {\n  return typeof Request !== 'undefined' && isInstanceOf(request, Request);\n}\n\nfunction isHeaders(headers) {\n  return typeof Headers !== 'undefined' && isInstanceOf(headers, Headers);\n}\n\nexport { addTracingHeadersToFetchRequest, instrumentFetchRequest };\n//# sourceMappingURL=fetch.js.map\n","/**\n * Determine a breadcrumb's log level (only `warning` or `error`) based on an HTTP status code.\n */\nfunction getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {\n  // NOTE: undefined defaults to 'info' in Sentry\n  if (statusCode === undefined) {\n    return undefined;\n  } else if (statusCode >= 400 && statusCode < 500) {\n    return 'warning';\n  } else if (statusCode >= 500) {\n    return 'error';\n  } else {\n    return undefined;\n  }\n}\n\nexport { getBreadcrumbLogLevelFromHttpStatusCode };\n//# sourceMappingURL=breadcrumb-log-level.js.map\n","import { DEBUG_BUILD } from './debug-build.js';\nimport { logger } from './logger.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\nconst WINDOW = GLOBAL_OBJ ;\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/**\n * isNative checks if the given function is a native implementation\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFunction(func) {\n  return func && /^function\\s+\\w+\\(\\)\\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 (typeof EdgeRuntime === 'string') {\n    return true;\n  }\n\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 (isNativeFunction(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 = isNativeFunction(sandbox.contentWindow.fetch);\n      }\n      doc.head.removeChild(sandbox);\n    } catch (err) {\n      DEBUG_BUILD &&\n        logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n    }\n  }\n\n  return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\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 { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { isError } from '../is.js';\nimport { fill, addNonEnumerableProperty } from '../object.js';\nimport { supportsNativeFetch } from '../supports.js';\nimport { timestampInSeconds } from '../time.js';\nimport { GLOBAL_OBJ } from '../worldwide.js';\nimport { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addFetchInstrumentationHandler(\n  handler,\n  skipNativeFetchCheck,\n) {\n  const type = 'fetch';\n  addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(undefined, skipNativeFetchCheck));\n}\n\n/**\n * Add an instrumentation handler for long-lived fetch requests, like consuming server-sent events (SSE) via fetch.\n * The handler will resolve the request body and emit the actual `endTimestamp`, so that the\n * span can be updated accordingly.\n *\n * Only used internally\n * @hidden\n */\nfunction addFetchEndInstrumentationHandler(handler) {\n  const type = 'fetch-body-resolved';\n  addHandler(type, handler);\n  maybeInstrument(type, () => instrumentFetch(streamHandler));\n}\n\nfunction instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) {\n  if (skipNativeFetchCheck && !supportsNativeFetch()) {\n    return;\n  }\n\n  fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n    return function (...args) {\n      // We capture the error right here and not in the Promise error callback because Safari (and probably other\n      // browsers too) will wipe the stack trace up to this point, only leaving us with this file which is useless.\n\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your fetch call did not\n      //       have a stack trace, so the SDK backfilled the stack trace so\n      //       you can see which fetch call failed.\n      const virtualError = new Error();\n\n      const { method, url } = parseFetchArgs(args);\n      const handlerData = {\n        args,\n        fetchData: {\n          method,\n          url,\n        },\n        startTimestamp: timestampInSeconds() * 1000,\n        // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation\n        virtualError,\n      };\n\n      // if there is no callback, fetch is instrumented directly\n      if (!onFetchResolved) {\n        triggerHandlers('fetch', {\n          ...handlerData,\n        });\n      }\n\n      // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n      return originalFetch.apply(GLOBAL_OBJ, args).then(\n        async (response) => {\n          if (onFetchResolved) {\n            onFetchResolved(response);\n          } else {\n            triggerHandlers('fetch', {\n              ...handlerData,\n              endTimestamp: timestampInSeconds() * 1000,\n              response,\n            });\n          }\n\n          return response;\n        },\n        (error) => {\n          triggerHandlers('fetch', {\n            ...handlerData,\n            endTimestamp: timestampInSeconds() * 1000,\n            error,\n          });\n\n          if (isError(error) && error.stack === undefined) {\n            // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n            //       it means the error, that was caused by your fetch call did not\n            //       have a stack trace, so the SDK backfilled the stack trace so\n            //       you can see which fetch call failed.\n            error.stack = virtualError.stack;\n            addNonEnumerableProperty(error, 'framesToPop', 1);\n          }\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\nasync function resolveResponse(res, onFinishedResolving) {\n  if (res && res.body) {\n    const body = res.body;\n    const responseReader = body.getReader();\n\n    // Define a maximum duration after which we just cancel\n    const maxFetchDurationTimeout = setTimeout(\n      () => {\n        body.cancel().then(null, () => {\n          // noop\n        });\n      },\n      90 * 1000, // 90s\n    );\n\n    let readingActive = true;\n    while (readingActive) {\n      let chunkTimeout;\n      try {\n        // abort reading if read op takes more than 5s\n        chunkTimeout = setTimeout(() => {\n          body.cancel().then(null, () => {\n            // noop on error\n          });\n        }, 5000);\n\n        // This .read() call will reject/throw when we abort due to timeouts through `body.cancel()`\n        const { done } = await responseReader.read();\n\n        clearTimeout(chunkTimeout);\n\n        if (done) {\n          onFinishedResolving();\n          readingActive = false;\n        }\n      } catch (error) {\n        readingActive = false;\n      } finally {\n        clearTimeout(chunkTimeout);\n      }\n    }\n\n    clearTimeout(maxFetchDurationTimeout);\n\n    responseReader.releaseLock();\n    body.cancel().then(null, () => {\n      // noop on error\n    });\n  }\n}\n\nfunction streamHandler(response) {\n  // clone response for awaiting stream\n  let clonedResponseForResolving;\n  try {\n    clonedResponseForResolving = response.clone();\n  } catch (e) {\n    return;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  resolveResponse(clonedResponseForResolving, () => {\n    triggerHandlers('fetch-body-resolved', {\n      endTimestamp: timestampInSeconds() * 1000,\n      response,\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 * Exported for tests only.\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\nexport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, parseFetchArgs };\n//# sourceMappingURL=fetch.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  // This comment is used to identify this line in the CDN bundle build step and replace this with \"return 'cdn';\"\n  /* __SENTRY_SDK_SOURCE__ */ 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/**\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 * @deprecated This function will be removed in the next major version.\n */\n// eslint-disable-next-line @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 * @param existingModule module to use for requiring\n * @returns possibly required module\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction loadModule(moduleName, existingModule = module) {\n  let mod;\n\n  try {\n    // eslint-disable-next-line deprecation/deprecation\n    mod = dynamicRequire(existingModule, moduleName);\n  } catch (e) {\n    // no-empty\n  }\n\n  if (!mod) {\n    try {\n      // eslint-disable-next-line deprecation/deprecation\n      const { cwd } = dynamicRequire(existingModule, 'process');\n      // eslint-disable-next-line deprecation/deprecation\n      mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) ;\n    } catch (e) {\n      // no-empty\n    }\n  }\n\n  return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.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  const process = (GLOBAL_OBJ ).process;\n  return !!process && process.type === 'renderer';\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","import { GLOBAL_OBJ } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n// The MIT License\n\n\nconst WINDOW = GLOBAL_OBJ ;\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  // TODO(v9): Remove this custom check, it is pretty old and likely not needed anymore\n  const chromeVar = (WINDOW ).chrome;\n  const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime;\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","// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2012-2018 various contributors (see AUTHORS)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\n/**\n * Polyfill for the nullish coalescing operator (`??`).\n *\n * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the\n * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n *\n * @param lhs The value of the expression to the left of the `??`\n * @param rhsFn A function returning the value of the expression to the right of the `??`\n * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value\n */\nfunction _nullishCoalesce(lhs, rhsFn) {\n  // by checking for loose equality to `null`, we catch both `null` and `undefined`\n  return lhs != null ? lhs : rhsFn();\n}\n\n// Sucrase version:\n// function _nullishCoalesce(lhs, rhsFn) {\n//   if (lhs != null) {\n//     return lhs;\n//   } else {\n//     return rhsFn();\n//   }\n// }\n\nexport { _nullishCoalesce };\n//# sourceMappingURL=_nullishCoalesce.js.map\n","/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n  let lastAccessLHS = undefined;\n  let value = ops[0];\n  let i = 1;\n  while (i < ops.length) {\n    const op = ops[i] ;\n    const fn = ops[i + 1] ;\n    i += 2;\n    // by checking for loose equality to `null`, we catch both `null` and `undefined`\n    if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n      // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n      return;\n    }\n    if (op === 'access' || op === 'optionalAccess') {\n      lastAccessLHS = value;\n      value = fn(value);\n    } else if (op === 'call' || op === 'optionalCall') {\n      value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n      lastAccessLHS = undefined;\n    }\n  }\n  return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n//   let lastAccessLHS = undefined;\n//   let value = ops[0];\n//   let i = 1;\n//   while (i < ops.length) {\n//     const op = ops[i];\n//     const fn = ops[i + 1];\n//     i += 2;\n//     if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n//       return undefined;\n//     }\n//     if (op === 'access' || op === 'optionalAccess') {\n//       lastAccessLHS = value;\n//       value = fn(value);\n//     } else if (op === 'call' || op === 'optionalCall') {\n//       value = fn((...args) => value.call(lastAccessLHS, ...args));\n//       lastAccessLHS = undefined;\n//     }\n//   }\n//   return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n","import { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, withScope, addExceptionTypeValue, addExceptionMechanism, captureException } from '@sentry/core';\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// eslint-disable-next-line @typescript-eslint/ban-types\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) {\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  function isFunction(fn) {\n    return typeof fn === 'function';\n  }\n\n  if (!isFunction(fn)) {\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      if (typeof wrapper === 'function') {\n        return wrapper;\n      } else {\n        // If we find that the `__sentry_wrapped__` function is not a function at the time of accessing it, it means\n        // that something messed with it. In that case we want to return the originally passed function.\n        return fn;\n      }\n    }\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  // Wrap the function itself\n  // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n  const sentryWrapped = function ( ...args) {\n    try {\n      // Also wrap arguments that are themselves functions\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\n  // Wrap the wrapped function in a proxy, to ensure any other properties of the original function remain available\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 (e2) {\n    // Accessing some objects may throw\n    // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n  }\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    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n    const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n    if (descriptor.configurable) {\n      Object.defineProperty(sentryWrapped, 'name', {\n        get() {\n          return fn.name;\n        },\n      });\n    }\n  } catch (e3) {\n    // This may throw if e.g. the descriptor does not exist, or a browser does not allow redefining `name`.\n    // to save some bytes we simply try-catch this\n  }\n\n  return sentryWrapped;\n}\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","import { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, isParameterizedString, getClient, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/core';\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: extractType(ex),\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\nfunction eventFromPlainObject(\n  stackParser,\n  exception,\n  syntheticException,\n  isUnhandledRejection,\n) {\n  const client = getClient();\n  const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n  // If we can, we extract an exception from the object properties\n  const errorFromProp = getErrorPropertyFromObject(exception);\n\n  const extra = {\n    __serialized__: normalizeToSize(exception, normalizeDepth),\n  };\n\n  if (errorFromProp) {\n    return {\n      exception: {\n        values: [exceptionFromError(stackParser, errorFromProp)],\n      },\n      extra,\n    };\n  }\n\n  const event = {\n    exception: {\n      values: [\n        {\n          type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n          value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n        } ,\n      ],\n    },\n    extra,\n  } ;\n\n  if (syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      // event.exception.values[0] has been set above\n      // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n      event.exception.values[0].stacktrace = { frames };\n    }\n  }\n\n  return event;\n}\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 skipLines = getSkipFirstStackStringLines(ex);\n  const framesToPop = getPopFirstTopFrames(ex);\n\n  try {\n    return stackParser(stacktrace, skipLines, framesToPop);\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\n/**\n * Certain known React errors contain links that would be falsely\n * parsed as frames. This function check for these errors and\n * returns number of the stack string lines to skip.\n */\nfunction getSkipFirstStackStringLines(ex) {\n  if (ex && reactMinifiedRegexp.test(ex.message)) {\n    return 1;\n  }\n\n  return 0;\n}\n\n/**\n * If error has `framesToPop` property, it means that the\n * creator tells us the first x frames will be useless\n * and should be discarded. Typically error from wrapper function\n * which don't point to the actual location in the developer's code.\n *\n * Example: https://github.com/zertosh/invariant/blob/master/invariant.js#L46\n */\nfunction getPopFirstTopFrames(ex) {\n  if (typeof ex.framesToPop === 'number') {\n    return ex.framesToPop;\n  }\n\n  return 0;\n}\n\n// https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/Exception\n// @ts-expect-error - WebAssembly.Exception is a valid class\nfunction isWebAssemblyException(exception) {\n  // Check for support\n  // @ts-expect-error - WebAssembly.Exception is a valid class\n  if (typeof WebAssembly !== 'undefined' && typeof WebAssembly.Exception !== 'undefined') {\n    // @ts-expect-error - WebAssembly.Exception is a valid class\n    return exception instanceof WebAssembly.Exception;\n  } else {\n    return false;\n  }\n}\n\n/**\n * Extracts from errors what we use as the exception `type` in error events.\n *\n * Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.\n */\nfunction extractType(ex) {\n  const name = ex && ex.name;\n\n  // The name for WebAssembly.Exception Errors needs to be extracted differently.\n  // Context: https://github.com/getsentry/sentry-javascript/issues/13787\n  if (!name && isWebAssemblyException(ex)) {\n    // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n    const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2;\n    return hasTypeInMessage ? ex.message[0] : 'WebAssembly.Exception';\n  }\n\n  return name;\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\n  if (!message) {\n    return 'No error message';\n  }\n\n  if (message.error && typeof message.error.message === 'string') {\n    return message.error.message;\n  }\n\n  // Emscripten sets array[type, message] to the \"message\" property on the WebAssembly.Exception object\n  if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) {\n    return ex.message[1];\n  }\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  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\nfunction eventFromString(\n  stackParser,\n  message,\n  syntheticException,\n  attachStacktrace,\n) {\n  const event = {};\n\n  if (attachStacktrace && syntheticException) {\n    const frames = parseStackFrames(stackParser, syntheticException);\n    if (frames.length) {\n      event.exception = {\n        values: [{ value: message, stacktrace: { frames } }],\n      };\n    }\n    addExceptionMechanism(event, { synthetic: true });\n  }\n\n  if (isParameterizedString(message)) {\n    const { __sentry_template_string__, __sentry_template_values__ } = message;\n\n    event.logentry = {\n      message: __sentry_template_string__,\n      params: __sentry_template_values__,\n    };\n    return event;\n  }\n\n  event.message = message;\n  return event;\n}\n\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\n/** If a plain object has a property that is an `Error`, return this error. */\nfunction getErrorPropertyFromObject(obj) {\n  for (const prop in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n      const value = obj[prop];\n      if (value instanceof Error) {\n        return value;\n      }\n    }\n  }\n\n  return undefined;\n}\n\nexport { eventFromException, eventFromMessage, eventFromUnknownInput, exceptionFromError, extractMessage, extractType };\n//# sourceMappingURL=eventbuilder.js.map\n","import { dsnToString, createEnvelope } from '@sentry/core';\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, getSDKSource, applySdkMetadata, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\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/core 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 opts = {\n      // We default this to true, as it is the safer scenario\n      parentSpanIsAlwaysRootSpan: true,\n      ...options,\n    };\n    const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n    applySdkMetadata(opts, 'browser', ['browser'], sdkSource);\n\n    super(opts);\n\n    if (opts.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    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   * @deprecated Use `captureFeedback` instead.\n   */\n   captureUserFeedback(feedback) {\n    if (!this._isEnabled()) {\n      DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.');\n      return;\n    }\n\n    const envelope = createUserFeedbackEnvelope(feedback, {\n      metadata: this.getSdkMetadata(),\n      dsn: this.getDsn(),\n      tunnel: this.getOptions().tunnel,\n    });\n\n    // sendEnvelope should not throw\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    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\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nexport { DEBUG_BUILD };\n//# sourceMappingURL=debug-build.js.map\n","const getRating = (value, thresholds) => {\n  if (value > thresholds[1]) {\n    return 'poor';\n  }\n  if (value > thresholds[0]) {\n    return 'needs-improvement';\n  }\n  return 'good';\n};\n\nconst bindReporter = (\n  callback,\n  metric,\n  thresholds,\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          metric.rating = getRating(metric.value, thresholds);\n          callback(metric);\n        }\n      }\n    }\n  };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","import { GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ\n\n;\n\nexport { WINDOW };\n//# sourceMappingURL=types.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 `v4-${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\n\n// sentry-specific change:\n// add optional param to not check for responseStart (see comment below)\nconst getNavigationEntry = (checkResponseStart = true) => {\n  const navigationEntry =\n    WINDOW.performance && WINDOW.performance.getEntriesByType && WINDOW.performance.getEntriesByType('navigation')[0];\n  // Check to ensure the `responseStart` property is present and valid.\n  // In some cases no value is reported by the browser (for\n  // privacy/security reasons), and in other cases (bugs) the value is\n  // negative or is larger than the current page time. Ignore these cases:\n  // https://github.com/GoogleChrome/web-vitals/issues/137\n  // https://github.com/GoogleChrome/web-vitals/issues/162\n  // https://github.com/GoogleChrome/web-vitals/issues/275\n  if (\n    // sentry-specific change:\n    // We don't want to check for responseStart for our own use of `getNavigationEntry`\n    !checkResponseStart ||\n    (navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now())\n  ) {\n    return navigationEntry;\n  }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\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\n\nconst initMetric = (name, value) => {\n  const navEntry = getNavigationEntry();\n  let navigationType = 'navigate';\n\n  if (navEntry) {\n    if ((WINDOW.document && WINDOW.document.prerendering) || getActivationStart() > 0) {\n      navigationType = 'prerender';\n    } else if (WINDOW.document && WINDOW.document.wasDiscarded) {\n      navigationType = 'restore';\n    } else if (navEntry.type) {\n      navigationType = navEntry.type.replace(/_/g, '-') ;\n    }\n  }\n\n  // Use `entries` type specific for the metric.\n  const entries = [];\n\n  return {\n    name,\n    value: typeof value === 'undefined' ? -1 : value,\n    rating: 'good' , // If needed, will be updated when reported. `const` to keep the type from widening to `string`.\n    delta: 0,\n    entries,\n    id: generateUniqueID(),\n    navigationType,\n  };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/*\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 * 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        // Delay by a microtask to workaround a bug in Safari where the\n        // callback is invoked immediately, rather than in a separate task.\n        // See: https://github.com/GoogleChrome/web-vitals/issues/277\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        Promise.resolve().then(() => {\n          callback(list.getEntries() );\n        });\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\n\n// Sentry-specific change:\n// This function's logic was NOT updated to web-vitals 4.2.4 but we continue\n// to use the web-vitals 3.5.2 due to us having stricter browser support.\n// PR with context that made the changes: https://github.com/GoogleChrome/web-vitals/pull/442/files#r1530492402\n// The PR removed listening to the `pagehide` event, in favour of only listening to `visibilitychange` event.\n// This is \"more correct\" but some browsers we still support (Safari 12.1-14.0) don't fully support `visibilitychange`\n// or have known bugs w.r.t the `visibilitychange` event.\n// TODO (v9): If we decide to drop support for Safari 12.1-14.0, we can use the logic from web-vitals 4.2.4\n// In this case, we also need to update the integration tests that currently trigger the `pagehide` event to\n// simulate the page being hidden.\nconst onHidden = (cb) => {\n  const onHiddenOrPageHide = (event) => {\n    if (event.type === 'pagehide' || (WINDOW.document && WINDOW.document.visibilityState === 'hidden')) {\n      cb(event);\n    }\n  };\n\n  if (WINDOW.document) {\n    addEventListener('visibilitychange', onHiddenOrPageHide, true);\n    // Some browsers have buggy implementations of visibilitychange,\n    // so we use pagehide in addition, just to be safe.\n    addEventListener('pagehide', onHiddenOrPageHide, true);\n  }\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst runOnce = (cb) => {\n  let called = false;\n  return () => {\n    if (!called) {\n      cb();\n      called = true;\n    }\n  };\n};\n\nexport { runOnce };\n//# sourceMappingURL=runOnce.js.map\n","import { WINDOW } from '../../../types.js';\n\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\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n  // If the document is hidden when this code runs, assume it was always\n  // hidden and the page was loaded in the background, with the one exception\n  // that visibility state is always 'hidden' during prerendering, so we have\n  // to ignore that case until prerendering finishes (see: `prerenderingchange`\n  // event logic below).\n  return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst onVisibilityUpdate = (event) => {\n  // If the document is 'hidden' and no previous hidden timestamp has been\n  // set, update it based on the current event data.\n  if (WINDOW.document.visibilityState === 'hidden' && firstHiddenTime > -1) {\n    // If the event is a 'visibilitychange' event, it means the page was\n    // visible prior to this change, so the event timestamp is the first\n    // hidden time.\n    // However, if the event is not a 'visibilitychange' event, then it must\n    // be a 'prerenderingchange' event, and the fact that the document is\n    // still 'hidden' from the above check means the tab was activated\n    // in a background state and so has always been hidden.\n    firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;\n\n    // Remove all listeners now that a `firstHiddenTime` value has been set.\n    removeChangeListeners();\n  }\n};\n\nconst addChangeListeners = () => {\n  addEventListener('visibilitychange', onVisibilityUpdate, true);\n  // IMPORTANT: when a page is prerendering, its `visibilityState` is\n  // 'hidden', so in order to account for cases where this module checks for\n  // visibility during prerendering, an additional check after prerendering\n  // completes is also required.\n  addEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst removeChangeListeners = () => {\n  removeEventListener('visibilitychange', onVisibilityUpdate, true);\n  removeEventListener('prerenderingchange', onVisibilityUpdate, true);\n};\n\nconst getVisibilityWatcher = () => {\n  if (WINDOW.document && 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    addChangeListeners();\n  }\n  return {\n    get firstHiddenTime() {\n      return firstHiddenTime;\n    },\n  };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.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\n\nconst whenActivated = (callback) => {\n  if (WINDOW.document && WINDOW.document.prerendering) {\n    addEventListener('prerenderingchange', () => callback(), true);\n  } else {\n    callback();\n  }\n};\n\nexport { whenActivated };\n//# sourceMappingURL=whenActivated.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { whenActivated } from './lib/whenActivated.js';\n\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/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nconst FCPThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nconst onFCP = (onReport, opts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('FCP');\n    let report;\n\n    const handleEntries = (entries) => {\n      entries.forEach(entry => {\n        if (entry.name === 'first-contentful-paint') {\n          po.disconnect();\n\n          // Only report if the page wasn't hidden prior to the first paint.\n          if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n            // The activationStart reference is used because FCP should be\n            // relative to page activation rather than navigation start if the\n            // page was prerendered. But in cases where `activationStart` occurs\n            // after the FCP, this time should be clamped at 0.\n            metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n            metric.entries.push(entry);\n            report(true);\n          }\n        }\n      });\n    };\n\n    const po = observe('paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n    }\n  });\n};\n\nexport { FCPThresholds, onFCP };\n//# sourceMappingURL=onFCP.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { onFCP } from './onFCP.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/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */\nconst CLSThresholds = [0.1, 0.25];\n\n/**\n * Calculates the [CLS](https://web.dev/articles/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/articles/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, opts = {}) => {\n  // Start monitoring FCP so we can only report CLS if FCP is also reported.\n  // Note: this is done to match the current behavior of CrUX.\n  onFCP(\n    runOnce(() => {\n      const metric = initMetric('CLS', 0);\n      let report;\n\n      let sessionValue = 0;\n      let sessionEntries = [];\n\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\n            // and less than 5 seconds after the first entry in the session,\n            // include the entry in the current session. Otherwise, start a new\n            // session.\n            if (\n              sessionValue &&\n              firstSessionEntry &&\n              lastSessionEntry &&\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        });\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          report();\n        }\n      };\n\n      const po = observe('layout-shift', handleEntries);\n      if (po) {\n        report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);\n\n        onHidden(() => {\n          handleEntries(po.takeRecords() );\n          report(true);\n        });\n\n        // Queue a task to report (if nothing else triggers a report first).\n        // This allows CLS to be reported as soon as FCP fires when\n        // `reportAllChanges` is true.\n        setTimeout(report, 0);\n      }\n    }),\n  );\n};\n\nexport { CLSThresholds, onCLS };\n//# sourceMappingURL=getCLS.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';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.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/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */\nconst FIDThresholds = [100, 300];\n\n/**\n * Calculates the [FID](https://web.dev/articles/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, opts = {}) => {\n  whenActivated(() => {\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\n    report = bindReporter(onReport, metric, FIDThresholds, opts.reportAllChanges);\n\n    if (po) {\n      onHidden(\n        runOnce(() => {\n          handleEntries(po.takeRecords() );\n          po.disconnect();\n        }),\n      );\n    }\n  });\n};\n\nexport { FIDThresholds, onFID };\n//# sourceMappingURL=getFID.js.map\n","import { observe } from '../observe.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\n\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\n\nconst updateEstimate = (entries) => {\n  entries.forEach(e => {\n    if (e.interactionId) {\n      minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);\n      maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);\n\n      interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;\n    }\n  });\n};\n\nlet po;\n\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => {\n  return po ? interactionCountEstimate : performance.interactionCount || 0;\n};\n\n/**\n * Feature detects native support or initializes the polyfill if needed.\n */\nconst initInteractionCountPolyfill = () => {\n  if ('interactionCount' in performance || po) return;\n\n  po = observe('event', updateEstimate, {\n    type: 'event',\n    buffered: true,\n    durationThreshold: 0,\n  } );\n};\n\nexport { getInteractionCount, initInteractionCountPolyfill };\n//# sourceMappingURL=interactionCountPolyfill.js.map\n","import { getInteractionCount } from './polyfills/interactionCountPolyfill.js';\n\n/*\n * Copyright 2024 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// A list of longest interactions on the page (by latency) sorted so the\n// longest one is first. The list is at most MAX_INTERACTIONS_TO_CONSIDER long.\nconst longestInteractionList = [];\n\n// A mapping of longest interactions by their interaction ID.\n// This is used for faster lookup.\nconst longestInteractionMap = new Map();\n\n// The default `durationThreshold` used across this library for observing\n// `event` entries via PerformanceObserver.\nconst DEFAULT_DURATION_THRESHOLD = 40;\n\n// Used to store the interaction count after a bfcache restore, since p98\n// interaction latencies should only consider the current navigation.\nlet prevInteractionCount = 0;\n\n/**\n * Returns the interaction count since the last bfcache restore (or for the\n * full page lifecycle if there were no bfcache restores).\n */\nconst getInteractionCountForNavigation = () => {\n  return getInteractionCount() - prevInteractionCount;\n};\n\n/**\n * Returns the estimated p98 longest interaction based on the stored\n * interaction candidates and the interaction count for the current page.\n */\nconst estimateP98LongestInteraction = () => {\n  const candidateInteractionIndex = Math.min(\n    longestInteractionList.length - 1,\n    Math.floor(getInteractionCountForNavigation() / 50),\n  );\n\n  return longestInteractionList[candidateInteractionIndex];\n};\n\n// To prevent unnecessary memory usage on pages with lots of interactions,\n// store at most 10 of the longest interactions to consider as INP candidates.\nconst MAX_INTERACTIONS_TO_CONSIDER = 10;\n\n/**\n * A list of callback functions to run before each entry is processed.\n * Exposing this list allows the attribution build to hook into the\n * entry processing pipeline.\n */\nconst entryPreProcessingCallbacks = [];\n\n/**\n * Takes a performance entry and adds it to the list of worst interactions\n * if its duration is long enough to make it among the worst. If the\n * entry is part of an existing interaction, it is merged and the latency\n * and entries list is updated as needed.\n */\nconst processInteractionEntry = (entry) => {\n  entryPreProcessingCallbacks.forEach(cb => cb(entry));\n\n  // Skip further processing for entries that cannot be INP candidates.\n  if (!(entry.interactionId || entry.entryType === 'first-input')) return;\n\n  // The least-long of the 10 longest interactions.\n  const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1];\n\n  const existingInteraction = longestInteractionMap.get(entry.interactionId);\n\n  // Only process the entry if it's possibly one of the ten longest,\n  // or if it's part of an existing interaction.\n  if (\n    existingInteraction ||\n    longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER ||\n    (minLongestInteraction && entry.duration > minLongestInteraction.latency)\n  ) {\n    // If the interaction already exists, update it. Otherwise create one.\n    if (existingInteraction) {\n      // If the new entry has a longer duration, replace the old entries,\n      // otherwise add to the array.\n      if (entry.duration > existingInteraction.latency) {\n        existingInteraction.entries = [entry];\n        existingInteraction.latency = entry.duration;\n      } else if (\n        entry.duration === existingInteraction.latency &&\n        entry.startTime === (existingInteraction.entries[0] && existingInteraction.entries[0].startTime)\n      ) {\n        existingInteraction.entries.push(entry);\n      }\n    } else {\n      const interaction = {\n        id: entry.interactionId,\n        latency: entry.duration,\n        entries: [entry],\n      };\n      longestInteractionMap.set(interaction.id, interaction);\n      longestInteractionList.push(interaction);\n    }\n\n    // Sort the entries by latency (descending) and keep only the top ten.\n    longestInteractionList.sort((a, b) => b.latency - a.latency);\n    if (longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) {\n      longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => longestInteractionMap.delete(i.id));\n    }\n  }\n};\n\nexport { DEFAULT_DURATION_THRESHOLD, entryPreProcessingCallbacks, estimateP98LongestInteraction, longestInteractionList, longestInteractionMap, processInteractionEntry };\n//# sourceMappingURL=interactions.js.map\n","import { WINDOW } from '../../../types.js';\nimport { onHidden } from './onHidden.js';\nimport { runOnce } from './runOnce.js';\n\n/*\n * Copyright 2024 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/**\n * Runs the passed callback during the next idle period, or immediately\n * if the browser's visibility state is (or becomes) hidden.\n */\nconst whenIdle = (cb) => {\n  const rIC = WINDOW.requestIdleCallback || WINDOW.setTimeout;\n\n  let handle = -1;\n  // eslint-disable-next-line no-param-reassign\n  cb = runOnce(cb) ;\n  // If the document is hidden, run the callback immediately, otherwise\n  // race an idle callback with the next `visibilitychange` event.\n  if (WINDOW.document && WINDOW.document.visibilityState === 'hidden') {\n    cb();\n  } else {\n    handle = rIC(cb);\n    onHidden(cb);\n  }\n  return handle;\n};\n\nexport { whenIdle };\n//# sourceMappingURL=whenIdle.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { DEFAULT_DURATION_THRESHOLD, processInteractionEntry, estimateP98LongestInteraction } from './lib/interactions.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { initInteractionCountPolyfill } from './lib/polyfills/interactionCountPolyfill.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.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\n\n/** Thresholds for INP. See https://web.dev/articles/inp#what_is_a_good_inp_score */\nconst INPThresholds = [200, 500];\n\n/**\n * Calculates the [INP](https://web.dev/articles/inp) value for the current\n * page and calls the `callback` function once the value is ready, along with\n * the `event` performance entries reported for that interaction. The reported\n * value is a `DOMHighResTimeStamp`.\n *\n * A custom `durationThreshold` configuration option can optionally be passed to\n * control what `event-timing` entries are considered for INP reporting. The\n * default threshold is `40`, which means INP scores of less than 40 are\n * reported as 0. Note that this will not affect your 75th percentile INP value\n * unless that value is also less than 40 (well below the recommended\n * [good](https://web.dev/articles/inp#what_is_a_good_inp_score) threshold).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** INP should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onINP = (onReport, opts = {}) => {\n  // Return if the browser doesn't support all APIs needed to measure INP.\n  if (!('PerformanceEventTiming' in WINDOW && 'interactionId' in PerformanceEventTiming.prototype)) {\n    return;\n  }\n\n  whenActivated(() => {\n    // TODO(philipwalton): remove once the polyfill is no longer needed.\n    initInteractionCountPolyfill();\n\n    const metric = initMetric('INP');\n    // eslint-disable-next-line prefer-const\n    let report;\n\n    const handleEntries = (entries) => {\n      // Queue the `handleEntries()` callback in the next idle task.\n      // This is needed to increase the chances that all event entries that\n      // occurred between the user interaction and the next paint\n      // have been dispatched. Note: there is currently an experiment\n      // running in Chrome (EventTimingKeypressAndCompositionInteractionId)\n      // 123+ that if rolled out fully may make this no longer necessary.\n      whenIdle(() => {\n        entries.forEach(processInteractionEntry);\n\n        const inp = estimateP98LongestInteraction();\n\n        if (inp && inp.latency !== metric.value) {\n          metric.value = inp.latency;\n          metric.entries = inp.entries;\n          report();\n        }\n      });\n    };\n\n    const po = observe('event', handleEntries, {\n      // Event Timing entries have their durations rounded to the nearest 8ms,\n      // so a duration of 40ms would be any event that spans 2.5 or more frames\n      // at 60Hz. This threshold is chosen to strike a balance between usefulness\n      // and performance. Running this callback for any interaction that spans\n      // just one or two frames is likely not worth the insight that could be\n      // gained.\n      durationThreshold: opts.durationThreshold != null ? opts.durationThreshold : DEFAULT_DURATION_THRESHOLD,\n    });\n\n    report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges);\n\n    if (po) {\n      // Also observe entries of type `first-input`. This is useful in cases\n      // where the first interaction is less than the `durationThreshold`.\n      po.observe({ type: 'first-input', buffered: true });\n\n      onHidden(() => {\n        handleEntries(po.takeRecords() );\n        report(true);\n      });\n    }\n  });\n};\n\nexport { INPThresholds, onINP };\n//# sourceMappingURL=getINP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\nimport { runOnce } from './lib/runOnce.js';\nimport { whenActivated } from './lib/whenActivated.js';\nimport { whenIdle } from './lib/whenIdle.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/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */\nconst LCPThresholds = [2500, 4000];\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called any time a new `largest-contentful-paint`\n * performance entry is dispatched, or once the final value of the metric has\n * been determined.\n */\nconst onLCP = (onReport, opts = {}) => {\n  whenActivated(() => {\n    const visibilityWatcher = getVisibilityWatcher();\n    const metric = initMetric('LCP');\n    let report;\n\n    const handleEntries = (entries) => {\n      // If reportAllChanges is set then call this function for each entry,\n      // otherwise only consider the last one.\n      if (!opts.reportAllChanges) {\n        // eslint-disable-next-line no-param-reassign\n        entries = entries.slice(-1);\n      }\n\n      entries.forEach(entry => {\n        // Only report if the page wasn't hidden prior to LCP.\n        if (entry.startTime < visibilityWatcher.firstHiddenTime) {\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 pre-rendered. But in cases\n          // where `activationStart` occurs after the LCP, this time should be\n          // clamped at 0.\n          metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n          metric.entries = [entry];\n          report();\n        }\n      });\n    };\n\n    const po = observe('largest-contentful-paint', handleEntries);\n\n    if (po) {\n      report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);\n\n      const stopListening = runOnce(() => {\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      // stops 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        // Wrap in a setTimeout so the callback is run in a separate task\n        // to avoid extending the keyboard/click handler to reduce INP impact\n        // https://github.com/GoogleChrome/web-vitals/issues/383\n        if (WINDOW.document) {\n          addEventListener(type, () => whenIdle(stopListening ), {\n            once: true,\n            capture: true,\n          });\n        }\n      });\n\n      onHidden(stopListening);\n    }\n  });\n};\n\nexport { LCPThresholds, onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { WINDOW } from '../../types.js';\nimport { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getNavigationEntry } from './lib/getNavigationEntry.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { whenActivated } from './lib/whenActivated.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/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */\nconst TTFBThresholds = [800, 1800];\n\n/**\n * Runs in the next task after the page is done loading and/or prerendering.\n * @param callback\n */\nconst whenReady = (callback) => {\n  if (WINDOW.document && WINDOW.document.prerendering) {\n    whenActivated(() => whenReady(callback));\n  } else if (WINDOW.document && WINDOW.document.readyState !== 'complete') {\n    addEventListener('load', () => whenReady(callback), true);\n  } else {\n    // Queue a task so the callback runs after `loadEventEnd`.\n    setTimeout(callback, 0);\n  }\n};\n\n/**\n * Calculates the [TTFB](https://web.dev/articles/ttfb) value for the\n * current page and calls the `callback` function once the page has loaded,\n * along with the relevant `navigation` performance entry used to determine the\n * value. The reported value is a `DOMHighResTimeStamp`.\n *\n * Note, this function waits until after the page is loaded to call `callback`\n * in order to ensure all properties of the `navigation` entry are populated.\n * This is useful if you want to report on other metrics exposed by the\n * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For\n * example, the TTFB metric starts from the page's [time\n * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it\n * includes time spent on DNS lookup, connection negotiation, network latency,\n * and server processing time.\n */\nconst onTTFB = (onReport, opts = {}) => {\n  const metric = initMetric('TTFB');\n  const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges);\n\n  whenReady(() => {\n    const navigationEntry = getNavigationEntry();\n\n    if (navigationEntry) {\n      // The activationStart reference is used because TTFB should be\n      // relative to page activation rather than navigation start if the\n      // page was prerendered. But in cases where `activationStart` occurs\n      // after the first byte is received, this time should be clamped at 0.\n      metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0);\n\n      metric.entries = [navigationEntry];\n      report(true);\n    }\n  });\n};\n\nexport { TTFBThresholds, onTTFB };\n//# sourceMappingURL=onTTFB.js.map\n","import { logger, getFunctionName } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onINP } from './web-vitals/getINP.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\nimport { onTTFB } from './web-vitals/onTTFB.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\nlet _previousTtfb;\nlet _previousInp;\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 *\n * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called.\n * This will lead to the CLS being finalized and frozen.\n */\nfunction addClsInstrumentationHandler(\n  callback,\n  stopOnCallback = false,\n) {\n  return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback);\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 *\n * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called.\n * This will lead to the LCP being finalized and frozen.\n */\nfunction addLcpInstrumentationHandler(\n  callback,\n  stopOnCallback = false,\n) {\n  return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback);\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 FID metric is available.\n */\nfunction addTtfbInstrumentationHandler(callback) {\n  return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb);\n}\n\n/**\n * Add a callback that will be triggered when a INP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addInpInstrumentationHandler(\n  callback,\n) {\n  return addMetricObserver('inp', callback, instrumentInp, _previousInp);\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      DEBUG_BUILD &&\n        logger.error(\n          `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n          e,\n        );\n    }\n  }\n}\n\nfunction instrumentCls() {\n  return onCLS(\n    metric => {\n      triggerHandlers('cls', {\n        metric,\n      });\n      _previousCls = metric;\n    },\n    // We want the callback to be called whenever the CLS value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentFid() {\n  return onFID(metric => {\n    triggerHandlers('fid', {\n      metric,\n    });\n    _previousFid = metric;\n  });\n}\n\nfunction instrumentLcp() {\n  return onLCP(\n    metric => {\n      triggerHandlers('lcp', {\n        metric,\n      });\n      _previousLcp = metric;\n    },\n    // We want the callback to be called whenever the LCP value updates.\n    // By default, the callback is only called when the tab goes to the background.\n    { reportAllChanges: true },\n  );\n}\n\nfunction instrumentTtfb() {\n  return onTTFB(metric => {\n    triggerHandlers('ttfb', {\n      metric,\n    });\n    _previousTtfb = metric;\n  });\n}\n\nfunction instrumentInp() {\n  return onINP(metric => {\n    triggerHandlers('inp', {\n      metric,\n    });\n    _previousInp = metric;\n  });\n}\n\nfunction addMetricObserver(\n  type,\n  callback,\n  instrumentFn,\n  previousValue,\n  stopOnCallback = false,\n) {\n  addHandler(type, callback);\n\n  let stopListening;\n\n  if (!instrumented[type]) {\n    stopListening = instrumentFn();\n    instrumented[type] = true;\n  }\n\n  if (previousValue) {\n    callback({ metric: previousValue });\n  }\n\n  return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined);\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(\n  type,\n  callback,\n  stopListening,\n) {\n  return () => {\n    if (stopListening) {\n      stopListening();\n    }\n\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\n/**\n * Check if a PerformanceEntry is a PerformanceEventTiming by checking for the `duration` property.\n */\nfunction isPerformanceEventTiming(entry) {\n  return 'duration' in entry;\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler, isPerformanceEventTiming };\n//# sourceMappingURL=instrument.js.map\n","import { spanToJSON, withActiveSpan, startInactiveSpan, getClient, getCurrentScope } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\n/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n  return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction startAndEndSpan(\n  parentSpan,\n  startTimeInSeconds,\n  endTime,\n  { ...ctx },\n) {\n  const parentStartTime = spanToJSON(parentSpan).start_timestamp;\n  if (parentStartTime && parentStartTime > startTimeInSeconds) {\n    // We can only do this for SentrySpans...\n    if (typeof (parentSpan ).updateStartTime === 'function') {\n      (parentSpan ).updateStartTime(startTimeInSeconds);\n    }\n  }\n\n  // The return value only exists for tests\n  return withActiveSpan(parentSpan, () => {\n    const span = startInactiveSpan({\n      startTime: startTimeInSeconds,\n      ...ctx,\n    });\n\n    if (span) {\n      span.end(endTime);\n    }\n\n    return span;\n  });\n}\n\n/**\n * Starts an inactive, standalone span used to send web vital values to Sentry.\n * DO NOT use this for arbitrary spans, as these spans require special handling\n * during ingestion to extract metrics.\n *\n * This function adds a bunch of attributes and data to the span that's shared\n * by all web vital standalone spans. However, you need to take care of adding\n * the actual web vital value as an event to the span. Also, you need to assign\n * a transaction name and some other values that are specific to the web vital.\n *\n * Ultimately, you also need to take care of ending the span to send it off.\n *\n * @param options\n *\n * @returns an inactive, standalone and NOT YET ended span\n */\nfunction startStandaloneWebVitalSpan(options) {\n  const client = getClient();\n  if (!client) {\n    return;\n  }\n\n  const { name, transaction, attributes: passedAttributes, startTime } = options;\n\n  const { release, environment } = client.getOptions();\n  // We need to get the replay, user, and activeTransaction from the current scope\n  // so that we can associate replay id, profile id, and a user display to the span\n  const replay = client.getIntegrationByName('Replay');\n  const replayId = replay && replay.getReplayId();\n\n  const scope = getCurrentScope();\n\n  const user = scope.getUser();\n  const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;\n\n  let profileId;\n  try {\n    // @ts-expect-error skip optional chaining to save bundle size with try catch\n    profileId = scope.getScopeData().contexts.profile.profile_id;\n  } catch (e) {\n    // do nothing\n  }\n\n  const attributes = {\n    release,\n    environment,\n\n    user: userDisplay || undefined,\n    profile_id: profileId || undefined,\n    replay_id: replayId || undefined,\n\n    transaction,\n\n    // Web vital score calculation relies on the user agent to account for different\n    // browsers setting different thresholds for what is considered a good/meh/bad value.\n    // For example: Chrome vs. Chrome Mobile\n    'user_agent.original': WINDOW.navigator && WINDOW.navigator.userAgent,\n\n    ...passedAttributes,\n  };\n\n  return startInactiveSpan({\n    name,\n    attributes,\n    startTime,\n    experimental: {\n      standalone: true,\n    },\n  });\n}\n\n/** Get the browser performance API. */\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\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n  return time / 1000;\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\nexport { extractNetworkProtocol, getBrowserPerformanceAPI, isMeasurementValue, msToSec, startAndEndSpan, startStandaloneWebVitalSpan };\n//# sourceMappingURL=utils.js.map\n","import { getClient, getActiveSpan, getRootSpan, spanToJSON, logger, browserPerformanceTimeOrigin, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { addClsInstrumentationHandler } from './instrument.js';\nimport { msToSec, startStandaloneWebVitalSpan } from './utils.js';\nimport { onHidden } from './web-vitals/lib/onHidden.js';\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value once\n *\n * - the page visibility is hidden\n * - a navigation span is started (to stop CLS measurement for SPA soft navigations)\n *\n * Once either of these events triggers, the CLS value is sent as a standalone span and we stop\n * measuring CLS.\n */\nfunction trackClsAsStandaloneSpan() {\n  let standaloneCLsValue = 0;\n  let standaloneClsEntry;\n  let pageloadSpanId;\n\n  if (!supportsLayoutShift()) {\n    return;\n  }\n\n  let sentSpan = false;\n  function _collectClsOnce() {\n    if (sentSpan) {\n      return;\n    }\n    sentSpan = true;\n    if (pageloadSpanId) {\n      sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId);\n    }\n    cleanupClsHandler();\n  }\n\n  const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] ;\n    if (!entry) {\n      return;\n    }\n    standaloneCLsValue = metric.value;\n    standaloneClsEntry = entry;\n  }, true);\n\n  // use pagehide event from web-vitals\n  onHidden(() => {\n    _collectClsOnce();\n  });\n\n  // Since the call chain of this function is synchronous and evaluates before the SDK client is created,\n  // we need to wait with subscribing to a client hook until the client is created. Therefore, we defer\n  // to the next tick after the SDK setup.\n  setTimeout(() => {\n    const client = getClient();\n\n    if (!client) {\n      return;\n    }\n\n    const unsubscribeStartNavigation = client.on('startNavigationSpan', () => {\n      _collectClsOnce();\n      unsubscribeStartNavigation && unsubscribeStartNavigation();\n    });\n\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    const spanJSON = rootSpan && spanToJSON(rootSpan);\n    if (spanJSON && spanJSON.op === 'pageload') {\n      pageloadSpanId = rootSpan.spanContext().spanId;\n    }\n  }, 0);\n}\n\nfunction sendStandaloneClsSpan(clsValue, entry, pageloadSpanId) {\n  DEBUG_BUILD && logger.log(`Sending CLS span (${clsValue})`);\n\n  const startTime = msToSec((browserPerformanceTimeOrigin || 0) + ((entry && entry.startTime) || 0));\n  const routeName = getCurrentScope().getScopeData().transactionName;\n\n  const name = entry ? htmlTreeAsString(entry.sources[0] && entry.sources[0].node) : 'Layout shift';\n\n  const attributes = dropUndefinedKeys({\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.cls',\n    [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.cls',\n    [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: (entry && entry.duration) || 0,\n    // attach the pageload span id to the CLS span so that we can link them in the UI\n    'sentry.pageload.span_id': pageloadSpanId,\n  });\n\n  const span = startStandaloneWebVitalSpan({\n    name,\n    transaction: routeName,\n    attributes,\n    startTime,\n  });\n\n  if (span) {\n    span.addEvent('cls', {\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: '',\n      [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue,\n    });\n\n    // LayoutShift performance entries always have a duration of 0, so we don't need to add `entry.duration` here\n    // see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/duration\n    span.end(startTime);\n  }\n}\n\nfunction supportsLayoutShift() {\n  try {\n    return PerformanceObserver.supportedEntryTypes.includes('layout-shift');\n  } catch (e) {\n    return false;\n  }\n}\n\nexport { trackClsAsStandaloneSpan };\n//# sourceMappingURL=cls.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, spanToJSON, setMeasurement, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, parseUrl, htmlTreeAsString, getComponentName } from '@sentry/core';\nimport { WINDOW } from '../types.js';\nimport { trackClsAsStandaloneSpan } from './cls.js';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler, addTtfbInstrumentationHandler } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startAndEndSpan, extractNetworkProtocol, isMeasurementValue } from './utils.js';\nimport { getActivationStart } from './web-vitals/lib/getActivationStart.js';\nimport { getNavigationEntry } from './web-vitals/lib/getNavigationEntry.js';\nimport { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher.js';\n\nconst MAX_INT_AS_BYTES = 2147483647;\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals.\n * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured.\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals({ recordClsStandaloneSpans }) {\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 fidCleanupCallback = _trackFID();\n    const lcpCleanupCallback = _trackLCP();\n    const ttfbCleanupCallback = _trackTtfb();\n    const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan() : _trackCLS();\n\n    return () => {\n      fidCleanupCallback();\n      lcpCleanupCallback();\n      ttfbCleanupCallback();\n      clsCleanupCallback && clsCleanupCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n  addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n\n    const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent);\n\n    for (const entry of entries) {\n      const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n      const duration = msToSec(entry.duration);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding a span if the long task started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-task',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\n      });\n    }\n  });\n}\n\n/**\n * Start tracking long animation frames.\n */\nfunction startTrackingLongAnimationFrames() {\n  // NOTE: the current web-vitals version (3.5.2) does not support long-animation-frame, so\n  // we directly observe `long-animation-frame` events instead of through the web-vitals\n  // `observe` helper function.\n  const observer = new PerformanceObserver(list => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of list.getEntries() ) {\n      if (!entry.scripts[0]) {\n        continue;\n      }\n\n      const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n\n      const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent);\n\n      if (parentOp === 'navigation' && parentStartTimestamp && startTime < parentStartTimestamp) {\n        // Skip adding the span if the long animation frame started before the navigation started.\n        // `startAndEndSpan` will otherwise adjust the parent's start time to the span's start\n        // time, potentially skewing the duration of the actual navigation as reported via our\n        // routing instrumentations\n        continue;\n      }\n\n      const duration = msToSec(entry.duration);\n\n      const attributes = {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      };\n\n      const initialScript = entry.scripts[0];\n      const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript;\n      attributes['browser.script.invoker'] = invoker;\n      attributes['browser.script.invoker_type'] = invokerType;\n      if (sourceURL) {\n        attributes['code.filepath'] = sourceURL;\n      }\n      if (sourceFunctionName) {\n        attributes['code.function'] = sourceFunctionName;\n      }\n      if (sourceCharPosition !== -1) {\n        attributes['browser.script.source_char_position'] = sourceCharPosition;\n      }\n\n      startAndEndSpan(parent, startTime, startTime + duration, {\n        name: 'Main UI thread blocked',\n        op: 'ui.long-animation-frame',\n        attributes,\n      });\n    }\n  });\n\n  observer.observe({ type: 'long-animation-frame', buffered: true });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n  addPerformanceInstrumentationHandler('event', ({ entries }) => {\n    const parent = getActiveSpan();\n    if (!parent) {\n      return;\n    }\n    for (const entry of entries) {\n      if (entry.name === 'click') {\n        const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n        const duration = msToSec(entry.duration);\n\n        const spanOptions = {\n          name: htmlTreeAsString(entry.target),\n          op: `ui.interaction.${entry.name}`,\n          startTime: startTime,\n          attributes: {\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n          },\n        };\n\n        const componentName = getComponentName(entry.target);\n        if (componentName) {\n          spanOptions.attributes['ui.component_name'] = componentName;\n        }\n\n        startAndEndSpan(parent, startTime, startTime + duration, spanOptions);\n      }\n    }\n  });\n}\n\n/**\n * Starts tracking the Cumulative Layout Shift on the current page and collects the value and last entry\n * to the `_measurements` object which ultimately is applied to the pageload span's measurements.\n */\nfunction _trackCLS() {\n  return addClsInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1] ;\n    if (!entry) {\n      return;\n    }\n    _measurements['cls'] = { value: metric.value, unit: '' };\n    _clsEntry = entry;\n  }, true);\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n  return addLcpInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n    _lcpEntry = entry ;\n  }, true);\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n  return addFidInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n    const startTime = msToSec(entry.startTime);\n    _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n    _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n  });\n}\n\nfunction _trackTtfb() {\n  return addTtfbInstrumentationHandler(({ metric }) => {\n    const entry = metric.entries[metric.entries.length - 1];\n    if (!entry) {\n      return;\n    }\n\n    _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' };\n  });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(span, options) {\n  const performance = getBrowserPerformanceAPI();\n  if (!performance || !performance.getEntries || !browserPerformanceTimeOrigin) {\n    // Gatekeeper if performance API not available\n    return;\n  }\n\n  const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n  const performanceEntries = performance.getEntries();\n\n  const { op, start_timestamp: transactionStartTime } = spanToJSON(span);\n\n  performanceEntries.slice(_performanceCursor).forEach(entry => {\n    const startTime = msToSec(entry.startTime);\n    const duration = msToSec(\n      // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this.\n      // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display\n      // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker.\n      // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans.\n      Math.max(0, entry.duration),\n    );\n\n    if (op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) {\n      return;\n    }\n\n    switch (entry.entryType) {\n      case 'navigation': {\n        _addNavigationSpans(span, entry , timeOrigin);\n        break;\n      }\n      case 'mark':\n      case 'paint':\n      case 'measure': {\n        _addMeasureSpans(span, 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          _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n        }\n        if (entry.name === 'first-contentful-paint' && shouldRecord) {\n          _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n        }\n        break;\n      }\n      case 'resource': {\n        _addResourceSpans(span, entry , entry.name, 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(span);\n\n  // Measurements are only available for pageload transactions\n  if (op === 'pageload') {\n    _addTtfbRequestTimeToMeasurements(_measurements);\n\n    const fidMark = _measurements['mark.fid'];\n    if (fidMark && _measurements['fid']) {\n      // create span for FID\n      startAndEndSpan(span, fidMark.value, fidMark.value + msToSec(_measurements['fid'].value), {\n        name: 'first input delay',\n        op: 'ui.action',\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n        },\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    // TODO: Check if the first condition is still necessary: `onCLS` already only fires once `onFCP` was called.\n    if (!('fcp' in _measurements) || !options.recordClsOnPageloadSpan) {\n      delete _measurements.cls;\n    }\n\n    Object.entries(_measurements).forEach(([measurementName, measurement]) => {\n      setMeasurement(measurementName, measurement.value, measurement.unit);\n    });\n\n    // Set timeOrigin which denotes the timestamp which to base the LCP/FCP/FP/TTFB measurements on\n    span.setAttribute('performance.timeOrigin', timeOrigin);\n\n    // In prerendering scenarios, where a page might be prefetched and pre-rendered before the user clicks the link,\n    // the navigation starts earlier than when the user clicks it. Web Vitals should always be based on the\n    // user-perceived time, so they are not reported from the actual start of the navigation, but rather from the\n    // time where the user actively started the navigation, for example by clicking a link.\n    // This is user action is called \"activation\" and the time between navigation and activation is stored in\n    // the `activationStart` attribute of the \"navigation\" PerformanceEntry.\n    span.setAttribute('performance.activationStart', getActivationStart());\n\n    _setWebVitalAttributes(span);\n  }\n\n  _lcpEntry = undefined;\n  _clsEntry = undefined;\n  _measurements = {};\n}\n\n/**\n * Create measure related spans.\n * Exported only for tests.\n */\nfunction _addMeasureSpans(\n  span,\n  entry,\n  startTime,\n  duration,\n  timeOrigin,\n) {\n  const navEntry = getNavigationEntry(false);\n  const requestTime = msToSec(navEntry ? navEntry.requestStart : 0);\n  // Because performance.measure accepts arbitrary timestamps it can produce\n  // spans that happen before the browser even makes a request for the page.\n  //\n  // An example of this is the automatically generated Next.js-before-hydration\n  // spans created by the Next.js framework.\n  //\n  // To prevent this we will pin the start timestamp to the request start time\n  // This does make duration inaccurate, so if this does happen, we will add\n  // an attribute to the span\n  const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime);\n  const startTimeStamp = timeOrigin + startTime;\n  const measureEndTimestamp = startTimeStamp + duration;\n\n  const attributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n\n  if (measureStartTimestamp !== startTimeStamp) {\n    attributes['sentry.browser.measure_happened_before_request'] = true;\n    attributes['sentry.browser.measure_start_time'] = measureStartTimestamp;\n  }\n\n  startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, {\n    name: entry.name ,\n    op: entry.entryType ,\n    attributes,\n  });\n\n  return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\nfunction _addNavigationSpans(span, entry, timeOrigin) {\n  (['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'] ).forEach(event => {\n    _addPerformanceNavigationTiming(span, entry, event, timeOrigin);\n  });\n  _addPerformanceNavigationTiming(span, entry, 'secureConnection', timeOrigin, 'TLS/SSL');\n  _addPerformanceNavigationTiming(span, entry, 'fetch', timeOrigin, 'cache');\n  _addPerformanceNavigationTiming(span, entry, 'domainLookup', timeOrigin, 'DNS');\n\n  _addRequest(span, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n  span,\n  entry,\n  event,\n  timeOrigin,\n  name = event,\n) {\n  const eventEnd = _getEndPropertyNameForNavigationTiming(event) ;\n  const end = entry[eventEnd];\n  const start = entry[`${event}Start`];\n  if (!start || !end) {\n    return;\n  }\n  startAndEndSpan(span, timeOrigin + msToSec(start), timeOrigin + msToSec(end), {\n    op: `browser.${name}`,\n    name: entry.name,\n    attributes: {\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n    },\n  });\n}\n\nfunction _getEndPropertyNameForNavigationTiming(event) {\n  if (event === 'secureConnection') {\n    return 'connectEnd';\n  }\n  if (event === 'fetch') {\n    return 'domainLookupStart';\n  }\n  return `${event}End`;\n}\n\n/** Create request and response related spans */\nfunction _addRequest(span, entry, timeOrigin) {\n  const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart );\n  const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd );\n  const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart );\n  if (entry.responseEnd) {\n    // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in.\n    // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0.\n    // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect\n    // these spans when the responseEnd value is available. The backend (Relay) would drop the entire span if it contained faulty spans.\n    startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {\n      op: 'browser.request',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n\n    startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {\n      op: 'browser.response',\n      name: entry.name,\n      attributes: {\n        [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',\n      },\n    });\n  }\n}\n\n/**\n * Create resource-related spans.\n * Exported only for tests.\n */\nfunction _addResourceSpans(\n  span,\n  entry,\n  resourceUrl,\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  const parsedUrl = parseUrl(resourceUrl);\n\n  const attributes = {\n    [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics',\n  };\n  setResourceEntrySizeData(attributes, entry, 'transferSize', 'http.response_transfer_size');\n  setResourceEntrySizeData(attributes, entry, 'encodedBodySize', 'http.response_content_length');\n  setResourceEntrySizeData(attributes, entry, 'decodedBodySize', 'http.decoded_response_content_length');\n\n  // `deliveryType` is experimental and does not exist everywhere\n  const deliveryType = (entry ).deliveryType;\n  if (deliveryType != null) {\n    attributes['http.response_delivery_type'] = deliveryType;\n  }\n\n  // Types do not reflect this property yet\n  const renderBlockingStatus = (entry )\n    .renderBlockingStatus;\n  if (renderBlockingStatus) {\n    attributes['resource.render_blocking_status'] = renderBlockingStatus;\n  }\n\n  if (parsedUrl.protocol) {\n    attributes['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it.\n  }\n\n  if (parsedUrl.host) {\n    attributes['server.address'] = parsedUrl.host;\n  }\n\n  attributes['url.same_origin'] = resourceUrl.includes(WINDOW.location.origin);\n\n  const { name, version } = extractNetworkProtocol(entry.nextHopProtocol);\n  attributes['network.protocol.name'] = name;\n  attributes['network.protocol.version'] = version;\n\n  const startTimestamp = timeOrigin + startTime;\n  const endTimestamp = startTimestamp + duration;\n\n  startAndEndSpan(span, startTimestamp, endTimestamp, {\n    name: resourceUrl.replace(WINDOW.location.origin, ''),\n    op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n    attributes,\n  });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(span) {\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      span.setAttribute('effectiveConnectionType', connection.effectiveType);\n    }\n\n    if (connection.type) {\n      span.setAttribute('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    span.setAttribute('deviceMemory', `${navigator.deviceMemory} GB`);\n  }\n\n  if (isMeasurementValue(navigator.hardwareConcurrency)) {\n    span.setAttribute('hardwareConcurrency', String(navigator.hardwareConcurrency));\n  }\n}\n\n/** Add LCP / CLS data to span to allow debugging */\nfunction _setWebVitalAttributes(span) {\n  if (_lcpEntry) {\n    // Capture Properties of the LCP element that contributes to the LCP.\n\n    if (_lcpEntry.element) {\n      span.setAttribute('lcp.element', htmlTreeAsString(_lcpEntry.element));\n    }\n\n    if (_lcpEntry.id) {\n      span.setAttribute('lcp.id', _lcpEntry.id);\n    }\n\n    if (_lcpEntry.url) {\n      // Trim URL to the first 200 characters.\n      span.setAttribute('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n    }\n\n    if (_lcpEntry.loadTime != null) {\n      // loadTime is the time of LCP that's related to receiving the LCP element response..\n      span.setAttribute('lcp.loadTime', _lcpEntry.loadTime);\n    }\n\n    if (_lcpEntry.renderTime != null) {\n      // renderTime is loadTime + rendering time\n      // it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the\n      // `Timing-Allow-Origin` header.\n      span.setAttribute('lcp.renderTime', _lcpEntry.renderTime);\n    }\n\n    span.setAttribute('lcp.size', _lcpEntry.size);\n  }\n\n  // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n  if (_clsEntry && _clsEntry.sources) {\n    _clsEntry.sources.forEach((source, index) =>\n      span.setAttribute(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n    );\n  }\n}\n\nfunction setResourceEntrySizeData(\n  attributes,\n  entry,\n  key,\n  dataKey,\n) {\n  const entryVal = entry[key];\n  if (entryVal != null && entryVal < MAX_INT_AS_BYTES) {\n    attributes[dataKey] = entryVal;\n  }\n}\n\n/**\n * Add ttfb request time information to measurements.\n *\n * ttfb information is added via vendored web vitals library.\n */\nfunction _addTtfbRequestTimeToMeasurements(_measurements) {\n  const navEntry = getNavigationEntry(false);\n  if (!navEntry) {\n    return;\n  }\n\n  const { responseStart, requestStart } = navEntry;\n\n  if (requestStart <= responseStart) {\n    _measurements['ttfb.requestTime'] = {\n      value: responseStart - requestStart,\n      unit: 'millisecond',\n    };\n  }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=browserMetrics.js.map\n","import { addHandler, maybeInstrument, triggerHandlers, fill, addNonEnumerableProperty, uuid4 } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst DEBOUNCE_DURATION = 1000;\n\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Add an instrumentation handler for when a click or a keypress happens.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addClickKeypressInstrumentationHandler(handler) {\n  const type = 'dom';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentDOM);\n}\n\n/** Exported for tests only. */\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    const globalObject = WINDOW ;\n    const targetObj = globalObject[target];\n    const proto = targetObj && targetObj.prototype;\n\n    // eslint-disable-next-line no-prototype-builtins\n    if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n      return;\n    }\n\n    fill(proto, 'addEventListener', function (originalAddEventListener) {\n      return function ( type, listener, options) {\n        if (type === 'click' || type == 'keypress') {\n          try {\n            const handlers = (this.__sentry_instrumentation_handlers__ =\n              this.__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 `addEventListeners` 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 ( type, listener, options) {\n          if (type === 'click' || type == 'keypress') {\n            try {\n              const handlers = this.__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 this.__sentry_instrumentation_handlers__;\n                }\n              }\n            } catch (e) {\n              // Accessing dom properties is always fragile.\n              // Also allows us to skip `addEventListeners` calls with no proper `this` context.\n            }\n          }\n\n          return originalRemoveEventListener.call(this, type, listener, options);\n        };\n      },\n    );\n  });\n}\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n  // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n  if (event.type !== lastCapturedEventType) {\n    return false;\n  }\n\n  try {\n    // If both events have the same type, it's still possible that actions were performed on different targets.\n    // e.g. 2 clicks on different buttons.\n    if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n      return false;\n    }\n  } catch (e) {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n  }\n\n  // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n  // to which an event listener was attached), we treat them as the same action, as we want to capture\n  // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n  return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n  // We are only interested in filtering `keypress` events for now.\n  if (eventType !== 'keypress') {\n    return false;\n  }\n\n  if (!target || !target.tagName) {\n    return true;\n  }\n\n  // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n  // e.g.tabbing through elements, hotkeys, etc.\n  if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n */\nfunction makeDOMEventHandler(\n  handler,\n  globalListener = false,\n) {\n  return (event) => {\n    // It's possible this handler might trigger multiple times for the same\n    // event (e.g. event propagation through node ancestors).\n    // Ignore if we've already captured that event.\n    if (!event || event['_sentryCaptured']) {\n      return;\n    }\n\n    const target = getEventTarget(event);\n\n    // We always want to skip _some_ events.\n    if (shouldSkipDOMEvent(event.type, target)) {\n      return;\n    }\n\n    // Mark event as \"seen\"\n    addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n    if (target && !target._sentryId) {\n      // Add UUID to event target so we can identify if\n      addNonEnumerableProperty(target, '_sentryId', uuid4());\n    }\n\n    const name = event.type === 'keypress' ? 'input' : event.type;\n\n    // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n    // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n    // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n    if (!isSimilarToLastCapturedEvent(event)) {\n      const handlerData = { event, name, global: globalListener };\n      handler(handlerData);\n      lastCapturedEventType = event.type;\n      lastCapturedEventTargetId = target ? target._sentryId : undefined;\n    }\n\n    // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n    clearTimeout(debounceTimerID);\n    debounceTimerID = WINDOW.setTimeout(() => {\n      lastCapturedEventTargetId = undefined;\n      lastCapturedEventType = undefined;\n    }, DEBOUNCE_DURATION);\n  };\n}\n\nfunction getEventTarget(event) {\n  try {\n    return event.target ;\n  } catch (e) {\n    // just accessing `target` property can throw an exception in some rare circumstances\n    // see: https://github.com/getsentry/sentry-javascript/issues/838\n    return null;\n  }\n}\n\nexport { addClickKeypressInstrumentationHandler, instrumentDOM };\n//# sourceMappingURL=dom.js.map\n","import { addHandler, maybeInstrument, supportsHistory, triggerHandlers, fill } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nlet lastHref;\n\n/**\n * Add an instrumentation handler for when a fetch request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addHistoryInstrumentationHandler(handler) {\n  const type = 'history';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentHistory);\n}\n\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    const handlerData = { from, to };\n    triggerHandlers('history', handlerData);\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  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        const handlerData = { from, to };\n        triggerHandlers('history', handlerData);\n      }\n      return originalHistoryFunction.apply(this, args);\n    };\n  }\n\n  fill(WINDOW.history, 'pushState', historyReplacementFunction);\n  fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nexport { addHistoryInstrumentationHandler };\n//# sourceMappingURL=history.js.map\n","import { isNativeFunction, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './types.js';\n\n/**\n * We generally want to use window.fetch / window.setTimeout.\n * However, in some cases this may be wrapped (e.g. by Zone.js for Angular),\n * so we try to get an unpatched version of this from a sandboxed iframe.\n */\n\nconst cachedImplementations = {};\n\n/**\n * Get the native implementation of a browser function.\n *\n * This can be used to ensure we get an unwrapped version of a function, in cases where a wrapped function can lead to problems.\n *\n * The following methods can be retrieved:\n * - `setTimeout`: This can be wrapped by e.g. Angular, causing change detection to be triggered.\n * - `fetch`: This can be wrapped by e.g. ad-blockers, causing an infinite loop when a request is blocked.\n */\nfunction getNativeImplementation(\n  name,\n) {\n  const cached = cachedImplementations[name];\n  if (cached) {\n    return cached;\n  }\n\n  let impl = WINDOW[name] ;\n\n  // Fast path to avoid DOM I/O\n  if (isNativeFunction(impl)) {\n    return (cachedImplementations[name] = impl.bind(WINDOW) );\n  }\n\n  const document = WINDOW.document;\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[name]) {\n        impl = contentWindow[name] ;\n      }\n      document.head.removeChild(sandbox);\n    } catch (e) {\n      // Could not create sandbox iframe, just use window.xxx\n      DEBUG_BUILD && logger.warn(`Could not create sandbox iframe for ${name} check, bailing to window.${name}: `, e);\n    }\n  }\n\n  // Sanity check: This _should_ not happen, but if it does, we just skip caching...\n  // This can happen e.g. in tests where fetch may not be available in the env, or similar.\n  if (!impl) {\n    return impl;\n  }\n\n  return (cachedImplementations[name] = impl.bind(WINDOW) );\n}\n\n/** Clear a cached implementation. */\nfunction clearCachedImplementation(name) {\n  cachedImplementations[name] = undefined;\n}\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 fetch(...rest) {\n  return getNativeImplementation('fetch')(...rest);\n}\n\n/**\n * Get an unwrapped `setTimeout` method.\n * This ensures that even if e.g. Angular wraps `setTimeout`, we get the native implementation,\n * avoiding triggering change detection.\n */\nfunction setTimeout(...rest) {\n  return getNativeImplementation('setTimeout')(...rest);\n}\n\nexport { clearCachedImplementation, fetch, getNativeImplementation, setTimeout };\n//# sourceMappingURL=getNativeImplementation.js.map\n","import { addHandler, maybeInstrument, timestampInSeconds, isString, triggerHandlers } from '@sentry/core';\nimport { WINDOW } from '../types.js';\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__';\n\n/**\n * Add an instrumentation handler for when an XHR request happens.\n * The handler function is called once when the request starts and once when it ends,\n * which can be identified by checking if it has an `endTimestamp`.\n *\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addXhrInstrumentationHandler(handler) {\n  const type = 'xhr';\n  addHandler(type, handler);\n  maybeInstrument(type, instrumentXHR);\n}\n\n/** Exported only for tests. */\nfunction instrumentXHR() {\n  if (!(WINDOW ).XMLHttpRequest) {\n    return;\n  }\n\n  const xhrproto = XMLHttpRequest.prototype;\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.open = new Proxy(xhrproto.open, {\n    apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) {\n      // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n      //       it means the error, that was caused by your XHR call did not\n      //       have a stack trace. If you are using HttpClient integration,\n      //       this is the expected behavior, as we are using this virtual error to capture\n      //       the location of your XHR call, and group your HttpClient events accordingly.\n      const virtualError = new Error();\n\n      const startTimestamp = timestampInSeconds() * 1000;\n\n      // open() should always be called with two or more arguments\n      // But to be on the safe side, we actually validate this and bail out if we don't have a method & url\n      const method = isString(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : undefined;\n      const url = parseUrl(xhrOpenArgArray[1]);\n\n      if (!method || !url) {\n        return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n      }\n\n      xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = {\n        method,\n        url,\n        request_headers: {},\n      };\n\n      // if Sentry key appears in URL, don't capture it as a request\n      if (method === 'POST' && url.match(/sentry_key/)) {\n        xhrOpenThisArg.__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 = xhrOpenThisArg[SENTRY_XHR_DATA_KEY];\n\n        if (!xhrInfo) {\n          return;\n        }\n\n        if (xhrOpenThisArg.readyState === 4) {\n          try {\n            // touching statusCode in some platforms throws\n            // an exception\n            xhrInfo.status_code = xhrOpenThisArg.status;\n          } catch (e) {\n            /* do nothing */\n          }\n\n          const handlerData = {\n            endTimestamp: timestampInSeconds() * 1000,\n            startTimestamp,\n            xhr: xhrOpenThisArg,\n            virtualError,\n          };\n          triggerHandlers('xhr', handlerData);\n        }\n      };\n\n      if ('onreadystatechange' in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === 'function') {\n        xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, {\n          apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) {\n            onreadystatechangeHandler();\n            return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray);\n          },\n        });\n      } else {\n        xhrOpenThisArg.addEventListener('readystatechange', onreadystatechangeHandler);\n      }\n\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      xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, {\n        apply(\n          originalSetRequestHeader,\n          setRequestHeaderThisArg,\n          setRequestHeaderArgArray,\n        ) {\n          const [header, value] = setRequestHeaderArgArray;\n\n          const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY];\n\n          if (xhrInfo && isString(header) && isString(value)) {\n            xhrInfo.request_headers[header.toLowerCase()] = value;\n          }\n\n          return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray);\n        },\n      });\n\n      return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray);\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/unbound-method\n  xhrproto.send = new Proxy(xhrproto.send, {\n    apply(originalSend, sendThisArg, sendArgArray) {\n      const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY];\n\n      if (!sentryXhrData) {\n        return originalSend.apply(sendThisArg, sendArgArray);\n      }\n\n      if (sendArgArray[0] !== undefined) {\n        sentryXhrData.body = sendArgArray[0];\n      }\n\n      const handlerData = {\n        startTimestamp: timestampInSeconds() * 1000,\n        xhr: sendThisArg,\n      };\n      triggerHandlers('xhr', handlerData);\n\n      return originalSend.apply(sendThisArg, sendArgArray);\n    },\n  });\n}\n\nfunction parseUrl(url) {\n  if (isString(url)) {\n    return url;\n  }\n\n  try {\n    // url can be a string or URL\n    // but since URL is not available in IE11, we do not check for it,\n    // but simply assume it is an URL and return `toString()` from it (which returns the full URL)\n    // If that fails, we just return undefined\n    return (url ).toString();\n  } catch (e2) {} // eslint-disable-line no-empty\n\n  return undefined;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler, instrumentXHR };\n//# sourceMappingURL=xhr.js.map\n","import { browserPerformanceTimeOrigin, getActiveSpan, getRootSpan, spanToJSON, getCurrentScope, htmlTreeAsString, dropUndefinedKeys, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT, SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE } from '@sentry/core';\nimport { addInpInstrumentationHandler, addPerformanceInstrumentationHandler, isPerformanceEventTiming } from './instrument.js';\nimport { getBrowserPerformanceAPI, msToSec, startStandaloneWebVitalSpan } from './utils.js';\n\nconst LAST_INTERACTIONS = [];\nconst INTERACTIONS_SPAN_MAP = new Map();\n\n/**\n * Start tracking INP webvital events.\n */\nfunction startTrackingINP() {\n  const performance = getBrowserPerformanceAPI();\n  if (performance && browserPerformanceTimeOrigin) {\n    const inpCallback = _trackINP();\n\n    return () => {\n      inpCallback();\n    };\n  }\n\n  return () => undefined;\n}\n\nconst INP_ENTRY_MAP = {\n  click: 'click',\n  pointerdown: 'click',\n  pointerup: 'click',\n  mousedown: 'click',\n  mouseup: 'click',\n  touchstart: 'click',\n  touchend: 'click',\n  mouseover: 'hover',\n  mouseout: 'hover',\n  mouseenter: 'hover',\n  mouseleave: 'hover',\n  pointerover: 'hover',\n  pointerout: 'hover',\n  pointerenter: 'hover',\n  pointerleave: 'hover',\n  dragstart: 'drag',\n  dragend: 'drag',\n  drag: 'drag',\n  dragenter: 'drag',\n  dragleave: 'drag',\n  dragover: 'drag',\n  drop: 'drag',\n  keydown: 'press',\n  keyup: 'press',\n  keypress: 'press',\n  input: 'press',\n};\n\n/** Starts tracking the Interaction to Next Paint on the current page. */\nfunction _trackINP() {\n  return addInpInstrumentationHandler(({ metric }) => {\n    if (metric.value == undefined) {\n      return;\n    }\n\n    const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);\n\n    if (!entry) {\n      return;\n    }\n\n    const { interactionId } = entry;\n    const interactionType = INP_ENTRY_MAP[entry.name];\n\n    /** Build the INP span, create an envelope from the span, and then send the envelope */\n    const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n    const duration = msToSec(metric.value);\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan ? getRootSpan(activeSpan) : undefined;\n\n    // We first try to lookup the span from our INTERACTIONS_SPAN_MAP,\n    // where we cache the route per interactionId\n    const cachedSpan = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;\n\n    const spanToUse = cachedSpan || rootSpan;\n\n    // Else, we try to use the active span.\n    // Finally, we fall back to look at the transactionName on the scope\n    const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope().getScopeData().transactionName;\n\n    const name = htmlTreeAsString(entry.target);\n    const attributes = dropUndefinedKeys({\n      [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',\n      [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,\n      [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,\n    });\n\n    const span = startStandaloneWebVitalSpan({\n      name,\n      transaction: routeName,\n      attributes,\n      startTime,\n    });\n\n    if (span) {\n      span.addEvent('inp', {\n        [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',\n        [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,\n      });\n\n      span.end(startTime + duration);\n    }\n  });\n}\n\n/**\n * Register a listener to cache route information for INP interactions.\n * TODO(v9): `latestRoute` no longer needs to be passed in and will be removed in v9.\n */\nfunction registerInpInteractionListener(_latestRoute) {\n  const handleEntries = ({ entries }) => {\n    const activeSpan = getActiveSpan();\n    const activeRootSpan = activeSpan && getRootSpan(activeSpan);\n\n    entries.forEach(entry => {\n      if (!isPerformanceEventTiming(entry) || !activeRootSpan) {\n        return;\n      }\n\n      const interactionId = entry.interactionId;\n      if (interactionId == null) {\n        return;\n      }\n\n      // If the interaction was already recorded before, nothing more to do\n      if (INTERACTIONS_SPAN_MAP.has(interactionId)) {\n        return;\n      }\n\n      // We keep max. 10 interactions in the list, then remove the oldest one & clean up\n      if (LAST_INTERACTIONS.length > 10) {\n        const last = LAST_INTERACTIONS.shift() ;\n        INTERACTIONS_SPAN_MAP.delete(last);\n      }\n\n      // We add the interaction to the list of recorded interactions\n      // and store the span for this interaction\n      LAST_INTERACTIONS.push(interactionId);\n      INTERACTIONS_SPAN_MAP.set(interactionId, activeRootSpan);\n    });\n  };\n\n  addPerformanceInstrumentationHandler('event', handleEntries);\n  addPerformanceInstrumentationHandler('first-input', handleEntries);\n}\n\nexport { registerInpInteractionListener, startTrackingINP };\n//# sourceMappingURL=inp.js.map\n","import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils';\nimport { createTransport, rejectedSyncPromise } from '@sentry/core';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n  options,\n  nativeFetch = getNativeImplementation('fetch'),\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. when finishing navigation transactions).\n      // Gotchas:\n      // - `keepalive` isn't supported by Firefox\n      // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n      //   If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n      //   We will therefore only activate the flag when we're below that limit.\n      // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n      // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n      keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n      ...options.fetchOptions,\n    };\n\n    if (!nativeFetch) {\n      clearCachedImplementation('fetch');\n      return rejectedSyncPromise('No fetch implementation available');\n    }\n\n    try {\n      // TODO: This may need a `suppressTracing` call in the future when we switch the browser SDK to OTEL\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      clearCachedImplementation('fetch');\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 { createStackParser, UNKNOWN_FUNCTION } from '@sentry/core';\n\n// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n\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 === '<anonymous>' ? UNKNOWN_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// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n  /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn = line => {\n  // If the stack line has no function name, we need to parse it differently\n  const noFnParts = chromeRegexNoFnName.exec(line) ;\n\n  if (noFnParts) {\n    const [, filename, line, col] = noFnParts;\n    return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n  }\n\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, chromeStackParserFn];\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 (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? 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];\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 { addClickKeypressInstrumentationHandler, addXhrInstrumentationHandler, addHistoryInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { defineIntegration, addConsoleInstrumentationHandler, addFetchInstrumentationHandler, getClient, addBreadcrumb, getEventDescription, logger, htmlTreeAsString, getComponentName, severityLevelFromString, safeJoin, getBreadcrumbLogLevelFromHttpStatusCode, parseUrl } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable max-lines */\n\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\nconst INTEGRATION_NAME = 'Breadcrumbs';\n\nconst _breadcrumbsIntegration = ((options = {}) => {\n  const _options = {\n    console: true,\n    dom: true,\n    fetch: true,\n    history: true,\n    sentry: true,\n    xhr: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setup(client) {\n      if (_options.console) {\n        addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client));\n      }\n      if (_options.dom) {\n        addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom));\n      }\n      if (_options.xhr) {\n        addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client));\n      }\n      if (_options.fetch) {\n        addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client));\n      }\n      if (_options.history) {\n        addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client));\n      }\n      if (_options.sentry) {\n        client.on('beforeSendEvent', _getSentryBreadcrumbHandler(client));\n      }\n    },\n  };\n}) ;\n\nconst breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration);\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction _getSentryBreadcrumbHandler(client) {\n  return function addSentryBreadcrumb(event) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    addBreadcrumb(\n      {\n        category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n        event_id: event.event_id,\n        level: event.level,\n        message: getEventDescription(event),\n      },\n      {\n        event,\n      },\n    );\n  };\n}\n\n/**\n * A HOC that creates 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 _getDomBreadcrumbHandler(\n  client,\n  dom,\n) {\n  return function _innerDomBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let target;\n    let componentName;\n    let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n    let maxStringLength =\n      typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n    if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n      DEBUG_BUILD &&\n        logger.warn(\n          `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n        );\n      maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n    }\n\n    if (typeof keyAttrs === 'string') {\n      keyAttrs = [keyAttrs];\n    }\n\n    // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n    try {\n      const event = handlerData.event ;\n      const element = _isEvent(event) ? event.target : event;\n\n      target = htmlTreeAsString(element, { keyAttrs, maxStringLength });\n      componentName = getComponentName(element);\n    } catch (e) {\n      target = '<unknown>';\n    }\n\n    if (target.length === 0) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: `ui.${handlerData.name}`,\n      message: target,\n    };\n\n    if (componentName) {\n      breadcrumb.data = { 'ui.component_name': componentName };\n    }\n\n    addBreadcrumb(breadcrumb, {\n      event: handlerData.event,\n      name: handlerData.name,\n      global: handlerData.global,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _getConsoleBreadcrumbHandler(client) {\n  return function _consoleBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    const breadcrumb = {\n      category: 'console',\n      data: {\n        arguments: handlerData.args,\n        logger: 'console',\n      },\n      level: severityLevelFromString(handlerData.level),\n      message: safeJoin(handlerData.args, ' '),\n    };\n\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    addBreadcrumb(breadcrumb, {\n      input: handlerData.args,\n      level: handlerData.level,\n    });\n  };\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _getXhrBreadcrumbHandler(client) {\n  return function _xhrBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\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    const level = getBreadcrumbLogLevelFromHttpStatusCode(status_code);\n\n    addBreadcrumb(\n      {\n        category: 'xhr',\n        data,\n        type: 'http',\n        level,\n      },\n      hint,\n    );\n  };\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _getFetchBreadcrumbHandler(client) {\n  return function _fetchBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\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      addBreadcrumb(\n        {\n          category: 'fetch',\n          data,\n          level: 'error',\n          type: 'http',\n        },\n        hint,\n      );\n    } else {\n      const response = handlerData.response ;\n      const data = {\n        ...handlerData.fetchData,\n        status_code: response && response.status,\n      };\n      const hint = {\n        input: handlerData.args,\n        response,\n        startTimestamp,\n        endTimestamp,\n      };\n      const level = getBreadcrumbLogLevelFromHttpStatusCode(data.status_code);\n\n      addBreadcrumb(\n        {\n          category: 'fetch',\n          data,\n          type: 'http',\n          level,\n        },\n        hint,\n      );\n    }\n  };\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _getHistoryBreadcrumbHandler(client) {\n  return function _historyBreadcrumb(handlerData) {\n    if (getClient() !== client) {\n      return;\n    }\n\n    let from = handlerData.from;\n    let to = handlerData.to;\n    const parsedLoc = parseUrl(WINDOW.location.href);\n    let parsedFrom = from ? parseUrl(from) : undefined;\n    const parsedTo = parseUrl(to);\n\n    // Initial pushState doesn't provide `from` information\n    if (!parsedFrom || !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    addBreadcrumb({\n      category: 'navigation',\n      data: {\n        from,\n        to,\n      },\n    });\n  };\n}\n\nfunction _isEvent(event) {\n  return !!event && !!(event ).target;\n}\n\nexport { breadcrumbsIntegration };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { defineIntegration, fill, getFunctionName, getOriginalFunction } from '@sentry/core';\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\nconst INTEGRATION_NAME = 'BrowserApiErrors';\n\nconst _browserApiErrorsIntegration = ((options = {}) => {\n  const _options = {\n    XMLHttpRequest: true,\n    eventTarget: true,\n    requestAnimationFrame: true,\n    setInterval: true,\n    setTimeout: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    // TODO: This currently only works for the first client this is setup\n    // We may want to adjust this to check for client etc.\n    setupOnce() {\n      if (_options.setTimeout) {\n        fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n      }\n\n      if (_options.setInterval) {\n        fill(WINDOW, 'setInterval', _wrapTimeFunction);\n      }\n\n      if (_options.requestAnimationFrame) {\n        fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n      }\n\n      if (_options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n        fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n      }\n\n      const eventTargetOption = _options.eventTarget;\n      if (eventTargetOption) {\n        const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n        eventTarget.forEach(_wrapEventTarget);\n      }\n    },\n  };\n}) ;\n\n/**\n * Wrap timer functions and event targets to catch errors and provide better meta data.\n */\nconst browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration);\n\nfunction _wrapTimeFunction(original) {\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\nfunction _wrapRAF(original) {\n  return function ( callback) {\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\nfunction _wrapXHR(originalSend) {\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        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 BrowserApiErrors, 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\nfunction _wrapEventTarget(target) {\n  const globalObject = WINDOW ;\n  const targetObj = globalObject[target];\n  const proto = targetObj && targetObj.prototype;\n\n  // eslint-disable-next-line 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 ( eventName, fn, options) {\n      try {\n        if (isEventListenerObject(fn)) {\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 (e2) {\n        // can sometimes get 'Permission denied to access property \"handle Event'\n      }\n\n      return original.apply(this, [\n        eventName,\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(proto, 'removeEventListener', function (originalRemoveEventListener)\n\n {\n    return function ( eventName, fn, options) {\n      /**\n       * There are 2 possible scenarios here:\n       *\n       * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n       * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n       * as a pass-through, and call original `removeEventListener` with it.\n       *\n       * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n       * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n       * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n       * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n       * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n       *\n       * When someone adds a handler prior to initialization, and then do it again, but after,\n       * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n       * to get rid of the initial handler and it'd stick there forever.\n       */\n      try {\n        const originalEventHandler = (fn ).__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, fn, options);\n    };\n  });\n}\n\nfunction isEventListenerObject(obj) {\n  return typeof (obj ).handleEvent === 'function';\n}\n\nexport { browserApiErrorsIntegration };\n//# sourceMappingURL=browserapierrors.js.map\n","import { addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\nimport { defineIntegration, logger, startSession, captureSession } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * When added, automatically creates sessions which allow you to track adoption and crashes (crash free rate) in your Releases in Sentry.\n * More information: https://docs.sentry.io/product/releases/health/\n *\n * Note: In order for session tracking to work, you need to set up Releases: https://docs.sentry.io/product/releases/\n */\nconst browserSessionIntegration = defineIntegration(() => {\n  return {\n    name: 'BrowserSession',\n    setupOnce() {\n      if (typeof WINDOW.document === 'undefined') {\n        DEBUG_BUILD &&\n          logger.warn('Using the `browserSessionIntegration` in non-browser environments is not supported.');\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      startSession({ ignoreDuration: true });\n      captureSession();\n\n      // We want to create a session for every navigation as well\n      addHistoryInstrumentationHandler(({ 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          startSession({ ignoreDuration: true });\n          captureSession();\n        }\n      });\n    },\n  };\n});\n\nexport { browserSessionIntegration };\n//# sourceMappingURL=browsersession.js.map\n","import { defineIntegration, addGlobalErrorInstrumentationHandler, getClient, captureEvent, addGlobalUnhandledRejectionInstrumentationHandler, isPrimitive, isString, getLocationHref, UNKNOWN_FUNCTION, logger } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\nconst INTEGRATION_NAME = 'GlobalHandlers';\n\nconst _globalHandlersIntegration = ((options = {}) => {\n  const _options = {\n    onerror: true,\n    onunhandledrejection: true,\n    ...options,\n  };\n\n  return {\n    name: INTEGRATION_NAME,\n    setupOnce() {\n      Error.stackTraceLimit = 50;\n    },\n    setup(client) {\n      if (_options.onerror) {\n        _installGlobalOnErrorHandler(client);\n        globalHandlerLog('onerror');\n      }\n      if (_options.onunhandledrejection) {\n        _installGlobalOnUnhandledRejectionHandler(client);\n        globalHandlerLog('onunhandledrejection');\n      }\n    },\n  };\n}) ;\n\nconst globalHandlersIntegration = defineIntegration(_globalHandlersIntegration);\n\nfunction _installGlobalOnErrorHandler(client) {\n  addGlobalErrorInstrumentationHandler(data => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const { msg, url, line, column, error } = data;\n\n    const event = _enhanceEventWithInitialFrame(\n      eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n      url,\n      line,\n      column,\n    );\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'onerror',\n      },\n    });\n  });\n}\n\nfunction _installGlobalOnUnhandledRejectionHandler(client) {\n  addGlobalUnhandledRejectionInstrumentationHandler(e => {\n    const { stackParser, attachStacktrace } = getOptions();\n\n    if (getClient() !== client || shouldIgnoreOnError()) {\n      return;\n    }\n\n    const error = _getUnhandledRejectionError(e );\n\n    const event = isPrimitive(error)\n      ? _eventFromRejectionWithPrimitive(error)\n      : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n    event.level = 'error';\n\n    captureEvent(event, {\n      originalException: error,\n      mechanism: {\n        handled: false,\n        type: 'onunhandledrejection',\n      },\n    });\n  });\n}\n\nfunction _getUnhandledRejectionError(error) {\n  if (isPrimitive(error)) {\n    return error;\n  }\n\n  // dig the object of the rejection out of known event types\n  try {\n\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 (error )) {\n      return (error ).reason;\n    }\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    if ('detail' in (error ) && 'reason' in (error ).detail) {\n      return (error ).detail.reason;\n    }\n  } catch (e2) {} // eslint-disable-line no-empty\n\n  return error;\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\nfunction _enhanceEventWithInitialFrame(\n  event,\n  url,\n  line,\n  column,\n) {\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 = column;\n  const lineno = 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: UNKNOWN_FUNCTION,\n      in_app: true,\n      lineno,\n    });\n  }\n\n  return event;\n}\n\nfunction globalHandlerLog(type) {\n  DEBUG_BUILD && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction getOptions() {\n  const client = getClient();\n  const options = (client && client.getOptions()) || {\n    stackParser: () => [],\n    attachStacktrace: false,\n  };\n  return options;\n}\n\nexport { globalHandlersIntegration };\n//# sourceMappingURL=globalhandlers.js.map\n","import { defineIntegration } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/**\n * Collects information about HTTP request headers and\n * attaches them to the event.\n */\nconst httpContextIntegration = defineIntegration(() => {\n  return {\n    name: 'HttpContext',\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  };\n});\n\nexport { httpContextIntegration };\n//# sourceMappingURL=httpcontext.js.map\n","import { defineIntegration, applyAggregateErrorsToEvent } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options = {}) => {\n  const limit = options.limit || DEFAULT_LIMIT;\n  const key = options.key || DEFAULT_KEY;\n\n  return {\n    name: INTEGRATION_NAME,\n    preprocessEvent(event, hint, client) {\n      const options = client.getOptions();\n\n      applyAggregateErrorsToEvent(\n        // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n        exceptionFromError,\n        options.stackParser,\n        options.maxValueLength,\n        key,\n        limit,\n        event,\n        hint,\n      );\n    },\n  };\n}) ;\n\n/**\n * Aggregrate linked errors in an event.\n */\nconst linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n\nexport { linkedErrorsIntegration };\n//# sourceMappingURL=linkederrors.js.map\n","import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getClient } from '@sentry/core';\nimport { BrowserClient } from './client.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { WINDOW } from './helpers.js';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs.js';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors.js';\nimport { browserSessionIntegration } from './integrations/browsersession.js';\nimport { globalHandlersIntegration } from './integrations/globalhandlers.js';\nimport { httpContextIntegration } from './integrations/httpcontext.js';\nimport { linkedErrorsIntegration } from './integrations/linkederrors.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\n\n/** Get the default integrations for the browser SDK. */\nfunction getDefaultIntegrations(options) {\n  /**\n   * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n   * `getDefaultIntegrations` but with an adjusted set of integrations.\n   */\n  const integrations = [\n    inboundFiltersIntegration(),\n    functionToStringIntegration(),\n    browserApiErrorsIntegration(),\n    breadcrumbsIntegration(),\n    globalHandlersIntegration(),\n    linkedErrorsIntegration(),\n    dedupeIntegration(),\n    httpContextIntegration(),\n  ];\n\n  // eslint-disable-next-line deprecation/deprecation\n  if (options.autoSessionTracking !== false) {\n    integrations.push(browserSessionIntegration());\n  }\n\n  return integrations;\n}\n\nfunction applyDefaultOptions(optionsArg = {}) {\n  const defaultOptions = {\n    defaultIntegrations: getDefaultIntegrations(optionsArg),\n    release:\n      typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n        ? __SENTRY_RELEASE__\n        : WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id // This supports the variable that sentry-webpack-plugin injects\n          ? WINDOW.SENTRY_RELEASE.id\n          : undefined,\n    autoSessionTracking: true,\n    sendClientReports: true,\n  };\n\n  // TODO: Instead of dropping just `defaultIntegrations`, we should simply\n  // call `dropUndefinedKeys` on the entire `optionsArg`.\n  // However, for this to work we need to adjust the `hasTracingEnabled()` logic\n  // first as it differentiates between `undefined` and the key not being in the object.\n  if (optionsArg.defaultIntegrations == null) {\n    delete optionsArg.defaultIntegrations;\n  }\n\n  return { ...defaultOptions, ...optionsArg };\n}\n\nfunction shouldShowBrowserExtensionError() {\n  const windowWithMaybeExtension =\n    typeof WINDOW.window !== 'undefined' && (WINDOW );\n  if (!windowWithMaybeExtension) {\n    // No need to show the error if we're not in a browser window environment (e.g. service workers)\n    return false;\n  }\n\n  const extensionKey = windowWithMaybeExtension.chrome ? 'chrome' : 'browser';\n  const extensionObject = windowWithMaybeExtension[extensionKey];\n\n  const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id;\n  const href = (WINDOW.location && WINDOW.location.href) || '';\n\n  const extensionProtocols = ['chrome-extension:', 'moz-extension:', 'ms-browser-extension:', 'safari-web-extension:'];\n\n  // Running the SDK in a dedicated extension page and calling Sentry.init is fine; no risk of data leakage\n  const isDedicatedExtensionPage =\n    !!runtimeId && WINDOW === WINDOW.top && extensionProtocols.some(protocol => href.startsWith(`${protocol}//`));\n\n  // Running the SDK in NW.js, which appears like a browser extension but isn't, is also fine\n  // see: https://github.com/getsentry/sentry-javascript/issues/12668\n  const isNWjs = typeof windowWithMaybeExtension.nw !== 'undefined';\n\n  return !!runtimeId && !isDedicatedExtensionPage && !isNWjs;\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 { 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(browserOptions = {}) {\n  const options = applyDefaultOptions(browserOptions);\n\n  if (!options.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) {\n    consoleSandbox(() => {\n      // eslint-disable-next-line no-console\n      console.error(\n        '[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',\n      );\n    });\n    return;\n  }\n\n  if (DEBUG_BUILD) {\n    if (!supportsFetch()) {\n      logger.warn(\n        'No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',\n      );\n    }\n  }\n  const clientOptions = {\n    ...options,\n    stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n    integrations: getIntegrationsToSetup(options),\n    transport: options.transport || makeFetchTransport,\n  };\n\n  return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * All properties the report dialog supports\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 = {}) {\n  // doesn't work without a document (React Native)\n  if (!WINDOW.document) {\n    DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call');\n    return;\n  }\n\n  const scope = getCurrentScope();\n  const client = scope.getClient();\n  const dsn = client && client.getDsn();\n\n  if (!dsn) {\n    DEBUG_BUILD && logger.error('DSN not configured for showReportDialog call');\n    return;\n  }\n\n  if (scope) {\n    options.user = {\n      ...scope.getUser(),\n      ...options.user,\n    };\n  }\n\n  if (!options.eventId) {\n    const eventId = lastEventId();\n    if (eventId) {\n      options.eventId = eventId;\n    }\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 { onClose } = options;\n  if (onClose) {\n    const reportDialogClosedMessageHandler = (event) => {\n      if (event.data === '__sentry_reportdialog_closed__') {\n        try {\n          onClose();\n        } finally {\n          WINDOW.removeEventListener('message', reportDialogClosedMessageHandler);\n        }\n      }\n    };\n    WINDOW.addEventListener('message', reportDialogClosedMessageHandler);\n  }\n\n  const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n  if (injectionPoint) {\n    injectionPoint.appendChild(script);\n  } else {\n    DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML');\n  }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\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 * Captures user feedback and sends it to Sentry.\n *\n * @deprecated Use `captureFeedback` instead.\n */\nfunction captureUserFeedback(feedback) {\n  const client = getClient();\n  if (client) {\n    // eslint-disable-next-line deprecation/deprecation\n    client.captureUserFeedback(feedback);\n  }\n}\n\nexport { captureUserFeedback, forceLoad, getDefaultIntegrations, init, onLoad, showReportDialog };\n//# sourceMappingURL=sdk.js.map\n","import { defineIntegration, stripUrlQueryAndFragment, addContextToFrame, GLOBAL_OBJ } from '@sentry/core';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nconst DEFAULT_LINES_OF_CONTEXT = 7;\n\nconst INTEGRATION_NAME = 'ContextLines';\n\nconst _contextLinesIntegration = ((options = {}) => {\n  const contextLines = options.frameContextLines != null ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;\n\n  return {\n    name: INTEGRATION_NAME,\n    processEvent(event) {\n      return addSourceContext(event, contextLines);\n    },\n  };\n}) ;\n\n/**\n * Collects source context lines around the lines of stackframes pointing to JS embedded in\n * the current page's HTML.\n *\n * This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser.\n * For frames pointing to files, context lines are added during ingestion and symbolication\n * by attempting to download the JS files to the Sentry backend.\n *\n * Use this integration if you have inline JS code in HTML pages that can't be accessed\n * by our backend (e.g. due to a login-protected page).\n */\nconst contextLinesIntegration = defineIntegration(_contextLinesIntegration);\n\n/**\n * Processes an event and adds context lines.\n */\nfunction addSourceContext(event, contextLines) {\n  const doc = WINDOW.document;\n  const htmlFilename = WINDOW.location && stripUrlQueryAndFragment(WINDOW.location.href);\n  if (!doc || !htmlFilename) {\n    return event;\n  }\n\n  const exceptions = event.exception && event.exception.values;\n  if (!exceptions || !exceptions.length) {\n    return event;\n  }\n\n  const html = doc.documentElement.innerHTML;\n  if (!html) {\n    return event;\n  }\n\n  const htmlLines = ['<!DOCTYPE html>', '<html>', ...html.split('\\n'), '</html>'];\n\n  exceptions.forEach(exception => {\n    const stacktrace = exception.stacktrace;\n    if (stacktrace && stacktrace.frames) {\n      stacktrace.frames = stacktrace.frames.map(frame =>\n        applySourceContextToFrame(frame, htmlLines, htmlFilename, contextLines),\n      );\n    }\n  });\n\n  return event;\n}\n\n/**\n * Only exported for testing\n */\nfunction applySourceContextToFrame(\n  frame,\n  htmlLines,\n  htmlFilename,\n  linesOfContext,\n) {\n  if (frame.filename !== htmlFilename || !frame.lineno || !htmlLines.length) {\n    return frame;\n  }\n\n  addContextToFrame(htmlLines, frame, linesOfContext);\n\n  return frame;\n}\n\nexport { applySourceContextToFrame, contextLinesIntegration };\n//# sourceMappingURL=contextlines.js.map\n","import { _nullishCoalesce, _optionalChain } from '@sentry/core';\nimport { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger as logger$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getLocationHref, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, dropUndefinedKeys, stringMatchesSomePattern, addEventProcessor, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, resolvedSyncPromise, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, isBrowser, parseSampleRate, consoleSandbox } from '@sentry/core';\nimport { setTimeout as setTimeout$3, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addFidInstrumentationHandler, addInpInstrumentationHandler, SENTRY_XHR_DATA_KEY, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry-internal/browser-utils';\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\nfunction _nullishCoalesce$1(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }function _optionalChain$5(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var NodeType$3;\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$3 || (NodeType$3 = {}));\n\nfunction isElement$1(n) {\n    return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n    const host = _optionalChain$5([n, 'optionalAccess', _ => _.host]);\n    return Boolean(_optionalChain$5([host, 'optionalAccess', _2 => _2.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(/\\sbackground-clip:\\s*text;/g, ' -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 fixAllCssProperty(rule) {\n    let styles = '';\n    for (let i = 0; i < rule.style.length; i++) {\n        const styleDeclaration = rule.style;\n        const attribute = styleDeclaration[i];\n        const isImportant = styleDeclaration.getPropertyPriority(attribute);\n        styles += `${attribute}:${styleDeclaration.getPropertyValue(attribute)}${isImportant ? ` !important` : ''};`;\n    }\n    return `${rule.selectorText} { ${styles} }`;\n}\nfunction stringifyRule(rule) {\n    let importStringified;\n    if (isCSSImportRule(rule)) {\n        try {\n            importStringified =\n                stringifyStylesheet(rule.styleSheet) ||\n                    escapeImportStatement(rule);\n        }\n        catch (error) {\n        }\n    }\n    else if (isCSSStyleRule(rule)) {\n        let cssText = rule.cssText;\n        const needsSafariColonFix = rule.selectorText.includes(':');\n        const needsAllFix = typeof rule.style['all'] === 'string' && rule.style['all'];\n        if (needsAllFix) {\n            cssText = fixAllCssProperty(rule);\n        }\n        if (needsSafariColonFix) {\n            cssText = fixSafariColons(cssText);\n        }\n        if (needsSafariColonFix || needsAllFix) {\n            return cssText;\n        }\n    }\n    return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n    const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n    return cssStringified.replace(regex, '$1\\\\$2');\n}\nfunction isCSSImportRule(rule) {\n    return 'styleSheet' in rule;\n}\nfunction isCSSStyleRule(rule) {\n    return 'selectorText' in rule;\n}\nclass Mirror {\n    constructor() {\n        this.idNodeMap = new Map();\n        this.nodeMetaMap = new WeakMap();\n    }\n    getId(n) {\n        if (!n)\n            return -1;\n        const id = _optionalChain$5([this, 'access', _3 => _3.getMeta, 'call', _4 => _4(n), 'optionalAccess', _5 => _5.id]);\n        return _nullishCoalesce$1(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}\nfunction extractFileExtension(path, baseURL) {\n    let url;\n    try {\n        url = new URL(path, _nullishCoalesce$1(baseURL, () => ( window.location.href)));\n    }\n    catch (err) {\n        return null;\n    }\n    const regex = /\\.([0-9a-z]+)(?:$)/i;\n    const match = url.pathname.match(regex);\n    return _nullishCoalesce$1(_optionalChain$5([match, 'optionalAccess', _6 => _6[1]]), () => ( null));\n}\nconst cachedImplementations$1 = {};\nfunction getImplementation$1(name) {\n    const cached = cachedImplementations$1[name];\n    if (cached) {\n        return cached;\n    }\n    const document = window.document;\n    let impl = window[name];\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[name]) {\n                impl =\n                    contentWindow[name];\n            }\n            document.head.removeChild(sandbox);\n        }\n        catch (e) {\n        }\n    }\n    return (cachedImplementations$1[name] = impl.bind(window));\n}\nfunction setTimeout$2(...rest) {\n    return getImplementation$1('setTimeout')(...rest);\n}\nfunction clearTimeout$2(...rest) {\n    return getImplementation$1('clearTimeout')(...rest);\n}\nfunction getIframeContentDocument(iframe) {\n    try {\n        return iframe.contentDocument;\n    }\n    catch (e) {\n    }\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}\nconst cachedDocument = new WeakMap();\nfunction absoluteToDoc(doc, attributeValue) {\n    if (!attributeValue || attributeValue.trim() === '') {\n        return attributeValue;\n    }\n    return getHref(doc, attributeValue);\n}\nfunction isSVGElement(el) {\n    return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\n}\nfunction getHref(doc, customHref) {\n    let a = cachedDocument.get(doc);\n    if (!a) {\n        a = doc.createElement('a');\n        cachedDocument.set(doc, a);\n    }\n    if (!customHref) {\n        customHref = '';\n    }\n    else if (customHref.startsWith('blob:') || customHref.startsWith('data:')) {\n        return customHref;\n    }\n    a.setAttribute('href', customHref);\n    return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\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(doc));\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        try {\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        catch (e2) {\n            return false;\n        }\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        if (el.tagName === 'INPUT') {\n            const autocomplete = el.getAttribute('autocomplete');\n            const disallowedAutocompleteValues = [\n                'current-password',\n                'new-password',\n                'cc-number',\n                'cc-exp',\n                'cc-exp-month',\n                'cc-exp-year',\n                'cc-csc',\n            ];\n            if (disallowedAutocompleteValues.includes(autocomplete)) {\n                return true;\n            }\n        }\n        let maskDistance = -1;\n        let unmaskDistance = -1;\n        if (maskAllText) {\n            unmaskDistance = distanceToMatch(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$2(() => {\n            if (!fired) {\n                listener();\n                fired = true;\n            }\n        }, iframeLoadTimeout);\n        iframeEl.addEventListener('load', () => {\n            clearTimeout$2(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$2(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$2(() => {\n        if (!fired) {\n            listener();\n            fired = true;\n        }\n    }, styleSheetLoadTimeout);\n    link.addEventListener('load', () => {\n        clearTimeout$2(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$3.Document,\n                    childNodes: [],\n                    compatMode: n.compatMode,\n                };\n            }\n            else {\n                return {\n                    type: NodeType$3.Document,\n                    childNodes: [],\n                };\n            }\n        case n.DOCUMENT_TYPE_NODE:\n            return {\n                type: NodeType$3.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                doc,\n                maskAllText,\n                maskTextClass,\n                unmaskTextClass,\n                maskTextSelector,\n                unmaskTextSelector,\n                maskTextFn,\n                maskInputOptions,\n                maskInputFn,\n                rootId,\n            });\n        case n.CDATA_SECTION_NODE:\n            return {\n                type: NodeType$3.CDATA,\n                textContent: '',\n                rootId,\n            };\n        case n.COMMENT_NODE:\n            return {\n                type: NodeType$3.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    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 (_optionalChain$5([n, 'access', _7 => _7.parentNode, 'access', _8 => _8.sheet, 'optionalAccess', _9 => _9.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(options.doc));\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.parentElement)\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$3.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 (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {\n            attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);\n        }\n    }\n    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            attributes.rel = null;\n            attributes.href = null;\n            attributes.crossorigin = null;\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(doc));\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 = doc.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 imageSrc = image.currentSrc || image.getAttribute('src') || '<unknown-src>';\n        const priorCrossOrigin = image.crossOrigin;\n        const recordInlineImage = () => {\n            image.removeEventListener('load', recordInlineImage);\n            try {\n                canvasService.width = image.naturalWidth;\n                canvasService.height = image.naturalHeight;\n                canvasCtx.drawImage(image, 0, 0);\n                attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n            }\n            catch (err) {\n                if (image.crossOrigin !== 'anonymous') {\n                    image.crossOrigin = 'anonymous';\n                    if (image.complete && image.naturalWidth !== 0)\n                        recordInlineImage();\n                    else\n                        image.addEventListener('load', recordInlineImage);\n                    return;\n                }\n                else {\n                    console.warn(`Cannot inline img src=${imageSrc}! Error: ${err}`);\n                }\n            }\n            if (image.crossOrigin === 'anonymous') {\n                priorCrossOrigin\n                    ? (attributes.crossOrigin = priorCrossOrigin)\n                    : image.removeAttribute('crossorigin');\n            }\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 (!needBlock && !getIframeContentDocument(n)) {\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$3.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$3.Comment) {\n        return true;\n    }\n    else if (sn.type === NodeType$3.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.tagName === 'link' &&\n                    sn.attributes.rel === 'prefetch' &&\n                    typeof sn.attributes.href === 'string' &&\n                    extractFileExtension(sn.attributes.href) === '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$3.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$3.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$3.Document ||\n        serializedNode.type === NodeType$3.Element) &&\n        recordChild) {\n        if (slimDOMOptions.headWhitespace &&\n            serializedNode.type === NodeType$3.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$3.Element &&\n        serializedNode.tagName === 'iframe') {\n        onceIframeLoaded(n, () => {\n            const iframeDoc = getIframeContentDocument(n);\n            if (iframeDoc && onIframeLoad) {\n                const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n                    doc: iframeDoc,\n                    mirror,\n                    blockClass,\n                    blockSelector,\n                    unblockSelector,\n                    maskAllText,\n                    maskTextClass,\n                    unmaskTextClass,\n                    maskTextSelector,\n                    unmaskTextSelector,\n                    skipChild: false,\n                    inlineStylesheet,\n                    maskInputOptions,\n                    maskAttributeFn,\n                    maskTextFn,\n                    maskInputFn,\n                    slimDOMOptions,\n                    dataURLOptions,\n                    inlineImages,\n                    recordCanvas,\n                    preserveWhiteSpace,\n                    onSerialize,\n                    onIframeLoad,\n                    iframeLoadTimeout,\n                    onStylesheetLoad,\n                    stylesheetLoadTimeout,\n                    keepIframeSrcFn,\n                });\n                if (serializedIframeNode) {\n                    onIframeLoad(n, serializedIframeNode);\n                }\n            }\n        }, iframeLoadTimeout);\n    }\n    if (serializedNode.type === NodeType$3.Element &&\n        serializedNode.tagName === 'link' &&\n        typeof serializedNode.attributes.rel === 'string' &&\n        (serializedNode.attributes.rel === 'stylesheet' ||\n            (serializedNode.attributes.rel === 'preload' &&\n                typeof serializedNode.attributes.href === 'string' &&\n                extractFileExtension(serializedNode.attributes.href) === 'css'))) {\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 _optionalChain$4(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\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$1(timeout);\n                timeout = null;\n            }\n            previous = now;\n            func.apply(context, args);\n        }\n        else if (!timeout && options.trailing !== false) {\n            timeout = setTimeout$1(() => {\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$1(() => {\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 (e2) {\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    const doc = win.document;\n    return {\n        left: doc.scrollingElement\n            ? doc.scrollingElement.scrollLeft\n            : win.pageXOffset !== undefined\n                ? win.pageXOffset\n                : _optionalChain$4([doc, 'optionalAccess', _ => _.documentElement, 'access', _2 => _2.scrollLeft]) ||\n                    _optionalChain$4([doc, 'optionalAccess', _3 => _3.body, 'optionalAccess', _4 => _4.parentElement, 'optionalAccess', _5 => _5.scrollLeft]) ||\n                    _optionalChain$4([doc, 'optionalAccess', _6 => _6.body, 'optionalAccess', _7 => _7.scrollLeft]) ||\n                    0,\n        top: doc.scrollingElement\n            ? doc.scrollingElement.scrollTop\n            : win.pageYOffset !== undefined\n                ? win.pageYOffset\n                : _optionalChain$4([doc, 'optionalAccess', _8 => _8.documentElement, 'access', _9 => _9.scrollTop]) ||\n                    _optionalChain$4([doc, 'optionalAccess', _10 => _10.body, 'optionalAccess', _11 => _11.parentElement, 'optionalAccess', _12 => _12.scrollTop]) ||\n                    _optionalChain$4([doc, 'optionalAccess', _13 => _13.body, 'optionalAccess', _14 => _14.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 closestElementOfNode(node) {\n    if (!node) {\n        return null;\n    }\n    const el = node.nodeType === node.ELEMENT_NODE\n        ? node\n        : node.parentElement;\n    return el;\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n    if (!node) {\n        return false;\n    }\n    const el = closestElementOfNode(node);\n    if (!el) {\n        return false;\n    }\n    const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n    if (!checkAncestors) {\n        const isUnblocked = unblockSelector && el.matches(unblockSelector);\n        return blockedPredicate(el) && !isUnblocked;\n    }\n    const blockDistance = distanceToMatch(el, blockedPredicate);\n    let unblockDistance = -1;\n    if (blockDistance < 0) {\n        return false;\n    }\n    if (unblockSelector) {\n        unblockDistance = distanceToMatch(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(_optionalChain$4([n, 'optionalAccess', _18 => _18.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        return _nullishCoalesce(this.styleIDMap.get(stylesheet), () => ( -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    let shadowHost = null;\n    if (_optionalChain$4([n, 'access', _19 => _19.getRootNode, 'optionalCall', _20 => _20(), 'optionalAccess', _21 => _21.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}\nconst cachedImplementations = {};\nfunction getImplementation(name) {\n    const cached = cachedImplementations[name];\n    if (cached) {\n        return cached;\n    }\n    const document = window.document;\n    let impl = window[name];\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[name]) {\n                impl =\n                    contentWindow[name];\n            }\n            document.head.removeChild(sandbox);\n        }\n        catch (e) {\n        }\n    }\n    return (cachedImplementations[name] = impl.bind(window));\n}\nfunction onRequestAnimationFrame(...rest) {\n    return getImplementation('requestAnimationFrame')(...rest);\n}\nfunction setTimeout$1(...rest) {\n    return getImplementation('setTimeout')(...rest);\n}\nfunction clearTimeout$1(...rest) {\n    return getImplementation('clearTimeout')(...rest);\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 || {});\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 = {}));\nvar NodeType$2;\n(function (NodeType) {\n    NodeType[NodeType[\"PLACEHOLDER\"] = 0] = \"PLACEHOLDER\";\n    NodeType[NodeType[\"ELEMENT_NODE\"] = 1] = \"ELEMENT_NODE\";\n    NodeType[NodeType[\"ATTRIBUTE_NODE\"] = 2] = \"ATTRIBUTE_NODE\";\n    NodeType[NodeType[\"TEXT_NODE\"] = 3] = \"TEXT_NODE\";\n    NodeType[NodeType[\"CDATA_SECTION_NODE\"] = 4] = \"CDATA_SECTION_NODE\";\n    NodeType[NodeType[\"ENTITY_REFERENCE_NODE\"] = 5] = \"ENTITY_REFERENCE_NODE\";\n    NodeType[NodeType[\"ENTITY_NODE\"] = 6] = \"ENTITY_NODE\";\n    NodeType[NodeType[\"PROCESSING_INSTRUCTION_NODE\"] = 7] = \"PROCESSING_INSTRUCTION_NODE\";\n    NodeType[NodeType[\"COMMENT_NODE\"] = 8] = \"COMMENT_NODE\";\n    NodeType[NodeType[\"DOCUMENT_NODE\"] = 9] = \"DOCUMENT_NODE\";\n    NodeType[NodeType[\"DOCUMENT_TYPE_NODE\"] = 10] = \"DOCUMENT_TYPE_NODE\";\n    NodeType[NodeType[\"DOCUMENT_FRAGMENT_NODE\"] = 11] = \"DOCUMENT_FRAGMENT_NODE\";\n})(NodeType$2 || (NodeType$2 = {}));\n\nfunction getIFrameContentDocument(iframe) {\n    try {\n        return iframe.contentDocument;\n    }\n    catch (e) {\n    }\n}\nfunction getIFrameContentWindow(iframe) {\n    try {\n        return iframe.contentWindow;\n    }\n    catch (e) {\n    }\n}\n\nfunction _optionalChain$3(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\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 = _optionalChain$3([current, 'optionalAccess', _ => _.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.attributeMap = new WeakMap();\n        this.removes = [];\n        this.mapRemoves = [];\n        this.movedMap = {};\n        this.addedSet = new Set();\n        this.movedSet = new Set();\n        this.droppedSet = new Set();\n        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                            !isBlocked(currentN, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\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                        if (isBlocked(iframe, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n                            return;\n                        }\n                        this.iframeManager.attachIframe(iframe, childSn);\n                        if (iframe.contentWindow) {\n                            this.canvasManager.addWindow(iframe.contentWindow);\n                        }\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.attributeMap = new WeakMap();\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            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, closestElementOfNode(m.target))\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.attributeMap.get(m.target);\n                    if (target.tagName === 'IFRAME' &&\n                        attributeName === 'src' &&\n                        !this.keepIframeSrcFn(value)) {\n                        const iframeDoc = getIFrameContentDocument(target);\n                        if (!iframeDoc) {\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                        this.attributeMap.set(m.target, 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                            if (!this.unattachedDoc) {\n                                try {\n                                    this.unattachedDoc =\n                                        document.implementation.createHTMLDocument();\n                                }\n                                catch (e) {\n                                    this.unattachedDoc = this.doc;\n                                }\n                            }\n                            const old = this.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    let node = n.parentNode;\n    while (node) {\n        const parentId = mirror.getId(node);\n        if (removes.some((r) => r.id === parentId)) {\n            return true;\n        }\n        node = node.parentNode;\n    }\n    return false;\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\nfunction _optionalChain$2(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\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 (e2) {\n    }\n    return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n    const mutationBuffer = new MutationBuffer();\n    mutationBuffers.push(mutationBuffer);\n    mutationBuffer.init(options);\n    let mutationObserverCtor = window.MutationObserver ||\n        window.__rrMutationObserver;\n    const angularZoneSymbol = _optionalChain$2([window, 'optionalAccess', _ => _.Zone, 'optionalAccess', _2 => _2.__symbol__, 'optionalCall', _3 => _3('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)({\n                type: MouseInteractions[thisEventKey],\n                id,\n                x: clientX,\n                y: clientY,\n                ...(pointerType !== null && { pointerType }),\n            });\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}\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, userTriggeredOnInput\n            ? { text, isChecked, userTriggered }\n            : { text, isChecked });\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, userTriggeredOnInput\n                        ? { text, isChecked: !isChecked, userTriggered: false }\n                        : { text, isChecked: !isChecked });\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)({\n                ...v,\n                id,\n            });\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    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        ? _optionalChain$2([host, 'access', _4 => _4.defaultView, 'optionalAccess', _5 => _5.Document])\n        : _optionalChain$2([host, 'access', _6 => _6.ownerDocument, 'optionalAccess', _7 => _7.defaultView, 'optionalAccess', _8 => _8.ShadowRoot]);\n    const originalPropertyDescriptor = _optionalChain$2([patchTarget, 'optionalAccess', _9 => _9.prototype])\n        ? Object.getOwnPropertyDescriptor(_optionalChain$2([patchTarget, 'optionalAccess', _10 => _10.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            return _optionalChain$2([originalPropertyDescriptor, 'access', _11 => _11.get, 'optionalAccess', _12 => _12.call, 'call', _13 => _13(this)]);\n        },\n        set(sheets) {\n            const result = _optionalChain$2([originalPropertyDescriptor, 'access', _14 => _14.set, 'optionalAccess', _15 => _15.call, 'call', _16 => _16(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            const [property, value, priority] = argumentsList;\n            if (ignoreCSSAttributes.has(property)) {\n                return setProperty.apply(thisArg, [property, value, priority]);\n            }\n            const { id, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, 'access', _17 => _17.parentRule, 'optionalAccess', _18 => _18.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            const [property] = argumentsList;\n            if (ignoreCSSAttributes.has(property)) {\n                return removeProperty.apply(thisArg, [property]);\n            }\n            const { id, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, 'access', _19 => _19.parentRule, 'optionalAccess', _20 => _20.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$1(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 && _optionalChain$2([selection, 'optionalAccess', _21 => _21.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    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 initObservers(o, _hooks = {}) {\n    const currentWindow = o.doc.defaultView;\n    if (!currentWindow) {\n        return () => {\n        };\n    }\n    let mutationObserver;\n    if (o.recordDOM) {\n        mutationObserver = initMutationObserver(o, o.doc);\n    }\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    let styleSheetObserver = () => { };\n    let adoptedStyleSheetObserver = () => { };\n    let styleDeclarationObserver = () => { };\n    let fontObserver = () => { };\n    if (o.recordDOM) {\n        styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\n        adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n        styleDeclarationObserver = initStyleDeclarationObserver(o, {\n            win: currentWindow,\n        });\n        if (o.collectFonts) {\n            fontObserver = 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        _optionalChain$2([mutationObserver, 'optionalAccess', _22 => _22.disconnect, 'call', _23 => _23()]);\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\nfunction _optionalChain$1(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }\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        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        _optionalChain$1([this, 'access', _ => _.loadListener, 'optionalCall', _2 => _2(iframeEl)]);\n        const iframeDoc = getIFrameContentDocument(iframeEl);\n        if (iframeDoc &&\n            iframeDoc.adoptedStyleSheets &&\n            iframeDoc.adoptedStyleSheets.length > 0)\n            this.stylesheetManager.adoptStyleSheets(iframeDoc.adoptedStyleSheets, this.mirror.getId(iframeDoc));\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        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                        _optionalChain$1([e, 'access', _3 => _3.data, 'access', _4 => _4.styles, 'optionalAccess', _5 => _5.forEach, 'call', _6 => _6((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$3.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        this.bypassOptions.canvasManager.addShadowRoot(shadowRoot);\n        const observer = initMutationObserver({\n            ...this.bypassOptions,\n            doc,\n            mutationCb: this.mutationCb,\n            mirror: this.mirror,\n            shadowDomManager: this,\n        }, shadowRoot);\n        this.restoreHandlers.push(() => observer.disconnect());\n        this.restoreHandlers.push(initScrollObserver({\n            ...this.bypassOptions,\n            scrollCb: this.scrollCb,\n            doc: shadowRoot,\n            mirror: this.mirror,\n        }));\n        setTimeout$1(() => {\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        const iframeDoc = getIFrameContentDocument(iframeElement);\n        const iframeWindow = getIFrameContentWindow(iframeElement);\n        if (!iframeDoc || !iframeWindow)\n            return;\n        this.patchAttachShadow(iframeWindow.Element, iframeDoc);\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        this.bypassOptions.canvasManager.resetShadowRoots();\n    }\n}\n\nclass CanvasManagerNoop {\n    reset() {\n    }\n    freeze() {\n    }\n    unfreeze() {\n    }\n    lock() {\n    }\n    unlock() {\n    }\n    snapshot() {\n    }\n    addWindow() {\n    }\n    addShadowRoot() {\n    }\n    resetShadowRoots() {\n    }\n}\n\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.active = false;\n    }\n    inOtherBuffer(node, thisBuffer) {\n        const buffers = this.nodeMap.get(node);\n        return (buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer));\n    }\n    add(node, buffer) {\n        if (!this.active) {\n            this.active = true;\n            onRequestAnimationFrame(() => {\n                this.nodeMap = new WeakMap();\n                this.active = false;\n            });\n        }\n        this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n    }\n    destroy() {\n    }\n}\n\nlet wrappedEmit;\nlet _takeFullSnapshot;\ntry {\n    if (Array.from([1], (x) => x * 2)[0] !== 2) {\n        const cleanFrame = document.createElement('iframe');\n        document.body.appendChild(cleanFrame);\n        Array.from = _optionalChain([cleanFrame, 'access', _ => _.contentWindow, 'optionalAccess', _2 => _2.Array, 'access', _3 => _3.from]) || Array.from;\n        document.body.removeChild(cleanFrame);\n    }\n}\ncatch (err) {\n    console.debug('Unable to override Array.from', err);\n}\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, maxCanvasSize = null, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordDOM = true, 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, getCanvasManager, } = 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 (!inEmittingFrame && !passEmitsToParent) {\n        return () => {\n        };\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 = (r, isCheckout) => {\n        const e = r;\n        e.timestamp = nowTimestamp();\n        if (_optionalChain([mutationBuffers, 'access', _4 => _4[0], 'optionalAccess', _5 => _5.isFrozen, 'call', _6 => _6()]) &&\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            _optionalChain([emit, 'optionalCall', _7 => _7(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                lastFullSnapshotEvent &&\n                e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n            if (exceedCount || exceedTime) {\n                takeFullSnapshot(true);\n            }\n        }\n    };\n    const wrappedMutationEmit = (m) => {\n        wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n                source: IncrementalSource.Mutation,\n                ...m,\n            },\n        });\n    };\n    const wrappedScrollEmit = (p) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n            source: IncrementalSource.Scroll,\n            ...p,\n        },\n    });\n    const wrappedCanvasMutationEmit = (p) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n            source: IncrementalSource.CanvasMutation,\n            ...p,\n        },\n    });\n    const wrappedAdoptedStyleSheetEmit = (a) => wrappedEmit({\n        type: EventType.IncrementalSnapshot,\n        data: {\n            source: IncrementalSource.AdoptedStyleSheet,\n            ...a,\n        },\n    });\n    const stylesheetManager = new StylesheetManager({\n        mutationCb: wrappedMutationEmit,\n        adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\n    });\n    const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__\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    const canvasManager = _getCanvasManager(getCanvasManager, {\n        mirror,\n        win: window,\n        mutationCb: (p) => wrappedEmit({\n            type: EventType.IncrementalSnapshot,\n            data: {\n                source: IncrementalSource.CanvasMutation,\n                ...p,\n            },\n        }),\n        recordCanvas,\n        blockClass,\n        blockSelector,\n        unblockSelector,\n        maxCanvasSize,\n        sampling: sampling['canvas'],\n        dataURLOptions,\n        errorHandler,\n    });\n    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    const takeFullSnapshot = (isCheckout = false) => {\n        if (!recordDOM) {\n            return;\n        }\n        wrappedEmit({\n            type: EventType.Meta,\n            data: {\n                href: window.location.href,\n                width: getWindowWidth(),\n                height: getWindowHeight(),\n            },\n        }, isCheckout);\n        stylesheetManager.reset();\n        shadowDomManager.init();\n        mutationBuffers.forEach((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                if (iframe.contentWindow) {\n                    canvasManager.addWindow(iframe.contentWindow);\n                }\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({\n            type: EventType.FullSnapshot,\n            data: {\n                node,\n                initialOffset: getWindowScroll(window),\n            },\n        });\n        mutationBuffers.forEach((buf) => buf.unlock());\n        if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n            stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\n    };\n    _takeFullSnapshot = takeFullSnapshot;\n    try {\n        const handlers = [];\n        const observe = (doc) => {\n            return callbackWrapper(initObservers)({\n                onMutation,\n                mutationCb: wrappedMutationEmit,\n                mousemoveCb: (positions, source) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source,\n                        positions,\n                    },\n                }),\n                mouseInteractionCb: (d) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.MouseInteraction,\n                        ...d,\n                    },\n                }),\n                scrollCb: wrappedScrollEmit,\n                viewportResizeCb: (d) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.ViewportResize,\n                        ...d,\n                    },\n                }),\n                inputCb: (v) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.Input,\n                        ...v,\n                    },\n                }),\n                mediaInteractionCb: (p) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.MediaInteraction,\n                        ...p,\n                    },\n                }),\n                styleSheetRuleCb: (r) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.StyleSheetRule,\n                        ...r,\n                    },\n                }),\n                styleDeclarationCb: (r) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.StyleDeclaration,\n                        ...r,\n                    },\n                }),\n                canvasMutationCb: wrappedCanvasMutationEmit,\n                fontCb: (p) => wrappedEmit({\n                    type: EventType.IncrementalSnapshot,\n                    data: {\n                        source: IncrementalSource.Font,\n                        ...p,\n                    },\n                }),\n                selectionCb: (p) => {\n                    wrappedEmit({\n                        type: EventType.IncrementalSnapshot,\n                        data: {\n                            source: IncrementalSource.Selection,\n                            ...p,\n                        },\n                    });\n                },\n                customElementCb: (c) => {\n                    wrappedEmit({\n                        type: EventType.IncrementalSnapshot,\n                        data: {\n                            source: IncrementalSource.CustomElement,\n                            ...c,\n                        },\n                    });\n                },\n                blockClass,\n                ignoreClass,\n                ignoreSelector,\n                maskAllText,\n                maskTextClass,\n                unmaskTextClass,\n                maskTextSelector,\n                unmaskTextSelector,\n                maskInputOptions,\n                inlineStylesheet,\n                sampling,\n                recordDOM,\n                recordCanvas,\n                inlineImages,\n                userTriggeredOnInput,\n                collectFonts,\n                doc,\n                maskAttributeFn,\n                maskInputFn,\n                maskTextFn,\n                keepIframeSrcFn,\n                blockSelector,\n                unblockSelector,\n                slimDOMOptions,\n                dataURLOptions,\n                mirror,\n                iframeManager,\n                stylesheetManager,\n                shadowDomManager,\n                processedNodeManager,\n                canvasManager,\n                ignoreCSSAttributes,\n                plugins: _optionalChain([plugins\n, 'optionalAccess', _8 => _8.filter, 'call', _9 => _9((p) => p.observer)\n, 'optionalAccess', _10 => _10.map, 'call', _11 => _11((p) => ({\n                    observer: p.observer,\n                    options: p.options,\n                    callback: (payload) => wrappedEmit({\n                        type: EventType.Plugin,\n                        data: {\n                            plugin: p.name,\n                            payload,\n                        },\n                    }),\n                }))]) || [],\n            }, {});\n        };\n        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        };\n        if (document.readyState === 'interactive' ||\n            document.readyState === 'complete') {\n            init();\n        }\n        else {\n            handlers.push(on('DOMContentLoaded', () => {\n                wrappedEmit({\n                    type: EventType.DomContentLoaded,\n                    data: {},\n                });\n                if (recordAfter === 'DOMContentLoaded')\n                    init();\n            }));\n            handlers.push(on('load', () => {\n                wrappedEmit({\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            _takeFullSnapshot = undefined;\n            unregisterErrorHandler();\n        };\n    }\n    catch (error) {\n        console.warn(error);\n    }\n}\nfunction takeFullSnapshot(isCheckout) {\n    if (!_takeFullSnapshot) {\n        throw new Error('please take full snapshot after start recording');\n    }\n    _takeFullSnapshot(isCheckout);\n}\nrecord.mirror = mirror;\nrecord.takeFullSnapshot = takeFullSnapshot;\nfunction _getCanvasManager(getCanvasManagerFn, options) {\n    try {\n        return getCanvasManagerFn\n            ? getCanvasManagerFn(options)\n            : new CanvasManagerNoop();\n    }\n    catch (e2) {\n        console.warn('Unable to initialize CanvasManager');\n        return new CanvasManagerNoop();\n    }\n}\n\nconst ReplayEventTypeIncrementalSnapshot = 3;\nconst ReplayEventTypeCustom = 5;\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    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n      // but maybe we should just keep them as milliseconds\n      timestamp: (breadcrumb.timestamp || 0) * 1000,\n      data: {\n        tag: 'breadcrumb',\n        // normalize to max. 10 depth and 1_000 properties per object\n        payload: normalize(breadcrumb, 10, 1000),\n      },\n    });\n\n    // Do not flush after console log messages\n    return breadcrumb.category === 'console';\n  });\n}\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/** Get the closest interactive parent element, or else return the given element. */\nfunction getClosestInteractive(element) {\n  const closestInteractive = element.closest(INTERACTIVE_SELECTOR);\n  return closestInteractive || element;\n}\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 <button><img></button>,\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  return getClosestInteractive(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/** Any IncrementalSource for rrweb that we interpret as a kind of mutation. */\nconst IncrementalMutationSources = new Set([\n  IncrementalSource.Mutation,\n  IncrementalSource.StyleSheetRule,\n  IncrementalSource.StyleDeclaration,\n  IncrementalSource.AdoptedStyleSheet,\n  IncrementalSource.CanvasMutation,\n  IncrementalSource.Selection,\n  IncrementalSource.MediaInteraction,\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._scrollTimeout = 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 cleanupWindowOpen = onWindowOpen(() => {\n      // Treat window.open as mutation\n      this._lastMutation = nowInSeconds();\n    });\n\n    this._teardown = () => {\n      cleanupWindowOpen();\n\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  /** @inheritDoc */\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  /** @inheritDoc */\n   registerMutation(timestamp = Date.now()) {\n    this._lastMutation = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n   registerScroll(timestamp = Date.now()) {\n    this._lastScroll = timestampToS(timestamp);\n  }\n\n  /** @inheritDoc */\n   registerClick(element) {\n    const node = getClosestInteractive(element);\n    this._handleMultiClick(node );\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._scrollTimeout;\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$3(() => 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 <input> 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 <a> 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/** Update the click detector based on a recording event of rrweb. */\nfunction updateClickDetectorForRecordingEvent(clickDetector, event) {\n  try {\n    // note: We only consider incremental snapshots here\n    // This means that any full snapshot is ignored for mutation detection - the reason is that we simply cannot know if a mutation happened here.\n    // E.g. think that we are buffering, an error happens and we take a full snapshot because we switched to session mode -\n    // in this scenario, we would not know if a dead click happened because of the error, which is a key dead click scenario.\n    // Instead, by ignoring full snapshots, we have the risk that we generate a false positive\n    // (if a mutation _did_ happen but was \"swallowed\" by the full snapshot)\n    // But this should be more unlikely as we'd generally capture the incremental snapshot right away\n\n    if (!isIncrementalEvent(event)) {\n      return;\n    }\n\n    const { source } = event.data;\n    if (IncrementalMutationSources.has(source)) {\n      clickDetector.registerMutation(event.timestamp);\n    }\n\n    if (source === IncrementalSource.Scroll) {\n      clickDetector.registerScroll(event.timestamp);\n    }\n\n    if (isIncrementalMouseInteraction(event)) {\n      const { type, id } = event.data;\n      const node = record.mirror.getNode(id);\n\n      if (node instanceof HTMLElement && type === MouseInteractions.Click) {\n        clickDetector.registerClick(node);\n      }\n    }\n  } catch (e) {\n    // ignore errors here, e.g. if accessing something that does not exist\n  }\n}\n\nfunction isIncrementalEvent(event) {\n  return event.type === ReplayEventTypeIncrementalSnapshot;\n}\n\nfunction isIncrementalMouseInteraction(\n  event,\n) {\n  return event.data.source === IncrementalSource.MouseInteraction;\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  'data-sentry-component',\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  if (!attributes['data-sentry-component'] && attributes['data-sentry-element']) {\n    attributes['data-sentry-component'] = attributes['data-sentry-element'];\n  }\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 ) : undefined;\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.target &&\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 }) || '<unknown>';\n  } catch (e) {\n    message = '<unknown>';\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 }) || '<unknown>';\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 * Handler creater for web vitals\n */\nfunction webVitalHandler(\n  getter,\n  replay,\n) {\n  return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric));\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  const entryType = ENTRY_TYPES[entry.entryType];\n  if (!entryType) {\n    return null;\n  }\n\n  return 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 a LCP metric.\n */\nfunction getLargestContentfulPaint(metric) {\n  const lastEntry = metric.entries[metric.entries.length - 1] ;\n  const node = lastEntry && lastEntry.element ? [lastEntry.element] : undefined;\n  return getWebVital(metric, 'largest-contentful-paint', node);\n}\n\nfunction isLayoutShift(entry) {\n  return (entry ).sources !== undefined;\n}\n\n/**\n * Add a CLS event to the replay based on a CLS metric.\n */\nfunction getCumulativeLayoutShift(metric) {\n  const layoutShifts = [];\n  const nodes = [];\n  for (const entry of metric.entries) {\n    if (isLayoutShift(entry)) {\n      const nodeIds = [];\n      for (const source of entry.sources) {\n        if (source.node) {\n          nodes.push(source.node);\n          const nodeId = record.mirror.getId(source.node);\n          if (nodeId) {\n            nodeIds.push(nodeId);\n          }\n        }\n      }\n      layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : undefined });\n    }\n  }\n\n  return getWebVital(metric, 'cumulative-layout-shift', nodes, layoutShifts);\n}\n\n/**\n * Add a FID event to the replay based on a FID metric.\n */\nfunction getFirstInputDelay(metric) {\n  const lastEntry = metric.entries[metric.entries.length - 1] ;\n  const node = lastEntry && lastEntry.target ? [lastEntry.target] : undefined;\n  return getWebVital(metric, 'first-input-delay', node);\n}\n\n/**\n * Add an INP event to the replay based on an INP metric.\n */\nfunction getInteractionToNextPaint(metric) {\n  const lastEntry = metric.entries[metric.entries.length - 1] ;\n  const node = lastEntry && lastEntry.target ? [lastEntry.target] : undefined;\n  return getWebVital(metric, 'interaction-to-next-paint', node);\n}\n\n/**\n * Add an web vital event to the replay based on the web vital metric.\n */\nfunction getWebVital(\n  metric,\n  name,\n  nodes,\n  attributions,\n) {\n  const value = metric.value;\n  const rating = metric.rating;\n\n  const end = getAbsoluteTime(value);\n\n  return {\n    type: 'web-vital',\n    name,\n    start: end,\n    end,\n    data: {\n      value,\n      size: value,\n      rating,\n      nodeIds: nodes ? nodes.map(node => record.mirror.getId(node)) : undefined,\n      attributions,\n    },\n  };\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(webVitalHandler(getLargestContentfulPaint, replay)),\n    addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)),\n    addFidInstrumentationHandler(webVitalHandler(getFirstInputDelay, replay)),\n    addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)),\n  );\n\n  // A callback to cleanup all handlers\n  return () => {\n    clearCallbacks.forEach(clearCallback => clearCallback());\n  };\n}\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nconst DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);\n\nconst r = `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if(\"function\"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J=\"undefined\"!=typeof TextEncoder&&new TextEncoder,K=\"undefined\"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const n=this._hasEvents?\",\":\"\";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push(\"]\",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push(\"[\")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener(\"message\",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&\"function\"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n\nfunction e(){const e=new Blob([r]);return URL.createObjectURL(e)}\n\nconst CONSOLE_LEVELS = ['info', 'warn', 'error', 'log'] ;\nconst PREFIX = '[Replay] ';\n\nfunction _addBreadcrumb(message, level = 'info') {\n  addBreadcrumb(\n    {\n      category: 'console',\n      data: {\n        logger: 'replay',\n      },\n      level,\n      message: `${PREFIX}${message}`,\n    },\n    { level },\n  );\n}\n\nfunction makeReplayLogger() {\n  let _capture = false;\n  let _trace = false;\n\n  const _logger = {\n    exception: () => undefined,\n    infoTick: () => undefined,\n    setConfig: (opts) => {\n      _capture = opts.captureExceptions;\n      _trace = opts.traceInternals;\n    },\n  };\n\n  if (DEBUG_BUILD) {\n    CONSOLE_LEVELS.forEach(name => {\n      _logger[name] = (...args) => {\n        logger$1[name](PREFIX, ...args);\n        if (_trace) {\n          _addBreadcrumb(args.join(''), severityLevelFromString(name));\n        }\n      };\n    });\n\n    _logger.exception = (error, ...message) => {\n      if (message.length && _logger.error) {\n        _logger.error(...message);\n      }\n\n      logger$1.error(PREFIX, error);\n\n      if (_capture) {\n        captureException(error);\n      } else if (_trace) {\n        // No need for a breadcrumb if `_capture` is enabled since it should be\n        // captured as an exception\n        _addBreadcrumb(error, 'error');\n      }\n    };\n\n    _logger.infoTick = (...args) => {\n      logger$1.info(PREFIX, ...args);\n      if (_trace) {\n        // Wait a tick here to avoid race conditions for some initial logs\n        // which may be added before replay is initialized\n        setTimeout(() => _addBreadcrumb(args[0]), 0);\n      }\n    };\n  } else {\n    CONSOLE_LEVELS.forEach(name => {\n      _logger[name] = () => undefined;\n    });\n  }\n\n  return _logger ;\n}\n\nconst logger = makeReplayLogger();\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  /** @inheritdoc */\n\n   constructor() {\n    this.events = [];\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = 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 occurred.\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    DEBUG_BUILD && logger.info('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          DEBUG_BUILD && logger.error('Error in compression worker: ', 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  /** @inheritdoc */\n\n   constructor(worker) {\n    this._worker = new WorkerHandler(worker);\n    this._earliestTimestamp = null;\n    this._totalSize = 0;\n    this.hasCheckout = false;\n    this.waitForCheckout = false;\n  }\n\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 occurred.\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 successfully received and processed by worker.\n   */\n   addEvent(event) {\n    const timestamp = timestampToMs(event.timestamp);\n    if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n      this._earliestTimestamp = timestamp;\n    }\n\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    this._worker.postMessage('clear').then(null, e => {\n      DEBUG_BUILD && logger.exception(e, 'Sending \"clear\" message to worker failed', e);\n    });\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 waitForCheckout() {\n    return this._used.waitForCheckout;\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  // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures\n   set waitForCheckout(value) {\n    this._used.waitForCheckout = 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      DEBUG_BUILD && logger.exception(error, '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, waitForCheckout } = 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    this._compression.waitForCheckout = waitForCheckout;\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\n      // Can now clear fallback buffer as it's no longer necessary\n      this._fallback.clear();\n    } catch (error) {\n      DEBUG_BUILD && logger.exception(error, 'Failed to add events when switching buffers.');\n    }\n  }\n}\n\n/**\n * Create an event buffer for replays.\n */\nfunction createEventBuffer({\n  useCompression,\n  workerUrl: customWorkerUrl,\n}) {\n  if (\n    useCompression &&\n    // eslint-disable-next-line no-restricted-globals\n    window.Worker\n  ) {\n    const worker = _loadWorker(customWorkerUrl);\n\n    if (worker) {\n      return worker;\n    }\n  }\n\n  DEBUG_BUILD && logger.info('Using simple buffer');\n  return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl) {\n  try {\n    const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n    if (!workerUrl) {\n      return;\n    }\n\n    DEBUG_BUILD && logger.info(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n    const worker = new Worker(workerUrl);\n    return new EventBufferProxy(worker);\n  } catch (error) {\n    DEBUG_BUILD && logger.exception(error, 'Failed to create compression worker');\n    // Fall back to use simple event buffer array\n  }\n}\n\nfunction _getWorkerUrl() {\n  if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n    return e();\n  }\n\n  return '';\n}\n\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 * 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 * 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 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() {\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    DEBUG_BUILD && logger.infoTick('Loading existing session');\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    sessionIdleExpire,\n    maxReplayDuration,\n    previousSessionId,\n  }\n\n,\n  sessionOptions,\n) {\n  const existingSession = sessionOptions.stickySession && fetchSession();\n\n  // No session exists yet, just create a new one\n  if (!existingSession) {\n    DEBUG_BUILD && logger.infoTick('Creating new session');\n    return createSession(sessionOptions, { previousSessionId });\n  }\n\n  if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n    return existingSession;\n  }\n\n  DEBUG_BUILD && logger.infoTick('Session in sessionStorage is expired, creating new one...');\n  return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nfunction isCustomEvent(event) {\n  return event.type === EventType.Custom;\n}\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  // This should never reject\n  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n  _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  const { eventBuffer } = replay;\n\n  if (!eventBuffer || (eventBuffer.waitForCheckout && !isCheckout)) {\n    return null;\n  }\n\n  const isBufferMode = replay.recordingMode === 'buffer';\n\n  try {\n    if (isCheckout && isBufferMode) {\n      eventBuffer.clear();\n    }\n\n    if (isCheckout) {\n      eventBuffer.hasCheckout = true;\n      eventBuffer.waitForCheckout = false;\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 eventBuffer.addEvent(eventAfterPossibleCallback);\n  } catch (error) {\n    const isExceeded = error && error instanceof EventBufferSizeExceededError;\n    const reason = isExceeded ? 'addEventSizeExceeded' : 'addEvent';\n\n    if (isExceeded && isBufferMode) {\n      // Clear buffer and wait for next checkout\n      eventBuffer.clear();\n      eventBuffer.waitForCheckout = true;\n\n      return null;\n    }\n\n    replay.handleException(error);\n\n    await replay.stop({ reason });\n\n    const client = 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    DEBUG_BUILD &&\n      logger.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`);\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    DEBUG_BUILD &&\n      logger.exception(error, 'An error occurred in the `beforeAddRecordingEvent` callback, skipping the event...');\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/** If the event is a feedback event */\nfunction isFeedbackEvent(event) {\n  return event.type === 'feedback';\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleAfterSendEvent(replay) {\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 (!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    return;\n  }\n\n  const { beforeErrorSampling } = replay.getOptions();\n  if (typeof beforeErrorSampling === 'function' && !beforeErrorSampling(event)) {\n    return;\n  }\n\n  setTimeout$3(async () => {\n    try {\n      // Capture current event buffer as new replay\n      await replay.sendBufferedReplayOrFlush();\n    } catch (err) {\n      replay.handleException(err);\n    }\n  });\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleBeforeSendEvent(replay) {\n  return (event) => {\n    if (!replay.isEnabled() || !isErrorEvent(event)) {\n      return;\n    }\n\n    handleHydrationError(replay, event);\n  };\n}\n\nfunction handleHydrationError(replay, event) {\n  const exceptionValue =\n    event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].value;\n  if (typeof exceptionValue !== 'string') {\n    return;\n  }\n\n  if (\n    // Only matches errors in production builds of react-dom\n    // Example https://reactjs.org/docs/error-decoder.html?invariant=423\n    // With newer React versions, the messages changed to a different website https://react.dev/errors/418\n    exceptionValue.match(\n      /(reactjs\\.org\\/docs\\/error-decoder\\.html\\?invariant=|react\\.dev\\/errors\\/)(418|419|422|423|425)/,\n    ) ||\n    // Development builds of react-dom\n    // Error 1: Hydration failed because the initial UI does not match what was rendered on the server.\n    // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match.\n    exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i)\n  ) {\n    const breadcrumb = createBreadcrumb({\n      category: 'replay.hydrate-error',\n      data: {\n        url: getLocationHref(),\n      },\n    });\n    addBreadcrumbEvent(replay, breadcrumb);\n  }\n}\n\n/**\n * Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.\n */\nfunction handleBreadcrumbs(replay) {\n  const client = getClient();\n\n  if (!client) {\n    return;\n  }\n\n  client.on('beforeAddBreadcrumb', breadcrumb => beforeAddBreadcrumb(replay, breadcrumb));\n}\n\nfunction beforeAddBreadcrumb(replay, breadcrumb) {\n  if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) {\n    return;\n  }\n\n  const result = normalizeBreadcrumb(breadcrumb);\n  if (result) {\n    addBreadcrumbEvent(replay, result);\n  }\n}\n\n/** Exported only for tests. */\nfunction normalizeBreadcrumb(breadcrumb) {\n  if (\n    !isBreadcrumbWithCategory(breadcrumb) ||\n    [\n      // fetch & xhr are handled separately,in handleNetworkBreadcrumbs\n      'fetch',\n      'xhr',\n      // These two are breadcrumbs for emitted sentry events, we don't care about them\n      'sentry.event',\n      'sentry.transaction',\n    ].includes(breadcrumb.category) ||\n    // We capture UI breadcrumbs separately\n    breadcrumb.category.startsWith('ui.')\n  ) {\n    return null;\n  }\n\n  if (breadcrumb.category === 'console') {\n    return normalizeConsoleBreadcrumb(breadcrumb);\n  }\n\n  return createBreadcrumb(breadcrumb);\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          isTruncated = true;\n          // We use the pretty printed JSON string here as a base\n          return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\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\nfunction isBreadcrumbWithCategory(breadcrumb) {\n  return !!breadcrumb.category;\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  return false;\n}\n\n/**\n * Reset the `replay_id` field on the DSC.\n */\nfunction resetReplayIdOnDynamicSamplingContext() {\n  // Reset DSC on the current scope, if there is one\n  const dsc = getCurrentScope().getPropagationContext().dsc;\n  if (dsc) {\n    delete dsc.replay_id;\n  }\n\n  // Clear it from frozen DSC on the active span\n  const activeSpan = getActiveSpan();\n  if (activeSpan) {\n    const dsc = getDynamicSamplingContextFromSpan(activeSpan);\n    delete (dsc ).replay_id;\n  }\n}\n\n/**\n * Add a feedback breadcrumb event to replay.\n */\nfunction addFeedbackBreadcrumb(replay, event) {\n  replay.triggerUserActivity();\n  replay.addUpdate(() => {\n    if (!event.timestamp) {\n      // Ignore events that don't have timestamps (this shouldn't happen, more of a typing issue)\n      // Return true here so that we don't flush\n      return true;\n    }\n\n    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    replay.throttledAddEvent({\n      type: EventType.Custom,\n      timestamp: event.timestamp * 1000,\n      data: {\n        tag: 'breadcrumb',\n        payload: {\n          timestamp: event.timestamp,\n          type: 'default',\n          category: 'sentry.feedback',\n          data: {\n            feedbackId: event.event_id,\n          },\n        },\n      },\n    } );\n\n    return false;\n  });\n}\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `handleGlobalEvent`, 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 `addEventProcessor(listener)`.\n */\nfunction handleGlobalEventListener(replay) {\n  return Object.assign(\n    (event, hint) => {\n      // Do nothing if replay has been disabled or paused\n      if (!replay.isEnabled() || replay.isPaused()) {\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, and feedbacks, nothing else\n      if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(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        // prevent exceeding replay durations by removing the expired replayId from the DSC\n        resetReplayIdOnDynamicSamplingContext();\n        return event;\n      }\n\n      if (isFeedbackEvent(event)) {\n        // This should never reject\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        replay.flush();\n        event.contexts.feedback.replay_id = replay.getSessionId();\n        // Add a replay breadcrumb for this piece of feedback\n        addFeedbackBreadcrumb(replay, event);\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        DEBUG_BUILD && logger.log('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      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 `addHistoryInstrumentationHandler(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 (DEBUG_BUILD && replay.getOptions()._experiments.traceInternals) {\n    return false;\n  }\n\n  return isSentryRequestUrl(url, getClient());\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/** Get the size of a body. */\nfunction getBodySize(body) {\n  if (!body) {\n    return undefined;\n  }\n\n  const textEncoder = new TextEncoder();\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  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof URLSearchParams) {\n      return [body.toString()];\n    }\n\n    if (body instanceof FormData) {\n      return [_serializeFormData(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && logger.exception(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && logger.info('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\n/** Merge a warning into an existing network request/response. */\nfunction mergeWarning(\n  info,\n  warning,\n) {\n  if (!info) {\n    return {\n      headers: {},\n      size: undefined,\n      _meta: {\n        warnings: [warning],\n      },\n    };\n  }\n\n  const newMeta = { ...info._meta };\n  const existingWarnings = newMeta.warnings || [];\n  newMeta.warnings = [...existingWarnings, warning];\n\n  info._meta = newMeta;\n  return info;\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 && 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.entries(headers).reduce((filteredHeaders, [key, value]) => {\n    const normalizedKey = key.toLowerCase();\n    // Avoid putting empty strings into the headers\n    if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n      filteredHeaders[normalizedKey] = value;\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    };\n  }\n\n  const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n  const isProbablyJson = _strIsProbablyJson(body);\n\n  if (exceedsSizeLimit) {\n    const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE);\n\n    if (isProbablyJson) {\n      return {\n        body: truncatedBody,\n        warnings: ['MAYBE_JSON_TRUNCATED'],\n      };\n    }\n\n    return {\n      body: `${truncatedBody}…`,\n      warnings: ['TEXT_TRUNCATED'],\n    };\n  }\n\n  if (isProbablyJson) {\n    try {\n      const jsonBody = JSON.parse(body);\n      return {\n        body: jsonBody,\n      };\n    } catch (e2) {\n      // fall back to just send the body as string\n    }\n  }\n\n  return {\n    body,\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 appropriate).\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    DEBUG_BUILD && logger.exception(error, 'Failed to capture fetch breadcrumb');\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) {\n  const { input, response } = hint;\n\n  const body = input ? _getFetchRequestArgBody(input) : undefined;\n  const reqSize = getBodySize(body);\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  const now = Date.now();\n  const { startTimestamp = now, endTimestamp = now } = 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 = input ? 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, warning] = getBodyString(requestBody);\n  const data = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n\n  if (warning) {\n    return mergeWarning(data, warning);\n  }\n\n  return data;\n}\n\n/** Exported only for tests. */\nasync function _getResponseInfo(\n  captureDetails,\n  {\n    networkCaptureBodies,\n    networkResponseHeaders,\n  },\n  response,\n  responseBodySize,\n) {\n  if (!captureDetails && responseBodySize !== undefined) {\n    return buildSkippedNetworkRequestOrResponse(responseBodySize);\n  }\n\n  const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {};\n\n  if (!response || (!networkCaptureBodies && responseBodySize !== undefined)) {\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n\n  const [bodyText, warning] = await _parseFetchResponseBody(response);\n  const result = getResponseData(bodyText, {\n    networkCaptureBodies,\n\n    responseBodySize,\n    captureDetails,\n    headers,\n  });\n\n  if (warning) {\n    return mergeWarning(result, warning);\n  }\n\n  return result;\n}\n\nfunction getResponseData(\n  bodyText,\n  {\n    networkCaptureBodies,\n    responseBodySize,\n    captureDetails,\n    headers,\n  }\n\n,\n) {\n  try {\n    const size =\n      bodyText && bodyText.length && responseBodySize === undefined ? getBodySize(bodyText) : responseBodySize;\n\n    if (!captureDetails) {\n      return buildSkippedNetworkRequestOrResponse(size);\n    }\n\n    if (networkCaptureBodies) {\n      return buildNetworkRequestOrResponse(headers, size, bodyText);\n    }\n\n    return buildNetworkRequestOrResponse(headers, size, undefined);\n  } catch (error) {\n    DEBUG_BUILD && logger.exception(error, 'Failed to serialize response body');\n    // fallback\n    return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n  }\n}\n\nasync function _parseFetchResponseBody(response) {\n  const res = _tryCloneResponse(response);\n\n  if (!res) {\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  try {\n    const text = await _tryGetResponseText(res);\n    return [text];\n  } catch (error) {\n    if (error instanceof Error && error.message.indexOf('Timeout') > -1) {\n      DEBUG_BUILD && logger.warn('Parsing text body from response timed out');\n      return [undefined, 'BODY_PARSE_TIMEOUT'];\n    }\n\n    DEBUG_BUILD && logger.exception(error, 'Failed to get text body from response');\n    return [undefined, 'BODY_PARSE_ERROR'];\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\nfunction _tryCloneResponse(response) {\n  try {\n    // We have to clone this, as the body can only be read once\n    return response.clone();\n  } catch (error) {\n    // this can throw if the response was already consumed before\n    DEBUG_BUILD && logger.exception(error, 'Failed to clone response body');\n  }\n}\n\n/**\n * Get the response body of a fetch request, or timeout after 500ms.\n * Fetch can return a streaming body, that may not resolve (or not for a long time).\n * If that happens, we rather abort after a short time than keep waiting for this.\n */\nfunction _tryGetResponseText(response) {\n  return new Promise((resolve, reject) => {\n    const timeout = setTimeout$3(() => reject(new Error('Timeout while trying to read response body')), 500);\n\n    _getResponseText(response)\n      .then(\n        txt => resolve(txt),\n        reason => reject(reason),\n      )\n      .finally(() => clearTimeout(timeout));\n  });\n}\n\nasync function _getResponseText(response) {\n  // Force this to be a promise, just to be safe\n  // eslint-disable-next-line no-return-await\n  return await response.text();\n}\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where appropriate).\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    DEBUG_BUILD && logger.exception(error, 'Failed to capture xhr breadcrumb');\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) {\n  const { xhr, input } = hint;\n\n  if (!xhr) {\n    return;\n  }\n\n  const reqSize = getBodySize(input);\n  const resSize = xhr.getResponseHeader('content-length')\n    ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n    : _getBodySize(xhr.response, xhr.responseType);\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 now = Date.now();\n  const { startTimestamp = now, endTimestamp = now, 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 (!xhr || !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 [requestBody, requestWarning] = options.networkCaptureBodies ? getBodyString(input) : [undefined];\n  const [responseBody, responseWarning] = options.networkCaptureBodies ? _getXhrResponseBody(xhr) : [undefined];\n\n  const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody);\n  const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody);\n\n  return {\n    startTimestamp,\n    endTimestamp,\n    url,\n    method,\n    statusCode,\n    request: requestWarning ? mergeWarning(request, requestWarning) : request,\n    response: responseWarning ? mergeWarning(response, responseWarning) : response,\n  };\n}\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    if (value) {\n      acc[key.toLowerCase()] = value;\n    }\n    return acc;\n  }, {});\n}\n\nfunction _getXhrResponseBody(xhr) {\n  // We collect errors that happen, but only log them if we can't get any response body\n  const errors = [];\n\n  try {\n    return [xhr.responseText];\n  } catch (e) {\n    errors.push(e);\n  }\n\n  // Try to manually parse the response body, if responseText fails\n  try {\n    return _parseXhrResponse(xhr.response, xhr.responseType);\n  } catch (e) {\n    errors.push(e);\n  }\n\n  DEBUG_BUILD && logger.warn('Failed to get xhr response body', ...errors);\n\n  return [undefined];\n}\n\n/**\n * Get the string representation of the XHR response.\n * Based on MDN, these are the possible types of the response:\n * string\n * ArrayBuffer\n * Blob\n * Document\n * POJO\n *\n * Exported only for tests.\n */\nfunction _parseXhrResponse(\n  body,\n  responseType,\n) {\n  try {\n    if (typeof body === 'string') {\n      return [body];\n    }\n\n    if (body instanceof Document) {\n      return [body.body.outerHTML];\n    }\n\n    if (responseType === 'json' && body && typeof body === 'object') {\n      return [JSON.stringify(body)];\n    }\n\n    if (!body) {\n      return [undefined];\n    }\n  } catch (error) {\n    DEBUG_BUILD && logger.exception(error, 'Failed to serialize body', body);\n    return [undefined, 'BODY_PARSE_ERROR'];\n  }\n\n  DEBUG_BUILD && logger.info('Skipping network body because of body type', body);\n\n  return [undefined, 'UNPARSEABLE_BODY_TYPE'];\n}\n\nfunction _getBodySize(\n  body,\n  responseType,\n) {\n  try {\n    const bodyStr = responseType === 'json' && body && typeof body === 'object' ? JSON.stringify(body) : body;\n    return getBodySize(bodyStr);\n  } catch (e2) {\n    return undefined;\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 = getClient();\n\n  try {\n    const {\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    } = replay.getOptions();\n\n    const options = {\n      replay,\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders,\n      networkResponseHeaders,\n    };\n\n    if (client) {\n      client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\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);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n\n    if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n      // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n      // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n      // So any async mutations to it will not be reflected in the final breadcrumb\n      enrichFetchBreadcrumb(breadcrumb, hint);\n\n      // This call should not reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n    }\n  } catch (e) {\n    DEBUG_BUILD && logger.exception(e, '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\n/**\n * Add global listeners that cannot be removed.\n */\nfunction addGlobalListeners(replay) {\n  // Listeners from core SDK //\n  const client = getClient();\n\n  addClickKeypressInstrumentationHandler(handleDomListener(replay));\n  addHistoryInstrumentationHandler(handleHistorySpanListener(replay));\n  handleBreadcrumbs(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);\n  addEventProcessor(eventProcessor);\n\n  // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n  if (client) {\n    client.on('beforeSendEvent', handleBeforeSendEvent(replay));\n    client.on('afterSendEvent', handleAfterSendEvent(replay));\n    client.on('createDsc', (dsc) => {\n      const replayId = replay.getSessionId();\n      // 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        // Ensure to check that the session is still active - it could have expired in the meanwhile\n        const isSessionActive = replay.checkAndHandleExpiredSession();\n        if (isSessionActive) {\n          dsc.replay_id = replayId;\n        }\n      }\n    });\n\n    client.on('spanStart', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We may be missing the initial spanStart due to timing issues,\n    // so we capture it on finish again.\n    client.on('spanEnd', span => {\n      replay.lastActiveSpan = span;\n    });\n\n    // We want to flush replay\n    client.on('beforeSendFeedback', (feedbackEvent, options) => {\n      const replayId = replay.getSessionId();\n      if (options && options.includeReplay && replay.isEnabled() && replayId) {\n        // This should never reject\n        if (feedbackEvent.contexts && feedbackEvent.contexts.feedback) {\n          feedbackEvent.contexts.feedback.replay_id = replayId;\n        }\n      }\n    });\n  }\n}\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$3(invokeFunc, wait);\n\n    if (maxWait && maxTimerId === undefined) {\n      maxTimerId = setTimeout$3(invokeFunc, maxWait);\n    }\n\n    return callbackReturnValue;\n  }\n\n  debounced.cancel = cancelTimers;\n  debounced.flush = flush;\n  return debounced;\n}\n\nconst NAVIGATOR = GLOBAL_OBJ.navigator;\n\n/**\n *  Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread\n *  https://github.com/getsentry/sentry-javascript/issues/14534\n */\nfunction getRecordingSamplingOptions() {\n  if (\n    /iPhone|iPad|iPod/i.test((NAVIGATOR && NAVIGATOR.userAgent) || '') ||\n    (/Macintosh/i.test((NAVIGATOR && NAVIGATOR.userAgent) || '') &&\n      NAVIGATOR &&\n      NAVIGATOR.maxTouchPoints &&\n      NAVIGATOR.maxTouchPoints > 1)\n  ) {\n    return {\n      sampling: {\n        mousemove: false,\n      },\n    };\n  }\n\n  return {};\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      DEBUG_BUILD && logger.warn('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    if (replay.clickDetector) {\n      updateClickDetectorForRecordingEvent(replay.clickDetector, event);\n    }\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      const session = replay.session;\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. We have an experimental mode\n      // to perform multiple checkouts a session (the idea is to improve\n      // seeking during playback), so also only include if segmentId is 0\n      // (handled in `addSettingsEvent`).\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      // 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' && session && replay.eventBuffer) {\n        const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n        if (earliestEvent) {\n          DEBUG_BUILD &&\n            logger.info(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`);\n\n          session.started = earliestEvent;\n\n          if (replay.getOptions().stickySession) {\n            saveSession(session);\n          }\n        }\n      }\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 (session && session.previousSessionId) {\n        return true;\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\n        // This should never reject\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        void replay.flush();\n      }\n\n      return true;\n    });\n  };\n}\n\n/**\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        shouldRecordCanvas: replay.isRecordingCanvas(),\n        sessionSampleRate: options.sessionSampleRate,\n        errorSampleRate: options.errorSampleRate,\n        useCompressionOption: options.useCompression,\n        blockAllMedia: options.blockAllMedia,\n        maskAllText: options.maskAllText,\n        maskAllInputs: options.maskAllInputs,\n        useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n        networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n        networkCaptureBodies: options.networkCaptureBodies,\n        networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n        networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n      },\n    },\n  };\n}\n\n/**\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  client.emit('preprocessEvent', event, eventHint);\n\n  const preparedEvent = (await prepareEvent(\n    client.getOptions(),\n    event,\n    eventHint,\n    scope,\n    client,\n    getIsolationScope(),\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();\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 client = getClient();\n  const scope = getCurrentScope();\n  const transport = client && client.getTransport();\n  const dsn = client && client.getDsn();\n\n  if (!client || !transport || !dsn || !session.sampled) {\n    return resolvedSyncPromise({});\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    DEBUG_BUILD && logger.info('An event processor returned `null`, will not send event.');\n    return resolvedSyncPromise({});\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  // 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  const rateLimits = updateRateLimits({}, response);\n  if (isRateLimited(rateLimits, 'replay')) {\n    throw new RateLimitError(rateLimits);\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 * This error indicates that we hit a rate limit API error.\n */\nclass RateLimitError extends Error {\n\n   constructor(rateLimits) {\n    super('Rate limit hit');\n    this.rateLimits = rateLimits;\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, onError } = 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 || err instanceof RateLimitError) {\n      throw err;\n    }\n\n    // Capture error for every failed replay\n    setContext('Replays', {\n      _retryCount: retryConfig.count,\n    });\n\n    if (onError) {\n      onError(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$3(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 two 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 span.\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  /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */\n\n  /**\n   * Options to pass to `rrweb.record()`\n   */\n\n  /**\n   * Timestamp of the last user activity. This lives across sessions.\n   */\n\n  /**\n   * Is the integration currently active?\n   */\n\n  /**\n   * Paused is a state where:\n   * - DOM Recording is not listening at all\n   * - Nothing will be added to event buffer (e.g. core SDK events)\n   */\n\n  /**\n   * Have we attached listeners to the core SDK?\n   * Note we have to track this as there is no way to remove instrumentation handlers.\n   */\n\n  /**\n   * Function to stop recording\n   */\n\n  /**\n   * Internal use for canvas recording options\n   */\n\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._requiresManualStart = 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    // Configure replay logger w/ experimental options\n    if (DEBUG_BUILD) {\n      const experiments = options._experiments;\n      logger.setConfig({\n        captureExceptions: !!experiments.captureExceptions,\n        traceInternals: !!experiments.traceInternals,\n      });\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  /**\n   * Determine if canvas recording is enabled\n   */\n   isRecordingCanvas() {\n    return Boolean(this._canvas);\n  }\n\n  /** Get the replay integration options. */\n   getOptions() {\n    return this._options;\n  }\n\n  /** A wrapper to conditionally capture exceptions. */\n   handleException(error) {\n    DEBUG_BUILD && logger.exception(error);\n    if (this._options.onError) {\n      this._options.onError(error);\n    }\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    const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0;\n\n    this._requiresManualStart = requiresManualStart;\n\n    if (requiresManualStart) {\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      DEBUG_BUILD && logger.exception(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    DEBUG_BUILD && logger.infoTick(`Starting replay in ${this.recordingMode} mode`);\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 log a message if replay is already in progress.\n   *\n   * Creates or loads a session, attaches listeners to varying events (DOM,\n   * _performanceObserver, Recording, Sentry SDK, etc)\n   */\n   start() {\n    if (this._isEnabled && this.recordingMode === 'session') {\n      DEBUG_BUILD && logger.info('Recording is already in progress');\n      return;\n    }\n\n    if (this._isEnabled && this.recordingMode === 'buffer') {\n      DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && logger.infoTick('Starting replay in session mode');\n\n    // Required as user activity is initially set in\n    // constructor, so if `start()` is called after\n    // session idle expiration, a replay will not be\n    // created due to an idle timeout.\n    this._updateUserActivity();\n\n    const session = loadOrCreateSession(\n      {\n        maxReplayDuration: this._options.maxReplayDuration,\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n      },\n      {\n        stickySession: this._options.stickySession,\n        // This is intentional: create a new session-based replay when calling `start()`\n        sessionSampleRate: 1,\n        allowBuffering: false,\n      },\n    );\n\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      DEBUG_BUILD && logger.info('Buffering is in progress, call `flush()` to save the replay');\n      return;\n    }\n\n    DEBUG_BUILD && logger.infoTick('Starting replay in buffer mode');\n\n    const session = loadOrCreateSession(\n      {\n        sessionIdleExpire: this.timeouts.sessionIdleExpire,\n        maxReplayDuration: this._options.maxReplayDuration,\n      },\n      {\n        stickySession: this._options.stickySession,\n        sessionSampleRate: 0,\n        allowBuffering: true,\n      },\n    );\n\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      const canvasOptions = this._canvas;\n\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'\n          ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME }\n          : // Otherwise, use experimental option w/ min checkout time of 6 minutes\n            // This is to improve playback seeking as there could potentially be\n            // less mutations to process in the worse cases.\n            //\n            // checkout by \"N\" events is probably ideal, but means we have less\n            // control about the number of checkouts we make (which generally\n            // increases replay size)\n            this._options._experiments.continuousCheckout && {\n              // Minimum checkout time is 6 minutes\n              checkoutEveryNms: Math.max(360000, this._options._experiments.continuousCheckout),\n            }),\n        emit: getHandleRecordingEmit(this),\n        ...getRecordingSamplingOptions(),\n        onMutation: this._onMutationHandler,\n        ...(canvasOptions\n          ? {\n              recordCanvas: canvasOptions.recordCanvas,\n              getCanvasManager: canvasOptions.getCanvasManager,\n              sampling: canvasOptions.sampling,\n              dataURLOptions: canvasOptions.dataURLOptions,\n            }\n          : {}),\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      DEBUG_BUILD && logger.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ''}`);\n\n      resetReplayIdOnDynamicSamplingContext();\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    DEBUG_BUILD && logger.info('Pausing replay');\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    DEBUG_BUILD && logger.info('Resuming replay');\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    DEBUG_BUILD && logger.info('Converting buffer to session');\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   * `<flushMinDelay>` milliseconds have elapsed since the last event\n   * *OR* if `<flushMaxDelay>` 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 multiple 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 session (=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 lastActiveSpan = this.lastActiveSpan || getActiveSpan();\n    const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan);\n\n    const attributes = (lastRootSpan && spanToJSON(lastRootSpan).data) || {};\n    const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n    if (!lastRootSpan || !source || !['route', 'custom'].includes(source)) {\n      return undefined;\n    }\n\n    return spanToJSON(lastRootSpan).description;\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      workerUrl: this._options.workerUrl,\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  /**\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        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      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      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    // This should never reject\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\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      DEBUG_BUILD && logger.info('Document has become active, but session has expired');\n      return;\n    }\n\n    if (breadcrumb) {\n      this._createCustomBreadcrumb(breadcrumb);\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      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.throttledAddEvent({\n        type: EventType.Custom,\n        timestamp: breadcrumb.timestamp || 0,\n        data: {\n          tag: 'breadcrumb',\n          payload: breadcrumb,\n        },\n      });\n    });\n  }\n\n  /**\n   * Observed performance events are added to `this.performanceEntries`. These\n   * are included in the replay event before it is finished and sent to Sentry.\n   */\n   _addPerformanceEntries() {\n    let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n    this.performanceEntries = [];\n    this.replayPerformanceEntries = [];\n\n    // If we are manually starting, we want to ensure we only include performance entries\n    // that are after the initial timestamp\n    // The reason for this is that we may have performance entries from the page load, but may decide to start\n    // the replay later on, in which case we do not want to include these entries.\n    // without this, manually started replays can have events long before the actual replay recording starts,\n    // which messes with the timeline etc.\n    if (this._requiresManualStart) {\n      const initialTimestampInSeconds = this._context.initialTimestamp / 1000;\n      performanceEntries = performanceEntries.filter(entry => entry.start >= initialTimestampInSeconds);\n    }\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 replay was started manually (=no sample rate was given),\n    // We do not want to back-port the initial timestamp\n    if (!session || !eventBuffer || this._requiresManualStart) {\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      DEBUG_BUILD && logger.error('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 accommodate 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        timestamp,\n        onError: err => this.handleException(err),\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      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stop({ reason: 'sendReplay' });\n\n      const client = getClient();\n\n      if (client) {\n        const dropReason = err instanceof RateLimitError ? 'ratelimit_backoff' : 'send_error';\n        client.recordDroppedEvent(dropReason, '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      DEBUG_BUILD && logger.error('Attempting to finish replay event after session expired.');\n      return;\n    }\n\n    if (!this.session) {\n      // should never happen, as we would have bailed out before\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      DEBUG_BUILD &&\n        logger.info(\n          `Session duration (${Math.floor(duration / 1000)}s) is too ${\n            tooShort ? 'short' : 'long'\n          }, not sending replay.`,\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      DEBUG_BUILD && logger.info('Flushing initial segment without checkout.');\n      // TODO FN: Evaluate if we want to stop here, or remove this again?\n    }\n\n    const _flushInProgress = !!this._flushLock;\n\n    // this._flushLock acts as a lock so that future calls to `_flush()` will\n    // be blocked until current flush is finished (i.e. this promise resolves)\n    if (!this._flushLock) {\n      this._flushLock = this._runFlush();\n    }\n\n    try {\n      await this._flushLock;\n    } catch (err) {\n      this.handleException(err);\n    } finally {\n      this._flushLock = undefined;\n\n      if (_flushInProgress) {\n        // Wait for previous flush to finish, then call the debounced\n        // `_flush()`. It's possible there are other flush requests queued and\n        // waiting for it to resolve. We want to reduce all outstanding\n        // requests (as well as any new flush requests that occur within a\n        // second of the locked flush completing) into a single flush.\n        this._debouncedFlush();\n      }\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      // This should never reject\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      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(selectors, defaultSelectors) {\n  return [\n    ...selectors,\n    // sentry defaults\n    ...defaultSelectors,\n  ].join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nfunction getPrivacyOptions({ mask, unmask, block, unblock, ignore }) {\n  const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])'];\n\n  const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']);\n  const unmaskSelector = getOption(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(block, ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements]),\n    unblockSelector: getOption(unblock, []),\n    ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]']),\n  };\n\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 precedence\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 `<input>` 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 * Sentry integration for [Session Replay](https://sentry.io/for/session-replay/).\n *\n * See the [Replay documentation](https://docs.sentry.io/platforms/javascript/guides/session-replay/) for more information.\n *\n * @example\n *\n * ```\n * Sentry.init({\n *   dsn: '__DSN__',\n *   integrations: [Sentry.replayIntegration()],\n * });\n * ```\n */\nconst replayIntegration = ((options) => {\n  return new Replay(options);\n}) ;\n\n/**\n * Replay integration\n *\n * TODO: Rewrite this to be functional integration\n * Exported for tests.\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    workerUrl,\n    _experiments = {},\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    beforeErrorSampling,\n    onError,\n  } = {}) {\n    this.name = Replay.id;\n\n    const privacyOptions = getPrivacyOptions({\n      mask,\n      unmask,\n      block,\n      unblock,\n      ignore,\n    });\n\n    this._recordingOptions = {\n      maskAllInputs,\n      maskAllText,\n      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      useCompression,\n      workerUrl,\n      blockAllMedia,\n      maskAllInputs,\n      maskAllText,\n      mutationBreadcrumbLimit,\n      mutationLimit,\n      slowClickTimeout,\n      slowClickIgnoreSelectors,\n      networkDetailAllowUrls,\n      networkDetailDenyUrls,\n      networkCaptureBodies,\n      networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n      networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n      beforeAddRecordingEvent,\n      beforeErrorSampling,\n      onError,\n\n      _experiments,\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   afterAllSetup(client) {\n    if (!isBrowser() || this._replay) {\n      return;\n    }\n\n    this._setup(client);\n    this._initialize(client);\n  }\n\n  /**\n   * Start a replay regardless of sampling rate. Calling this will always\n   * create a new session. Will log a message if replay is already in progress.\n   *\n   * Creates or loads a session, attaches listeners to varying events (DOM,\n   * PerformanceObserver, Recording, Sentry SDK, etc)\n   */\n   start() {\n    if (!this._replay) {\n      return;\n    }\n    this._replay.start();\n  }\n\n  /**\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   * If replay is not enabled, a new session replay is started.\n   * Unless `continueRecording` is false, the replay will continue to record and\n   * behave as a \"session\"-based replay.\n   *\n   * Otherwise, queue up a flush.\n   */\n   flush(options) {\n    if (!this._replay) {\n      return Promise.resolve();\n    }\n\n    // assuming a session should be recorded in this case\n    if (!this._replay.isEnabled()) {\n      this._replay.start();\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  /**\n   * Get the current recording mode. This can be either `session` or `buffer`.\n   *\n   * `session`: Recording the whole session, sending it continuously\n   * `buffer`: Always keeping the last 60s of recording, requires:\n   *   - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n   *   - or calling `flush()` to send the replay\n   */\n   getRecordingMode() {\n    if (!this._replay || !this._replay.isEnabled()) {\n      return;\n    }\n\n    return this._replay.recordingMode;\n  }\n\n  /**\n   * Initializes replay.\n   */\n   _initialize(client) {\n    if (!this._replay) {\n      return;\n    }\n\n    this._maybeLoadFromReplayCanvasIntegration(client);\n    this._replay.initializeSampling();\n  }\n\n  /** Setup the integration. */\n   _setup(client) {\n    // Client is not available in constructor, so we need to wait until setupOnce\n    const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client);\n\n    this._replay = new ReplayContainer({\n      options: finalOptions,\n      recordingOptions: this._recordingOptions,\n    });\n  }\n\n  /** Get canvas options from ReplayCanvas integration, if it is also added. */\n   _maybeLoadFromReplayCanvasIntegration(client) {\n    // To save bundle size, we skip checking for stuff here\n    // and instead just try-catch everything - as generally this should all be defined\n    /* eslint-disable @typescript-eslint/no-non-null-assertion */\n    try {\n      const canvasIntegration = client.getIntegrationByName('ReplayCanvas')\n\n;\n      if (!canvasIntegration) {\n        return;\n      }\n\n      this._replay['_canvas'] = canvasIntegration.getOptions();\n    } catch (e) {\n      // ignore errors here\n    }\n    /* eslint-enable @typescript-eslint/no-non-null-assertion */\n  }\n}Replay.__initStatic();\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions, client) {\n  const opt = client.getOptions() ;\n\n  const finalOptions = {\n    sessionSampleRate: 0,\n    errorSampleRate: 0,\n    ...dropUndefinedKeys(initialOptions),\n  };\n\n  const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate);\n  const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate);\n\n  if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) {\n    consoleSandbox(() => {\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\n  if (replaysSessionSampleRate != null) {\n    finalOptions.sessionSampleRate = replaysSessionSampleRate;\n  }\n\n  if (replaysOnErrorSampleRate != null) {\n    finalOptions.errorSampleRate = replaysOnErrorSampleRate;\n  }\n\n  return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n  return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n\n/**\n * This is a small utility to get a type-safe instance of the Replay integration.\n */\nfunction getReplay() {\n  const client = getClient();\n  return client && client.getIntegrationByName('Replay');\n}\n\nexport { getReplay, replayIntegration };\n//# sourceMappingURL=index.js.map\n","import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, extractNetworkProtocol, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils';\nimport { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasTracingEnabled, setHttpStatus, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getTraceData, stringMatchesSomePattern } from '@sentry/core';\nimport { WINDOW } from '../helpers.js';\n\n/** Options for Request Instrumentation */\n\nconst responseToSpanId = new WeakMap();\nconst spanIdToEndTimestamp = new Map();\n\nconst defaultRequestInstrumentationOptions = {\n  traceFetch: true,\n  traceXHR: true,\n  enableHTTPTimings: true,\n  trackFetchStreamPerformance: false,\n};\n\n/** Registers span creators for xhr and fetch requests  */\nfunction instrumentOutgoingRequests(client, _options) {\n  const {\n    traceFetch,\n    traceXHR,\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    tracePropagationTargets,\n  } = {\n    traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n    traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n    trackFetchStreamPerformance: defaultRequestInstrumentationOptions.trackFetchStreamPerformance,\n    ..._options,\n  };\n\n  const shouldCreateSpan =\n    typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n  const shouldAttachHeadersWithTargets = (url) => shouldAttachHeaders(url, tracePropagationTargets);\n\n  const spans = {};\n\n  if (traceFetch) {\n    // Keeping track of http requests, whose body payloads resolved later than the initial resolved request\n    // e.g. streaming using server sent events (SSE)\n    client.addEventProcessor(event => {\n      if (event.type === 'transaction' && event.spans) {\n        event.spans.forEach(span => {\n          if (span.op === 'http.client') {\n            const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id);\n            if (updatedTimestamp) {\n              span.timestamp = updatedTimestamp / 1000;\n              spanIdToEndTimestamp.delete(span.span_id);\n            }\n          }\n        });\n      }\n      return event;\n    });\n\n    if (trackFetchStreamPerformance) {\n      addFetchEndInstrumentationHandler(handlerData => {\n        if (handlerData.response) {\n          const span = responseToSpanId.get(handlerData.response);\n          if (span && handlerData.endTimestamp) {\n            spanIdToEndTimestamp.set(span, handlerData.endTimestamp);\n          }\n        }\n      });\n    }\n\n    addFetchInstrumentationHandler(handlerData => {\n      const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n\n      if (handlerData.response && handlerData.fetchData.__span) {\n        responseToSpanId.set(handlerData.response, handlerData.fetchData.__span);\n      }\n\n      // We cannot use `window.location` in the generic fetch instrumentation,\n      // but we need it for reliable `server.address` attribute.\n      // so we extend this in here\n      if (createdSpan) {\n        const fullUrl = getFullURL(handlerData.fetchData.url);\n        const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n        createdSpan.setAttributes({\n          'http.url': fullUrl,\n          'server.address': host,\n        });\n      }\n\n      if (enableHTTPTimings && createdSpan) {\n        addHTTPTimings(createdSpan);\n      }\n    });\n  }\n\n  if (traceXHR) {\n    addXhrInstrumentationHandler(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 } = spanToJSON(span).data || {};\n\n  if (!url || typeof url !== 'string') {\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.setAttribute(...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\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 * We only export this function for testing purposes.\n */\nfunction shouldAttachHeaders(\n  targetUrl,\n  tracePropagationTargets,\n) {\n  // window.location.href not being defined is an edge case in the browser but we need to handle it.\n  // Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj\n  const href = WINDOW.location && WINDOW.location.href;\n\n  if (!href) {\n    // If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`\n    // BIG DISCLAIMER: Users can call URLs with a double slash (fetch(\"//example.com/api\")), this is a shorthand for \"send to the same protocol\",\n    // so we need a to exclude those requests, because they might be cross origin.\n    const isRelativeSameOriginRequest = !!targetUrl.match(/^\\/(?!\\/)/);\n    if (!tracePropagationTargets) {\n      return isRelativeSameOriginRequest;\n    } else {\n      return stringMatchesSomePattern(targetUrl, tracePropagationTargets);\n    }\n  } else {\n    let resolvedUrl;\n    let currentOrigin;\n\n    // URL parsing may fail, we default to not attaching trace headers in that case.\n    try {\n      resolvedUrl = new URL(targetUrl, href);\n      currentOrigin = new URL(href).origin;\n    } catch (e) {\n      return false;\n    }\n\n    const isSameOriginRequest = resolvedUrl.origin === currentOrigin;\n    if (!tracePropagationTargets) {\n      return isSameOriginRequest;\n    } else {\n      return (\n        stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||\n        (isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))\n      );\n    }\n  }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\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 (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {\n    return undefined;\n  }\n\n  const shouldCreateSpanResult = hasTracingEnabled() && 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 && sentryXhrData.status_code !== undefined) {\n      setHttpStatus(span, sentryXhrData.status_code);\n      span.end();\n\n      // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n      delete spans[spanId];\n    }\n    return undefined;\n  }\n\n  const fullUrl = getFullURL(sentryXhrData.url);\n  const host = fullUrl ? parseUrl(fullUrl).host : undefined;\n\n  const hasParent = !!getActiveSpan();\n\n  const span =\n    shouldCreateSpanResult && hasParent\n      ? startInactiveSpan({\n          name: `${sentryXhrData.method} ${sentryXhrData.url}`,\n          attributes: {\n            type: 'xhr',\n            'http.method': sentryXhrData.method,\n            'http.url': fullUrl,\n            url: sentryXhrData.url,\n            'server.address': host,\n            [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',\n            [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',\n          },\n        })\n      : new SentryNonRecordingSpan();\n\n  xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;\n  spans[xhr.__sentry_xhr_span_id__] = span;\n\n  if (shouldAttachHeaders(sentryXhrData.url)) {\n    addTracingHeadersToXhrRequest(\n      xhr,\n      // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),\n      // we do not want to use the span as base for the trace headers,\n      // which means that the headers will be generated from the scope and the sampling decision is deferred\n      hasTracingEnabled() && hasParent ? span : undefined,\n    );\n  }\n\n  return span;\n}\n\nfunction addTracingHeadersToXhrRequest(xhr, span) {\n  const { 'sentry-trace': sentryTrace, baggage } = getTraceData({ span });\n\n  if (sentryTrace) {\n    setHeaderOnXhr(xhr, sentryTrace, baggage);\n  }\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', sentryBaggageHeader);\n    }\n  } catch (_) {\n    // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n  }\n}\n\nfunction getFullURL(url) {\n  try {\n    // By adding a base URL to new URL(), this will also work for relative urls\n    // If `url` is a full URL, the base URL is ignored anyhow\n    const parsed = new URL(url, WINDOW.location.origin);\n    return parsed.href;\n  } catch (e2) {\n    return undefined;\n  }\n}\n\nexport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { getActiveSpan, getRootSpan, spanToJSON, logger, SPAN_STATUS_ERROR } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.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 activeSpan = getActiveSpan();\n      if (!activeSpan) {\n        return;\n      }\n\n      const rootSpan = getRootSpan(activeSpan);\n\n      if (WINDOW.document.hidden && rootSpan) {\n        const cancelledStatus = 'cancelled';\n\n        const { op, status } = spanToJSON(rootSpan);\n\n        if (DEBUG_BUILD) {\n          logger.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n        }\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 (!status) {\n          rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n        }\n\n        rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n        rootSpan.end();\n      }\n    });\n  } else {\n    DEBUG_BUILD && logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n  }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","import { startTrackingWebVitals, startTrackingINP, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingInteractions, addHistoryInstrumentationHandler, registerInpInteractionListener, addPerformanceEntries } from '@sentry-internal/browser-utils';\nimport { TRACING_DEFAULTS, registerSpanErrorInstrumentation, GLOBAL_OBJ, getClient, propagationContextFromHeaders, getCurrentScope, spanToJSON, getRootSpan, spanIsSampled, getDynamicSamplingContextFromSpan, browserPerformanceTimeOrigin, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getActiveSpan, getIsolationScope, generateTraceId, getDomElement, startIdleSpan, logger, SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build.js';\nimport { WINDOW } from '../helpers.js';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\n\n/* eslint-disable max-lines */\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n  ...TRACING_DEFAULTS,\n  instrumentNavigation: true,\n  instrumentPageLoad: true,\n  markBackgroundSpan: true,\n  enableLongTask: true,\n  enableLongAnimationFrame: true,\n  enableInp: 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.\n *\n * We explicitly export the proper type here, as this has to be extended in some cases.\n */\nconst browserTracingIntegration = ((_options = {}) => {\n  registerSpanErrorInstrumentation();\n\n  const {\n    enableInp,\n    enableLongTask,\n    enableLongAnimationFrame,\n    _experiments: { enableInteractions, enableStandaloneClsSpans },\n    beforeStartSpan,\n    idleTimeout,\n    finalTimeout,\n    childSpanTimeout,\n    markBackgroundSpan,\n    traceFetch,\n    traceXHR,\n    trackFetchStreamPerformance,\n    shouldCreateSpanForRequest,\n    enableHTTPTimings,\n    instrumentPageLoad,\n    instrumentNavigation,\n  } = {\n    ...DEFAULT_BROWSER_TRACING_OPTIONS,\n    ..._options,\n  };\n\n  const _collectWebVitals = startTrackingWebVitals({ recordClsStandaloneSpans: enableStandaloneClsSpans || false });\n\n  if (enableInp) {\n    startTrackingINP();\n  }\n\n  if (\n    enableLongAnimationFrame &&\n    GLOBAL_OBJ.PerformanceObserver &&\n    PerformanceObserver.supportedEntryTypes &&\n    PerformanceObserver.supportedEntryTypes.includes('long-animation-frame')\n  ) {\n    startTrackingLongAnimationFrames();\n  } else if (enableLongTask) {\n    startTrackingLongTasks();\n  }\n\n  if (enableInteractions) {\n    startTrackingInteractions();\n  }\n\n  const latestRoute = {\n    name: undefined,\n    source: undefined,\n  };\n\n  /** Create routing idle transaction. */\n  function _createRouteSpan(client, startSpanOptions) {\n    const isPageloadTransaction = startSpanOptions.op === 'pageload';\n\n    const finalStartSpanOptions = beforeStartSpan\n      ? beforeStartSpan(startSpanOptions)\n      : startSpanOptions;\n\n    const attributes = finalStartSpanOptions.attributes || {};\n\n    // If `finalStartSpanOptions.name` is different than `startSpanOptions.name`\n    // it is because `beforeStartSpan` set a custom name. Therefore we set the source to 'custom'.\n    if (startSpanOptions.name !== finalStartSpanOptions.name) {\n      attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'custom';\n      finalStartSpanOptions.attributes = attributes;\n    }\n\n    latestRoute.name = finalStartSpanOptions.name;\n    latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];\n\n    const idleSpan = startIdleSpan(finalStartSpanOptions, {\n      idleTimeout,\n      finalTimeout,\n      childSpanTimeout,\n      // should wait for finish signal if it's a pageload transaction\n      disableAutoFinish: isPageloadTransaction,\n      beforeSpanEnd: span => {\n        _collectWebVitals();\n        addPerformanceEntries(span, { recordClsOnPageloadSpan: !enableStandaloneClsSpans });\n      },\n    });\n\n    function emitFinish() {\n      if (['interactive', 'complete'].includes(WINDOW.document.readyState)) {\n        client.emit('idleSpanEnableAutoFinish', idleSpan);\n      }\n    }\n\n    if (isPageloadTransaction && WINDOW.document) {\n      WINDOW.document.addEventListener('readystatechange', () => {\n        emitFinish();\n      });\n\n      emitFinish();\n    }\n\n    return idleSpan;\n  }\n\n  return {\n    name: BROWSER_TRACING_INTEGRATION_ID,\n    afterAllSetup(client) {\n      let activeSpan;\n      let startingUrl = WINDOW.location && WINDOW.location.href;\n\n      function maybeEndActiveSpan() {\n        if (activeSpan && !spanToJSON(activeSpan).timestamp) {\n          DEBUG_BUILD && logger.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`);\n          // If there's an open active span, we need to finish it before creating an new one.\n          activeSpan.end();\n        }\n      }\n\n      client.on('startNavigationSpan', startSpanOptions => {\n        if (getClient() !== client) {\n          return;\n        }\n\n        maybeEndActiveSpan();\n\n        activeSpan = _createRouteSpan(client, {\n          op: 'navigation',\n          ...startSpanOptions,\n        });\n      });\n\n      client.on('startPageLoadSpan', (startSpanOptions, traceOptions = {}) => {\n        if (getClient() !== client) {\n          return;\n        }\n        maybeEndActiveSpan();\n\n        const sentryTrace = traceOptions.sentryTrace || getMetaContent('sentry-trace');\n        const baggage = traceOptions.baggage || getMetaContent('baggage');\n\n        const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);\n        getCurrentScope().setPropagationContext(propagationContext);\n\n        activeSpan = _createRouteSpan(client, {\n          op: 'pageload',\n          ...startSpanOptions,\n        });\n      });\n\n      // A trace should to stay the consistent over the entire time span of one route.\n      // Therefore, when the initial pageload or navigation root span ends, we update the\n      // scope's propagation context to keep span-specific attributes like the `sampled` decision and\n      // the dynamic sampling context valid, even after the root span has ended.\n      // This ensures that the trace data is consistent for the entire duration of the route.\n      client.on('spanEnd', span => {\n        const op = spanToJSON(span).op;\n        if (span !== getRootSpan(span) || (op !== 'navigation' && op !== 'pageload')) {\n          return;\n        }\n\n        const scope = getCurrentScope();\n        const oldPropagationContext = scope.getPropagationContext();\n\n        scope.setPropagationContext({\n          ...oldPropagationContext,\n          sampled: oldPropagationContext.sampled !== undefined ? oldPropagationContext.sampled : spanIsSampled(span),\n          dsc: oldPropagationContext.dsc || getDynamicSamplingContextFromSpan(span),\n        });\n      });\n\n      if (WINDOW.location) {\n        if (instrumentPageLoad) {\n          startBrowserTracingPageLoadSpan(client, {\n            name: WINDOW.location.pathname,\n            // pageload should always start at timeOrigin (and needs to be in s, not ms)\n            startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n            attributes: {\n              [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n              [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',\n            },\n          });\n        }\n\n        if (instrumentNavigation) {\n          addHistoryInstrumentationHandler(({ 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              startBrowserTracingNavigationSpan(client, {\n                name: WINDOW.location.pathname,\n                attributes: {\n                  [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n                  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',\n                },\n              });\n            }\n          });\n        }\n      }\n\n      if (markBackgroundSpan) {\n        registerBackgroundTabDetection();\n      }\n\n      if (enableInteractions) {\n        registerInteractionListener(idleTimeout, finalTimeout, childSpanTimeout, latestRoute);\n      }\n\n      if (enableInp) {\n        registerInpInteractionListener();\n      }\n\n      instrumentOutgoingRequests(client, {\n        traceFetch,\n        traceXHR,\n        trackFetchStreamPerformance,\n        tracePropagationTargets: client.getOptions().tracePropagationTargets,\n        shouldCreateSpanForRequest,\n        enableHTTPTimings,\n      });\n    },\n  };\n}) ;\n\n/**\n * Manually start a page load span.\n * This will only do something if a browser tracing integration integration has been setup.\n *\n * If you provide a custom `traceOptions` object, it will be used to continue the trace\n * instead of the default behavior, which is to look it up on the <meta> tags.\n */\nfunction startBrowserTracingPageLoadSpan(\n  client,\n  spanOptions,\n  traceOptions,\n) {\n  client.emit('startPageLoadSpan', spanOptions, traceOptions);\n\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const span = getActiveSpan();\n  const op = span && spanToJSON(span).op;\n  return op === 'pageload' ? span : undefined;\n}\n\n/**\n * Manually start a navigation span.\n * This will only do something if a browser tracing integration has been setup.\n */\nfunction startBrowserTracingNavigationSpan(client, spanOptions) {\n  getIsolationScope().setPropagationContext({ traceId: generateTraceId() });\n  getCurrentScope().setPropagationContext({ traceId: generateTraceId() });\n\n  client.emit('startNavigationSpan', spanOptions);\n\n  getCurrentScope().setTransactionName(spanOptions.name);\n\n  const span = getActiveSpan();\n  const op = span && spanToJSON(span).op;\n  return op === 'navigation' ? span : undefined;\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  // eslint-disable-next-line deprecation/deprecation\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\n/** Start listener for interaction transactions */\nfunction registerInteractionListener(\n  idleTimeout,\n  finalTimeout,\n  childSpanTimeout,\n  latestRoute,\n) {\n  let inflightInteractionSpan;\n  const registerInteractionTransaction = () => {\n    const op = 'ui.action.click';\n\n    const activeSpan = getActiveSpan();\n    const rootSpan = activeSpan && getRootSpan(activeSpan);\n    if (rootSpan) {\n      const currentRootSpanOp = spanToJSON(rootSpan).op;\n      if (['navigation', 'pageload'].includes(currentRootSpanOp )) {\n        DEBUG_BUILD &&\n          logger.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`);\n        return undefined;\n      }\n    }\n\n    if (inflightInteractionSpan) {\n      inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, 'interactionInterrupted');\n      inflightInteractionSpan.end();\n      inflightInteractionSpan = undefined;\n    }\n\n    if (!latestRoute.name) {\n      DEBUG_BUILD && logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n      return undefined;\n    }\n\n    inflightInteractionSpan = startIdleSpan(\n      {\n        name: latestRoute.name,\n        op,\n        attributes: {\n          [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || 'url',\n        },\n      },\n      {\n        idleTimeout,\n        finalTimeout,\n        childSpanTimeout,\n      },\n    );\n  };\n\n  if (WINDOW.document) {\n    addEventListener('click', registerInteractionTransaction, { once: false, capture: true });\n  }\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, browserTracingIntegration, getMetaContent, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan };\n//# sourceMappingURL=browserTracingIntegration.js.map\n","import { setContext, init as init$1 } from '@sentry/browser';\nimport { applySdkMetadata } from '@sentry/core';\nimport { version } from 'react';\n\n/**\n * Inits the React SDK\n */\nfunction init(options) {\n  const opts = {\n    ...options,\n  };\n\n  applySdkMetadata(opts, 'react');\n  setContext('react', { version });\n  return init$1(opts);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","import {\n    getUserId as getUserIdFromQueryParams,\n    setUserId as queryParamSetUserId,\n} from '../url/query-params.mjs'\n\nconst unstringifiableValues: Record<string, any> = {\n    undefined: undefined,\n    NaN: NaN,\n    Infinity: Infinity,\n    '-Infinity': -Infinity,\n}\nconst unstringifiablePrefix = 'unstringifiable:'\nexport const setItem = (key: string, value: any) => {\n    if (typeof localStorage === 'undefined') {\n        return\n    }\n    if (Object.values(unstringifiableValues).includes(value)) {\n        localStorage.setItem(key, `${unstringifiablePrefix}${value}`)\n    } else {\n        localStorage.setItem(key, JSON.stringify(value))\n    }\n}\n\nexport const getItem = <T = string, >(key: string): T | undefined => {\n    if (typeof localStorage === 'undefined') {\n        return undefined\n    }\n    const value = localStorage.getItem(key)\n    if (value?.startsWith(unstringifiablePrefix)) {\n        return unstringifiableValues[value.slice(unstringifiablePrefix.length)] as T\n    }\n    if (value === null) {\n        return undefined\n    }\n    return JSON.parse(value) as T\n}\n\nexport const removeItem = (key: string) => {\n    if (typeof localStorage === 'undefined') {\n        return\n    }\n    localStorage.removeItem(key);\n}\n\nconst keys = {\n    accessToken: 'accessToken',\n    refreshToken: 'refreshToken',\n    userId: 'userId',\n    isTrackingDisabled: 'isTrackingDisabled',\n    hasExplicitlyAcceptedTracking: 'hasExplicitlyAcceptedTracking',\n}\n\nexport const setAccessToken = (token: string) => setItem(keys.accessToken, token)\nexport const getAccessToken = () => getItem(keys.accessToken)\nexport const setRefreshToken = (token: string) => setItem(keys.refreshToken, token)\nexport const getRefreshToken = () => {\n    console.debug('getting refresh token')\n    return getItem(keys.refreshToken);\n}\nexport const getUserId = () => getItem(keys.userId)\nexport const setUserId = (userId: string) => setItem(keys.userId, userId)\nexport const getIsTrackingDisabled = () => !!getItem(keys.isTrackingDisabled)\nexport const setIsTrackingDisabled = (isDisabled: boolean) => setItem(keys.isTrackingDisabled, isDisabled)\nexport const getHasExplicitlyAcceptedTracking = () => !!getItem(keys.hasExplicitlyAcceptedTracking)\nexport const setHasExplicitlyAcceptedTracking = (hasExplicitlyAcceptedTracking: boolean) => setItem(keys.hasExplicitlyAcceptedTracking, hasExplicitlyAcceptedTracking)\nexport const clearTokens = () => {\n    console.log('clearing tokens')\n    removeItem('accessToken')\n    removeItem('refreshToken')\n    removeItem('userId')\n}\n\nexport const initializeLocalStorage = () => {\n    const userId = getUserIdFromQueryParams()\n    if (userId) {\n        setUserId(userId)\n        queryParamSetUserId(undefined)\n    }\n}\n","import { useMemo } from 'react';\nvar createMemo = function (fn) {\n    return function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        return useMemo(function () { return fn.apply(void 0, args); }, args);\n    };\n};\nexport default createMemo;\n","import { createContext, createElement, useContext, useReducer } from 'react';\nvar createReducerContext = function (reducer, defaultInitialState) {\n    var context = createContext(undefined);\n    var providerFactory = function (props, children) { return createElement(context.Provider, props, children); };\n    var ReducerProvider = function (_a) {\n        var children = _a.children, initialState = _a.initialState;\n        var state = useReducer(reducer, initialState !== undefined ? initialState : defaultInitialState);\n        return providerFactory({ value: state }, children);\n    };\n    var useReducerContext = function () {\n        var state = useContext(context);\n        if (state == null) {\n            throw new Error(\"useReducerContext must be used inside a ReducerProvider.\");\n        }\n        return state;\n    };\n    return [useReducerContext, ReducerProvider, context];\n};\nexport default createReducerContext;\n","import { useRef } from 'react';\nexport function useFirstMountState() {\n    var isFirst = useRef(true);\n    if (isFirst.current) {\n        isFirst.current = false;\n        return true;\n    }\n    return isFirst.current;\n}\n","import { useEffect } from 'react';\nimport { useFirstMountState } from './useFirstMountState';\nvar useUpdateEffect = function (effect, deps) {\n    var isFirstMount = useFirstMountState();\n    useEffect(function () {\n        if (!isFirstMount) {\n            return effect();\n        }\n    }, deps);\n};\nexport default useUpdateEffect;\n","import { useCallback, useRef, useState } from 'react';\nimport useUpdateEffect from '../useUpdateEffect';\nfunction composeMiddleware(chain) {\n    return function (context, dispatch) {\n        return chain.reduceRight(function (res, middleware) {\n            return middleware(context)(res);\n        }, dispatch);\n    };\n}\nvar createReducer = function () {\n    var middlewares = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        middlewares[_i] = arguments[_i];\n    }\n    var composedMiddleware = composeMiddleware(middlewares);\n    return function (reducer, initialState, initializer) {\n        if (initializer === void 0) { initializer = function (value) { return value; }; }\n        var ref = useRef(initializer(initialState));\n        var _a = useState(ref.current), setState = _a[1];\n        var dispatch = useCallback(function (action) {\n            ref.current = reducer(ref.current, action);\n            setState(ref.current);\n            return action;\n        }, [reducer]);\n        var dispatchRef = useRef(composedMiddleware({\n            getState: function () { return ref.current; },\n            dispatch: function () {\n                var args = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    args[_i] = arguments[_i];\n                }\n                return dispatchRef.current.apply(dispatchRef, args);\n            },\n        }, dispatch));\n        useUpdateEffect(function () {\n            dispatchRef.current = composedMiddleware({\n                getState: function () { return ref.current; },\n                dispatch: function () {\n                    var args = [];\n                    for (var _i = 0; _i < arguments.length; _i++) {\n                        args[_i] = arguments[_i];\n                    }\n                    return dispatchRef.current.apply(dispatchRef, args);\n                },\n            }, dispatch);\n        }, [dispatch]);\n        return [ref.current, dispatchRef.current];\n    };\n};\nexport default createReducer;\n","import { createContext, createElement, useContext, useState } from 'react';\nvar createStateContext = function (defaultInitialValue) {\n    var context = createContext(undefined);\n    var providerFactory = function (props, children) { return createElement(context.Provider, props, children); };\n    var StateProvider = function (_a) {\n        var children = _a.children, initialValue = _a.initialValue;\n        var state = useState(initialValue !== undefined ? initialValue : defaultInitialValue);\n        return providerFactory({ value: state }, children);\n    };\n    var useStateContext = function () {\n        var state = useContext(context);\n        if (state == null) {\n            throw new Error(\"useStateContext must be used inside a StateProvider.\");\n        }\n        return state;\n    };\n    return [useStateContext, StateProvider, context];\n};\nexport default createStateContext;\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useMountedState() {\n    var mountedRef = useRef(false);\n    var get = useCallback(function () { return mountedRef.current; }, []);\n    useEffect(function () {\n        mountedRef.current = true;\n        return function () {\n            mountedRef.current = false;\n        };\n    }, []);\n    return get;\n}\n","import { __assign } from \"tslib\";\nimport { useCallback, useRef, useState } from 'react';\nimport useMountedState from './useMountedState';\nexport default function useAsyncFn(fn, deps, initialState) {\n    if (deps === void 0) { deps = []; }\n    if (initialState === void 0) { initialState = { loading: false }; }\n    var lastCallId = useRef(0);\n    var isMounted = useMountedState();\n    var _a = useState(initialState), state = _a[0], set = _a[1];\n    var callback = useCallback(function () {\n        var args = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            args[_i] = arguments[_i];\n        }\n        var callId = ++lastCallId.current;\n        if (!state.loading) {\n            set(function (prevState) { return (__assign(__assign({}, prevState), { loading: true })); });\n        }\n        return fn.apply(void 0, args).then(function (value) {\n            isMounted() && callId === lastCallId.current && set({ value: value, loading: false });\n            return value;\n        }, function (error) {\n            isMounted() && callId === lastCallId.current && set({ error: error, loading: false });\n            return error;\n        });\n    }, deps);\n    return [state, callback];\n}\n","import { useEffect } from 'react';\nimport useAsyncFn from './useAsyncFn';\nexport default function useAsync(fn, deps) {\n    if (deps === void 0) { deps = []; }\n    var _a = useAsyncFn(fn, deps, {\n        loading: true,\n    }), state = _a[0], callback = _a[1];\n    useEffect(function () {\n        callback();\n    }, [callback]);\n    return state;\n}\n","import { __assign, __spreadArrays } from \"tslib\";\nimport { useCallback, useState } from 'react';\nimport useAsync from './useAsync';\nvar useAsyncRetry = function (fn, deps) {\n    if (deps === void 0) { deps = []; }\n    var _a = useState(0), attempt = _a[0], setAttempt = _a[1];\n    var state = useAsync(fn, __spreadArrays(deps, [attempt]));\n    var stateLoading = state.loading;\n    var retry = useCallback(function () {\n        if (stateLoading) {\n            if (process.env.NODE_ENV === 'development') {\n                console.log('You are calling useAsyncRetry hook retry() method while loading in progress, this is a no-op.');\n            }\n            return;\n        }\n        setAttempt(function (currentAttempt) { return currentAttempt + 1; });\n    }, __spreadArrays(deps, [stateLoading]));\n    return __assign(__assign({}, state), { retry: retry });\n};\nexport default useAsyncRetry;\n","import { useCallback, useState } from 'react';\nvar useSetState = function (initialState) {\n    if (initialState === void 0) { initialState = {}; }\n    var _a = useState(initialState), state = _a[0], set = _a[1];\n    var setState = useCallback(function (patch) {\n        set(function (prevState) {\n            return Object.assign({}, prevState, patch instanceof Function ? patch(prevState) : patch);\n        });\n    }, []);\n    return [state, setState];\n};\nexport default useSetState;\n","export default function parseTimeRanges(ranges) {\n    var result = [];\n    for (var i = 0; i < ranges.length; i++) {\n        result.push({\n            start: ranges.start(i),\n            end: ranges.end(i),\n        });\n    }\n    return result;\n}\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport useSetState from '../useSetState';\nimport parseTimeRanges from '../misc/parseTimeRanges';\nexport default function createHTMLMediaHook(tag) {\n    return function (elOrProps) {\n        var element;\n        var props;\n        if (React.isValidElement(elOrProps)) {\n            element = elOrProps;\n            props = element.props;\n        }\n        else {\n            props = elOrProps;\n        }\n        var _a = useSetState({\n            buffered: [],\n            time: 0,\n            duration: 0,\n            paused: true,\n            muted: false,\n            volume: 1,\n            playing: false,\n        }), state = _a[0], setState = _a[1];\n        var ref = useRef(null);\n        var wrapEvent = function (userEvent, proxyEvent) {\n            return function (event) {\n                try {\n                    proxyEvent && proxyEvent(event);\n                }\n                finally {\n                    userEvent && userEvent(event);\n                }\n            };\n        };\n        var onPlay = function () { return setState({ paused: false }); };\n        var onPlaying = function () { return setState({ playing: true }); };\n        var onWaiting = function () { return setState({ playing: false }); };\n        var onPause = function () { return setState({ paused: true, playing: false }); };\n        var onVolumeChange = function () {\n            var el = ref.current;\n            if (!el) {\n                return;\n            }\n            setState({\n                muted: el.muted,\n                volume: el.volume,\n            });\n        };\n        var onDurationChange = function () {\n            var el = ref.current;\n            if (!el) {\n                return;\n            }\n            var duration = el.duration, buffered = el.buffered;\n            setState({\n                duration: duration,\n                buffered: parseTimeRanges(buffered),\n            });\n        };\n        var onTimeUpdate = function () {\n            var el = ref.current;\n            if (!el) {\n                return;\n            }\n            setState({ time: el.currentTime });\n        };\n        var onProgress = function () {\n            var el = ref.current;\n            if (!el) {\n                return;\n            }\n            setState({ buffered: parseTimeRanges(el.buffered) });\n        };\n        if (element) {\n            element = React.cloneElement(element, __assign(__assign({ controls: false }, props), { ref: ref, onPlay: wrapEvent(props.onPlay, onPlay), onPlaying: wrapEvent(props.onPlaying, onPlaying), onWaiting: wrapEvent(props.onWaiting, onWaiting), onPause: wrapEvent(props.onPause, onPause), onVolumeChange: wrapEvent(props.onVolumeChange, onVolumeChange), onDurationChange: wrapEvent(props.onDurationChange, onDurationChange), onTimeUpdate: wrapEvent(props.onTimeUpdate, onTimeUpdate), onProgress: wrapEvent(props.onProgress, onProgress) }));\n        }\n        else {\n            element = React.createElement(tag, __assign(__assign({ controls: false }, props), { ref: ref, onPlay: wrapEvent(props.onPlay, onPlay), onPlaying: wrapEvent(props.onPlaying, onPlaying), onWaiting: wrapEvent(props.onWaiting, onWaiting), onPause: wrapEvent(props.onPause, onPause), onVolumeChange: wrapEvent(props.onVolumeChange, onVolumeChange), onDurationChange: wrapEvent(props.onDurationChange, onDurationChange), onTimeUpdate: wrapEvent(props.onTimeUpdate, onTimeUpdate), onProgress: wrapEvent(props.onProgress, onProgress) })); // TODO: fix this typing.\n        }\n        // Some browsers return `Promise` on `.play()` and may throw errors\n        // if one tries to execute another `.play()` or `.pause()` while that\n        // promise is resolving. So we prevent that with this lock.\n        // See: https://bugs.chromium.org/p/chromium/issues/detail?id=593273\n        var lockPlay = false;\n        var controls = {\n            play: function () {\n                var el = ref.current;\n                if (!el) {\n                    return undefined;\n                }\n                if (!lockPlay) {\n                    var promise = el.play();\n                    var isPromise = typeof promise === 'object';\n                    if (isPromise) {\n                        lockPlay = true;\n                        var resetLock = function () {\n                            lockPlay = false;\n                        };\n                        promise.then(resetLock, resetLock);\n                    }\n                    return promise;\n                }\n                return undefined;\n            },\n            pause: function () {\n                var el = ref.current;\n                if (el && !lockPlay) {\n                    return el.pause();\n                }\n            },\n            seek: function (time) {\n                var el = ref.current;\n                if (!el || state.duration === undefined) {\n                    return;\n                }\n                time = Math.min(state.duration, Math.max(0, time));\n                el.currentTime = time;\n            },\n            volume: function (volume) {\n                var el = ref.current;\n                if (!el) {\n                    return;\n                }\n                volume = Math.min(1, Math.max(0, volume));\n                el.volume = volume;\n                setState({ volume: volume });\n            },\n            mute: function () {\n                var el = ref.current;\n                if (!el) {\n                    return;\n                }\n                el.muted = true;\n            },\n            unmute: function () {\n                var el = ref.current;\n                if (!el) {\n                    return;\n                }\n                el.muted = false;\n            },\n        };\n        useEffect(function () {\n            var el = ref.current;\n            if (!el) {\n                if (process.env.NODE_ENV !== 'production') {\n                    if (tag === 'audio') {\n                        console.error('useAudio() ref to <audio> element is empty at mount. ' +\n                            'It seem you have not rendered the audio element, which it ' +\n                            'returns as the first argument const [audio] = useAudio(...).');\n                    }\n                    else if (tag === 'video') {\n                        console.error('useVideo() ref to <video> element is empty at mount. ' +\n                            'It seem you have not rendered the video element, which it ' +\n                            'returns as the first argument const [video] = useVideo(...).');\n                    }\n                }\n                return;\n            }\n            setState({\n                volume: el.volume,\n                muted: el.muted,\n                paused: el.paused,\n            });\n            // Start media, if autoPlay requested.\n            if (props.autoPlay && el.paused) {\n                controls.play();\n            }\n        }, [props.src]);\n        return [element, state, controls, ref];\n    };\n}\n","import createHTMLMediaHook from './factory/createHTMLMediaHook';\nvar useAudio = createHTMLMediaHook('audio');\nexport default useAudio;\n","export var noop = function () { };\nexport function on(obj) {\n    var args = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        args[_i - 1] = arguments[_i];\n    }\n    if (obj && obj.addEventListener) {\n        obj.addEventListener.apply(obj, args);\n    }\n}\nexport function off(obj) {\n    var args = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        args[_i - 1] = arguments[_i];\n    }\n    if (obj && obj.removeEventListener) {\n        obj.removeEventListener.apply(obj, args);\n    }\n}\nexport var isBrowser = typeof window !== 'undefined';\nexport var isNavigator = typeof navigator !== 'undefined';\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n  if (a === b) return true;\n\n  if (a && b && typeof a == 'object' && typeof b == 'object') {\n    if (a.constructor !== b.constructor) return false;\n\n    var length, i, keys;\n    if (Array.isArray(a)) {\n      length = a.length;\n      if (length != b.length) return false;\n      for (i = length; i-- !== 0;)\n        if (!equal(a[i], b[i])) return false;\n      return true;\n    }\n\n\n\n    if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n    if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n    if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n    keys = Object.keys(a);\n    length = keys.length;\n    if (length !== Object.keys(b).length) return false;\n\n    for (i = length; i-- !== 0;)\n      if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n    for (i = length; i-- !== 0;) {\n      var key = keys[i];\n\n      if (key === '_owner' && a.$$typeof) {\n        // React-specific: avoid traversing React elements' _owner.\n        //  _owner contains circular references\n        // and is not needed when comparing the actual elements (and not their owners)\n        continue;\n      }\n\n      if (!equal(a[key], b[key])) return false;\n    }\n\n    return true;\n  }\n\n  // true if both NaN, false otherwise\n  return a!==a && b!==b;\n};\n","import { useEffect, useState } from 'react';\nimport { isNavigator, off, on } from './misc/util';\nimport isDeepEqual from './misc/isDeepEqual';\nvar nav = isNavigator ? navigator : undefined;\nvar isBatteryApiSupported = nav && typeof nav.getBattery === 'function';\nfunction useBatteryMock() {\n    return { isSupported: false };\n}\nfunction useBattery() {\n    var _a = useState({ isSupported: true, fetched: false }), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var isMounted = true;\n        var battery = null;\n        var handleChange = function () {\n            if (!isMounted || !battery) {\n                return;\n            }\n            var newState = {\n                isSupported: true,\n                fetched: true,\n                level: battery.level,\n                charging: battery.charging,\n                dischargingTime: battery.dischargingTime,\n                chargingTime: battery.chargingTime,\n            };\n            !isDeepEqual(state, newState) && setState(newState);\n        };\n        nav.getBattery().then(function (bat) {\n            if (!isMounted) {\n                return;\n            }\n            battery = bat;\n            on(battery, 'chargingchange', handleChange);\n            on(battery, 'chargingtimechange', handleChange);\n            on(battery, 'dischargingtimechange', handleChange);\n            on(battery, 'levelchange', handleChange);\n            handleChange();\n        });\n        return function () {\n            isMounted = false;\n            if (battery) {\n                off(battery, 'chargingchange', handleChange);\n                off(battery, 'chargingtimechange', handleChange);\n                off(battery, 'dischargingtimechange', handleChange);\n                off(battery, 'levelchange', handleChange);\n            }\n        };\n    }, []);\n    return state;\n}\nexport default isBatteryApiSupported ? useBattery : useBatteryMock;\n","import { useCallback, useEffect } from 'react';\nimport { off, on } from './misc/util';\nvar useBeforeUnload = function (enabled, message) {\n    if (enabled === void 0) { enabled = true; }\n    var handler = useCallback(function (event) {\n        var finalEnabled = typeof enabled === 'function' ? enabled() : true;\n        if (!finalEnabled) {\n            return;\n        }\n        event.preventDefault();\n        if (message) {\n            event.returnValue = message;\n        }\n        return message;\n    }, [enabled, message]);\n    useEffect(function () {\n        if (!enabled) {\n            return;\n        }\n        on(window, 'beforeunload', handler);\n        return function () { return off(window, 'beforeunload', handler); };\n    }, [enabled, handler]);\n};\nexport default useBeforeUnload;\n","import { useReducer } from 'react';\nvar toggleReducer = function (state, nextValue) {\n    return typeof nextValue === 'boolean' ? nextValue : !state;\n};\nvar useToggle = function (initialValue) {\n    return useReducer(toggleReducer, initialValue);\n};\nexport default useToggle;\n","import { useEffect, useRef } from 'react';\nimport { off, on } from './misc/util';\nvar defaultEvents = ['mousedown', 'touchstart'];\nvar useClickAway = function (ref, onClickAway, events) {\n    if (events === void 0) { events = defaultEvents; }\n    var savedCallback = useRef(onClickAway);\n    useEffect(function () {\n        savedCallback.current = onClickAway;\n    }, [onClickAway]);\n    useEffect(function () {\n        var handler = function (event) {\n            var el = ref.current;\n            el && !el.contains(event.target) && savedCallback.current(event);\n        };\n        for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n            var eventName = events_1[_i];\n            on(document, eventName, handler);\n        }\n        return function () {\n            for (var _i = 0, events_2 = events; _i < events_2.length; _i++) {\n                var eventName = events_2[_i];\n                off(document, eventName, handler);\n            }\n        };\n    }, [events, ref]);\n};\nexport default useClickAway;\n","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3.  If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t//     character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","import { useCallback, useState } from 'react';\nimport Cookies from 'js-cookie';\nvar useCookie = function (cookieName) {\n    var _a = useState(function () { return Cookies.get(cookieName) || null; }), value = _a[0], setValue = _a[1];\n    var updateCookie = useCallback(function (newValue, options) {\n        Cookies.set(cookieName, newValue, options);\n        setValue(newValue);\n    }, [cookieName]);\n    var deleteCookie = useCallback(function () {\n        Cookies.remove(cookieName);\n        setValue(null);\n    }, [cookieName]);\n    return [value, updateCookie, deleteCookie];\n};\nexport default useCookie;\n","\nmodule.exports = function () {\n  var selection = document.getSelection();\n  if (!selection.rangeCount) {\n    return function () {};\n  }\n  var active = document.activeElement;\n\n  var ranges = [];\n  for (var i = 0; i < selection.rangeCount; i++) {\n    ranges.push(selection.getRangeAt(i));\n  }\n\n  switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n    case 'INPUT':\n    case 'TEXTAREA':\n      active.blur();\n      break;\n\n    default:\n      active = null;\n      break;\n  }\n\n  selection.removeAllRanges();\n  return function () {\n    selection.type === 'Caret' &&\n    selection.removeAllRanges();\n\n    if (!selection.rangeCount) {\n      ranges.forEach(function(range) {\n        selection.addRange(range);\n      });\n    }\n\n    active &&\n    active.focus();\n  };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n  \"text/plain\": \"Text\",\n  \"text/html\": \"Url\",\n  \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n  var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n  return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n  var debug,\n    message,\n    reselectPrevious,\n    range,\n    selection,\n    mark,\n    success = false;\n  if (!options) {\n    options = {};\n  }\n  debug = options.debug || false;\n  try {\n    reselectPrevious = deselectCurrent();\n\n    range = document.createRange();\n    selection = document.getSelection();\n\n    mark = document.createElement(\"span\");\n    mark.textContent = text;\n    // avoid screen readers from reading out loud the text\n    mark.ariaHidden = \"true\"\n    // reset user styles for span element\n    mark.style.all = \"unset\";\n    // prevents scrolling to the end of the page\n    mark.style.position = \"fixed\";\n    mark.style.top = 0;\n    mark.style.clip = \"rect(0, 0, 0, 0)\";\n    // used to preserve spaces and line breaks\n    mark.style.whiteSpace = \"pre\";\n    // do not inherit user-select (it may be `none`)\n    mark.style.webkitUserSelect = \"text\";\n    mark.style.MozUserSelect = \"text\";\n    mark.style.msUserSelect = \"text\";\n    mark.style.userSelect = \"text\";\n    mark.addEventListener(\"copy\", function(e) {\n      e.stopPropagation();\n      if (options.format) {\n        e.preventDefault();\n        if (typeof e.clipboardData === \"undefined\") { // IE 11\n          debug && console.warn(\"unable to use e.clipboardData\");\n          debug && console.warn(\"trying IE specific stuff\");\n          window.clipboardData.clearData();\n          var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n          window.clipboardData.setData(format, text);\n        } else { // all other browsers\n          e.clipboardData.clearData();\n          e.clipboardData.setData(options.format, text);\n        }\n      }\n      if (options.onCopy) {\n        e.preventDefault();\n        options.onCopy(e.clipboardData);\n      }\n    });\n\n    document.body.appendChild(mark);\n\n    range.selectNodeContents(mark);\n    selection.addRange(range);\n\n    var successful = document.execCommand(\"copy\");\n    if (!successful) {\n      throw new Error(\"copy command was unsuccessful\");\n    }\n    success = true;\n  } catch (err) {\n    debug && console.error(\"unable to copy using execCommand: \", err);\n    debug && console.warn(\"trying IE specific stuff\");\n    try {\n      window.clipboardData.setData(options.format || \"text\", text);\n      options.onCopy && options.onCopy(window.clipboardData);\n      success = true;\n    } catch (err) {\n      debug && console.error(\"unable to copy using clipboardData: \", err);\n      debug && console.error(\"falling back to prompt\");\n      message = format(\"message\" in options ? options.message : defaultMessage);\n      window.prompt(message, text);\n    }\n  } finally {\n    if (selection) {\n      if (typeof selection.removeRange == \"function\") {\n        selection.removeRange(range);\n      } else {\n        selection.removeAllRanges();\n      }\n    }\n\n    if (mark) {\n      document.body.removeChild(mark);\n    }\n    reselectPrevious();\n  }\n\n  return success;\n}\n\nmodule.exports = copy;\n","import writeText from 'copy-to-clipboard';\nimport { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useCopyToClipboard = function () {\n    var isMounted = useMountedState();\n    var _a = useSetState({\n        value: undefined,\n        error: undefined,\n        noUserInteraction: true,\n    }), state = _a[0], setState = _a[1];\n    var copyToClipboard = useCallback(function (value) {\n        if (!isMounted()) {\n            return;\n        }\n        var noUserInteraction;\n        var normalizedValue;\n        try {\n            // only strings and numbers casted to strings can be copied to clipboard\n            if (typeof value !== 'string' && typeof value !== 'number') {\n                var error = new Error(\"Cannot copy typeof \" + typeof value + \" to clipboard, must be a string\");\n                if (process.env.NODE_ENV === 'development')\n                    console.error(error);\n                setState({\n                    value: value,\n                    error: error,\n                    noUserInteraction: true,\n                });\n                return;\n            }\n            // empty strings are also considered invalid\n            else if (value === '') {\n                var error = new Error(\"Cannot copy empty string to clipboard.\");\n                if (process.env.NODE_ENV === 'development')\n                    console.error(error);\n                setState({\n                    value: value,\n                    error: error,\n                    noUserInteraction: true,\n                });\n                return;\n            }\n            normalizedValue = value.toString();\n            noUserInteraction = writeText(normalizedValue);\n            setState({\n                value: normalizedValue,\n                error: undefined,\n                noUserInteraction: noUserInteraction,\n            });\n        }\n        catch (error) {\n            setState({\n                value: normalizedValue,\n                error: error,\n                noUserInteraction: noUserInteraction,\n            });\n        }\n    }, []);\n    return [state, copyToClipboard];\n};\nexport default useCopyToClipboard;\n","import { useReducer } from 'react';\nvar updateReducer = function (num) { return (num + 1) % 1000000; };\nexport default function useUpdate() {\n    var _a = useReducer(updateReducer, 0), update = _a[1];\n    return update;\n}\n","export function resolveHookState(nextState, currentState) {\n    if (typeof nextState === 'function') {\n        return nextState.length ? nextState(currentState) : nextState();\n    }\n    return nextState;\n}\n","import { useMemo, useRef } from 'react';\nimport useUpdate from './useUpdate';\nimport { resolveHookState } from './misc/hookState';\nexport default function useGetSet(initialState) {\n    var state = useRef(resolveHookState(initialState));\n    var update = useUpdate();\n    return useMemo(function () { return [\n        function () { return state.current; },\n        function (newState) {\n            state.current = resolveHookState(newState, state.current);\n            update();\n        },\n    ]; }, []);\n}\n","import { useMemo } from 'react';\nimport useGetSet from './useGetSet';\nimport { resolveHookState } from './misc/hookState';\nexport default function useCounter(initialValue, max, min) {\n    if (initialValue === void 0) { initialValue = 0; }\n    if (max === void 0) { max = null; }\n    if (min === void 0) { min = null; }\n    var init = resolveHookState(initialValue);\n    typeof init !== 'number' &&\n        console.error('initialValue has to be a number, got ' + typeof initialValue);\n    if (typeof min === 'number') {\n        init = Math.max(init, min);\n    }\n    else if (min !== null) {\n        console.error('min has to be a number, got ' + typeof min);\n    }\n    if (typeof max === 'number') {\n        init = Math.min(init, max);\n    }\n    else if (max !== null) {\n        console.error('max has to be a number, got ' + typeof max);\n    }\n    var _a = useGetSet(init), get = _a[0], setInternal = _a[1];\n    return [\n        get(),\n        useMemo(function () {\n            var set = function (newState) {\n                var prevState = get();\n                var rState = resolveHookState(newState, prevState);\n                if (prevState !== rState) {\n                    if (typeof min === 'number') {\n                        rState = Math.max(rState, min);\n                    }\n                    if (typeof max === 'number') {\n                        rState = Math.min(rState, max);\n                    }\n                    prevState !== rState && setInternal(rState);\n                }\n            };\n            return {\n                get: get,\n                set: set,\n                inc: function (delta) {\n                    if (delta === void 0) { delta = 1; }\n                    var rDelta = resolveHookState(delta, get());\n                    if (typeof rDelta !== 'number') {\n                        console.error('delta has to be a number or function returning a number, got ' + typeof rDelta);\n                    }\n                    set(function (num) { return num + rDelta; });\n                },\n                dec: function (delta) {\n                    if (delta === void 0) { delta = 1; }\n                    var rDelta = resolveHookState(delta, get());\n                    if (typeof rDelta !== 'number') {\n                        console.error('delta has to be a number or function returning a number, got ' + typeof rDelta);\n                    }\n                    set(function (num) { return num - rDelta; });\n                },\n                reset: function (value) {\n                    if (value === void 0) { value = init; }\n                    var rValue = resolveHookState(value, get());\n                    if (typeof rValue !== 'number') {\n                        console.error('value has to be a number or function returning a number, got ' + typeof rValue);\n                    }\n                    // eslint-disable-next-line react-hooks/exhaustive-deps\n                    init = rValue;\n                    set(rValue);\n                },\n            };\n        }, [init, min, max]),\n    ];\n}\n","'use strict';\n\nvar KEBAB_REGEX = /[A-Z]/g;\n\nvar hash = function (str) {\n    var h = 5381, i = str.length;\n\n    while (i) h = (h * 33) ^ str.charCodeAt(--i);\n\n    return '_' + (h >>> 0).toString(36);\n};\n\nexports.create = function (config) {\n    config = config || {};\n    var assign = config.assign || Object.assign;\n    var client = typeof window === 'object';\n\n    // Check if we are really in browser environment.\n    if (process.env.NODE_ENV !== 'production') {\n        if (client) {\n            if ((typeof document !== 'object') || !document.getElementsByTagName('HTML')) {\n                console.error(\n                    'nano-css detected browser environment because of \"window\" global, but ' +\n                    '\"document\" global seems to be defective.'\n                );\n            }\n        }\n    }\n\n    var renderer = assign({\n        raw: '',\n        pfx: '_',\n        client: client,\n        assign: assign,\n        stringify: JSON.stringify,\n        kebab: function (prop) {\n            return prop.replace(KEBAB_REGEX, '-$&').toLowerCase();\n        },\n        decl: function (key, value) {\n            key = renderer.kebab(key);\n            return key + ':' + value + ';';\n        },\n        hash: function (obj) {\n            return hash(renderer.stringify(obj));\n        },\n        selector: function (parent, selector) {\n            return parent + (selector[0] === ':' ? ''  : ' ') + selector;\n        },\n        putRaw: function (rawCssRule) {\n            renderer.raw += rawCssRule;\n        }\n    }, config);\n\n    if (renderer.client) {\n        if (!renderer.sh)\n            document.head.appendChild(renderer.sh = document.createElement('style'));\n\n        if (process.env.NODE_ENV !== 'production') {\n            renderer.sh.setAttribute('data-nano-css-dev', '');\n\n            // Test style sheet used in DEV mode to test if .insetRule() would throw.\n            renderer.shTest = document.createElement('style');\n            renderer.shTest.setAttribute('data-nano-css-dev-tests', '');\n            document.head.appendChild(renderer.shTest);\n        }\n\n        renderer.putRaw = function (rawCssRule) {\n            // .insertRule() is faster than .appendChild(), that's why we use it in PROD.\n            // But CSS injected using .insertRule() is not displayed in Chrome Devtools,\n            // that's why we use .appendChild in DEV.\n            if (process.env.NODE_ENV === 'production') {\n                var sheet = renderer.sh.sheet;\n\n                // Unknown pseudo-selectors will throw, this try/catch swallows all errors.\n                try {\n                    sheet.insertRule(rawCssRule, sheet.cssRules.length);\n                // eslint-disable-next-line no-empty\n                } catch (error) {}\n            } else {\n                // Test if .insertRule() works in dev mode. Unknown pseudo-selectors will throw when\n                // .insertRule() is used, but .appendChild() will not throw.\n                try {\n                    renderer.shTest.sheet.insertRule(rawCssRule, renderer.shTest.sheet.cssRules.length);\n                } catch (error) {\n                    if (config.verbose) {\n                        console.error(error);\n                    }\n                }\n\n                // Insert pretty-printed CSS for dev mode.\n                renderer.sh.appendChild(document.createTextNode(rawCssRule));\n            }\n        };\n    }\n\n    renderer.put = function (selector, decls, atrule) {\n        var str = '';\n        var prop, value;\n        var postponed = [];\n\n        for (prop in decls) {\n            value = decls[prop];\n\n            if ((value instanceof Object) && !(value instanceof Array)) {\n                postponed.push(prop);\n            } else {\n                if ((process.env.NODE_ENV !== 'production') && !renderer.sourcemaps) {\n                    str += '    ' + renderer.decl(prop, value, selector, atrule) + '\\n';\n                } else {\n                    str += renderer.decl(prop, value, selector, atrule);\n                }\n            }\n        }\n\n        if (str) {\n            if ((process.env.NODE_ENV !== 'production') && !renderer.sourcemaps) {\n                str = '\\n' + selector + ' {\\n' + str + '}\\n';\n            } else {\n                str = selector + '{' + str + '}';\n            }\n            renderer.putRaw(atrule ? atrule + '{' + str + '}' : str);\n        }\n\n        for (var i = 0; i < postponed.length; i++) {\n            prop = postponed[i];\n\n            if (prop[0] === '@' && prop !== '@font-face') {\n                renderer.putAt(selector, decls[prop], prop);\n            } else {\n                renderer.put(renderer.selector(selector, prop), decls[prop], atrule);\n            }\n        }\n    };\n\n    renderer.putAt = renderer.put;\n\n    return renderer;\n};\n","'use strict';\n\nvar pkgName = 'nano-css';\n\nmodule.exports = function warnOnMissingDependencies (addon, renderer, deps) {\n    var missing = [];\n\n    for (var i = 0; i < deps.length; i++) {\n        var name = deps[i];\n\n        if (!renderer[name]) {\n            missing.push(name);\n        }\n    }\n\n    if (missing.length) {\n        var str = 'Addon \"' + addon + '\" is missing the following dependencies:';\n\n        for (var j = 0; j < missing.length; j++) {\n            str += '\\n require(\"' + pkgName + '/addon/' + missing[j] + '\").addon(nano);';\n        }\n\n        throw new Error(str);\n    }\n};\n","'use strict';\n\nexports.addon = function (renderer) {\n    // CSSOM support only browser environment.\n    if (!renderer.client) return;\n\n    if (process.env.NODE_ENV !== 'production') {\n        require('./__dev__/warnOnMissingDependencies')('cssom', renderer, ['sh']);\n    }\n\n    // Style sheet for media queries.\n    document.head.appendChild(renderer.msh = document.createElement('style'));\n\n    renderer.createRule = function (selector, prelude) {\n        var rawCss = selector + '{}';\n        if (prelude) rawCss = prelude + '{' + rawCss + '}';\n        var sheet = prelude ? renderer.msh.sheet : renderer.sh.sheet;\n        var index = sheet.insertRule(rawCss, sheet.cssRules.length);\n        var rule = (sheet.cssRules || sheet.rules)[index];\n\n        // Keep track of `index` where rule was inserted in the sheet. This is\n        // needed for rule deletion.\n        rule.index = index;\n\n        if (prelude) {\n            // If rule has media query (it has prelude), move style (CSSStyleDeclaration)\n            // object to the \"top\" to normalize it with a rule without the media\n            // query, so that both rules have `.style` property available.\n            var selectorRule = (rule.cssRules || rule.rules)[0];\n            rule.style = selectorRule.style;\n            rule.styleMap = selectorRule.styleMap;\n        }\n\n        return rule;\n    };\n};\n","function removeRule (rule) {\n    var maxIndex = rule.index;\n    var sh = rule.parentStyleSheet;\n    var rules = sh.cssRules || sh.rules;\n    maxIndex = Math.max(maxIndex, rules.length - 1);\n    while (maxIndex >= 0) {\n        if (rules[maxIndex] === rule) {\n            sh.deleteRule(maxIndex);\n            break;\n        }\n        maxIndex--;\n    }\n}\n\nexports.removeRule = removeRule;\n","'use strict';\n\nvar removeRule = require('./vcssom/removeRule').removeRule;\n\nexports.addon = function (renderer) {\n    // VCSSOM support only browser environment.\n    if (!renderer.client) return;\n\n    if (process.env.NODE_ENV !== 'production') {\n        require('./__dev__/warnOnMissingDependencies')('cssom', renderer, ['createRule']); // cssom\n    }\n\n    var kebab = renderer.kebab;\n\n    function VRule (selector, prelude) {\n        this.rule = renderer.createRule(selector, prelude);\n        this.decl = {};\n    }\n    VRule.prototype.diff = function (newDecl) {\n        var oldDecl = this.decl;\n        var style = this.rule.style;\n        var property;\n        for (property in oldDecl)\n            if (newDecl[property] === undefined)\n                style.removeProperty(property);\n        for (property in newDecl)\n            if (newDecl[property] !== oldDecl[property])\n                style.setProperty(kebab(property), newDecl[property]);\n        this.decl = newDecl;\n    };\n    VRule.prototype.del = function () {\n        removeRule(this.rule);\n    };\n\n    function VSheet () {\n        /**\n         * {\n         *   '<at-rule-prelude>': {\n         *     '<selector>': {\n         *       color: 'red\n         *     }\n         *   }\n         * }\n         */\n        this.tree = {};\n    }\n    VSheet.prototype.diff = function (newTree) {\n        var oldTree = this.tree;\n\n        // Remove media queries not present in new tree.\n        for (var prelude in oldTree) {\n            if (newTree[prelude] === undefined) {\n                var rules = oldTree[prelude];\n                for (var selector in rules)\n                    rules[selector].del();\n            }\n        }\n\n        for (var prelude in newTree) {\n            if (oldTree[prelude] === undefined) {\n                // Whole media query is new.\n                for (var selector in newTree[prelude]) {\n                    var rule = new VRule(selector, prelude);\n                    rule.diff(newTree[prelude][selector]);\n                    newTree[prelude][selector] = rule;\n                }\n            } else {\n                // Old tree already has rules with this media query.\n                var oldRules = oldTree[prelude];\n                var newRules = newTree[prelude];\n\n                // Remove rules not present in new tree.\n                for (var selector in oldRules)\n                    if (!newRules[selector])\n                        oldRules[selector].del();\n\n                // Apply new rules.\n                for (var selector in newRules) {\n                    var rule = oldRules[selector];\n                    if (rule) {\n                        rule.diff(newRules[selector]);\n                        newRules[selector] = rule;\n                    } else {\n                        rule = new VRule(selector, prelude);\n                        rule.diff(newRules[selector]);\n                        newRules[selector] = rule;\n                    }\n                }\n            }\n        }\n\n        this.tree = newTree;\n    };\n\n    renderer.VRule = VRule;\n    renderer.VSheet = VSheet;\n};\n","function cssToTree (tree, css, selector, prelude) {\n    var declarations = {};\n    var hasDeclarations = false;\n    var key, value;\n\n    for (key in css) {\n        value = css[key];\n        if (typeof value !== 'object') {\n            hasDeclarations = true;\n            declarations[key] = value;\n        }\n    }\n\n    if (hasDeclarations) {\n        if (!tree[prelude]) tree[prelude] = {};\n        tree[prelude][selector] = declarations;\n    }\n\n    for (key in css) {\n        value = css[key];\n        if (typeof value === 'object') {\n            if (key[0] === '@') {\n                cssToTree(tree, value, selector, key);\n            } else {\n                var hasCurrentSymbol = key.indexOf('&') > -1;\n                var selectorParts = selector.split(',');\n                if (hasCurrentSymbol) {\n                    for (var i = 0; i < selectorParts.length; i++) {\n                        selectorParts[i] = key.replace(/&/g, selectorParts[i]);\n                    }\n                } else {\n                    for (var i = 0; i < selectorParts.length; i++) {\n                        selectorParts[i] = selectorParts[i] + ' ' + key;\n                    }\n                }\n                cssToTree(tree, value, selectorParts.join(','), prelude);\n            }\n        }\n    }\n};\n\nexports.cssToTree = cssToTree;\n","import { useEffect, useLayoutEffect } from 'react';\nimport { isBrowser } from './misc/util';\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\nexport default useIsomorphicLayoutEffect;\n","import { create } from 'nano-css';\nimport { addon as addonCSSOM } from 'nano-css/addon/cssom';\nimport { addon as addonVCSSOM } from 'nano-css/addon/vcssom';\nimport { cssToTree } from 'nano-css/addon/vcssom/cssToTree';\nimport { useMemo } from 'react';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nvar nano = create();\naddonCSSOM(nano);\naddonVCSSOM(nano);\nvar counter = 0;\nvar useCss = function (css) {\n    var className = useMemo(function () { return 'react-use-css-' + (counter++).toString(36); }, []);\n    var sheet = useMemo(function () { return new nano.VSheet(); }, []);\n    useIsomorphicLayoutEffect(function () {\n        var tree = {};\n        cssToTree(tree, css, '.' + className, '');\n        sheet.diff(tree);\n        return function () {\n            sheet.diff({});\n        };\n    });\n    return className;\n};\nexport default useCss;\n","import { useEffect, useRef } from 'react';\nvar isPrimitive = function (val) { return val !== Object(val); };\nvar useCustomCompareEffect = function (effect, deps, depsEqual) {\n    if (process.env.NODE_ENV !== 'production') {\n        if (!(deps instanceof Array) || !deps.length) {\n            console.warn('`useCustomCompareEffect` should not be used with no dependencies. Use React.useEffect instead.');\n        }\n        if (deps.every(isPrimitive)) {\n            console.warn('`useCustomCompareEffect` should not be used with dependencies that are all primitive values. Use React.useEffect instead.');\n        }\n        if (typeof depsEqual !== 'function') {\n            console.warn('`useCustomCompareEffect` should be used with depsEqual callback for comparing deps list');\n        }\n    }\n    var ref = useRef(undefined);\n    if (!ref.current || !depsEqual(deps, ref.current)) {\n        ref.current = deps;\n    }\n    useEffect(effect, ref.current);\n};\nexport default useCustomCompareEffect;\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useTimeoutFn(fn, ms) {\n    if (ms === void 0) { ms = 0; }\n    var ready = useRef(false);\n    var timeout = useRef();\n    var callback = useRef(fn);\n    var isReady = useCallback(function () { return ready.current; }, []);\n    var set = useCallback(function () {\n        ready.current = false;\n        timeout.current && clearTimeout(timeout.current);\n        timeout.current = setTimeout(function () {\n            ready.current = true;\n            callback.current();\n        }, ms);\n    }, [ms]);\n    var clear = useCallback(function () {\n        ready.current = null;\n        timeout.current && clearTimeout(timeout.current);\n    }, []);\n    // update ref when function changes\n    useEffect(function () {\n        callback.current = fn;\n    }, [fn]);\n    // set on mount, clear on unmount\n    useEffect(function () {\n        set();\n        return clear;\n    }, [ms]);\n    return [isReady, clear, set];\n}\n","import { useEffect } from 'react';\nimport useTimeoutFn from './useTimeoutFn';\nexport default function useDebounce(fn, ms, deps) {\n    if (ms === void 0) { ms = 0; }\n    if (deps === void 0) { deps = []; }\n    var _a = useTimeoutFn(fn, ms), isReady = _a[0], cancel = _a[1], reset = _a[2];\n    useEffect(reset, deps);\n    return [isReady, cancel];\n}\n","import useCustomCompareEffect from './useCustomCompareEffect';\nimport isDeepEqual from './misc/isDeepEqual';\nvar isPrimitive = function (val) { return val !== Object(val); };\nvar useDeepCompareEffect = function (effect, deps) {\n    if (process.env.NODE_ENV !== 'production') {\n        if (!(deps instanceof Array) || !deps.length) {\n            console.warn('`useDeepCompareEffect` should not be used with no dependencies. Use React.useEffect instead.');\n        }\n        if (deps.every(isPrimitive)) {\n            console.warn('`useDeepCompareEffect` should not be used with dependencies that are all primitive values. Use React.useEffect instead.');\n        }\n    }\n    useCustomCompareEffect(effect, deps, isDeepEqual);\n};\nexport default useDeepCompareEffect;\n","import { useState } from 'react';\nvar useDefault = function (defaultValue, initialValue) {\n    var _a = useState(initialValue), value = _a[0], setValue = _a[1];\n    if (value === undefined || value === null) {\n        return [defaultValue, setValue];\n    }\n    return [value, setValue];\n};\nexport default useDefault;\n","import { __spreadArrays } from \"tslib\";\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { noop, off, on } from './misc/util';\nvar createProcess = function (options) { return function (dataTransfer, event) {\n    var uri = dataTransfer.getData('text/uri-list');\n    if (uri) {\n        (options.onUri || noop)(uri, event);\n        return;\n    }\n    if (dataTransfer.files && dataTransfer.files.length) {\n        (options.onFiles || noop)(Array.from(dataTransfer.files), event);\n        return;\n    }\n    if (event.clipboardData) {\n        var text = event.clipboardData.getData('text');\n        (options.onText || noop)(text, event);\n        return;\n    }\n}; };\nvar useDrop = function (options, args) {\n    if (options === void 0) { options = {}; }\n    if (args === void 0) { args = []; }\n    var onFiles = options.onFiles, onText = options.onText, onUri = options.onUri;\n    var _a = useState(false), over = _a[0], setOverRaw = _a[1];\n    var setOver = useCallback(setOverRaw, []);\n    var process = useMemo(function () { return createProcess(options); }, [onFiles, onText, onUri]);\n    useEffect(function () {\n        var onDragOver = function (event) {\n            event.preventDefault();\n            setOver(true);\n        };\n        var onDragEnter = function (event) {\n            event.preventDefault();\n            setOver(true);\n        };\n        var onDragLeave = function () {\n            setOver(false);\n        };\n        var onDragExit = function () {\n            setOver(false);\n        };\n        var onDrop = function (event) {\n            event.preventDefault();\n            setOver(false);\n            process(event.dataTransfer, event);\n        };\n        var onPaste = function (event) {\n            process(event.clipboardData, event);\n        };\n        on(document, 'dragover', onDragOver);\n        on(document, 'dragenter', onDragEnter);\n        on(document, 'dragleave', onDragLeave);\n        on(document, 'dragexit', onDragExit);\n        on(document, 'drop', onDrop);\n        if (onText) {\n            on(document, 'paste', onPaste);\n        }\n        return function () {\n            off(document, 'dragover', onDragOver);\n            off(document, 'dragenter', onDragEnter);\n            off(document, 'dragleave', onDragLeave);\n            off(document, 'dragexit', onDragExit);\n            off(document, 'drop', onDrop);\n            off(document, 'paste', onPaste);\n        };\n    }, __spreadArrays([process], args));\n    return { over: over };\n};\nexport default useDrop;\n","import { useMemo, useState } from 'react';\nimport useMountedState from './useMountedState';\nimport { noop } from './misc/util';\n/*\nconst defaultState: DropAreaState = {\n  over: false,\n};\n*/\nvar createProcess = function (options, mounted) { return function (dataTransfer, event) {\n    var uri = dataTransfer.getData('text/uri-list');\n    if (uri) {\n        (options.onUri || noop)(uri, event);\n        return;\n    }\n    if (dataTransfer.files && dataTransfer.files.length) {\n        (options.onFiles || noop)(Array.from(dataTransfer.files), event);\n        return;\n    }\n    if (dataTransfer.items && dataTransfer.items.length) {\n        dataTransfer.items[0].getAsString(function (text) {\n            if (mounted) {\n                (options.onText || noop)(text, event);\n            }\n        });\n    }\n}; };\nvar createBond = function (process, setOver) { return ({\n    onDragOver: function (event) {\n        event.preventDefault();\n    },\n    onDragEnter: function (event) {\n        event.preventDefault();\n        setOver(true);\n    },\n    onDragLeave: function () {\n        setOver(false);\n    },\n    onDrop: function (event) {\n        event.preventDefault();\n        event.persist();\n        setOver(false);\n        process(event.dataTransfer, event);\n    },\n    onPaste: function (event) {\n        event.persist();\n        process(event.clipboardData, event);\n    },\n}); };\nvar useDropArea = function (options) {\n    if (options === void 0) { options = {}; }\n    var onFiles = options.onFiles, onText = options.onText, onUri = options.onUri;\n    var isMounted = useMountedState();\n    var _a = useState(false), over = _a[0], setOver = _a[1];\n    var process = useMemo(function () { return createProcess(options, isMounted()); }, [onFiles, onText, onUri]);\n    var bond = useMemo(function () { return createBond(process, setOver); }, [process, setOver]);\n    return [bond, { over: over }];\n};\nexport default useDropArea;\n","import { useEffect } from 'react';\nvar useEffectOnce = function (effect) {\n    useEffect(effect, []);\n};\nexport default useEffectOnce;\n","import { forwardRef, useEffect, useRef, } from 'react';\nexport default function useEnsuredForwardedRef(forwardedRef) {\n    var ensuredRef = useRef(forwardedRef && forwardedRef.current);\n    useEffect(function () {\n        if (!forwardedRef) {\n            return;\n        }\n        forwardedRef.current = ensuredRef.current;\n    }, [forwardedRef]);\n    return ensuredRef;\n}\nexport function ensuredForwardRef(Component) {\n    return forwardRef(function (props, ref) {\n        var ensuredRef = useEnsuredForwardedRef(ref);\n        return Component(props, ensuredRef);\n    });\n}\n","import { useEffect } from 'react';\nimport { isBrowser, off, on } from './misc/util';\nvar defaultTarget = isBrowser ? window : null;\nvar isListenerType1 = function (target) {\n    return !!target.addEventListener;\n};\nvar isListenerType2 = function (target) {\n    return !!target.on;\n};\nvar useEvent = function (name, handler, target, options) {\n    if (target === void 0) { target = defaultTarget; }\n    useEffect(function () {\n        if (!handler) {\n            return;\n        }\n        if (!target) {\n            return;\n        }\n        if (isListenerType1(target)) {\n            on(target, name, handler, options);\n        }\n        else if (isListenerType2(target)) {\n            target.on(name, handler, options);\n        }\n        return function () {\n            if (isListenerType1(target)) {\n                off(target, name, handler, options);\n            }\n            else if (isListenerType2(target)) {\n                target.off(name, handler, options);\n            }\n        };\n    }, [name, handler, target, JSON.stringify(options)]);\n};\nexport default useEvent;\n","import { useCallback, useEffect, useState } from 'react';\nvar useError = function () {\n    var _a = useState(null), error = _a[0], setError = _a[1];\n    useEffect(function () {\n        if (error) {\n            throw error;\n        }\n    }, [error]);\n    var dispatchError = useCallback(function (err) {\n        setError(err);\n    }, []);\n    return dispatchError;\n};\nexport default useError;\n","import { useEffect } from 'react';\nvar useFavicon = function (href) {\n    useEffect(function () {\n        var link = document.querySelector(\"link[rel*='icon']\") || document.createElement('link');\n        link.type = 'image/x-icon';\n        link.rel = 'shortcut icon';\n        link.href = href;\n        document.getElementsByTagName('head')[0].appendChild(link);\n    }, [href]);\n};\nexport default useFavicon;\n","/*!\n* screenfull\n* v5.2.0 - 2021-11-03\n* (c) Sindre Sorhus; MIT License\n*/\n(function () {\n\t'use strict';\n\n\tvar document = typeof window !== 'undefined' && typeof window.document !== 'undefined' ? window.document : {};\n\tvar isCommonjs = typeof module !== 'undefined' && module.exports;\n\n\tvar fn = (function () {\n\t\tvar val;\n\n\t\tvar fnMap = [\n\t\t\t[\n\t\t\t\t'requestFullscreen',\n\t\t\t\t'exitFullscreen',\n\t\t\t\t'fullscreenElement',\n\t\t\t\t'fullscreenEnabled',\n\t\t\t\t'fullscreenchange',\n\t\t\t\t'fullscreenerror'\n\t\t\t],\n\t\t\t// New WebKit\n\t\t\t[\n\t\t\t\t'webkitRequestFullscreen',\n\t\t\t\t'webkitExitFullscreen',\n\t\t\t\t'webkitFullscreenElement',\n\t\t\t\t'webkitFullscreenEnabled',\n\t\t\t\t'webkitfullscreenchange',\n\t\t\t\t'webkitfullscreenerror'\n\n\t\t\t],\n\t\t\t// Old WebKit\n\t\t\t[\n\t\t\t\t'webkitRequestFullScreen',\n\t\t\t\t'webkitCancelFullScreen',\n\t\t\t\t'webkitCurrentFullScreenElement',\n\t\t\t\t'webkitCancelFullScreen',\n\t\t\t\t'webkitfullscreenchange',\n\t\t\t\t'webkitfullscreenerror'\n\n\t\t\t],\n\t\t\t[\n\t\t\t\t'mozRequestFullScreen',\n\t\t\t\t'mozCancelFullScreen',\n\t\t\t\t'mozFullScreenElement',\n\t\t\t\t'mozFullScreenEnabled',\n\t\t\t\t'mozfullscreenchange',\n\t\t\t\t'mozfullscreenerror'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'msRequestFullscreen',\n\t\t\t\t'msExitFullscreen',\n\t\t\t\t'msFullscreenElement',\n\t\t\t\t'msFullscreenEnabled',\n\t\t\t\t'MSFullscreenChange',\n\t\t\t\t'MSFullscreenError'\n\t\t\t]\n\t\t];\n\n\t\tvar i = 0;\n\t\tvar l = fnMap.length;\n\t\tvar ret = {};\n\n\t\tfor (; i < l; i++) {\n\t\t\tval = fnMap[i];\n\t\t\tif (val && val[1] in document) {\n\t\t\t\tfor (i = 0; i < val.length; i++) {\n\t\t\t\t\tret[fnMap[0][i]] = val[i];\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t})();\n\n\tvar eventNameMap = {\n\t\tchange: fn.fullscreenchange,\n\t\terror: fn.fullscreenerror\n\t};\n\n\tvar screenfull = {\n\t\trequest: function (element, options) {\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tvar onFullScreenEntered = function () {\n\t\t\t\t\tthis.off('change', onFullScreenEntered);\n\t\t\t\t\tresolve();\n\t\t\t\t}.bind(this);\n\n\t\t\t\tthis.on('change', onFullScreenEntered);\n\n\t\t\t\telement = element || document.documentElement;\n\n\t\t\t\tvar returnPromise = element[fn.requestFullscreen](options);\n\n\t\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\t\treturnPromise.then(onFullScreenEntered).catch(reject);\n\t\t\t\t}\n\t\t\t}.bind(this));\n\t\t},\n\t\texit: function () {\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tif (!this.isFullscreen) {\n\t\t\t\t\tresolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar onFullScreenExit = function () {\n\t\t\t\t\tthis.off('change', onFullScreenExit);\n\t\t\t\t\tresolve();\n\t\t\t\t}.bind(this);\n\n\t\t\t\tthis.on('change', onFullScreenExit);\n\n\t\t\t\tvar returnPromise = document[fn.exitFullscreen]();\n\n\t\t\t\tif (returnPromise instanceof Promise) {\n\t\t\t\t\treturnPromise.then(onFullScreenExit).catch(reject);\n\t\t\t\t}\n\t\t\t}.bind(this));\n\t\t},\n\t\ttoggle: function (element, options) {\n\t\t\treturn this.isFullscreen ? this.exit() : this.request(element, options);\n\t\t},\n\t\tonchange: function (callback) {\n\t\t\tthis.on('change', callback);\n\t\t},\n\t\tonerror: function (callback) {\n\t\t\tthis.on('error', callback);\n\t\t},\n\t\ton: function (event, callback) {\n\t\t\tvar eventName = eventNameMap[event];\n\t\t\tif (eventName) {\n\t\t\t\tdocument.addEventListener(eventName, callback, false);\n\t\t\t}\n\t\t},\n\t\toff: function (event, callback) {\n\t\t\tvar eventName = eventNameMap[event];\n\t\t\tif (eventName) {\n\t\t\t\tdocument.removeEventListener(eventName, callback, false);\n\t\t\t}\n\t\t},\n\t\traw: fn\n\t};\n\n\tif (!fn) {\n\t\tif (isCommonjs) {\n\t\t\tmodule.exports = {isEnabled: false};\n\t\t} else {\n\t\t\twindow.screenfull = {isEnabled: false};\n\t\t}\n\n\t\treturn;\n\t}\n\n\tObject.defineProperties(screenfull, {\n\t\tisFullscreen: {\n\t\t\tget: function () {\n\t\t\t\treturn Boolean(document[fn.fullscreenElement]);\n\t\t\t}\n\t\t},\n\t\telement: {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn document[fn.fullscreenElement];\n\t\t\t}\n\t\t},\n\t\tisEnabled: {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\t// Coerce to boolean in case of old WebKit\n\t\t\t\treturn Boolean(document[fn.fullscreenEnabled]);\n\t\t\t}\n\t\t}\n\t});\n\n\tif (isCommonjs) {\n\t\tmodule.exports = screenfull;\n\t} else {\n\t\twindow.screenfull = screenfull;\n\t}\n})();\n","import { useState } from 'react';\nimport screenfull from 'screenfull';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nimport { noop, off, on } from './misc/util';\nvar useFullscreen = function (ref, enabled, options) {\n    if (options === void 0) { options = {}; }\n    var video = options.video, _a = options.onClose, onClose = _a === void 0 ? noop : _a;\n    var _b = useState(enabled), isFullscreen = _b[0], setIsFullscreen = _b[1];\n    useIsomorphicLayoutEffect(function () {\n        if (!enabled) {\n            return;\n        }\n        if (!ref.current) {\n            return;\n        }\n        var onWebkitEndFullscreen = function () {\n            if (video === null || video === void 0 ? void 0 : video.current) {\n                off(video.current, 'webkitendfullscreen', onWebkitEndFullscreen);\n            }\n            onClose();\n        };\n        var onChange = function () {\n            if (screenfull.isEnabled) {\n                var isScreenfullFullscreen = screenfull.isFullscreen;\n                setIsFullscreen(isScreenfullFullscreen);\n                if (!isScreenfullFullscreen) {\n                    onClose();\n                }\n            }\n        };\n        if (screenfull.isEnabled) {\n            try {\n                screenfull.request(ref.current);\n                setIsFullscreen(true);\n            }\n            catch (error) {\n                onClose(error);\n                setIsFullscreen(false);\n            }\n            screenfull.on('change', onChange);\n        }\n        else if (video && video.current && video.current.webkitEnterFullscreen) {\n            video.current.webkitEnterFullscreen();\n            on(video.current, 'webkitendfullscreen', onWebkitEndFullscreen);\n            setIsFullscreen(true);\n        }\n        else {\n            onClose();\n            setIsFullscreen(false);\n        }\n        return function () {\n            setIsFullscreen(false);\n            if (screenfull.isEnabled) {\n                try {\n                    screenfull.off('change', onChange);\n                    screenfull.exit();\n                }\n                catch (_a) { }\n            }\n            else if (video && video.current && video.current.webkitExitFullscreen) {\n                off(video.current, 'webkitendfullscreen', onWebkitEndFullscreen);\n                video.current.webkitExitFullscreen();\n            }\n        };\n    }, [enabled, video, ref]);\n    return isFullscreen;\n};\nexport default useFullscreen;\n","import { __assign } from \"tslib\";\nimport { useEffect, useState } from 'react';\nvar useGeolocation = function (options) {\n    var _a = useState({\n        loading: true,\n        accuracy: null,\n        altitude: null,\n        altitudeAccuracy: null,\n        heading: null,\n        latitude: null,\n        longitude: null,\n        speed: null,\n        timestamp: Date.now(),\n    }), state = _a[0], setState = _a[1];\n    var mounted = true;\n    var watchId;\n    var onEvent = function (event) {\n        if (mounted) {\n            setState({\n                loading: false,\n                accuracy: event.coords.accuracy,\n                altitude: event.coords.altitude,\n                altitudeAccuracy: event.coords.altitudeAccuracy,\n                heading: event.coords.heading,\n                latitude: event.coords.latitude,\n                longitude: event.coords.longitude,\n                speed: event.coords.speed,\n                timestamp: event.timestamp,\n            });\n        }\n    };\n    var onEventError = function (error) {\n        return mounted && setState(function (oldState) { return (__assign(__assign({}, oldState), { loading: false, error: error })); });\n    };\n    useEffect(function () {\n        navigator.geolocation.getCurrentPosition(onEvent, onEventError, options);\n        watchId = navigator.geolocation.watchPosition(onEvent, onEventError, options);\n        return function () {\n            mounted = false;\n            navigator.geolocation.clearWatch(watchId);\n        };\n    }, []);\n    return state;\n};\nexport default useGeolocation;\n","import { __assign } from \"tslib\";\nimport { useCallback, useRef } from 'react';\nimport useUpdate from './useUpdate';\nvar useGetSetState = function (initialState) {\n    if (initialState === void 0) { initialState = {}; }\n    if (process.env.NODE_ENV !== 'production') {\n        if (typeof initialState !== 'object') {\n            console.error('useGetSetState initial state must be an object.');\n        }\n    }\n    var update = useUpdate();\n    var state = useRef(__assign({}, initialState));\n    var get = useCallback(function () { return state.current; }, []);\n    var set = useCallback(function (patch) {\n        if (!patch) {\n            return;\n        }\n        if (process.env.NODE_ENV !== 'production') {\n            if (typeof patch !== 'object') {\n                console.error('useGetSetState setter patch must be an object.');\n            }\n        }\n        Object.assign(state.current, patch);\n        update();\n    }, []);\n    return [get, set];\n};\nexport default useGetSetState;\n","var counter = 0;\r\nvar buckets = {};\r\nvar setHarmonicInterval = function (fn, ms) {\r\n    var _a;\r\n    var id = counter++;\r\n    if (buckets[ms]) {\r\n        buckets[ms].listeners[id] = fn;\r\n    }\r\n    else {\r\n        var timer = setInterval(function () {\r\n            var listeners = buckets[ms].listeners;\r\n            var didThrow = false;\r\n            var lastError;\r\n            for (var _i = 0, _a = Object.values(listeners); _i < _a.length; _i++) {\r\n                var listener = _a[_i];\r\n                try {\r\n                    listener();\r\n                }\r\n                catch (error) {\r\n                    didThrow = true;\r\n                    lastError = error;\r\n                }\r\n            }\r\n            if (didThrow)\r\n                throw lastError;\r\n        }, ms);\r\n        buckets[ms] = {\r\n            ms: ms,\r\n            timer: timer,\r\n            listeners: (_a = {},\r\n                _a[id] = fn,\r\n                _a),\r\n        };\r\n    }\r\n    return {\r\n        bucket: buckets[ms],\r\n        id: id,\r\n    };\r\n};\r\nvar clearHarmonicInterval = function (_a) {\r\n    var bucket = _a.bucket, id = _a.id;\r\n    delete bucket.listeners[id];\r\n    var hasListeners = false;\r\n    for (var listener in bucket.listeners) {\r\n        hasListeners = true;\r\n        break;\r\n    }\r\n    if (!hasListeners) {\r\n        clearInterval(bucket.timer);\r\n        delete buckets[bucket.ms];\r\n    }\r\n};\n\nexport { clearHarmonicInterval, setHarmonicInterval };\n","import { useEffect, useRef } from 'react';\nimport { clearHarmonicInterval, setHarmonicInterval } from 'set-harmonic-interval';\nvar useHarmonicIntervalFn = function (fn, delay) {\n    if (delay === void 0) { delay = 0; }\n    var latestCallback = useRef(function () { });\n    useEffect(function () {\n        latestCallback.current = fn;\n    });\n    useEffect(function () {\n        if (delay !== null) {\n            var interval_1 = setHarmonicInterval(function () { return latestCallback.current(); }, delay);\n            return function () { return clearHarmonicInterval(interval_1); };\n        }\n        return undefined;\n    }, [delay]);\n};\nexport default useHarmonicIntervalFn;\n","import * as React from 'react';\nimport { noop } from './misc/util';\nvar useState = React.useState;\nvar useHover = function (element) {\n    var _a = useState(false), state = _a[0], setState = _a[1];\n    var onMouseEnter = function (originalOnMouseEnter) { return function (event) {\n        (originalOnMouseEnter || noop)(event);\n        setState(true);\n    }; };\n    var onMouseLeave = function (originalOnMouseLeave) { return function (event) {\n        (originalOnMouseLeave || noop)(event);\n        setState(false);\n    }; };\n    if (typeof element === 'function') {\n        element = element(state);\n    }\n    var el = React.cloneElement(element, {\n        onMouseEnter: onMouseEnter(element.props.onMouseEnter),\n        onMouseLeave: onMouseLeave(element.props.onMouseLeave),\n    });\n    return [el, state];\n};\nexport default useHover;\n","import { useEffect, useState } from 'react';\nimport { off, on } from './misc/util';\n// kudos: https://usehooks.com/\nvar useHoverDirty = function (ref, enabled) {\n    if (enabled === void 0) { enabled = true; }\n    if (process.env.NODE_ENV === 'development') {\n        if (typeof ref !== 'object' || typeof ref.current === 'undefined') {\n            console.error('useHoverDirty expects a single ref argument.');\n        }\n    }\n    var _a = useState(false), value = _a[0], setValue = _a[1];\n    useEffect(function () {\n        var onMouseOver = function () { return setValue(true); };\n        var onMouseOut = function () { return setValue(false); };\n        if (enabled && ref && ref.current) {\n            on(ref.current, 'mouseover', onMouseOver);\n            on(ref.current, 'mouseout', onMouseOut);\n        }\n        // fixes react-hooks/exhaustive-deps warning about stale ref elements\n        var current = ref.current;\n        return function () {\n            if (enabled && current) {\n                off(current, 'mouseover', onMouseOver);\n                off(current, 'mouseout', onMouseOut);\n            }\n        };\n    }, [enabled, ref]);\n    return value;\n};\nexport default useHoverDirty;\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nfunction throttle (delay, noTrailing, callback, debounceMode) {\n  /*\n   * After wrapper has stopped being called, this timeout ensures that\n   * `callback` is executed at the proper times in `throttle` and `end`\n   * debounce modes.\n   */\n  var timeoutID;\n  var cancelled = false; // Keep track of the last time `callback` was executed.\n\n  var lastExec = 0; // Function to clear existing timeout\n\n  function clearExistingTimeout() {\n    if (timeoutID) {\n      clearTimeout(timeoutID);\n    }\n  } // Function to cancel next exec\n\n\n  function cancel() {\n    clearExistingTimeout();\n    cancelled = true;\n  } // `noTrailing` defaults to falsy.\n\n\n  if (typeof noTrailing !== 'boolean') {\n    debounceMode = callback;\n    callback = noTrailing;\n    noTrailing = undefined;\n  }\n  /*\n   * The `wrapper` function encapsulates all of the throttling / debouncing\n   * functionality and when executed will limit the rate at which `callback`\n   * is executed.\n   */\n\n\n  function wrapper() {\n    for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {\n      arguments_[_key] = arguments[_key];\n    }\n\n    var self = this;\n    var elapsed = Date.now() - lastExec;\n\n    if (cancelled) {\n      return;\n    } // Execute `callback` and update the `lastExec` timestamp.\n\n\n    function exec() {\n      lastExec = Date.now();\n      callback.apply(self, arguments_);\n    }\n    /*\n     * If `debounceMode` is true (at begin) this is used to clear the flag\n     * to allow future `callback` executions.\n     */\n\n\n    function clear() {\n      timeoutID = undefined;\n    }\n\n    if (debounceMode && !timeoutID) {\n      /*\n       * Since `wrapper` is being called for the first time and\n       * `debounceMode` is true (at begin), execute `callback`.\n       */\n      exec();\n    }\n\n    clearExistingTimeout();\n\n    if (debounceMode === undefined && elapsed > delay) {\n      /*\n       * In throttle mode, if `delay` time has been exceeded, execute\n       * `callback`.\n       */\n      exec();\n    } else if (noTrailing !== true) {\n      /*\n       * In trailing throttle mode, since `delay` time has not been\n       * exceeded, schedule `callback` to execute `delay` ms after most\n       * recent execution.\n       *\n       * If `debounceMode` is true (at begin), schedule `clear` to execute\n       * after `delay` ms.\n       *\n       * If `debounceMode` is false (at end), schedule `callback` to\n       * execute after `delay` ms.\n       */\n      timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);\n    }\n  }\n\n  wrapper.cancel = cancel; // Return the wrapper function.\n\n  return wrapper;\n}\n\n/* eslint-disable no-undefined */\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\n\nfunction debounce (delay, atBegin, callback) {\n  return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false);\n}\n\nexport { debounce, throttle };\n//# sourceMappingURL=index.js.map\n","import { useEffect, useState } from 'react';\nimport { throttle } from 'throttle-debounce';\nimport { off, on } from './misc/util';\nvar defaultEvents = ['mousemove', 'mousedown', 'resize', 'keydown', 'touchstart', 'wheel'];\nvar oneMinute = 60e3;\nvar useIdle = function (ms, initialState, events) {\n    if (ms === void 0) { ms = oneMinute; }\n    if (initialState === void 0) { initialState = false; }\n    if (events === void 0) { events = defaultEvents; }\n    var _a = useState(initialState), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var mounted = true;\n        var timeout;\n        var localState = state;\n        var set = function (newState) {\n            if (mounted) {\n                localState = newState;\n                setState(newState);\n            }\n        };\n        var onEvent = throttle(50, function () {\n            if (localState) {\n                set(false);\n            }\n            clearTimeout(timeout);\n            timeout = setTimeout(function () { return set(true); }, ms);\n        });\n        var onVisibility = function () {\n            if (!document.hidden) {\n                onEvent();\n            }\n        };\n        for (var i = 0; i < events.length; i++) {\n            on(window, events[i], onEvent);\n        }\n        on(document, 'visibilitychange', onVisibility);\n        timeout = setTimeout(function () { return set(true); }, ms);\n        return function () {\n            mounted = false;\n            for (var i = 0; i < events.length; i++) {\n                off(window, events[i], onEvent);\n            }\n            off(document, 'visibilitychange', onVisibility);\n        };\n    }, [ms, events]);\n    return state;\n};\nexport default useIdle;\n","import { useEffect, useState } from 'react';\nvar useIntersection = function (ref, options) {\n    var _a = useState(null), intersectionObserverEntry = _a[0], setIntersectionObserverEntry = _a[1];\n    useEffect(function () {\n        if (ref.current && typeof IntersectionObserver === 'function') {\n            var handler = function (entries) {\n                setIntersectionObserverEntry(entries[0]);\n            };\n            var observer_1 = new IntersectionObserver(handler, options);\n            observer_1.observe(ref.current);\n            return function () {\n                setIntersectionObserverEntry(null);\n                observer_1.disconnect();\n            };\n        }\n        return function () { };\n    }, [ref.current, options.threshold, options.root, options.rootMargin]);\n    return intersectionObserverEntry;\n};\nexport default useIntersection;\n","import { useEffect, useRef } from 'react';\nvar useInterval = function (callback, delay) {\n    var savedCallback = useRef(function () { });\n    useEffect(function () {\n        savedCallback.current = callback;\n    });\n    useEffect(function () {\n        if (delay !== null) {\n            var interval_1 = setInterval(function () { return savedCallback.current(); }, delay || 0);\n            return function () { return clearInterval(interval_1); };\n        }\n        return undefined;\n    }, [delay]);\n};\nexport default useInterval;\n","import { useMemo } from 'react';\nimport useEvent from './useEvent';\nimport { noop } from './misc/util';\nvar createKeyPredicate = function (keyFilter) {\n    return typeof keyFilter === 'function'\n        ? keyFilter\n        : typeof keyFilter === 'string'\n            ? function (event) { return event.key === keyFilter; }\n            : keyFilter\n                ? function () { return true; }\n                : function () { return false; };\n};\nvar useKey = function (key, fn, opts, deps) {\n    if (fn === void 0) { fn = noop; }\n    if (opts === void 0) { opts = {}; }\n    if (deps === void 0) { deps = [key]; }\n    var _a = opts.event, event = _a === void 0 ? 'keydown' : _a, target = opts.target, options = opts.options;\n    var useMemoHandler = useMemo(function () {\n        var predicate = createKeyPredicate(key);\n        var handler = function (handlerEvent) {\n            if (predicate(handlerEvent)) {\n                return fn(handlerEvent);\n            }\n        };\n        return handler;\n    }, deps);\n    useEvent(event, useMemoHandler, target, options);\n};\nexport default useKey;\n","import { useEffect, useMemo, useState } from 'react';\nimport { isBrowser, off, on } from '../misc/util';\nvar createBreakpoint = function (breakpoints) {\n    if (breakpoints === void 0) { breakpoints = { laptopL: 1440, laptop: 1024, tablet: 768 }; }\n    return function () {\n        var _a = useState(isBrowser ? window.innerWidth : 0), screen = _a[0], setScreen = _a[1];\n        useEffect(function () {\n            var setSideScreen = function () {\n                setScreen(window.innerWidth);\n            };\n            setSideScreen();\n            on(window, 'resize', setSideScreen);\n            return function () {\n                off(window, 'resize', setSideScreen);\n            };\n        });\n        var sortedBreakpoints = useMemo(function () { return Object.entries(breakpoints).sort(function (a, b) { return (a[1] >= b[1] ? 1 : -1); }); }, [breakpoints]);\n        var result = sortedBreakpoints.reduce(function (acc, _a) {\n            var name = _a[0], width = _a[1];\n            if (screen >= width) {\n                return name;\n            }\n            else {\n                return acc;\n            }\n        }, sortedBreakpoints[0][0]);\n        return result;\n    };\n};\nexport default createBreakpoint;\n","import { useState } from 'react';\nimport useKey from './useKey';\nvar useKeyPress = function (keyFilter) {\n    var _a = useState([false, null]), state = _a[0], set = _a[1];\n    useKey(keyFilter, function (event) { return set([true, event]); }, { event: 'keydown' }, [state]);\n    useKey(keyFilter, function (event) { return set([false, event]); }, { event: 'keyup' }, [state]);\n    return state;\n};\nexport default useKeyPress;\n","import useKeyPressDefault from './useKeyPress';\nimport useUpdateEffect from './useUpdateEffect';\nvar useKeyPressEvent = function (key, keydown, keyup, useKeyPress) {\n    if (useKeyPress === void 0) { useKeyPress = useKeyPressDefault; }\n    var _a = useKeyPress(key), pressed = _a[0], event = _a[1];\n    useUpdateEffect(function () {\n        if (!pressed && keyup) {\n            keyup(event);\n        }\n        else if (pressed && keydown) {\n            keydown(event);\n        }\n    }, [pressed]);\n};\nexport default useKeyPressEvent;\n","import { useRef } from 'react';\nvar useLatest = function (value) {\n    var ref = useRef(value);\n    ref.current = value;\n    return ref;\n};\nexport default useLatest;\n","import { useEffect } from 'react';\nvar useLifecycles = function (mount, unmount) {\n    useEffect(function () {\n        if (mount) {\n            mount();\n        }\n        return function () {\n            if (unmount) {\n                unmount();\n            }\n        };\n    }, []);\n};\nexport default useLifecycles;\n","import { useMemo, useRef } from 'react';\nimport useUpdate from './useUpdate';\nimport { resolveHookState } from './misc/hookState';\nfunction useList(initialList) {\n    if (initialList === void 0) { initialList = []; }\n    var list = useRef(resolveHookState(initialList));\n    var update = useUpdate();\n    var actions = useMemo(function () {\n        var a = {\n            set: function (newList) {\n                list.current = resolveHookState(newList, list.current);\n                update();\n            },\n            push: function () {\n                var items = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    items[_i] = arguments[_i];\n                }\n                items.length && actions.set(function (curr) { return curr.concat(items); });\n            },\n            updateAt: function (index, item) {\n                actions.set(function (curr) {\n                    var arr = curr.slice();\n                    arr[index] = item;\n                    return arr;\n                });\n            },\n            insertAt: function (index, item) {\n                actions.set(function (curr) {\n                    var arr = curr.slice();\n                    index > arr.length ? (arr[index] = item) : arr.splice(index, 0, item);\n                    return arr;\n                });\n            },\n            update: function (predicate, newItem) {\n                actions.set(function (curr) { return curr.map(function (item) { return (predicate(item, newItem) ? newItem : item); }); });\n            },\n            updateFirst: function (predicate, newItem) {\n                var index = list.current.findIndex(function (item) { return predicate(item, newItem); });\n                index >= 0 && actions.updateAt(index, newItem);\n            },\n            upsert: function (predicate, newItem) {\n                var index = list.current.findIndex(function (item) { return predicate(item, newItem); });\n                index >= 0 ? actions.updateAt(index, newItem) : actions.push(newItem);\n            },\n            sort: function (compareFn) {\n                actions.set(function (curr) { return curr.slice().sort(compareFn); });\n            },\n            filter: function (callbackFn, thisArg) {\n                actions.set(function (curr) { return curr.slice().filter(callbackFn, thisArg); });\n            },\n            removeAt: function (index) {\n                actions.set(function (curr) {\n                    var arr = curr.slice();\n                    arr.splice(index, 1);\n                    return arr;\n                });\n            },\n            clear: function () {\n                actions.set([]);\n            },\n            reset: function () {\n                actions.set(resolveHookState(initialList).slice());\n            },\n        };\n        /**\n         * @deprecated Use removeAt method instead\n         */\n        a.remove = a.removeAt;\n        return a;\n    }, []);\n    return [list.current, actions];\n}\nexport default useList;\n","import { useCallback, useState, useRef, useLayoutEffect } from 'react';\nimport { isBrowser, noop } from './misc/util';\nvar useLocalStorage = function (key, initialValue, options) {\n    if (!isBrowser) {\n        return [initialValue, noop, noop];\n    }\n    if (!key) {\n        throw new Error('useLocalStorage key may not be falsy');\n    }\n    var deserializer = options\n        ? options.raw\n            ? function (value) { return value; }\n            : options.deserializer\n        : JSON.parse;\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var initializer = useRef(function (key) {\n        try {\n            var serializer = options ? (options.raw ? String : options.serializer) : JSON.stringify;\n            var localStorageValue = localStorage.getItem(key);\n            if (localStorageValue !== null) {\n                return deserializer(localStorageValue);\n            }\n            else {\n                initialValue && localStorage.setItem(key, serializer(initialValue));\n                return initialValue;\n            }\n        }\n        catch (_a) {\n            // If user is in private mode or has storage restriction\n            // localStorage can throw. JSON.parse and JSON.stringify\n            // can throw, too.\n            return initialValue;\n        }\n    });\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var _a = useState(function () { return initializer.current(key); }), state = _a[0], setState = _a[1];\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useLayoutEffect(function () { return setState(initializer.current(key)); }, [key]);\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var set = useCallback(function (valOrFunc) {\n        try {\n            var newState = typeof valOrFunc === 'function' ? valOrFunc(state) : valOrFunc;\n            if (typeof newState === 'undefined')\n                return;\n            var value = void 0;\n            if (options)\n                if (options.raw)\n                    if (typeof newState === 'string')\n                        value = newState;\n                    else\n                        value = JSON.stringify(newState);\n                else if (options.serializer)\n                    value = options.serializer(newState);\n                else\n                    value = JSON.stringify(newState);\n            else\n                value = JSON.stringify(newState);\n            localStorage.setItem(key, value);\n            setState(deserializer(value));\n        }\n        catch (_a) {\n            // If user is in private mode or has storage restriction\n            // localStorage can throw. Also JSON.stringify can throw.\n        }\n    }, [key, setState]);\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var remove = useCallback(function () {\n        try {\n            localStorage.removeItem(key);\n            setState(undefined);\n        }\n        catch (_a) {\n            // If user is in private mode or has storage restriction\n            // localStorage can throw.\n        }\n    }, [key, setState]);\n    return [state, set, remove];\n};\nexport default useLocalStorage;\n","import { useEffect, useState } from 'react';\nimport { isBrowser, off, on } from './misc/util';\nvar patchHistoryMethod = function (method) {\n    var history = window.history;\n    var original = history[method];\n    history[method] = function (state) {\n        var result = original.apply(this, arguments);\n        var event = new Event(method.toLowerCase());\n        event.state = state;\n        window.dispatchEvent(event);\n        return result;\n    };\n};\nif (isBrowser) {\n    patchHistoryMethod('pushState');\n    patchHistoryMethod('replaceState');\n}\nvar useLocationServer = function () { return ({\n    trigger: 'load',\n    length: 1,\n}); };\nvar buildState = function (trigger) {\n    var _a = window.history, state = _a.state, length = _a.length;\n    var _b = window.location, hash = _b.hash, host = _b.host, hostname = _b.hostname, href = _b.href, origin = _b.origin, pathname = _b.pathname, port = _b.port, protocol = _b.protocol, search = _b.search;\n    return {\n        trigger: trigger,\n        state: state,\n        length: length,\n        hash: hash,\n        host: host,\n        hostname: hostname,\n        href: href,\n        origin: origin,\n        pathname: pathname,\n        port: port,\n        protocol: protocol,\n        search: search,\n    };\n};\nvar useLocationBrowser = function () {\n    var _a = useState(buildState('load')), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var onPopstate = function () { return setState(buildState('popstate')); };\n        var onPushstate = function () { return setState(buildState('pushstate')); };\n        var onReplacestate = function () { return setState(buildState('replacestate')); };\n        on(window, 'popstate', onPopstate);\n        on(window, 'pushstate', onPushstate);\n        on(window, 'replacestate', onReplacestate);\n        return function () {\n            off(window, 'popstate', onPopstate);\n            off(window, 'pushstate', onPushstate);\n            off(window, 'replacestate', onReplacestate);\n        };\n    }, []);\n    return state;\n};\nvar hasEventConstructor = typeof Event === 'function';\nexport default isBrowser && hasEventConstructor ? useLocationBrowser : useLocationServer;\n","import { useEffect, useRef } from 'react';\nimport { isBrowser, off, on } from './misc/util';\nexport function getClosestBody(el) {\n    if (!el) {\n        return null;\n    }\n    else if (el.tagName === 'BODY') {\n        return el;\n    }\n    else if (el.tagName === 'IFRAME') {\n        var document_1 = el.contentDocument;\n        return document_1 ? document_1.body : null;\n    }\n    else if (!el.offsetParent) {\n        return null;\n    }\n    return getClosestBody(el.offsetParent);\n}\nfunction preventDefault(rawEvent) {\n    var e = rawEvent || window.event;\n    // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n    if (e.touches.length > 1)\n        return true;\n    if (e.preventDefault)\n        e.preventDefault();\n    return false;\n}\nvar isIosDevice = isBrowser &&\n    window.navigator &&\n    window.navigator.platform &&\n    /iP(ad|hone|od)/.test(window.navigator.platform);\nvar bodies = new Map();\nvar doc = typeof document === 'object' ? document : undefined;\nvar documentListenerAdded = false;\nexport default !doc\n    ? function useLockBodyMock(_locked, _elementRef) {\n        if (_locked === void 0) { _locked = true; }\n    }\n    : function useLockBody(locked, elementRef) {\n        if (locked === void 0) { locked = true; }\n        var bodyRef = useRef(doc.body);\n        elementRef = elementRef || bodyRef;\n        var lock = function (body) {\n            var bodyInfo = bodies.get(body);\n            if (!bodyInfo) {\n                bodies.set(body, { counter: 1, initialOverflow: body.style.overflow });\n                if (isIosDevice) {\n                    if (!documentListenerAdded) {\n                        on(document, 'touchmove', preventDefault, { passive: false });\n                        documentListenerAdded = true;\n                    }\n                }\n                else {\n                    body.style.overflow = 'hidden';\n                }\n            }\n            else {\n                bodies.set(body, {\n                    counter: bodyInfo.counter + 1,\n                    initialOverflow: bodyInfo.initialOverflow,\n                });\n            }\n        };\n        var unlock = function (body) {\n            var bodyInfo = bodies.get(body);\n            if (bodyInfo) {\n                if (bodyInfo.counter === 1) {\n                    bodies.delete(body);\n                    if (isIosDevice) {\n                        body.ontouchmove = null;\n                        if (documentListenerAdded) {\n                            off(document, 'touchmove', preventDefault);\n                            documentListenerAdded = false;\n                        }\n                    }\n                    else {\n                        body.style.overflow = bodyInfo.initialOverflow;\n                    }\n                }\n                else {\n                    bodies.set(body, {\n                        counter: bodyInfo.counter - 1,\n                        initialOverflow: bodyInfo.initialOverflow,\n                    });\n                }\n            }\n        };\n        useEffect(function () {\n            var body = getClosestBody(elementRef.current);\n            if (!body) {\n                return;\n            }\n            if (locked) {\n                lock(body);\n            }\n            else {\n                unlock(body);\n            }\n        }, [locked, elementRef.current]);\n        // clean up, on un-mount\n        useEffect(function () {\n            var body = getClosestBody(elementRef.current);\n            if (!body) {\n                return;\n            }\n            return function () {\n                unlock(body);\n            };\n        }, []);\n    };\n","import { __spreadArrays } from \"tslib\";\nimport useEffectOnce from './useEffectOnce';\nimport useUpdateEffect from './useUpdateEffect';\nvar useLogger = function (componentName) {\n    var rest = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        rest[_i - 1] = arguments[_i];\n    }\n    useEffectOnce(function () {\n        console.log.apply(console, __spreadArrays([componentName + \" mounted\"], rest));\n        return function () { return console.log(componentName + \" unmounted\"); };\n    });\n    useUpdateEffect(function () {\n        console.log.apply(console, __spreadArrays([componentName + \" updated\"], rest));\n    });\n};\nexport default useLogger;\n","import { useCallback, useRef } from 'react';\nimport { off, on } from './misc/util';\nvar isTouchEvent = function (ev) {\n    return 'touches' in ev;\n};\nvar preventDefault = function (ev) {\n    if (!isTouchEvent(ev))\n        return;\n    if (ev.touches.length < 2 && ev.preventDefault) {\n        ev.preventDefault();\n    }\n};\nvar useLongPress = function (callback, _a) {\n    var _b = _a === void 0 ? {} : _a, _c = _b.isPreventDefault, isPreventDefault = _c === void 0 ? true : _c, _d = _b.delay, delay = _d === void 0 ? 300 : _d;\n    var timeout = useRef();\n    var target = useRef();\n    var start = useCallback(function (event) {\n        // prevent ghost click on mobile devices\n        if (isPreventDefault && event.target) {\n            on(event.target, 'touchend', preventDefault, { passive: false });\n            target.current = event.target;\n        }\n        timeout.current = setTimeout(function () { return callback(event); }, delay);\n    }, [callback, delay, isPreventDefault]);\n    var clear = useCallback(function () {\n        // clearTimeout and removeEventListener\n        timeout.current && clearTimeout(timeout.current);\n        if (isPreventDefault && target.current) {\n            off(target.current, 'touchend', preventDefault);\n        }\n    }, [isPreventDefault]);\n    return {\n        onMouseDown: function (e) { return start(e); },\n        onTouchStart: function (e) { return start(e); },\n        onMouseUp: clear,\n        onMouseLeave: clear,\n        onTouchEnd: clear,\n    };\n};\nexport default useLongPress;\n","import { __assign, __rest } from \"tslib\";\nimport { useCallback, useMemo, useState } from 'react';\nvar useMap = function (initialMap) {\n    if (initialMap === void 0) { initialMap = {}; }\n    var _a = useState(initialMap), map = _a[0], set = _a[1];\n    var stableActions = useMemo(function () { return ({\n        set: function (key, entry) {\n            set(function (prevMap) {\n                var _a;\n                return (__assign(__assign({}, prevMap), (_a = {}, _a[key] = entry, _a)));\n            });\n        },\n        setAll: function (newMap) {\n            set(newMap);\n        },\n        remove: function (key) {\n            set(function (prevMap) {\n                var _a = prevMap, _b = key, omit = _a[_b], rest = __rest(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n                return rest;\n            });\n        },\n        reset: function () { return set(initialMap); },\n    }); }, [set]);\n    var utils = __assign({ get: useCallback(function (key) { return map[key]; }, [map]) }, stableActions);\n    return [map, utils];\n};\nexport default useMap;\n","import { useEffect, useState } from 'react';\nimport { isBrowser } from './misc/util';\nvar getInitialState = function (query, defaultState) {\n    // Prevent a React hydration mismatch when a default value is provided by not defaulting to window.matchMedia(query).matches.\n    if (defaultState !== undefined) {\n        return defaultState;\n    }\n    if (isBrowser) {\n        return window.matchMedia(query).matches;\n    }\n    // A default value has not been provided, and you are rendering on the server, warn of a possible hydration mismatch when defaulting to false.\n    if (process.env.NODE_ENV !== 'production') {\n        console.warn('`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches.');\n    }\n    return false;\n};\nvar useMedia = function (query, defaultState) {\n    var _a = useState(getInitialState(query, defaultState)), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var mounted = true;\n        var mql = window.matchMedia(query);\n        var onChange = function () {\n            if (!mounted) {\n                return;\n            }\n            setState(!!mql.matches);\n        };\n        mql.addEventListener('change', onChange);\n        setState(mql.matches);\n        return function () {\n            mounted = false;\n            mql.removeEventListener('change', onChange);\n        };\n    }, [query]);\n    return state;\n};\nexport default useMedia;\n","import { useEffect, useState } from 'react';\nimport { isNavigator, noop, off, on } from './misc/util';\nvar useMediaDevices = function () {\n    var _a = useState({}), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var mounted = true;\n        var onChange = function () {\n            navigator.mediaDevices\n                .enumerateDevices()\n                .then(function (devices) {\n                if (mounted) {\n                    setState({\n                        devices: devices.map(function (_a) {\n                            var deviceId = _a.deviceId, groupId = _a.groupId, kind = _a.kind, label = _a.label;\n                            return ({\n                                deviceId: deviceId,\n                                groupId: groupId,\n                                kind: kind,\n                                label: label,\n                            });\n                        }),\n                    });\n                }\n            })\n                .catch(noop);\n        };\n        on(navigator.mediaDevices, 'devicechange', onChange);\n        onChange();\n        return function () {\n            mounted = false;\n            off(navigator.mediaDevices, 'devicechange', onChange);\n        };\n    }, []);\n    return state;\n};\nvar useMediaDevicesMock = function () { return ({}); };\nexport default isNavigator && !!navigator.mediaDevices ? useMediaDevices : useMediaDevicesMock;\n","import { useCallback, useRef, useState } from 'react';\nexport function useMediatedState(mediator, initialState) {\n    var mediatorFn = useRef(mediator);\n    var _a = useState(initialState), state = _a[0], setMediatedState = _a[1];\n    var setState = useCallback(function (newState) {\n        if (mediatorFn.current.length === 2) {\n            mediatorFn.current(newState, setMediatedState);\n        }\n        else {\n            setMediatedState(mediatorFn.current(newState));\n        }\n    }, [state]);\n    return [state, setState];\n}\n","import { useMemo, useReducer } from 'react';\nvar useMethods = function (createMethods, initialState) {\n    var reducer = useMemo(function () { return function (reducerState, action) {\n        var _a;\n        return (_a = createMethods(reducerState))[action.type].apply(_a, action.payload);\n    }; }, [createMethods]);\n    var _a = useReducer(reducer, initialState), state = _a[0], dispatch = _a[1];\n    var wrappedMethods = useMemo(function () {\n        var actionTypes = Object.keys(createMethods(initialState));\n        return actionTypes.reduce(function (acc, type) {\n            acc[type] = function () {\n                var payload = [];\n                for (var _i = 0; _i < arguments.length; _i++) {\n                    payload[_i] = arguments[_i];\n                }\n                return dispatch({ type: type, payload: payload });\n            };\n            return acc;\n        }, {});\n    }, [createMethods, initialState]);\n    return [state, wrappedMethods];\n};\nexport default useMethods;\n","import { useEffect, useState } from 'react';\nimport { off, on } from './misc/util';\nvar defaultState = {\n    acceleration: {\n        x: null,\n        y: null,\n        z: null,\n    },\n    accelerationIncludingGravity: {\n        x: null,\n        y: null,\n        z: null,\n    },\n    rotationRate: {\n        alpha: null,\n        beta: null,\n        gamma: null,\n    },\n    interval: 16,\n};\nvar useMotion = function (initialState) {\n    if (initialState === void 0) { initialState = defaultState; }\n    var _a = useState(initialState), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var handler = function (event) {\n            var acceleration = event.acceleration, accelerationIncludingGravity = event.accelerationIncludingGravity, rotationRate = event.rotationRate, interval = event.interval;\n            setState({\n                acceleration: {\n                    x: acceleration.x,\n                    y: acceleration.y,\n                    z: acceleration.z,\n                },\n                accelerationIncludingGravity: {\n                    x: accelerationIncludingGravity.x,\n                    y: accelerationIncludingGravity.y,\n                    z: accelerationIncludingGravity.z,\n                },\n                rotationRate: {\n                    alpha: rotationRate.alpha,\n                    beta: rotationRate.beta,\n                    gamma: rotationRate.gamma,\n                },\n                interval: interval,\n            });\n        };\n        on(window, 'devicemotion', handler);\n        return function () {\n            off(window, 'devicemotion', handler);\n        };\n    }, []);\n    return state;\n};\nexport default useMotion;\n","import useEffectOnce from './useEffectOnce';\nvar useMount = function (fn) {\n    useEffectOnce(function () {\n        fn();\n    });\n};\nexport default useMount;\n","import { useRef } from 'react';\nimport useEffectOnce from './useEffectOnce';\nvar useUnmount = function (fn) {\n    var fnRef = useRef(fn);\n    // update the ref each render so if it change the newest callback will be invoked\n    fnRef.current = fn;\n    useEffectOnce(function () { return function () { return fnRef.current(); }; });\n};\nexport default useUnmount;\n","import { useCallback, useRef, useState } from 'react';\nimport useUnmount from './useUnmount';\nvar useRafState = function (initialState) {\n    var frame = useRef(0);\n    var _a = useState(initialState), state = _a[0], setState = _a[1];\n    var setRafState = useCallback(function (value) {\n        cancelAnimationFrame(frame.current);\n        frame.current = requestAnimationFrame(function () {\n            setState(value);\n        });\n    }, []);\n    useUnmount(function () {\n        cancelAnimationFrame(frame.current);\n    });\n    return [state, setRafState];\n};\nexport default useRafState;\n","import { useEffect } from 'react';\nimport useRafState from './useRafState';\nimport { off, on } from './misc/util';\nvar useMouse = function (ref) {\n    if (process.env.NODE_ENV === 'development') {\n        if (typeof ref !== 'object' || typeof ref.current === 'undefined') {\n            console.error('useMouse expects a single ref argument.');\n        }\n    }\n    var _a = useRafState({\n        docX: 0,\n        docY: 0,\n        posX: 0,\n        posY: 0,\n        elX: 0,\n        elY: 0,\n        elH: 0,\n        elW: 0,\n    }), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var moveHandler = function (event) {\n            if (ref && ref.current) {\n                var _a = ref.current.getBoundingClientRect(), left = _a.left, top_1 = _a.top, elW = _a.width, elH = _a.height;\n                var posX = left + window.pageXOffset;\n                var posY = top_1 + window.pageYOffset;\n                var elX = event.pageX - posX;\n                var elY = event.pageY - posY;\n                setState({\n                    docX: event.pageX,\n                    docY: event.pageY,\n                    posX: posX,\n                    posY: posY,\n                    elX: elX,\n                    elY: elY,\n                    elH: elH,\n                    elW: elW,\n                });\n            }\n        };\n        on(document, 'mousemove', moveHandler);\n        return function () {\n            off(document, 'mousemove', moveHandler);\n        };\n    }, [ref]);\n    return state;\n};\nexport default useMouse;\n","import useHoverDirty from './useHoverDirty';\nimport useMouse from './useMouse';\nvar nullRef = { current: null };\nvar useMouseHovered = function (ref, options) {\n    if (options === void 0) { options = {}; }\n    var whenHovered = !!options.whenHovered;\n    var bound = !!options.bound;\n    var isHovered = useHoverDirty(ref, whenHovered);\n    var state = useMouse(whenHovered && !isHovered ? nullRef : ref);\n    if (bound) {\n        state.elX = Math.max(0, Math.min(state.elX, state.elW));\n        state.elY = Math.max(0, Math.min(state.elY, state.elH));\n    }\n    return state;\n};\nexport default useMouseHovered;\n","import { useEffect, useState } from 'react';\nimport { off, on } from './misc/util';\nexport default (function () {\n    var _a = useState(0), mouseWheelScrolled = _a[0], setMouseWheelScrolled = _a[1];\n    useEffect(function () {\n        var updateScroll = function (e) {\n            setMouseWheelScrolled(e.deltaY + mouseWheelScrolled);\n        };\n        on(window, 'wheel', updateScroll, false);\n        return function () { return off(window, 'wheel', updateScroll); };\n    });\n    return mouseWheelScrolled;\n});\n","import { useEffect, useState } from 'react';\nimport { isNavigator, off, on } from './misc/util';\nvar nav = isNavigator ? navigator : undefined;\nvar conn = nav && (nav.connection || nav.mozConnection || nav.webkitConnection);\nfunction getConnectionState(previousState) {\n    var online = nav === null || nav === void 0 ? void 0 : nav.onLine;\n    var previousOnline = previousState === null || previousState === void 0 ? void 0 : previousState.online;\n    return {\n        online: online,\n        previous: previousOnline,\n        since: online !== previousOnline ? new Date() : previousState === null || previousState === void 0 ? void 0 : previousState.since,\n        downlink: conn === null || conn === void 0 ? void 0 : conn.downlink,\n        downlinkMax: conn === null || conn === void 0 ? void 0 : conn.downlinkMax,\n        effectiveType: conn === null || conn === void 0 ? void 0 : conn.effectiveType,\n        rtt: conn === null || conn === void 0 ? void 0 : conn.rtt,\n        saveData: conn === null || conn === void 0 ? void 0 : conn.saveData,\n        type: conn === null || conn === void 0 ? void 0 : conn.type,\n    };\n}\nexport default function useNetworkState(initialState) {\n    var _a = useState(initialState !== null && initialState !== void 0 ? initialState : getConnectionState), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var handleStateChange = function () {\n            setState(getConnectionState);\n        };\n        on(window, 'online', handleStateChange, { passive: true });\n        on(window, 'offline', handleStateChange, { passive: true });\n        if (conn) {\n            on(conn, 'change', handleStateChange, { passive: true });\n        }\n        return function () {\n            off(window, 'online', handleStateChange);\n            off(window, 'offline', handleStateChange);\n            if (conn) {\n                off(conn, 'change', handleStateChange);\n            }\n        };\n    }, []);\n    return state;\n}\n","import { useState } from 'react';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nfunction useObservable(observable$, initialValue) {\n    var _a = useState(initialValue), value = _a[0], update = _a[1];\n    useIsomorphicLayoutEffect(function () {\n        var s = observable$.subscribe(update);\n        return function () { return s.unsubscribe(); };\n    }, [observable$]);\n    return value;\n}\nexport default useObservable;\n","import { useEffect, useState } from 'react';\nimport { off, on } from './misc/util';\nvar defaultState = {\n    angle: 0,\n    type: 'landscape-primary',\n};\nvar useOrientation = function (initialState) {\n    if (initialState === void 0) { initialState = defaultState; }\n    var _a = useState(initialState), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var screen = window.screen;\n        var mounted = true;\n        var onChange = function () {\n            if (mounted) {\n                var orientation_1 = screen.orientation;\n                if (orientation_1) {\n                    var angle = orientation_1.angle, type = orientation_1.type;\n                    setState({ angle: angle, type: type });\n                }\n                else if (window.orientation !== undefined) {\n                    setState({\n                        angle: typeof window.orientation === 'number' ? window.orientation : 0,\n                        type: '',\n                    });\n                }\n                else {\n                    setState(initialState);\n                }\n            }\n        };\n        on(window, 'orientationchange', onChange);\n        onChange();\n        return function () {\n            mounted = false;\n            off(window, 'orientationchange', onChange);\n        };\n    }, []);\n    return state;\n};\nexport default useOrientation;\n","import { useEffect } from 'react';\nimport { off, on } from './misc/util';\nvar usePageLeave = function (onPageLeave, args) {\n    if (args === void 0) { args = []; }\n    useEffect(function () {\n        if (!onPageLeave) {\n            return;\n        }\n        var handler = function (event) {\n            event = event ? event : window.event;\n            var from = event.relatedTarget || event.toElement;\n            if (!from || from.nodeName === 'HTML') {\n                onPageLeave();\n            }\n        };\n        on(document, 'mouseout', handler);\n        return function () {\n            off(document, 'mouseout', handler);\n        };\n    }, args);\n};\nexport default usePageLeave;\n","import { useEffect, useState } from 'react';\nimport { noop, off, on } from './misc/util';\n// const usePermission = <T extends PermissionDescriptor>(permissionDesc: T): IState => {\nvar usePermission = function (permissionDesc) {\n    var _a = useState(''), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var mounted = true;\n        var permissionStatus = null;\n        var onChange = function () {\n            if (!mounted) {\n                return;\n            }\n            setState(function () { var _a; return (_a = permissionStatus === null || permissionStatus === void 0 ? void 0 : permissionStatus.state) !== null && _a !== void 0 ? _a : ''; });\n        };\n        navigator.permissions\n            .query(permissionDesc)\n            .then(function (status) {\n            permissionStatus = status;\n            on(permissionStatus, 'change', onChange);\n            onChange();\n        })\n            .catch(noop);\n        return function () {\n            permissionStatus && off(permissionStatus, 'change', onChange);\n            mounted = false;\n            permissionStatus = null;\n        };\n    }, [permissionDesc]);\n    return state;\n};\nexport default usePermission;\n","import { useEffect, useRef } from 'react';\nexport default function usePrevious(state) {\n    var ref = useRef();\n    useEffect(function () {\n        ref.current = state;\n    });\n    return ref.current;\n}\n","import { useRef } from 'react';\nimport { useFirstMountState } from './useFirstMountState';\nvar strictEquals = function (prev, next) { return prev === next; };\nexport default function usePreviousDistinct(value, compare) {\n    if (compare === void 0) { compare = strictEquals; }\n    var prevRef = useRef();\n    var curRef = useRef(value);\n    var isFirstMount = useFirstMountState();\n    if (!isFirstMount && !compare(curRef.current, value)) {\n        prevRef.current = curRef.current;\n        curRef.current = value;\n    }\n    return prevRef.current;\n}\n","import { useCallback } from 'react';\nimport useMountedState from './useMountedState';\nvar usePromise = function () {\n    var isMounted = useMountedState();\n    return useCallback(function (promise) {\n        return new Promise(function (resolve, reject) {\n            var onValue = function (value) {\n                isMounted() && resolve(value);\n            };\n            var onError = function (error) {\n                isMounted() && reject(error);\n            };\n            promise.then(onValue, onError);\n        });\n    }, []);\n};\nexport default usePromise;\n","import { __spreadArrays } from \"tslib\";\nimport { useState } from 'react';\nvar useQueue = function (initialValue) {\n    if (initialValue === void 0) { initialValue = []; }\n    var _a = useState(initialValue), state = _a[0], set = _a[1];\n    return {\n        add: function (value) {\n            set(function (queue) { return __spreadArrays(queue, [value]); });\n        },\n        remove: function () {\n            var result;\n            set(function (_a) {\n                var first = _a[0], rest = _a.slice(1);\n                result = first;\n                return rest;\n            });\n            return result;\n        },\n        get first() {\n            return state[0];\n        },\n        get last() {\n            return state[state.length - 1];\n        },\n        get size() {\n            return state.length;\n        },\n    };\n};\nexport default useQueue;\n","import { useState } from 'react';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nvar useRaf = function (ms, delay) {\n    if (ms === void 0) { ms = 1e12; }\n    if (delay === void 0) { delay = 0; }\n    var _a = useState(0), elapsed = _a[0], set = _a[1];\n    useIsomorphicLayoutEffect(function () {\n        var raf;\n        var timerStop;\n        var start;\n        var onFrame = function () {\n            var time = Math.min(1, (Date.now() - start) / ms);\n            set(time);\n            loop();\n        };\n        var loop = function () {\n            raf = requestAnimationFrame(onFrame);\n        };\n        var onStart = function () {\n            timerStop = setTimeout(function () {\n                cancelAnimationFrame(raf);\n                set(1);\n            }, ms);\n            start = Date.now();\n            loop();\n        };\n        var timerDelay = setTimeout(onStart, delay);\n        return function () {\n            clearTimeout(timerStop);\n            clearTimeout(timerDelay);\n            cancelAnimationFrame(raf);\n        };\n    }, [ms, delay]);\n    return elapsed;\n};\nexport default useRaf;\n","import { useCallback, useEffect, useMemo, useRef } from 'react';\nexport default function useRafLoop(callback, initiallyActive) {\n    if (initiallyActive === void 0) { initiallyActive = true; }\n    var raf = useRef(null);\n    var rafActivity = useRef(false);\n    var rafCallback = useRef(callback);\n    rafCallback.current = callback;\n    var step = useCallback(function (time) {\n        if (rafActivity.current) {\n            rafCallback.current(time);\n            raf.current = requestAnimationFrame(step);\n        }\n    }, []);\n    var result = useMemo(function () {\n        return [\n            function () {\n                // stop\n                if (rafActivity.current) {\n                    rafActivity.current = false;\n                    raf.current && cancelAnimationFrame(raf.current);\n                }\n            },\n            function () {\n                // start\n                if (!rafActivity.current) {\n                    rafActivity.current = true;\n                    raf.current = requestAnimationFrame(step);\n                }\n            },\n            function () { return rafActivity.current; },\n        ];\n    }, []);\n    useEffect(function () {\n        if (initiallyActive) {\n            result[1]();\n        }\n        return result[0];\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, []);\n    return result;\n}\n","import { useEffect, useState } from 'react';\nimport { isBrowser, off, on } from './misc/util';\nvar getValue = function (search, param) { return new URLSearchParams(search).get(param); };\nvar useSearchParam = function (param) {\n    var location = window.location;\n    var _a = useState(function () { return getValue(location.search, param); }), value = _a[0], setValue = _a[1];\n    useEffect(function () {\n        var onChange = function () {\n            setValue(getValue(location.search, param));\n        };\n        on(window, 'popstate', onChange);\n        on(window, 'pushstate', onChange);\n        on(window, 'replacestate', onChange);\n        return function () {\n            off(window, 'popstate', onChange);\n            off(window, 'pushstate', onChange);\n            off(window, 'replacestate', onChange);\n        };\n    }, []);\n    return value;\n};\nvar useSearchParamServer = function () { return null; };\nexport default isBrowser ? useSearchParam : useSearchParamServer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar react_1 = require(\"react\");\nvar isReact16Plus = parseInt(react_1.version.substr(0, react_1.version.indexOf('.'))) > 15;\nvar isFn = function (fn) { return typeof fn === 'function'; };\nvar render = function (props, data) {\n    var more = [];\n    for (var _i = 2; _i < arguments.length; _i++) {\n        more[_i - 2] = arguments[_i];\n    }\n    if (process.env.NODE_ENV !== 'production') {\n        if (typeof props !== 'object') {\n            throw new TypeError('renderChildren(props, data) first argument must be a props object.');\n        }\n        var children_1 = props.children, render_1 = props.render;\n        if (isFn(children_1) && isFn(render_1)) {\n            console.warn('Both \"render\" and \"children\" are specified for in a universal interface component. ' +\n                'Children will be used.');\n            console.trace();\n        }\n        if (typeof data !== 'object') {\n            console.warn('Universal component interface normally expects data to be an object, ' +\n                (\"\\\"\" + typeof data + \"\\\" received.\"));\n            console.trace();\n        }\n    }\n    var render = props.render, _a = props.children, children = _a === void 0 ? render : _a, component = props.component, _b = props.comp, comp = _b === void 0 ? component : _b;\n    if (isFn(children))\n        return children.apply(void 0, tslib_1.__spreadArrays([data], more));\n    if (comp) {\n        return react_1.createElement(comp, data);\n    }\n    if (children instanceof Array)\n        return isReact16Plus ? children : react_1.createElement.apply(void 0, tslib_1.__spreadArrays(['div', null], children));\n    if (children && (children instanceof Object)) {\n        if (process.env.NODE_ENV !== 'production') {\n            if (!children.type || ((typeof children.type !== 'string') && (typeof children.type !== 'function') && (typeof children.type !== 'symbol'))) {\n                console.warn('Universal component interface received object as children, ' +\n                    'expected React element, but received unexpected React \"type\".');\n                console.trace();\n            }\n            if (typeof children.type === 'string')\n                return children;\n            return react_1.cloneElement(children, Object.assign({}, children.props, data));\n        }\n        else {\n            if (typeof children.type === 'string')\n                return children;\n            return react_1.cloneElement(children, Object.assign({}, children.props, data));\n        }\n    }\n    return children || null;\n};\nexports.default = render;\n//# sourceMappingURL=render.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar wrapInStatefulComponent = function (Comp) {\n    var Decorated = (function (_super) {\n        tslib_1.__extends(class_1, _super);\n        function class_1() {\n            return _super !== null && _super.apply(this, arguments) || this;\n        }\n        class_1.prototype.render = function () {\n            return Comp(this.props, this.context);\n        };\n        return class_1;\n    }(React.Component));\n    if (process.env.NODE_ENV !== 'production') {\n        Decorated.displayName = \"Decorated(\" + (Comp.displayName || Comp.name) + \")\";\n    }\n    return Decorated;\n};\nexports.default = wrapInStatefulComponent;\n//# sourceMappingURL=wrapInStatefulComponent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar wrapInStatefulComponent_1 = tslib_1.__importDefault(require(\"./wrapInStatefulComponent\"));\nvar addClassDecoratorSupport = function (Comp) {\n    var isSFC = !Comp.prototype;\n    return !isSFC ? Comp : wrapInStatefulComponent_1.default(Comp);\n};\nexports.default = addClassDecoratorSupport;\n//# sourceMappingURL=addClassDecoratorSupport.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.divWrapper = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar addClassDecoratorSupport_1 = tslib_1.__importDefault(require(\"./addClassDecoratorSupport\"));\nvar h = React.createElement;\nvar noWrap = function (Comp, propName, props, state) {\n    var _a;\n    return h(Comp, propName ? tslib_1.__assign((_a = {}, _a[propName] = state, _a), props) : tslib_1.__assign(tslib_1.__assign({}, state), props));\n};\nexports.divWrapper = function (Comp, propName, props, state) {\n    return h('div', null, noWrap(Comp, propName, props, state));\n};\nvar createEnhancer = function (Facc, prop, wrapper) {\n    if (wrapper === void 0) { wrapper = noWrap; }\n    var enhancer = function (Comp, propName, faccProps) {\n        if (propName === void 0) { propName = prop; }\n        if (faccProps === void 0) { faccProps = null; }\n        var isClassDecoratorMethodCall = typeof Comp === 'string';\n        if (isClassDecoratorMethodCall) {\n            return function (Klass) { return enhancer(Klass, Comp || prop, propName); };\n        }\n        var Enhanced = function (props) {\n            return h(Facc, faccProps, function (state) { return wrapper(Comp, propName, props, state); });\n        };\n        if (process.env.NODE_ENV !== 'production') {\n            Enhanced.displayName = (Facc.displayName || Facc.name) + \"(\" + (Comp.displayName || Comp.name) + \")\";\n        }\n        return isClassDecoratorMethodCall ? addClassDecoratorSupport_1.default(Enhanced) : Enhanced;\n    };\n    return enhancer;\n};\nexports.default = createEnhancer;\n//# sourceMappingURL=createEnhancer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar render_1 = tslib_1.__importDefault(require(\"./render\"));\nvar defaultMapPropsToArgs = function (props) { return [props]; };\nvar hookToRenderProp = function (hook, mapPropsToArgs) {\n    if (mapPropsToArgs === void 0) { mapPropsToArgs = defaultMapPropsToArgs; }\n    return function (props) { return render_1.default(props, hook.apply(void 0, mapPropsToArgs(props))); };\n};\nexports.default = hookToRenderProp;\n//# sourceMappingURL=hookToRenderProp.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.hookToRenderProp = exports.createEnhancer = exports.render = void 0;\nvar tslib_1 = require(\"tslib\");\nvar render_1 = tslib_1.__importDefault(require(\"./render\"));\nexports.render = render_1.default;\nvar createEnhancer_1 = tslib_1.__importDefault(require(\"./createEnhancer\"));\nexports.createEnhancer = createEnhancer_1.default;\nvar hookToRenderProp_1 = tslib_1.__importDefault(require(\"./hookToRenderProp\"));\nexports.hookToRenderProp = hookToRenderProp_1.default;\n//# sourceMappingURL=index.js.map","import { __assign, __rest } from \"tslib\";\nimport { cloneElement, useEffect, useRef, useState } from 'react';\nimport { render } from 'react-universal-interface';\nimport useLatest from './useLatest';\nimport { noop, off, on } from './misc/util';\nvar useScratch = function (params) {\n    if (params === void 0) { params = {}; }\n    var disabled = params.disabled;\n    var paramsRef = useLatest(params);\n    var _a = useState({ isScratching: false }), state = _a[0], setState = _a[1];\n    var refState = useRef(state);\n    var refScratching = useRef(false);\n    var refAnimationFrame = useRef(null);\n    var _b = useState(null), el = _b[0], setEl = _b[1];\n    useEffect(function () {\n        if (disabled)\n            return;\n        if (!el)\n            return;\n        var onMoveEvent = function (docX, docY) {\n            cancelAnimationFrame(refAnimationFrame.current);\n            refAnimationFrame.current = requestAnimationFrame(function () {\n                var _a = el.getBoundingClientRect(), left = _a.left, top = _a.top;\n                var elX = left + window.scrollX;\n                var elY = top + window.scrollY;\n                var x = docX - elX;\n                var y = docY - elY;\n                setState(function (oldState) {\n                    var newState = __assign(__assign({}, oldState), { dx: x - (oldState.x || 0), dy: y - (oldState.y || 0), end: Date.now(), isScratching: true });\n                    refState.current = newState;\n                    (paramsRef.current.onScratch || noop)(newState);\n                    return newState;\n                });\n            });\n        };\n        var onMouseMove = function (event) {\n            onMoveEvent(event.pageX, event.pageY);\n        };\n        var onTouchMove = function (event) {\n            onMoveEvent(event.changedTouches[0].pageX, event.changedTouches[0].pageY);\n        };\n        var onMouseUp;\n        var onTouchEnd;\n        var stopScratching = function () {\n            if (!refScratching.current)\n                return;\n            refScratching.current = false;\n            refState.current = __assign(__assign({}, refState.current), { isScratching: false });\n            (paramsRef.current.onScratchEnd || noop)(refState.current);\n            setState({ isScratching: false });\n            off(window, 'mousemove', onMouseMove);\n            off(window, 'touchmove', onTouchMove);\n            off(window, 'mouseup', onMouseUp);\n            off(window, 'touchend', onTouchEnd);\n        };\n        onMouseUp = stopScratching;\n        onTouchEnd = stopScratching;\n        var startScratching = function (docX, docY) {\n            if (!refScratching.current)\n                return;\n            var _a = el.getBoundingClientRect(), left = _a.left, top = _a.top;\n            var elX = left + window.scrollX;\n            var elY = top + window.scrollY;\n            var x = docX - elX;\n            var y = docY - elY;\n            var time = Date.now();\n            var newState = {\n                isScratching: true,\n                start: time,\n                end: time,\n                docX: docX,\n                docY: docY,\n                x: x,\n                y: y,\n                dx: 0,\n                dy: 0,\n                elH: el.offsetHeight,\n                elW: el.offsetWidth,\n                elX: elX,\n                elY: elY,\n            };\n            refState.current = newState;\n            (paramsRef.current.onScratchStart || noop)(newState);\n            setState(newState);\n            on(window, 'mousemove', onMouseMove);\n            on(window, 'touchmove', onTouchMove);\n            on(window, 'mouseup', onMouseUp);\n            on(window, 'touchend', onTouchEnd);\n        };\n        var onMouseDown = function (event) {\n            refScratching.current = true;\n            startScratching(event.pageX, event.pageY);\n        };\n        var onTouchStart = function (event) {\n            refScratching.current = true;\n            startScratching(event.changedTouches[0].pageX, event.changedTouches[0].pageY);\n        };\n        on(el, 'mousedown', onMouseDown);\n        on(el, 'touchstart', onTouchStart);\n        return function () {\n            off(el, 'mousedown', onMouseDown);\n            off(el, 'touchstart', onTouchStart);\n            off(window, 'mousemove', onMouseMove);\n            off(window, 'touchmove', onTouchMove);\n            off(window, 'mouseup', onMouseUp);\n            off(window, 'touchend', onTouchEnd);\n            if (refAnimationFrame.current)\n                cancelAnimationFrame(refAnimationFrame.current);\n            refAnimationFrame.current = null;\n            refScratching.current = false;\n            refState.current = { isScratching: false };\n            setState(refState.current);\n        };\n    }, [el, disabled, paramsRef]);\n    return [setEl, state];\n};\nexport var ScratchSensor = function (props) {\n    var children = props.children, params = __rest(props, [\"children\"]);\n    var _a = useScratch(params), ref = _a[0], state = _a[1];\n    var element = render(props, state);\n    return cloneElement(element, __assign(__assign({}, element.props), { ref: function (el) {\n            if (element.props.ref) {\n                if (typeof element.props.ref === 'object')\n                    element.props.ref.current = el;\n                if (typeof element.props.ref === 'function')\n                    element.props.ref(el);\n            }\n            ref(el);\n        } }));\n};\nexport default useScratch;\n","import { useEffect } from 'react';\nimport useRafState from './useRafState';\nimport { off, on } from './misc/util';\nvar useScroll = function (ref) {\n    if (process.env.NODE_ENV === 'development') {\n        if (typeof ref !== 'object' || typeof ref.current === 'undefined') {\n            console.error('`useScroll` expects a single ref argument.');\n        }\n    }\n    var _a = useRafState({\n        x: 0,\n        y: 0,\n    }), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var handler = function () {\n            if (ref.current) {\n                setState({\n                    x: ref.current.scrollLeft,\n                    y: ref.current.scrollTop,\n                });\n            }\n        };\n        if (ref.current) {\n            on(ref.current, 'scroll', handler, {\n                capture: false,\n                passive: true,\n            });\n        }\n        return function () {\n            if (ref.current) {\n                off(ref.current, 'scroll', handler);\n            }\n        };\n    }, [ref]);\n    return state;\n};\nexport default useScroll;\n","import { useEffect, useState } from 'react';\nimport { off, on } from './misc/util';\nvar useScrolling = function (ref) {\n    var _a = useState(false), scrolling = _a[0], setScrolling = _a[1];\n    useEffect(function () {\n        if (ref.current) {\n            var scrollingTimeout_1;\n            var handleScrollEnd_1 = function () {\n                setScrolling(false);\n            };\n            var handleScroll_1 = function () {\n                setScrolling(true);\n                clearTimeout(scrollingTimeout_1);\n                scrollingTimeout_1 = setTimeout(function () { return handleScrollEnd_1(); }, 150);\n            };\n            on(ref.current, 'scroll', handleScroll_1, false);\n            return function () {\n                if (ref.current) {\n                    off(ref.current, 'scroll', handleScroll_1, false);\n                }\n            };\n        }\n        return function () { };\n    }, [ref]);\n    return scrolling;\n};\nexport default useScrolling;\n","import { useEffect, useState } from 'react';\nimport { isBrowser } from './misc/util';\nvar useSessionStorage = function (key, initialValue, raw) {\n    if (!isBrowser) {\n        return [initialValue, function () { }];\n    }\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var _a = useState(function () {\n        try {\n            var sessionStorageValue = sessionStorage.getItem(key);\n            if (typeof sessionStorageValue !== 'string') {\n                sessionStorage.setItem(key, raw ? String(initialValue) : JSON.stringify(initialValue));\n                return initialValue;\n            }\n            else {\n                return raw ? sessionStorageValue : JSON.parse(sessionStorageValue || 'null');\n            }\n        }\n        catch (_a) {\n            // If user is in private mode or has storage restriction\n            // sessionStorage can throw. JSON.parse and JSON.stringify\n            // can throw, too.\n            return initialValue;\n        }\n    }), state = _a[0], setState = _a[1];\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(function () {\n        try {\n            var serializedState = raw ? String(state) : JSON.stringify(state);\n            sessionStorage.setItem(key, serializedState);\n        }\n        catch (_a) {\n            // If user is in private mode or has storage restriction\n            // sessionStorage can throw. Also JSON.stringify can throw.\n        }\n    });\n    return [state, setState];\n};\nexport default useSessionStorage;\n","var keyList = Object.keys;\n\nexports.equal = function equal (a, b) {\n  if (a === b) return true;\n  if (!(a instanceof Object) || !(b instanceof Object)) return false;\n\n  var keys = keyList(a);\n  var length = keys.length;\n\n  for (var i = 0; i < length; i++)\n    if (!(keys[i] in b)) return false;\n\n  for (var i = 0; i < length; i++)\n    if (a[keys[i]] !== b[keys[i]]) return false;\n\n  return length === keyList(b).length;\n};\n","import { equal as isShallowEqual } from 'fast-shallow-equal';\nimport useCustomCompareEffect from './useCustomCompareEffect';\nvar isPrimitive = function (val) { return val !== Object(val); };\nvar shallowEqualDepsList = function (prevDeps, nextDeps) {\n    return prevDeps.every(function (dep, index) { return isShallowEqual(dep, nextDeps[index]); });\n};\nvar useShallowCompareEffect = function (effect, deps) {\n    if (process.env.NODE_ENV !== 'production') {\n        if (!(deps instanceof Array) || !deps.length) {\n            console.warn('`useShallowCompareEffect` should not be used with no dependencies. Use React.useEffect instead.');\n        }\n        if (deps.every(isPrimitive)) {\n            console.warn('`useShallowCompareEffect` should not be used with dependencies that are all primitive values. Use React.useEffect instead.');\n        }\n    }\n    useCustomCompareEffect(effect, deps, shallowEqualDepsList);\n};\nexport default useShallowCompareEffect;\n","import { __spreadArrays } from \"tslib\";\nimport * as React from 'react';\nimport { isBrowser, off, on } from './misc/util';\nvar useState = React.useState, useEffect = React.useEffect, useRef = React.useRef;\nvar DRAF = function (callback) { return setTimeout(callback, 35); };\nvar useSize = function (element, _a) {\n    var _b = _a === void 0 ? {} : _a, _c = _b.width, width = _c === void 0 ? Infinity : _c, _d = _b.height, height = _d === void 0 ? Infinity : _d;\n    if (!isBrowser) {\n        return [\n            typeof element === 'function' ? element({ width: width, height: height }) : element,\n            { width: width, height: height },\n        ];\n    }\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var _e = useState({ width: width, height: height }), state = _e[0], setState = _e[1];\n    if (typeof element === 'function') {\n        element = element(state);\n    }\n    var style = element.props.style || {};\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    var ref = useRef(null);\n    var window = null;\n    var setSize = function () {\n        var iframe = ref.current;\n        var size = iframe\n            ? {\n                width: iframe.offsetWidth,\n                height: iframe.offsetHeight,\n            }\n            : { width: width, height: height };\n        setState(size);\n    };\n    var onWindow = function (windowToListenOn) {\n        on(windowToListenOn, 'resize', setSize);\n        DRAF(setSize);\n    };\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(function () {\n        var iframe = ref.current;\n        if (!iframe) {\n            // iframe will be undefined if component is already unmounted\n            return;\n        }\n        if (iframe.contentWindow) {\n            window = iframe.contentWindow;\n            onWindow(window);\n        }\n        else {\n            var onLoad_1 = function () {\n                on(iframe, 'load', onLoad_1);\n                window = iframe.contentWindow;\n                onWindow(window);\n            };\n            off(iframe, 'load', onLoad_1);\n        }\n        return function () {\n            if (window && window.removeEventListener) {\n                off(window, 'resize', setSize);\n            }\n        };\n    }, []);\n    style.position = 'relative';\n    var sized = React.cloneElement.apply(React, __spreadArrays([element, { style: style }], __spreadArrays([\n        React.createElement('iframe', {\n            ref: ref,\n            style: {\n                background: 'transparent',\n                border: 'none',\n                height: '100%',\n                left: 0,\n                position: 'absolute',\n                top: 0,\n                width: '100%',\n                zIndex: -1,\n            },\n        })\n    ], React.Children.toArray(element.props.children))));\n    return [sized, state];\n};\nexport default useSize;\n","import { useEffect, useRef } from 'react';\nimport { isBrowser, noop, off, on } from './misc/util';\nimport useMountedState from './useMountedState';\nimport useSetState from './useSetState';\nvar useSlider = function (ref, options) {\n    if (options === void 0) { options = {}; }\n    var isMounted = useMountedState();\n    var isSliding = useRef(false);\n    var valueRef = useRef(0);\n    var frame = useRef(0);\n    var _a = useSetState({\n        isSliding: false,\n        value: 0,\n    }), state = _a[0], setState = _a[1];\n    valueRef.current = state.value;\n    useEffect(function () {\n        if (isBrowser) {\n            var styles = options.styles === undefined ? true : options.styles;\n            var reverse_1 = options.reverse === undefined ? false : options.reverse;\n            if (ref.current && styles) {\n                ref.current.style.userSelect = 'none';\n            }\n            var startScrubbing_1 = function () {\n                if (!isSliding.current && isMounted()) {\n                    (options.onScrubStart || noop)();\n                    isSliding.current = true;\n                    setState({ isSliding: true });\n                    bindEvents_1();\n                }\n            };\n            var stopScrubbing_1 = function () {\n                if (isSliding.current && isMounted()) {\n                    (options.onScrubStop || noop)(valueRef.current);\n                    isSliding.current = false;\n                    setState({ isSliding: false });\n                    unbindEvents_1();\n                }\n            };\n            var onMouseDown_1 = function (event) {\n                startScrubbing_1();\n                onMouseMove_1(event);\n            };\n            var onMouseMove_1 = options.vertical\n                ? function (event) { return onScrub_1(event.clientY); }\n                : function (event) { return onScrub_1(event.clientX); };\n            var onTouchStart_1 = function (event) {\n                startScrubbing_1();\n                onTouchMove_1(event);\n            };\n            var onTouchMove_1 = options.vertical\n                ? function (event) { return onScrub_1(event.changedTouches[0].clientY); }\n                : function (event) { return onScrub_1(event.changedTouches[0].clientX); };\n            var bindEvents_1 = function () {\n                on(document, 'mousemove', onMouseMove_1);\n                on(document, 'mouseup', stopScrubbing_1);\n                on(document, 'touchmove', onTouchMove_1);\n                on(document, 'touchend', stopScrubbing_1);\n            };\n            var unbindEvents_1 = function () {\n                off(document, 'mousemove', onMouseMove_1);\n                off(document, 'mouseup', stopScrubbing_1);\n                off(document, 'touchmove', onTouchMove_1);\n                off(document, 'touchend', stopScrubbing_1);\n            };\n            var onScrub_1 = function (clientXY) {\n                cancelAnimationFrame(frame.current);\n                frame.current = requestAnimationFrame(function () {\n                    if (isMounted() && ref.current) {\n                        var rect = ref.current.getBoundingClientRect();\n                        var pos = options.vertical ? rect.top : rect.left;\n                        var length_1 = options.vertical ? rect.height : rect.width;\n                        // Prevent returning 0 when element is hidden by CSS\n                        if (!length_1) {\n                            return;\n                        }\n                        var value = (clientXY - pos) / length_1;\n                        if (value > 1) {\n                            value = 1;\n                        }\n                        else if (value < 0) {\n                            value = 0;\n                        }\n                        if (reverse_1) {\n                            value = 1 - value;\n                        }\n                        setState({\n                            value: value,\n                        });\n                        (options.onScrub || noop)(value);\n                    }\n                });\n            };\n            on(ref.current, 'mousedown', onMouseDown_1);\n            on(ref.current, 'touchstart', onTouchStart_1);\n            return function () {\n                off(ref.current, 'mousedown', onMouseDown_1);\n                off(ref.current, 'touchstart', onTouchStart_1);\n            };\n        }\n        else {\n            return undefined;\n        }\n    }, [ref, options.vertical]);\n    return state;\n};\nexport default useSlider;\n","import { __assign } from \"tslib\";\nimport { useCallback, useEffect, useRef, useState } from 'react';\nvar Status;\n(function (Status) {\n    Status[Status[\"init\"] = 0] = \"init\";\n    Status[Status[\"play\"] = 1] = \"play\";\n    Status[Status[\"pause\"] = 2] = \"pause\";\n    Status[Status[\"end\"] = 3] = \"end\";\n})(Status || (Status = {}));\nvar useSpeech = function (text, options) {\n    var mounted = useRef(false);\n    var _a = useState(function () {\n        var _a = options.voice || {}, _b = _a.lang, lang = _b === void 0 ? 'default' : _b, _c = _a.name, name = _c === void 0 ? '' : _c;\n        return {\n            isPlaying: false,\n            status: Status[Status.init],\n            lang: options.lang || 'default',\n            voiceInfo: { lang: lang, name: name },\n            rate: options.rate || 1,\n            pitch: options.pitch || 1,\n            volume: options.volume || 1,\n        };\n    }), state = _a[0], setState = _a[1];\n    var handlePlay = useCallback(function () {\n        if (!mounted.current) {\n            return;\n        }\n        setState(function (preState) {\n            return __assign(__assign({}, preState), { isPlaying: true, status: Status[Status.play] });\n        });\n    }, []);\n    var handlePause = useCallback(function () {\n        if (!mounted.current) {\n            return;\n        }\n        setState(function (preState) {\n            return __assign(__assign({}, preState), { isPlaying: false, status: Status[Status.pause] });\n        });\n    }, []);\n    var handleEnd = useCallback(function () {\n        if (!mounted.current) {\n            return;\n        }\n        setState(function (preState) {\n            return __assign(__assign({}, preState), { isPlaying: false, status: Status[Status.end] });\n        });\n    }, []);\n    useEffect(function () {\n        mounted.current = true;\n        var utterance = new SpeechSynthesisUtterance(text);\n        options.lang && (utterance.lang = options.lang);\n        options.voice && (utterance.voice = options.voice);\n        utterance.rate = options.rate || 1;\n        utterance.pitch = options.pitch || 1;\n        utterance.volume = options.volume || 1;\n        utterance.onstart = handlePlay;\n        utterance.onpause = handlePause;\n        utterance.onresume = handlePlay;\n        utterance.onend = handleEnd;\n        window.speechSynthesis.speak(utterance);\n        return function () {\n            mounted.current = false;\n        };\n    }, []);\n    return state;\n};\nexport default useSpeech;\n","import useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nimport { off, on } from './misc/util';\nvar isFocusedElementEditable = function () {\n    var activeElement = document.activeElement, body = document.body;\n    if (!activeElement) {\n        return false;\n    }\n    // If not element has focus, we assume it is not editable, too.\n    if (activeElement === body) {\n        return false;\n    }\n    // Assume <input> and <textarea> elements are editable.\n    switch (activeElement.tagName) {\n        case 'INPUT':\n        case 'TEXTAREA':\n            return true;\n    }\n    // Check if any other focused element id editable.\n    return activeElement.hasAttribute('contenteditable');\n};\nvar isTypedCharGood = function (_a) {\n    var keyCode = _a.keyCode, metaKey = _a.metaKey, ctrlKey = _a.ctrlKey, altKey = _a.altKey;\n    if (metaKey || ctrlKey || altKey) {\n        return false;\n    }\n    // 0...9\n    if (keyCode >= 48 && keyCode <= 57) {\n        return true;\n    }\n    // a...z\n    if (keyCode >= 65 && keyCode <= 90) {\n        return true;\n    }\n    // All other keys.\n    return false;\n};\nvar useStartTyping = function (onStartTyping) {\n    useIsomorphicLayoutEffect(function () {\n        var keydown = function (event) {\n            !isFocusedElementEditable() && isTypedCharGood(event) && onStartTyping(event);\n        };\n        on(document, 'keydown', keydown);\n        return function () {\n            off(document, 'keydown', keydown);\n        };\n    }, []);\n};\nexport default useStartTyping;\n","import { useCallback, useMemo, useRef, useState } from 'react';\nimport { useFirstMountState } from './useFirstMountState';\nimport { resolveHookState } from './misc/hookState';\nexport function useStateWithHistory(initialState, capacity, initialHistory) {\n    if (capacity === void 0) { capacity = 10; }\n    if (capacity < 1) {\n        throw new Error(\"Capacity has to be greater than 1, got '\" + capacity + \"'\");\n    }\n    var isFirstMount = useFirstMountState();\n    var _a = useState(initialState), state = _a[0], innerSetState = _a[1];\n    var history = useRef((initialHistory !== null && initialHistory !== void 0 ? initialHistory : []));\n    var historyPosition = useRef(0);\n    // do the states manipulation only on first mount, no sense to load re-renders with useless calculations\n    if (isFirstMount) {\n        if (history.current.length) {\n            // if last element of history !== initial - push initial to history\n            if (history.current[history.current.length - 1] !== initialState) {\n                history.current.push(initialState);\n            }\n            // if initial history bigger that capacity - crop the first elements out\n            if (history.current.length > capacity) {\n                history.current = history.current.slice(history.current.length - capacity);\n            }\n        }\n        else {\n            // initiate the history with initial state\n            history.current.push(initialState);\n        }\n        historyPosition.current = history.current.length && history.current.length - 1;\n    }\n    var setState = useCallback(function (newState) {\n        innerSetState(function (currentState) {\n            newState = resolveHookState(newState, currentState);\n            // is state has changed\n            if (newState !== currentState) {\n                // if current position is not the last - pop element to the right\n                if (historyPosition.current < history.current.length - 1) {\n                    history.current = history.current.slice(0, historyPosition.current + 1);\n                }\n                historyPosition.current = history.current.push(newState) - 1;\n                // if capacity is reached - shift first elements\n                if (history.current.length > capacity) {\n                    history.current = history.current.slice(history.current.length - capacity);\n                }\n            }\n            return newState;\n        });\n    }, [state, capacity]);\n    var historyState = useMemo(function () { return ({\n        history: history.current,\n        position: historyPosition.current,\n        capacity: capacity,\n        back: function (amount) {\n            if (amount === void 0) { amount = 1; }\n            // don't do anything if we already at the left border\n            if (!historyPosition.current) {\n                return;\n            }\n            innerSetState(function () {\n                historyPosition.current -= Math.min(amount, historyPosition.current);\n                return history.current[historyPosition.current];\n            });\n        },\n        forward: function (amount) {\n            if (amount === void 0) { amount = 1; }\n            // don't do anything if we already at the right border\n            if (historyPosition.current === history.current.length - 1) {\n                return;\n            }\n            innerSetState(function () {\n                historyPosition.current = Math.min(historyPosition.current + amount, history.current.length - 1);\n                return history.current[historyPosition.current];\n            });\n        },\n        go: function (position) {\n            if (position === historyPosition.current) {\n                return;\n            }\n            innerSetState(function () {\n                historyPosition.current =\n                    position < 0\n                        ? Math.max(history.current.length + position, 0)\n                        : Math.min(history.current.length - 1, position);\n                return history.current[historyPosition.current];\n            });\n        },\n    }); }, [state]);\n    return [state, setState, historyState];\n}\n","import { __assign } from \"tslib\";\nimport { useMemo, useRef } from 'react';\nimport useMountedState from './useMountedState';\nimport useUpdate from './useUpdate';\nimport useUpdateEffect from './useUpdateEffect';\nexport default function useStateList(stateSet) {\n    if (stateSet === void 0) { stateSet = []; }\n    var isMounted = useMountedState();\n    var update = useUpdate();\n    var index = useRef(0);\n    // If new state list is shorter that before - switch to the last element\n    useUpdateEffect(function () {\n        if (stateSet.length <= index.current) {\n            index.current = stateSet.length - 1;\n            update();\n        }\n    }, [stateSet.length]);\n    var actions = useMemo(function () { return ({\n        next: function () { return actions.setStateAt(index.current + 1); },\n        prev: function () { return actions.setStateAt(index.current - 1); },\n        setStateAt: function (newIndex) {\n            // do nothing on unmounted component\n            if (!isMounted())\n                return;\n            // do nothing on empty states list\n            if (!stateSet.length)\n                return;\n            // in case new index is equal current - do nothing\n            if (newIndex === index.current)\n                return;\n            // it gives the ability to travel through the left and right borders.\n            // 4ex: if list contains 5 elements, attempt to set index 9 will bring use to 5th element\n            // in case of negative index it will start counting from the right, so -17 will bring us to 4th element\n            index.current =\n                newIndex >= 0\n                    ? newIndex % stateSet.length\n                    : stateSet.length + (newIndex % stateSet.length);\n            update();\n        },\n        setState: function (state) {\n            // do nothing on unmounted component\n            if (!isMounted())\n                return;\n            var newIndex = stateSet.length ? stateSet.indexOf(state) : -1;\n            if (newIndex === -1) {\n                throw new Error(\"State '\" + state + \"' is not a valid state (does not exist in state list)\");\n            }\n            index.current = newIndex;\n            update();\n        },\n    }); }, [stateSet]);\n    return __assign({ state: stateSet[index.current], currentIndex: index.current, isFirst: index.current === 0, isLast: index.current === stateSet.length - 1 }, actions);\n}\n","import { useEffect, useRef, useState } from 'react';\nimport useUnmount from './useUnmount';\nvar useThrottle = function (value, ms) {\n    if (ms === void 0) { ms = 200; }\n    var _a = useState(value), state = _a[0], setState = _a[1];\n    var timeout = useRef();\n    var nextValue = useRef(null);\n    var hasNextValue = useRef(0);\n    useEffect(function () {\n        if (!timeout.current) {\n            setState(value);\n            var timeoutCallback_1 = function () {\n                if (hasNextValue.current) {\n                    hasNextValue.current = false;\n                    setState(nextValue.current);\n                    timeout.current = setTimeout(timeoutCallback_1, ms);\n                }\n                else {\n                    timeout.current = undefined;\n                }\n            };\n            timeout.current = setTimeout(timeoutCallback_1, ms);\n        }\n        else {\n            nextValue.current = value;\n            hasNextValue.current = true;\n        }\n    }, [value]);\n    useUnmount(function () {\n        timeout.current && clearTimeout(timeout.current);\n    });\n    return state;\n};\nexport default useThrottle;\n","import { useEffect, useRef, useState } from 'react';\nimport useUnmount from './useUnmount';\nvar useThrottleFn = function (fn, ms, args) {\n    if (ms === void 0) { ms = 200; }\n    var _a = useState(null), state = _a[0], setState = _a[1];\n    var timeout = useRef();\n    var nextArgs = useRef();\n    useEffect(function () {\n        if (!timeout.current) {\n            setState(fn.apply(void 0, args));\n            var timeoutCallback_1 = function () {\n                if (nextArgs.current) {\n                    setState(fn.apply(void 0, nextArgs.current));\n                    nextArgs.current = undefined;\n                    timeout.current = setTimeout(timeoutCallback_1, ms);\n                }\n                else {\n                    timeout.current = undefined;\n                }\n            };\n            timeout.current = setTimeout(timeoutCallback_1, ms);\n        }\n        else {\n            nextArgs.current = args;\n        }\n    }, args);\n    useUnmount(function () {\n        timeout.current && clearTimeout(timeout.current);\n    });\n    return state;\n};\nexport default useThrottleFn;\n","import useTimeoutFn from './useTimeoutFn';\nimport useUpdate from './useUpdate';\nexport default function useTimeout(ms) {\n    if (ms === void 0) { ms = 0; }\n    var update = useUpdate();\n    return useTimeoutFn(update, ms);\n}\n","import { useEffect, useRef } from 'react';\nvar DEFAULT_USE_TITLE_OPTIONS = {\n    restoreOnUnmount: false,\n};\nfunction useTitle(title, options) {\n    if (options === void 0) { options = DEFAULT_USE_TITLE_OPTIONS; }\n    var prevTitleRef = useRef(document.title);\n    if (document.title !== title)\n        document.title = title;\n    useEffect(function () {\n        if (options && options.restoreOnUnmount) {\n            return function () {\n                document.title = prevTitleRef.current;\n            };\n        }\n        else {\n            return;\n        }\n    }, []);\n}\nexport default typeof document !== 'undefined' ? useTitle : function (_title) { };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.easing = {\n    // No easing, no acceleration\n    linear: function (t) { return t; },\n    // Accelerates fast, then slows quickly towards end.\n    quadratic: function (t) { return t * (-(t * t) * t + 4 * t * t - 6 * t + 4); },\n    // Overshoots over 1 and then returns to 1 towards end.\n    cubic: function (t) { return t * (4 * t * t - 9 * t + 6); },\n    // Overshoots over 1 multiple times - wiggles around 1.\n    elastic: function (t) { return t * (33 * t * t * t * t - 106 * t * t * t + 126 * t * t - 67 * t + 15); },\n    // Accelerating from zero velocity\n    inQuad: function (t) { return t * t; },\n    // Decelerating to zero velocity\n    outQuad: function (t) { return t * (2 - t); },\n    // Acceleration until halfway, then deceleration\n    inOutQuad: function (t) { return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t; },\n    // Accelerating from zero velocity\n    inCubic: function (t) { return t * t * t; },\n    // Decelerating to zero velocity\n    outCubic: function (t) { return (--t) * t * t + 1; },\n    // Acceleration until halfway, then deceleration\n    inOutCubic: function (t) { return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; },\n    // Accelerating from zero velocity\n    inQuart: function (t) { return t * t * t * t; },\n    // Decelerating to zero velocity\n    outQuart: function (t) { return 1 - (--t) * t * t * t; },\n    // Acceleration until halfway, then deceleration\n    inOutQuart: function (t) { return t < .5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t; },\n    // Accelerating from zero velocity\n    inQuint: function (t) { return t * t * t * t * t; },\n    // Decelerating to zero velocity\n    outQuint: function (t) { return 1 + (--t) * t * t * t * t; },\n    // Acceleration until halfway, then deceleration\n    inOutQuint: function (t) { return t < .5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t; },\n    // Accelerating from zero velocity\n    inSine: function (t) { return -Math.cos(t * (Math.PI / 2)) + 1; },\n    // Decelerating to zero velocity\n    outSine: function (t) { return Math.sin(t * (Math.PI / 2)); },\n    // Accelerating until halfway, then decelerating\n    inOutSine: function (t) { return -(Math.cos(Math.PI * t) - 1) / 2; },\n    // Exponential accelerating from zero velocity\n    inExpo: function (t) { return Math.pow(2, 10 * (t - 1)); },\n    // Exponential decelerating to zero velocity\n    outExpo: function (t) { return -Math.pow(2, -10 * t) + 1; },\n    // Exponential accelerating until halfway, then decelerating\n    inOutExpo: function (t) {\n        t /= .5;\n        if (t < 1)\n            return Math.pow(2, 10 * (t - 1)) / 2;\n        t--;\n        return (-Math.pow(2, -10 * t) + 2) / 2;\n    },\n    // Circular accelerating from zero velocity\n    inCirc: function (t) { return -Math.sqrt(1 - t * t) + 1; },\n    // Circular decelerating to zero velocity Moves VERY fast at the beginning and\n    // then quickly slows down in the middle. This tween can actually be used\n    // in continuous transitions where target value changes all the time,\n    // because of the very quick start, it hides the jitter between target value changes.\n    outCirc: function (t) { return Math.sqrt(1 - (t = t - 1) * t); },\n    // Circular acceleration until halfway, then deceleration\n    inOutCirc: function (t) {\n        t /= .5;\n        if (t < 1)\n            return -(Math.sqrt(1 - t * t) - 1) / 2;\n        t -= 2;\n        return (Math.sqrt(1 - t * t) + 1) / 2;\n    }\n};\n","import { easing } from 'ts-easing';\nimport useRaf from './useRaf';\nvar useTween = function (easingName, ms, delay) {\n    if (easingName === void 0) { easingName = 'inCirc'; }\n    if (ms === void 0) { ms = 200; }\n    if (delay === void 0) { delay = 0; }\n    var fn = easing[easingName];\n    var t = useRaf(ms, delay);\n    if (process.env.NODE_ENV !== 'production') {\n        if (typeof fn !== 'function') {\n            console.error('useTween() expected \"easingName\" property to be a valid easing function name, like:' +\n                '\"' +\n                Object.keys(easing).join('\", \"') +\n                '\".');\n            console.trace();\n            return 0;\n        }\n    }\n    return fn(t);\n};\nexport default useTween;\n","import { useMemo, useRef } from 'react';\nimport useEffectOnce from './useEffectOnce';\nvar useUnmountPromise = function () {\n    var refUnmounted = useRef(false);\n    useEffectOnce(function () { return function () {\n        refUnmounted.current = true;\n    }; });\n    var wrapper = useMemo(function () {\n        var race = function (promise, onError) {\n            var newPromise = new Promise(function (resolve, reject) {\n                promise.then(function (result) {\n                    if (!refUnmounted.current)\n                        resolve(result);\n                }, function (error) {\n                    if (!refUnmounted.current)\n                        reject(error);\n                    else if (onError)\n                        onError(error);\n                    else\n                        console.error('useUnmountPromise', error);\n                });\n            });\n            return newPromise;\n        };\n        return race;\n    }, []);\n    return wrapper;\n};\nexport default useUnmountPromise;\n","import { __assign } from \"tslib\";\nimport useList from './useList';\n/**\n * @deprecated Use `useList` hook's upsert action instead\n */\nexport default function useUpsert(predicate, initialList) {\n    if (initialList === void 0) { initialList = []; }\n    var _a = useList(initialList), list = _a[0], listActions = _a[1];\n    return [\n        list,\n        __assign(__assign({}, listActions), { upsert: function (newItem) {\n                listActions.upsert(predicate, newItem);\n            } }),\n    ];\n}\n","import { useEffect } from 'react';\nimport { isNavigator, noop } from './misc/util';\nvar isVibrationApiSupported = isNavigator && 'vibrate' in navigator;\nfunction useVibrate(enabled, pattern, loop) {\n    if (enabled === void 0) { enabled = true; }\n    if (pattern === void 0) { pattern = [1000, 1000]; }\n    if (loop === void 0) { loop = true; }\n    useEffect(function () {\n        var interval;\n        if (enabled) {\n            navigator.vibrate(pattern);\n            if (loop) {\n                var duration = pattern instanceof Array ? pattern.reduce(function (a, b) { return a + b; }) : pattern;\n                interval = setInterval(function () {\n                    navigator.vibrate(pattern);\n                }, duration);\n            }\n        }\n        return function () {\n            if (enabled) {\n                navigator.vibrate(0);\n                if (loop) {\n                    clearInterval(interval);\n                }\n            }\n        };\n    }, [enabled]);\n}\nexport default isVibrationApiSupported ? useVibrate : noop;\n","import createHTMLMediaHook from './factory/createHTMLMediaHook';\nvar useVideo = createHTMLMediaHook('video');\nexport default useVideo;\n","import { useCallback, useEffect, useRef, useState } from 'react';\nexport default function useStateValidator(state, validator, initialState) {\n    if (initialState === void 0) { initialState = [undefined]; }\n    var validatorInner = useRef(validator);\n    var stateInner = useRef(state);\n    validatorInner.current = validator;\n    stateInner.current = state;\n    var _a = useState(initialState), validity = _a[0], setValidity = _a[1];\n    var validate = useCallback(function () {\n        if (validatorInner.current.length >= 2) {\n            validatorInner.current(stateInner.current, setValidity);\n        }\n        else {\n            setValidity(validatorInner.current(stateInner.current));\n        }\n    }, [setValidity]);\n    useEffect(function () {\n        validate();\n    }, [state]);\n    return [validity, validate];\n}\n","var e=function(t){if(\"undefined\"==typeof document)return 0;if(document.body&&(!document.readyState||\"loading\"!==document.readyState)){if(!0!==t&&\"number\"==typeof e.__cache)return e.__cache;var o=document.createElement(\"div\"),d=o.style;d.display=\"block\",d.position=\"absolute\",d.width=\"100px\",d.height=\"100px\",d.left=\"-999px\",d.top=\"-999px\",d.overflow=\"scroll\",document.body.insertBefore(o,null);var n=o.clientWidth;if(0!==n)return e.__cache=100-n,document.body.removeChild(o),e.__cache;document.body.removeChild(o)}};export{e as scrollbarWidth};\n","import { scrollbarWidth } from '@xobotyi/scrollbar-width';\nimport { useEffect, useState } from 'react';\nexport function useScrollbarWidth() {\n    var _a = useState(scrollbarWidth()), sbw = _a[0], setSbw = _a[1];\n    // this needed to ensure the scrollbar width in case hook called before the DOM is ready\n    useEffect(function () {\n        if (typeof sbw !== 'undefined') {\n            return;\n        }\n        var raf = requestAnimationFrame(function () {\n            setSbw(scrollbarWidth());\n        });\n        return function () { return cancelAnimationFrame(raf); };\n    }, []);\n    return sbw;\n}\n","import { useCallback, useEffect, useRef, useState } from 'react';\nexport function useMultiStateValidator(states, validator, initialValidity) {\n    if (initialValidity === void 0) { initialValidity = [undefined]; }\n    if (typeof states !== 'object') {\n        throw new Error('states expected to be an object or array, got ' + typeof states);\n    }\n    var validatorInner = useRef(validator);\n    var statesInner = useRef(states);\n    validatorInner.current = validator;\n    statesInner.current = states;\n    var _a = useState(initialValidity), validity = _a[0], setValidity = _a[1];\n    var validate = useCallback(function () {\n        if (validatorInner.current.length >= 2) {\n            validatorInner.current(statesInner.current, setValidity);\n        }\n        else {\n            setValidity(validatorInner.current(statesInner.current));\n        }\n    }, [setValidity]);\n    useEffect(function () {\n        validate();\n    }, Object.values(states));\n    return [validity, validate];\n}\n","import { useEffect } from 'react';\nimport { isBrowser, off, on } from './misc/util';\nimport useRafState from './useRafState';\nvar useWindowScroll = function () {\n    var _a = useRafState(function () { return ({\n        x: isBrowser ? window.pageXOffset : 0,\n        y: isBrowser ? window.pageYOffset : 0,\n    }); }), state = _a[0], setState = _a[1];\n    useEffect(function () {\n        var handler = function () {\n            setState(function (state) {\n                var pageXOffset = window.pageXOffset, pageYOffset = window.pageYOffset;\n                //Check state for change, return same state if no change happened to prevent rerender\n                //(see useState/setState documentation). useState/setState is used internally in useRafState/setState.\n                return state.x !== pageXOffset || state.y !== pageYOffset\n                    ? {\n                        x: pageXOffset,\n                        y: pageYOffset,\n                    }\n                    : state;\n            });\n        };\n        //We have to update window scroll at mount, before subscription.\n        //Window scroll may be changed between render and effect handler.\n        handler();\n        on(window, 'scroll', handler, {\n            capture: false,\n            passive: true,\n        });\n        return function () {\n            off(window, 'scroll', handler);\n        };\n    }, []);\n    return state;\n};\nexport default useWindowScroll;\n","import { useEffect } from 'react';\nimport useRafState from './useRafState';\nimport { isBrowser, off, on } from './misc/util';\nvar useWindowSize = function (_a) {\n    var _b = _a === void 0 ? {} : _a, _c = _b.initialWidth, initialWidth = _c === void 0 ? Infinity : _c, _d = _b.initialHeight, initialHeight = _d === void 0 ? Infinity : _d, onChange = _b.onChange;\n    // Use the useRafState hook to maintain the current window size (width and height)\n    var _e = useRafState({\n        width: isBrowser ? window.innerWidth : initialWidth,\n        height: isBrowser ? window.innerHeight : initialHeight,\n    }), state = _e[0], setState = _e[1];\n    useEffect(function () {\n        // Only run the effect on the browser (to avoid issues with SSR)\n        if (isBrowser) {\n            var handler_1 = function () {\n                var width = window.innerWidth;\n                var height = window.innerHeight;\n                // Update the state with the new window size\n                setState({\n                    width: width,\n                    height: height,\n                });\n                // If an onChange callback is provided, call it with the new dimensions\n                if (onChange)\n                    onChange(width, height);\n            };\n            // Add event listener for the resize event\n            on(window, 'resize', handler_1);\n            // Cleanup function to remove the event listener when the component is unmounted (it's for performance optimization)\n            return function () {\n                off(window, 'resize', handler_1);\n            };\n        }\n    }, []);\n    // Return the current window size (width and height)\n    return state;\n};\nexport default useWindowSize;\n","import { useMemo, useState } from 'react';\nimport useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';\nimport { isBrowser, noop } from './misc/util';\nvar defaultState = {\n    x: 0,\n    y: 0,\n    width: 0,\n    height: 0,\n    top: 0,\n    left: 0,\n    bottom: 0,\n    right: 0,\n};\nfunction useMeasure() {\n    var _a = useState(null), element = _a[0], ref = _a[1];\n    var _b = useState(defaultState), rect = _b[0], setRect = _b[1];\n    var observer = useMemo(function () {\n        return new window.ResizeObserver(function (entries) {\n            if (entries[0]) {\n                var _a = entries[0].contentRect, x = _a.x, y = _a.y, width = _a.width, height = _a.height, top_1 = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;\n                setRect({ x: x, y: y, width: width, height: height, top: top_1, left: left, bottom: bottom, right: right });\n            }\n        });\n    }, []);\n    useIsomorphicLayoutEffect(function () {\n        if (!element)\n            return;\n        observer.observe(element);\n        return function () {\n            observer.disconnect();\n        };\n    }, [element]);\n    return [ref, rect];\n}\nexport default isBrowser && typeof window.ResizeObserver !== 'undefined'\n    ? useMeasure\n    : (function () { return [noop, defaultState]; });\n","import { useEffect, useMemo, useState } from 'react';\nexport var ZoomState;\n(function (ZoomState) {\n    ZoomState[\"ZOOMING_IN\"] = \"ZOOMING_IN\";\n    ZoomState[\"ZOOMING_OUT\"] = \"ZOOMING_OUT\";\n})(ZoomState || (ZoomState = {}));\nvar usePinchZoom = function (ref) {\n    var cacheRef = useMemo(function () { return ({\n        evCache: [],\n        prevDiff: -1,\n    }); }, [ref.current]);\n    var _a = useState(), zoomingState = _a[0], setZoomingState = _a[1];\n    var pointermove_handler = function (ev) {\n        // This function implements a 2-pointer horizontal pinch/zoom gesture.\n        //\n        // If the distance between the two pointers has increased (zoom in),\n        // the target element's background is changed to 'pink' and if the\n        // distance is decreasing (zoom out), the color is changed to 'lightblue'.\n        //\n        // This function sets the target element's border to 'dashed' to visually\n        // indicate the pointer's target received a move event.\n        // Find this event in the cache and update its record with this event\n        for (var i = 0; i < cacheRef.evCache.length; i++) {\n            if (ev.pointerId == cacheRef.evCache[i].pointerId) {\n                cacheRef.evCache[i] = ev;\n                break;\n            }\n        }\n        // If two pointers are down, check for pinch gestures\n        if (cacheRef.evCache.length == 2) {\n            // console.log(prevDiff)\n            // Calculate the distance between the two pointers\n            var curDiff = Math.abs(cacheRef.evCache[0].clientX - cacheRef.evCache[1].clientX);\n            if (cacheRef.prevDiff > 0) {\n                if (curDiff > cacheRef.prevDiff) {\n                    // The distance between the two pointers has increased\n                    setZoomingState([ZoomState.ZOOMING_IN, curDiff]);\n                }\n                if (curDiff < cacheRef.prevDiff) {\n                    // The distance between the two pointers has decreased\n                    setZoomingState([ZoomState.ZOOMING_OUT, curDiff]);\n                }\n            }\n            // Cache the distance for the next move event\n            cacheRef.prevDiff = curDiff;\n        }\n    };\n    var pointerdown_handler = function (ev) {\n        // The pointerdown event signals the start of a touch interaction.\n        // This event is cached to support 2-finger gestures\n        cacheRef.evCache.push(ev);\n        // console.log('pointerDown', ev);\n    };\n    var pointerup_handler = function (ev) {\n        // Remove this pointer from the cache and reset the target's\n        // background and border\n        remove_event(ev);\n        // If the number of pointers down is less than two then reset diff tracker\n        if (cacheRef.evCache.length < 2) {\n            cacheRef.prevDiff = -1;\n        }\n    };\n    var remove_event = function (ev) {\n        // Remove this event from the target's cache\n        for (var i = 0; i < cacheRef.evCache.length; i++) {\n            if (cacheRef.evCache[i].pointerId == ev.pointerId) {\n                cacheRef.evCache.splice(i, 1);\n                break;\n            }\n        }\n    };\n    useEffect(function () {\n        if (ref === null || ref === void 0 ? void 0 : ref.current) {\n            ref.current.onpointerdown = pointerdown_handler;\n            ref.current.onpointermove = pointermove_handler;\n            ref.current.onpointerup = pointerup_handler;\n            ref.current.onpointercancel = pointerup_handler;\n            ref.current.onpointerout = pointerup_handler;\n            ref.current.onpointerleave = pointerup_handler;\n        }\n    }, [ref === null || ref === void 0 ? void 0 : ref.current]);\n    return zoomingState\n        ? { zoomingState: zoomingState[0], pinchState: zoomingState[1] }\n        : { zoomingState: null, pinchState: 0 };\n};\nexport default usePinchZoom;\n","import { useRef } from 'react';\nexport function useRendersCount() {\n    return ++useRef(0).current;\n}\n","import { __assign, __spreadArrays } from \"tslib\";\nimport { useCallback, useMemo, useState } from 'react';\nvar useSet = function (initialSet) {\n    if (initialSet === void 0) { initialSet = new Set(); }\n    var _a = useState(initialSet), set = _a[0], setSet = _a[1];\n    var stableActions = useMemo(function () {\n        var add = function (item) { return setSet(function (prevSet) { return new Set(__spreadArrays(Array.from(prevSet), [item])); }); };\n        var remove = function (item) {\n            return setSet(function (prevSet) { return new Set(Array.from(prevSet).filter(function (i) { return i !== item; })); });\n        };\n        var toggle = function (item) {\n            return setSet(function (prevSet) {\n                return prevSet.has(item)\n                    ? new Set(Array.from(prevSet).filter(function (i) { return i !== item; }))\n                    : new Set(__spreadArrays(Array.from(prevSet), [item]));\n            });\n        };\n        return { add: add, remove: remove, toggle: toggle, reset: function () { return setSet(initialSet); }, clear: function () { return setSet(new Set()); } };\n    }, [setSet]);\n    var utils = __assign({ has: useCallback(function (item) { return set.has(item); }, [set]) }, stableActions);\n    return [set, utils];\n};\nexport default useSet;\n","import { useState } from 'react';\nimport { resolveHookState } from '../misc/hookState';\nimport useEffectOnce from '../useEffectOnce';\nimport useIsomorphicLayoutEffect from '../useIsomorphicLayoutEffect';\nexport function createGlobalState(initialState) {\n    var store = {\n        state: initialState instanceof Function ? initialState() : initialState,\n        setState: function (nextState) {\n            store.state = resolveHookState(nextState, store.state);\n            store.setters.forEach(function (setter) { return setter(store.state); });\n        },\n        setters: [],\n    };\n    return function () {\n        var _a = useState(store.state), globalState = _a[0], stateSetter = _a[1];\n        useEffectOnce(function () { return function () {\n            store.setters = store.setters.filter(function (setter) { return setter !== stateSetter; });\n        }; });\n        useIsomorphicLayoutEffect(function () {\n            if (!store.setters.includes(stateSetter)) {\n                store.setters.push(stateSetter);\n            }\n        });\n        return [globalState, store.setState];\n    };\n}\nexport default createGlobalState;\n","import { useCallback, useState } from 'react';\nimport useLifecycles from './useLifecycles';\nimport { off, on } from './misc/util';\n/**\n * read and write url hash, response to url hash change\n */\nexport var useHash = function () {\n    var _a = useState(function () { return window.location.hash; }), hash = _a[0], setHash = _a[1];\n    var onHashChange = useCallback(function () {\n        setHash(window.location.hash);\n    }, []);\n    useLifecycles(function () {\n        on(window, 'hashchange', onHashChange);\n    }, function () {\n        off(window, 'hashchange', onHashChange);\n    });\n    var _setHash = useCallback(function (newHash) {\n        if (newHash !== hash) {\n            window.location.hash = newHash;\n        }\n    }, [hash]);\n    return [hash, _setHash];\n};\n","import type { StatsigClient } from '@statsig/react-bindings'\n\n/**\n * A ref to hold the Statsig client instance.\n * This is extracted into its own module to avoid circular dependencies\n * between main.tsx and analytics.mts.\n */\nexport const statsigClientRef: { current: StatsigClient | null } = { current: null }\n","import { Analytics, AnalyticsPlugin } from \"analytics\";\nimport googleTagManager from \"analytics-plugin-google-tag-manager\";\nimport snowplowPlugin from \"@analytics/snowplow\";\nimport { getPageNameFromUrl } from \"../util/navigation.mjs\";\nimport { getPartnerFromWindowLocation } from \"../util/partner-selectors.mjs\";\nimport { getIsAlpsNextFromInitialState } from \"../data/initial-state/intial-state-accessors.mjs\";\nimport * as fbq from \"fbq\";\nimport { ButtonClickTrackingPlugin } from \"@snowplow/browser-plugin-button-click-tracking\";\nimport { ClientHintsPlugin } from \"@snowplow/browser-plugin-client-hints\";\nimport {\n  ErrorTrackingPlugin,\n  trackError,\n} from \"@snowplow/browser-plugin-error-tracking\";\nimport { GaCookiesPlugin } from \"@snowplow/browser-plugin-ga-cookies\";\nimport { LinkClickTrackingPlugin } from \"@snowplow/browser-plugin-link-click-tracking\";\nimport { PerformanceNavigationTimingPlugin } from \"@snowplow/browser-plugin-performance-navigation-timing\";\nimport { TimezonePlugin } from \"@snowplow/browser-plugin-timezone\";\nimport { WebVitalsPlugin } from \"@snowplow/browser-plugin-web-vitals\";\nimport * as Sentry from \"@sentry/react\";\nimport {\n  getIsTrackingDisabled,\n  setIsTrackingDisabled,\n} from \"../data/local-storage/local-storage.mjs\";\nimport { useState } from \"react\";\nimport * as reactUse from \"react-use\";\nimport { _getInstance } from \"@statsig/client-core\";\nimport { statsigClientRef } from \"../data/statsig/statsig-client-ref.mts\";\n\nconst { useInterval } = reactUse;\n\nconst addBingToPage = () => {\n  (function (w, d, t, r, u) {\n    var f, n, i;\n    ((w[u] = w[u] || []),\n      (f = function () {\n        try {\n          var o = { ti: \"148022694\", enableAutoSpaTracking: true };\n          // @ts-ignore\n          ((o.q = w[u]), (w[u] = new UET(o)), w[u].push(\"pageLoad\"));\n        } catch (_err) {\n          // UET blocked by ad blocker or script failed to load — swallow silently\n        }\n      }),\n      (n = d.createElement(t)),\n      (n.src = r),\n      (n.async = 1),\n      (n.onload = n.onreadystatechange =\n        function () {\n          var s = this.readyState;\n          (s && s !== \"loaded\" && s !== \"complete\") ||\n            (f(), (n.onload = n.onreadystatechange = null));\n        }),\n      (i = d.getElementsByTagName(t)[0]),\n      i.parentNode.insertBefore(n, i));\n  })(window, document, \"script\", \" //bat.bing.com/bat.js\", \"uetq\");\n};\n\ndeclare global {\n  interface Window {\n    gtag?: (...args: any[]) => void;\n    dataLayer?: any[];\n  }\n}\n\nconst plugins: AnalyticsPlugin[] = [\n  {\n    name: \"prevent-bad-tracking\",\n    initializeStart: () => {\n      // Don't track page view if we started on the success page\n      if (typeof window === \"undefined\") {\n        return { abort: \"server side\" };\n      }\n    },\n  },\n  // Stamp isAlpsNext on every event from the SSR initial state so values are\n  // stable per page load and don't race the client Statsig gate init.\n  {\n    name: \"alps-next-enrichment\",\n    \"track:snowplow\": ({ payload, config }) => {\n      const isAlpsNext = getIsAlpsNextFromInitialState();\n      return {\n        ...payload,\n        properties: {\n          ...payload.properties,\n          isAlpsNext,\n        },\n      };\n    },\n    \"page:snowplow\": ({ payload, config }) => {\n      const isAlpsNext = getIsAlpsNextFromInitialState();\n      return {\n        ...payload,\n        properties: {\n          ...payload.properties,\n          isAlpsNext,\n        },\n      };\n    },\n    track: ({ payload, config }) => {\n      const isAlpsNext = getIsAlpsNextFromInitialState();\n      return {\n        ...payload,\n        properties: {\n          ...payload.properties,\n          isAlpsNext,\n        },\n      };\n    },\n    page: ({ payload, config }) => {\n      const isAlpsNext = getIsAlpsNextFromInitialState();\n      return {\n        ...payload,\n        properties: {\n          ...payload.properties,\n          isAlpsNext,\n        },\n      };\n    },\n    identify: ({ payload, config }) => {\n      const isAlpsNext = getIsAlpsNextFromInitialState();\n      return {\n        ...payload,\n        traits: {\n          ...payload.traits,\n          isAlpsNext,\n        },\n      };\n    },\n  },\n  snowplowPlugin({\n    name: \"snowplow\",\n    scriptSrc: `/public/vendor/arccos-sp.js`,\n    collectorUrl: import.meta.env.CLIENT_SNOWPLOW_URL,\n    trackerSettings: {\n      appId: \"activation\",\n      context: {\n        webPage: true,\n      },\n      forceSecureTracker: true,\n      plugins: [\n        ButtonClickTrackingPlugin(),\n        ClientHintsPlugin(),\n        ErrorTrackingPlugin(),\n        GaCookiesPlugin(),\n        LinkClickTrackingPlugin(),\n        PerformanceNavigationTimingPlugin(),\n        TimezonePlugin(),\n        WebVitalsPlugin(),\n      ],\n    },\n  }),\n  // Google Tag Manager (multiple containers)\n  googleTagManager({\n    containerId: \"GTM-WNBV4WD9\", // Primary GTM container ID\n  }),\n\n  // Google Analytics 4 Plugin (Custom Implementation)\n  {\n    name: \"ga4-tracker\",\n    initialize: () => {\n      console.log(\"GA4 trackers initialized.\");\n      // Initialize all GA4 properties\n      window.gtag =\n        window.gtag ||\n        function () {\n          (window.dataLayer = window.dataLayer || []).push(arguments);\n        };\n      // Initialize the GA4 and Universal Analytics properties\n      window.gtag(\"js\", new Date());\n      window.gtag(\"config\", \"G-2V7P23REZR\"); // GA4 ID\n      window.gtag(\"config\", \"AW-941090723\"); // GA4 Ads ID\n      window.gtag(\"config\", \"UA-50163865-19\"); // Universal Analytics ID\n    },\n    track: ({ payload }) => {\n      const { event, properties } = payload;\n      // Send event to GA4 and UA properties\n      window.gtag(\"event\", event, properties);\n      console.log(`GA4 event sent: ${event}`, properties);\n    },\n    page: ({ payload }) => {\n      const { properties } = payload;\n      const pageParams = { page_path: properties.path, isAlpsNext: properties.isAlpsNext };\n      // Track page views for all IDs\n      window.gtag(\"config\", \"G-2V7P23REZR\", pageParams);\n      window.gtag(\"config\", \"AW-941090723\", pageParams);\n      window.gtag(\"config\", \"UA-50163865-19\", pageParams);\n      console.log(\"GA4 page view tracked:\", properties.path);\n    },\n  },\n  {\n    name: \"facebook-pixel\",\n    initialize: () => {\n      console.log(\"Facebook Pixel initialized.\");\n      fbq.init(\"1485154478460843\");\n    },\n    track: ({ payload }) => {\n      // Pull eventID out of properties so it doesn't leak into Meta's\n      // properties object (Meta would store it as a custom_data field\n      // and reject the event if the field shape doesn't match the\n      // expected schema). When present, fire via window.fbq directly so\n      // we can pass the 4th-arg `{ eventID }` — the `fbq` npm wrapper's\n      // `track(name, properties)` signature does not expose it, and that\n      // 4th arg is what enables Meta browser↔server dedup on the legacy\n      // dataset. Without eventID, fall through to the existing wrapper\n      // call for backward compatibility with every other track site.\n      const { isCustom, eventID, ...properties } = payload.properties as {\n        isCustom?: boolean;\n        eventID?: string;\n        [key: string]: unknown;\n      };\n      if (eventID && typeof window !== \"undefined\" && typeof (window as { fbq?: (...args: unknown[]) => void }).fbq === \"function\") {\n        const trackMethod = isCustom ? \"trackCustom\" : \"track\";\n        (window as { fbq: (...args: unknown[]) => void }).fbq(trackMethod, payload.event, properties, { eventID });\n        return;\n      }\n      isCustom ? fbq.trackCustom(payload.event, properties) : fbq.track(payload.event, properties);\n    },\n  },\n  {\n    name: \"statsig\",\n    initialize: async () => {\n      // await updateRuntimeConfig();\n      console.log(\"Statsig initialized.\");\n    },\n    page: async ({ payload }) => {\n      const { properties } = payload;\n      const partner = getPartnerFromWindowLocation();\n      const queryParams = Object.fromEntries(\n        new URLSearchParams(location.search).entries(),\n      );\n      statsigClientRef.current?.logEvent(\"page_view\", undefined, {\n        host: window.location.hostname,\n        pathname: location.pathname,\n        search: location.search,\n        partner,\n        funnel_step: getPageNameFromUrl(window.location.href),\n        isAlpsNext: getIsAlpsNextFromInitialState(),\n        ...queryParams,\n      });\n      console.log(\"Statsig page view logged:\", properties);\n    },\n    track: async ({ payload }) => {\n      console.log(\"Statsig track event:\", payload);\n      const { event, properties } = payload;\n      statsigClientRef.current?.logEvent(event, properties.property, {\n        ...properties,\n        isAlpsNext: getIsAlpsNextFromInitialState(),\n      });\n      console.log(\"Statsig event logged:\", event);\n    },\n  },\n  {\n    name: \"sentry\",\n    initialize: async () => {\n      Sentry.init({\n        dsn: \"https://aa906f1a93200e90aeb6236fcefaa52c@o4508059207532544.ingest.us.sentry.io/4508059209760768\",\n        enabled: !window.location.href.includes(\"local\"), // Don't send DSN data when developing locally\n        // Drop informational console breadcrumbs (log/info/debug) so\n        // high-volume debug logs don't evict genuinely useful\n        // breadcrumbs (fetch, navigation, clicks) from the 100-slot\n        // window. Warn/error/fatal are kept — they often contextualize\n        // a captured error.\n        beforeBreadcrumb: (breadcrumb) => {\n          if (breadcrumb.category === \"console\") {\n            const keep =\n              breadcrumb.level === \"warning\" ||\n              breadcrumb.level === \"error\" ||\n              breadcrumb.level === \"fatal\";\n            if (!keep) return null;\n          }\n          return breadcrumb;\n        },\n        integrations: [\n          Sentry.browserTracingIntegration(),\n          Sentry.contextLinesIntegration(),\n          Sentry.extraErrorDataIntegration(),\n          Sentry.sessionTimingIntegration(),\n          Sentry.replayIntegration({\n            // NOTE: This will disable built-in masking. Only use this if your site has no sensitive data, or if you've already set up other options for masking or blocking relevant data, such as 'ignore', 'block', 'mask' and 'maskFn'.\n            maskAllText: false,\n            blockAllMedia: false,\n            networkDetailAllowUrls: [/.*/],\n          }),\n        ],\n        // Tracing — 10% of transactions. 100% was tripping Sentry rate limits\n        // (HTTP 429 on the envelope endpoint). Matches sv-activate.\n        tracesSampleRate: 0.1,\n        // Session Replay — 5% of sessions + 100% of sessions that hit an error.\n        // Replays dominate envelope volume; full sampling was the primary\n        // contributor to the rate-limit pressure.\n        replaysSessionSampleRate: 0.05,\n        replaysOnErrorSampleRate: 1.0,\n        environment: import.meta.env.CLIENT_STATSIG_ENVIRONMENT,\n        // Filter known browser-extension / third-party noise that isn't actionable.\n        // Our own bridge callers guard these APIs; these errors come from extensions\n        // or injected scripts poking the same globals.\n        ignoreErrors: [\n          \"ResizeObserver loop limit exceeded\",\n          \"ResizeObserver loop completed with undelivered notifications\",\n          \"Non-Error promise rejection captured\",\n          /AbortError/,\n          /NetworkError when attempting to fetch resource/,\n          /window\\.webkit\\.messageHandlers/,\n          /Java object is gone/,\n          /UET is not defined/,\n          /__firefox__/,\n          /runtime\\.sendMessage/,\n          /'javaEnabled' on proxy/,\n          /can't redefine non-configurable property \"attachShadow\"/,\n          /The play\\(\\) request was interrupted/,\n        ],\n        denyUrls: [\n          /extensions\\//,\n          /^chrome:\\/\\//,\n          /^chrome-extension:\\/\\//,\n          /^moz-extension:\\/\\//,\n          /^safari-web-extension:\\/\\//,\n        ],\n        allowUrls: [/arccosgolf\\.com/, /localhost/],\n      });\n    },\n  },\n  {\n    name: \"bing\",\n    initialize: () => {\n      addBingToPage();\n    },\n  },\n];\nplugins.forEach((p) => (p.enabled = !getIsTrackingDisabled()));\n\nexport const analytics = Analytics({\n  app: \"activation\",\n  version: \"1.0.0\",\n  plugins,\n});\n\nanalytics.on(\"initialize:snowplow\", ({ instance }) => {\n  instance.plugins.snowplow.enableActivityTracking(10, 60);\n  instance.plugins.snowplow.enableLinkClickTracking();\n  instance.plugins.snowplow.enableErrorTracking();\n});\n\nanalytics.on(\"track\", ({ payload }) => {\n  if (payload.event === \"error\") {\n    const message = payload?.properties?.message;\n    if (typeof message !== \"string\" || !message.length) return;\n    // These events come from ErrorDisplay, which is a user-facing messaging\n    // component (e.g. \"Already Subscribed\", \"Invalid offer\"). They're\n    // business outcomes, not crashes — collect them as warnings so they're\n    // still searchable in Sentry without triggering error-level alerts.\n    // Real crashes are captured at error level via Sentry's React integration\n    // (ErrorBoundary, unhandled rejections, runtime errors).\n    Sentry.captureMessage(message, {\n      level: \"warning\",\n    });\n    trackError({\n      message,\n    });\n  }\n});\n\n// Initialize analytics\nanalytics.on(\"ready\", ({ payload }) => {\n  console.log(\"Analytics ready\", payload);\n});\n\nexport const disableTracking = () => {\n  setIsTrackingDisabled(true);\n  // @ts-expect-error\n  analytics.plugins.disable(plugins.map((p) => p.name));\n};\n\nexport const useIsTrackingDisabled = () => {\n  // return !getIsTrackingDisabled()\n  // watch the cookie for changes\n  const [isTrackingDisabled, setIsTrackingDisabled] = useState(\n    getIsTrackingDisabled(),\n  );\n  useInterval(() => {\n    setIsTrackingDisabled(getIsTrackingDisabled());\n  }, 500);\n  return isTrackingDisabled;\n};\n","import {useSelector} from \"../../createStore.mjs\";\n\nexport const useAccessToken = () => useSelector(state => state.auth.accessToken)\n\nexport const useRefreshToken = () => useSelector(state => state.auth.refreshToken)\n\nexport const useUserId = () => useSelector(state => state.auth?.userId)\n\nexport const useCustomerId = () => useSelector(state => state.auth?.customerId)\n","import {createElement, Fragment, isValidElement, ReactElement} from \"react\";\nimport {getLocale} from \"../data/initial-state/intial-state-accessors.mjs\";\n\nexport type Localized<T> = {\n    en: T\n    [key: string]: T\n}\n\nexport const isLocalized = <T, >(content?: any): content is Localized<T> =>\n    typeof content === 'object' &&\n    content !== null &&\n    'en' in content\n\nexport type TextContent = string | Localized<string>\n\ntype Options = {\n    locale?: string\n    values?: Record<string, string | ReactElement>\n\n}\n\n// Returns a ReactElement if any of the values are ReactElements, otherwise returns a string\nexport const localize = <T extends string | ReactElement = string>(\n    content: TextContent, \n    options?: Options\n): T extends ReactElement ? ReactElement : string => {\n    const {\n        locale = getLocale(),\n        values = {},\n    } = options || {}\n    if (isLocalized<string>(content)) {\n        return localize(content[locale] || content.en, {\n            locale,\n            values,\n        }) as any;\n    }\n\n    const parts = content?.split(/({[^}]+})/)\n\n    if (Object.values(values).some(isValidElement)) {\n        return createElement(\n            Fragment,\n            undefined,\n            ...(parts || [])?.map((part, index) => {\n                if (part.startsWith('{')) {\n                    const key = part.slice(1, -1);\n                    const value = values[key];\n                    return value !== undefined ? value : part;\n                }\n                return part\n            }),\n        ) as any;\n    }\n    return parts?.map((part, index) => {\n        if (part.startsWith('{')) {\n            const key = part.slice(1, -1);\n            const value = values[key];\n            return value !== undefined ? value : part;\n        }\n        return part\n    }).join('') as any;\n}\n\nexport const getLocaleByCountry = (country: string): string => {\n    switch (country) {\n        case 'JP':\n            return 'ja'\n        default:\n            return 'en'\n    }\n}\n","import {localize} from \"../lang/localized-content.mjs\";\n\nexport const errors = {\n    arccosError: 'arccosError',\n    updateAccessTokenError: 'updateAccessTokenError',\n    paymentError: 'paymentError',\n    ArccosNetworkError: 'ArccosNetworkError',\n    PaymentError: 'PaymentError',\n    ArccosValidationError: 'ArccosValidationError'\n} as const\n\ntype ArccosErrorOptions = {\n    title?: string\n    message: string\n    name?: typeof errors[keyof typeof errors]\n    actionUrl?: string\n    actionText?: string\n    cause?: unknown\n}\n\nexport class ArccosError extends Error {\n    name: typeof errors[keyof typeof errors]\n    message: string\n    title: string\n    actionUrl?: string\n    actionText?: string\n    constructor(params: ArccosErrorOptions | ArccosError) {\n        if (params instanceof ArccosError) {\n            return params;\n        }\n        const {\n            message,\n            name,\n            title = localize('Something went wrong'),\n            actionUrl,\n            actionText,\n            cause,\n        } = params;\n        super(message, cause !== undefined ? { cause } : undefined);\n        this.name = name || errors.arccosError;\n        this.message = message;\n        this.title = title;\n        this.actionUrl = actionUrl;\n        this.actionText = actionText;\n    }\n}\n","import {useFetchFromArccos} from \"./arccos-api.mjs\";\nimport {useRefreshToken, useUserId} from \"../../redux/slices/auth/auth-selectors.mjs\";\nimport {useCallback} from \"react\";\nimport {useDispatch} from \"react-redux\";\nimport {setAccessToken, setRefreshToken, setUserId} from \"../../redux/slices/auth/auth-slice.mjs\";\nimport {ArccosError} from \"../../../util/arccos-error.mjs\";\n\nconst useAuthFetch = () => {\n    return useFetchFromArccos({\n        baseUrl: import.meta.env.CLIENT_ARCCOS_AUTH_BASE_URL,\n        updateAccessToken: () => {\n            throw new ArccosError({\n                name: 'updateAccessTokenError',\n                message: 'updateAccessToken called during auth flow. If you feel like this is an error, please contact starter@arccosgolf.com\\'',\n            });\n        },\n        retries: 1,\n        shouldReauthenticate: false,\n    })\n}\n\ntype AccessKeysRequest = {\n    email: string\n    password: string\n}\n\nexport type AccessKeysResponse = {\n    accessKey: string\n    userId: string\n}\n\nconst useFetchAccessKeys = () => {\n    const fetchFromArccos = useAuthFetch()\n    return useCallback(async (body: AccessKeysRequest) => {\n        return await fetchFromArccos<AccessKeysRequest, AccessKeysResponse>({\n            path: '/accessKeys',\n            params: {\n                scrubBody: true,\n            },\n            body,\n            init: {\n                method: 'POST',\n            }\n        })\n    }, [fetchFromArccos])\n}\n\ntype TokensRequest = {\n    userId: string\n    accessKey: string\n}\n\ntype TokensResponse = {\n    userId: string\n    token: string\n}\n\nconst useFetchTokens = () => {\n    const fetchFromArccos = useAuthFetch()\n    return useCallback(async (body: TokensRequest) => {\n        return await fetchFromArccos<TokensRequest, TokensResponse>({\n            path: '/tokens',\n            params: {\n                scrubBody: true,\n            },\n            body,\n            init: {\n                method: 'POST',\n            }\n        })\n\n    }, [fetchFromArccos])\n}\n\nexport const useUpdateAccessToken = () => {\n    const dispatch = useDispatch()\n    const reduxRefreshToken = useRefreshToken()\n    const reduxUserId = useUserId()\n    const fetchTokens = useFetchTokens()\n\n    return useCallback(async (overrides?: AccessKeysResponse) => {\n        const accessKey = overrides?.accessKey || reduxRefreshToken\n        const userId = overrides?.userId || reduxUserId\n        if (!accessKey || !userId) {\n            throw new ArccosError({\n                name: 'updateAccessTokenError',\n                message: 'No access key or user id. If you feel like this is an error, please contact starter@arccosgolf.com\\'',\n            })\n        }\n        const tokens = await fetchTokens({\n            userId,\n            accessKey,\n        })\n        dispatch(setAccessToken(tokens.token))\n        dispatch(setUserId(tokens.userId))\n        return tokens.token\n    }, [reduxRefreshToken, dispatch, reduxUserId])\n}\n\nexport const useUpdateRefreshToken = () => {\n    const dispatch = useDispatch()\n    const fetchAccessKeys = useFetchAccessKeys()\n    return useCallback(async (email: string, password: string) => {\n        const tokens = await fetchAccessKeys({\n            email,\n            password,\n        })\n        dispatch(setRefreshToken(tokens.accessKey))\n        dispatch(setUserId(tokens.userId))\n        return tokens\n    }, [dispatch])\n\n}\n\n","// src/subscribable.ts\nvar Subscribable = class {\n  constructor() {\n    this.listeners = /* @__PURE__ */ new Set();\n    this.subscribe = this.subscribe.bind(this);\n  }\n  subscribe(listener) {\n    this.listeners.add(listener);\n    this.onSubscribe();\n    return () => {\n      this.listeners.delete(listener);\n      this.onUnsubscribe();\n    };\n  }\n  hasListeners() {\n    return this.listeners.size > 0;\n  }\n  onSubscribe() {\n  }\n  onUnsubscribe() {\n  }\n};\nexport {\n  Subscribable\n};\n//# sourceMappingURL=subscribable.js.map","// src/timeoutManager.ts\nvar defaultTimeoutProvider = {\n  // We need the wrapper function syntax below instead of direct references to\n  // global setTimeout etc.\n  //\n  // BAD: `setTimeout: setTimeout`\n  // GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`\n  //\n  // If we use direct references here, then anything that wants to spy on or\n  // replace the global setTimeout (like tests) won't work since we'll already\n  // have a hard reference to the original implementation at the time when this\n  // file was imported.\n  setTimeout: (callback, delay) => setTimeout(callback, delay),\n  clearTimeout: (timeoutId) => clearTimeout(timeoutId),\n  setInterval: (callback, delay) => setInterval(callback, delay),\n  clearInterval: (intervalId) => clearInterval(intervalId)\n};\nvar TimeoutManager = class {\n  // We cannot have TimeoutManager<T> as we must instantiate it with a concrete\n  // type at app boot; and if we leave that type, then any new timer provider\n  // would need to support ReturnType<typeof setTimeout>, which is infeasible.\n  //\n  // We settle for type safety for the TimeoutProvider type, and accept that\n  // this class is unsafe internally to allow for extension.\n  #provider = defaultTimeoutProvider;\n  #providerCalled = false;\n  setTimeoutProvider(provider) {\n    if (process.env.NODE_ENV !== \"production\") {\n      if (this.#providerCalled && provider !== this.#provider) {\n        console.error(\n          `[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,\n          { previous: this.#provider, provider }\n        );\n      }\n    }\n    this.#provider = provider;\n    if (process.env.NODE_ENV !== \"production\") {\n      this.#providerCalled = false;\n    }\n  }\n  setTimeout(callback, delay) {\n    if (process.env.NODE_ENV !== \"production\") {\n      this.#providerCalled = true;\n    }\n    return this.#provider.setTimeout(callback, delay);\n  }\n  clearTimeout(timeoutId) {\n    this.#provider.clearTimeout(timeoutId);\n  }\n  setInterval(callback, delay) {\n    if (process.env.NODE_ENV !== \"production\") {\n      this.#providerCalled = true;\n    }\n    return this.#provider.setInterval(callback, delay);\n  }\n  clearInterval(intervalId) {\n    this.#provider.clearInterval(intervalId);\n  }\n};\nvar timeoutManager = new TimeoutManager();\nfunction systemSetTimeoutZero(callback) {\n  setTimeout(callback, 0);\n}\nexport {\n  TimeoutManager,\n  defaultTimeoutProvider,\n  systemSetTimeoutZero,\n  timeoutManager\n};\n//# sourceMappingURL=timeoutManager.js.map","// src/utils.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar isServer = typeof window === \"undefined\" || \"Deno\" in globalThis;\nfunction noop() {\n}\nfunction functionalUpdate(updater, input) {\n  return typeof updater === \"function\" ? updater(input) : updater;\n}\nfunction isValidTimeout(value) {\n  return typeof value === \"number\" && value >= 0 && value !== Infinity;\n}\nfunction timeUntilStale(updatedAt, staleTime) {\n  return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nfunction resolveStaleTime(staleTime, query) {\n  return typeof staleTime === \"function\" ? staleTime(query) : staleTime;\n}\nfunction resolveEnabled(enabled, query) {\n  return typeof enabled === \"function\" ? enabled(query) : enabled;\n}\nfunction matchQuery(filters, query) {\n  const {\n    type = \"all\",\n    exact,\n    fetchStatus,\n    predicate,\n    queryKey,\n    stale\n  } = filters;\n  if (queryKey) {\n    if (exact) {\n      if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n        return false;\n      }\n    } else if (!partialMatchKey(query.queryKey, queryKey)) {\n      return false;\n    }\n  }\n  if (type !== \"all\") {\n    const isActive = query.isActive();\n    if (type === \"active\" && !isActive) {\n      return false;\n    }\n    if (type === \"inactive\" && isActive) {\n      return false;\n    }\n  }\n  if (typeof stale === \"boolean\" && query.isStale() !== stale) {\n    return false;\n  }\n  if (fetchStatus && fetchStatus !== query.state.fetchStatus) {\n    return false;\n  }\n  if (predicate && !predicate(query)) {\n    return false;\n  }\n  return true;\n}\nfunction matchMutation(filters, mutation) {\n  const { exact, status, predicate, mutationKey } = filters;\n  if (mutationKey) {\n    if (!mutation.options.mutationKey) {\n      return false;\n    }\n    if (exact) {\n      if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {\n        return false;\n      }\n    } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n      return false;\n    }\n  }\n  if (status && mutation.state.status !== status) {\n    return false;\n  }\n  if (predicate && !predicate(mutation)) {\n    return false;\n  }\n  return true;\n}\nfunction hashQueryKeyByOptions(queryKey, options) {\n  const hashFn = options?.queryKeyHashFn || hashKey;\n  return hashFn(queryKey);\n}\nfunction hashKey(queryKey) {\n  return JSON.stringify(\n    queryKey,\n    (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {\n      result[key] = val[key];\n      return result;\n    }, {}) : val\n  );\n}\nfunction partialMatchKey(a, b) {\n  if (a === b) {\n    return true;\n  }\n  if (typeof a !== typeof b) {\n    return false;\n  }\n  if (a && b && typeof a === \"object\" && typeof b === \"object\") {\n    return Object.keys(b).every((key) => partialMatchKey(a[key], b[key]));\n  }\n  return false;\n}\nvar hasOwn = Object.prototype.hasOwnProperty;\nfunction replaceEqualDeep(a, b) {\n  if (a === b) {\n    return a;\n  }\n  const array = isPlainArray(a) && isPlainArray(b);\n  if (!array && !(isPlainObject(a) && isPlainObject(b))) return b;\n  const aItems = array ? a : Object.keys(a);\n  const aSize = aItems.length;\n  const bItems = array ? b : Object.keys(b);\n  const bSize = bItems.length;\n  const copy = array ? new Array(bSize) : {};\n  let equalItems = 0;\n  for (let i = 0; i < bSize; i++) {\n    const key = array ? i : bItems[i];\n    const aItem = a[key];\n    const bItem = b[key];\n    if (aItem === bItem) {\n      copy[key] = aItem;\n      if (array ? i < aSize : hasOwn.call(a, key)) equalItems++;\n      continue;\n    }\n    if (aItem === null || bItem === null || typeof aItem !== \"object\" || typeof bItem !== \"object\") {\n      copy[key] = bItem;\n      continue;\n    }\n    const v = replaceEqualDeep(aItem, bItem);\n    copy[key] = v;\n    if (v === aItem) equalItems++;\n  }\n  return aSize === bSize && equalItems === aSize ? a : copy;\n}\nfunction shallowEqualObjects(a, b) {\n  if (!b || Object.keys(a).length !== Object.keys(b).length) {\n    return false;\n  }\n  for (const key in a) {\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction isPlainArray(value) {\n  return Array.isArray(value) && value.length === Object.keys(value).length;\n}\nfunction isPlainObject(o) {\n  if (!hasObjectPrototype(o)) {\n    return false;\n  }\n  const ctor = o.constructor;\n  if (ctor === void 0) {\n    return true;\n  }\n  const prot = ctor.prototype;\n  if (!hasObjectPrototype(prot)) {\n    return false;\n  }\n  if (!prot.hasOwnProperty(\"isPrototypeOf\")) {\n    return false;\n  }\n  if (Object.getPrototypeOf(o) !== Object.prototype) {\n    return false;\n  }\n  return true;\n}\nfunction hasObjectPrototype(o) {\n  return Object.prototype.toString.call(o) === \"[object Object]\";\n}\nfunction sleep(timeout) {\n  return new Promise((resolve) => {\n    timeoutManager.setTimeout(resolve, timeout);\n  });\n}\nfunction replaceData(prevData, data, options) {\n  if (typeof options.structuralSharing === \"function\") {\n    return options.structuralSharing(prevData, data);\n  } else if (options.structuralSharing !== false) {\n    if (process.env.NODE_ENV !== \"production\") {\n      try {\n        return replaceEqualDeep(prevData, data);\n      } catch (error) {\n        console.error(\n          `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`\n        );\n        throw error;\n      }\n    }\n    return replaceEqualDeep(prevData, data);\n  }\n  return data;\n}\nfunction keepPreviousData(previousData) {\n  return previousData;\n}\nfunction addToEnd(items, item, max = 0) {\n  const newItems = [...items, item];\n  return max && newItems.length > max ? newItems.slice(1) : newItems;\n}\nfunction addToStart(items, item, max = 0) {\n  const newItems = [item, ...items];\n  return max && newItems.length > max ? newItems.slice(0, -1) : newItems;\n}\nvar skipToken = Symbol();\nfunction ensureQueryFn(options, fetchOptions) {\n  if (process.env.NODE_ENV !== \"production\") {\n    if (options.queryFn === skipToken) {\n      console.error(\n        `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`\n      );\n    }\n  }\n  if (!options.queryFn && fetchOptions?.initialPromise) {\n    return () => fetchOptions.initialPromise;\n  }\n  if (!options.queryFn || options.queryFn === skipToken) {\n    return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));\n  }\n  return options.queryFn;\n}\nfunction shouldThrowError(throwOnError, params) {\n  if (typeof throwOnError === \"function\") {\n    return throwOnError(...params);\n  }\n  return !!throwOnError;\n}\nexport {\n  addToEnd,\n  addToStart,\n  ensureQueryFn,\n  functionalUpdate,\n  hashKey,\n  hashQueryKeyByOptions,\n  isPlainArray,\n  isPlainObject,\n  isServer,\n  isValidTimeout,\n  keepPreviousData,\n  matchMutation,\n  matchQuery,\n  noop,\n  partialMatchKey,\n  replaceData,\n  replaceEqualDeep,\n  resolveEnabled,\n  resolveStaleTime,\n  shallowEqualObjects,\n  shouldThrowError,\n  skipToken,\n  sleep,\n  timeUntilStale\n};\n//# sourceMappingURL=utils.js.map","// src/focusManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar FocusManager = class extends Subscribable {\n  #focused;\n  #cleanup;\n  #setup;\n  constructor() {\n    super();\n    this.#setup = (onFocus) => {\n      if (!isServer && window.addEventListener) {\n        const listener = () => onFocus();\n        window.addEventListener(\"visibilitychange\", listener, false);\n        return () => {\n          window.removeEventListener(\"visibilitychange\", listener);\n        };\n      }\n      return;\n    };\n  }\n  onSubscribe() {\n    if (!this.#cleanup) {\n      this.setEventListener(this.#setup);\n    }\n  }\n  onUnsubscribe() {\n    if (!this.hasListeners()) {\n      this.#cleanup?.();\n      this.#cleanup = void 0;\n    }\n  }\n  setEventListener(setup) {\n    this.#setup = setup;\n    this.#cleanup?.();\n    this.#cleanup = setup((focused) => {\n      if (typeof focused === \"boolean\") {\n        this.setFocused(focused);\n      } else {\n        this.onFocus();\n      }\n    });\n  }\n  setFocused(focused) {\n    const changed = this.#focused !== focused;\n    if (changed) {\n      this.#focused = focused;\n      this.onFocus();\n    }\n  }\n  onFocus() {\n    const isFocused = this.isFocused();\n    this.listeners.forEach((listener) => {\n      listener(isFocused);\n    });\n  }\n  isFocused() {\n    if (typeof this.#focused === \"boolean\") {\n      return this.#focused;\n    }\n    return globalThis.document?.visibilityState !== \"hidden\";\n  }\n};\nvar focusManager = new FocusManager();\nexport {\n  FocusManager,\n  focusManager\n};\n//# sourceMappingURL=focusManager.js.map","// src/thenable.ts\nimport { noop } from \"./utils.js\";\nfunction pendingThenable() {\n  let resolve;\n  let reject;\n  const thenable = new Promise((_resolve, _reject) => {\n    resolve = _resolve;\n    reject = _reject;\n  });\n  thenable.status = \"pending\";\n  thenable.catch(() => {\n  });\n  function finalize(data) {\n    Object.assign(thenable, data);\n    delete thenable.resolve;\n    delete thenable.reject;\n  }\n  thenable.resolve = (value) => {\n    finalize({\n      status: \"fulfilled\",\n      value\n    });\n    resolve(value);\n  };\n  thenable.reject = (reason) => {\n    finalize({\n      status: \"rejected\",\n      reason\n    });\n    reject(reason);\n  };\n  return thenable;\n}\nfunction tryResolveSync(promise) {\n  let data;\n  promise.then((result) => {\n    data = result;\n    return result;\n  }, noop)?.catch(noop);\n  if (data !== void 0) {\n    return { data };\n  }\n  return void 0;\n}\nexport {\n  pendingThenable,\n  tryResolveSync\n};\n//# sourceMappingURL=thenable.js.map","// src/hydration.ts\nimport { tryResolveSync } from \"./thenable.js\";\nimport { noop } from \"./utils.js\";\nfunction defaultTransformerFn(data) {\n  return data;\n}\nfunction dehydrateMutation(mutation) {\n  return {\n    mutationKey: mutation.options.mutationKey,\n    state: mutation.state,\n    ...mutation.options.scope && { scope: mutation.options.scope },\n    ...mutation.meta && { meta: mutation.meta }\n  };\n}\nfunction dehydrateQuery(query, serializeData, shouldRedactErrors) {\n  const promise = query.promise?.then(serializeData).catch((error) => {\n    if (!shouldRedactErrors(error)) {\n      return Promise.reject(error);\n    }\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(\n        `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`\n      );\n    }\n    return Promise.reject(new Error(\"redacted\"));\n  });\n  promise?.catch(noop);\n  return {\n    dehydratedAt: Date.now(),\n    state: {\n      ...query.state,\n      ...query.state.data !== void 0 && {\n        data: serializeData(query.state.data)\n      }\n    },\n    queryKey: query.queryKey,\n    queryHash: query.queryHash,\n    ...query.state.status === \"pending\" && {\n      promise\n    },\n    ...query.meta && { meta: query.meta }\n  };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n  return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n  return query.state.status === \"success\";\n}\nfunction defaultShouldRedactErrors(_) {\n  return true;\n}\nfunction dehydrate(client, options = {}) {\n  const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n  const mutations = client.getMutationCache().getAll().flatMap(\n    (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n  );\n  const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n  const shouldRedactErrors = options.shouldRedactErrors ?? client.getDefaultOptions().dehydrate?.shouldRedactErrors ?? defaultShouldRedactErrors;\n  const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;\n  const queries = client.getQueryCache().getAll().flatMap(\n    (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData, shouldRedactErrors)] : []\n  );\n  return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n  if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n    return;\n  }\n  const mutationCache = client.getMutationCache();\n  const queryCache = client.getQueryCache();\n  const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;\n  const mutations = dehydratedState.mutations || [];\n  const queries = dehydratedState.queries || [];\n  mutations.forEach(({ state, ...mutationOptions }) => {\n    mutationCache.build(\n      client,\n      {\n        ...client.getDefaultOptions().hydrate?.mutations,\n        ...options?.defaultOptions?.mutations,\n        ...mutationOptions\n      },\n      state\n    );\n  });\n  queries.forEach(\n    ({ queryKey, state, queryHash, meta, promise, dehydratedAt }) => {\n      const syncData = promise ? tryResolveSync(promise) : void 0;\n      const rawData = state.data === void 0 ? syncData?.data : state.data;\n      const data = rawData === void 0 ? rawData : deserializeData(rawData);\n      let query = queryCache.get(queryHash);\n      const existingQueryIsPending = query?.state.status === \"pending\";\n      const existingQueryIsFetching = query?.state.fetchStatus === \"fetching\";\n      if (query) {\n        const hasNewerSyncData = syncData && // We only need this undefined check to handle older dehydration\n        // payloads that might not have dehydratedAt\n        dehydratedAt !== void 0 && dehydratedAt > query.state.dataUpdatedAt;\n        if (state.dataUpdatedAt > query.state.dataUpdatedAt || hasNewerSyncData) {\n          const { fetchStatus: _ignored, ...serializedState } = state;\n          query.setState({\n            ...serializedState,\n            data\n          });\n        }\n      } else {\n        query = queryCache.build(\n          client,\n          {\n            ...client.getDefaultOptions().hydrate?.queries,\n            ...options?.defaultOptions?.queries,\n            queryKey,\n            queryHash,\n            meta\n          },\n          // Reset fetch status to idle to avoid\n          // query being stuck in fetching state upon hydration\n          {\n            ...state,\n            data,\n            fetchStatus: \"idle\",\n            status: data !== void 0 ? \"success\" : state.status\n          }\n        );\n      }\n      if (promise && !existingQueryIsPending && !existingQueryIsFetching && // Only hydrate if dehydration is newer than any existing data,\n      // this is always true for new queries\n      (dehydratedAt === void 0 || dehydratedAt > query.state.dataUpdatedAt)) {\n        query.fetch(void 0, {\n          // RSC transformed promises are not thenable\n          initialPromise: Promise.resolve(promise).then(deserializeData)\n        }).catch(noop);\n      }\n    }\n  );\n}\nexport {\n  defaultShouldDehydrateMutation,\n  defaultShouldDehydrateQuery,\n  dehydrate,\n  hydrate\n};\n//# sourceMappingURL=hydration.js.map","// src/notifyManager.ts\nimport { systemSetTimeoutZero } from \"./timeoutManager.js\";\nvar defaultScheduler = systemSetTimeoutZero;\nfunction createNotifyManager() {\n  let queue = [];\n  let transactions = 0;\n  let notifyFn = (callback) => {\n    callback();\n  };\n  let batchNotifyFn = (callback) => {\n    callback();\n  };\n  let scheduleFn = defaultScheduler;\n  const schedule = (callback) => {\n    if (transactions) {\n      queue.push(callback);\n    } else {\n      scheduleFn(() => {\n        notifyFn(callback);\n      });\n    }\n  };\n  const flush = () => {\n    const originalQueue = queue;\n    queue = [];\n    if (originalQueue.length) {\n      scheduleFn(() => {\n        batchNotifyFn(() => {\n          originalQueue.forEach((callback) => {\n            notifyFn(callback);\n          });\n        });\n      });\n    }\n  };\n  return {\n    batch: (callback) => {\n      let result;\n      transactions++;\n      try {\n        result = callback();\n      } finally {\n        transactions--;\n        if (!transactions) {\n          flush();\n        }\n      }\n      return result;\n    },\n    /**\n     * All calls to the wrapped function will be batched.\n     */\n    batchCalls: (callback) => {\n      return (...args) => {\n        schedule(() => {\n          callback(...args);\n        });\n      };\n    },\n    schedule,\n    /**\n     * Use this method to set a custom notify function.\n     * This can be used to for example wrap notifications with `React.act` while running tests.\n     */\n    setNotifyFunction: (fn) => {\n      notifyFn = fn;\n    },\n    /**\n     * Use this method to set a custom function to batch notifications together into a single tick.\n     * By default React Query will use the batch function provided by ReactDOM or React Native.\n     */\n    setBatchNotifyFunction: (fn) => {\n      batchNotifyFn = fn;\n    },\n    setScheduler: (fn) => {\n      scheduleFn = fn;\n    }\n  };\n}\nvar notifyManager = createNotifyManager();\nexport {\n  createNotifyManager,\n  defaultScheduler,\n  notifyManager\n};\n//# sourceMappingURL=notifyManager.js.map","// src/onlineManager.ts\nimport { Subscribable } from \"./subscribable.js\";\nimport { isServer } from \"./utils.js\";\nvar OnlineManager = class extends Subscribable {\n  #online = true;\n  #cleanup;\n  #setup;\n  constructor() {\n    super();\n    this.#setup = (onOnline) => {\n      if (!isServer && window.addEventListener) {\n        const onlineListener = () => onOnline(true);\n        const offlineListener = () => onOnline(false);\n        window.addEventListener(\"online\", onlineListener, false);\n        window.addEventListener(\"offline\", offlineListener, false);\n        return () => {\n          window.removeEventListener(\"online\", onlineListener);\n          window.removeEventListener(\"offline\", offlineListener);\n        };\n      }\n      return;\n    };\n  }\n  onSubscribe() {\n    if (!this.#cleanup) {\n      this.setEventListener(this.#setup);\n    }\n  }\n  onUnsubscribe() {\n    if (!this.hasListeners()) {\n      this.#cleanup?.();\n      this.#cleanup = void 0;\n    }\n  }\n  setEventListener(setup) {\n    this.#setup = setup;\n    this.#cleanup?.();\n    this.#cleanup = setup(this.setOnline.bind(this));\n  }\n  setOnline(online) {\n    const changed = this.#online !== online;\n    if (changed) {\n      this.#online = online;\n      this.listeners.forEach((listener) => {\n        listener(online);\n      });\n    }\n  }\n  isOnline() {\n    return this.#online;\n  }\n};\nvar onlineManager = new OnlineManager();\nexport {\n  OnlineManager,\n  onlineManager\n};\n//# sourceMappingURL=onlineManager.js.map","// src/retryer.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport { isServer, sleep } from \"./utils.js\";\nfunction defaultRetryDelay(failureCount) {\n  return Math.min(1e3 * 2 ** failureCount, 3e4);\n}\nfunction canFetch(networkMode) {\n  return (networkMode ?? \"online\") === \"online\" ? onlineManager.isOnline() : true;\n}\nvar CancelledError = class extends Error {\n  constructor(options) {\n    super(\"CancelledError\");\n    this.revert = options?.revert;\n    this.silent = options?.silent;\n  }\n};\nfunction isCancelledError(value) {\n  return value instanceof CancelledError;\n}\nfunction createRetryer(config) {\n  let isRetryCancelled = false;\n  let failureCount = 0;\n  let continueFn;\n  const thenable = pendingThenable();\n  const isResolved = () => thenable.status !== \"pending\";\n  const cancel = (cancelOptions) => {\n    if (!isResolved()) {\n      const error = new CancelledError(cancelOptions);\n      reject(error);\n      config.onCancel?.(error);\n    }\n  };\n  const cancelRetry = () => {\n    isRetryCancelled = true;\n  };\n  const continueRetry = () => {\n    isRetryCancelled = false;\n  };\n  const canContinue = () => focusManager.isFocused() && (config.networkMode === \"always\" || onlineManager.isOnline()) && config.canRun();\n  const canStart = () => canFetch(config.networkMode) && config.canRun();\n  const resolve = (value) => {\n    if (!isResolved()) {\n      continueFn?.();\n      thenable.resolve(value);\n    }\n  };\n  const reject = (value) => {\n    if (!isResolved()) {\n      continueFn?.();\n      thenable.reject(value);\n    }\n  };\n  const pause = () => {\n    return new Promise((continueResolve) => {\n      continueFn = (value) => {\n        if (isResolved() || canContinue()) {\n          continueResolve(value);\n        }\n      };\n      config.onPause?.();\n    }).then(() => {\n      continueFn = void 0;\n      if (!isResolved()) {\n        config.onContinue?.();\n      }\n    });\n  };\n  const run = () => {\n    if (isResolved()) {\n      return;\n    }\n    let promiseOrValue;\n    const initialPromise = failureCount === 0 ? config.initialPromise : void 0;\n    try {\n      promiseOrValue = initialPromise ?? config.fn();\n    } catch (error) {\n      promiseOrValue = Promise.reject(error);\n    }\n    Promise.resolve(promiseOrValue).then(resolve).catch((error) => {\n      if (isResolved()) {\n        return;\n      }\n      const retry = config.retry ?? (isServer ? 0 : 3);\n      const retryDelay = config.retryDelay ?? defaultRetryDelay;\n      const delay = typeof retryDelay === \"function\" ? retryDelay(failureCount, error) : retryDelay;\n      const shouldRetry = retry === true || typeof retry === \"number\" && failureCount < retry || typeof retry === \"function\" && retry(failureCount, error);\n      if (isRetryCancelled || !shouldRetry) {\n        reject(error);\n        return;\n      }\n      failureCount++;\n      config.onFail?.(failureCount, error);\n      sleep(delay).then(() => {\n        return canContinue() ? void 0 : pause();\n      }).then(() => {\n        if (isRetryCancelled) {\n          reject(error);\n        } else {\n          run();\n        }\n      });\n    });\n  };\n  return {\n    promise: thenable,\n    status: () => thenable.status,\n    cancel,\n    continue: () => {\n      continueFn?.();\n      return thenable;\n    },\n    cancelRetry,\n    continueRetry,\n    canStart,\n    start: () => {\n      if (canStart()) {\n        run();\n      } else {\n        pause().then(run);\n      }\n      return thenable;\n    }\n  };\n}\nexport {\n  CancelledError,\n  canFetch,\n  createRetryer,\n  isCancelledError\n};\n//# sourceMappingURL=retryer.js.map","// src/removable.ts\nimport { timeoutManager } from \"./timeoutManager.js\";\nimport { isServer, isValidTimeout } from \"./utils.js\";\nvar Removable = class {\n  #gcTimeout;\n  destroy() {\n    this.clearGcTimeout();\n  }\n  scheduleGc() {\n    this.clearGcTimeout();\n    if (isValidTimeout(this.gcTime)) {\n      this.#gcTimeout = timeoutManager.setTimeout(() => {\n        this.optionalRemove();\n      }, this.gcTime);\n    }\n  }\n  updateGcTime(newGcTime) {\n    this.gcTime = Math.max(\n      this.gcTime || 0,\n      newGcTime ?? (isServer ? Infinity : 5 * 60 * 1e3)\n    );\n  }\n  clearGcTimeout() {\n    if (this.#gcTimeout) {\n      timeoutManager.clearTimeout(this.#gcTimeout);\n      this.#gcTimeout = void 0;\n    }\n  }\n};\nexport {\n  Removable\n};\n//# sourceMappingURL=removable.js.map","// src/query.ts\nimport {\n  ensureQueryFn,\n  noop,\n  replaceData,\n  resolveEnabled,\n  resolveStaleTime,\n  skipToken,\n  timeUntilStale\n} from \"./utils.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { CancelledError, canFetch, createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\nvar Query = class extends Removable {\n  #initialState;\n  #revertState;\n  #cache;\n  #client;\n  #retryer;\n  #defaultOptions;\n  #abortSignalConsumed;\n  constructor(config) {\n    super();\n    this.#abortSignalConsumed = false;\n    this.#defaultOptions = config.defaultOptions;\n    this.setOptions(config.options);\n    this.observers = [];\n    this.#client = config.client;\n    this.#cache = this.#client.getQueryCache();\n    this.queryKey = config.queryKey;\n    this.queryHash = config.queryHash;\n    this.#initialState = getDefaultState(this.options);\n    this.state = config.state ?? this.#initialState;\n    this.scheduleGc();\n  }\n  get meta() {\n    return this.options.meta;\n  }\n  get promise() {\n    return this.#retryer?.promise;\n  }\n  setOptions(options) {\n    this.options = { ...this.#defaultOptions, ...options };\n    this.updateGcTime(this.options.gcTime);\n    if (this.state && this.state.data === void 0) {\n      const defaultState = getDefaultState(this.options);\n      if (defaultState.data !== void 0) {\n        this.setData(defaultState.data, {\n          updatedAt: defaultState.dataUpdatedAt,\n          manual: true\n        });\n        this.#initialState = defaultState;\n      }\n    }\n  }\n  optionalRemove() {\n    if (!this.observers.length && this.state.fetchStatus === \"idle\") {\n      this.#cache.remove(this);\n    }\n  }\n  setData(newData, options) {\n    const data = replaceData(this.state.data, newData, this.options);\n    this.#dispatch({\n      data,\n      type: \"success\",\n      dataUpdatedAt: options?.updatedAt,\n      manual: options?.manual\n    });\n    return data;\n  }\n  setState(state, setStateOptions) {\n    this.#dispatch({ type: \"setState\", state, setStateOptions });\n  }\n  cancel(options) {\n    const promise = this.#retryer?.promise;\n    this.#retryer?.cancel(options);\n    return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n  }\n  destroy() {\n    super.destroy();\n    this.cancel({ silent: true });\n  }\n  reset() {\n    this.destroy();\n    this.setState(this.#initialState);\n  }\n  isActive() {\n    return this.observers.some(\n      (observer) => resolveEnabled(observer.options.enabled, this) !== false\n    );\n  }\n  isDisabled() {\n    if (this.getObserversCount() > 0) {\n      return !this.isActive();\n    }\n    return this.options.queryFn === skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;\n  }\n  isStatic() {\n    if (this.getObserversCount() > 0) {\n      return this.observers.some(\n        (observer) => resolveStaleTime(observer.options.staleTime, this) === \"static\"\n      );\n    }\n    return false;\n  }\n  isStale() {\n    if (this.getObserversCount() > 0) {\n      return this.observers.some(\n        (observer) => observer.getCurrentResult().isStale\n      );\n    }\n    return this.state.data === void 0 || this.state.isInvalidated;\n  }\n  isStaleByTime(staleTime = 0) {\n    if (this.state.data === void 0) {\n      return true;\n    }\n    if (staleTime === \"static\") {\n      return false;\n    }\n    if (this.state.isInvalidated) {\n      return true;\n    }\n    return !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n  }\n  onFocus() {\n    const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());\n    observer?.refetch({ cancelRefetch: false });\n    this.#retryer?.continue();\n  }\n  onOnline() {\n    const observer = this.observers.find((x) => x.shouldFetchOnReconnect());\n    observer?.refetch({ cancelRefetch: false });\n    this.#retryer?.continue();\n  }\n  addObserver(observer) {\n    if (!this.observers.includes(observer)) {\n      this.observers.push(observer);\n      this.clearGcTimeout();\n      this.#cache.notify({ type: \"observerAdded\", query: this, observer });\n    }\n  }\n  removeObserver(observer) {\n    if (this.observers.includes(observer)) {\n      this.observers = this.observers.filter((x) => x !== observer);\n      if (!this.observers.length) {\n        if (this.#retryer) {\n          if (this.#abortSignalConsumed) {\n            this.#retryer.cancel({ revert: true });\n          } else {\n            this.#retryer.cancelRetry();\n          }\n        }\n        this.scheduleGc();\n      }\n      this.#cache.notify({ type: \"observerRemoved\", query: this, observer });\n    }\n  }\n  getObserversCount() {\n    return this.observers.length;\n  }\n  invalidate() {\n    if (!this.state.isInvalidated) {\n      this.#dispatch({ type: \"invalidate\" });\n    }\n  }\n  async fetch(options, fetchOptions) {\n    if (this.state.fetchStatus !== \"idle\" && // If the promise in the retyer is already rejected, we have to definitely\n    // re-start the fetch; there is a chance that the query is still in a\n    // pending state when that happens\n    this.#retryer?.status() !== \"rejected\") {\n      if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {\n        this.cancel({ silent: true });\n      } else if (this.#retryer) {\n        this.#retryer.continueRetry();\n        return this.#retryer.promise;\n      }\n    }\n    if (options) {\n      this.setOptions(options);\n    }\n    if (!this.options.queryFn) {\n      const observer = this.observers.find((x) => x.options.queryFn);\n      if (observer) {\n        this.setOptions(observer.options);\n      }\n    }\n    if (process.env.NODE_ENV !== \"production\") {\n      if (!Array.isArray(this.options.queryKey)) {\n        console.error(\n          `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`\n        );\n      }\n    }\n    const abortController = new AbortController();\n    const addSignalProperty = (object) => {\n      Object.defineProperty(object, \"signal\", {\n        enumerable: true,\n        get: () => {\n          this.#abortSignalConsumed = true;\n          return abortController.signal;\n        }\n      });\n    };\n    const fetchFn = () => {\n      const queryFn = ensureQueryFn(this.options, fetchOptions);\n      const createQueryFnContext = () => {\n        const queryFnContext2 = {\n          client: this.#client,\n          queryKey: this.queryKey,\n          meta: this.meta\n        };\n        addSignalProperty(queryFnContext2);\n        return queryFnContext2;\n      };\n      const queryFnContext = createQueryFnContext();\n      this.#abortSignalConsumed = false;\n      if (this.options.persister) {\n        return this.options.persister(\n          queryFn,\n          queryFnContext,\n          this\n        );\n      }\n      return queryFn(queryFnContext);\n    };\n    const createFetchContext = () => {\n      const context2 = {\n        fetchOptions,\n        options: this.options,\n        queryKey: this.queryKey,\n        client: this.#client,\n        state: this.state,\n        fetchFn\n      };\n      addSignalProperty(context2);\n      return context2;\n    };\n    const context = createFetchContext();\n    this.options.behavior?.onFetch(context, this);\n    this.#revertState = this.state;\n    if (this.state.fetchStatus === \"idle\" || this.state.fetchMeta !== context.fetchOptions?.meta) {\n      this.#dispatch({ type: \"fetch\", meta: context.fetchOptions?.meta });\n    }\n    this.#retryer = createRetryer({\n      initialPromise: fetchOptions?.initialPromise,\n      fn: context.fetchFn,\n      onCancel: (error) => {\n        if (error instanceof CancelledError && error.revert) {\n          this.setState({\n            ...this.#revertState,\n            fetchStatus: \"idle\"\n          });\n        }\n        abortController.abort();\n      },\n      onFail: (failureCount, error) => {\n        this.#dispatch({ type: \"failed\", failureCount, error });\n      },\n      onPause: () => {\n        this.#dispatch({ type: \"pause\" });\n      },\n      onContinue: () => {\n        this.#dispatch({ type: \"continue\" });\n      },\n      retry: context.options.retry,\n      retryDelay: context.options.retryDelay,\n      networkMode: context.options.networkMode,\n      canRun: () => true\n    });\n    try {\n      const data = await this.#retryer.start();\n      if (data === void 0) {\n        if (process.env.NODE_ENV !== \"production\") {\n          console.error(\n            `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`\n          );\n        }\n        throw new Error(`${this.queryHash} data is undefined`);\n      }\n      this.setData(data);\n      this.#cache.config.onSuccess?.(data, this);\n      this.#cache.config.onSettled?.(\n        data,\n        this.state.error,\n        this\n      );\n      return data;\n    } catch (error) {\n      if (error instanceof CancelledError) {\n        if (error.silent) {\n          return this.#retryer.promise;\n        } else if (error.revert) {\n          if (this.state.data === void 0) {\n            throw error;\n          }\n          return this.state.data;\n        }\n      }\n      this.#dispatch({\n        type: \"error\",\n        error\n      });\n      this.#cache.config.onError?.(\n        error,\n        this\n      );\n      this.#cache.config.onSettled?.(\n        this.state.data,\n        error,\n        this\n      );\n      throw error;\n    } finally {\n      this.scheduleGc();\n    }\n  }\n  #dispatch(action) {\n    const reducer = (state) => {\n      switch (action.type) {\n        case \"failed\":\n          return {\n            ...state,\n            fetchFailureCount: action.failureCount,\n            fetchFailureReason: action.error\n          };\n        case \"pause\":\n          return {\n            ...state,\n            fetchStatus: \"paused\"\n          };\n        case \"continue\":\n          return {\n            ...state,\n            fetchStatus: \"fetching\"\n          };\n        case \"fetch\":\n          return {\n            ...state,\n            ...fetchState(state.data, this.options),\n            fetchMeta: action.meta ?? null\n          };\n        case \"success\":\n          const newState = {\n            ...state,\n            data: action.data,\n            dataUpdateCount: state.dataUpdateCount + 1,\n            dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),\n            error: null,\n            isInvalidated: false,\n            status: \"success\",\n            ...!action.manual && {\n              fetchStatus: \"idle\",\n              fetchFailureCount: 0,\n              fetchFailureReason: null\n            }\n          };\n          this.#revertState = action.manual ? newState : void 0;\n          return newState;\n        case \"error\":\n          const error = action.error;\n          return {\n            ...state,\n            error,\n            errorUpdateCount: state.errorUpdateCount + 1,\n            errorUpdatedAt: Date.now(),\n            fetchFailureCount: state.fetchFailureCount + 1,\n            fetchFailureReason: error,\n            fetchStatus: \"idle\",\n            status: \"error\"\n          };\n        case \"invalidate\":\n          return {\n            ...state,\n            isInvalidated: true\n          };\n        case \"setState\":\n          return {\n            ...state,\n            ...action.state\n          };\n      }\n    };\n    this.state = reducer(this.state);\n    notifyManager.batch(() => {\n      this.observers.forEach((observer) => {\n        observer.onQueryUpdate();\n      });\n      this.#cache.notify({ query: this, type: \"updated\", action });\n    });\n  }\n};\nfunction fetchState(data, options) {\n  return {\n    fetchFailureCount: 0,\n    fetchFailureReason: null,\n    fetchStatus: canFetch(options.networkMode) ? \"fetching\" : \"paused\",\n    ...data === void 0 && {\n      error: null,\n      status: \"pending\"\n    }\n  };\n}\nfunction getDefaultState(options) {\n  const data = typeof options.initialData === \"function\" ? options.initialData() : options.initialData;\n  const hasData = data !== void 0;\n  const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === \"function\" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n  return {\n    data,\n    dataUpdateCount: 0,\n    dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,\n    error: null,\n    errorUpdateCount: 0,\n    errorUpdatedAt: 0,\n    fetchFailureCount: 0,\n    fetchFailureReason: null,\n    fetchMeta: null,\n    isInvalidated: false,\n    status: hasData ? \"success\" : \"pending\",\n    fetchStatus: \"idle\"\n  };\n}\nexport {\n  Query,\n  fetchState\n};\n//# sourceMappingURL=query.js.map","// src/queryObserver.ts\nimport { focusManager } from \"./focusManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { fetchState } from \"./query.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { pendingThenable } from \"./thenable.js\";\nimport {\n  isServer,\n  isValidTimeout,\n  noop,\n  replaceData,\n  resolveEnabled,\n  resolveStaleTime,\n  shallowEqualObjects,\n  timeUntilStale\n} from \"./utils.js\";\nimport { timeoutManager } from \"./timeoutManager.js\";\nvar QueryObserver = class extends Subscribable {\n  constructor(client, options) {\n    super();\n    this.options = options;\n    this.#client = client;\n    this.#selectError = null;\n    this.#currentThenable = pendingThenable();\n    this.bindMethods();\n    this.setOptions(options);\n  }\n  #client;\n  #currentQuery = void 0;\n  #currentQueryInitialState = void 0;\n  #currentResult = void 0;\n  #currentResultState;\n  #currentResultOptions;\n  #currentThenable;\n  #selectError;\n  #selectFn;\n  #selectResult;\n  // This property keeps track of the last query with defined data.\n  // It will be used to pass the previous data and query to the placeholder function between renders.\n  #lastQueryWithDefinedData;\n  #staleTimeoutId;\n  #refetchIntervalId;\n  #currentRefetchInterval;\n  #trackedProps = /* @__PURE__ */ new Set();\n  bindMethods() {\n    this.refetch = this.refetch.bind(this);\n  }\n  onSubscribe() {\n    if (this.listeners.size === 1) {\n      this.#currentQuery.addObserver(this);\n      if (shouldFetchOnMount(this.#currentQuery, this.options)) {\n        this.#executeFetch();\n      } else {\n        this.updateResult();\n      }\n      this.#updateTimers();\n    }\n  }\n  onUnsubscribe() {\n    if (!this.hasListeners()) {\n      this.destroy();\n    }\n  }\n  shouldFetchOnReconnect() {\n    return shouldFetchOn(\n      this.#currentQuery,\n      this.options,\n      this.options.refetchOnReconnect\n    );\n  }\n  shouldFetchOnWindowFocus() {\n    return shouldFetchOn(\n      this.#currentQuery,\n      this.options,\n      this.options.refetchOnWindowFocus\n    );\n  }\n  destroy() {\n    this.listeners = /* @__PURE__ */ new Set();\n    this.#clearStaleTimeout();\n    this.#clearRefetchInterval();\n    this.#currentQuery.removeObserver(this);\n  }\n  setOptions(options) {\n    const prevOptions = this.options;\n    const prevQuery = this.#currentQuery;\n    this.options = this.#client.defaultQueryOptions(options);\n    if (this.options.enabled !== void 0 && typeof this.options.enabled !== \"boolean\" && typeof this.options.enabled !== \"function\" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== \"boolean\") {\n      throw new Error(\n        \"Expected enabled to be a boolean or a callback that returns a boolean\"\n      );\n    }\n    this.#updateQuery();\n    this.#currentQuery.setOptions(this.options);\n    if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {\n      this.#client.getQueryCache().notify({\n        type: \"observerOptionsUpdated\",\n        query: this.#currentQuery,\n        observer: this\n      });\n    }\n    const mounted = this.hasListeners();\n    if (mounted && shouldFetchOptionally(\n      this.#currentQuery,\n      prevQuery,\n      this.options,\n      prevOptions\n    )) {\n      this.#executeFetch();\n    }\n    this.updateResult();\n    if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {\n      this.#updateStaleTimeout();\n    }\n    const nextRefetchInterval = this.#computeRefetchInterval();\n    if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {\n      this.#updateRefetchInterval(nextRefetchInterval);\n    }\n  }\n  getOptimisticResult(options) {\n    const query = this.#client.getQueryCache().build(this.#client, options);\n    const result = this.createResult(query, options);\n    if (shouldAssignObserverCurrentProperties(this, result)) {\n      this.#currentResult = result;\n      this.#currentResultOptions = this.options;\n      this.#currentResultState = this.#currentQuery.state;\n    }\n    return result;\n  }\n  getCurrentResult() {\n    return this.#currentResult;\n  }\n  trackResult(result, onPropTracked) {\n    return new Proxy(result, {\n      get: (target, key) => {\n        this.trackProp(key);\n        onPropTracked?.(key);\n        if (key === \"promise\") {\n          this.trackProp(\"data\");\n          if (!this.options.experimental_prefetchInRender && this.#currentThenable.status === \"pending\") {\n            this.#currentThenable.reject(\n              new Error(\n                \"experimental_prefetchInRender feature flag is not enabled\"\n              )\n            );\n          }\n        }\n        return Reflect.get(target, key);\n      }\n    });\n  }\n  trackProp(key) {\n    this.#trackedProps.add(key);\n  }\n  getCurrentQuery() {\n    return this.#currentQuery;\n  }\n  refetch({ ...options } = {}) {\n    return this.fetch({\n      ...options\n    });\n  }\n  fetchOptimistic(options) {\n    const defaultedOptions = this.#client.defaultQueryOptions(options);\n    const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);\n    return query.fetch().then(() => this.createResult(query, defaultedOptions));\n  }\n  fetch(fetchOptions) {\n    return this.#executeFetch({\n      ...fetchOptions,\n      cancelRefetch: fetchOptions.cancelRefetch ?? true\n    }).then(() => {\n      this.updateResult();\n      return this.#currentResult;\n    });\n  }\n  #executeFetch(fetchOptions) {\n    this.#updateQuery();\n    let promise = this.#currentQuery.fetch(\n      this.options,\n      fetchOptions\n    );\n    if (!fetchOptions?.throwOnError) {\n      promise = promise.catch(noop);\n    }\n    return promise;\n  }\n  #updateStaleTimeout() {\n    this.#clearStaleTimeout();\n    const staleTime = resolveStaleTime(\n      this.options.staleTime,\n      this.#currentQuery\n    );\n    if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {\n      return;\n    }\n    const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);\n    const timeout = time + 1;\n    this.#staleTimeoutId = timeoutManager.setTimeout(() => {\n      if (!this.#currentResult.isStale) {\n        this.updateResult();\n      }\n    }, timeout);\n  }\n  #computeRefetchInterval() {\n    return (typeof this.options.refetchInterval === \"function\" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;\n  }\n  #updateRefetchInterval(nextInterval) {\n    this.#clearRefetchInterval();\n    this.#currentRefetchInterval = nextInterval;\n    if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {\n      return;\n    }\n    this.#refetchIntervalId = timeoutManager.setInterval(() => {\n      if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {\n        this.#executeFetch();\n      }\n    }, this.#currentRefetchInterval);\n  }\n  #updateTimers() {\n    this.#updateStaleTimeout();\n    this.#updateRefetchInterval(this.#computeRefetchInterval());\n  }\n  #clearStaleTimeout() {\n    if (this.#staleTimeoutId) {\n      timeoutManager.clearTimeout(this.#staleTimeoutId);\n      this.#staleTimeoutId = void 0;\n    }\n  }\n  #clearRefetchInterval() {\n    if (this.#refetchIntervalId) {\n      timeoutManager.clearInterval(this.#refetchIntervalId);\n      this.#refetchIntervalId = void 0;\n    }\n  }\n  createResult(query, options) {\n    const prevQuery = this.#currentQuery;\n    const prevOptions = this.options;\n    const prevResult = this.#currentResult;\n    const prevResultState = this.#currentResultState;\n    const prevResultOptions = this.#currentResultOptions;\n    const queryChange = query !== prevQuery;\n    const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;\n    const { state } = query;\n    let newState = { ...state };\n    let isPlaceholderData = false;\n    let data;\n    if (options._optimisticResults) {\n      const mounted = this.hasListeners();\n      const fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n      const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n      if (fetchOnMount || fetchOptionally) {\n        newState = {\n          ...newState,\n          ...fetchState(state.data, query.options)\n        };\n      }\n      if (options._optimisticResults === \"isRestoring\") {\n        newState.fetchStatus = \"idle\";\n      }\n    }\n    let { error, errorUpdatedAt, status } = newState;\n    data = newState.data;\n    let skipSelect = false;\n    if (options.placeholderData !== void 0 && data === void 0 && status === \"pending\") {\n      let placeholderData;\n      if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {\n        placeholderData = prevResult.data;\n        skipSelect = true;\n      } else {\n        placeholderData = typeof options.placeholderData === \"function\" ? options.placeholderData(\n          this.#lastQueryWithDefinedData?.state.data,\n          this.#lastQueryWithDefinedData\n        ) : options.placeholderData;\n      }\n      if (placeholderData !== void 0) {\n        status = \"success\";\n        data = replaceData(\n          prevResult?.data,\n          placeholderData,\n          options\n        );\n        isPlaceholderData = true;\n      }\n    }\n    if (options.select && data !== void 0 && !skipSelect) {\n      if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {\n        data = this.#selectResult;\n      } else {\n        try {\n          this.#selectFn = options.select;\n          data = options.select(data);\n          data = replaceData(prevResult?.data, data, options);\n          this.#selectResult = data;\n          this.#selectError = null;\n        } catch (selectError) {\n          this.#selectError = selectError;\n        }\n      }\n    }\n    if (this.#selectError) {\n      error = this.#selectError;\n      data = this.#selectResult;\n      errorUpdatedAt = Date.now();\n      status = \"error\";\n    }\n    const isFetching = newState.fetchStatus === \"fetching\";\n    const isPending = status === \"pending\";\n    const isError = status === \"error\";\n    const isLoading = isPending && isFetching;\n    const hasData = data !== void 0;\n    const result = {\n      status,\n      fetchStatus: newState.fetchStatus,\n      isPending,\n      isSuccess: status === \"success\",\n      isError,\n      isInitialLoading: isLoading,\n      isLoading,\n      data,\n      dataUpdatedAt: newState.dataUpdatedAt,\n      error,\n      errorUpdatedAt,\n      failureCount: newState.fetchFailureCount,\n      failureReason: newState.fetchFailureReason,\n      errorUpdateCount: newState.errorUpdateCount,\n      isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,\n      isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,\n      isFetching,\n      isRefetching: isFetching && !isPending,\n      isLoadingError: isError && !hasData,\n      isPaused: newState.fetchStatus === \"paused\",\n      isPlaceholderData,\n      isRefetchError: isError && hasData,\n      isStale: isStale(query, options),\n      refetch: this.refetch,\n      promise: this.#currentThenable,\n      isEnabled: resolveEnabled(options.enabled, query) !== false\n    };\n    const nextResult = result;\n    if (this.options.experimental_prefetchInRender) {\n      const finalizeThenableIfPossible = (thenable) => {\n        if (nextResult.status === \"error\") {\n          thenable.reject(nextResult.error);\n        } else if (nextResult.data !== void 0) {\n          thenable.resolve(nextResult.data);\n        }\n      };\n      const recreateThenable = () => {\n        const pending = this.#currentThenable = nextResult.promise = pendingThenable();\n        finalizeThenableIfPossible(pending);\n      };\n      const prevThenable = this.#currentThenable;\n      switch (prevThenable.status) {\n        case \"pending\":\n          if (query.queryHash === prevQuery.queryHash) {\n            finalizeThenableIfPossible(prevThenable);\n          }\n          break;\n        case \"fulfilled\":\n          if (nextResult.status === \"error\" || nextResult.data !== prevThenable.value) {\n            recreateThenable();\n          }\n          break;\n        case \"rejected\":\n          if (nextResult.status !== \"error\" || nextResult.error !== prevThenable.reason) {\n            recreateThenable();\n          }\n          break;\n      }\n    }\n    return nextResult;\n  }\n  updateResult() {\n    const prevResult = this.#currentResult;\n    const nextResult = this.createResult(this.#currentQuery, this.options);\n    this.#currentResultState = this.#currentQuery.state;\n    this.#currentResultOptions = this.options;\n    if (this.#currentResultState.data !== void 0) {\n      this.#lastQueryWithDefinedData = this.#currentQuery;\n    }\n    if (shallowEqualObjects(nextResult, prevResult)) {\n      return;\n    }\n    this.#currentResult = nextResult;\n    const shouldNotifyListeners = () => {\n      if (!prevResult) {\n        return true;\n      }\n      const { notifyOnChangeProps } = this.options;\n      const notifyOnChangePropsValue = typeof notifyOnChangeProps === \"function\" ? notifyOnChangeProps() : notifyOnChangeProps;\n      if (notifyOnChangePropsValue === \"all\" || !notifyOnChangePropsValue && !this.#trackedProps.size) {\n        return true;\n      }\n      const includedProps = new Set(\n        notifyOnChangePropsValue ?? this.#trackedProps\n      );\n      if (this.options.throwOnError) {\n        includedProps.add(\"error\");\n      }\n      return Object.keys(this.#currentResult).some((key) => {\n        const typedKey = key;\n        const changed = this.#currentResult[typedKey] !== prevResult[typedKey];\n        return changed && includedProps.has(typedKey);\n      });\n    };\n    this.#notify({ listeners: shouldNotifyListeners() });\n  }\n  #updateQuery() {\n    const query = this.#client.getQueryCache().build(this.#client, this.options);\n    if (query === this.#currentQuery) {\n      return;\n    }\n    const prevQuery = this.#currentQuery;\n    this.#currentQuery = query;\n    this.#currentQueryInitialState = query.state;\n    if (this.hasListeners()) {\n      prevQuery?.removeObserver(this);\n      query.addObserver(this);\n    }\n  }\n  onQueryUpdate() {\n    this.updateResult();\n    if (this.hasListeners()) {\n      this.#updateTimers();\n    }\n  }\n  #notify(notifyOptions) {\n    notifyManager.batch(() => {\n      if (notifyOptions.listeners) {\n        this.listeners.forEach((listener) => {\n          listener(this.#currentResult);\n        });\n      }\n      this.#client.getQueryCache().notify({\n        query: this.#currentQuery,\n        type: \"observerResultsUpdated\"\n      });\n    });\n  }\n};\nfunction shouldLoadOnMount(query, options) {\n  return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === \"error\" && options.retryOnMount === false);\n}\nfunction shouldFetchOnMount(query, options) {\n  return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\nfunction shouldFetchOn(query, options, field) {\n  if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== \"static\") {\n    const value = typeof field === \"function\" ? field(query) : field;\n    return value === \"always\" || value !== false && isStale(query, options);\n  }\n  return false;\n}\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n  return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== \"error\") && isStale(query, options);\n}\nfunction isStale(query, options) {\n  return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));\n}\nfunction shouldAssignObserverCurrentProperties(observer, optimisticResult) {\n  if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {\n    return true;\n  }\n  return false;\n}\nexport {\n  QueryObserver\n};\n//# sourceMappingURL=queryObserver.js.map","// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n  return {\n    onFetch: (context, query) => {\n      const options = context.options;\n      const direction = context.fetchOptions?.meta?.fetchMore?.direction;\n      const oldPages = context.state.data?.pages || [];\n      const oldPageParams = context.state.data?.pageParams || [];\n      let result = { pages: [], pageParams: [] };\n      let currentPage = 0;\n      const fetchFn = async () => {\n        let cancelled = false;\n        const addSignalProperty = (object) => {\n          Object.defineProperty(object, \"signal\", {\n            enumerable: true,\n            get: () => {\n              if (context.signal.aborted) {\n                cancelled = true;\n              } else {\n                context.signal.addEventListener(\"abort\", () => {\n                  cancelled = true;\n                });\n              }\n              return context.signal;\n            }\n          });\n        };\n        const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n        const fetchPage = async (data, param, previous) => {\n          if (cancelled) {\n            return Promise.reject();\n          }\n          if (param == null && data.pages.length) {\n            return Promise.resolve(data);\n          }\n          const createQueryFnContext = () => {\n            const queryFnContext2 = {\n              client: context.client,\n              queryKey: context.queryKey,\n              pageParam: param,\n              direction: previous ? \"backward\" : \"forward\",\n              meta: context.options.meta\n            };\n            addSignalProperty(queryFnContext2);\n            return queryFnContext2;\n          };\n          const queryFnContext = createQueryFnContext();\n          const page = await queryFn(queryFnContext);\n          const { maxPages } = context.options;\n          const addTo = previous ? addToStart : addToEnd;\n          return {\n            pages: addTo(data.pages, page, maxPages),\n            pageParams: addTo(data.pageParams, param, maxPages)\n          };\n        };\n        if (direction && oldPages.length) {\n          const previous = direction === \"backward\";\n          const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n          const oldData = {\n            pages: oldPages,\n            pageParams: oldPageParams\n          };\n          const param = pageParamFn(options, oldData);\n          result = await fetchPage(oldData, param, previous);\n        } else {\n          const remainingPages = pages ?? oldPages.length;\n          do {\n            const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n            if (currentPage > 0 && param == null) {\n              break;\n            }\n            result = await fetchPage(result, param);\n            currentPage++;\n          } while (currentPage < remainingPages);\n        }\n        return result;\n      };\n      if (context.options.persister) {\n        context.fetchFn = () => {\n          return context.options.persister?.(\n            fetchFn,\n            {\n              client: context.client,\n              queryKey: context.queryKey,\n              meta: context.options.meta,\n              signal: context.signal\n            },\n            query\n          );\n        };\n      } else {\n        context.fetchFn = fetchFn;\n      }\n    }\n  };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n  const lastIndex = pages.length - 1;\n  return pages.length > 0 ? options.getNextPageParam(\n    pages[lastIndex],\n    pages,\n    pageParams[lastIndex],\n    pageParams\n  ) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n  return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\nfunction hasNextPage(options, data) {\n  if (!data) return false;\n  return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n  if (!data || !options.getPreviousPageParam) return false;\n  return getPreviousPageParam(options, data) != null;\n}\nexport {\n  hasNextPage,\n  hasPreviousPage,\n  infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n  #client;\n  #observers;\n  #mutationCache;\n  #retryer;\n  constructor(config) {\n    super();\n    this.#client = config.client;\n    this.mutationId = config.mutationId;\n    this.#mutationCache = config.mutationCache;\n    this.#observers = [];\n    this.state = config.state || getDefaultState();\n    this.setOptions(config.options);\n    this.scheduleGc();\n  }\n  setOptions(options) {\n    this.options = options;\n    this.updateGcTime(this.options.gcTime);\n  }\n  get meta() {\n    return this.options.meta;\n  }\n  addObserver(observer) {\n    if (!this.#observers.includes(observer)) {\n      this.#observers.push(observer);\n      this.clearGcTimeout();\n      this.#mutationCache.notify({\n        type: \"observerAdded\",\n        mutation: this,\n        observer\n      });\n    }\n  }\n  removeObserver(observer) {\n    this.#observers = this.#observers.filter((x) => x !== observer);\n    this.scheduleGc();\n    this.#mutationCache.notify({\n      type: \"observerRemoved\",\n      mutation: this,\n      observer\n    });\n  }\n  optionalRemove() {\n    if (!this.#observers.length) {\n      if (this.state.status === \"pending\") {\n        this.scheduleGc();\n      } else {\n        this.#mutationCache.remove(this);\n      }\n    }\n  }\n  continue() {\n    return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n    this.execute(this.state.variables);\n  }\n  async execute(variables) {\n    const onContinue = () => {\n      this.#dispatch({ type: \"continue\" });\n    };\n    const mutationFnContext = {\n      client: this.#client,\n      meta: this.options.meta,\n      mutationKey: this.options.mutationKey\n    };\n    this.#retryer = createRetryer({\n      fn: () => {\n        if (!this.options.mutationFn) {\n          return Promise.reject(new Error(\"No mutationFn found\"));\n        }\n        return this.options.mutationFn(variables, mutationFnContext);\n      },\n      onFail: (failureCount, error) => {\n        this.#dispatch({ type: \"failed\", failureCount, error });\n      },\n      onPause: () => {\n        this.#dispatch({ type: \"pause\" });\n      },\n      onContinue,\n      retry: this.options.retry ?? 0,\n      retryDelay: this.options.retryDelay,\n      networkMode: this.options.networkMode,\n      canRun: () => this.#mutationCache.canRun(this)\n    });\n    const restored = this.state.status === \"pending\";\n    const isPaused = !this.#retryer.canStart();\n    try {\n      if (restored) {\n        onContinue();\n      } else {\n        this.#dispatch({ type: \"pending\", variables, isPaused });\n        await this.#mutationCache.config.onMutate?.(\n          variables,\n          this,\n          mutationFnContext\n        );\n        const context = await this.options.onMutate?.(\n          variables,\n          mutationFnContext\n        );\n        if (context !== this.state.context) {\n          this.#dispatch({\n            type: \"pending\",\n            context,\n            variables,\n            isPaused\n          });\n        }\n      }\n      const data = await this.#retryer.start();\n      await this.#mutationCache.config.onSuccess?.(\n        data,\n        variables,\n        this.state.context,\n        this,\n        mutationFnContext\n      );\n      await this.options.onSuccess?.(\n        data,\n        variables,\n        this.state.context,\n        mutationFnContext\n      );\n      await this.#mutationCache.config.onSettled?.(\n        data,\n        null,\n        this.state.variables,\n        this.state.context,\n        this,\n        mutationFnContext\n      );\n      await this.options.onSettled?.(\n        data,\n        null,\n        variables,\n        this.state.context,\n        mutationFnContext\n      );\n      this.#dispatch({ type: \"success\", data });\n      return data;\n    } catch (error) {\n      try {\n        await this.#mutationCache.config.onError?.(\n          error,\n          variables,\n          this.state.context,\n          this,\n          mutationFnContext\n        );\n        await this.options.onError?.(\n          error,\n          variables,\n          this.state.context,\n          mutationFnContext\n        );\n        await this.#mutationCache.config.onSettled?.(\n          void 0,\n          error,\n          this.state.variables,\n          this.state.context,\n          this,\n          mutationFnContext\n        );\n        await this.options.onSettled?.(\n          void 0,\n          error,\n          variables,\n          this.state.context,\n          mutationFnContext\n        );\n        throw error;\n      } finally {\n        this.#dispatch({ type: \"error\", error });\n      }\n    } finally {\n      this.#mutationCache.runNext(this);\n    }\n  }\n  #dispatch(action) {\n    const reducer = (state) => {\n      switch (action.type) {\n        case \"failed\":\n          return {\n            ...state,\n            failureCount: action.failureCount,\n            failureReason: action.error\n          };\n        case \"pause\":\n          return {\n            ...state,\n            isPaused: true\n          };\n        case \"continue\":\n          return {\n            ...state,\n            isPaused: false\n          };\n        case \"pending\":\n          return {\n            ...state,\n            context: action.context,\n            data: void 0,\n            failureCount: 0,\n            failureReason: null,\n            error: null,\n            isPaused: action.isPaused,\n            status: \"pending\",\n            variables: action.variables,\n            submittedAt: Date.now()\n          };\n        case \"success\":\n          return {\n            ...state,\n            data: action.data,\n            failureCount: 0,\n            failureReason: null,\n            error: null,\n            status: \"success\",\n            isPaused: false\n          };\n        case \"error\":\n          return {\n            ...state,\n            data: void 0,\n            error: action.error,\n            failureCount: state.failureCount + 1,\n            failureReason: action.error,\n            isPaused: false,\n            status: \"error\"\n          };\n      }\n    };\n    this.state = reducer(this.state);\n    notifyManager.batch(() => {\n      this.#observers.forEach((observer) => {\n        observer.onMutationUpdate(action);\n      });\n      this.#mutationCache.notify({\n        mutation: this,\n        type: \"updated\",\n        action\n      });\n    });\n  }\n};\nfunction getDefaultState() {\n  return {\n    context: void 0,\n    data: void 0,\n    error: null,\n    failureCount: 0,\n    failureReason: null,\n    isPaused: false,\n    status: \"idle\",\n    variables: void 0,\n    submittedAt: 0\n  };\n}\nexport {\n  Mutation,\n  getDefaultState\n};\n//# sourceMappingURL=mutation.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n  constructor(config = {}) {\n    super();\n    this.config = config;\n    this.#mutations = /* @__PURE__ */ new Set();\n    this.#scopes = /* @__PURE__ */ new Map();\n    this.#mutationId = 0;\n  }\n  #mutations;\n  #scopes;\n  #mutationId;\n  build(client, options, state) {\n    const mutation = new Mutation({\n      client,\n      mutationCache: this,\n      mutationId: ++this.#mutationId,\n      options: client.defaultMutationOptions(options),\n      state\n    });\n    this.add(mutation);\n    return mutation;\n  }\n  add(mutation) {\n    this.#mutations.add(mutation);\n    const scope = scopeFor(mutation);\n    if (typeof scope === \"string\") {\n      const scopedMutations = this.#scopes.get(scope);\n      if (scopedMutations) {\n        scopedMutations.push(mutation);\n      } else {\n        this.#scopes.set(scope, [mutation]);\n      }\n    }\n    this.notify({ type: \"added\", mutation });\n  }\n  remove(mutation) {\n    if (this.#mutations.delete(mutation)) {\n      const scope = scopeFor(mutation);\n      if (typeof scope === \"string\") {\n        const scopedMutations = this.#scopes.get(scope);\n        if (scopedMutations) {\n          if (scopedMutations.length > 1) {\n            const index = scopedMutations.indexOf(mutation);\n            if (index !== -1) {\n              scopedMutations.splice(index, 1);\n            }\n          } else if (scopedMutations[0] === mutation) {\n            this.#scopes.delete(scope);\n          }\n        }\n      }\n    }\n    this.notify({ type: \"removed\", mutation });\n  }\n  canRun(mutation) {\n    const scope = scopeFor(mutation);\n    if (typeof scope === \"string\") {\n      const mutationsWithSameScope = this.#scopes.get(scope);\n      const firstPendingMutation = mutationsWithSameScope?.find(\n        (m) => m.state.status === \"pending\"\n      );\n      return !firstPendingMutation || firstPendingMutation === mutation;\n    } else {\n      return true;\n    }\n  }\n  runNext(mutation) {\n    const scope = scopeFor(mutation);\n    if (typeof scope === \"string\") {\n      const foundMutation = this.#scopes.get(scope)?.find((m) => m !== mutation && m.state.isPaused);\n      return foundMutation?.continue() ?? Promise.resolve();\n    } else {\n      return Promise.resolve();\n    }\n  }\n  clear() {\n    notifyManager.batch(() => {\n      this.#mutations.forEach((mutation) => {\n        this.notify({ type: \"removed\", mutation });\n      });\n      this.#mutations.clear();\n      this.#scopes.clear();\n    });\n  }\n  getAll() {\n    return Array.from(this.#mutations);\n  }\n  find(filters) {\n    const defaultedFilters = { exact: true, ...filters };\n    return this.getAll().find(\n      (mutation) => matchMutation(defaultedFilters, mutation)\n    );\n  }\n  findAll(filters = {}) {\n    return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n  }\n  notify(event) {\n    notifyManager.batch(() => {\n      this.listeners.forEach((listener) => {\n        listener(event);\n      });\n    });\n  }\n  resumePausedMutations() {\n    const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n    return notifyManager.batch(\n      () => Promise.all(\n        pausedMutations.map((mutation) => mutation.continue().catch(noop))\n      )\n    );\n  }\n};\nfunction scopeFor(mutation) {\n  return mutation.options.scope?.id;\n}\nexport {\n  MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n  constructor(config = {}) {\n    super();\n    this.config = config;\n    this.#queries = /* @__PURE__ */ new Map();\n  }\n  #queries;\n  build(client, options, state) {\n    const queryKey = options.queryKey;\n    const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n    let query = this.get(queryHash);\n    if (!query) {\n      query = new Query({\n        client,\n        queryKey,\n        queryHash,\n        options: client.defaultQueryOptions(options),\n        state,\n        defaultOptions: client.getQueryDefaults(queryKey)\n      });\n      this.add(query);\n    }\n    return query;\n  }\n  add(query) {\n    if (!this.#queries.has(query.queryHash)) {\n      this.#queries.set(query.queryHash, query);\n      this.notify({\n        type: \"added\",\n        query\n      });\n    }\n  }\n  remove(query) {\n    const queryInMap = this.#queries.get(query.queryHash);\n    if (queryInMap) {\n      query.destroy();\n      if (queryInMap === query) {\n        this.#queries.delete(query.queryHash);\n      }\n      this.notify({ type: \"removed\", query });\n    }\n  }\n  clear() {\n    notifyManager.batch(() => {\n      this.getAll().forEach((query) => {\n        this.remove(query);\n      });\n    });\n  }\n  get(queryHash) {\n    return this.#queries.get(queryHash);\n  }\n  getAll() {\n    return [...this.#queries.values()];\n  }\n  find(filters) {\n    const defaultedFilters = { exact: true, ...filters };\n    return this.getAll().find(\n      (query) => matchQuery(defaultedFilters, query)\n    );\n  }\n  findAll(filters = {}) {\n    const queries = this.getAll();\n    return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n  }\n  notify(event) {\n    notifyManager.batch(() => {\n      this.listeners.forEach((listener) => {\n        listener(event);\n      });\n    });\n  }\n  onFocus() {\n    notifyManager.batch(() => {\n      this.getAll().forEach((query) => {\n        query.onFocus();\n      });\n    });\n  }\n  onOnline() {\n    notifyManager.batch(() => {\n      this.getAll().forEach((query) => {\n        query.onOnline();\n      });\n    });\n  }\n};\nexport {\n  QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/queryClient.ts\nimport {\n  functionalUpdate,\n  hashKey,\n  hashQueryKeyByOptions,\n  noop,\n  partialMatchKey,\n  resolveStaleTime,\n  skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar QueryClient = class {\n  #queryCache;\n  #mutationCache;\n  #defaultOptions;\n  #queryDefaults;\n  #mutationDefaults;\n  #mountCount;\n  #unsubscribeFocus;\n  #unsubscribeOnline;\n  constructor(config = {}) {\n    this.#queryCache = config.queryCache || new QueryCache();\n    this.#mutationCache = config.mutationCache || new MutationCache();\n    this.#defaultOptions = config.defaultOptions || {};\n    this.#queryDefaults = /* @__PURE__ */ new Map();\n    this.#mutationDefaults = /* @__PURE__ */ new Map();\n    this.#mountCount = 0;\n  }\n  mount() {\n    this.#mountCount++;\n    if (this.#mountCount !== 1) return;\n    this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n      if (focused) {\n        await this.resumePausedMutations();\n        this.#queryCache.onFocus();\n      }\n    });\n    this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n      if (online) {\n        await this.resumePausedMutations();\n        this.#queryCache.onOnline();\n      }\n    });\n  }\n  unmount() {\n    this.#mountCount--;\n    if (this.#mountCount !== 0) return;\n    this.#unsubscribeFocus?.();\n    this.#unsubscribeFocus = void 0;\n    this.#unsubscribeOnline?.();\n    this.#unsubscribeOnline = void 0;\n  }\n  isFetching(filters) {\n    return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n  }\n  isMutating(filters) {\n    return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n  }\n  /**\n   * Imperative (non-reactive) way to retrieve data for a QueryKey.\n   * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.\n   *\n   * Hint: Do not use this function inside a component, because it won't receive updates.\n   * Use `useQuery` to create a `QueryObserver` that subscribes to changes.\n   */\n  getQueryData(queryKey) {\n    const options = this.defaultQueryOptions({ queryKey });\n    return this.#queryCache.get(options.queryHash)?.state.data;\n  }\n  ensureQueryData(options) {\n    const defaultedOptions = this.defaultQueryOptions(options);\n    const query = this.#queryCache.build(this, defaultedOptions);\n    const cachedData = query.state.data;\n    if (cachedData === void 0) {\n      return this.fetchQuery(options);\n    }\n    if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n      void this.prefetchQuery(defaultedOptions);\n    }\n    return Promise.resolve(cachedData);\n  }\n  getQueriesData(filters) {\n    return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n      const data = state.data;\n      return [queryKey, data];\n    });\n  }\n  setQueryData(queryKey, updater, options) {\n    const defaultedOptions = this.defaultQueryOptions({ queryKey });\n    const query = this.#queryCache.get(\n      defaultedOptions.queryHash\n    );\n    const prevData = query?.state.data;\n    const data = functionalUpdate(updater, prevData);\n    if (data === void 0) {\n      return void 0;\n    }\n    return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n  }\n  setQueriesData(filters, updater, options) {\n    return notifyManager.batch(\n      () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n        queryKey,\n        this.setQueryData(queryKey, updater, options)\n      ])\n    );\n  }\n  getQueryState(queryKey) {\n    const options = this.defaultQueryOptions({ queryKey });\n    return this.#queryCache.get(\n      options.queryHash\n    )?.state;\n  }\n  removeQueries(filters) {\n    const queryCache = this.#queryCache;\n    notifyManager.batch(() => {\n      queryCache.findAll(filters).forEach((query) => {\n        queryCache.remove(query);\n      });\n    });\n  }\n  resetQueries(filters, options) {\n    const queryCache = this.#queryCache;\n    return notifyManager.batch(() => {\n      queryCache.findAll(filters).forEach((query) => {\n        query.reset();\n      });\n      return this.refetchQueries(\n        {\n          type: \"active\",\n          ...filters\n        },\n        options\n      );\n    });\n  }\n  cancelQueries(filters, cancelOptions = {}) {\n    const defaultedCancelOptions = { revert: true, ...cancelOptions };\n    const promises = notifyManager.batch(\n      () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n    );\n    return Promise.all(promises).then(noop).catch(noop);\n  }\n  invalidateQueries(filters, options = {}) {\n    return notifyManager.batch(() => {\n      this.#queryCache.findAll(filters).forEach((query) => {\n        query.invalidate();\n      });\n      if (filters?.refetchType === \"none\") {\n        return Promise.resolve();\n      }\n      return this.refetchQueries(\n        {\n          ...filters,\n          type: filters?.refetchType ?? filters?.type ?? \"active\"\n        },\n        options\n      );\n    });\n  }\n  refetchQueries(filters, options = {}) {\n    const fetchOptions = {\n      ...options,\n      cancelRefetch: options.cancelRefetch ?? true\n    };\n    const promises = notifyManager.batch(\n      () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled() && !query.isStatic()).map((query) => {\n        let promise = query.fetch(void 0, fetchOptions);\n        if (!fetchOptions.throwOnError) {\n          promise = promise.catch(noop);\n        }\n        return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n      })\n    );\n    return Promise.all(promises).then(noop);\n  }\n  fetchQuery(options) {\n    const defaultedOptions = this.defaultQueryOptions(options);\n    if (defaultedOptions.retry === void 0) {\n      defaultedOptions.retry = false;\n    }\n    const query = this.#queryCache.build(this, defaultedOptions);\n    return query.isStaleByTime(\n      resolveStaleTime(defaultedOptions.staleTime, query)\n    ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n  }\n  prefetchQuery(options) {\n    return this.fetchQuery(options).then(noop).catch(noop);\n  }\n  fetchInfiniteQuery(options) {\n    options.behavior = infiniteQueryBehavior(options.pages);\n    return this.fetchQuery(options);\n  }\n  prefetchInfiniteQuery(options) {\n    return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n  }\n  ensureInfiniteQueryData(options) {\n    options.behavior = infiniteQueryBehavior(options.pages);\n    return this.ensureQueryData(options);\n  }\n  resumePausedMutations() {\n    if (onlineManager.isOnline()) {\n      return this.#mutationCache.resumePausedMutations();\n    }\n    return Promise.resolve();\n  }\n  getQueryCache() {\n    return this.#queryCache;\n  }\n  getMutationCache() {\n    return this.#mutationCache;\n  }\n  getDefaultOptions() {\n    return this.#defaultOptions;\n  }\n  setDefaultOptions(options) {\n    this.#defaultOptions = options;\n  }\n  setQueryDefaults(queryKey, options) {\n    this.#queryDefaults.set(hashKey(queryKey), {\n      queryKey,\n      defaultOptions: options\n    });\n  }\n  getQueryDefaults(queryKey) {\n    const defaults = [...this.#queryDefaults.values()];\n    const result = {};\n    defaults.forEach((queryDefault) => {\n      if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n        Object.assign(result, queryDefault.defaultOptions);\n      }\n    });\n    return result;\n  }\n  setMutationDefaults(mutationKey, options) {\n    this.#mutationDefaults.set(hashKey(mutationKey), {\n      mutationKey,\n      defaultOptions: options\n    });\n  }\n  getMutationDefaults(mutationKey) {\n    const defaults = [...this.#mutationDefaults.values()];\n    const result = {};\n    defaults.forEach((queryDefault) => {\n      if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n        Object.assign(result, queryDefault.defaultOptions);\n      }\n    });\n    return result;\n  }\n  defaultQueryOptions(options) {\n    if (options._defaulted) {\n      return options;\n    }\n    const defaultedOptions = {\n      ...this.#defaultOptions.queries,\n      ...this.getQueryDefaults(options.queryKey),\n      ...options,\n      _defaulted: true\n    };\n    if (!defaultedOptions.queryHash) {\n      defaultedOptions.queryHash = hashQueryKeyByOptions(\n        defaultedOptions.queryKey,\n        defaultedOptions\n      );\n    }\n    if (defaultedOptions.refetchOnReconnect === void 0) {\n      defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n    }\n    if (defaultedOptions.throwOnError === void 0) {\n      defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n    }\n    if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n      defaultedOptions.networkMode = \"offlineFirst\";\n    }\n    if (defaultedOptions.queryFn === skipToken) {\n      defaultedOptions.enabled = false;\n    }\n    return defaultedOptions;\n  }\n  defaultMutationOptions(options) {\n    if (options?._defaulted) {\n      return options;\n    }\n    return {\n      ...this.#defaultOptions.mutations,\n      ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n      ...options,\n      _defaulted: true\n    };\n  }\n  clear() {\n    this.#queryCache.clear();\n    this.#mutationCache.clear();\n  }\n};\nexport {\n  QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n  if (maybeIterable === null || typeof maybeIterable !== 'object') {\n    return null;\n  }\n\n  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n  if (typeof maybeIterator === 'function') {\n    return maybeIterator;\n  }\n\n  return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n  {\n    {\n      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        args[_key2 - 1] = arguments[_key2];\n      }\n\n      printWarning('error', format, args);\n    }\n  }\n}\n\nfunction printWarning(level, format, args) {\n  // When changing this logic, you might want to also\n  // update consoleWithStackDev.www.js as well.\n  {\n    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n    var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n    if (stack !== '') {\n      format += '%s';\n      args = args.concat([stack]);\n    } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n    var argsWithFormat = args.map(function (item) {\n      return String(item);\n    }); // Careful: RN currently depends on this prefix\n\n    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n    // breaks IE9: https://github.com/facebook/react/issues/13610\n    // eslint-disable-next-line react-internal/no-production-logging\n\n    Function.prototype.apply.call(console[level], console, argsWithFormat);\n  }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n  var displayName = outerType.displayName;\n\n  if (displayName) {\n    return displayName;\n  }\n\n  var functionName = innerType.displayName || innerType.name || '';\n  return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n  return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n  if (type == null) {\n    // Host root, text node or just invalid type.\n    return null;\n  }\n\n  {\n    if (typeof type.tag === 'number') {\n      error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n    }\n  }\n\n  if (typeof type === 'function') {\n    return type.displayName || type.name || null;\n  }\n\n  if (typeof type === 'string') {\n    return type;\n  }\n\n  switch (type) {\n    case REACT_FRAGMENT_TYPE:\n      return 'Fragment';\n\n    case REACT_PORTAL_TYPE:\n      return 'Portal';\n\n    case REACT_PROFILER_TYPE:\n      return 'Profiler';\n\n    case REACT_STRICT_MODE_TYPE:\n      return 'StrictMode';\n\n    case REACT_SUSPENSE_TYPE:\n      return 'Suspense';\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return 'SuspenseList';\n\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_CONTEXT_TYPE:\n        var context = type;\n        return getContextName(context) + '.Consumer';\n\n      case REACT_PROVIDER_TYPE:\n        var provider = type;\n        return getContextName(provider._context) + '.Provider';\n\n      case REACT_FORWARD_REF_TYPE:\n        return getWrappedName(type, type.render, 'ForwardRef');\n\n      case REACT_MEMO_TYPE:\n        var outerName = type.displayName || null;\n\n        if (outerName !== null) {\n          return outerName;\n        }\n\n        return getComponentNameFromType(type.type) || 'Memo';\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            return getComponentNameFromType(init(payload));\n          } catch (x) {\n            return null;\n          }\n        }\n\n      // eslint-disable-next-line no-fallthrough\n    }\n  }\n\n  return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n  {\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      prevLog = console.log;\n      prevInfo = console.info;\n      prevWarn = console.warn;\n      prevError = console.error;\n      prevGroup = console.group;\n      prevGroupCollapsed = console.groupCollapsed;\n      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n      var props = {\n        configurable: true,\n        enumerable: true,\n        value: disabledLog,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        info: props,\n        log: props,\n        warn: props,\n        error: props,\n        group: props,\n        groupCollapsed: props,\n        groupEnd: props\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    disabledDepth++;\n  }\n}\nfunction reenableLogs() {\n  {\n    disabledDepth--;\n\n    if (disabledDepth === 0) {\n      /* eslint-disable react-internal/no-production-logging */\n      var props = {\n        configurable: true,\n        enumerable: true,\n        writable: true\n      }; // $FlowFixMe Flow thinks console is immutable.\n\n      Object.defineProperties(console, {\n        log: assign({}, props, {\n          value: prevLog\n        }),\n        info: assign({}, props, {\n          value: prevInfo\n        }),\n        warn: assign({}, props, {\n          value: prevWarn\n        }),\n        error: assign({}, props, {\n          value: prevError\n        }),\n        group: assign({}, props, {\n          value: prevGroup\n        }),\n        groupCollapsed: assign({}, props, {\n          value: prevGroupCollapsed\n        }),\n        groupEnd: assign({}, props, {\n          value: prevGroupEnd\n        })\n      });\n      /* eslint-enable react-internal/no-production-logging */\n    }\n\n    if (disabledDepth < 0) {\n      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n    }\n  }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n  {\n    if (prefix === undefined) {\n      // Extract the VM specific prefix used by each line.\n      try {\n        throw Error();\n      } catch (x) {\n        var match = x.stack.trim().match(/\\n( *(at )?)/);\n        prefix = match && match[1] || '';\n      }\n    } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n    return '\\n' + prefix + name;\n  }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n  componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n  // If something asked for a stack inside a fake render, it should get ignored.\n  if ( !fn || reentry) {\n    return '';\n  }\n\n  {\n    var frame = componentFrameCache.get(fn);\n\n    if (frame !== undefined) {\n      return frame;\n    }\n  }\n\n  var control;\n  reentry = true;\n  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n  Error.prepareStackTrace = undefined;\n  var previousDispatcher;\n\n  {\n    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n    // for warnings.\n\n    ReactCurrentDispatcher.current = null;\n    disableLogs();\n  }\n\n  try {\n    // This should throw.\n    if (construct) {\n      // Something should be setting the props in the constructor.\n      var Fake = function () {\n        throw Error();\n      }; // $FlowFixMe\n\n\n      Object.defineProperty(Fake.prototype, 'props', {\n        set: function () {\n          // We use a throwing setter instead of frozen or non-writable props\n          // because that won't throw in a non-strict mode function.\n          throw Error();\n        }\n      });\n\n      if (typeof Reflect === 'object' && Reflect.construct) {\n        // We construct a different control for this case to include any extra\n        // frames added by the construct call.\n        try {\n          Reflect.construct(Fake, []);\n        } catch (x) {\n          control = x;\n        }\n\n        Reflect.construct(fn, [], Fake);\n      } else {\n        try {\n          Fake.call();\n        } catch (x) {\n          control = x;\n        }\n\n        fn.call(Fake.prototype);\n      }\n    } else {\n      try {\n        throw Error();\n      } catch (x) {\n        control = x;\n      }\n\n      fn();\n    }\n  } catch (sample) {\n    // This is inlined manually because closure doesn't do it for us.\n    if (sample && control && typeof sample.stack === 'string') {\n      // This extracts the first frame from the sample that isn't also in the control.\n      // Skipping one frame that we assume is the frame that calls the two.\n      var sampleLines = sample.stack.split('\\n');\n      var controlLines = control.stack.split('\\n');\n      var s = sampleLines.length - 1;\n      var c = controlLines.length - 1;\n\n      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n        // We expect at least one stack frame to be shared.\n        // Typically this will be the root most one. However, stack frames may be\n        // cut off due to maximum stack limits. In this case, one maybe cut off\n        // earlier than the other. We assume that the sample is longer or the same\n        // and there for cut off earlier. So we should find the root most frame in\n        // the sample somewhere in the control.\n        c--;\n      }\n\n      for (; s >= 1 && c >= 0; s--, c--) {\n        // Next we find the first one that isn't the same which should be the\n        // frame that called our sample function and the control.\n        if (sampleLines[s] !== controlLines[c]) {\n          // In V8, the first line is describing the message but other VMs don't.\n          // If we're about to return the first line, and the control is also on the same\n          // line, that's a pretty good indicator that our sample threw at same line as\n          // the control. I.e. before we entered the sample frame. So we ignore this result.\n          // This can happen if you passed a class to function component, or non-function.\n          if (s !== 1 || c !== 1) {\n            do {\n              s--;\n              c--; // We may still have similar intermediate frames from the construct call.\n              // The next one that isn't the same should be our match though.\n\n              if (c < 0 || sampleLines[s] !== controlLines[c]) {\n                // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n                var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n                // but we have a user-provided \"displayName\"\n                // splice it in to make the stack more readable.\n\n\n                if (fn.displayName && _frame.includes('<anonymous>')) {\n                  _frame = _frame.replace('<anonymous>', fn.displayName);\n                }\n\n                {\n                  if (typeof fn === 'function') {\n                    componentFrameCache.set(fn, _frame);\n                  }\n                } // Return the line we found.\n\n\n                return _frame;\n              }\n            } while (s >= 1 && c >= 0);\n          }\n\n          break;\n        }\n      }\n    }\n  } finally {\n    reentry = false;\n\n    {\n      ReactCurrentDispatcher.current = previousDispatcher;\n      reenableLogs();\n    }\n\n    Error.prepareStackTrace = previousPrepareStackTrace;\n  } // Fallback to just using the name if we couldn't make it throw.\n\n\n  var name = fn ? fn.displayName || fn.name : '';\n  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n  {\n    if (typeof fn === 'function') {\n      componentFrameCache.set(fn, syntheticFrame);\n    }\n  }\n\n  return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n  {\n    return describeNativeComponentFrame(fn, false);\n  }\n}\n\nfunction shouldConstruct(Component) {\n  var prototype = Component.prototype;\n  return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n  if (type == null) {\n    return '';\n  }\n\n  if (typeof type === 'function') {\n    {\n      return describeNativeComponentFrame(type, shouldConstruct(type));\n    }\n  }\n\n  if (typeof type === 'string') {\n    return describeBuiltInComponentFrame(type);\n  }\n\n  switch (type) {\n    case REACT_SUSPENSE_TYPE:\n      return describeBuiltInComponentFrame('Suspense');\n\n    case REACT_SUSPENSE_LIST_TYPE:\n      return describeBuiltInComponentFrame('SuspenseList');\n  }\n\n  if (typeof type === 'object') {\n    switch (type.$$typeof) {\n      case REACT_FORWARD_REF_TYPE:\n        return describeFunctionComponentFrame(type.render);\n\n      case REACT_MEMO_TYPE:\n        // Memo may contain any component type so we recursively resolve it.\n        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n      case REACT_LAZY_TYPE:\n        {\n          var lazyComponent = type;\n          var payload = lazyComponent._payload;\n          var init = lazyComponent._init;\n\n          try {\n            // Lazy may contain any component type so we recursively resolve it.\n            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n          } catch (x) {}\n        }\n    }\n  }\n\n  return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame.setExtraStackFrame(null);\n    }\n  }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n  {\n    // $FlowFixMe This is okay but Flow doesn't know it.\n    var has = Function.call.bind(hasOwnProperty);\n\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            // eslint-disable-next-line react-internal/prod-error-codes\n            var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n\n          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n        } catch (ex) {\n          error$1 = ex;\n        }\n\n        if (error$1 && !(error$1 instanceof Error)) {\n          setCurrentlyValidatingElement(element);\n\n          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n          setCurrentlyValidatingElement(null);\n        }\n\n        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error$1.message] = true;\n          setCurrentlyValidatingElement(element);\n\n          error('Failed %s type: %s', location, error$1.message);\n\n          setCurrentlyValidatingElement(null);\n        }\n      }\n    }\n  }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n  return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n  {\n    // toStringTag is needed for namespaced types like Temporal.Instant\n    var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n    var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n    return type;\n  }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n  {\n    try {\n      testStringCoercion(value);\n      return false;\n    } catch (e) {\n      return true;\n    }\n  }\n}\n\nfunction testStringCoercion(value) {\n  // If you ended up here by following an exception call stack, here's what's\n  // happened: you supplied an object or symbol value to React (as a prop, key,\n  // DOM attribute, CSS property, string ref, etc.) and when React tried to\n  // coerce it to a string using `'' + value`, an exception was thrown.\n  //\n  // The most common types that will cause this exception are `Symbol` instances\n  // and Temporal objects like `Temporal.Instant`. But any object that has a\n  // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n  // exception. (Library authors do this to prevent users from using built-in\n  // numeric operators like `+` or comparison operators like `>=` because custom\n  // methods are needed to perform accurate arithmetic or comparison.)\n  //\n  // To fix the problem, coerce this object or symbol value to a string before\n  // passing it to React. The most reliable way is usually `String(value)`.\n  //\n  // To find which value is throwing, check the browser or debugger console.\n  // Before this exception was thrown, there should be `console.error` output\n  // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n  // problem and how that type was used: key, atrribute, input value prop, etc.\n  // In most cases, this console output also shows the component and its\n  // ancestor components where the exception happened.\n  //\n  // eslint-disable-next-line react-internal/safe-string-coercion\n  return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n  {\n    if (willCoercionThrow(value)) {\n      error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n      return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n    }\n  }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n  key: true,\n  ref: true,\n  __self: true,\n  __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n  didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n  {\n    if (hasOwnProperty.call(config, 'ref')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n  {\n    if (hasOwnProperty.call(config, 'key')) {\n      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n      if (getter && getter.isReactWarning) {\n        return false;\n      }\n    }\n  }\n\n  return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n  {\n    if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n      var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n      if (!didWarnAboutStringRefs[componentName]) {\n        error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n        didWarnAboutStringRefs[componentName] = true;\n      }\n    }\n  }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingKey = function () {\n      if (!specialPropKeyWarningShown) {\n        specialPropKeyWarningShown = true;\n\n        error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingKey.isReactWarning = true;\n    Object.defineProperty(props, 'key', {\n      get: warnAboutAccessingKey,\n      configurable: true\n    });\n  }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n  {\n    var warnAboutAccessingRef = function () {\n      if (!specialPropRefWarningShown) {\n        specialPropRefWarningShown = true;\n\n        error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n      }\n    };\n\n    warnAboutAccessingRef.isReactWarning = true;\n    Object.defineProperty(props, 'ref', {\n      get: warnAboutAccessingRef,\n      configurable: true\n    });\n  }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n  var element = {\n    // This tag allows us to uniquely identify this as a React Element\n    $$typeof: REACT_ELEMENT_TYPE,\n    // Built-in properties that belong on the element\n    type: type,\n    key: key,\n    ref: ref,\n    props: props,\n    // Record the component responsible for creating this element.\n    _owner: owner\n  };\n\n  {\n    // The validation flag is currently mutative. We put it on\n    // an external backing store so that we can freeze the whole object.\n    // This can be replaced with a WeakMap once they are implemented in\n    // commonly used development environments.\n    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n    // the validation flag non-enumerable (where possible, which should\n    // include every environment we run tests in), so the test framework\n    // ignores it.\n\n    Object.defineProperty(element._store, 'validated', {\n      configurable: false,\n      enumerable: false,\n      writable: true,\n      value: false\n    }); // self and source are DEV only properties.\n\n    Object.defineProperty(element, '_self', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: self\n    }); // Two elements created in two different places should be considered\n    // equal for testing purposes and therefore we hide it from enumeration.\n\n    Object.defineProperty(element, '_source', {\n      configurable: false,\n      enumerable: false,\n      writable: false,\n      value: source\n    });\n\n    if (Object.freeze) {\n      Object.freeze(element.props);\n      Object.freeze(element);\n    }\n  }\n\n  return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n  {\n    var propName; // Reserved names are extracted\n\n    var props = {};\n    var key = null;\n    var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n    // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n    // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n    // but as an intermediary step, we will use jsxDEV for everything except\n    // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n    // key is explicitly declared to be undefined or not.\n\n    if (maybeKey !== undefined) {\n      {\n        checkKeyStringCoercion(maybeKey);\n      }\n\n      key = '' + maybeKey;\n    }\n\n    if (hasValidKey(config)) {\n      {\n        checkKeyStringCoercion(config.key);\n      }\n\n      key = '' + config.key;\n    }\n\n    if (hasValidRef(config)) {\n      ref = config.ref;\n      warnIfStringRefCannotBeAutoConverted(config, self);\n    } // Remaining properties are added to a new props object\n\n\n    for (propName in config) {\n      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n        props[propName] = config[propName];\n      }\n    } // Resolve default props\n\n\n    if (type && type.defaultProps) {\n      var defaultProps = type.defaultProps;\n\n      for (propName in defaultProps) {\n        if (props[propName] === undefined) {\n          props[propName] = defaultProps[propName];\n        }\n      }\n    }\n\n    if (key || ref) {\n      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n      if (key) {\n        defineKeyPropWarningGetter(props, displayName);\n      }\n\n      if (ref) {\n        defineRefPropWarningGetter(props, displayName);\n      }\n    }\n\n    return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n  }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n  {\n    if (element) {\n      var owner = element._owner;\n      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n    } else {\n      ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n    }\n  }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n  propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n  {\n    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n  }\n}\n\nfunction getDeclarationErrorAddendum() {\n  {\n    if (ReactCurrentOwner$1.current) {\n      var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n      if (name) {\n        return '\\n\\nCheck the render method of `' + name + '`.';\n      }\n    }\n\n    return '';\n  }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n  {\n    if (source !== undefined) {\n      var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n      var lineNumber = source.lineNumber;\n      return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n    }\n\n    return '';\n  }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n  {\n    var info = getDeclarationErrorAddendum();\n\n    if (!info) {\n      var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n      if (parentName) {\n        info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n      }\n    }\n\n    return info;\n  }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n  {\n    if (!element._store || element._store.validated || element.key != null) {\n      return;\n    }\n\n    element._store.validated = true;\n    var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n      return;\n    }\n\n    ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n    // property, it may be the creator of the child that's responsible for\n    // assigning it a key.\n\n    var childOwner = '';\n\n    if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n      // Give the component that originally created this child.\n      childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n    }\n\n    setCurrentlyValidatingElement$1(element);\n\n    error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n    setCurrentlyValidatingElement$1(null);\n  }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n  {\n    if (typeof node !== 'object') {\n      return;\n    }\n\n    if (isArray(node)) {\n      for (var i = 0; i < node.length; i++) {\n        var child = node[i];\n\n        if (isValidElement(child)) {\n          validateExplicitKey(child, parentType);\n        }\n      }\n    } else if (isValidElement(node)) {\n      // This element was passed in a valid location.\n      if (node._store) {\n        node._store.validated = true;\n      }\n    } else if (node) {\n      var iteratorFn = getIteratorFn(node);\n\n      if (typeof iteratorFn === 'function') {\n        // Entry iterators used to provide implicit keys,\n        // but now we print a separate warning for them later.\n        if (iteratorFn !== node.entries) {\n          var iterator = iteratorFn.call(node);\n          var step;\n\n          while (!(step = iterator.next()).done) {\n            if (isValidElement(step.value)) {\n              validateExplicitKey(step.value, parentType);\n            }\n          }\n        }\n      }\n    }\n  }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n  {\n    var type = element.type;\n\n    if (type === null || type === undefined || typeof type === 'string') {\n      return;\n    }\n\n    var propTypes;\n\n    if (typeof type === 'function') {\n      propTypes = type.propTypes;\n    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n    // Inner props are checked in the reconciler.\n    type.$$typeof === REACT_MEMO_TYPE)) {\n      propTypes = type.propTypes;\n    } else {\n      return;\n    }\n\n    if (propTypes) {\n      // Intentionally inside to avoid triggering lazy initializers:\n      var name = getComponentNameFromType(type);\n      checkPropTypes(propTypes, element.props, 'prop', name, element);\n    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n      var _name = getComponentNameFromType(type);\n\n      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n    }\n\n    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n    }\n  }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n  {\n    var keys = Object.keys(fragment.props);\n\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n\n      if (key !== 'children' && key !== 'key') {\n        setCurrentlyValidatingElement$1(fragment);\n\n        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n        setCurrentlyValidatingElement$1(null);\n        break;\n      }\n    }\n\n    if (fragment.ref !== null) {\n      setCurrentlyValidatingElement$1(fragment);\n\n      error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n      setCurrentlyValidatingElement$1(null);\n    }\n  }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n  {\n    var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n    // succeed and there will likely be errors in render.\n\n    if (!validType) {\n      var info = '';\n\n      if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n        info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n      }\n\n      var sourceInfo = getSourceInfoErrorAddendum(source);\n\n      if (sourceInfo) {\n        info += sourceInfo;\n      } else {\n        info += getDeclarationErrorAddendum();\n      }\n\n      var typeString;\n\n      if (type === null) {\n        typeString = 'null';\n      } else if (isArray(type)) {\n        typeString = 'array';\n      } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n        typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n        info = ' Did you accidentally export a JSX literal instead of a component?';\n      } else {\n        typeString = typeof type;\n      }\n\n      error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n    }\n\n    var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n    // TODO: Drop this when these are no longer allowed as the type argument.\n\n    if (element == null) {\n      return element;\n    } // Skip key warning if the type isn't valid since our key validation logic\n    // doesn't expect a non-string/function type and can throw confusing errors.\n    // We don't want exception behavior to differ between dev and prod.\n    // (Rendering will throw with a helpful message and as soon as the type is\n    // fixed, the key warnings will appear.)\n\n\n    if (validType) {\n      var children = props.children;\n\n      if (children !== undefined) {\n        if (isStaticChildren) {\n          if (isArray(children)) {\n            for (var i = 0; i < children.length; i++) {\n              validateChildKeys(children[i], type);\n            }\n\n            if (Object.freeze) {\n              Object.freeze(children);\n            }\n          } else {\n            error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n          }\n        } else {\n          validateChildKeys(children, type);\n        }\n      }\n    }\n\n    {\n      if (hasOwnProperty.call(props, 'key')) {\n        var componentName = getComponentNameFromType(type);\n        var keys = Object.keys(props).filter(function (k) {\n          return k !== 'key';\n        });\n        var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n        if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n          var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n          error('A props object containing a \"key\" prop is being spread into JSX:\\n' + '  let props = %s;\\n' + '  <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + '  let props = %s;\\n' + '  <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n          didWarnAboutKeySpread[componentName + beforeExample] = true;\n        }\n      }\n    }\n\n    if (type === REACT_FRAGMENT_TYPE) {\n      validateFragmentProps(element);\n    } else {\n      validatePropTypes(element);\n    }\n\n    return element;\n  }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, true);\n  }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n  {\n    return jsxWithValidation(type, props, key, false);\n  }\n}\n\nvar jsx =  jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs =  jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","\"use client\";\n\n// src/QueryClientProvider.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar QueryClientContext = React.createContext(\n  void 0\n);\nvar useQueryClient = (queryClient) => {\n  const client = React.useContext(QueryClientContext);\n  if (queryClient) {\n    return queryClient;\n  }\n  if (!client) {\n    throw new Error(\"No QueryClient set, use QueryClientProvider to set one\");\n  }\n  return client;\n};\nvar QueryClientProvider = ({\n  client,\n  children\n}) => {\n  React.useEffect(() => {\n    client.mount();\n    return () => {\n      client.unmount();\n    };\n  }, [client]);\n  return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });\n};\nexport {\n  QueryClientContext,\n  QueryClientProvider,\n  useQueryClient\n};\n//# sourceMappingURL=QueryClientProvider.js.map","\"use client\";\n\n// src/IsRestoringProvider.ts\nimport * as React from \"react\";\nvar IsRestoringContext = React.createContext(false);\nvar useIsRestoring = () => React.useContext(IsRestoringContext);\nvar IsRestoringProvider = IsRestoringContext.Provider;\nexport {\n  IsRestoringProvider,\n  useIsRestoring\n};\n//# sourceMappingURL=IsRestoringProvider.js.map","\"use client\";\n\n// src/QueryErrorResetBoundary.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createValue() {\n  let isReset = false;\n  return {\n    clearReset: () => {\n      isReset = false;\n    },\n    reset: () => {\n      isReset = true;\n    },\n    isReset: () => {\n      return isReset;\n    }\n  };\n}\nvar QueryErrorResetBoundaryContext = React.createContext(createValue());\nvar useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);\nvar QueryErrorResetBoundary = ({\n  children\n}) => {\n  const [value] = React.useState(() => createValue());\n  return /* @__PURE__ */ jsx(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === \"function\" ? children(value) : children });\n};\nexport {\n  QueryErrorResetBoundary,\n  useQueryErrorResetBoundary\n};\n//# sourceMappingURL=QueryErrorResetBoundary.js.map","\"use client\";\n\n// src/errorBoundaryUtils.ts\nimport * as React from \"react\";\nimport { shouldThrowError } from \"@tanstack/query-core\";\nvar ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {\n  if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {\n    if (!errorResetBoundary.isReset()) {\n      options.retryOnMount = false;\n    }\n  }\n};\nvar useClearResetErrorBoundary = (errorResetBoundary) => {\n  React.useEffect(() => {\n    errorResetBoundary.clearReset();\n  }, [errorResetBoundary]);\n};\nvar getHasError = ({\n  result,\n  errorResetBoundary,\n  throwOnError,\n  query,\n  suspense\n}) => {\n  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));\n};\nexport {\n  ensurePreventErrorBoundaryRetry,\n  getHasError,\n  useClearResetErrorBoundary\n};\n//# sourceMappingURL=errorBoundaryUtils.js.map","// src/suspense.ts\nvar defaultThrowOnError = (_error, query) => query.state.data === void 0;\nvar ensureSuspenseTimers = (defaultedOptions) => {\n  if (defaultedOptions.suspense) {\n    const MIN_SUSPENSE_TIME_MS = 1e3;\n    const clamp = (value) => value === \"static\" ? value : Math.max(value ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);\n    const originalStaleTime = defaultedOptions.staleTime;\n    defaultedOptions.staleTime = typeof originalStaleTime === \"function\" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);\n    if (typeof defaultedOptions.gcTime === \"number\") {\n      defaultedOptions.gcTime = Math.max(\n        defaultedOptions.gcTime,\n        MIN_SUSPENSE_TIME_MS\n      );\n    }\n  }\n};\nvar willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;\nvar shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;\nvar fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {\n  errorResetBoundary.clearReset();\n});\nexport {\n  defaultThrowOnError,\n  ensureSuspenseTimers,\n  fetchOptimistic,\n  shouldSuspend,\n  willFetch\n};\n//# sourceMappingURL=suspense.js.map","\"use client\";\n\n// src/useBaseQuery.ts\nimport * as React from \"react\";\nimport { isServer, noop, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport {\n  ensurePreventErrorBoundaryRetry,\n  getHasError,\n  useClearResetErrorBoundary\n} from \"./errorBoundaryUtils.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport {\n  ensureSuspenseTimers,\n  fetchOptimistic,\n  shouldSuspend,\n  willFetch\n} from \"./suspense.js\";\nfunction useBaseQuery(options, Observer, queryClient) {\n  if (process.env.NODE_ENV !== \"production\") {\n    if (typeof options !== \"object\" || Array.isArray(options)) {\n      throw new Error(\n        'Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'\n      );\n    }\n  }\n  const isRestoring = useIsRestoring();\n  const errorResetBoundary = useQueryErrorResetBoundary();\n  const client = useQueryClient(queryClient);\n  const defaultedOptions = client.defaultQueryOptions(options);\n  client.getDefaultOptions().queries?._experimental_beforeQuery?.(\n    defaultedOptions\n  );\n  if (process.env.NODE_ENV !== \"production\") {\n    if (!defaultedOptions.queryFn) {\n      console.error(\n        `[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`\n      );\n    }\n  }\n  defaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : \"optimistic\";\n  ensureSuspenseTimers(defaultedOptions);\n  ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);\n  useClearResetErrorBoundary(errorResetBoundary);\n  const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);\n  const [observer] = React.useState(\n    () => new Observer(\n      client,\n      defaultedOptions\n    )\n  );\n  const result = observer.getOptimisticResult(defaultedOptions);\n  const shouldSubscribe = !isRestoring && options.subscribed !== false;\n  React.useSyncExternalStore(\n    React.useCallback(\n      (onStoreChange) => {\n        const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;\n        observer.updateResult();\n        return unsubscribe;\n      },\n      [observer, shouldSubscribe]\n    ),\n    () => observer.getCurrentResult(),\n    () => observer.getCurrentResult()\n  );\n  React.useEffect(() => {\n    observer.setOptions(defaultedOptions);\n  }, [defaultedOptions, observer]);\n  if (shouldSuspend(defaultedOptions, result)) {\n    throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);\n  }\n  if (getHasError({\n    result,\n    errorResetBoundary,\n    throwOnError: defaultedOptions.throwOnError,\n    query: client.getQueryCache().get(defaultedOptions.queryHash),\n    suspense: defaultedOptions.suspense\n  })) {\n    throw result.error;\n  }\n  ;\n  client.getDefaultOptions().queries?._experimental_afterQuery?.(\n    defaultedOptions,\n    result\n  );\n  if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {\n    const promise = isNewCacheEntry ? (\n      // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted\n      fetchOptimistic(defaultedOptions, observer, errorResetBoundary)\n    ) : (\n      // subscribe to the \"cache promise\" so that we can finalize the currentThenable once data comes in\n      client.getQueryCache().get(defaultedOptions.queryHash)?.promise\n    );\n    promise?.catch(noop).finally(() => {\n      observer.updateResult();\n    });\n  }\n  return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;\n}\nexport {\n  useBaseQuery\n};\n//# sourceMappingURL=useBaseQuery.js.map","\"use client\";\n\n// src/useQuery.ts\nimport { QueryObserver } from \"@tanstack/query-core\";\nimport { useBaseQuery } from \"./useBaseQuery.js\";\nfunction useQuery(options, queryClient) {\n  return useBaseQuery(options, QueryObserver, queryClient);\n}\nexport {\n  useQuery\n};\n//# sourceMappingURL=useQuery.js.map","import {useCallback} from \"react\";\nimport {useAccessToken} from \"../../redux/slices/auth/auth-selectors.mjs\";\nimport {useUpdateAccessToken} from \"./arccos-api-auth.mjs\";\nimport {ArccosError, errors} from \"../../../util/arccos-error.mjs\";\nimport {useMutation} from \"@tanstack/react-query\";\nimport {CreateSubscriptionFuncRequestBody} from \"../query/offers.mjs\";\n\nexport type FetchFromArccosOptions<T = undefined> = {\n    path: string\n    init?: RequestInit\n    params?: Record<string, string | boolean | number>\n    body?: T\n    baseUrl?: string\n    accessToken?: string\n    retries?: number\n    timeout?: number\n    shouldReauthenticate?: boolean\n    updateAccessToken?: () => Promise<string>\n    // if customErrorHandler throws an ArccosError, it will be thrown instead of the default error handling\n    customErrorHandler?: (error: {responseBody: any, status: number}) => void\n}\n\nexport class ArccosNetworkError extends ArccosError {\n    response?: Response\n\n    constructor(message: string, response?: Response, options?: { cause?: unknown }) {\n        super({\n            message,\n            name: 'ArccosNetworkError',\n            cause: options?.cause,\n        })\n        this.response = response\n    }\n}\n\nexport const isArccosNetworkError = (error?: unknown): error is ArccosNetworkError => error instanceof ArccosNetworkError\nexport const isArccosError = (error?: unknown): error is ArccosError => error instanceof ArccosError\n\nexport const fetchFromArccos = async <RequestBody = undefined, >(options: FetchFromArccosOptions<RequestBody>): Promise<Response> => {\n    const {\n        path,\n        init,\n        params,\n        body,\n        baseUrl = import.meta.env.CLIENT_ARCCOS_API_BASE_URL,\n        accessToken,\n        retries = 0,\n        timeout = 10000,\n        shouldReauthenticate = true,\n        customErrorHandler,\n        updateAccessToken = () => {\n            throw new ArccosError({\n                name: errors.updateAccessTokenError,\n                message: 'fetchAccessToken called without being defined. If you feel like this is an error, please contact starter@arccosgolf.com\\'',\n            })\n        },\n    } = options\n\n    const queryString = params ? `?${new URLSearchParams(\n        Object.entries(params)\n            .filter(([, value]) => value !== undefined)\n            .reduce((\n                acc,\n                [key, value],\n            ) => ({\n                ...acc,\n                [key]: value === null ?\n                    null :\n                    value.toString(),\n            }), {} as Record<string, string>)\n    ).toString()}` : ''\n\n    const defaultHeaders = {\n        'Content-Type': 'application/json',\n        'Accept': 'application/json',\n        ...(accessToken && {'Authorization': `Bearer ${accessToken}`}),\n    }\n    const {\n        method = 'GET',\n        headers,\n        ...restInit\n    } = init || {}\n\n    const abortController = new AbortController()\n    const timeoutId = setTimeout(() => abortController.abort(), timeout)\n\n    // Stays undefined if fetch() itself throws (network error, DNS, abort)\n    // before the assignment on the next line. ArccosNetworkError's response\n    // is now optional to model this.\n    let response: Response | undefined\n    try {\n        response = await fetch(`${baseUrl}${path}${queryString}`, {\n            method,\n            headers: {\n                ...defaultHeaders,\n                ...headers,\n            },\n            body: body ? JSON.stringify(body) : undefined,\n            ...restInit,\n        });\n        clearTimeout(timeoutId)\n        if ([401, 403].includes(response.status) && shouldReauthenticate) {\n            const newAccessToken = await updateAccessToken()\n            return fetchFromArccos({\n                ...options,\n                accessToken: newAccessToken,\n                shouldReauthenticate: false,\n            })\n        }\n        if (!response.ok) {\n            const res = await response.json()\n            \n            customErrorHandler?.({\n                responseBody: res,\n                status: response.status,\n            })\n            \n            throw new ArccosNetworkError(`Error fetching from Arccos API: ${path}`, response)\n        }\n        return response\n    } catch (error) {\n        clearTimeout(timeoutId)\n        if (retries > 0) {\n            console.warn(`Retrying fetch from Arccos API: ${path}`)\n            return fetchFromArccos({\n                ...options,\n                retries: retries - 1,\n            })\n        }\n        if (error instanceof ArccosError) {\n            throw error\n        }\n        // Preserve the original error so Sentry surfaces the real cause\n        // (network error, timeout/abort, JSON parse, etc.) instead of\n        // dropping it as opaque \"Unknown error\".\n        const causeMessage = error instanceof Error ? error.message : String(error)\n        throw new ArccosNetworkError(\n            `Unknown error fetching from Arccos API: ${path}: ${causeMessage}`,\n            response,\n            { cause: error },\n        )\n    }\n}\n\nexport const useExtendedFetchFromArccos = <RequestBody = undefined, >(options?: Partial<FetchFromArccosOptions>): <T = RequestBody>(overrides: FetchFromArccosOptions<T>) => Promise<Response> => {\n    const accessToken = options?.accessToken || useAccessToken()\n    const updateAccessToken = options?.updateAccessToken || useUpdateAccessToken()\n    return useCallback(async (overrides) => fetchFromArccos({\n        accessToken,\n        updateAccessToken,\n        ...options,\n        ...overrides,\n    }), [JSON.stringify(options)])\n}\n\nexport const useFetchFromArccos = (options?: Partial<FetchFromArccosOptions>): <RequestBody = undefined, ResponseBody = unknown>(overrides: FetchFromArccosOptions<RequestBody>) => Promise<ResponseBody> => {\n    const extendedFetch = useExtendedFetchFromArccos(options)\n    return useCallback(async (overrides: FetchFromArccosOptions) => {\n        const response = await extendedFetch(overrides)\n        if (!response.body) {\n            return undefined\n        }\n        return await response.json()\n    }, [JSON.stringify(options), extendedFetch])\n}\n\ntype ApiOptions<T = unknown> = {\n    path: string\n} & Partial<FetchFromArccosOptions<T>>\n\nexport const useApiDataFetcher = <ResponseBody = unknown, RequestBody = undefined>(options?: ApiOptions<RequestBody>): (overrides: ApiOptions<RequestBody>) => Promise<ResponseBody> => {\n    const fetchFromArccos = useFetchFromArccos()\n    return useCallback(async (overrides: ApiOptions<RequestBody>): Promise<ResponseBody> => {\n        try {\n            return await fetchFromArccos<RequestBody, ResponseBody>({\n                ...options,\n                ...overrides,\n            })\n        } catch (error) {\n            console.debug('error: ', error)\n            if (isArccosError(error)) {\n                throw error\n            }\n            const causeMessage = error instanceof Error ? error.message : String(error)\n            throw new ArccosNetworkError(\n                `Unknown error fetching from Arccos API: ${causeMessage}`,\n                undefined,\n                { cause: error },\n            )\n        }\n    }, [fetchFromArccos])\n}\n\ntype OfferValidationRequestBody = {\n    email: string,\n    offerKey: string,\n    isReferral?: boolean,\n    redemptionCode?: string,\n    address?: {\n        address1?: string\n        address2?: string\n        city?: string\n        state?: string\n        zip?: string\n        country?: string\n    }\n}\n\ntype OfferValidationResponse = {\n    valid: true\n    userId?: string\n    accessKey?: string\n    secret?: string\n    customerId?: string\n} | {\n    valid: false\n    validationErrors?: string[]\n    addressErrors?: string[]\n    userState?: {\n        accountState: 'NEW' | 'EXISTING'\n        subscriptionState: 'NEVER_HAD_SUBSCRIPTION' | 'HAS_HAD_SUBSCRIPTION' | 'CANCELED_SUBSCRIPTION_OVER_90_DAYS' | 'HAS_ACTIVE_SUBSCRIPTION'\n    }\n}\n\nexport const useValidateOffer = () => {\n    const fetchFromArccos = useFetchFromArccos()\n    return useCallback(async (body: OfferValidationRequestBody) => {\n\n        return await fetchFromArccos<OfferValidationRequestBody, OfferValidationResponse>({\n            path: `/v3/offers/validate`,\n            body,\n            init: {\n                method: 'POST'\n            },\n\n        })\n\n    }, [fetchFromArccos])\n\n}\n\ntype InsertUserRequest = {\n    email: string,\n    password: string,\n    firstName?: 'Arccos',\n    lastName?: 'Customer',\n}\n\ntype InsertUserResponse = {\n    userId: string\n    email: string\n}\n\nexport const useInsertUser = () => {\n    const fetchFromArccos = useFetchFromArccos()\n    return useCallback(async (body: InsertUserRequest) => {\n        return await fetchFromArccos<InsertUserRequest, InsertUserResponse>({\n            path: '/users',\n            params: {\n                scrubBody: true,\n            },\n            body,\n            init: {\n                method: 'POST',\n            }\n        })\n\n    }, [fetchFromArccos])\n}\n\ntype GetUserResponse = {\n    email: string\n}\n\nexport const useGetUser = () => {\n    const fetchFromArccos = useFetchFromArccos()\n    return useCallback(async (userId: string, accessToken: string) => {\n        return await fetchFromArccos<any, GetUserResponse>({\n            path: `/users/${userId}`,\n            init: {\n                method: 'GET',\n            },\n            accessToken\n        })\n\n    }, [fetchFromArccos])\n}\n\ntype UpdateUserRequestBody = {\n    firstName: string,\n    lastName: string,\n}\n\ntype UpdateUserRequestParams = {\n    body: UpdateUserRequestBody\n    userId: string\n}\n\nexport const useUpdateUser = () => {\n    const dataFetcher = useApiDataFetcher<unknown, UpdateUserRequestBody>()\n    const {mutateAsync} = useMutation<unknown, unknown, UpdateUserRequestParams>({\n\n        mutationFn: (params) => {\n            const {\n                body,\n                userId,\n            } = params\n            return dataFetcher({\n                path: `/users/${userId}`,\n                body,\n                init: {\n                    method: 'PATCH',\n                },\n                params: {\n                    scrubBody: true\n                },\n                retries: 0,\n                timeout: 30000,\n            });\n        },\n    })\n    return mutateAsync\n}\n","import validate from './validate.js';\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n  byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n  // Note: Be careful editing this code!  It's been tuned for performance\n  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n  //\n  // Note to future-self: No, you can't remove the `toLowerCase()` call.\n  // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351\n  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n  var uuid = unsafeStringify(arr, offset);\n  // Consistency check for valid UUID.  If this throws, it's likely due to one\n  // of the following:\n  // - One or more input array values don't map to a hex octet (leading to\n  // \"undefined\" in the uuid)\n  // - Invalid input values for the RFC `version` or `variant` fields\n  if (!validate(uuid)) {\n    throw TypeError('Stringified UUID is invalid');\n  }\n  return uuid;\n}\nexport default stringify;","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n  // lazy load so that environments that need to polyfill have a chance to do so\n  if (!getRandomValues) {\n    // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n    getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n    if (!getRandomValues) {\n      throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n    }\n  }\n  return getRandomValues(rnds8);\n}","var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n  randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n  if (native.randomUUID && !buf && !options) {\n    return native.randomUUID();\n  }\n  options = options || {};\n  var rnds = options.random || (options.rng || rng)();\n\n  // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n  rnds[6] = rnds[6] & 0x0f | 0x40;\n  rnds[8] = rnds[8] & 0x3f | 0x80;\n\n  // Copy bytes to buffer, if provided\n  if (buf) {\n    offset = offset || 0;\n    for (var i = 0; i < 16; ++i) {\n      buf[offset + i] = rnds[i];\n    }\n    return buf;\n  }\n  return unsafeStringify(rnds);\n}\nexport default v4;","import { getStatsigUserCountry } from '../data/initial-state/intial-state-accessors.mjs'\nimport { getPartnerFromWindowLocation, isOnsiteEventPartner } from './partner-selectors.mjs'\nimport { statsigClientRef } from '../data/statsig/statsig-client-ref.mts'\n\nexport const useAlpsExperimentOfferKey = () => {\n    return '199_SUB_30_DAY_TRIAL_SENSORLESS_WITH_174_99_LINK_PRO_TRIAL_V3'\n}\n\nexport const useShouldUseAlpsExperiment = () => {\n    return new URLSearchParams(window.location.search).get('alps_experience') === 'alps'\n}\n\nexport const getIsAlpsNext = (): boolean => {\n    if (typeof window === 'undefined') return false\n\n    const params = new URLSearchParams(window.location.search)\n    const alpsExperience = params.get('alps_experience')\n    const variant = params.get('variant')\n    if (alpsExperience === 'false' || variant === 'modern') return false\n\n    const partner = getPartnerFromWindowLocation()\n    if (partner === 'referrals') return false\n\n    const country = getStatsigUserCountry()\n    if (country !== 'US' && country !== 'CA') return false\n\n    const gateValue = statsigClientRef.current?.checkGate('alps_next') ?? false\n    // Titleist US/CA always uses the Air trial (alps-next) experience.\n    const isAlpsNextEnabled = alpsExperience === 'alps-next' || gateValue || partner === 'titleist'\n    if (!isAlpsNextEnabled) return false\n\n    return true\n}\n\nexport const getIsVintageExperience = (): boolean => {\n    if (typeof window === 'undefined') return false\n\n    const country = getStatsigUserCountry()\n    if (country !== 'US' && country !== 'CA') return false\n\n    const partner = getPartnerFromWindowLocation()\n    if (partner === 'referrals') return false\n    if (partner === 'titleist') return false\n    if (isOnsiteEventPartner(partner)) return false\n\n    const params = new URLSearchParams(window.location.search)\n    const variant = params.get('variant')\n    const alpsExperience = params.get('alps_experience')\n    if (variant === 'modern' || alpsExperience === 'false' || alpsExperience === 'alps-next') {\n        return false\n    }\n    return true\n}\n\nexport const getIsCk14Experience = (): boolean => {\n    if (typeof window === 'undefined') return false\n\n    if (getIsVintageExperience()) return true\n\n    const partner = getPartnerFromWindowLocation()\n    if (partner === 'referrals') return false\n\n    const country = getStatsigUserCountry()\n    const isNorthAmerica = country === 'US' || country === 'CA'\n\n    if (!isNorthAmerica) return true\n\n    const params = new URLSearchParams(window.location.search)\n    return params.get('alps_experience') === 'false' || params.get('variant') === 'modern'\n}\n","\"use strict\";\n/* eslint-disable no-console */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Log = exports.LogLevel = void 0;\n// intentionally spaced for formatting\nconst DEBUG = ' DEBUG ';\nconst _INFO = '  INFO ';\nconst _WARN = '  WARN ';\nconst ERROR = ' ERROR ';\nfunction addTag(args) {\n    args.unshift('[Statsig]');\n    return args; // ['[Statsig]', ...args];\n}\nexports.LogLevel = {\n    None: 0,\n    Error: 1,\n    Warn: 2,\n    Info: 3,\n    Debug: 4,\n};\nclass Log {\n    static info(...args) {\n        if (Log.level >= exports.LogLevel.Info) {\n            console.info(_INFO, ...addTag(args));\n        }\n    }\n    static debug(...args) {\n        if (Log.level >= exports.LogLevel.Debug) {\n            console.debug(DEBUG, ...addTag(args));\n        }\n    }\n    static warn(...args) {\n        if (Log.level >= exports.LogLevel.Warn) {\n            console.warn(_WARN, ...addTag(args));\n        }\n    }\n    static error(...args) {\n        if (Log.level >= exports.LogLevel.Error) {\n            console.error(ERROR, ...addTag(args));\n        }\n    }\n}\nexports.Log = Log;\nLog.level = exports.LogLevel.Warn;\n","\"use strict\";\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nvar _a, _b, _c;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getInstance = exports._getStatsigGlobalFlag = exports._getStatsigGlobal = void 0;\nconst Log_1 = require(\"./Log\");\nconst _getStatsigGlobal = () => {\n    // Avoid ReferenceError, which is happening with Cloudflare pages\n    try {\n        return typeof __STATSIG__ !== 'undefined' ? __STATSIG__ : statsigGlobal;\n    }\n    catch (e) {\n        return statsigGlobal;\n    }\n};\nexports._getStatsigGlobal = _getStatsigGlobal;\nconst _getStatsigGlobalFlag = (flag) => {\n    return (0, exports._getStatsigGlobal)()[flag];\n};\nexports._getStatsigGlobalFlag = _getStatsigGlobalFlag;\nconst _getInstance = (sdkKey) => {\n    const gbl = (0, exports._getStatsigGlobal)();\n    if (!sdkKey) {\n        if (gbl.instances && Object.keys(gbl.instances).length > 1) {\n            Log_1.Log.warn('Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key.');\n        }\n        return gbl.firstInstance;\n    }\n    return gbl.instances && gbl.instances[sdkKey];\n};\nexports._getInstance = _getInstance;\nconst GLOBAL_KEY = '__STATSIG__';\nconst _window = typeof window !== 'undefined' ? window : {};\nconst _global = typeof global !== 'undefined' ? global : {};\nconst _globalThis = typeof globalThis !== 'undefined' ? globalThis : {};\nconst statsigGlobal = (_c = (_b = (_a = _window[GLOBAL_KEY]) !== null && _a !== void 0 ? _a : _global[GLOBAL_KEY]) !== null && _b !== void 0 ? _b : _globalThis[GLOBAL_KEY]) !== null && _c !== void 0 ? _c : {\n    instance: exports._getInstance,\n};\n_window[GLOBAL_KEY] = statsigGlobal;\n_global[GLOBAL_KEY] = statsigGlobal;\n_globalThis[GLOBAL_KEY] = statsigGlobal;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Diagnostics = void 0;\nconst MARKER_MAP = new Map();\nconst ACT_START = 'start';\nconst ACT_END = 'end';\nconst DIAGNOSTICS_EVENT = 'statsig::diagnostics';\nexports.Diagnostics = {\n    _getMarkers: (sdkKey) => {\n        return MARKER_MAP.get(sdkKey);\n    },\n    _markInitOverallStart: (sdkKey) => {\n        _addMarker(sdkKey, _createMarker({}, ACT_START, 'overall'));\n    },\n    _markInitOverallEnd: (sdkKey, success, evaluationDetails) => {\n        _addMarker(sdkKey, _createMarker({\n            success,\n            error: success\n                ? undefined\n                : { name: 'InitializeError', message: 'Failed to initialize' },\n            evaluationDetails,\n        }, ACT_END, 'overall'));\n    },\n    _markInitNetworkReqStart: (sdkKey, data) => {\n        _addMarker(sdkKey, _createMarker(data, ACT_START, 'initialize', 'network_request'));\n    },\n    _markInitNetworkReqEnd: (sdkKey, data) => {\n        _addMarker(sdkKey, _createMarker(data, ACT_END, 'initialize', 'network_request'));\n    },\n    _markInitProcessStart: (sdkKey) => {\n        _addMarker(sdkKey, _createMarker({}, ACT_START, 'initialize', 'process'));\n    },\n    _markInitProcessEnd: (sdkKey, data) => {\n        _addMarker(sdkKey, _createMarker(data, ACT_END, 'initialize', 'process'));\n    },\n    _clearMarkers: (sdkKey) => {\n        MARKER_MAP.delete(sdkKey);\n    },\n    _formatError(e) {\n        if (!(e && typeof e === 'object')) {\n            return;\n        }\n        return {\n            code: _safeGetField(e, 'code'),\n            name: _safeGetField(e, 'name'),\n            message: _safeGetField(e, 'message'),\n        };\n    },\n    _getDiagnosticsData(res, attempt, body, e) {\n        var _a;\n        return {\n            success: (res === null || res === void 0 ? void 0 : res.ok) === true,\n            statusCode: res === null || res === void 0 ? void 0 : res.status,\n            sdkRegion: (_a = res === null || res === void 0 ? void 0 : res.headers) === null || _a === void 0 ? void 0 : _a.get('x-statsig-region'),\n            isDelta: body.includes('\"is_delta\":true') === true ? true : undefined,\n            attempt,\n            error: exports.Diagnostics._formatError(e),\n        };\n    },\n    _enqueueDiagnosticsEvent(user, logger, sdk, options) {\n        const markers = exports.Diagnostics._getMarkers(sdk);\n        if (markers == null || markers.length <= 0) {\n            return -1;\n        }\n        const overallInitDuration = markers[markers.length - 1].timestamp - markers[0].timestamp;\n        exports.Diagnostics._clearMarkers(sdk);\n        const event = _makeDiagnosticsEvent(user, {\n            context: 'initialize',\n            markers: markers.slice(),\n            statsigOptions: options,\n        });\n        logger.enqueue(event);\n        return overallInitDuration;\n    },\n};\nfunction _createMarker(data, action, key, step) {\n    return Object.assign({ key: key, action: action, step: step, timestamp: Date.now() }, data);\n}\nfunction _makeDiagnosticsEvent(user, data) {\n    const latencyEvent = {\n        eventName: DIAGNOSTICS_EVENT,\n        user,\n        value: null,\n        metadata: data,\n        time: Date.now(),\n    };\n    return latencyEvent;\n}\nfunction _addMarker(sdkKey, marker) {\n    var _a;\n    const markers = (_a = MARKER_MAP.get(sdkKey)) !== null && _a !== void 0 ? _a : [];\n    markers.push(marker);\n    MARKER_MAP.set(sdkKey, markers);\n}\nfunction _safeGetField(data, field) {\n    if (field in data) {\n        return data[field];\n    }\n    return undefined;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._isTypeMatch = exports._typeOf = void 0;\nfunction _typeOf(input) {\n    return Array.isArray(input) ? 'array' : typeof input;\n}\nexports._typeOf = _typeOf;\nfunction _isTypeMatch(a, b) {\n    const typeOf = (x) => Array.isArray(x) ? 'array' : x === null ? 'null' : typeof x;\n    return typeOf(a) === typeOf(b);\n}\nexports._isTypeMatch = _isTypeMatch;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getSortedObject = exports._DJB2Object = exports._DJB2 = void 0;\nconst TypingUtils_1 = require(\"./TypingUtils\");\nconst _DJB2 = (value) => {\n    let hash = 0;\n    for (let i = 0; i < value.length; i++) {\n        const character = value.charCodeAt(i);\n        hash = (hash << 5) - hash + character;\n        hash = hash & hash; // Convert to 32bit integer\n    }\n    return String(hash >>> 0);\n};\nexports._DJB2 = _DJB2;\nconst _DJB2Object = (value, maxLevels) => {\n    return (0, exports._DJB2)(JSON.stringify((0, exports._getSortedObject)(value, maxLevels)));\n};\nexports._DJB2Object = _DJB2Object;\nconst _getSortedObject = (object, maxDepth) => {\n    if (object == null) {\n        return null;\n    }\n    const keys = Object.keys(object).sort();\n    const sortedObject = {};\n    keys.forEach((key) => {\n        const value = object[key];\n        if (maxDepth === 0 || (0, TypingUtils_1._typeOf)(value) !== 'object') {\n            sortedObject[key] = value;\n            return;\n        }\n        sortedObject[key] = (0, exports._getSortedObject)(value, maxDepth != null ? maxDepth - 1 : maxDepth);\n    });\n    return sortedObject;\n};\nexports._getSortedObject = _getSortedObject;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getStorageKey = exports._getUserStorageKey = void 0;\nconst Hashing_1 = require(\"./Hashing\");\nfunction _getUserStorageKey(sdkKey, user, customKeyGenerator) {\n    var _a;\n    if (customKeyGenerator) {\n        return customKeyGenerator(sdkKey, user);\n    }\n    const cids = user && user.customIDs ? user.customIDs : {};\n    const parts = [\n        `uid:${(_a = user === null || user === void 0 ? void 0 : user.userID) !== null && _a !== void 0 ? _a : ''}`,\n        `cids:${Object.keys(cids)\n            .sort((leftKey, rightKey) => leftKey.localeCompare(rightKey))\n            .map((key) => `${key}-${cids[key]}`)\n            .join(',')}`,\n        `k:${sdkKey}`,\n    ];\n    return (0, Hashing_1._DJB2)(parts.join('|'));\n}\nexports._getUserStorageKey = _getUserStorageKey;\nfunction _getStorageKey(sdkKey, user, customKeyGenerator) {\n    if (user) {\n        return _getUserStorageKey(sdkKey, user, customKeyGenerator);\n    }\n    return (0, Hashing_1._DJB2)(`k:${sdkKey}`);\n}\nexports._getStorageKey = _getStorageKey;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NetworkParam = exports.NetworkDefault = exports.Endpoint = void 0;\nexports.Endpoint = {\n    _initialize: 'initialize',\n    _rgstr: 'rgstr',\n    _download_config_specs: 'download_config_specs',\n};\nexports.NetworkDefault = {\n    [exports.Endpoint._rgstr]: 'https://prodregistryv2.org/v1',\n    [exports.Endpoint._initialize]: 'https://featureassets.org/v1',\n    [exports.Endpoint._download_config_specs]: 'https://api.statsigcdn.com/v1',\n};\nexports.NetworkParam = {\n    EventCount: 'ec',\n    SdkKey: 'k',\n    SdkType: 'st',\n    SdkVersion: 'sv',\n    Time: 't',\n    SessionID: 'sid',\n    StatsigEncoded: 'se',\n    IsGzipped: 'gz',\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getUnloadEvent = exports._getCurrentPageUrlSafe = exports._addDocumentEventListenerSafe = exports._addWindowEventListenerSafe = exports._isServerEnv = exports._getDocumentSafe = exports._getWindowSafe = void 0;\nconst _getWindowSafe = () => {\n    return typeof window !== 'undefined' ? window : null;\n};\nexports._getWindowSafe = _getWindowSafe;\nconst _getDocumentSafe = () => {\n    var _a;\n    const win = (0, exports._getWindowSafe)();\n    return (_a = win === null || win === void 0 ? void 0 : win.document) !== null && _a !== void 0 ? _a : null;\n};\nexports._getDocumentSafe = _getDocumentSafe;\nconst _isServerEnv = () => {\n    if ((0, exports._getDocumentSafe)() !== null) {\n        return false;\n    }\n    const isNode = typeof process !== 'undefined' &&\n        process.versions != null &&\n        process.versions.node != null;\n    const isVercel = typeof EdgeRuntime === 'string';\n    return isVercel || isNode;\n};\nexports._isServerEnv = _isServerEnv;\nconst _addWindowEventListenerSafe = (key, listener) => {\n    const win = (0, exports._getWindowSafe)();\n    if (typeof (win === null || win === void 0 ? void 0 : win.addEventListener) === 'function') {\n        win.addEventListener(key, listener);\n    }\n};\nexports._addWindowEventListenerSafe = _addWindowEventListenerSafe;\nconst _addDocumentEventListenerSafe = (key, listener) => {\n    const doc = (0, exports._getDocumentSafe)();\n    if (typeof (doc === null || doc === void 0 ? void 0 : doc.addEventListener) === 'function') {\n        doc.addEventListener(key, listener);\n    }\n};\nexports._addDocumentEventListenerSafe = _addDocumentEventListenerSafe;\nconst _getCurrentPageUrlSafe = () => {\n    var _a;\n    try {\n        return (_a = (0, exports._getWindowSafe)()) === null || _a === void 0 ? void 0 : _a.location.href.split(/[?#]/)[0];\n    }\n    catch (_b) {\n        return;\n    }\n};\nexports._getCurrentPageUrlSafe = _getCurrentPageUrlSafe;\nconst _getUnloadEvent = () => {\n    const win = (0, exports._getWindowSafe)();\n    if (!win) {\n        return 'beforeunload';\n    }\n    const eventType = 'onpagehide' in win ? 'pagehide' : 'beforeunload';\n    return eventType;\n};\nexports._getUnloadEvent = _getUnloadEvent;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._createLayerParameterExposure = exports._createConfigExposure = exports._mapExposures = exports._createGateExposure = exports._isExposureEvent = void 0;\nconst CONFIG_EXPOSURE_NAME = 'statsig::config_exposure';\nconst GATE_EXPOSURE_NAME = 'statsig::gate_exposure';\nconst LAYER_EXPOSURE_NAME = 'statsig::layer_exposure';\nconst _createExposure = (eventName, user, details, metadata, secondaryExposures) => {\n    if (details.bootstrapMetadata) {\n        metadata['bootstrapMetadata'] = details.bootstrapMetadata;\n    }\n    return {\n        eventName,\n        user,\n        value: null,\n        metadata: _addEvaluationDetailsToMetadata(details, metadata),\n        secondaryExposures,\n        time: Date.now(),\n    };\n};\nconst _isExposureEvent = ({ eventName, }) => {\n    return (eventName === GATE_EXPOSURE_NAME ||\n        eventName === CONFIG_EXPOSURE_NAME ||\n        eventName === LAYER_EXPOSURE_NAME);\n};\nexports._isExposureEvent = _isExposureEvent;\nconst _createGateExposure = (user, gate, exposureMapping) => {\n    var _a, _b, _c;\n    const metadata = {\n        gate: gate.name,\n        gateValue: String(gate.value),\n        ruleID: gate.ruleID,\n    };\n    if (((_a = gate.__evaluation) === null || _a === void 0 ? void 0 : _a.version) != null) {\n        metadata['configVersion'] = gate.__evaluation.version;\n    }\n    return _createExposure(GATE_EXPOSURE_NAME, user, gate.details, metadata, _mapExposures((_c = (_b = gate.__evaluation) === null || _b === void 0 ? void 0 : _b.secondary_exposures) !== null && _c !== void 0 ? _c : [], exposureMapping));\n};\nexports._createGateExposure = _createGateExposure;\nfunction _mapExposures(exposures, exposureMapping) {\n    return exposures\n        .map((exposure) => {\n        if (typeof exposure === 'string') {\n            return (exposureMapping !== null && exposureMapping !== void 0 ? exposureMapping : {})[exposure];\n        }\n        return exposure;\n    })\n        .filter((exposure) => exposure != null);\n}\nexports._mapExposures = _mapExposures;\nconst _createConfigExposure = (user, config, exposureMapping) => {\n    var _a, _b, _c, _d;\n    const metadata = {\n        config: config.name,\n        ruleID: config.ruleID,\n    };\n    if (((_a = config.__evaluation) === null || _a === void 0 ? void 0 : _a.version) != null) {\n        metadata['configVersion'] = config.__evaluation.version;\n    }\n    if (((_b = config.__evaluation) === null || _b === void 0 ? void 0 : _b.passed) != null) {\n        metadata['rulePassed'] = String(config.__evaluation.passed);\n    }\n    return _createExposure(CONFIG_EXPOSURE_NAME, user, config.details, metadata, _mapExposures((_d = (_c = config.__evaluation) === null || _c === void 0 ? void 0 : _c.secondary_exposures) !== null && _d !== void 0 ? _d : [], exposureMapping));\n};\nexports._createConfigExposure = _createConfigExposure;\nconst _createLayerParameterExposure = (user, layer, parameterName, exposureMapping) => {\n    var _a, _b, _c, _d, _e, _f, _g;\n    const evaluation = layer.__evaluation;\n    const isExplicit = ((_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.explicit_parameters) === null || _a === void 0 ? void 0 : _a.includes(parameterName)) === true;\n    let allocatedExperiment = '';\n    let secondaryExposures = (_b = evaluation === null || evaluation === void 0 ? void 0 : evaluation.undelegated_secondary_exposures) !== null && _b !== void 0 ? _b : [];\n    if (isExplicit) {\n        allocatedExperiment = (_c = evaluation.allocated_experiment_name) !== null && _c !== void 0 ? _c : '';\n        secondaryExposures = (_d = evaluation.secondary_exposures) !== null && _d !== void 0 ? _d : [];\n    }\n    const parameterRuleIDs = (_e = layer.__evaluation) === null || _e === void 0 ? void 0 : _e.parameter_rule_ids;\n    const metadata = {\n        config: layer.name,\n        parameterName,\n        ruleID: (_f = parameterRuleIDs === null || parameterRuleIDs === void 0 ? void 0 : parameterRuleIDs[parameterName]) !== null && _f !== void 0 ? _f : layer.ruleID,\n        allocatedExperiment,\n        isExplicitParameter: String(isExplicit),\n    };\n    if (((_g = layer.__evaluation) === null || _g === void 0 ? void 0 : _g.version) != null) {\n        metadata['configVersion'] = layer.__evaluation.version;\n    }\n    return _createExposure(LAYER_EXPOSURE_NAME, user, layer.details, metadata, _mapExposures(secondaryExposures, exposureMapping));\n};\nexports._createLayerParameterExposure = _createLayerParameterExposure;\nconst _addEvaluationDetailsToMetadata = (details, metadata) => {\n    metadata['reason'] = details.reason;\n    if (details.lcut) {\n        metadata['lcut'] = String(details.lcut);\n    }\n    if (details.receivedAt) {\n        metadata['receivedAt'] = String(details.receivedAt);\n    }\n    return metadata;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LoggingEnabledOption = exports.LogEventCompressionMode = void 0;\nexports.LogEventCompressionMode = {\n    /** Do not compress request bodies */\n    Disabled: 'd',\n    /** Compress request bodies unless a network proxy is configured */\n    Enabled: 'e',\n    /** Always compress request bodies, even when a proxy is configured */\n    Forced: 'f',\n};\nexports.LoggingEnabledOption = {\n    disabled: 'disabled',\n    browserOnly: 'browser-only',\n    always: 'always',\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._setObjectInStorage = exports._getObjectFromStorage = exports.Storage = void 0;\nconst Log_1 = require(\"./Log\");\nconst SafeJs_1 = require(\"./SafeJs\");\nconst inMemoryStore = {};\nconst _inMemoryProvider = {\n    isReady: () => true,\n    isReadyResolver: () => null,\n    getProviderName: () => 'InMemory',\n    getItem: (key) => inMemoryStore[key] ? inMemoryStore[key] : null,\n    setItem: (key, value) => {\n        inMemoryStore[key] = value;\n    },\n    removeItem: (key) => {\n        delete inMemoryStore[key];\n    },\n    getAllKeys: () => Object.keys(inMemoryStore),\n};\nlet _localStorageProvider = null;\ntry {\n    const win = (0, SafeJs_1._getWindowSafe)();\n    if (win &&\n        win.localStorage &&\n        typeof win.localStorage.getItem === 'function') {\n        _localStorageProvider = {\n            isReady: () => true,\n            isReadyResolver: () => null,\n            getProviderName: () => 'LocalStorage',\n            getItem: (key) => win.localStorage.getItem(key),\n            setItem: (key, value) => win.localStorage.setItem(key, value),\n            removeItem: (key) => win.localStorage.removeItem(key),\n            getAllKeys: () => Object.keys(win.localStorage),\n        };\n    }\n}\ncatch (error) {\n    Log_1.Log.warn('Failed to setup localStorageProvider.');\n}\nlet _main = _localStorageProvider !== null && _localStorageProvider !== void 0 ? _localStorageProvider : _inMemoryProvider;\nlet _current = _main;\nfunction _inMemoryBreaker(action) {\n    try {\n        return action();\n    }\n    catch (error) {\n        if (error instanceof Error && error.name === 'SecurityError') {\n            exports.Storage._setProvider(_inMemoryProvider);\n            return null;\n        }\n        throw error;\n    }\n}\nexports.Storage = {\n    isReady: () => _current.isReady(),\n    isReadyResolver: () => _current.isReadyResolver(),\n    getProviderName: () => _current.getProviderName(),\n    getItem: (key) => _inMemoryBreaker(() => _current.getItem(key)),\n    setItem: (key, value) => _inMemoryBreaker(() => _current.setItem(key, value)),\n    removeItem: (key) => _current.removeItem(key),\n    getAllKeys: () => _current.getAllKeys(),\n    // StorageProviderManagment\n    _setProvider: (newProvider) => {\n        _main = newProvider;\n        _current = newProvider;\n    },\n    _setDisabled: (isDisabled) => {\n        if (isDisabled) {\n            _current = _inMemoryProvider;\n        }\n        else {\n            _current = _main;\n        }\n    },\n};\nfunction _getObjectFromStorage(key) {\n    const value = exports.Storage.getItem(key);\n    return JSON.parse(value !== null && value !== void 0 ? value : 'null');\n}\nexports._getObjectFromStorage = _getObjectFromStorage;\nfunction _setObjectInStorage(key, obj) {\n    exports.Storage.setItem(key, JSON.stringify(obj));\n}\nexports._setObjectInStorage = _setObjectInStorage;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UrlConfiguration = void 0;\nconst Hashing_1 = require(\"./Hashing\");\nconst NetworkConfig_1 = require(\"./NetworkConfig\");\nconst ENDPOINT_DNS_KEY_MAP = {\n    [NetworkConfig_1.Endpoint._initialize]: 'i',\n    [NetworkConfig_1.Endpoint._rgstr]: 'e',\n    [NetworkConfig_1.Endpoint._download_config_specs]: 'd',\n};\nclass UrlConfiguration {\n    constructor(endpoint, customUrl, customApi, fallbackUrls) {\n        this.customUrl = null;\n        this.fallbackUrls = null;\n        this.endpoint = endpoint;\n        this.endpointDnsKey = ENDPOINT_DNS_KEY_MAP[endpoint];\n        if (customUrl) {\n            this.customUrl = customUrl;\n        }\n        if (!customUrl && customApi) {\n            this.customUrl = customApi.endsWith('/')\n                ? `${customApi}${endpoint}`\n                : `${customApi}/${endpoint}`;\n        }\n        if (fallbackUrls) {\n            this.fallbackUrls = fallbackUrls;\n        }\n        const defaultApi = NetworkConfig_1.NetworkDefault[endpoint];\n        this.defaultUrl = `${defaultApi}/${endpoint}`;\n    }\n    getUrl() {\n        var _a;\n        return (_a = this.customUrl) !== null && _a !== void 0 ? _a : this.defaultUrl;\n    }\n    getChecksum() {\n        var _a;\n        const fallbacks = ((_a = this.fallbackUrls) !== null && _a !== void 0 ? _a : []).sort().join(',');\n        return (0, Hashing_1._DJB2)(this.customUrl + fallbacks);\n    }\n}\nexports.UrlConfiguration = UrlConfiguration;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._notifyVisibilityChanged = exports._subscribeToVisiblityChanged = exports._isUnloading = exports._isCurrentlyVisible = void 0;\nconst SafeJs_1 = require(\"./SafeJs\");\nconst FOREGROUND = 'foreground';\nconst BACKGROUND = 'background';\nconst LISTENERS = [];\nlet current = FOREGROUND;\nlet isUnloading = false;\nconst _isCurrentlyVisible = () => {\n    return current === FOREGROUND;\n};\nexports._isCurrentlyVisible = _isCurrentlyVisible;\nconst _isUnloading = () => isUnloading;\nexports._isUnloading = _isUnloading;\nconst _subscribeToVisiblityChanged = (listener) => {\n    LISTENERS.unshift(listener);\n};\nexports._subscribeToVisiblityChanged = _subscribeToVisiblityChanged;\nconst _notifyVisibilityChanged = (visibility) => {\n    if (visibility === current) {\n        return;\n    }\n    current = visibility;\n    LISTENERS.forEach((l) => l(visibility));\n};\nexports._notifyVisibilityChanged = _notifyVisibilityChanged;\n(0, SafeJs_1._addWindowEventListenerSafe)('focus', () => {\n    isUnloading = false;\n    (0, exports._notifyVisibilityChanged)(FOREGROUND);\n});\n(0, SafeJs_1._addWindowEventListenerSafe)('blur', () => (0, exports._notifyVisibilityChanged)(BACKGROUND));\n(0, SafeJs_1._addDocumentEventListenerSafe)('visibilitychange', () => {\n    (0, exports._notifyVisibilityChanged)(document.visibilityState === 'visible' ? FOREGROUND : BACKGROUND);\n});\n(0, SafeJs_1._addWindowEventListenerSafe)((0, SafeJs_1._getUnloadEvent)(), () => {\n    isUnloading = true;\n    (0, exports._notifyVisibilityChanged)(BACKGROUND);\n});\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventLogger = void 0;\nconst CacheKey_1 = require(\"./CacheKey\");\nconst Hashing_1 = require(\"./Hashing\");\nconst Log_1 = require(\"./Log\");\nconst NetworkConfig_1 = require(\"./NetworkConfig\");\nconst SafeJs_1 = require(\"./SafeJs\");\nconst StatsigEvent_1 = require(\"./StatsigEvent\");\nconst StatsigOptionsCommon_1 = require(\"./StatsigOptionsCommon\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst UrlConfiguration_1 = require(\"./UrlConfiguration\");\nconst VisibilityObserving_1 = require(\"./VisibilityObserving\");\nconst DEFAULT_QUEUE_SIZE = 100;\nconst DEFAULT_FLUSH_INTERVAL_MS = 10000;\nconst MAX_DEDUPER_KEYS = 1000;\nconst DEDUPER_WINDOW_DURATION_MS = 600000;\nconst MAX_FAILED_LOGS = 500;\nconst QUICK_FLUSH_WINDOW_MS = 200;\nconst EVENT_LOGGER_MAP = {};\nconst RetryFailedLogsTrigger = {\n    Startup: 'startup',\n    GainedFocus: 'gained_focus',\n};\nclass EventLogger {\n    static _safeFlushAndForget(sdkKey) {\n        var _a;\n        (_a = EVENT_LOGGER_MAP[sdkKey]) === null || _a === void 0 ? void 0 : _a.flush().catch(() => {\n            // noop\n        });\n    }\n    static _safeRetryFailedLogs(sdkKey) {\n        var _a;\n        (_a = EVENT_LOGGER_MAP[sdkKey]) === null || _a === void 0 ? void 0 : _a._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus);\n    }\n    constructor(_sdkKey, _emitter, _network, _options) {\n        var _a, _b;\n        this._sdkKey = _sdkKey;\n        this._emitter = _emitter;\n        this._network = _network;\n        this._options = _options;\n        this._queue = [];\n        this._lastExposureTimeMap = {};\n        this._nonExposedChecks = {};\n        this._hasRunQuickFlush = false;\n        this._creationTime = Date.now();\n        this._loggingEnabled =\n            (_a = _options === null || _options === void 0 ? void 0 : _options.loggingEnabled) !== null && _a !== void 0 ? _a : ((_options === null || _options === void 0 ? void 0 : _options.disableLogging) === true\n                ? StatsigOptionsCommon_1.LoggingEnabledOption.disabled\n                : StatsigOptionsCommon_1.LoggingEnabledOption.browserOnly);\n        if ((_options === null || _options === void 0 ? void 0 : _options.loggingEnabled) && _options.disableLogging !== undefined) {\n            Log_1.Log.warn('Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.');\n        }\n        this._maxQueueSize = (_b = _options === null || _options === void 0 ? void 0 : _options.loggingBufferMaxSize) !== null && _b !== void 0 ? _b : DEFAULT_QUEUE_SIZE;\n        const config = _options === null || _options === void 0 ? void 0 : _options.networkConfig;\n        this._logEventUrlConfig = new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1.Endpoint._rgstr, config === null || config === void 0 ? void 0 : config.logEventUrl, config === null || config === void 0 ? void 0 : config.api, config === null || config === void 0 ? void 0 : config.logEventFallbackUrls);\n    }\n    setLogEventCompressionMode(mode) {\n        this._network.setLogEventCompressionMode(mode);\n    }\n    setLoggingEnabled(loggingEnabled) {\n        if (this._loggingEnabled === 'disabled' && loggingEnabled !== 'disabled') {\n            // load any pre consented events into memory\n            const storageKey = this._getStorageKey();\n            const events = (0, StorageProvider_1._getObjectFromStorage)(storageKey);\n            if (events) {\n                this._queue.push(...events);\n            }\n            StorageProvider_1.Storage.removeItem(storageKey);\n        }\n        this._loggingEnabled = loggingEnabled;\n    }\n    enqueue(event) {\n        if (!this._shouldLogEvent(event)) {\n            return;\n        }\n        this._normalizeAndAppendEvent(event);\n        this._quickFlushIfNeeded();\n        if (this._queue.length > this._maxQueueSize) {\n            EventLogger._safeFlushAndForget(this._sdkKey);\n        }\n    }\n    incrementNonExposureCount(name) {\n        var _a;\n        const current = (_a = this._nonExposedChecks[name]) !== null && _a !== void 0 ? _a : 0;\n        this._nonExposedChecks[name] = current + 1;\n    }\n    reset() {\n        // attempt to flush any remaining events\n        this.flush().catch(() => {\n            // noop\n        });\n        this._lastExposureTimeMap = {};\n    }\n    start() {\n        var _a;\n        const isServerEnv = (0, SafeJs_1._isServerEnv)();\n        if (isServerEnv && ((_a = this._options) === null || _a === void 0 ? void 0 : _a.loggingEnabled) !== 'always') {\n            return;\n        }\n        EVENT_LOGGER_MAP[this._sdkKey] = this;\n        if (!isServerEnv) {\n            (0, VisibilityObserving_1._subscribeToVisiblityChanged)((visibility) => {\n                if (visibility === 'background') {\n                    EventLogger._safeFlushAndForget(this._sdkKey);\n                }\n                else if (visibility === 'foreground') {\n                    EventLogger._safeRetryFailedLogs(this._sdkKey);\n                }\n            });\n        }\n        this._retryFailedLogs(RetryFailedLogsTrigger.Startup);\n        this._startBackgroundFlushInterval();\n    }\n    stop() {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this._flushIntervalId) {\n                clearInterval(this._flushIntervalId);\n                this._flushIntervalId = null;\n            }\n            delete EVENT_LOGGER_MAP[this._sdkKey];\n            yield this.flush();\n        });\n    }\n    flush() {\n        return __awaiter(this, void 0, void 0, function* () {\n            this._appendAndResetNonExposedChecks();\n            if (this._queue.length === 0) {\n                return;\n            }\n            const events = this._queue;\n            this._queue = [];\n            yield this._sendEvents(events);\n        });\n    }\n    /**\n     * We 'Quick Flush' following the very first event enqueued\n     * within the quick flush window\n     */\n    _quickFlushIfNeeded() {\n        if (this._hasRunQuickFlush) {\n            return;\n        }\n        this._hasRunQuickFlush = true;\n        if (Date.now() - this._creationTime > QUICK_FLUSH_WINDOW_MS) {\n            return;\n        }\n        setTimeout(() => EventLogger._safeFlushAndForget(this._sdkKey), QUICK_FLUSH_WINDOW_MS);\n    }\n    _shouldLogEvent(event) {\n        var _a;\n        if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.loggingEnabled) !== 'always' && (0, SafeJs_1._isServerEnv)()) {\n            return false;\n        }\n        if (!(0, StatsigEvent_1._isExposureEvent)(event)) {\n            return true;\n        }\n        const user = event.user ? event.user : { statsigEnvironment: undefined };\n        const userKey = (0, CacheKey_1._getUserStorageKey)(this._sdkKey, user);\n        const metadata = event.metadata ? event.metadata : {};\n        const key = [\n            event.eventName,\n            userKey,\n            metadata['gate'],\n            metadata['config'],\n            metadata['ruleID'],\n            metadata['allocatedExperiment'],\n            metadata['parameterName'],\n            String(metadata['isExplicitParameter']),\n            metadata['reason'],\n        ].join('|');\n        const previous = this._lastExposureTimeMap[key];\n        const now = Date.now();\n        if (previous && now - previous < DEDUPER_WINDOW_DURATION_MS) {\n            return false;\n        }\n        if (Object.keys(this._lastExposureTimeMap).length > MAX_DEDUPER_KEYS) {\n            this._lastExposureTimeMap = {};\n        }\n        this._lastExposureTimeMap[key] = now;\n        return true;\n    }\n    _sendEvents(events) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b;\n            if (this._loggingEnabled === 'disabled') {\n                this._saveFailedLogsToStorage(events);\n                return false;\n            }\n            try {\n                const isClosing = (0, VisibilityObserving_1._isUnloading)();\n                const shouldUseBeacon = isClosing &&\n                    this._network.isBeaconSupported() &&\n                    ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.networkConfig) === null || _b === void 0 ? void 0 : _b.networkOverrideFunc) == null;\n                this._emitter({\n                    name: 'pre_logs_flushed',\n                    events,\n                });\n                const response = shouldUseBeacon\n                    ? this._sendEventsViaBeacon(events)\n                    : yield this._sendEventsViaPost(events);\n                if (response.success) {\n                    this._emitter({\n                        name: 'logs_flushed',\n                        events,\n                    });\n                    return true;\n                }\n                else {\n                    Log_1.Log.warn('Failed to flush events.');\n                    this._saveFailedLogsToStorage(events);\n                    return false;\n                }\n            }\n            catch (_c) {\n                Log_1.Log.warn('Failed to flush events.');\n                return false;\n            }\n        });\n    }\n    _sendEventsViaPost(events) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const result = yield this._network.post(this._getRequestData(events));\n            const code = (_a = result === null || result === void 0 ? void 0 : result.code) !== null && _a !== void 0 ? _a : -1;\n            return { success: code >= 200 && code < 300 };\n        });\n    }\n    _sendEventsViaBeacon(events) {\n        return {\n            success: this._network.beacon(this._getRequestData(events)),\n        };\n    }\n    _getRequestData(events) {\n        return {\n            sdkKey: this._sdkKey,\n            data: {\n                events,\n            },\n            urlConfig: this._logEventUrlConfig,\n            retries: 3,\n            isCompressable: true,\n            params: {\n                [NetworkConfig_1.NetworkParam.EventCount]: String(events.length),\n            },\n            credentials: 'same-origin',\n        };\n    }\n    _saveFailedLogsToStorage(events) {\n        while (events.length > MAX_FAILED_LOGS) {\n            events.shift();\n        }\n        const storageKey = this._getStorageKey();\n        try {\n            const savedEvents = this._getFailedLogsFromStorage(storageKey);\n            (0, StorageProvider_1._setObjectInStorage)(storageKey, [...savedEvents, ...events]);\n        }\n        catch (_a) {\n            Log_1.Log.warn('Unable to save failed logs to storage');\n        }\n    }\n    _getFailedLogsFromStorage(storageKey) {\n        let savedEvents = [];\n        try {\n            const retrieved = (0, StorageProvider_1._getObjectFromStorage)(storageKey);\n            if (Array.isArray(retrieved)) {\n                savedEvents = retrieved;\n            }\n            return savedEvents;\n        }\n        catch (_a) {\n            return [];\n        }\n    }\n    _retryFailedLogs(trigger) {\n        const storageKey = this._getStorageKey();\n        (() => __awaiter(this, void 0, void 0, function* () {\n            if (!StorageProvider_1.Storage.isReady()) {\n                yield StorageProvider_1.Storage.isReadyResolver();\n            }\n            const events = (0, StorageProvider_1._getObjectFromStorage)(storageKey);\n            if (!events) {\n                return;\n            }\n            if (trigger === RetryFailedLogsTrigger.Startup) {\n                StorageProvider_1.Storage.removeItem(storageKey);\n            }\n            const isSuccess = yield this._sendEvents(events);\n            if (isSuccess && trigger === RetryFailedLogsTrigger.GainedFocus) {\n                StorageProvider_1.Storage.removeItem(storageKey);\n            }\n        }))().catch(() => {\n            Log_1.Log.warn('Failed to flush stored logs');\n        });\n    }\n    _getStorageKey() {\n        return `statsig.failed_logs.${(0, Hashing_1._DJB2)(this._sdkKey)}`;\n    }\n    _normalizeAndAppendEvent(event) {\n        if (event.user) {\n            event.user = Object.assign({}, event.user);\n            delete event.user.privateAttributes;\n        }\n        const extras = {};\n        const currentPage = this._getCurrentPageUrl();\n        if (currentPage) {\n            extras.statsigMetadata = { currentPage };\n        }\n        const final = Object.assign(Object.assign({}, event), extras);\n        Log_1.Log.debug('Enqueued Event:', final);\n        this._queue.push(final);\n    }\n    _appendAndResetNonExposedChecks() {\n        if (Object.keys(this._nonExposedChecks).length === 0) {\n            return;\n        }\n        this._normalizeAndAppendEvent({\n            eventName: 'statsig::non_exposed_checks',\n            user: null,\n            time: Date.now(),\n            metadata: {\n                checks: Object.assign({}, this._nonExposedChecks),\n            },\n        });\n        this._nonExposedChecks = {};\n    }\n    _getCurrentPageUrl() {\n        var _a;\n        if (((_a = this._options) === null || _a === void 0 ? void 0 : _a.includeCurrentPageUrlWithEvents) === false) {\n            return;\n        }\n        return (0, SafeJs_1._getCurrentPageUrlSafe)();\n    }\n    _startBackgroundFlushInterval() {\n        var _a, _b;\n        const flushInterval = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.loggingIntervalMs) !== null && _b !== void 0 ? _b : DEFAULT_FLUSH_INTERVAL_MS;\n        const intervalId = setInterval(() => {\n            const logger = EVENT_LOGGER_MAP[this._sdkKey];\n            if (!logger || logger._flushIntervalId !== intervalId) {\n                clearInterval(intervalId);\n            }\n            else {\n                EventLogger._safeFlushAndForget(this._sdkKey);\n            }\n        }, flushInterval);\n        this._flushIntervalId = intervalId;\n    }\n}\nexports.EventLogger = EventLogger;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigMetadataProvider = exports.SDK_VERSION = void 0;\nexports.SDK_VERSION = '3.27.0';\nlet metadata = {\n    sdkVersion: exports.SDK_VERSION,\n    sdkType: 'js-mono', // js-mono is overwritten by Precomp and OnDevice clients\n};\nexports.StatsigMetadataProvider = {\n    get: () => metadata,\n    add: (additions) => {\n        metadata = Object.assign(Object.assign({}, metadata), additions);\n    },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUUID = void 0;\nfunction getUUID() {\n    if (typeof crypto !== 'undefined' &&\n        typeof crypto.randomUUID === 'function') {\n        return crypto.randomUUID();\n    }\n    let d = new Date().getTime();\n    let d2 = (typeof performance !== 'undefined' &&\n        performance.now &&\n        performance.now() * 1000) ||\n        0;\n    const y = '89ab'[Math.floor(Math.random() * 4)];\n    return `xxxxxxxx-xxxx-4xxx-${y}xxx-xxxxxxxxxxxx`.replace(/[xy]/g, (c) => {\n        let r = Math.random() * 16;\n        if (d > 0) {\n            r = (d + r) % 16 | 0;\n            d = Math.floor(d / 16);\n        }\n        else {\n            r = (d2 + r) % 16 | 0;\n            d2 = Math.floor(d2 / 16);\n        }\n        return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16);\n    });\n}\nexports.getUUID = getUUID;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCookieName = exports.StableID = void 0;\nconst CacheKey_1 = require(\"./CacheKey\");\nconst Log_1 = require(\"./Log\");\nconst SafeJs_1 = require(\"./SafeJs\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst UUID_1 = require(\"./UUID\");\nconst PROMISE_MAP = {};\nconst COOKIE_ENABLED_MAP = {};\nconst DISABLED_MAP = {};\nexports.StableID = {\n    cookiesEnabled: false,\n    randomID: Math.random().toString(36),\n    get: (sdkKey) => {\n        if (DISABLED_MAP[sdkKey]) {\n            return null;\n        }\n        if (PROMISE_MAP[sdkKey] != null) {\n            return PROMISE_MAP[sdkKey];\n        }\n        let stableID = null;\n        stableID = _loadFromCookie(sdkKey);\n        if (stableID != null) {\n            PROMISE_MAP[sdkKey] = stableID;\n            _persistToStorage(stableID, sdkKey);\n            return stableID;\n        }\n        stableID = _loadFromStorage(sdkKey);\n        if (stableID == null) {\n            stableID = (0, UUID_1.getUUID)();\n        }\n        _persistToStorage(stableID, sdkKey);\n        _persistToCookie(stableID, sdkKey);\n        PROMISE_MAP[sdkKey] = stableID;\n        return stableID;\n    },\n    setOverride: (override, sdkKey) => {\n        PROMISE_MAP[sdkKey] = override;\n        _persistToStorage(override, sdkKey);\n        _persistToCookie(override, sdkKey);\n    },\n    _setCookiesEnabled: (sdkKey, cookiesEnabled) => {\n        COOKIE_ENABLED_MAP[sdkKey] = cookiesEnabled;\n    },\n    _setDisabled: (sdkKey, disabled) => {\n        DISABLED_MAP[sdkKey] = disabled;\n    },\n};\nfunction _getStableIDStorageKey(sdkKey) {\n    return `statsig.stable_id.${(0, CacheKey_1._getStorageKey)(sdkKey)}`;\n}\nfunction _persistToStorage(stableID, sdkKey) {\n    const storageKey = _getStableIDStorageKey(sdkKey);\n    try {\n        (0, StorageProvider_1._setObjectInStorage)(storageKey, stableID);\n    }\n    catch (e) {\n        Log_1.Log.warn('Failed to save StableID to storage');\n    }\n}\nfunction _loadFromStorage(sdkKey) {\n    const storageKey = _getStableIDStorageKey(sdkKey);\n    return (0, StorageProvider_1._getObjectFromStorage)(storageKey);\n}\nfunction _loadFromCookie(sdkKey) {\n    if (!COOKIE_ENABLED_MAP[sdkKey] || (0, SafeJs_1._getDocumentSafe)() == null) {\n        return null;\n    }\n    const cookies = document.cookie.split(';');\n    for (const cookie of cookies) {\n        const [key, value] = cookie.trim().split('=');\n        if (key === getCookieName(sdkKey)) {\n            return decodeURIComponent(value);\n        }\n    }\n    return null;\n}\nfunction _persistToCookie(stableID, sdkKey) {\n    if (!COOKIE_ENABLED_MAP[sdkKey] || (0, SafeJs_1._getDocumentSafe)() == null) {\n        return;\n    }\n    const expiryDate = new Date();\n    expiryDate.setFullYear(expiryDate.getFullYear() + 1);\n    document.cookie = `${getCookieName(sdkKey)}=${encodeURIComponent(stableID)}; expires=${expiryDate.toUTCString()}; path=/`;\n}\nfunction getCookieName(sdkKey) {\n    return `statsig.stable_id.${(0, CacheKey_1._getStorageKey)(sdkKey)}`;\n}\nexports.getCookieName = getCookieName;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._getFullUserHash = exports._normalizeUser = void 0;\nconst Hashing_1 = require(\"./Hashing\");\nconst Log_1 = require(\"./Log\");\nfunction _normalizeUser(original, options, fallbackEnvironment) {\n    try {\n        const copy = JSON.parse(JSON.stringify(original));\n        if (options != null && options.environment != null) {\n            copy.statsigEnvironment = options.environment;\n        }\n        else if (fallbackEnvironment != null) {\n            copy.statsigEnvironment = { tier: fallbackEnvironment };\n        }\n        return copy;\n    }\n    catch (error) {\n        Log_1.Log.error('Failed to JSON.stringify user');\n        return { statsigEnvironment: undefined };\n    }\n}\nexports._normalizeUser = _normalizeUser;\nfunction _getFullUserHash(user) {\n    return user ? (0, Hashing_1._DJB2Object)(user) : null;\n}\nexports._getFullUserHash = _getFullUserHash;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._typedJsonParse = void 0;\nconst Log_1 = require(\"./Log\");\n/**\n *\n * @param {string} data The values to parse into T\n * @param {string} guard A field that must exists on the parsed object for the parse to be valid\n * @param {string} error An error to print via Log.error() when parsing fails\n * @returns {T | null} The parse object T or null if it failed\n */\nfunction _typedJsonParse(data, guard, typeName) {\n    try {\n        const result = JSON.parse(data);\n        if (result &&\n            typeof result === 'object' &&\n            guard in result) {\n            return result;\n        }\n    }\n    catch (_a) {\n        // noop\n    }\n    Log_1.Log.error(`Failed to parse ${typeName}`);\n    return null;\n}\nexports._typedJsonParse = _typedJsonParse;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._makeDataAdapterResult = exports.DataAdapterCore = void 0;\nconst Log_1 = require(\"./Log\");\nconst StableID_1 = require(\"./StableID\");\nconst StatsigUser_1 = require(\"./StatsigUser\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst TypedJsonParse_1 = require(\"./TypedJsonParse\");\nconst CACHE_LIMIT = 10;\nconst MAX_CACHE_WRITE_ATTEMPTS = 8;\nclass DataAdapterCore {\n    constructor(_adapterName, _cacheSuffix) {\n        this._adapterName = _adapterName;\n        this._cacheSuffix = _cacheSuffix;\n        this._options = null;\n        this._sdkKey = null;\n        this._cacheLimit = CACHE_LIMIT;\n        this._lastModifiedStoreKey = `statsig.last_modified_time.${_cacheSuffix}`;\n        this._inMemoryCache = new InMemoryCache();\n    }\n    attach(sdkKey, options, _network) {\n        this._sdkKey = sdkKey;\n        this._options = options;\n    }\n    getDataSync(user) {\n        const normalized = user && (0, StatsigUser_1._normalizeUser)(user, this._options);\n        const cacheKey = this._getCacheKey(normalized);\n        const inMem = this._inMemoryCache.get(cacheKey, normalized);\n        if (inMem && this._getIsCacheValueValid(inMem)) {\n            return inMem;\n        }\n        const cache = this._loadFromCache(cacheKey);\n        if (cache && this._getIsCacheValueValid(cache)) {\n            this._inMemoryCache.add(cacheKey, cache, this._cacheLimit);\n            return this._inMemoryCache.get(cacheKey, normalized);\n        }\n        return null;\n    }\n    setData(data, user) {\n        const normalized = user && (0, StatsigUser_1._normalizeUser)(user, this._options);\n        const cacheKey = this._getCacheKey(normalized);\n        this._inMemoryCache.add(cacheKey, _makeDataAdapterResult('Bootstrap', data, null, normalized), this._cacheLimit);\n    }\n    _getIsCacheValueValid(current) {\n        return (current.stableID == null ||\n            current.stableID === StableID_1.StableID.get(this._getSdkKey()));\n    }\n    _getDataAsyncImpl(current, user, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!StorageProvider_1.Storage.isReady()) {\n                yield StorageProvider_1.Storage.isReadyResolver();\n            }\n            const cache = current !== null && current !== void 0 ? current : this.getDataSync(user);\n            const ops = [this._fetchAndPrepFromNetwork(cache, user, options)];\n            if (options === null || options === void 0 ? void 0 : options.timeoutMs) {\n                ops.push(new Promise((r) => setTimeout(r, options.timeoutMs)).then(() => {\n                    Log_1.Log.debug('Fetching latest value timed out');\n                    return null;\n                }));\n            }\n            return yield Promise.race(ops);\n        });\n    }\n    _prefetchDataImpl(user, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const normalized = user && (0, StatsigUser_1._normalizeUser)(user, this._options);\n            const cacheKey = this._getCacheKey(normalized);\n            const result = yield this._getDataAsyncImpl(null, normalized, options);\n            if (result) {\n                this._inMemoryCache.add(cacheKey, Object.assign(Object.assign({}, result), { source: 'Prefetch' }), this._cacheLimit);\n            }\n        });\n    }\n    _fetchAndPrepFromNetwork(cachedResult, user, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const cachedData = (_a = cachedResult === null || cachedResult === void 0 ? void 0 : cachedResult.data) !== null && _a !== void 0 ? _a : null;\n            const isCacheValidFor204 = cachedResult != null &&\n                this._isCachedResultValidFor204(cachedResult, user);\n            const latest = yield this._fetchFromNetwork(cachedData, user, options, isCacheValidFor204);\n            if (!latest) {\n                Log_1.Log.debug('No response returned for latest value');\n                return null;\n            }\n            const response = (0, TypedJsonParse_1._typedJsonParse)(latest, 'has_updates', 'Response');\n            const sdkKey = this._getSdkKey();\n            const stableID = StableID_1.StableID.get(sdkKey);\n            let result = null;\n            if ((response === null || response === void 0 ? void 0 : response.has_updates) === true) {\n                result = _makeDataAdapterResult('Network', latest, stableID, user);\n            }\n            else if (cachedData && (response === null || response === void 0 ? void 0 : response.has_updates) === false) {\n                result = _makeDataAdapterResult('NetworkNotModified', cachedData, stableID, user);\n            }\n            else {\n                return null;\n            }\n            const cacheKey = this._getCacheKey(user);\n            this._inMemoryCache.add(cacheKey, result, this._cacheLimit);\n            this._writeToCache(cacheKey, result);\n            return result;\n        });\n    }\n    _getSdkKey() {\n        if (this._sdkKey != null) {\n            return this._sdkKey;\n        }\n        Log_1.Log.error(`${this._adapterName} is not attached to a Client`);\n        return '';\n    }\n    _loadFromCache(cacheKey) {\n        var _a;\n        const cache = (_a = StorageProvider_1.Storage.getItem) === null || _a === void 0 ? void 0 : _a.call(StorageProvider_1.Storage, cacheKey);\n        if (cache == null) {\n            return null;\n        }\n        const result = (0, TypedJsonParse_1._typedJsonParse)(cache, 'source', 'Cached Result');\n        return result ? Object.assign(Object.assign({}, result), { source: 'Cache' }) : null;\n    }\n    _writeToCache(cacheKey, result) {\n        const resultString = JSON.stringify(result);\n        for (let i = 0; i < MAX_CACHE_WRITE_ATTEMPTS; i++) {\n            try {\n                StorageProvider_1.Storage.setItem(cacheKey, resultString);\n                break;\n            }\n            catch (error) {\n                if (!(error instanceof Error) ||\n                    !(error.toString().includes('QuotaExceededError') ||\n                        error.toString().includes('QUOTA_EXCEEDED_ERR')) ||\n                    this._cacheLimit <= 1) {\n                    throw error;\n                }\n                this._cacheLimit = Math.ceil(this._cacheLimit / 2);\n                this._runLocalStorageCacheEviction(cacheKey, this._cacheLimit - 1);\n            }\n        }\n        this._runLocalStorageCacheEviction(cacheKey);\n    }\n    _runLocalStorageCacheEviction(cacheKey, cacheLimit = this._cacheLimit) {\n        var _a;\n        const lastModifiedTimeMap = (_a = (0, StorageProvider_1._getObjectFromStorage)(this._lastModifiedStoreKey)) !== null && _a !== void 0 ? _a : {};\n        lastModifiedTimeMap[cacheKey] = Date.now();\n        const evictableKeys = _getEvictableKeys(lastModifiedTimeMap, cacheLimit);\n        for (const evictable of evictableKeys) {\n            delete lastModifiedTimeMap[evictable];\n            StorageProvider_1.Storage.removeItem(evictable);\n        }\n        (0, StorageProvider_1._setObjectInStorage)(this._lastModifiedStoreKey, lastModifiedTimeMap);\n    }\n}\nexports.DataAdapterCore = DataAdapterCore;\nfunction _makeDataAdapterResult(source, data, stableID, user) {\n    return {\n        source,\n        data,\n        receivedAt: Date.now(),\n        stableID,\n        fullUserHash: (0, StatsigUser_1._getFullUserHash)(user),\n    };\n}\nexports._makeDataAdapterResult = _makeDataAdapterResult;\nclass InMemoryCache {\n    constructor() {\n        this._data = {};\n    }\n    get(cacheKey, user) {\n        var _a;\n        const result = this._data[cacheKey];\n        const cached = result === null || result === void 0 ? void 0 : result.stableID;\n        const provided = (_a = user === null || user === void 0 ? void 0 : user.customIDs) === null || _a === void 0 ? void 0 : _a.stableID;\n        if (provided && cached && provided !== cached) {\n            Log_1.Log.warn(\"'StatsigUser.customIDs.stableID' mismatch\");\n            return null;\n        }\n        return result;\n    }\n    add(cacheKey, value, cacheLimit) {\n        const evictableKeys = _getEvictableKeys(this._data, cacheLimit - 1);\n        for (const evictable of evictableKeys) {\n            delete this._data[evictable];\n        }\n        this._data[cacheKey] = value;\n    }\n    merge(values) {\n        this._data = Object.assign(Object.assign({}, this._data), values);\n    }\n}\nfunction _getEvictableKeys(data, limit) {\n    const keys = Object.keys(data);\n    if (keys.length <= limit) {\n        return [];\n    }\n    if (limit === 0) {\n        return keys;\n    }\n    return keys\n        .sort((keyA, keyB) => {\n        const valueA = data[keyA];\n        const valueB = data[keyB];\n        if (typeof valueA === 'object' && typeof valueB === 'object') {\n            return valueA.receivedAt - valueB.receivedAt;\n        }\n        return valueA - valueB;\n    })\n        .slice(0, keys.length - limit);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDKType = void 0;\nconst SDK_CLIENT = {};\nlet suffix;\nexports.SDKType = {\n    _get: (sdkKey) => {\n        var _a;\n        return ((_a = SDK_CLIENT[sdkKey]) !== null && _a !== void 0 ? _a : 'js-mono') + (suffix !== null && suffix !== void 0 ? suffix : '');\n    },\n    _setClientType(sdkKey, client) {\n        SDK_CLIENT[sdkKey] = client;\n    },\n    _setBindingType(binding) {\n        if (!suffix || suffix === '-react') {\n            suffix = '-' + binding;\n        }\n    },\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorBoundary = exports.EXCEPTION_ENDPOINT = void 0;\nconst Log_1 = require(\"./Log\");\nconst SDKType_1 = require(\"./SDKType\");\nconst StatsigMetadata_1 = require(\"./StatsigMetadata\");\nexports.EXCEPTION_ENDPOINT = 'https://statsigapi.net/v1/sdk_exception';\nconst UNKNOWN_ERROR = '[Statsig] UnknownError';\nclass ErrorBoundary {\n    constructor(_sdkKey, _options, _emitter, _lastSeenError) {\n        this._sdkKey = _sdkKey;\n        this._options = _options;\n        this._emitter = _emitter;\n        this._lastSeenError = _lastSeenError;\n        this._seen = new Set();\n    }\n    wrap(instance, namePrefix) {\n        try {\n            const obj = instance;\n            _getAllInstanceMethodNames(obj).forEach((name) => {\n                const original = obj[name];\n                if ('$EB' in original) {\n                    return;\n                }\n                obj[name] = (...args) => {\n                    return this._capture(namePrefix ? `${namePrefix}:${name}` : name, () => original.apply(instance, args));\n                };\n                obj[name].$EB = true;\n            });\n        }\n        catch (err) {\n            this._onError('eb:wrap', err);\n        }\n    }\n    logError(tag, error) {\n        this._onError(tag, error);\n    }\n    getLastSeenErrorAndReset() {\n        const tempError = this._lastSeenError;\n        this._lastSeenError = undefined;\n        return tempError !== null && tempError !== void 0 ? tempError : null;\n    }\n    attachErrorIfNoneExists(error) {\n        if (this._lastSeenError) {\n            return;\n        }\n        this._lastSeenError = _resolveError(error);\n    }\n    _capture(tag, task) {\n        try {\n            const res = task();\n            if (res && res instanceof Promise) {\n                return res.catch((err) => this._onError(tag, err));\n            }\n            return res;\n        }\n        catch (error) {\n            this._onError(tag, error);\n            return null;\n        }\n    }\n    _onError(tag, error) {\n        try {\n            Log_1.Log.warn(`Caught error in ${tag}`, { error });\n            const impl = () => __awaiter(this, void 0, void 0, function* () {\n                var _a, _b, _c, _d, _e, _f, _g;\n                const unwrapped = (error ? error : Error(UNKNOWN_ERROR));\n                const isError = unwrapped instanceof Error;\n                const name = isError ? unwrapped.name : 'No Name';\n                const resolvedError = _resolveError(unwrapped);\n                this._lastSeenError = resolvedError;\n                if (this._seen.has(name)) {\n                    return;\n                }\n                this._seen.add(name);\n                if ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.networkConfig) === null || _b === void 0 ? void 0 : _b.preventAllNetworkTraffic) {\n                    (_c = this._emitter) === null || _c === void 0 ? void 0 : _c.call(this, {\n                        name: 'error',\n                        error,\n                        tag,\n                    });\n                    return;\n                }\n                const sdkType = SDKType_1.SDKType._get(this._sdkKey);\n                const statsigMetadata = StatsigMetadata_1.StatsigMetadataProvider.get();\n                const info = isError ? unwrapped.stack : _getDescription(unwrapped);\n                const body = Object.assign({ tag, exception: name, info, statsigOptions: _getStatsigOptionLoggingCopy(this._options) }, Object.assign(Object.assign({}, statsigMetadata), { sdkType }));\n                const func = (_f = (_e = (_d = this._options) === null || _d === void 0 ? void 0 : _d.networkConfig) === null || _e === void 0 ? void 0 : _e.networkOverrideFunc) !== null && _f !== void 0 ? _f : fetch;\n                yield func(exports.EXCEPTION_ENDPOINT, {\n                    method: 'POST',\n                    headers: {\n                        'STATSIG-API-KEY': this._sdkKey,\n                        'STATSIG-SDK-TYPE': String(sdkType),\n                        'STATSIG-SDK-VERSION': String(statsigMetadata.sdkVersion),\n                        'Content-Type': 'application/json',\n                    },\n                    body: JSON.stringify(body),\n                });\n                (_g = this._emitter) === null || _g === void 0 ? void 0 : _g.call(this, {\n                    name: 'error',\n                    error,\n                    tag,\n                });\n            });\n            impl()\n                .then(() => {\n                /* noop */\n            })\n                .catch(() => {\n                /* noop */\n            });\n        }\n        catch (_error) {\n            /* noop */\n        }\n    }\n}\nexports.ErrorBoundary = ErrorBoundary;\nfunction _resolveError(error) {\n    if (error instanceof Error) {\n        return error;\n    }\n    else if (typeof error === 'string') {\n        return new Error(error);\n    }\n    else {\n        return new Error('An unknown error occurred.');\n    }\n}\nfunction _getDescription(obj) {\n    try {\n        return JSON.stringify(obj);\n    }\n    catch (_a) {\n        return UNKNOWN_ERROR;\n    }\n}\nfunction _getAllInstanceMethodNames(instance) {\n    const names = new Set();\n    let proto = Object.getPrototypeOf(instance);\n    while (proto && proto !== Object.prototype) {\n        Object.getOwnPropertyNames(proto)\n            .filter((prop) => typeof (proto === null || proto === void 0 ? void 0 : proto[prop]) === 'function')\n            .forEach((name) => names.add(name));\n        proto = Object.getPrototypeOf(proto);\n    }\n    return Array.from(names);\n}\nfunction _getStatsigOptionLoggingCopy(options) {\n    if (!options) {\n        return {};\n    }\n    const loggingCopy = {};\n    Object.keys(options).forEach((key) => {\n        const option = key;\n        const value = options[option];\n        const valueType = typeof value;\n        switch (valueType) {\n            case 'number':\n            case 'bigint':\n            case 'boolean':\n                loggingCopy[String(option)] = value;\n                break;\n            case 'string':\n                if (value.length < 50) {\n                    loggingCopy[String(option)] = value;\n                }\n                else {\n                    loggingCopy[String(option)] = 'set';\n                }\n                break;\n            case 'object':\n                if (option === 'environment') {\n                    loggingCopy['environment'] = value;\n                }\n                else if (option === 'networkConfig') {\n                    loggingCopy['networkConfig'] = value;\n                }\n                else {\n                    loggingCopy[String(option)] = value != null ? 'set' : 'unset';\n                }\n                break;\n            default:\n            // Ignore other fields\n        }\n    });\n    return loggingCopy;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMemoKey = exports.MemoPrefix = void 0;\nexports.MemoPrefix = {\n    _gate: 'g',\n    _dynamicConfig: 'c',\n    _experiment: 'e',\n    _configList: 'cl',\n    _layer: 'l',\n    _paramStore: 'p',\n};\nconst EXIST_KEYS = new Set([\n// Add keys that should be memoized based only on their existence, not their value\n]);\nconst DO_NOT_MEMO_KEYS = new Set([\n    // Add keys that if exist, should not be memoized\n    'userPersistedValues',\n]);\nfunction createMemoKey(prefix, name, options) {\n    let cacheKey = `${prefix}|${name}`;\n    if (!options) {\n        return cacheKey;\n    }\n    for (const key of Object.keys(options)) {\n        if (DO_NOT_MEMO_KEYS.has(key)) {\n            return undefined;\n        }\n        if (EXIST_KEYS.has(key)) {\n            cacheKey += `|${key}=true`;\n        }\n        else {\n            cacheKey += `|${key}=${options[key]}`;\n        }\n    }\n    return cacheKey;\n}\nexports.createMemoKey = createMemoKey;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._fetchTxtRecords = void 0;\n// See example: https://github.com/statsig-io/private-js-client-monorepo/pull/340\nconst FEATURE_ASSETS_DNS_QUERY = new Uint8Array([\n    0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,\n    0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73,\n    0x03, 0x6f, 0x72, 0x67, 0x00, 0x00, 0x10, 0x00, 0x01,\n]);\nconst DNS_QUERY_ENDPOINT = 'https://cloudflare-dns.com/dns-query';\nconst DOMAIN_CHARS = [\n    'i', // initialize\n    'e', // events\n    'd', // dcs\n];\nconst MAX_START_LOOKUP = 200;\nfunction _fetchTxtRecords(networkFunc) {\n    return __awaiter(this, void 0, void 0, function* () {\n        const response = yield networkFunc(DNS_QUERY_ENDPOINT, {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application/dns-message',\n                Accept: 'application/dns-message',\n            },\n            body: FEATURE_ASSETS_DNS_QUERY,\n        });\n        if (!response.ok) {\n            const err = new Error('Failed to fetch TXT records from DNS');\n            err.name = 'DnsTxtFetchError';\n            throw err;\n        }\n        const data = yield response.arrayBuffer();\n        const bytes = new Uint8Array(data);\n        return _parseDnsResponse(bytes);\n    });\n}\nexports._fetchTxtRecords = _fetchTxtRecords;\nfunction _parseDnsResponse(input) {\n    // loop until we find the first valid domain char. One of [i=, e=, d=]\n    const start = input.findIndex((byte, index) => index < MAX_START_LOOKUP &&\n        String.fromCharCode(byte) === '=' &&\n        DOMAIN_CHARS.includes(String.fromCharCode(input[index - 1])));\n    if (start === -1) {\n        const err = new Error('Failed to parse TXT records from DNS');\n        err.name = 'DnsTxtParseError';\n        throw err;\n    }\n    // decode the remaining bytes as a string\n    let result = '';\n    for (let i = start - 1; i < input.length; i++) {\n        result += String.fromCharCode(input[i]);\n    }\n    return result.split(',');\n}\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._isDomainFailure = exports.NetworkFallbackResolver = void 0;\nconst DnsTxtQuery_1 = require(\"./DnsTxtQuery\");\nconst Hashing_1 = require(\"./Hashing\");\nconst Log_1 = require(\"./Log\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst DEFAULT_TTL_MS = 7 * 24 * 60 * 60 * 1000; // 7 days\nconst COOLDOWN_TIME_MS = 4 * 60 * 60 * 1000; // 4 hours\nclass NetworkFallbackResolver {\n    constructor(options) {\n        var _a;\n        this._fallbackInfo = null;\n        this._errorBoundary = null;\n        this._dnsQueryCooldowns = {};\n        this._networkOverrideFunc = (_a = options.networkConfig) === null || _a === void 0 ? void 0 : _a.networkOverrideFunc;\n    }\n    setErrorBoundary(errorBoundary) {\n        this._errorBoundary = errorBoundary;\n    }\n    tryBumpExpiryTime(sdkKey, urlConfig) {\n        var _a;\n        const info = (_a = this._fallbackInfo) === null || _a === void 0 ? void 0 : _a[urlConfig.endpoint];\n        if (!info) {\n            return;\n        }\n        info.expiryTime = Date.now() + DEFAULT_TTL_MS;\n        _tryWriteFallbackInfoToCache(sdkKey, Object.assign(Object.assign({}, this._fallbackInfo), { [urlConfig.endpoint]: info }));\n    }\n    getActiveFallbackUrl(sdkKey, urlConfig) {\n        var _a, _b;\n        if (urlConfig.customUrl != null && urlConfig.fallbackUrls != null) {\n            return null;\n        }\n        let info = this._fallbackInfo;\n        if (info == null) {\n            info = (_a = _readFallbackInfoFromCache(sdkKey)) !== null && _a !== void 0 ? _a : {};\n            this._fallbackInfo = info;\n        }\n        const entry = info[urlConfig.endpoint];\n        if (!entry ||\n            Date.now() > ((_b = entry.expiryTime) !== null && _b !== void 0 ? _b : 0) ||\n            urlConfig.getChecksum() !== entry.urlConfigChecksum) {\n            delete info[urlConfig.endpoint];\n            this._fallbackInfo = info;\n            _tryWriteFallbackInfoToCache(sdkKey, this._fallbackInfo);\n            return null;\n        }\n        if (entry.url) {\n            return entry.url;\n        }\n        return null;\n    }\n    tryFetchUpdatedFallbackInfo(sdkKey, urlConfig, errorMessage, timedOut) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b;\n            try {\n                if (!_isDomainFailure(errorMessage, timedOut)) {\n                    return false;\n                }\n                const canUseNetworkFallbacks = urlConfig.customUrl == null && urlConfig.fallbackUrls == null;\n                const urls = canUseNetworkFallbacks\n                    ? yield this._tryFetchFallbackUrlsFromNetwork(urlConfig)\n                    : urlConfig.fallbackUrls;\n                const newUrl = this._pickNewFallbackUrl((_a = this._fallbackInfo) === null || _a === void 0 ? void 0 : _a[urlConfig.endpoint], urls);\n                if (!newUrl) {\n                    return false;\n                }\n                this._updateFallbackInfoWithNewUrl(sdkKey, urlConfig, newUrl);\n                return true;\n            }\n            catch (error) {\n                (_b = this._errorBoundary) === null || _b === void 0 ? void 0 : _b.logError('tryFetchUpdatedFallbackInfo', error);\n                return false;\n            }\n        });\n    }\n    _updateFallbackInfoWithNewUrl(sdkKey, urlConfig, newUrl) {\n        var _a, _b, _c;\n        const newFallbackInfo = {\n            urlConfigChecksum: urlConfig.getChecksum(),\n            url: newUrl,\n            expiryTime: Date.now() + DEFAULT_TTL_MS,\n            previous: [],\n        };\n        const endpoint = urlConfig.endpoint;\n        const previousInfo = (_a = this._fallbackInfo) === null || _a === void 0 ? void 0 : _a[endpoint];\n        if (previousInfo) {\n            newFallbackInfo.previous.push(...previousInfo.previous);\n        }\n        if (newFallbackInfo.previous.length > 10) {\n            newFallbackInfo.previous = [];\n        }\n        const previousUrl = (_c = (_b = this._fallbackInfo) === null || _b === void 0 ? void 0 : _b[endpoint]) === null || _c === void 0 ? void 0 : _c.url;\n        if (previousUrl != null) {\n            newFallbackInfo.previous.push(previousUrl);\n        }\n        this._fallbackInfo = Object.assign(Object.assign({}, this._fallbackInfo), { [endpoint]: newFallbackInfo });\n        _tryWriteFallbackInfoToCache(sdkKey, this._fallbackInfo);\n    }\n    _tryFetchFallbackUrlsFromNetwork(urlConfig) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const cooldown = this._dnsQueryCooldowns[urlConfig.endpoint];\n            if (cooldown && Date.now() < cooldown) {\n                return null;\n            }\n            this._dnsQueryCooldowns[urlConfig.endpoint] = Date.now() + COOLDOWN_TIME_MS;\n            const result = [];\n            const records = yield (0, DnsTxtQuery_1._fetchTxtRecords)((_a = this._networkOverrideFunc) !== null && _a !== void 0 ? _a : fetch);\n            const path = _extractPathFromUrl(urlConfig.defaultUrl);\n            for (const record of records) {\n                if (!record.startsWith(urlConfig.endpointDnsKey + '=')) {\n                    continue;\n                }\n                const parts = record.split('=');\n                if (parts.length > 1) {\n                    let baseUrl = parts[1];\n                    if (baseUrl.endsWith('/')) {\n                        baseUrl = baseUrl.slice(0, -1);\n                    }\n                    result.push(`https://${baseUrl}${path}`);\n                }\n            }\n            return result;\n        });\n    }\n    _pickNewFallbackUrl(currentFallbackInfo, urls) {\n        var _a;\n        if (urls == null) {\n            return null;\n        }\n        const previouslyUsed = new Set((_a = currentFallbackInfo === null || currentFallbackInfo === void 0 ? void 0 : currentFallbackInfo.previous) !== null && _a !== void 0 ? _a : []);\n        const currentFallbackUrl = currentFallbackInfo === null || currentFallbackInfo === void 0 ? void 0 : currentFallbackInfo.url;\n        let found = null;\n        for (const loopUrl of urls) {\n            const url = loopUrl.endsWith('/') ? loopUrl.slice(0, -1) : loopUrl;\n            if (!previouslyUsed.has(loopUrl) && url !== currentFallbackUrl) {\n                found = url;\n                break;\n            }\n        }\n        return found;\n    }\n}\nexports.NetworkFallbackResolver = NetworkFallbackResolver;\nfunction _isDomainFailure(errorMsg, timedOut) {\n    var _a;\n    const lowerErrorMsg = (_a = errorMsg === null || errorMsg === void 0 ? void 0 : errorMsg.toLowerCase()) !== null && _a !== void 0 ? _a : '';\n    return (timedOut ||\n        lowerErrorMsg.includes('uncaught exception') ||\n        lowerErrorMsg.includes('failed to fetch') ||\n        lowerErrorMsg.includes('networkerror when attempting to fetch resource'));\n}\nexports._isDomainFailure = _isDomainFailure;\nfunction _getFallbackInfoStorageKey(sdkKey) {\n    return `statsig.network_fallback.${(0, Hashing_1._DJB2)(sdkKey)}`;\n}\nfunction _tryWriteFallbackInfoToCache(sdkKey, info) {\n    const hashKey = _getFallbackInfoStorageKey(sdkKey);\n    if (!info || Object.keys(info).length === 0) {\n        StorageProvider_1.Storage.removeItem(hashKey);\n        return;\n    }\n    StorageProvider_1.Storage.setItem(hashKey, JSON.stringify(info));\n}\nfunction _readFallbackInfoFromCache(sdkKey) {\n    const hashKey = _getFallbackInfoStorageKey(sdkKey);\n    const data = StorageProvider_1.Storage.getItem(hashKey);\n    if (!data) {\n        return null;\n    }\n    try {\n        return JSON.parse(data);\n    }\n    catch (_a) {\n        Log_1.Log.error('Failed to parse FallbackInfo');\n        return null;\n    }\n}\nfunction _extractPathFromUrl(urlString) {\n    try {\n        const url = new URL(urlString);\n        return url.pathname;\n    }\n    catch (error) {\n        return null;\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SDKFlags = void 0;\nconst FLAGMAP = {};\nexports.SDKFlags = {\n    setFlags: (sdkKey, flags) => {\n        FLAGMAP[sdkKey] = flags;\n    },\n    get: (sdkKey, flagKey) => {\n        var _a, _b;\n        return (_b = (_a = FLAGMAP[sdkKey]) === null || _a === void 0 ? void 0 : _a[flagKey]) !== null && _b !== void 0 ? _b : false;\n    },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigSession = exports.SessionID = void 0;\nconst __StatsigGlobal_1 = require(\"./$_StatsigGlobal\");\nconst CacheKey_1 = require(\"./CacheKey\");\nconst Log_1 = require(\"./Log\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst UUID_1 = require(\"./UUID\");\nconst MAX_SESSION_IDLE_TIME = 30 * 60 * 1000; // 30 minutes\nconst MAX_SESSION_AGE = 4 * 60 * 60 * 1000; // 4 hours\nconst PROMISE_MAP = {};\nexports.SessionID = {\n    get: (sdkKey) => {\n        return exports.StatsigSession.get(sdkKey).data.sessionID;\n    },\n};\nexports.StatsigSession = {\n    get: (sdkKey) => {\n        if (PROMISE_MAP[sdkKey] == null) {\n            PROMISE_MAP[sdkKey] = _loadSession(sdkKey);\n        }\n        const session = PROMISE_MAP[sdkKey];\n        return _bumpSession(session);\n    },\n    overrideInitialSessionID: (override, sdkKey) => {\n        PROMISE_MAP[sdkKey] = _overrideSessionId(override, sdkKey);\n    },\n};\nfunction _loadSession(sdkKey) {\n    let data = _loadFromStorage(sdkKey);\n    const now = Date.now();\n    if (!data) {\n        data = {\n            sessionID: (0, UUID_1.getUUID)(),\n            startTime: now,\n            lastUpdate: now,\n        };\n    }\n    return {\n        data,\n        sdkKey,\n    };\n}\nfunction _overrideSessionId(override, sdkKey) {\n    const now = Date.now();\n    return {\n        data: {\n            sessionID: override,\n            startTime: now,\n            lastUpdate: now,\n        },\n        sdkKey,\n    };\n}\nfunction _bumpSession(session) {\n    const now = Date.now();\n    const data = session.data;\n    const sdkKey = session.sdkKey;\n    if (_isIdle(data) || _hasRunTooLong(data)) {\n        data.sessionID = (0, UUID_1.getUUID)();\n        data.startTime = now;\n        const client = __STATSIG__ === null || __STATSIG__ === void 0 ? void 0 : __STATSIG__.instance(sdkKey);\n        if (client) {\n            client.$emt({ name: 'session_expired' });\n        }\n    }\n    data.lastUpdate = now;\n    _persistToStorage(data, session.sdkKey);\n    clearTimeout(session.idleTimeoutID);\n    clearTimeout(session.ageTimeoutID);\n    const lifetime = now - data.startTime;\n    session.idleTimeoutID = _createSessionTimeout(sdkKey, MAX_SESSION_IDLE_TIME);\n    session.ageTimeoutID = _createSessionTimeout(sdkKey, MAX_SESSION_AGE - lifetime);\n    return session;\n}\nfunction _createSessionTimeout(sdkKey, duration) {\n    return setTimeout(() => {\n        var _a;\n        const client = (_a = (0, __StatsigGlobal_1._getStatsigGlobal)()) === null || _a === void 0 ? void 0 : _a.instance(sdkKey);\n        if (client) {\n            client.$emt({ name: 'session_expired' });\n        }\n    }, duration);\n}\nfunction _isIdle({ lastUpdate }) {\n    return Date.now() - lastUpdate > MAX_SESSION_IDLE_TIME;\n}\nfunction _hasRunTooLong({ startTime }) {\n    return Date.now() - startTime > MAX_SESSION_AGE;\n}\nfunction _getSessionIDStorageKey(sdkKey) {\n    return `statsig.session_id.${(0, CacheKey_1._getStorageKey)(sdkKey)}`;\n}\nfunction _persistToStorage(session, sdkKey) {\n    const storageKey = _getSessionIDStorageKey(sdkKey);\n    try {\n        (0, StorageProvider_1._setObjectInStorage)(storageKey, session);\n    }\n    catch (e) {\n        Log_1.Log.warn('Failed to save SessionID');\n    }\n}\nfunction _loadFromStorage(sdkKey) {\n    const storageKey = _getSessionIDStorageKey(sdkKey);\n    return (0, StorageProvider_1._getObjectFromStorage)(storageKey);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorTag = void 0;\nexports.ErrorTag = {\n    NetworkError: 'NetworkError',\n};\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NetworkCore = void 0;\nrequire(\"./$_StatsigGlobal\");\nconst __StatsigGlobal_1 = require(\"./$_StatsigGlobal\");\nconst Diagnostics_1 = require(\"./Diagnostics\");\nconst Log_1 = require(\"./Log\");\nconst NetworkConfig_1 = require(\"./NetworkConfig\");\nconst NetworkFallbackResolver_1 = require(\"./NetworkFallbackResolver\");\nconst SDKFlags_1 = require(\"./SDKFlags\");\nconst SDKType_1 = require(\"./SDKType\");\nconst SafeJs_1 = require(\"./SafeJs\");\nconst SessionID_1 = require(\"./SessionID\");\nconst StableID_1 = require(\"./StableID\");\nconst StatsigClientEventEmitter_1 = require(\"./StatsigClientEventEmitter\");\nconst StatsigMetadata_1 = require(\"./StatsigMetadata\");\nconst StatsigOptionsCommon_1 = require(\"./StatsigOptionsCommon\");\nconst VisibilityObserving_1 = require(\"./VisibilityObserving\");\nconst DEFAULT_TIMEOUT_MS = 10000;\nconst BACKOFF_BASE_MS = 500;\nconst BACKOFF_MAX_MS = 30000;\nconst RATE_LIMIT_WINDOW_MS = 1000;\nconst RATE_LIMIT_MAX_REQ_COUNT = 50;\nconst LEAK_RATE = RATE_LIMIT_MAX_REQ_COUNT / RATE_LIMIT_WINDOW_MS;\nconst RETRYABLE_CODES = new Set([408, 500, 502, 503, 504, 522, 524, 599]);\nclass NetworkCore {\n    constructor(options, _emitter) {\n        this._emitter = _emitter;\n        this._errorBoundary = null;\n        this._timeout = DEFAULT_TIMEOUT_MS;\n        this._netConfig = {};\n        this._options = {};\n        this._leakyBucket = {};\n        this._lastUsedInitUrl = null;\n        if (options) {\n            this._options = options;\n        }\n        if (this._options.networkConfig) {\n            this._netConfig = this._options.networkConfig;\n        }\n        if (this._netConfig.networkTimeoutMs) {\n            this._timeout = this._netConfig.networkTimeoutMs;\n        }\n        this._fallbackResolver = new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options);\n        this.setLogEventCompressionMode(this._getLogEventCompressionMode(options));\n    }\n    setLogEventCompressionMode(mode) {\n        this._options.logEventCompressionMode = mode;\n    }\n    setErrorBoundary(errorBoundary) {\n        this._errorBoundary = errorBoundary;\n        this._errorBoundary.wrap(this);\n        this._errorBoundary.wrap(this._fallbackResolver);\n        this._fallbackResolver.setErrorBoundary(errorBoundary);\n    }\n    isBeaconSupported() {\n        return (typeof navigator !== 'undefined' &&\n            typeof navigator.sendBeacon === 'function');\n    }\n    getLastUsedInitUrlAndReset() {\n        const tempUrl = this._lastUsedInitUrl;\n        this._lastUsedInitUrl = null;\n        return tempUrl;\n    }\n    beacon(args) {\n        if (!_ensureValidSdkKey(args)) {\n            return false;\n        }\n        const argsInternal = this._getInternalRequestArgs('POST', args);\n        const url = this._getPopulatedURL(argsInternal);\n        const nav = navigator;\n        return nav.sendBeacon.bind(nav)(url, argsInternal.body);\n    }\n    post(args) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const argsInternal = this._getInternalRequestArgs('POST', args);\n            this._tryEncodeBody(argsInternal);\n            yield this._tryToCompressBody(argsInternal);\n            return this._sendRequest(argsInternal);\n        });\n    }\n    get(args) {\n        const argsInternal = this._getInternalRequestArgs('GET', args);\n        return this._sendRequest(argsInternal);\n    }\n    _sendRequest(args) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b, _c, _d;\n            if (!_ensureValidSdkKey(args)) {\n                return null;\n            }\n            if (this._netConfig.preventAllNetworkTraffic) {\n                return null;\n            }\n            const { method, body, retries, attempt } = args;\n            const endpoint = args.urlConfig.endpoint;\n            if (this._isRateLimited(endpoint)) {\n                Log_1.Log.warn(`Request to ${endpoint} was blocked because you are making requests too frequently.`);\n                return null;\n            }\n            const currentAttempt = attempt !== null && attempt !== void 0 ? attempt : 1;\n            let reqTimedOut = false;\n            const populatedUrl = this._getPopulatedURL(args);\n            let response = null;\n            const keepalive = (0, VisibilityObserving_1._isUnloading)();\n            try {\n                const config = {\n                    method,\n                    body,\n                    headers: Object.assign({}, args.headers),\n                    priority: args.priority,\n                    keepalive,\n                };\n                _tryMarkInitStart(args, currentAttempt);\n                const bucket = this._leakyBucket[endpoint];\n                if (bucket) {\n                    bucket.lastRequestTime = Date.now();\n                    this._leakyBucket[endpoint] = bucket;\n                }\n                const func = (_a = this._netConfig.networkOverrideFunc) !== null && _a !== void 0 ? _a : fetch;\n                let timeoutId;\n                response = yield Promise.race([\n                    func(populatedUrl, config).finally(() => clearTimeout(timeoutId)),\n                    new Promise((_, reject) => {\n                        timeoutId = setTimeout(() => {\n                            reqTimedOut = true;\n                            reject(new Error(`Timeout of ${this._timeout}ms expired.`));\n                        }, this._timeout);\n                    }),\n                ]);\n                if (!response.ok) {\n                    const text = yield response.text().catch(() => 'No Text');\n                    const err = new Error(`NetworkError: ${populatedUrl} ${text}`);\n                    err.name = 'NetworkError';\n                    throw err;\n                }\n                const text = yield response.text();\n                _tryMarkInitEnd(args, response, currentAttempt, text);\n                this._fallbackResolver.tryBumpExpiryTime(args.sdkKey, args.urlConfig);\n                return {\n                    body: text,\n                    code: response.status,\n                };\n            }\n            catch (error) {\n                const errorMessage = _getErrorMessage(error);\n                const timedOut = _didTimeout(errorMessage !== null && errorMessage !== void 0 ? errorMessage : '', reqTimedOut);\n                _tryMarkInitEnd(args, response, currentAttempt, '', error);\n                const fallbackUpdated = yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(args.sdkKey, args.urlConfig, errorMessage, timedOut);\n                if (fallbackUpdated) {\n                    args.fallbackUrl = this._fallbackResolver.getActiveFallbackUrl(args.sdkKey, args.urlConfig);\n                }\n                if (!retries ||\n                    currentAttempt > retries ||\n                    !RETRYABLE_CODES.has((_b = response === null || response === void 0 ? void 0 : response.status) !== null && _b !== void 0 ? _b : 500)) {\n                    (_c = this._emitter) === null || _c === void 0 ? void 0 : _c.call(this, {\n                        name: 'error',\n                        error,\n                        tag: StatsigClientEventEmitter_1.ErrorTag.NetworkError,\n                        requestArgs: args,\n                    });\n                    const formattedErrorMsg = `A networking error occurred during ${method} request to ${populatedUrl}.`;\n                    Log_1.Log.error(formattedErrorMsg, errorMessage, error);\n                    (_d = this._errorBoundary) === null || _d === void 0 ? void 0 : _d.attachErrorIfNoneExists(formattedErrorMsg);\n                    return null;\n                }\n                yield _exponentialBackoff(currentAttempt);\n                return this._sendRequest(Object.assign(Object.assign({}, args), { retries, attempt: currentAttempt + 1 }));\n            }\n        });\n    }\n    _getLogEventCompressionMode(options) {\n        // Handle backward compatibility for deprecated disableCompression flag\n        let compressionMode = options === null || options === void 0 ? void 0 : options.logEventCompressionMode;\n        if (!compressionMode && (options === null || options === void 0 ? void 0 : options.disableCompression) === true) {\n            compressionMode = StatsigOptionsCommon_1.LogEventCompressionMode.Disabled;\n        }\n        // Default to enabled if unset\n        if (!compressionMode) {\n            compressionMode = StatsigOptionsCommon_1.LogEventCompressionMode.Enabled;\n        }\n        return compressionMode;\n    }\n    _isRateLimited(endpoint) {\n        var _a;\n        const now = Date.now();\n        const bucket = (_a = this._leakyBucket[endpoint]) !== null && _a !== void 0 ? _a : {\n            count: 0,\n            lastRequestTime: now,\n        };\n        const elapsed = now - bucket.lastRequestTime;\n        const leakedRequests = Math.floor(elapsed * LEAK_RATE);\n        bucket.count = Math.max(0, bucket.count - leakedRequests);\n        if (bucket.count >= RATE_LIMIT_MAX_REQ_COUNT) {\n            return true;\n        }\n        bucket.count += 1;\n        bucket.lastRequestTime = now;\n        this._leakyBucket[endpoint] = bucket;\n        return false;\n    }\n    _getPopulatedURL(args) {\n        var _a;\n        const url = (_a = args.fallbackUrl) !== null && _a !== void 0 ? _a : args.urlConfig.getUrl();\n        if (args.urlConfig.endpoint === NetworkConfig_1.Endpoint._initialize ||\n            args.urlConfig.endpoint === NetworkConfig_1.Endpoint._download_config_specs) {\n            this._lastUsedInitUrl = url;\n        }\n        const params = Object.assign({ [NetworkConfig_1.NetworkParam.SdkKey]: args.sdkKey, [NetworkConfig_1.NetworkParam.SdkType]: SDKType_1.SDKType._get(args.sdkKey), [NetworkConfig_1.NetworkParam.SdkVersion]: StatsigMetadata_1.SDK_VERSION, [NetworkConfig_1.NetworkParam.Time]: String(Date.now()), [NetworkConfig_1.NetworkParam.SessionID]: SessionID_1.SessionID.get(args.sdkKey) }, args.params);\n        const query = Object.keys(params)\n            .map((key) => {\n            return `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`;\n        })\n            .join('&');\n        return `${url}${query ? `?${query}` : ''}`;\n    }\n    _tryEncodeBody(args) {\n        var _a;\n        const win = (0, SafeJs_1._getWindowSafe)();\n        const body = args.body;\n        if (!args.isStatsigEncodable ||\n            this._options.disableStatsigEncoding ||\n            typeof body !== 'string' ||\n            (0, __StatsigGlobal_1._getStatsigGlobalFlag)('no-encode') != null ||\n            !(win === null || win === void 0 ? void 0 : win.btoa)) {\n            return;\n        }\n        try {\n            args.body = win.btoa(body).split('').reverse().join('');\n            args.params = Object.assign(Object.assign({}, ((_a = args.params) !== null && _a !== void 0 ? _a : {})), { [NetworkConfig_1.NetworkParam.StatsigEncoded]: '1' });\n        }\n        catch (e) {\n            Log_1.Log.warn(`Request encoding failed for ${args.urlConfig.getUrl()}`, e);\n        }\n    }\n    _tryToCompressBody(args) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const body = args.body;\n            if (typeof body !== 'string' || !_allowCompression(args, this._options)) {\n                return;\n            }\n            try {\n                const bytes = new TextEncoder().encode(body);\n                const stream = new CompressionStream('gzip');\n                const writer = stream.writable.getWriter();\n                writer.write(bytes).catch(Log_1.Log.error);\n                writer.close().catch(Log_1.Log.error);\n                const reader = stream.readable.getReader();\n                const chunks = [];\n                let result;\n                // eslint-disable-next-line no-await-in-loop\n                while (!(result = yield reader.read()).done) {\n                    chunks.push(result.value);\n                }\n                const totalLength = chunks.reduce((acc, chunk) => acc + chunk.length, 0);\n                const combined = new Uint8Array(totalLength);\n                let offset = 0;\n                for (const chunk of chunks) {\n                    combined.set(chunk, offset);\n                    offset += chunk.length;\n                }\n                args.body = combined;\n                args.params = Object.assign(Object.assign({}, ((_a = args.params) !== null && _a !== void 0 ? _a : {})), { [NetworkConfig_1.NetworkParam.IsGzipped]: '1' });\n            }\n            catch (e) {\n                Log_1.Log.warn(`Request compression failed for ${args.urlConfig.getUrl()}`, e);\n            }\n        });\n    }\n    _getInternalRequestArgs(method, args) {\n        const fallbackUrl = this._fallbackResolver.getActiveFallbackUrl(args.sdkKey, args.urlConfig);\n        const result = Object.assign(Object.assign({}, args), { method,\n            fallbackUrl });\n        if ('data' in args) {\n            _populateRequestBody(result, args.data);\n        }\n        return result;\n    }\n}\nexports.NetworkCore = NetworkCore;\nconst _ensureValidSdkKey = (args) => {\n    if (!args.sdkKey) {\n        Log_1.Log.warn('Unable to make request without an SDK key');\n        return false;\n    }\n    return true;\n};\nconst _populateRequestBody = (args, data) => {\n    const { sdkKey, fallbackUrl } = args;\n    const stableID = StableID_1.StableID.get(sdkKey);\n    const sessionID = SessionID_1.SessionID.get(sdkKey);\n    const sdkType = SDKType_1.SDKType._get(sdkKey);\n    args.body = JSON.stringify(Object.assign(Object.assign({}, data), { statsigMetadata: Object.assign(Object.assign({}, StatsigMetadata_1.StatsigMetadataProvider.get()), { stableID,\n            sessionID,\n            sdkType,\n            fallbackUrl }) }));\n};\nfunction _allowCompression(args, options) {\n    if (!args.isCompressable) {\n        return false;\n    }\n    // Never compress if 'no-compress' is set globally or required APIs are unavailable\n    if ((0, __StatsigGlobal_1._getStatsigGlobalFlag)('no-compress') != null ||\n        typeof CompressionStream === 'undefined' ||\n        typeof TextEncoder === 'undefined') {\n        return false;\n    }\n    const isProxy = args.urlConfig.customUrl != null || args.urlConfig.fallbackUrls != null;\n    const flagEnabled = SDKFlags_1.SDKFlags.get(args.sdkKey, 'enable_log_event_compression') === true;\n    switch (options.logEventCompressionMode) {\n        case StatsigOptionsCommon_1.LogEventCompressionMode.Disabled:\n            return false;\n        case StatsigOptionsCommon_1.LogEventCompressionMode.Enabled:\n            // Only compress through proxy if flag is explicitly on\n            if (isProxy && !flagEnabled) {\n                return false;\n            }\n            return true;\n        case StatsigOptionsCommon_1.LogEventCompressionMode.Forced:\n            return true;\n        default:\n            return false;\n    }\n}\nfunction _getErrorMessage(error) {\n    if (typeof error === 'string') {\n        return error;\n    }\n    if (error instanceof Error) {\n        return `${error.name}: ${error.message}`;\n    }\n    return 'Unknown Error';\n}\nfunction _didTimeout(errorMsg, abortedByTimeout) {\n    const timeout = errorMsg.includes('Timeout'); // probably not needed but just in case\n    return timeout || abortedByTimeout;\n}\nfunction _tryMarkInitStart(args, attempt) {\n    if (args.urlConfig.endpoint !== NetworkConfig_1.Endpoint._initialize) {\n        return;\n    }\n    Diagnostics_1.Diagnostics._markInitNetworkReqStart(args.sdkKey, {\n        attempt,\n    });\n}\nfunction _tryMarkInitEnd(args, response, attempt, body, err) {\n    if (args.urlConfig.endpoint !== NetworkConfig_1.Endpoint._initialize) {\n        return;\n    }\n    Diagnostics_1.Diagnostics._markInitNetworkReqEnd(args.sdkKey, Diagnostics_1.Diagnostics._getDiagnosticsData(response, attempt, body, err));\n}\nfunction _exponentialBackoff(attempt) {\n    return __awaiter(this, void 0, void 0, function* () {\n        // 1*1*1000 1s\n        // 2*2*1000 4s\n        // 3*3*1000 9s\n        // 4*4*1000 16s\n        // 5*5*1000 25s\n        yield new Promise((r) => setTimeout(r, Math.min(BACKOFF_BASE_MS * (attempt * attempt), BACKOFF_MAX_MS)));\n    });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._fastApproxSizeOf = void 0;\nconst CURLY_AND_SQUARE_BRACKET_SIZE = 2; // [] for array, {} for object\nconst APPROX_ADDITIONAL_SIZE = 1; // additional size for comma and stuff\nconst _fastApproxSizeOf = (obj, max) => {\n    let size = 0;\n    const keys = Object.keys(obj);\n    for (let i = 0; i < keys.length; i++) {\n        const key = keys[i];\n        const value = obj[key];\n        size += key.length;\n        if (typeof value === 'object' && value !== null) {\n            size += (0, exports._fastApproxSizeOf)(value, max) + CURLY_AND_SQUARE_BRACKET_SIZE;\n        }\n        else {\n            size += String(value).length + APPROX_ADDITIONAL_SIZE;\n        }\n        if (size >= max) {\n            // exit early if we've exceeded the max\n            return size;\n        }\n    }\n    return size;\n};\nexports._fastApproxSizeOf = _fastApproxSizeOf;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigClientBase = void 0;\nrequire(\"./$_StatsigGlobal\");\nconst __StatsigGlobal_1 = require(\"./$_StatsigGlobal\");\nconst ErrorBoundary_1 = require(\"./ErrorBoundary\");\nconst EventLogger_1 = require(\"./EventLogger\");\nconst Log_1 = require(\"./Log\");\nconst MemoKey_1 = require(\"./MemoKey\");\nconst SafeJs_1 = require(\"./SafeJs\");\nconst SessionID_1 = require(\"./SessionID\");\nconst StableID_1 = require(\"./StableID\");\nconst StatsigOptionsCommon_1 = require(\"./StatsigOptionsCommon\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nconst MAX_MEMO_CACHE_SIZE = 3000;\nclass StatsigClientBase {\n    constructor(sdkKey, adapter, network, options) {\n        var _a, _b, _c, _d;\n        this.loadingStatus = 'Uninitialized';\n        this._initializePromise = null;\n        this._listeners = {};\n        const emitter = this.$emt.bind(this);\n        (options === null || options === void 0 ? void 0 : options.logLevel) != null && (Log_1.Log.level = options.logLevel);\n        (options === null || options === void 0 ? void 0 : options.disableStorage) && StorageProvider_1.Storage._setDisabled(true);\n        (options === null || options === void 0 ? void 0 : options.initialSessionID) &&\n            SessionID_1.StatsigSession.overrideInitialSessionID(options.initialSessionID, sdkKey);\n        (options === null || options === void 0 ? void 0 : options.storageProvider) && StorageProvider_1.Storage._setProvider(options.storageProvider);\n        (options === null || options === void 0 ? void 0 : options.enableCookies) &&\n            StableID_1.StableID._setCookiesEnabled(sdkKey, options.enableCookies);\n        (options === null || options === void 0 ? void 0 : options.disableStableID) && StableID_1.StableID._setDisabled(sdkKey, true);\n        this._sdkKey = sdkKey;\n        this._options = options !== null && options !== void 0 ? options : {};\n        this._memoCache = {};\n        this.overrideAdapter = (_a = options === null || options === void 0 ? void 0 : options.overrideAdapter) !== null && _a !== void 0 ? _a : null;\n        this._logger = new EventLogger_1.EventLogger(sdkKey, emitter, network, options);\n        this._errorBoundary = new ErrorBoundary_1.ErrorBoundary(sdkKey, options, emitter);\n        this._errorBoundary.wrap(this);\n        this._errorBoundary.wrap(adapter);\n        this._errorBoundary.wrap(this._logger);\n        network.setErrorBoundary(this._errorBoundary);\n        this.dataAdapter = adapter;\n        this.dataAdapter.attach(sdkKey, options, network);\n        this.storageProvider = StorageProvider_1.Storage;\n        (_d = (_c = (_b = this.overrideAdapter) === null || _b === void 0 ? void 0 : _b.loadFromStorage) === null || _c === void 0 ? void 0 : _c.call(_b)) === null || _d === void 0 ? void 0 : _d.catch((e) => this._errorBoundary.logError('OA::loadFromStorage', e));\n        this._primeReadyRipcord();\n        _assignGlobalInstance(sdkKey, this);\n    }\n    /**\n     * Updates runtime configuration options for the SDK, allowing toggling of certain behaviors such as logging and storage to comply with user preferences or regulations such as GDPR.\n     *\n     * @param {StatsigRuntimeMutableOptions} options - The configuration options that dictate the runtime behavior of the SDK.\n     */\n    updateRuntimeOptions(options) {\n        if (options.loggingEnabled) {\n            this._options.loggingEnabled = options.loggingEnabled;\n            this._logger.setLoggingEnabled(options.loggingEnabled);\n        }\n        else if (options.disableLogging != null) {\n            this._options.disableLogging = options.disableLogging;\n            this._logger.setLoggingEnabled(options.disableLogging ? 'disabled' : 'browser-only');\n        }\n        if (options.disableStorage != null) {\n            this._options.disableStorage = options.disableStorage;\n            StorageProvider_1.Storage._setDisabled(options.disableStorage);\n        }\n        if (options.enableCookies != null) {\n            this._options.enableCookies = options.enableCookies;\n            StableID_1.StableID._setCookiesEnabled(this._sdkKey, options.enableCookies);\n        }\n        if (options.logEventCompressionMode) {\n            this._logger.setLogEventCompressionMode(options.logEventCompressionMode);\n        }\n        else if (options.disableCompression) {\n            this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled);\n        }\n    }\n    /**\n     * Flushes any currently queued events.\n     */\n    flush() {\n        return this._logger.flush();\n    }\n    /**\n     * Gracefully shuts down the SDK, ensuring that all pending events are send before the SDK stops.\n     * This function emits a 'pre_shutdown' event and then waits for the logger to complete its shutdown process.\n     *\n     * @returns {Promise<void>} A promise that resolves when all shutdown procedures, including logging shutdown, have been completed.\n     */\n    shutdown() {\n        return __awaiter(this, void 0, void 0, function* () {\n            this.$emt({ name: 'pre_shutdown' });\n            this._setStatus('Uninitialized', null);\n            this._initializePromise = null;\n            yield this._logger.stop();\n        });\n    }\n    /**\n     * Subscribes a callback function to a specific {@link StatsigClientEvent} or all StatsigClientEvents if the wildcard '*' is used.\n     * Once subscribed, the listener callback will be invoked whenever the specified event is emitted.\n     *\n     * @param {StatsigClientEventName} event - The name of the event to subscribe to, or '*' to subscribe to all events.\n     * @param {StatsigClientEventCallback<T>} listener - The callback function to execute when the event occurs. The function receives event-specific data as its parameter.\n     * @see {@link off} for unsubscribing from events.\n     */\n    on(event, listener) {\n        if (!this._listeners[event]) {\n            this._listeners[event] = [];\n        }\n        this._listeners[event].push(listener);\n    }\n    /**\n     * Unsubscribes a previously registered callback function from a specific {@link StatsigClientEvent} or all StatsigClientEvents if the wildcard '*' is used.\n     *\n     * @param {StatsigClientEventName} event - The name of the event from which to unsubscribe, or '*' to unsubscribe from all events.\n     * @param {StatsigClientEventCallback<T>} listener - The callback function to remove from the event's notification list.\n     * @see {@link on} for subscribing to events.\n     */\n    off(event, listener) {\n        if (this._listeners[event]) {\n            const index = this._listeners[event].indexOf(listener);\n            if (index !== -1) {\n                this._listeners[event].splice(index, 1);\n            }\n        }\n    }\n    $on(event, listener) {\n        listener.__isInternal = true;\n        this.on(event, listener);\n    }\n    $emt(event) {\n        var _a;\n        const barrier = (listener) => {\n            try {\n                listener(event);\n            }\n            catch (error) {\n                if (listener.__isInternal === true) {\n                    this._errorBoundary.logError(`__emit:${event.name}`, error);\n                    return;\n                }\n                Log_1.Log.error(`An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.`, event);\n            }\n        };\n        if (this._listeners[event.name]) {\n            this._listeners[event.name].forEach((l) => barrier(l));\n        }\n        (_a = this._listeners['*']) === null || _a === void 0 ? void 0 : _a.forEach(barrier);\n    }\n    _setStatus(newStatus, values) {\n        this.loadingStatus = newStatus;\n        this._memoCache = {};\n        this.$emt({ name: 'values_updated', status: newStatus, values });\n    }\n    _enqueueExposure(name, exposure, options) {\n        if ((options === null || options === void 0 ? void 0 : options.disableExposureLog) === true) {\n            this._logger.incrementNonExposureCount(name);\n            return;\n        }\n        this._logger.enqueue(exposure);\n    }\n    _memoize(prefix, fn) {\n        return (name, options) => {\n            if (this._options.disableEvaluationMemoization) {\n                return fn(name, options);\n            }\n            const memoKey = (0, MemoKey_1.createMemoKey)(prefix, name, options);\n            if (!memoKey) {\n                return fn(name, options);\n            }\n            if (!(memoKey in this._memoCache)) {\n                if (Object.keys(this._memoCache).length >= MAX_MEMO_CACHE_SIZE) {\n                    this._memoCache = {};\n                }\n                this._memoCache[memoKey] = fn(name, options);\n            }\n            return this._memoCache[memoKey];\n        };\n    }\n}\nexports.StatsigClientBase = StatsigClientBase;\nfunction _assignGlobalInstance(sdkKey, client) {\n    var _a;\n    if ((0, SafeJs_1._isServerEnv)()) {\n        return;\n    }\n    const statsigGlobal = (0, __StatsigGlobal_1._getStatsigGlobal)();\n    const instances = (_a = statsigGlobal.instances) !== null && _a !== void 0 ? _a : {};\n    const inst = client;\n    if (instances[sdkKey] != null) {\n        Log_1.Log.warn('Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.');\n    }\n    instances[sdkKey] = inst;\n    if (!statsigGlobal.firstInstance) {\n        statsigGlobal.firstInstance = inst;\n    }\n    statsigGlobal.instances = instances;\n    __STATSIG__ = statsigGlobal;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataAdapterCachePrefix = void 0;\nexports.DataAdapterCachePrefix = 'statsig.cached';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._makeTypedGet = exports._mergeOverride = exports._makeLayer = exports._makeExperiment = exports._makeDynamicConfig = exports._makeFeatureGate = void 0;\nconst Log_1 = require(\"./Log\");\nconst TypingUtils_1 = require(\"./TypingUtils\");\nfunction _makeEvaluation(name, details, evaluation, value) {\n    var _a;\n    return {\n        name,\n        details,\n        ruleID: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.rule_id) !== null && _a !== void 0 ? _a : '',\n        __evaluation: evaluation,\n        value,\n    };\n}\nfunction _makeFeatureGate(name, details, evaluation) {\n    var _a;\n    return Object.assign(Object.assign({}, _makeEvaluation(name, details, evaluation, (evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) === true)), { idType: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.id_type) !== null && _a !== void 0 ? _a : null });\n}\nexports._makeFeatureGate = _makeFeatureGate;\nfunction _makeDynamicConfig(name, details, evaluation) {\n    var _a, _b;\n    const value = (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) !== null && _a !== void 0 ? _a : {};\n    return Object.assign(Object.assign({}, _makeEvaluation(name, details, evaluation, value)), { idType: (_b = evaluation === null || evaluation === void 0 ? void 0 : evaluation.id_type) !== null && _b !== void 0 ? _b : null, get: _makeTypedGet(name, evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) });\n}\nexports._makeDynamicConfig = _makeDynamicConfig;\nfunction _makeExperiment(name, details, evaluation) {\n    var _a;\n    const result = _makeDynamicConfig(name, details, evaluation);\n    return Object.assign(Object.assign({}, result), { groupName: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.group_name) !== null && _a !== void 0 ? _a : null });\n}\nexports._makeExperiment = _makeExperiment;\nfunction _makeLayer(name, details, evaluation, exposeFunc) {\n    var _a, _b;\n    return Object.assign(Object.assign({}, _makeEvaluation(name, details, evaluation, undefined)), { get: _makeTypedGet(name, evaluation === null || evaluation === void 0 ? void 0 : evaluation.value, exposeFunc), groupName: (_a = evaluation === null || evaluation === void 0 ? void 0 : evaluation.group_name) !== null && _a !== void 0 ? _a : null, __value: (_b = evaluation === null || evaluation === void 0 ? void 0 : evaluation.value) !== null && _b !== void 0 ? _b : {} });\n}\nexports._makeLayer = _makeLayer;\nfunction _mergeOverride(original, overridden, value, exposeFunc) {\n    return Object.assign(Object.assign(Object.assign({}, original), overridden), { get: _makeTypedGet(original.name, value, exposeFunc) });\n}\nexports._mergeOverride = _mergeOverride;\nfunction _makeTypedGet(name, value, exposeFunc) {\n    return (param, fallback) => {\n        var _a;\n        const found = (_a = value === null || value === void 0 ? void 0 : value[param]) !== null && _a !== void 0 ? _a : null;\n        if (found == null) {\n            return (fallback !== null && fallback !== void 0 ? fallback : null);\n        }\n        if (fallback != null && !(0, TypingUtils_1._isTypeMatch)(found, fallback)) {\n            Log_1.Log.warn(`Parameter type mismatch. '${name}.${param}' was found to be type '${typeof found}' but fallback/return type is '${typeof fallback}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`);\n            return (fallback !== null && fallback !== void 0 ? fallback : null);\n        }\n        exposeFunc === null || exposeFunc === void 0 ? void 0 : exposeFunc(param);\n        return found;\n    };\n}\nexports._makeTypedGet = _makeTypedGet;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UPDATE_DETAIL_ERROR_MESSAGES = exports.createUpdateDetails = void 0;\nconst createUpdateDetails = (success, source, initDuration, error, sourceUrl, warnings) => {\n    return {\n        duration: initDuration,\n        source,\n        success,\n        error,\n        sourceUrl,\n        warnings,\n    };\n};\nexports.createUpdateDetails = createUpdateDetails;\nexports.UPDATE_DETAIL_ERROR_MESSAGES = {\n    NO_NETWORK_DATA: 'No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error.',\n};\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Storage = exports.Log = exports.EventLogger = exports.Diagnostics = void 0;\n/** Statsig Global should go first */\nrequire(\"./$_StatsigGlobal\");\nconst __StatsigGlobal_1 = require(\"./$_StatsigGlobal\");\nconst Diagnostics_1 = require(\"./Diagnostics\");\nObject.defineProperty(exports, \"Diagnostics\", { enumerable: true, get: function () { return Diagnostics_1.Diagnostics; } });\nconst EventLogger_1 = require(\"./EventLogger\");\nObject.defineProperty(exports, \"EventLogger\", { enumerable: true, get: function () { return EventLogger_1.EventLogger; } });\nconst Log_1 = require(\"./Log\");\nObject.defineProperty(exports, \"Log\", { enumerable: true, get: function () { return Log_1.Log; } });\nconst StatsigMetadata_1 = require(\"./StatsigMetadata\");\nconst StorageProvider_1 = require(\"./StorageProvider\");\nObject.defineProperty(exports, \"Storage\", { enumerable: true, get: function () { return StorageProvider_1.Storage; } });\n__exportStar(require(\"./$_StatsigGlobal\"), exports);\n__exportStar(require(\"./CacheKey\"), exports);\n__exportStar(require(\"./ClientInterfaces\"), exports);\n__exportStar(require(\"./DataAdapterCore\"), exports);\n__exportStar(require(\"./Diagnostics\"), exports);\n__exportStar(require(\"./DownloadConfigSpecsResponse\"), exports);\n__exportStar(require(\"./ErrorBoundary\"), exports);\n__exportStar(require(\"./EvaluationOptions\"), exports);\n__exportStar(require(\"./EvaluationTypes\"), exports);\n__exportStar(require(\"./Hashing\"), exports);\n__exportStar(require(\"./InitializeResponse\"), exports);\n__exportStar(require(\"./Log\"), exports);\n__exportStar(require(\"./MemoKey\"), exports);\n__exportStar(require(\"./NetworkConfig\"), exports);\n__exportStar(require(\"./NetworkCore\"), exports);\n__exportStar(require(\"./OverrideAdapter\"), exports);\n__exportStar(require(\"./ParamStoreTypes\"), exports);\n__exportStar(require(\"./SafeJs\"), exports);\n__exportStar(require(\"./SDKType\"), exports);\n__exportStar(require(\"./SessionID\"), exports);\n__exportStar(require(\"./SizeOf\"), exports);\n__exportStar(require(\"./StableID\"), exports);\n__exportStar(require(\"./StatsigClientBase\"), exports);\n__exportStar(require(\"./StatsigClientEventEmitter\"), exports);\n__exportStar(require(\"./StatsigDataAdapter\"), exports);\n__exportStar(require(\"./StatsigEvent\"), exports);\n__exportStar(require(\"./StatsigMetadata\"), exports);\n__exportStar(require(\"./StatsigOptionsCommon\"), exports);\n__exportStar(require(\"./StatsigPlugin\"), exports);\n__exportStar(require(\"./StatsigTypeFactories\"), exports);\n__exportStar(require(\"./StatsigTypes\"), exports);\n__exportStar(require(\"./StatsigUser\"), exports);\n__exportStar(require(\"./StorageProvider\"), exports);\n__exportStar(require(\"./TypedJsonParse\"), exports);\n__exportStar(require(\"./TypingUtils\"), exports);\n__exportStar(require(\"./UrlConfiguration\"), exports);\n__exportStar(require(\"./UUID\"), exports);\n__exportStar(require(\"./VisibilityObserving\"), exports);\n__exportStar(require(\"./StatsigUpdateDetails\"), exports);\n__exportStar(require(\"./SDKFlags\"), exports);\nObject.assign((0, __StatsigGlobal_1._getStatsigGlobal)(), { Log: Log_1.Log, SDK_VERSION: StatsigMetadata_1.SDK_VERSION });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isNoopClient = exports.NoopEvaluationsClient = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst noopInitializeDetails = {\n    success: false,\n    error: Error('NoClient'),\n    duration: 0,\n    source: 'Uninitialized',\n    sourceUrl: null,\n};\nconst _noop = () => {\n    // noop\n};\nconst _noopWithInitializeDetails = () => noopInitializeDetails;\nconst _noopAsync = () => Promise.resolve();\nconst _noopAsyncWithInitializeDetails = () => Promise.resolve(noopInitializeDetails);\nconst NOOP_DETAILS = { reason: 'Error:NoClient' };\nconst _defaultEvaluation = (type) => {\n    return (...args) => {\n        const name = typeof args[0] === 'string' ? args[0] : args[1];\n        switch (type) {\n            case 'gate':\n                return (0, client_core_1._makeFeatureGate)(name, NOOP_DETAILS, null);\n            case 'config':\n                return (0, client_core_1._makeDynamicConfig)(name, NOOP_DETAILS, null);\n            case 'layer':\n                return (0, client_core_1._makeLayer)(name, NOOP_DETAILS, null);\n            case 'param_store':\n                return { name };\n        }\n    };\n};\nconst _noopDataAdapter = {\n    attach: _noop,\n    getDataSync: () => null,\n    getDataAsync: () => Promise.resolve(null),\n    setData: _noop,\n    setDataLegacy: _noop,\n    prefetchData: _noopAsync,\n};\nconst context = {\n    sdkKey: '',\n    options: {},\n    values: null,\n    user: { userID: '' },\n    errorBoundary: {},\n    session: {\n        data: { sessionID: '', startTime: 0, lastUpdate: 0 },\n        sdkKey: '',\n    },\n    stableID: '',\n    storageProvider: client_core_1.Storage,\n    sdkInstanceID: '',\n};\nconst _client = {\n    isNoop: true,\n    loadingStatus: 'Uninitialized',\n    initializeSync: _noopWithInitializeDetails,\n    initializeAsync: _noopAsyncWithInitializeDetails,\n    shutdown: _noopAsync,\n    flush: _noopAsync,\n    updateRuntimeOptions: _noop,\n    updateUserSync: _noopWithInitializeDetails,\n    updateUserAsync: _noopAsyncWithInitializeDetails,\n    getContext: () => (Object.assign({}, context)),\n    checkGate: () => false,\n    getFeatureGate: _defaultEvaluation('gate'),\n    getDynamicConfig: _defaultEvaluation('config'),\n    getExperiment: _defaultEvaluation('config'),\n    getLayer: _defaultEvaluation('layer'),\n    getParameterStore: _defaultEvaluation('param_store'),\n    logEvent: _noop,\n    on: _noop,\n    off: _noop,\n    $on: _noop,\n    $emt: _noop,\n    dataAdapter: _noopDataAdapter,\n};\nexports.NoopEvaluationsClient = _client;\nfunction isNoopClient(client) {\n    return 'isNoop' in client;\n}\nexports.isNoopClient = isNoopClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nexports.default = (0, react_1.createContext)({\n    renderVersion: 0,\n    client: NoopEvaluationsClient_1.NoopEvaluationsClient,\n    isLoading: true,\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1InitializeContainer = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nclass V1InitializeContainer {\n    constructor(_values) {\n        this._values = _values;\n    }\n    getGate(name) {\n        return this._getResultFromLookup(this._values.feature_gates, name);\n    }\n    getConfig(name) {\n        return this._getResultFromLookup(this._values.dynamic_configs, name);\n    }\n    getLayer(name) {\n        return this._getResultFromLookup(this._values.layer_configs, name);\n    }\n    getParamStore(name) {\n        return this._getResultFromLookup(this._values.param_stores, name);\n    }\n    getConfigList() {\n        return Object.keys(this._values.dynamic_configs);\n    }\n    getExposureMapping() {\n        return this._values.exposures;\n    }\n    _getResultFromLookup(lookup, name) {\n        var _a, _b;\n        if (!lookup) {\n            return null;\n        }\n        return (_b = (_a = lookup[name]) !== null && _a !== void 0 ? _a : lookup[(0, client_core_1._DJB2)(name)]) !== null && _b !== void 0 ? _b : null;\n    }\n}\nexports.V1InitializeContainer = V1InitializeContainer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2InitializeContainer = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nclass V2InitializeContainer {\n    constructor(_values) {\n        this._values = _values;\n    }\n    getGate(name) {\n        var _a, _b, _c;\n        const evalV2 = this._getResultFromLookup(this._values.feature_gates, name);\n        if (!evalV2) {\n            return null;\n        }\n        return {\n            name: name,\n            value: evalV2.v === true,\n            rule_id: (_a = evalV2.r) !== null && _a !== void 0 ? _a : 'default',\n            secondary_exposures: (_b = evalV2.s) !== null && _b !== void 0 ? _b : [],\n            id_type: (_c = evalV2.i) !== null && _c !== void 0 ? _c : '',\n        };\n    }\n    getConfig(name) {\n        var _a, _b, _c, _d;\n        const evalV2 = this._getResultFromLookup(this._values.dynamic_configs, name);\n        if (!evalV2) {\n            return null;\n        }\n        return {\n            name: name,\n            value: (_a = this._values.values[evalV2.v]) !== null && _a !== void 0 ? _a : {},\n            rule_id: evalV2.r,\n            secondary_exposures: (_b = evalV2.s) !== null && _b !== void 0 ? _b : [],\n            id_type: (_c = evalV2.i) !== null && _c !== void 0 ? _c : '',\n            is_user_in_experiment: evalV2.ue === true ? true : false,\n            passed: evalV2.p === true,\n            group_name: (_d = evalV2.gn) !== null && _d !== void 0 ? _d : undefined,\n            is_experiment_active: evalV2.ea === true ? true : false,\n            group: evalV2.r,\n            is_device_based: evalV2.i === 'stableID',\n        };\n    }\n    getLayer(name) {\n        var _a, _b, _c, _d, _e, _f;\n        const evalV2 = this._getResultFromLookup(this._values.layer_configs, name);\n        if (!evalV2) {\n            return null;\n        }\n        return {\n            name: name,\n            value: (_a = this._values.values[evalV2.v]) !== null && _a !== void 0 ? _a : {},\n            rule_id: evalV2.r,\n            secondary_exposures: (_b = evalV2.s) !== null && _b !== void 0 ? _b : [],\n            is_user_in_experiment: evalV2.ue === true ? true : false,\n            group_name: (_c = evalV2.gn) !== null && _c !== void 0 ? _c : undefined,\n            is_experiment_active: evalV2.ea === true ? true : false,\n            group: evalV2.r,\n            is_device_based: evalV2.i === 'stableID',\n            allocated_experiment_name: (_d = evalV2.ae) !== null && _d !== void 0 ? _d : '',\n            explicit_parameters: (_e = evalV2.ep) !== null && _e !== void 0 ? _e : [],\n            undelegated_secondary_exposures: (_f = evalV2.us) !== null && _f !== void 0 ? _f : [],\n            parameter_rule_ids: evalV2.pr,\n        };\n    }\n    getParamStore(name) {\n        return this._getResultFromLookup(this._values.param_stores, name);\n    }\n    getConfigList() {\n        return Object.keys(this._values.dynamic_configs);\n    }\n    getExposureMapping() {\n        return this._values.exposures;\n    }\n    _getResultFromLookup(lookup, name) {\n        var _a, _b;\n        if (!lookup) {\n            return null;\n        }\n        return (_b = (_a = lookup[name]) !== null && _a !== void 0 ? _a : lookup[(0, client_core_1._DJB2)(name)]) !== null && _b !== void 0 ? _b : null;\n    }\n}\nexports.V2InitializeContainer = V2InitializeContainer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst client_core_1 = require(\"@statsig/client-core\");\nconst V1InitializeContainer_1 = require(\"./V1InitializeContainer\");\nconst V2InitializeContainer_1 = require(\"./V2InitializeContainer\");\nclass EvaluationStore {\n    constructor(_sdkKey) {\n        this._sdkKey = _sdkKey;\n        this._rawValues = null;\n        this._values = null;\n        this._source = 'Uninitialized';\n        this._lcut = 0;\n        this._receivedAt = 0;\n        this._bootstrapMetadata = null;\n        this._warnings = new Set();\n    }\n    reset() {\n        this._values = null;\n        this._rawValues = null;\n        this._source = 'Loading';\n        this._lcut = 0;\n        this._receivedAt = 0;\n        this._bootstrapMetadata = null;\n        this._warnings.clear();\n    }\n    finalize() {\n        if (this._values) {\n            return;\n        }\n        this._source = 'NoValues';\n    }\n    getValues() {\n        return this._rawValues\n            ? (0, client_core_1._typedJsonParse)(this._rawValues, 'has_updates', 'EvaluationStoreValues')\n            : null;\n    }\n    setValues(result, user) {\n        var _a, _b;\n        if (!result) {\n            return false;\n        }\n        const values = (0, client_core_1._typedJsonParse)(result.data, 'has_updates', 'EvaluationResponse');\n        if (values == null) {\n            return false;\n        }\n        this._source = result.source;\n        if ((values === null || values === void 0 ? void 0 : values.has_updates) !== true) {\n            return true;\n        }\n        const updatedLcut = (_a = values.time) !== null && _a !== void 0 ? _a : 0;\n        if (updatedLcut < this._lcut) {\n            return true;\n        }\n        this._rawValues = result.data;\n        this._lcut = values.time;\n        this._receivedAt = result.receivedAt;\n        if (values.response_format === 'init-v2') {\n            this._values = new V2InitializeContainer_1.V2InitializeContainer(values);\n        }\n        else {\n            this._values = new V1InitializeContainer_1.V1InitializeContainer(values);\n        }\n        this._bootstrapMetadata = this._extractBootstrapMetadata(result.source, values);\n        if (result.source && values.user) {\n            this._setWarningState(user, values);\n        }\n        client_core_1.SDKFlags.setFlags(this._sdkKey, (_b = values.sdk_flags) !== null && _b !== void 0 ? _b : {});\n        return true;\n    }\n    getWarnings() {\n        if (this._warnings.size === 0) {\n            return undefined;\n        }\n        return Array.from(this._warnings);\n    }\n    getGate(name) {\n        const res = this._values ? this._values.getGate(name) : null;\n        return this._getDetailedStoreResult(res);\n    }\n    getConfig(name) {\n        const res = this._values ? this._values.getConfig(name) : null;\n        return this._getDetailedStoreResult(res);\n    }\n    getConfigList() {\n        if (!this._values) {\n            return [];\n        }\n        return this._values.getConfigList();\n    }\n    getLayer(name) {\n        const res = this._values ? this._values.getLayer(name) : null;\n        return this._getDetailedStoreResult(res);\n    }\n    getParamStore(name) {\n        const res = this._values ? this._values.getParamStore(name) : null;\n        return this._getDetailedStoreResult(res);\n    }\n    getSource() {\n        return this._source;\n    }\n    getExposureMapping() {\n        var _a;\n        return (_a = this._values) === null || _a === void 0 ? void 0 : _a.getExposureMapping();\n    }\n    _extractBootstrapMetadata(source, values) {\n        if (source !== 'Bootstrap') {\n            return null;\n        }\n        const bootstrapMetadata = {};\n        if (values.user) {\n            bootstrapMetadata.user = values.user;\n        }\n        if (values.sdkInfo) {\n            bootstrapMetadata.generatorSDKInfo = values.sdkInfo;\n        }\n        bootstrapMetadata.lcut = values.time;\n        return bootstrapMetadata;\n    }\n    _getDetailedStoreResult(result) {\n        return {\n            result,\n            details: this._getDetails(result == null),\n        };\n    }\n    _setWarningState(user, values) {\n        var _a, _b;\n        const stableID = client_core_1.StableID.get(this._sdkKey);\n        if (((_a = user.customIDs) === null || _a === void 0 ? void 0 : _a.stableID) !== stableID && // don't throw if they're both undefined\n            (((_b = user.customIDs) === null || _b === void 0 ? void 0 : _b.stableID) || stableID)) {\n            this._warnings.add('StableIDMismatch');\n            return;\n        }\n        if ('user' in values) {\n            const bootstrapUser = values['user'];\n            const userForComparison = Object.assign(Object.assign({}, user), { analyticsOnlyMetadata: undefined, privateAttributes: undefined });\n            if ((0, client_core_1._getFullUserHash)(userForComparison) !== (0, client_core_1._getFullUserHash)(bootstrapUser)) {\n                this._warnings.add('PartialUserMatch');\n            }\n        }\n    }\n    getCurrentSourceDetails() {\n        if (this._source === 'Uninitialized' || this._source === 'NoValues') {\n            return { reason: this._source };\n        }\n        const sourceDetails = {\n            reason: this._source,\n            lcut: this._lcut,\n            receivedAt: this._receivedAt,\n        };\n        if (this._warnings.size > 0) {\n            sourceDetails.warnings = Array.from(this._warnings);\n        }\n        return sourceDetails;\n    }\n    _getDetails(isUnrecognized) {\n        var _a, _b;\n        const sourceDetails = this.getCurrentSourceDetails();\n        let reason = sourceDetails.reason;\n        const warnings = (_a = sourceDetails.warnings) !== null && _a !== void 0 ? _a : [];\n        if (this._source === 'Bootstrap' && warnings.length > 0) {\n            reason = reason + warnings[0];\n        }\n        if (reason !== 'Uninitialized' && reason !== 'NoValues') {\n            const subreason = isUnrecognized ? 'Unrecognized' : 'Recognized';\n            reason = `${reason}:${subreason}`;\n        }\n        const bootstrapMetadata = this._source === 'Bootstrap'\n            ? (_b = this._bootstrapMetadata) !== null && _b !== void 0 ? _b : undefined\n            : undefined;\n        if (bootstrapMetadata) {\n            sourceDetails.bootstrapMetadata = bootstrapMetadata;\n        }\n        return Object.assign(Object.assign({}, sourceDetails), { reason });\n    }\n}\nexports.default = EvaluationStore;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._resolveDeltasResponse = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst MAX_DELTAS_SORT_DEPTH = 2;\nfunction _resolveDeltasResponse(cache, deltasString) {\n    const deltas = (0, client_core_1._typedJsonParse)(deltasString, 'checksum', 'DeltasEvaluationResponse');\n    if (!deltas) {\n        return {\n            hadBadDeltaChecksum: true,\n        };\n    }\n    const merged = _mergeDeltasIntoCache(cache, deltas);\n    const resolved = _handleDeletedEntries(merged);\n    const actualChecksum = (0, client_core_1._DJB2Object)({\n        feature_gates: resolved.feature_gates,\n        dynamic_configs: resolved.dynamic_configs,\n        layer_configs: resolved.layer_configs,\n    }, MAX_DELTAS_SORT_DEPTH);\n    const isMatch = actualChecksum === deltas.checksumV2;\n    if (!isMatch) {\n        return {\n            hadBadDeltaChecksum: true,\n            badChecksum: actualChecksum,\n            badMergedConfigs: resolved,\n            badFullResponse: deltas.deltas_full_response,\n        };\n    }\n    return JSON.stringify(resolved);\n}\nexports._resolveDeltasResponse = _resolveDeltasResponse;\nfunction _mergeDeltasIntoCache(cache, deltas) {\n    return Object.assign(Object.assign(Object.assign({}, cache), deltas), { feature_gates: Object.assign(Object.assign({}, cache.feature_gates), deltas.feature_gates), layer_configs: Object.assign(Object.assign({}, cache.layer_configs), deltas.layer_configs), dynamic_configs: Object.assign(Object.assign({}, cache.dynamic_configs), deltas.dynamic_configs) });\n}\nfunction _handleDeletedEntries(deltas) {\n    const result = deltas;\n    _deleteEntriesInRecord(deltas.deleted_gates, result.feature_gates);\n    delete result.deleted_gates;\n    _deleteEntriesInRecord(deltas.deleted_configs, result.dynamic_configs);\n    delete result.deleted_configs;\n    _deleteEntriesInRecord(deltas.deleted_layers, result.layer_configs);\n    delete result.deleted_layers;\n    return result;\n}\nfunction _deleteEntriesInRecord(keys, values) {\n    keys === null || keys === void 0 ? void 0 : keys.forEach((key) => {\n        delete values[key];\n    });\n}\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst client_core_1 = require(\"@statsig/client-core\");\nconst EvaluationResponseDeltas_1 = require(\"./EvaluationResponseDeltas\");\nclass StatsigNetwork extends client_core_1.NetworkCore {\n    constructor(options, emitter) {\n        super(options, emitter);\n        const config = options === null || options === void 0 ? void 0 : options.networkConfig;\n        this._option = options;\n        this._initializeUrlConfig = new client_core_1.UrlConfiguration(client_core_1.Endpoint._initialize, config === null || config === void 0 ? void 0 : config.initializeUrl, config === null || config === void 0 ? void 0 : config.api, config === null || config === void 0 ? void 0 : config.initializeFallbackUrls);\n    }\n    fetchEvaluations(sdkKey, current, priority, user, isCacheValidFor204) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b, _c, _d, _e, _f;\n            const cache = current\n                ? (0, client_core_1._typedJsonParse)(current, 'has_updates', 'InitializeResponse')\n                : null;\n            let data = {\n                user,\n                hash: (_c = (_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.networkConfig) === null || _b === void 0 ? void 0 : _b.initializeHashAlgorithm) !== null && _c !== void 0 ? _c : 'djb2',\n                deltasResponseRequested: false,\n                full_checksum: null,\n            };\n            if (cache === null || cache === void 0 ? void 0 : cache.has_updates) {\n                const hasHashChanged = (cache === null || cache === void 0 ? void 0 : cache.hash_used) !==\n                    ((_f = (_e = (_d = this._option) === null || _d === void 0 ? void 0 : _d.networkConfig) === null || _e === void 0 ? void 0 : _e.initializeHashAlgorithm) !== null && _f !== void 0 ? _f : 'djb2');\n                data = Object.assign(Object.assign({}, data), { sinceTime: isCacheValidFor204 && !hasHashChanged ? cache.time : 0, previousDerivedFields: 'derived_fields' in cache && isCacheValidFor204\n                        ? cache.derived_fields\n                        : {}, deltasResponseRequested: true, full_checksum: cache.full_checksum, partialUserMatchSinceTime: !hasHashChanged ? cache.time : 0 });\n            }\n            return this._fetchEvaluations(sdkKey, cache, data, priority);\n        });\n    }\n    _fetchEvaluations(sdkKey, cache, data, priority) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a, _b;\n            const response = yield this.post({\n                sdkKey,\n                urlConfig: this._initializeUrlConfig,\n                data,\n                retries: 2,\n                isStatsigEncodable: true,\n                priority,\n            });\n            if ((response === null || response === void 0 ? void 0 : response.code) === 204) {\n                return '{\"has_updates\": false}';\n            }\n            if ((response === null || response === void 0 ? void 0 : response.code) !== 200) {\n                return (_a = response === null || response === void 0 ? void 0 : response.body) !== null && _a !== void 0 ? _a : null;\n            }\n            if ((cache === null || cache === void 0 ? void 0 : cache.has_updates) !== true ||\n                ((_b = response.body) === null || _b === void 0 ? void 0 : _b.includes('\"is_delta\":true')) !== true ||\n                data.deltasResponseRequested !== true) {\n                return response.body;\n            }\n            const result = (0, EvaluationResponseDeltas_1._resolveDeltasResponse)(cache, response.body);\n            if (typeof result === 'string') {\n                return result;\n            }\n            // retry without deltas\n            return this._fetchEvaluations(sdkKey, cache, Object.assign(Object.assign(Object.assign({}, data), result), { deltasResponseRequested: false }), priority);\n        });\n    }\n}\nexports.default = StatsigNetwork;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._makeParamStoreGetter = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NO_EXPOSURE_OPT = {\n    disableExposureLog: true,\n};\nfunction _shouldLogExposure(options) {\n    return options == null || options.disableExposureLog === false;\n}\nfunction _shouldReturnFallback(value, fallback) {\n    return fallback != null && !(0, client_core_1._isTypeMatch)(value, fallback);\n}\nfunction _getMappedStaticValue(param, _options) {\n    return param.value;\n}\nfunction _getMappedGateValue(client, param, options) {\n    const gate = client.getFeatureGate(param.gate_name, _shouldLogExposure(options) ? undefined : NO_EXPOSURE_OPT);\n    if (gate.value) {\n        return param.pass_value;\n    }\n    return param.fail_value;\n}\nfunction _getMappedDynamicConfigValue(client, param, fallback, options) {\n    const config = client.getDynamicConfig(param.config_name, _shouldLogExposure(options) ? undefined : NO_EXPOSURE_OPT);\n    const value = config.get(param.param_name);\n    if (_shouldReturnFallback(value, fallback)) {\n        return fallback;\n    }\n    return value;\n}\nfunction _getMappedExperimentValue(client, param, fallback, options) {\n    const experiment = client.getExperiment(param.experiment_name, _shouldLogExposure(options) ? undefined : NO_EXPOSURE_OPT);\n    const value = experiment.get(param.param_name);\n    if (_shouldReturnFallback(value, fallback)) {\n        return fallback;\n    }\n    return value;\n}\nfunction _getMappedLayerValue(client, param, fallback, options) {\n    const layer = client.getLayer(param.layer_name, _shouldLogExposure(options) ? undefined : NO_EXPOSURE_OPT);\n    const value = layer.get(param.param_name);\n    if (_shouldReturnFallback(value, fallback)) {\n        return fallback;\n    }\n    return value;\n}\nfunction _makeParamStoreGetter(client, config, options) {\n    return (paramName, fallback) => {\n        if (config == null) {\n            return fallback;\n        }\n        const param = config[paramName];\n        if (param == null ||\n            (fallback != null && (0, client_core_1._typeOf)(fallback) !== param.param_type)) {\n            return fallback;\n        }\n        switch (param.ref_type) {\n            case 'static':\n                return _getMappedStaticValue(param, options);\n            case 'gate':\n                return _getMappedGateValue(client, param, options);\n            case 'dynamic_config':\n                return _getMappedDynamicConfigValue(client, param, fallback, options);\n            case 'experiment':\n                return _getMappedExperimentValue(client, param, fallback, options);\n            case 'layer':\n                return _getMappedLayerValue(client, param, fallback, options);\n            default:\n                return fallback;\n        }\n    };\n}\nexports._makeParamStoreGetter = _makeParamStoreGetter;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigEvaluationsDataAdapter = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst Network_1 = require(\"./Network\");\nclass StatsigEvaluationsDataAdapter extends client_core_1.DataAdapterCore {\n    constructor() {\n        super('EvaluationsDataAdapter', 'evaluations');\n        this._network = null;\n        this._options = null;\n    }\n    attach(sdkKey, options, network) {\n        super.attach(sdkKey, options, network);\n        if (network !== null && network instanceof Network_1.default) {\n            this._network = network;\n        }\n        else {\n            this._network = new Network_1.default(options !== null && options !== void 0 ? options : {});\n        }\n    }\n    getDataAsync(current, user, options) {\n        return this._getDataAsyncImpl(current, (0, client_core_1._normalizeUser)(user, this._options), options);\n    }\n    prefetchData(user, options) {\n        return this._prefetchDataImpl(user, options);\n    }\n    setData(data) {\n        const values = (0, client_core_1._typedJsonParse)(data, 'has_updates', 'data');\n        if (values && 'user' in values) {\n            super.setData(data, values.user);\n        }\n        else {\n            client_core_1.Log.error('StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.');\n        }\n    }\n    setDataLegacy(data, user) {\n        super.setData(data, user);\n    }\n    _fetchFromNetwork(current, user, options, isCacheValidFor204) {\n        return __awaiter(this, void 0, void 0, function* () {\n            var _a;\n            const result = yield ((_a = this._network) === null || _a === void 0 ? void 0 : _a.fetchEvaluations(this._getSdkKey(), current, options === null || options === void 0 ? void 0 : options.priority, user, isCacheValidFor204));\n            return result !== null && result !== void 0 ? result : null;\n        });\n    }\n    _getCacheKey(user) {\n        var _a;\n        const key = (0, client_core_1._getStorageKey)(this._getSdkKey(), user, (_a = this._options) === null || _a === void 0 ? void 0 : _a.customUserCacheKeyFunc);\n        return `${client_core_1.DataAdapterCachePrefix}.${this._cacheSuffix}.${key}`;\n    }\n    _isCachedResultValidFor204(result, user) {\n        return (result.fullUserHash != null &&\n            result.fullUserHash === (0, client_core_1._getFullUserHash)(user));\n    }\n}\nexports.StatsigEvaluationsDataAdapter = StatsigEvaluationsDataAdapter;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst client_core_1 = require(\"@statsig/client-core\");\nconst EvaluationStore_1 = require(\"./EvaluationStore\");\nconst Network_1 = require(\"./Network\");\nconst ParamStoreGetterFactory_1 = require(\"./ParamStoreGetterFactory\");\nconst StatsigEvaluationsDataAdapter_1 = require(\"./StatsigEvaluationsDataAdapter\");\nclass StatsigClient extends client_core_1.StatsigClientBase {\n    /**\n     * Retrieves an instance of the StatsigClient based on the provided SDK key.\n     *  If no SDK key is provided, the method returns the most recently created instance of the StatsigClient.\n     *  The method ensures that each unique SDK key corresponds to a single instance of StatsigClient, effectively implementing a singleton pattern for each key.\n     *  If no instance exists for the given SDK key, a new StatsigClient instance will be created and returned.\n     *\n     * @param {string} [sdkKey] - Optional. The SDK key used to identify a specific instance of the StatsigClient. If omitted, the method returns the last created instance.\n     * @returns {StatsigClient} Returns the StatsigClient instance associated with the given SDK key, creating a new one if needed.\n     */\n    static instance(sdkKey) {\n        const instance = (0, client_core_1._getStatsigGlobal)().instance(sdkKey);\n        if (instance instanceof StatsigClient) {\n            return instance;\n        }\n        client_core_1.Log.warn((0, client_core_1._isServerEnv)()\n            ? 'StatsigClient.instance is not supported in server environments'\n            : 'Unable to find StatsigClient instance');\n        return new StatsigClient(sdkKey !== null && sdkKey !== void 0 ? sdkKey : '', {});\n    }\n    /**\n     * StatsigClient constructor\n     *\n     * @param {string} sdkKey A Statsig client SDK key. eg \"client-xyz123...\"\n     * @param {StatsigUser} user StatsigUser object containing various attributes related to a user.\n     * @param {StatsigOptions | null} options StatsigOptions, used to customize the behavior of the SDK.\n     */\n    constructor(sdkKey, user, options = null) {\n        var _a, _b;\n        client_core_1.SDKType._setClientType(sdkKey, 'javascript-client');\n        const network = new Network_1.default(options, (e) => {\n            this.$emt(e);\n        });\n        super(sdkKey, (_a = options === null || options === void 0 ? void 0 : options.dataAdapter) !== null && _a !== void 0 ? _a : new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter(), network, options);\n        this._possibleFirstTouchMetadata = {};\n        /**\n         * Retrieves the value of a feature gate for the current user, represented as a {@link FeatureGate} object.\n         *\n         * @param {string} name - The name of the feature gate to retrieve.\n         * @param {FeatureGateEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n         * @returns {FeatureGate} - The {@link FeatureGate} object representing the gate's current evaluation results for the user.\n         */\n        this.getFeatureGate = this._memoize(client_core_1.MemoPrefix._gate, this._getFeatureGateImpl.bind(this));\n        /**\n         * Retrieves the value of a dynamic config for the current user.\n         *\n         * @param {string} name The name of the dynamic config to get.\n         * @param {DynamicConfigEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n         * @returns {DynamicConfig} - The {@link DynamicConfig} object representing the dynamic configs's current evaluation results for the user.\n         */\n        this.getDynamicConfig = this._memoize(client_core_1.MemoPrefix._dynamicConfig, this._getDynamicConfigImpl.bind(this));\n        /**\n         * Retrieves the value of a experiment for the current user.\n         *\n         * @param {string} name The name of the experiment to get.\n         * @param {ExperimentEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n         * @returns {Experiment} - The {@link Experiment} object representing the experiments's current evaluation results for the user.\n         */\n        this.getExperiment = this._memoize(client_core_1.MemoPrefix._experiment, this._getExperimentImpl.bind(this));\n        /**\n         * Retrieves the list of all Dynamic Configs and Experiments for the current user.\n         *\n         * @returns {string[]} The list of all Dynamic Config and Experiment names for the current user. Note - these will be hashed unless you've disabled hashing.\n         * This is intended to be used for debugging.\n         */\n        this.getConfigList = this._memoize(client_core_1.MemoPrefix._configList, this._getConfigListImpl.bind(this));\n        /**\n         * Retrieves the value of a layer for the current user.\n         *\n         * @param {string} name The name of the layer to get.\n         * @param {LayerEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n         * @returns {Layer} - The {@link Layer} object representing the layers's current evaluation results for the user.\n         */\n        this.getLayer = this._memoize(client_core_1.MemoPrefix._layer, this._getLayerImpl.bind(this));\n        /**\n         * Retrieves the value of a parameter store for the current user.\n         *\n         * @param {string} name The name of the parameter store to get.\n         * @param {ParameterStoreEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n         * @returns {ParameterStore} - The {@link ParameterStore} object representing the parameter store's current mappings for the user.\n         */\n        this.getParameterStore = this._memoize(client_core_1.MemoPrefix._paramStore, this._getParameterStoreImpl.bind(this));\n        this._store = new EvaluationStore_1.default(sdkKey);\n        this._network = network;\n        this._user = this._configureUser(user, options);\n        this._sdkInstanceID = (0, client_core_1.getUUID)();\n        const plugins = (_b = options === null || options === void 0 ? void 0 : options.plugins) !== null && _b !== void 0 ? _b : [];\n        for (const plugin of plugins) {\n            plugin.bind(this);\n        }\n    }\n    /**\n     * Initializes the StatsigClient using cached values. This method sets up the client synchronously by utilizing previously cached values.\n     * After initialization, cache values are updated in the background for future use, either in subsequent sessions or when `updateUser` is called.\n     * This is useful for quickly starting with the last-known-good configurations while refreshing data to keep settings up-to-date.\n     *\n     * @see {@link initializeAsync} for the asynchronous version of this method.\n     */\n    initializeSync(options) {\n        var _a;\n        if (this.loadingStatus !== 'Uninitialized') {\n            return (0, client_core_1.createUpdateDetails)(true, this._store.getSource(), -1, null, null, ['MultipleInitializations', ...((_a = this._store.getWarnings()) !== null && _a !== void 0 ? _a : [])]);\n        }\n        this._logger.start();\n        return this.updateUserSync(this._user, options);\n    }\n    /**\n     * Initializes the StatsigClient asynchronously by first using cached values and then updating to the latest values from the network.\n     * Once the network values are fetched, they replace the existing cached values. If this method's promise is not awaited,\n     * there might be a transition from cached to network values during the session, which can affect consistency.\n     * This method is useful when it's acceptable to begin with potentially stale data and switch to the latest configuration as it becomes available.\n     *\n     * @param {AsyncUpdateOptions} [options] - Optional. Additional options to customize the method call.\n     * @returns {Promise<void>} A promise that resolves once the client is fully initialized with the latest values from the network or a timeout (if set) is hit.\n     * @see {@link initializeSync} for the synchronous version of this method.\n     */\n    initializeAsync(options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (this._initializePromise) {\n                return this._initializePromise;\n            }\n            this._initializePromise = this._initializeAsyncImpl(options);\n            return this._initializePromise;\n        });\n    }\n    /**\n     * Synchronously updates the user in the Statsig client and switches the internal state to use cached values for the newly specified user.\n     * After the initial switch to cached values, this method updates these values in the background, preparing them for future sessions or subsequent calls to updateUser.\n     * This method ensures the client is quickly ready with available data.\n     *\n     * @param {StatsigUser} user - The new StatsigUser for which the client should update its internal state.\n     * @see {@link updateUserAsync} for the asynchronous version of this method.\n     */\n    updateUserSync(user, options) {\n        const startTime = performance.now();\n        try {\n            return this._updateUserSyncImpl(user, options, startTime);\n        }\n        catch (e) {\n            const err = e instanceof Error ? e : new Error(String(e));\n            return this._createErrorUpdateDetails(err, startTime);\n        }\n    }\n    _updateUserSyncImpl(user, options, startTime) {\n        var _a;\n        const warnings = [...((_a = this._store.getWarnings()) !== null && _a !== void 0 ? _a : [])];\n        this._resetForUser(user);\n        const result = this.dataAdapter.getDataSync(this._user);\n        if (result == null) {\n            warnings.push('NoCachedValues');\n        }\n        this._store.setValues(result, this._user);\n        this._finalizeUpdate(result);\n        const disable = options === null || options === void 0 ? void 0 : options.disableBackgroundCacheRefresh;\n        if (disable === true ||\n            (disable == null && (result === null || result === void 0 ? void 0 : result.source) === 'Bootstrap')) {\n            return (0, client_core_1.createUpdateDetails)(true, this._store.getSource(), performance.now() - startTime, this._errorBoundary.getLastSeenErrorAndReset(), this._network.getLastUsedInitUrlAndReset(), warnings);\n        }\n        this._runPostUpdate(result !== null && result !== void 0 ? result : null, this._user);\n        return (0, client_core_1.createUpdateDetails)(true, this._store.getSource(), performance.now() - startTime, this._errorBoundary.getLastSeenErrorAndReset(), this._network.getLastUsedInitUrlAndReset(), warnings);\n    }\n    /**\n     * Asynchronously updates the user in the Statsig client by initially using cached values and then fetching the latest values from the network.\n     * When the latest values are fetched, they replace the cached values. If the promise returned by this method is not awaited,\n     * the client's state may shift from cached to updated network values during the session, potentially affecting consistency.\n     * This method is best used in scenarios where up-to-date configuration is critical and initial delays are acceptable.\n     *\n     * @param {StatsigUser} user - The new StatsigUser for which the client should update its internal state.\n     * @param {AsyncUpdateOptions} [options] - Optional. Additional options to customize the method call.\n     * @returns {Promise<void>} A promise that resolves once the client is fully updated with the latest values from the network or a timeout (if set) is hit.\n     * @see {@link updateUserSync} for the synchronous version of this method.\n     */\n    updateUserAsync(user, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const startTime = performance.now();\n            try {\n                return yield this._updateUserAsyncImpl(user, options);\n            }\n            catch (e) {\n                const err = e instanceof Error ? e : new Error(String(e));\n                return this._createErrorUpdateDetails(err, startTime);\n            }\n        });\n    }\n    _updateUserAsyncImpl(user, options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            this._resetForUser(user);\n            const initiator = this._user;\n            client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);\n            let result = this.dataAdapter.getDataSync(initiator);\n            this._store.setValues(result, this._user);\n            this._setStatus('Loading', result);\n            result = yield this.dataAdapter.getDataAsync(result, initiator, options);\n            // ensure the user hasn't changed while we were waiting\n            if (initiator !== this._user) {\n                return (0, client_core_1.createUpdateDetails)(false, this._store.getSource(), -1, new Error('User changed during update'), this._network.getLastUsedInitUrlAndReset());\n            }\n            let isUsingNetworkValues = false;\n            if (result != null) {\n                client_core_1.Diagnostics._markInitProcessStart(this._sdkKey);\n                isUsingNetworkValues = this._store.setValues(result, this._user);\n                client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey, {\n                    success: isUsingNetworkValues,\n                });\n            }\n            this._finalizeUpdate(result);\n            if (!isUsingNetworkValues) {\n                this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA);\n                this.$emt({ name: 'initialization_failure' });\n            }\n            client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey, isUsingNetworkValues, this._store.getCurrentSourceDetails());\n            const initDuration = client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user, this._logger, this._sdkKey, this._options);\n            return (0, client_core_1.createUpdateDetails)(isUsingNetworkValues, this._store.getSource(), initDuration, this._errorBoundary.getLastSeenErrorAndReset(), this._network.getLastUsedInitUrlAndReset(), this._store.getWarnings());\n        });\n    }\n    /**\n     * Retrieves a synchronous context containing data currently being used by the SDK. Represented as a {@link PrecomputedEvaluationsContext} object.\n     *\n     * @returns {PrecomputedEvaluationsContext} The current synchronous context for the this StatsigClient instance.\n     */\n    getContext() {\n        return {\n            sdkKey: this._sdkKey,\n            options: this._options,\n            values: this._store.getValues(),\n            user: JSON.parse(JSON.stringify(this._user)),\n            errorBoundary: this._errorBoundary,\n            session: client_core_1.StatsigSession.get(this._sdkKey),\n            stableID: client_core_1.StableID.get(this._sdkKey),\n            sdkInstanceID: this._sdkInstanceID,\n        };\n    }\n    /**\n     * Retrieves the value of a feature gate for the current user, represented as a simple boolean.\n     *\n     * @param {string} name - The name of the feature gate to retrieve.\n     * @param {FeatureGateEvaluationOptions} [options] - Optional. Additional options to customize the method call.\n     * @returns {boolean} - The boolean value representing the gate's current evaluation results for the user.\n     */\n    checkGate(name, options) {\n        return this.getFeatureGate(name, options).value;\n    }\n    /**\n     * Logs an event to the internal logging system. This function allows logging by either passing a fully formed event object or by specifying the event name with optional value and metadata.\n     *\n     * @param {StatsigEvent|string} eventOrName - The event object conforming to the StatsigEvent interface, or the name of the event as a string.\n     * @param {string|number} value - Optional. The value associated with the event, which can be a string or a number. This parameter is ignored if the first parameter is a StatsigEvent object.\n     * @param {Record<string, string>} metadata - Optional. A key-value record containing metadata about the event. This is also ignored if the first parameter is an event object.\n     */\n    logEvent(eventOrName, value, metadata) {\n        const event = typeof eventOrName === 'string'\n            ? {\n                eventName: eventOrName,\n                value,\n                metadata,\n            }\n            : eventOrName;\n        this.$emt({\n            name: 'log_event_called',\n            event,\n        });\n        this._logger.enqueue(Object.assign(Object.assign({}, event), { user: this._user, time: Date.now() }));\n    }\n    /**\n     * Updates the user with analytics only metadata. This will override any existing analytics only metadata.\n     *\n     * @param {Record<string, string | number | boolean>} metadata - The metadata to add to the user.\n     */\n    updateUserWithAnalyticsOnlyMetadata(metadata) {\n        this._user = this._configureUser(Object.assign(Object.assign({}, this._user), { analyticsOnlyMetadata: metadata }), this._options);\n    }\n    _primeReadyRipcord() {\n        this.$on('error', () => {\n            this.loadingStatus === 'Loading' && this._finalizeUpdate(null);\n        });\n    }\n    _initializeAsyncImpl(options) {\n        return __awaiter(this, void 0, void 0, function* () {\n            if (!client_core_1.Storage.isReady()) {\n                yield client_core_1.Storage.isReadyResolver();\n            }\n            this._logger.start();\n            return this.updateUserAsync(this._user, options);\n        });\n    }\n    _createErrorUpdateDetails(error, startTime) {\n        var _a;\n        return (0, client_core_1.createUpdateDetails)(false, this._store.getSource(), performance.now() - startTime, error, null, [...((_a = this._store.getWarnings()) !== null && _a !== void 0 ? _a : [])]);\n    }\n    _finalizeUpdate(values) {\n        this._store.finalize();\n        this._setStatus('Ready', values);\n    }\n    _runPostUpdate(current, user) {\n        this.dataAdapter\n            .getDataAsync(current, user, { priority: 'low' })\n            .catch((err) => {\n            client_core_1.Log.error('An error occurred after update.', err);\n        });\n    }\n    _resetForUser(user) {\n        this._logger.reset();\n        this._store.reset();\n        this._user = this._configureUser(user, this._options);\n    }\n    _configureUser(originalUser, options) {\n        var _a, _b, _c;\n        const user = (0, client_core_1._normalizeUser)(originalUser, options);\n        const stableIdOverride = (_a = user.customIDs) === null || _a === void 0 ? void 0 : _a.stableID;\n        if (stableIdOverride) {\n            const readyPromise = (_c = (_b = this.storageProvider).isReadyResolver) === null || _c === void 0 ? void 0 : _c.call(_b);\n            if (readyPromise) {\n                readyPromise.then(() => client_core_1.StableID.setOverride(stableIdOverride, this._sdkKey), () => client_core_1.StableID.setOverride(stableIdOverride, this._sdkKey));\n            }\n            else {\n                client_core_1.StableID.setOverride(stableIdOverride, this._sdkKey);\n            }\n        }\n        // Only attach first touch metadata if it's not empty\n        if (Object.keys(this._possibleFirstTouchMetadata).length > 0) {\n            user.analyticsOnlyMetadata = Object.assign(Object.assign({}, user.analyticsOnlyMetadata), this._possibleFirstTouchMetadata);\n        }\n        return user;\n    }\n    _getFeatureGateImpl(name, options) {\n        var _a, _b;\n        const { result: evaluation, details } = this._store.getGate(name);\n        const gate = (0, client_core_1._makeFeatureGate)(name, details, evaluation);\n        const overridden = (_b = (_a = this.overrideAdapter) === null || _a === void 0 ? void 0 : _a.getGateOverride) === null || _b === void 0 ? void 0 : _b.call(_a, gate, this._user, options);\n        const result = overridden !== null && overridden !== void 0 ? overridden : gate;\n        this._enqueueExposure(name, (0, client_core_1._createGateExposure)(this._user, result, this._store.getExposureMapping()), options);\n        this.$emt({ name: 'gate_evaluation', gate: result });\n        return result;\n    }\n    _getDynamicConfigImpl(name, options) {\n        var _a, _b;\n        const { result: evaluation, details } = this._store.getConfig(name);\n        const config = (0, client_core_1._makeDynamicConfig)(name, details, evaluation);\n        const overridden = (_b = (_a = this.overrideAdapter) === null || _a === void 0 ? void 0 : _a.getDynamicConfigOverride) === null || _b === void 0 ? void 0 : _b.call(_a, config, this._user, options);\n        const result = overridden !== null && overridden !== void 0 ? overridden : config;\n        this._enqueueExposure(name, (0, client_core_1._createConfigExposure)(this._user, result, this._store.getExposureMapping()), options);\n        this.$emt({ name: 'dynamic_config_evaluation', dynamicConfig: result });\n        return result;\n    }\n    _getExperimentImpl(name, options) {\n        var _a, _b, _c, _d;\n        const { result: evaluation, details } = this._store.getConfig(name);\n        const experiment = (0, client_core_1._makeExperiment)(name, details, evaluation);\n        if (experiment.__evaluation != null) {\n            experiment.__evaluation.secondary_exposures = (0, client_core_1._mapExposures)((_b = (_a = experiment.__evaluation) === null || _a === void 0 ? void 0 : _a.secondary_exposures) !== null && _b !== void 0 ? _b : [], this._store.getExposureMapping());\n        }\n        const overridden = (_d = (_c = this.overrideAdapter) === null || _c === void 0 ? void 0 : _c.getExperimentOverride) === null || _d === void 0 ? void 0 : _d.call(_c, experiment, this._user, options);\n        const result = overridden !== null && overridden !== void 0 ? overridden : experiment;\n        this._enqueueExposure(name, (0, client_core_1._createConfigExposure)(this._user, result, this._store.getExposureMapping()), options);\n        this.$emt({ name: 'experiment_evaluation', experiment: result });\n        return result;\n    }\n    _getConfigListImpl() {\n        return this._store.getConfigList();\n    }\n    _getLayerImpl(name, options) {\n        var _a, _b, _c;\n        const { result: evaluation, details } = this._store.getLayer(name);\n        const layer = (0, client_core_1._makeLayer)(name, details, evaluation);\n        const overridden = (_b = (_a = this.overrideAdapter) === null || _a === void 0 ? void 0 : _a.getLayerOverride) === null || _b === void 0 ? void 0 : _b.call(_a, layer, this._user, options);\n        if (options === null || options === void 0 ? void 0 : options.disableExposureLog) {\n            this._logger.incrementNonExposureCount(name);\n        }\n        const result = (0, client_core_1._mergeOverride)(layer, overridden, (_c = overridden === null || overridden === void 0 ? void 0 : overridden.__value) !== null && _c !== void 0 ? _c : layer.__value, (param) => {\n            if (options === null || options === void 0 ? void 0 : options.disableExposureLog) {\n                return;\n            }\n            this._enqueueExposure(name, (0, client_core_1._createLayerParameterExposure)(this._user, result, param, this._store.getExposureMapping()), options);\n        });\n        this.$emt({ name: 'layer_evaluation', layer: result });\n        return result;\n    }\n    _getParameterStoreImpl(name, options) {\n        var _a, _b;\n        const { result: configuration, details } = this._store.getParamStore(name);\n        this._logger.incrementNonExposureCount(name);\n        const paramStore = {\n            name,\n            details: details,\n            __configuration: configuration,\n            get: (0, ParamStoreGetterFactory_1._makeParamStoreGetter)(this, configuration, options),\n        };\n        const overridden = (_b = (_a = this.overrideAdapter) === null || _a === void 0 ? void 0 : _a.getParamStoreOverride) === null || _b === void 0 ? void 0 : _b.call(_a, paramStore, options);\n        if (overridden != null) {\n            paramStore.__configuration = overridden.config;\n            paramStore.details = overridden.details;\n            paramStore.get = (0, ParamStoreGetterFactory_1._makeParamStoreGetter)(this, overridden.config, options);\n        }\n        return paramStore;\n    }\n}\nexports.default = StatsigClient;\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigClient = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst StatsigClient_1 = require(\"./StatsigClient\");\nexports.StatsigClient = StatsigClient_1.default;\n__exportStar(require(\"@statsig/client-core\"), exports);\nconst __STATSIG__ = Object.assign((0, client_core_1._getStatsigGlobal)(), {\n    StatsigClient: StatsigClient_1.default,\n});\nexports.default = __STATSIG__;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useStatsigInternalClientFactoryAsync = void 0;\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nfunction useStatsigInternalClientFactoryAsync(factory, args) {\n    const client = (0, react_1.useMemo)(() => { var _a; return (_a = (0, client_core_1._getInstance)(args.sdkKey)) !== null && _a !== void 0 ? _a : factory(args); }, []);\n    const [isLoading, setIsLoading] = (0, react_1.useState)(client.loadingStatus !== 'Ready');\n    (0, react_1.useMemo)(() => {\n        if (client.loadingStatus !== 'Ready') {\n            // Repeat calls to initializeAsync return the same promise.\n            // But if the client is already loaded, we don't want the promise\n            // resolution to trigger an extra render on `setIsLoading(false)`\n            client\n                .initializeAsync()\n                .catch(client_core_1.Log.error)\n                .finally(() => setIsLoading(false));\n        }\n    }, []);\n    return { client, isLoading };\n}\nexports.useStatsigInternalClientFactoryAsync = useStatsigInternalClientFactoryAsync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useClientAsyncInit = void 0;\nconst js_client_1 = require(\"@statsig/js-client\");\nconst useStatsigInternalClientFactoryAsync_1 = require(\"./useStatsigInternalClientFactoryAsync\");\nfunction useClientAsyncInit(sdkKey, initialUser, statsigOptions = null) {\n    return (0, useStatsigInternalClientFactoryAsync_1.useStatsigInternalClientFactoryAsync)((args) => new js_client_1.StatsigClient(args.sdkKey, args.initialUser, args.statsigOptions), {\n        sdkKey,\n        initialUser,\n        statsigOptions,\n    });\n}\nexports.useClientAsyncInit = useClientAsyncInit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatsigProvider = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nconst useClientAsyncInit_1 = require(\"./useClientAsyncInit\");\nfunction StatsigProvider(props) {\n    if (!('client' in props)) {\n        return (0, jsx_runtime_1.jsx)(ConfigBasedStatsigProvider, Object.assign({}, props));\n    }\n    if ('sdkKey' in props || 'user' in props) {\n        client_core_1.Log.warn('Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored.');\n    }\n    return (0, jsx_runtime_1.jsx)(ClientBasedStatsigProvider, Object.assign({}, props));\n}\nexports.StatsigProvider = StatsigProvider;\nfunction ConfigBasedStatsigProvider(props) {\n    const [renderVersion, setRenderVersion] = (0, react_1.useState)(0);\n    const client = (0, useClientAsyncInit_1.useClientAsyncInit)(props.sdkKey, props.user, props.options).client;\n    const [isLoading, setIsLoading] = (0, react_1.useState)(!_isReady(client));\n    useStatsigClientSetup(client, setRenderVersion, setIsLoading);\n    const contextValue = (0, react_1.useMemo)(() => ({\n        renderVersion,\n        client,\n        isLoading,\n    }), [renderVersion, client, isLoading]);\n    return ((0, jsx_runtime_1.jsx)(StatsigContext_1.default.Provider, { value: contextValue, children: props.loadingComponent == null || !contextValue.isLoading\n            ? props.children\n            : props.loadingComponent }));\n}\nfunction ClientBasedStatsigProvider(props) {\n    const [renderVersion, setRenderVersion] = (0, react_1.useState)(0);\n    const client = props.client;\n    const [isLoading, setIsLoading] = (0, react_1.useState)(!_isReady(client));\n    useStatsigClientSetup(client, setRenderVersion, setIsLoading);\n    const contextValue = (0, react_1.useMemo)(() => ({\n        renderVersion,\n        client,\n        isLoading,\n    }), [renderVersion, client, isLoading]);\n    return ((0, jsx_runtime_1.jsx)(StatsigContext_1.default.Provider, { value: contextValue, children: props.loadingComponent == null || !contextValue.isLoading\n            ? props.children\n            : props.loadingComponent }));\n}\nfunction useStatsigClientSetup(client, setRenderVersion, setIsLoading) {\n    (0, react_1.useEffect)(() => {\n        const onValuesUpdated = () => {\n            setRenderVersion((v) => v + 1);\n            setIsLoading(!_isReady(client));\n        };\n        client_core_1.SDKType._setBindingType('react');\n        client.$on('values_updated', onValuesUpdated);\n        return () => {\n            client\n                .flush()\n                .catch((err) => client_core_1.Log.error('An error occurred during flush', err));\n            client.off('values_updated', onValuesUpdated);\n        };\n    }, [client, setRenderVersion]);\n}\nfunction _isReady(client) {\n    if ('isNoop' in client) {\n        return true;\n    }\n    switch (client.loadingStatus) {\n        case 'Ready':\n            return true;\n        default:\n            return false;\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useStatsigInternalClientFactoryBootstrap = void 0;\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nfunction useStatsigInternalClientFactoryBootstrap(factory, args) {\n    const clientRef = (0, react_1.useRef)((0, client_core_1._getInstance)(args.sdkKey));\n    return (0, react_1.useMemo)(() => {\n        if (clientRef.current) {\n            return clientRef.current;\n        }\n        const inst = factory(args);\n        clientRef.current = inst;\n        if (args.useLegacyFormat) {\n            inst.dataAdapter.setDataLegacy(args.initialValues, args.initialUser);\n        }\n        else {\n            inst.dataAdapter.setData(args.initialValues);\n        }\n        inst.initializeSync();\n        return inst;\n    }, []);\n}\nexports.useStatsigInternalClientFactoryBootstrap = useStatsigInternalClientFactoryBootstrap;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useClientBootstrapInit = void 0;\nconst js_client_1 = require(\"@statsig/js-client\");\nconst useStatsigInternalClientFactoryBootstrap_1 = require(\"./useStatsigInternalClientFactoryBootstrap\");\nfunction useClientBootstrapInit(sdkKey, initialUser, initialValues, statsigOptions = null, useLegacyFormat) {\n    return (0, useStatsigInternalClientFactoryBootstrap_1.useStatsigInternalClientFactoryBootstrap)((args) => new js_client_1.StatsigClient(args.sdkKey, args.initialUser, args.statsigOptions), {\n        sdkKey,\n        initialUser,\n        initialValues,\n        statsigOptions,\n        useLegacyFormat,\n    });\n}\nexports.useClientBootstrapInit = useClientBootstrapInit;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(configName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    return (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${configName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.getDynamicConfig(configName, options);\n        }\n        return client.getDynamicConfig(configName, options);\n    }, [\n        configName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(experimentName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    return (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${experimentName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.getExperiment(experimentName, options);\n        }\n        return client.getExperiment(experimentName, options);\n    }, [\n        experimentName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(gateName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    const gate = (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${gateName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.getFeatureGate(gateName, options);\n        }\n        return client.getFeatureGate(gateName, options);\n    }, [\n        gateName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n    return gate;\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(gateName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    const gate = (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${gateName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.checkGate(gateName, options);\n        }\n        return client.checkGate(gateName, options);\n    }, [\n        gateName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n    return gate;\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(layerName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    const layer = (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${layerName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.getLayer(layerName, options);\n        }\n        return client.getLayer(layerName, options);\n    }, [\n        layerName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n    return layer;\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction default_1(storeName, options) {\n    const { client, renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    const store = (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(client)) {\n            client_core_1.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${storeName}'.`);\n            return NoopEvaluationsClient_1.NoopEvaluationsClient.getParameterStore(storeName, options);\n        }\n        return client.getParameterStore(storeName, options);\n    }, [\n        storeName,\n        client,\n        renderVersion,\n        ...(options ? Object.values(options) : []),\n    ]);\n    return store;\n}\nexports.default = default_1;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useStatsigClient = void 0;\nconst react_1 = require(\"react\");\nconst client_core_1 = require(\"@statsig/client-core\");\nconst NoopEvaluationsClient_1 = require(\"./NoopEvaluationsClient\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nfunction useStatsigClient() {\n    const { client: anyClient, renderVersion, isLoading, } = (0, react_1.useContext)(StatsigContext_1.default);\n    const client = (0, react_1.useMemo)(() => {\n        if ((0, NoopEvaluationsClient_1.isNoopClient)(anyClient)) {\n            client_core_1.Log.warn('Attempting to retrieve a StatsigClient but none was set.');\n            return NoopEvaluationsClient_1.NoopEvaluationsClient;\n        }\n        return anyClient;\n    }, [anyClient, renderVersion]);\n    const deps = [client, renderVersion];\n    const checkGate = (0, react_1.useCallback)((name, options) => {\n        return client.checkGate(name, options);\n    }, deps);\n    const getFeatureGate = (0, react_1.useCallback)((name, options) => {\n        return client.getFeatureGate(name, options);\n    }, deps);\n    const getDynamicConfig = (0, react_1.useCallback)((name, options) => {\n        return client.getDynamicConfig(name, options);\n    }, deps);\n    const getExperiment = (0, react_1.useCallback)((name, options) => {\n        return client.getExperiment(name, options);\n    }, deps);\n    const getLayer = (0, react_1.useCallback)((name, options) => {\n        return client.getLayer(name, options);\n    }, deps);\n    const getParameterStore = (0, react_1.useCallback)((name, options) => {\n        return client.getParameterStore(name, options);\n    }, deps);\n    const logEvent = (0, react_1.useCallback)((eventName, value, metadata) => {\n        if (typeof eventName === 'string') {\n            return client.logEvent(eventName, value, metadata);\n        }\n        return client.logEvent(eventName);\n    }, deps);\n    return (0, react_1.useMemo)(() => {\n        return {\n            client,\n            checkGate,\n            getFeatureGate,\n            getDynamicConfig,\n            getExperiment,\n            getLayer,\n            getParameterStore,\n            logEvent,\n            isLoading,\n        };\n    }, [\n        client,\n        checkGate,\n        getFeatureGate,\n        getDynamicConfig,\n        getExperiment,\n        getLayer,\n        getParameterStore,\n        logEvent,\n        isLoading,\n    ]);\n}\nexports.useStatsigClient = useStatsigClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useStatsigUser = void 0;\nconst react_1 = require(\"react\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nconst useStatsigClient_1 = require(\"./useStatsigClient\");\nfunction getClientUser(client) {\n    const context = client.getContext();\n    return context.user;\n}\nfunction useStatsigUser() {\n    const { client } = (0, useStatsigClient_1.useStatsigClient)();\n    const { renderVersion } = (0, react_1.useContext)(StatsigContext_1.default);\n    const memoUser = (0, react_1.useMemo)(() => {\n        return getClientUser(client);\n    }, [client, renderVersion]);\n    return {\n        user: memoUser,\n        updateUserSync: (0, react_1.useCallback)((arg) => {\n            if (typeof arg === 'function') {\n                arg = arg(getClientUser(client));\n            }\n            return client.updateUserSync(arg);\n        }, [client]),\n        updateUserAsync: (0, react_1.useCallback)((arg) => {\n            if (typeof arg === 'function') {\n                arg = arg(getClientUser(client));\n            }\n            return client.updateUserAsync(arg);\n        }, [client]),\n    };\n}\nexports.useStatsigUser = useStatsigUser;\n","\"use strict\";\nvar __createBinding = (this && this.__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}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useStatsigUser = exports.useStatsigInternalClientFactoryBootstrap = exports.useStatsigInternalClientFactoryAsync = exports.useStatsigClient = exports.useParameterStore = exports.useLayer = exports.useGateValue = exports.useFeatureGate = exports.useExperiment = exports.useDynamicConfig = exports.useClientBootstrapInit = exports.useClientAsyncInit = exports.StatsigProvider = exports.StatsigContext = void 0;\nconst client_core_1 = require(\"@statsig/client-core\");\nconst StatsigContext_1 = require(\"./StatsigContext\");\nexports.StatsigContext = StatsigContext_1.default;\nconst StatsigProvider_1 = require(\"./StatsigProvider\");\nObject.defineProperty(exports, \"StatsigProvider\", { enumerable: true, get: function () { return StatsigProvider_1.StatsigProvider; } });\nconst useClientAsyncInit_1 = require(\"./useClientAsyncInit\");\nObject.defineProperty(exports, \"useClientAsyncInit\", { enumerable: true, get: function () { return useClientAsyncInit_1.useClientAsyncInit; } });\nconst useClientBootstrapInit_1 = require(\"./useClientBootstrapInit\");\nObject.defineProperty(exports, \"useClientBootstrapInit\", { enumerable: true, get: function () { return useClientBootstrapInit_1.useClientBootstrapInit; } });\nconst useDynamicConfig_1 = require(\"./useDynamicConfig\");\nexports.useDynamicConfig = useDynamicConfig_1.default;\nconst useExperiment_1 = require(\"./useExperiment\");\nexports.useExperiment = useExperiment_1.default;\nconst useFeatureGate_1 = require(\"./useFeatureGate\");\nexports.useFeatureGate = useFeatureGate_1.default;\nconst useGateValue_1 = require(\"./useGateValue\");\nexports.useGateValue = useGateValue_1.default;\nconst useLayer_1 = require(\"./useLayer\");\nexports.useLayer = useLayer_1.default;\nconst useParameterStore_1 = require(\"./useParameterStore\");\nexports.useParameterStore = useParameterStore_1.default;\nconst useStatsigClient_1 = require(\"./useStatsigClient\");\nObject.defineProperty(exports, \"useStatsigClient\", { enumerable: true, get: function () { return useStatsigClient_1.useStatsigClient; } });\nconst useStatsigInternalClientFactoryAsync_1 = require(\"./useStatsigInternalClientFactoryAsync\");\nObject.defineProperty(exports, \"useStatsigInternalClientFactoryAsync\", { enumerable: true, get: function () { return useStatsigInternalClientFactoryAsync_1.useStatsigInternalClientFactoryAsync; } });\nconst useStatsigInternalClientFactoryBootstrap_1 = require(\"./useStatsigInternalClientFactoryBootstrap\");\nObject.defineProperty(exports, \"useStatsigInternalClientFactoryBootstrap\", { enumerable: true, get: function () { return useStatsigInternalClientFactoryBootstrap_1.useStatsigInternalClientFactoryBootstrap; } });\nconst useStatsigUser_1 = require(\"./useStatsigUser\");\nObject.defineProperty(exports, \"useStatsigUser\", { enumerable: true, get: function () { return useStatsigUser_1.useStatsigUser; } });\n__exportStar(require(\"@statsig/js-client\"), exports);\nObject.assign((0, client_core_1._getStatsigGlobal)(), {\n    StatsigContext: StatsigContext_1.default,\n    StatsigProvider: StatsigProvider_1.StatsigProvider,\n    useClientAsyncInit: useClientAsyncInit_1.useClientAsyncInit,\n    useClientBootstrapInit: useClientBootstrapInit_1.useClientBootstrapInit,\n    useDynamicConfig: useDynamicConfig_1.default,\n    useExperiment: useExperiment_1.default,\n    useFeatureGate: useFeatureGate_1.default,\n    useGateValue: useGateValue_1.default,\n    useLayer: useLayer_1.default,\n    useParameterStore: useParameterStore_1.default,\n    useStatsigClient: useStatsigClient_1.useStatsigClient,\n    useStatsigInternalClientFactoryAsync: useStatsigInternalClientFactoryAsync_1.useStatsigInternalClientFactoryAsync,\n    useStatsigInternalClientFactoryBootstrap: useStatsigInternalClientFactoryBootstrap_1.useStatsigInternalClientFactoryBootstrap,\n    useStatsigUser: useStatsigUser_1.useStatsigUser,\n});\n","import { useFeatureGate } from \"@statsig/react-bindings\";\nimport { useEffect } from \"react\";\nimport { getStatsigUserStableID } from \"../data/initial-state/intial-state-accessors.mts\";\nimport { analytics } from \"../analytics/analytics.mts\";\n\nlet hasTrackedFeatureGate = false;\n\n/** @internal Reset tracking flags — for tests only */\nexport const _resetTrackingFlags = () => {\n  hasTrackedFeatureGate = false;\n};\n\n/**\n * Hook to determine if payment mode should be used for subscriptions.\n *\n * When enabled, Stripe checkout will use mode='payment' with setup_future_usage='off_session'\n * instead of mode='subscription'. This hides the subscription amount from Apple Pay,\n * showing only the immediate charge (e.g., shipping).\n *\n * The subscription is created via webhook after payment completes.\n *\n * @see Statsig feature gate: deferred_stripe_subscription\n */\nexport const useIsPaymentModeEnabled = () => {\n  const gate = useFeatureGate(\"deferred_stripe_subscription\");\n  const enabled = gate?.value ?? false;\n  const stableId = getStatsigUserStableID();\n\n  useEffect(() => {\n    if (!hasTrackedFeatureGate) {\n      hasTrackedFeatureGate = true;\n      analytics.track(\"feature_gate_evaluation\", {\n        category: \"feature_gate\",\n        action: \"deferred_stripe_subscription\",\n        property: JSON.stringify({ enabled, stableId }),\n        isCustom: true,\n      });\n    }\n  }, [enabled, stableId]);\n\n  return enabled;\n};\n","/**\n * URL parameter utility functions.\n * Separated into its own module for easier testing/mocking.\n */\n\n/**\n * Get redemption code from URL query parameters.\n * Checks for 'redemptionCode' first, then falls back to 'affiliate'.\n */\nexport const getRedemptionCodeFromUrl = (\n  search: string = window.location.search,\n): string | null => {\n  const urlParams = new URLSearchParams(search);\n  return urlParams.get('redemptionCode') ?? urlParams.get('affiliate');\n};\n\nexport const getTestClockIdFromUrl = (\n  search: string = window.location.search,\n): string | null => {\n  return new URLSearchParams(search).get('test_clock_id');\n};\n","import { useCallback, useEffect, useState, useMemo, useRef } from \"react\";\nimport * as Sentry from \"@sentry/react\";\nimport {\n  useCurrency,\n  useShouldIncludeLink,\n  useShouldIncludeSensors,\n} from \"../data/redux/slices/offers/offers-slice.mts\";\nimport {\n  useIsCKOptional,\n  useOfferKey,\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n} from \"../data/api/query/offers.mts\";\nimport { stripePromise } from \"../app/main/routes/routes.tsx\";\nimport { useIsPaymentModeEnabled } from \"./stripe-experiment.mts\";\nimport { getPartnerFromWindowLocation, isOnsiteEventPartner } from \"./partner-selectors.mts\";\nimport { useApiDataFetcher, useFetchFromArccos } from \"../data/api/arccos/arccos-api.mts\";\nimport { useCustomerId } from \"../data/redux/slices/auth/auth-selectors.mts\";\nimport { getStatsigUserStableID } from \"../data/initial-state/intial-state-accessors.mts\";\nimport { getShouldOfferSkillest } from \"./partner-selectors.mts\";\nimport { getUrlWithAdditionalParams, Page } from \"./navigation.mts\";\nimport { getRedemptionCodeFromUrl, getTestClockIdFromUrl } from \"./url-params.mts\";\n\n// Type for client secret cache entry\ninterface ClientSecretCacheEntry {\n  clientSecret: string;\n  timestamp: number;\n}\n\n// Type for cart configuration key - represents which optional line items are included\ninterface CartConfig {\n  includedOptionalItems: string[]; // Array of optional line item keys that are included\n}\n\n// Module-level cache shared across all hook instances\nconst sharedClientSecretCache = new Map<string, ClientSecretCacheEntry>();\n\n// Module-level tracking of in-flight requests to prevent duplicates\nconst sharedInflightRequests = new Map<string, Promise<string>>();\n\ntype CheckoutSessionResponse = {\n  client_secret: string;\n};\n\ninterface CheckoutSessionParams {\n  return_url: string;\n  currency: string;\n  products: string[];\n  mode?: \"payment\" | \"subscription\";\n  customer?: string | undefined;\n  payment_intent_data?: {\n    setup_future_usage?: \"off_session\" | undefined;\n  };\n}\n\ninterface CreateCheckoutSessionRequest {\n  offer_key: string;\n  checkout_session_params: CheckoutSessionParams;\n  client_metadata: {\n    clientTags: string[];\n  };\n  test_clock_id?: string | undefined;\n}\n\n/**\n * Hook that provides a wrapped fetchClientSecret function with prefetching capabilities\n * This hook will prefetch client secrets for different cart configurations in the background\n * and return a function that can use cached secrets when available\n */\nexport const useWrappedFetchClientSecret = () => {\n  const isLinkAddOnActivated = useShouldIncludeLink();\n  const isSensorAddonActivated = useShouldIncludeSensors();\n  const rawLineItems = useSelectedLineItems();\n  const isStripeEnabled = rawLineItems?.some((i) => i.line_item_version === 2);\n  const isLinkRequired = useSelectedLinkGen2LineItem()?.is_required || false;\n  const isPaymentModeEnabled = useIsPaymentModeEnabled();\n\n  const currency = useCurrency()?.toLowerCase();\n  const isCKOptional = useIsCKOptional();\n  const offerKey = useOfferKey();\n  const partner = getPartnerFromWindowLocation();\n  const customerId = useCustomerId();\n  const fetchData = useApiDataFetcher<\n    CheckoutSessionResponse,\n    CreateCheckoutSessionRequest\n  >({\n    path: `/stripe/checkout_session`,\n  });\n\n  // Memoize lineItems to prevent recreation on every render\n  const lineItems = useMemo(() => {\n    return rawLineItems || [];\n  }, [JSON.stringify(rawLineItems)]);\n\n  // Use a state trigger to force re-renders when cache updates\n  const [, forceUpdate] = useState({});\n\n  // Track previous customer ID to only re-fetch when it actually changes\n  const prevCustomerIdRef = useRef(customerId);\n\n  // Memoize expensive computations\n  const optionalItemKeys = useMemo(() => {\n    if (!lineItems) return [];\n    return lineItems\n      .filter((item) => !item.is_required)\n      .map((item) => item.key);\n  }, [lineItems]);\n\n  // Generate cache key based on optional items included\n  const generateCacheKey = useCallback((config: CartConfig) => {\n    return config.includedOptionalItems.sort().join(\"-\") || \"base\";\n  }, []);\n\n  // Memoize current cart configuration to prevent recreation\n  const currentCartConfig = useMemo((): CartConfig => {\n    if (!optionalItemKeys.length) {\n      return { includedOptionalItems: [] };\n    }\n\n    const includedOptionalItems: string[] = [];\n\n    // Check which optional items are currently selected\n    optionalItemKeys.forEach((itemKey) => {\n      if (itemKey === \"completion_kit\" && isSensorAddonActivated) {\n        includedOptionalItems.push(itemKey);\n      } else if (\n        [\"link_pro\", \"link_gen_2\"].includes(itemKey) &&\n        (isLinkAddOnActivated || isLinkRequired)\n      ) {\n        includedOptionalItems.push(itemKey);\n      }\n    });\n\n    return { includedOptionalItems };\n  }, [\n    optionalItemKeys,\n    isSensorAddonActivated,\n    isLinkAddOnActivated,\n    isLinkRequired,\n  ]);\n\n  // Generate all combinations of optional items (2^n combinations) - memoized for performance\n  const generateAllConfigurations = useCallback(\n    (optionalItems: string[]): CartConfig[] => {\n      const configurations: CartConfig[] = [];\n      const totalCombinations = Math.pow(2, optionalItems.length);\n\n      for (let i = 0; i < totalCombinations; i++) {\n        const includedOptionalItems: string[] = [];\n\n        for (let j = 0; j < optionalItems.length; j++) {\n          if (i & (1 << j)) {\n            includedOptionalItems.push(optionalItems[j]);\n          }\n        }\n\n        configurations.push({ includedOptionalItems });\n      }\n\n      return configurations;\n    },\n    [],\n  );\n\n  // Memoize cart configurations generation to avoid recalculating\n  const cartConfigurations = useMemo(() => {\n    if (!optionalItemKeys.length) {\n      return [currentCartConfig];\n    }\n\n    let configurations = generateAllConfigurations(optionalItemKeys);\n\n    // Prioritize current configuration\n    configurations = [\n      currentCartConfig,\n      ...configurations.filter(\n        (config) =>\n          generateCacheKey(config) !== generateCacheKey(currentCartConfig),\n      ),\n    ];\n\n    // Remove duplicates\n    return configurations.filter(\n      (config, index, arr) =>\n        arr.findIndex(\n          (c) => generateCacheKey(c) === generateCacheKey(config),\n        ) === index,\n    );\n  }, [\n    optionalItemKeys,\n    currentCartConfig,\n    generateCacheKey,\n    generateAllConfigurations,\n  ]);\n\n  // Create config-specific fetch function (for both prefetching and on-demand use)\n  const fetchClientSecretForConfig = useCallback(\n    async (config: CartConfig) => {\n      // Simulate the selection state for this config\n      const simulatedIsLinkAddOnActivated = config.includedOptionalItems.some(\n        (item) => [\"link_pro\", \"link_gen_2\"].includes(item),\n      );\n      const simulatedIsSensorAddonActivated =\n        config.includedOptionalItems.includes(\"completion_kit\");\n\n      // Filter products based on simulated selections\n      const products = lineItems\n        .map((lineItem) => lineItem.key)\n        .filter(\n          (product) =>\n            ![\"link_pro\", \"link_gen_2\"].includes(product) ||\n            simulatedIsLinkAddOnActivated ||\n            isLinkRequired,\n        )\n        .filter(\n          (product) =>\n            product !== \"completion_kit\" ||\n            (isCKOptional ? simulatedIsSensorAddonActivated : true),\n        )\n        .filter((product) => {\n          const doesOfferRequireShipping =\n            lineItems.some((item) => item.key === \"shipping_and_handling\") &&\n            (!isCKOptional || simulatedIsSensorAddonActivated);\n          return (\n            product !== \"shipping_and_handling\" || doesOfferRequireShipping\n          );\n        });\n\n      const baseReturnUrl = getUrlWithAdditionalParams({\n        to: Page.SUCCESS,\n        includeHost: true,\n      });\n      // Append {CHECKOUT_SESSION_ID} so Stripe substitutes the real session ID\n      // into the success URL on redirect. The success-page server-analytics\n      // fanout (server-analytics-handler.mts via fireServerAnalyticsSuccess)\n      // keys its event_id on this value, and without it the success-page\n      // StartTrial + CompleteRegistration server CAPI fires never run.\n      // See: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-return_url\n      const returnUrlSeparator = baseReturnUrl.includes('?') ? '&' : '?';\n      const returnUrl = `${baseReturnUrl}${returnUrlSeparator}session_id={CHECKOUT_SESSION_ID}`;\n\n      const windowPartner = getPartnerFromWindowLocation();\n\n      // Get redemption code from URL (affiliate param is an alias for redemptionCode)\n      const redemptionCode = getRedemptionCodeFromUrl();\n      const testClockId = getTestClockIdFromUrl();\n\n      const clientTags = [\n        ...(windowPartner ? [`partner:${windowPartner}`] : []),\n        `domain:${window.location.hostname}`,\n        `stableID:${getStatsigUserStableID()}`,\n        `shouldOfferSkillest:${getShouldOfferSkillest()}`,\n        ...(redemptionCode ? [`redemption_code:${redemptionCode}`] : []),\n        `currency:${currency.toUpperCase()}`,\n        ...(isOnsiteEventPartner(windowPartner) ? ['onsite_event:true'] : []),\n      ];\n\n      console.log('[STRIPE-PREFETCH] clientTags:', clientTags);\n\n      // Determine checkout mode based on line item charge types\n      const hasRecurringItems = lineItems.some(\n        (item) => item.charge_type === \"RECURRING\",\n      );\n\n      // Default mode determination (subscription for recurring, payment for one-time)\n      const mode = hasRecurringItems ? \"subscription\" : \"payment\";\n\n      // Payment intent data for saving payment method\n      const paymentIntentData = {\n        setup_future_usage: \"off_session\" as const,\n      };\n\n      // When payment mode experiment is enabled:\n      // - We don't send mode (backend sets mode='payment' and filters recurring items)\n      // - Backend adds setup_future_usage and stores subscription details in metadata\n      // - Subscription is created via webhook after payment completes\n      // This hides the subscription amount from Apple Pay.\n      const shouldIncludePaymentIntentData =\n        mode === \"payment\" && !isPaymentModeEnabled;\n\n      // Build client tags, adding subscription creation flag when experiment is enabled\n      const finalClientTags = [\n        ...clientTags,\n        ...(isPaymentModeEnabled && hasRecurringItems\n          ? [\"createSubscriptionOnCompletion:true\"]\n          : []),\n      ];\n\n      const body: CreateCheckoutSessionRequest = {\n        offer_key: offerKey!,\n        checkout_session_params: {\n          return_url: returnUrl,\n          currency: currency.toUpperCase(),\n          products,\n          ...(isPaymentModeEnabled ? {} : { mode }),\n          customer: customerId,\n          ...(shouldIncludePaymentIntentData && {\n            payment_intent_data: paymentIntentData,\n          }),\n        },\n        client_metadata: {\n          clientTags: finalClientTags,\n        },\n        ...(testClockId ? { test_clock_id: testClockId } : {}),\n      };\n\n      console.debug(\"[STRIPE-PREFETCH] Creating checkout session:\", {\n        offerKey,\n        products,\n        mode,\n        customerId: !!customerId,\n        isPaymentModeEnabled,\n      });\n\n      const response = await fetchData({\n        path: `/stripe/checkout_session`,\n        init: {\n          method: \"POST\",\n        },\n        body,\n      });\n\n      return response.client_secret;\n    },\n    [\n      lineItems,\n      isCKOptional,\n      partner,\n      offerKey,\n      currency,\n      fetchData,\n      isLinkRequired,\n      customerId,\n      isPaymentModeEnabled,\n    ],\n  );\n\n  // Preload client secrets for common cart configurations\n  useEffect(() => {\n    const customerIdChanged = prevCustomerIdRef.current !== customerId;\n    const hasActualCustomerId = !!customerId;\n\n    // Update the ref for next comparison\n    prevCustomerIdRef.current = customerId;\n\n    if (!isStripeEnabled || !stripePromise || !offerKey) {\n      return;\n    }\n\n    // If customer ID changed but we don't have an actual customer ID, skip prefetching\n    // This prevents unnecessary fetches when validation doesn't return a customer ID\n    if (customerIdChanged && !hasActualCustomerId) {\n      return;\n    }\n\n    // Filter configs that need fetching - check inline to avoid dependency issues\n    const configsToPreload = cartConfigurations.filter((config) => {\n      const key = generateCacheKey(config);\n      const cached = sharedClientSecretCache.get(key);\n      const isExpired =\n        !cached || Date.now() - cached.timestamp > 23 * 60 * 60 * 1000;\n      const isCurrentlyFetching = sharedInflightRequests.has(key);\n      return isExpired && !isCurrentlyFetching;\n    });\n\n    if (configsToPreload.length === 0) {\n      return;\n    }\n\n    // Preload in sequence, starting with current configuration\n    const preloadSecrets = async () => {\n      if (!isStripeEnabled) {\n        return;\n      }\n\n      console.debug(\n        \"[STRIPE-PREFETCH] Preloading\",\n        configsToPreload.length,\n        \"configurations\",\n      );\n\n      for (const config of configsToPreload) {\n        const key = generateCacheKey(config);\n\n        // Create the promise for this config if not already in flight\n        if (!sharedInflightRequests.has(key)) {\n          const fetchPromise = fetchClientSecretForConfig(config)\n            .then((clientSecret) => {\n              sharedClientSecretCache.set(key, {\n                clientSecret,\n                timestamp: Date.now(),\n              });\n              return clientSecret;\n            })\n            .finally(() => {\n              sharedInflightRequests.delete(key);\n            });\n\n          // Prefetch-only observer: report as a warning so background\n          // prefetch failures (backgrounded tab, dropped mobile\n          // connection, Safari \"Load failed\") don't create noisy\n          // production error alerts. On-demand consumers that pick up\n          // this same promise via `sharedInflightRequests.get(key)`\n          // still see the rejection and propagate it normally.\n          fetchPromise.catch((error) => {\n            console.error(\"[STRIPE-PREFETCH] Prefetch error:\", key, error);\n            Sentry.captureException(error, {\n              level: \"warning\",\n              tags: { source: \"stripe-prefetch\" },\n              extra: { cacheKey: key },\n            });\n          });\n\n          sharedInflightRequests.set(key, fetchPromise);\n        }\n\n        // Wait for the request to complete (whether started by us or another instance)\n        try {\n          await sharedInflightRequests.get(key);\n          // Trigger re-render to use the new cached value\n          forceUpdate({});\n        } catch (error) {\n          console.error(\"[STRIPE-PREFETCH] Error waiting for prefetch:\", key);\n        }\n      }\n    };\n\n    // Start preloading (don't await - run in background)\n    preloadSecrets();\n  }, [\n    isStripeEnabled,\n    stripePromise,\n    cartConfigurations,\n    generateCacheKey,\n    offerKey,\n    fetchData,\n    fetchClientSecretForConfig,\n  ]);\n\n  // Create a wrapper function that uses cached values when available or fetches on-demand\n  const wrappedFetchClientSecret = useCallback(async () => {\n    // Always use the current cart configuration\n    const currentKey = generateCacheKey(currentCartConfig);\n\n    // Check if we have a valid cached value\n    const cached = sharedClientSecretCache.get(currentKey);\n    const isValidCache =\n      cached && Date.now() - cached.timestamp < 23 * 60 * 60 * 1000;\n\n    if (isValidCache) {\n      console.debug(\"[STRIPE-PREFETCH] Cache hit for key:\", currentKey);\n      return cached.clientSecret;\n    }\n\n    // Check if there's already an in-flight request for this configuration\n    const inflightRequest = sharedInflightRequests.get(currentKey);\n    if (inflightRequest) {\n      console.debug(\"[STRIPE-PREFETCH] Waiting on in-flight request:\", currentKey);\n      return inflightRequest;\n    }\n\n    console.debug(\"[STRIPE-PREFETCH] On-demand fetch for key:\", currentKey);\n\n    // Create a new request and track it as in-flight\n    const fetchPromise = fetchClientSecretForConfig(currentCartConfig)\n      .then((clientSecret) => {\n        sharedClientSecretCache.set(currentKey, {\n          clientSecret,\n          timestamp: Date.now(),\n        });\n        return clientSecret;\n      })\n      .finally(() => {\n        sharedInflightRequests.delete(currentKey);\n      });\n\n    sharedInflightRequests.set(currentKey, fetchPromise);\n\n    return fetchPromise;\n  }, [currentCartConfig, generateCacheKey, fetchClientSecretForConfig]);\n\n  // Return undefined if offerKey is not available yet\n  if (!offerKey) {\n    return undefined;\n  }\n\n  if (!isStripeEnabled) {\n    return undefined;\n  }\n\n  return wrappedFetchClientSecret;\n};\n\n/**\n * Extract Stripe checkout session ID from a client secret string.\n * Client secrets follow the format: cs_xxx_secret_yyy\n * The session ID is everything before \"_secret_\".\n */\nconst extractSessionId = (clientSecret: string): string | null => {\n  const secretIndex = clientSecret.indexOf(\"_secret_\");\n  if (secretIndex === -1) return null;\n  return clientSecret.substring(0, secretIndex);\n};\n\n/**\n * Hook that returns a callback to update metadata on a single checkout session.\n * Reuses useFetchFromArccos (same as stripe.tsx's updateCheckoutSession pattern).\n */\nexport const useUpdateCheckoutSessionMetadata = () => {\n  const fetchFromArccos = useFetchFromArccos();\n\n  return useCallback(\n    async (sessionId: string, metadata: Record<string, string>) => {\n      await fetchFromArccos({\n        path: \"/stripe/checkout_session\",\n        body: { session_id: sessionId, metadata },\n        init: { method: \"PUT\" },\n      });\n    },\n    [fetchFromArccos],\n  );\n};\n\n/**\n * Hook that returns a callback to update metadata on all cached checkout sessions.\n * Used after email validation to attach the arccos_user_id to pre-created sessions.\n */\nexport const useUpdateCheckoutSessionsMetadata = () => {\n  const updateSessionMetadata = useUpdateCheckoutSessionMetadata();\n\n  return useCallback(\n    async (metadata: Record<string, string>) => {\n      const entries = Array.from(sharedClientSecretCache.entries());\n      if (entries.length === 0) return;\n\n      console.debug(\n        \"[STRIPE-PREFETCH] Updating metadata on\",\n        entries.length,\n        \"cached sessions\",\n      );\n\n      const updatePromises = entries.map(async ([key, entry]) => {\n        const sessionId = extractSessionId(entry.clientSecret);\n        if (!sessionId) {\n          console.error(\n            \"[STRIPE-PREFETCH] Could not extract session ID for cache key:\",\n            key,\n          );\n          return;\n        }\n\n        try {\n          await updateSessionMetadata(sessionId, metadata);\n        } catch (error) {\n          console.error(\n            \"[STRIPE-PREFETCH] Failed to update metadata for session:\",\n            sessionId,\n            error,\n          );\n        }\n      });\n\n      await Promise.allSettled(updatePromises);\n    },\n    [updateSessionMetadata],\n  );\n};\n\n// Export helper functions for tests\nexport const clearCachesForTesting = () => {\n  sharedClientSecretCache.clear();\n  sharedInflightRequests.clear();\n};\n\nexport const populateCacheForTesting = (\n  key: string,\n  clientSecret: string,\n) => {\n  sharedClientSecretCache.set(key, {\n    clientSecret,\n    timestamp: Date.now(),\n  });\n};\n","/**\n * Browser-side fire-and-forget helpers for the three mid-funnel\n * events (`Lead`, `InitiateCheckout`, `AddPaymentInfo`).\n *\n * Each helper POSTs the matching `/api/server-analytics/*` endpoint. Errors are\n * swallowed — analytics fire must never surface to the funnel UI.\n *\n * The `eventId` arg is browser-owned (see\n * `src/util/conversion-event-id.mts` for the per-event keying strategy).\n * The same `eventId` must be passed to the corresponding\n * `analytics.track('Lead' | 'InitiateCheckout' | 'AddPaymentInfo', ...,\n * { eventID })` call at the same fire site so Meta dedupes the\n * browser↔server pair on the legacy dataset.\n *\n * Mirrors the shape of `./fire-server-analytics.mts`. Three near-\n * identical helpers in one file (rather than three files) because\n * splitting would add 90% duplication; the per-event endpoints already\n * give per-event CloudWatch slicing.\n *\n * Plan: docs/plans/2026-05-19-001-feat-activation-server-analytics-port-plan.md (U10).\n */\n\ninterface CommonParams {\n    eventId: string\n    email: string\n    offerKey: string\n    partner?: string\n    stableId?: string\n}\n\nexport interface FireLeadParams extends CommonParams {\n    userId?: string\n    firstName?: string\n    lastName?: string\n    city?: string\n    state?: string\n    zip?: string\n    country?: string\n}\n\nexport interface FireInitiateCheckoutParams extends CommonParams {\n    userId: string\n    value?: number\n    currency?: string\n}\n\nexport interface FireAddPaymentInfoParams extends CommonParams {\n    userId: string\n    paymentMethod?: string\n}\n\nfunction getCookie(name: string): string | undefined {\n    if (typeof document === 'undefined') return undefined\n    const cookies = document.cookie.split('; ')\n    const match = cookies.find((c) => c.startsWith(`${name}=`))\n    return match ? decodeURIComponent(match.slice(name.length + 1)) : undefined\n}\n\nfunction readFbclidFromUrl(): string | undefined {\n    if (typeof window === 'undefined') return undefined\n    const params = new URLSearchParams(window.location.search)\n    return params.get('fbclid') ?? undefined\n}\n\nasync function fire(path: string, body: Record<string, unknown>): Promise<void> {\n    try {\n        await fetch(path, {\n            method: 'POST',\n            credentials: 'include',\n            headers: { 'Content-Type': 'application/json' },\n            body: JSON.stringify(body),\n            keepalive: true,\n        })\n    } catch {\n        // Silent — analytics fire must never surface to the UI.\n    }\n}\n\nexport async function fireLead(params: FireLeadParams): Promise<void> {\n    if (!params.eventId || !params.email || !params.offerKey) return\n    await fire('/api/server-analytics/lead', {\n        eventId: params.eventId,\n        email: params.email,\n        offerKey: params.offerKey,\n        userId: params.userId,\n        partner: params.partner,\n        stableId: params.stableId,\n        fbp: getCookie('_fbp'),\n        fbc: getCookie('_fbc'),\n        fbclid: readFbclidFromUrl(),\n        firstName: params.firstName,\n        lastName: params.lastName,\n        city: params.city,\n        state: params.state,\n        zip: params.zip,\n        country: params.country,\n    })\n}\n\nexport async function fireInitiateCheckout(\n    params: FireInitiateCheckoutParams,\n): Promise<void> {\n    if (!params.eventId || !params.email || !params.userId || !params.offerKey) return\n    await fire('/api/server-analytics/initiate-checkout', {\n        eventId: params.eventId,\n        email: params.email,\n        userId: params.userId,\n        offerKey: params.offerKey,\n        value: params.value,\n        currency: params.currency,\n        partner: params.partner,\n        stableId: params.stableId,\n        fbp: getCookie('_fbp'),\n        fbc: getCookie('_fbc'),\n        fbclid: readFbclidFromUrl(),\n    })\n}\n\nexport async function fireAddPaymentInfo(\n    params: FireAddPaymentInfoParams,\n): Promise<void> {\n    if (!params.eventId || !params.email || !params.userId || !params.offerKey) return\n    await fire('/api/server-analytics/add-payment-info', {\n        eventId: params.eventId,\n        email: params.email,\n        userId: params.userId,\n        offerKey: params.offerKey,\n        paymentMethod: params.paymentMethod,\n        partner: params.partner,\n        stableId: params.stableId,\n        fbp: getCookie('_fbp'),\n        fbc: getCookie('_fbc'),\n        fbclid: readFbclidFromUrl(),\n    })\n}\n","/**\n * Browser-side event_id generators for Meta Pixel ↔ CAPI dedup.\n *\n * Every funnel event must fire to fbq AND to the server CAPI endpoint\n * with the same event_id so Meta dedupes the pair on the legacy\n * dataset (`1485154478460843`). The browser is the canonical source of\n * the id — the server uses what the browser sends verbatim. Per-event\n * keying matches sv-activate's pattern and the user-journey shape:\n *\n *   - Lead              keyed by email          (retries of email\n *                                                submit reuse the id)\n *   - InitiateCheckout  keyed by offerKey       (re-entering /payment\n *                                                for the same offer\n *                                                reuses the id)\n *   - AddPaymentInfo    fresh UUID per call     (each Stripe submit\n *                                                attempt is its own\n *                                                event — different\n *                                                card → new id)\n *   - StartTrial /      keyed by stripeSessionId (success page reloads\n *     CompleteRegistration                       reuse the id)\n *\n * `sessionStorage` persists the id across reloads within the same tab\n * but resets across tabs / browser restarts. That's the right granularity\n * for these events — reloads within the same flow should dedup; a fresh\n * tab is a new session and a new event is correct.\n *\n * Fallback: when `sessionStorage` is unavailable (Safari private mode,\n * embedded WebViews with restricted storage), the helpers generate a\n * fresh UUID per call without persistence. The caller is responsible\n * for stashing it in a React ref / memoized state so the browser fire\n * and server fire within one mount share the id. Reload edge case in\n * that environment is accepted noise (small population, hard to\n * mitigate).\n *\n * Plan: docs/plans/2026-05-19-001-feat-activation-server-analytics-port-plan.md (U8 + U10).\n */\n\nconst LEAD_PREFIX = 'lead_event_id'\nconst IC_PREFIX = 'ic_event_id'\nconst CONVERSION_PREFIX = 'conversion_event_id'\n\nfunction newId(): string {\n    // crypto.randomUUID is available on all modern browsers (Chrome 92+,\n    // Safari 15.4+, Firefox 95+). Falls back to a non-crypto UUID-shape\n    // hex if absent — good enough as a dedup key; not used for security.\n    if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n        return crypto.randomUUID()\n    }\n    // RFC 4122-shape fallback. Not cryptographically random.\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n        const r = (Math.random() * 16) | 0\n        const v = c === 'x' ? r : (r & 0x3) | 0x8\n        return v.toString(16)\n    })\n}\n\nfunction getOrCreate(key: string): string {\n    if (typeof sessionStorage === 'undefined') return newId()\n    try {\n        const existing = sessionStorage.getItem(key)\n        if (existing) return existing\n        const fresh = newId()\n        sessionStorage.setItem(key, fresh)\n        return fresh\n    } catch {\n        // sessionStorage throws on quota-exceeded or in disabled-storage\n        // environments — fall back to per-call generation.\n        return newId()\n    }\n}\n\n/**\n * Lead event_id keyed by submitted email. Empty/missing email returns\n * a fresh per-call UUID (no sessionStorage write — the empty namespace\n * key would collide across users).\n */\nexport function getOrCreateLeadEventId(email: string): string {\n    const trimmed = email.trim().toLowerCase()\n    if (!trimmed) return newId()\n    return getOrCreate(`${LEAD_PREFIX}:${trimmed}`)\n}\n\n/**\n * InitiateCheckout event_id keyed by offerKey. Re-entering /payment for\n * the same offer in the same tab reuses the id so Meta dedupes the\n * re-fire. A different offer (rare — user navigates back and picks a\n * different plan) generates a fresh id, which is correct.\n */\nexport function getOrCreateICEventId(offerKey: string): string {\n    const trimmed = offerKey.trim()\n    if (!trimmed) return newId()\n    return getOrCreate(`${IC_PREFIX}:${trimmed}`)\n}\n\n/**\n * AddPaymentInfo event_id — fresh UUID per submission attempt. Stripe\n * card retries with a different card count as distinct events to Meta;\n * we do NOT persist so each submission gets its own id.\n */\nexport function generateAddPaymentInfoEventId(): string {\n    return newId()\n}\n\n/**\n * StartTrial + CompleteRegistration event_id, keyed by Stripe session.\n * Success-page reloads reuse the id so Meta dedupes the duplicate fire.\n * The same id is used for BOTH events — Meta dedupes per\n * `(event_name, event_id)`, so StartTrial and CR with the same id are\n * still two distinct events at Meta.\n *\n * If `stripeSessionId` is empty (defensive guard — should never happen\n * on the success page since the session_id query param is always\n * present), returns a fresh per-call UUID without persistence.\n */\nexport function getOrCreateConversionEventId(stripeSessionId: string): string {\n    const trimmed = stripeSessionId.trim()\n    if (!trimmed) return newId()\n    return getOrCreate(`${CONVERSION_PREFIX}:${trimmed}`)\n}\n","import * as Sentry from \"@sentry/react\";\nimport { useUserId } from \"../../redux/slices/auth/auth-selectors.mjs\";\nimport { useApiDataFetcher, useInsertUser, useValidateOffer, ArccosNetworkError } from \"../arccos/arccos-api.mjs\";\nimport {\n    setUserCurrency,\n    useCurrency,\n    useShouldIncludeLink,\n    useShouldIncludeSensors\n} from \"../../redux/slices/offers/offers-slice.mjs\";\nimport { useDispatch } from \"react-redux\";\nimport { useMutation, useQuery } from \"@tanstack/react-query\";\nimport { getServerSideOffers, getStatsigUserCountry } from \"../../initial-state/intial-state-accessors.mjs\";\nimport { getPartnerFromWindowLocation, isSensorlessDomain, isSensorlessDomainFromHost, isOnsiteEventPartner } from \"../../../util/partner-selectors.mjs\"\nimport { setEmail as queryParamSetEmail } from \"../../url/query-params.mjs\";\nimport { Page, useNavigate } from \"../../../util/navigation.mjs\";\nimport { useUpdateAccessToken, useUpdateRefreshToken } from \"../arccos/arccos-api-auth.mjs\";\nimport { v4 as uuidV4 } from 'uuid'\nimport { ArccosError } from \"../../../util/arccos-error.mjs\";\nimport { useCallback } from \"react\";\nimport { setRefreshToken, setUserId } from \"../../redux/slices/auth/auth-slice.mjs\";\nimport { useAlpsExperimentOfferKey, useShouldUseAlpsExperiment, getIsAlpsNext, getIsVintageExperience } from \"../../../util/alps-experiment.mts\";\nimport { setCustomerId } from \"../../redux/slices/auth/auth-slice.mts\";\nimport { useUpdateCheckoutSessionsMetadata } from \"../../../util/stripe-prefetch-utils.ts\";\nimport { analytics } from \"../../../analytics/analytics.mjs\";\nimport { fireLead } from \"../../server-analytics/fire-mid-funnel.mts\";\nimport { getOrCreateLeadEventId } from \"../../../util/conversion-event-id.mts\";\n\nexport type Currency = 'USD' | 'CAD' | 'EUR' | 'GBP' | 'AUD' | 'JPY' | 'KRW' | string\n\ntype BaseLineItem = {\n    key: ProductKey\n    is_required: boolean\n    original_price: number\n    actual_price: number\n    [key: string]: any\n    description?: string\n    partner_id?: number\n    charge_type: 'INITIAL' | 'RECURRING' | 'SCHEDULED'\n    line_item_version?: number\n    phases?: {\n        items: [{\n            key: string\n            charge_amount: number\n            original_price?: number\n            deferred_units: 'day' | 'month' | 'year' | string\n            deferred_length: number | null\n            phase_length?: number\n        }]\n        iterations: 1 | -1\n    }[]\n}\n\nexport type InitialLineItem = BaseLineItem & {\n    charge_type: 'INITIAL'\n}\n\nexport type RecurringLineItem = BaseLineItem & {\n    charge_type: 'RECURRING'\n}\n\nexport type ScheduledLineItem = BaseLineItem & {\n    charge_type: 'SCHEDULED'\n    item_group?: string\n    phases: {\n        items: {\n            key: 'link_pro_conversion' | string\n            charge_amount: number\n            original_price?: number\n            deferred_units: 'day' | 'month' | 'year' | string\n            deferred_length: number | null\n            phase_length?: number\n            phase_units?: 'day' | 'month' | 'year' | string\n\n        }[]\n        iterations: 1 | -1\n    }[]\n}\n\nexport type LineItem = InitialLineItem | RecurringLineItem | ScheduledLineItem\n\nexport type RedemptionOption = {\n    currency: Currency\n    resubscribeSubscriptionId?: number\n    lineItems: LineItem[]\n}\n\nexport type ProductKey = 'subscription' | 'link' | 'sensors' | 'shipping' | string\n\nexport type Offer = {\n    version: 3\n    key: string\n    redemptionOptions: RedemptionOption[]\n    acceptableUserStates?: UserState[]\n    trialPeriodDays?: number\n    eligibleCountriesByCurrency?: { [k: Currency]: string[] }\n    redemptionMethod?: string\n}\n\ntype AccountState = 'NEW' | 'EXISTING'\ntype SubscriptionState =\n    'NEVER_HAD_SUBSCRIPTION' |\n    'HAS_HAD_SUBSCRIPTION' |\n    'HAS_ACTIVE_SUBSCRIPTION' |\n    'SUBSCRIBED' |\n    'LEGACY' |\n    'CANCELED_SUBSCRIPTION' |\n    'CANCELED_SUBSCRIPTION_OVER_90_DAYS'\n\ntype UserState = {\n    accountState: AccountState[]\n    subscriptionState: SubscriptionState[]\n}\n\nexport type OffersResponse = {\n    offers: Offer[]\n    userState: UserState\n}\n\nexport const getShouldOfferLinkProTrial = (partner?: string) => [\n    'ping',\n    'cobra',\n    'dunlopsports',\n    'skillest',\n    'affiliate',\n    'taylormade',\n    'clubchampion',\n    'mmg',\n    'easports',\n    'gbc',\n    'tpc',\n    'titleist',\n    'team-titleist',\n].includes(partner || getPartnerFromWindowLocation()) && ['US', 'CA'].includes(getStatsigUserCountry())\n\nconst usePartnerKey = () => {\n    const partner = getPartnerFromWindowLocation()\n\n    if (isSensorlessDomain()) {\n        return 'SENSORLESS_UNIVERSAL_OFFER'\n    }\n\n    if (partner === 'link-pro') {\n        return '30_DAY_174_99_LINK_PRO_TRIAL_FOR_EXISTING_USERS'\n    }\n\n    if (isOnsiteEventPartner(partner)) {\n        return '199_SUB_30_DAY_TRIAL_NO_SHIPPING_WITH_ARCCOS_AIR_TRIAL'\n    }\n\n    if (getIsVintageExperience()) {\n        return '199_SUB_45_DAY_TRIAL_9_99_SHIPPING_WITH_CK_AND_174_99_LINK_PRO_TRIAL_V3'\n    }\n\n    const shouldUseAlpsExperiment = useShouldUseAlpsExperiment()\n    const shouldUseAlpsNext = getIsAlpsNext()\n    const alpsExperimentOfferKey = useAlpsExperimentOfferKey()\n\n    if (shouldUseAlpsExperiment || shouldUseAlpsNext) {\n        return alpsExperimentOfferKey\n    } else {\n        const country = getStatsigUserCountry()\n        const isUsOrCa = ['US', 'CA'].includes(country)\n        if (partner !== 'smart-laser' && partner !== 'referrals' && isUsOrCa) {\n            return '199_SUB_45_DAY_TRIAL_9_99_SHIPPING_WITH_CK_AND_174_99_LINK_PRO_TRIAL_V3'\n        }\n\n        return getPartnerKey(partner, window.location.hostname, { country })\n    }\n}\n\nexport const getPartnerKey = (partner: string, host?: string, options?: { alpsExperience?: string, alpsNextGate?: boolean, country?: string, variant?: string }) => {\n    if (isSensorlessDomainFromHost(host)) {\n        return 'SENSORLESS_UNIVERSAL_OFFER'\n    }\n\n    if (isOnsiteEventPartner(partner)) {\n        return '199_SUB_30_DAY_TRIAL_NO_SHIPPING_WITH_ARCCOS_AIR_TRIAL'\n    }\n\n    // Mirrors getIsVintageExperience: vintage is the default for US/CA\n    // users unless they opt out via variant=modern or alps_experience=false/alps-next.\n    // Onsite-event partners and titleist are excluded — they get the Air trial path instead.\n    const isUsOrCa = options?.country === 'US' || options?.country === 'CA'\n    const isVintage = isUsOrCa\n        && partner !== 'referrals'\n        && partner !== 'titleist'\n        && options?.variant !== 'modern'\n        && options?.alpsExperience !== 'false'\n        && options?.alpsExperience !== 'alps-next'\n\n    if (isVintage) {\n        return '199_SUB_45_DAY_TRIAL_9_99_SHIPPING_WITH_CK_AND_174_99_LINK_PRO_TRIAL_V3'\n    }\n\n    // alps_experience=false (legacy ad-campaign param) and variant=modern (readable equivalent)\n    // both explicitly opt out of Air/Alps offer keys.\n    if (options?.alpsExperience !== 'false' && options?.variant !== 'modern') {\n        // Alps-next detection (mirrors getIsAlpsNext): query param, statsig gate, OR titleist partner.\n        const isAlpsNext = options?.alpsExperience === 'alps-next'\n            || options?.alpsNextGate === true\n            || partner === 'titleist'\n        if (isAlpsNext\n            && partner !== 'referrals'\n            && (options?.country === 'US' || options?.country === 'CA')) {\n            return '199_SUB_30_DAY_TRIAL_SENSORLESS_WITH_174_99_LINK_PRO_TRIAL_V3'\n        }\n\n        if (options?.alpsExperience === 'alps') {\n            return '199_SUB_30_DAY_TRIAL_SENSORLESS_WITH_174_99_LINK_PRO_TRIAL_V3'\n        }\n    }\n\n    const shouldUseLinkProTrial = getShouldOfferLinkProTrial(partner)\n\n    const default_offer_key = shouldUseLinkProTrial\n        ? '199_SUB_45_DAY_TRIAL_9_99_SHIPPING_WITH_CK_AND_224_99_LINK_PRO_TRIAL_V2'\n        : '199_SUB_45_DAY_TRIAL_9_99_SHIPPING_WITH_CK_V3'\n\n    return getOfferKeyForPartner(partner, default_offer_key)\n}\n\n\nconst getOfferKeyForPartner = (partner: string, default_offer_key: string) => {\n\n    switch (partner) {\n        case 'clubchampion-instore':\n            return '199_SUB_45_DAY_TRIAL_NO_SHIPPING'\n        case 'referrals':\n            return 'STRIPE_REFERRAL_UNIVERSAL_OFFER'\n        case 'cap-in-app':\n            return '199_SUB_0_DAY_TRIAL_9_99_SHIPPING_WITH_CK'\n        case 'smart-laser':\n            return 'SMART_LASER_PREORDER'\n        case 'clubchampion':\n        case 'mmg':\n        case \"easports\":\n        case \"gbc\":\n        case \"tpc\":\n        case 'ping':\n        case 'cobra':\n        case \"dunlopsports\":\n        case 'skillest':\n        case \"affiliate\":\n        case 'taylormade':\n        default:\n            return default_offer_key\n    }\n\n}\n\nexport const doesPartnerHaveLinkProTrial = () => {\n    const partner = getPartnerFromWindowLocation()\n    return [\n        'ping',\n        'cobra',\n        'dunlopsports',\n        'skillest',\n        'affiliate',\n        'taylormade',\n        'clubchampion',\n        'mmg',\n        'easports',\n        'gbc',\n        'tpc',\n        'titleist',\n        'team-titleist',\n    ].includes(partner)\n}\n\ntype UseOffersResponseOptions = {\n    forceUseClientSideData?: boolean\n}\n\nexport const useOffersResponse = (options?: UseOffersResponseOptions) => {\n    const userId = useUserId()\n    const locale = 'en-US'\n    const partner = getPartnerFromWindowLocation()\n    const fetchData = useApiDataFetcher<OffersResponse, undefined>()\n    const dispatch = useDispatch()\n    const currency = useCurrency()\n    const key = usePartnerKey()\n\n    // Safely get server-side prefetched offers data\n    let serverSideOffers: OffersResponse | undefined;\n    try {\n        serverSideOffers = typeof window !== 'undefined' ? getServerSideOffers() : undefined;\n    } catch (e) {\n        console.warn('Error accessing server-side offers:', e);\n        serverSideOffers = undefined;\n    }\n\n    if (partner === 'za') {\n        return\n    }\n\n    // Use suspense query with placeholderData from server-side\n    const query = useQuery({\n        queryKey: ['offers', userId, locale, partner, key],\n        queryFn: () => fetchData({\n            path: '/v3/offers',\n            params: { userId, locale, partner, key },\n        }),\n        // Don't use server-side data as placeholder if forceUseClientSideData is true\n        placeholderData: options?.forceUseClientSideData ? undefined : serverSideOffers,\n    })\n\n    if (!currency) {\n        const redemptionOptions = query.data?.offers?.[0]?.redemptionOptions\n        if (redemptionOptions?.length) {\n            const usersCountryCode = getStatsigUserCountry()\n            const desiredCurrency = usersCountryCode ?\n                getCurrencyByCountryCode(usersCountryCode) :\n                'USD'\n            const newCurrency = redemptionOptions.find(option => option.currency === desiredCurrency)?.currency ||\n                redemptionOptions[0].currency\n            dispatch(setUserCurrency(newCurrency))\n        }\n    }\n    return query.data\n}\n\nexport const useUserState = (options?: UseOffersResponseOptions) => useOffersResponse(options)?.userState\n\nexport const useUserAccountState = (options?: UseOffersResponseOptions) => useUserState(options)?.accountState\n\nexport const useUserSubscriptionState = (options?: UseOffersResponseOptions) => useUserState(options)?.subscriptionState\n\nexport const useOffers = (options?: UseOffersResponseOptions) => useOffersResponse(options)?.offers\n\nexport const useOffer = (options?: UseOffersResponseOptions) => {\n    const offers = useOffers(options)\n    return offers?.[0]\n}\n\nexport const useOfferKey = (options?: UseOffersResponseOptions) => {\n    const value = useOffer(options)?.key\n    console.log('[OFFERS-QUERY] useOfferKey read:', { value, options })\n    return value\n}\n\nexport const useRedemptionOptions = (options?: UseOffersResponseOptions) => useOffer(options)?.redemptionOptions\n\nexport const useAcceptableUserStates = (options?: UseOffersResponseOptions) => useOffer(options)?.acceptableUserStates\n\nexport const useAvailableCurrencies = (options?: UseOffersResponseOptions) => useRedemptionOptions(options)?.map(option => option.currency)\n\nexport const useSelectedRedemptionOption = (options?: UseOffersResponseOptions) => {\n    const currency = useCurrency()\n    return useRedemptionOptions(options)?.find(option => option.currency === currency)\n}\n\nexport const useSubscriptionOptions = (options?: UseOffersResponseOptions) => {\n    const selectedRedemptionOption = useSelectedRedemptionOption(options)\n    const lineItems = selectedRedemptionOption?.lineItems\n    const subscriptionOptions = lineItems?.filter(item => item.item_group === 'smart_laser_preorder')\n    return subscriptionOptions\n}\n\nexport const useSelectedLineItems = (options?: UseOffersResponseOptions) => {\n    const value = useSelectedRedemptionOption(options)?.lineItems\n    console.log('[OFFERS-QUERY] useSelectedLineItems read:', {\n        value: value?.map(item => ({ key: item.key, is_required: item.is_required })),\n        options\n    })\n    return value\n}\n\nexport const useSelectedSubscriptionLineItem = (options?: UseOffersResponseOptions) => useSelectedLineItems(options)?.find(item => item.key === 'subscription')\n\nexport const useSelectedShippingAndHandlingLineItem = (options?: UseOffersResponseOptions) => useSelectedLineItems(options)?.find(item => item.key === 'shipping_and_handling')\n\nexport const useSelectedLinkGen2LineItem = (options?: UseOffersResponseOptions) => {\n    const value = useSelectedLineItems(options)?.find(item => ['link_pro', 'link_gen_2'].includes(item?.key))\n    console.log('[OFFERS-QUERY] useSelectedLinkGen2LineItem read:', {\n        value: value ? { key: value.key, is_required: value.is_required, charge_type: value.charge_type } : null,\n        options\n    })\n    return value\n}\n\nexport const useSelectedCompletionKitLineItem = (options?: UseOffersResponseOptions) => useSelectedLineItems(options)?.find(item => item.key === 'completion_kit')\n\nexport const useIsCKOptional = (options?: UseOffersResponseOptions) => useSelectedCompletionKitLineItem(options)?.is_required === false\n\nexport const useTrialPeriodDays = (options?: UseOffersResponseOptions) => useOffer(options)?.trialPeriodDays\n\nexport const useEligibleCountriesByCurrency = () => useOffer()?.eligibleCountriesByCurrency\n\nexport const useRedemptionMethod = () => useOffer()?.redemptionMethod\n\nexport const useTotalPrice = () => {\n    const shouldIncludeOptionalSensors = useShouldIncludeSensors()\n    const isSensorAddonActivated = useIsCKOptional() ? shouldIncludeOptionalSensors : true\n    const isLinkOfferActivated = useShouldIncludeLink()\n    const trialPeriodDays = useTrialPeriodDays()\n    const annualSubscriptionPrice = useSelectedSubscriptionLineItem()?.actual_price || 0\n    const currency = useCurrency()\n\n    const initialPrice = useSelectedLineItems()\n        .filter(l => l.charge_type === 'INITIAL')\n        .filter(l => !['link_pro', 'link_gen_2'].includes(l?.key) || isLinkOfferActivated)\n        .filter(l => l.key !== 'shipping_and_handling' || isSensorAddonActivated)\n        .map(l => l.actual_price)\n        .reduce((a, b) => a + b, 0)\n\n    const unroundedTotalPrice = initialPrice +\n        (trialPeriodDays ? 0 : annualSubscriptionPrice)\n\n    if ([\n        'JPY',\n        'KRW',\n        'ZAR',\n    ].includes(currency)) {\n        return Math.round(unroundedTotalPrice)\n    }\n\n    return Math.round(unroundedTotalPrice * 100) / 100\n}\n\nexport type PaymentSource = {\n    pfToken: string\n} | {\n    applePayToken: string\n} | {\n    googlePayToken: string\n}\n\nexport type CreateSubscriptionFuncRequestBody = {\n    userId: string\n    offerKey: string\n    currency: string\n    products: ProductKey[]\n    paymentSource: PaymentSource\n    shippingInformation: ShippingInformation\n    clientTags?: string[]\n    redemptionCode?: string\n}\n\n\ntype ShippingInformation = {\n    address1: string\n    address2?: string\n    city: string\n    country: string\n    email?: string\n    firstName: string\n    lastName: string\n    state: string\n    zip: string\n}\n\ntype CreateSubscriptionFuncParams = {\n    body: CreateSubscriptionFuncRequestBody\n}\n\nexport const useRedeemOfferFunc = () => {\n    const dataFetcher = useApiDataFetcher<unknown, CreateSubscriptionFuncRequestBody>()\n    const { mutateAsync } = useMutation<unknown, unknown, CreateSubscriptionFuncParams>({\n\n        mutationFn: (params) => {\n            const {\n                body,\n            } = params\n\n            // Define custom error handler specifically for the redeemOffer function\n            const redeemOfferErrorHandler = (error: { responseBody?: { error_code?: string }, status: number }) => {\n                // Add any specific error handling for redeemOffer here\n                // Return an ArccosError if you want to override the default handling\n                // Return null to fall back to default error handling\n\n                // Example of custom error handling specific to offer redemption\n                // if the error is a standardized arccos error, throw an arccos error\n                switch (error?.responseBody?.error_code) {\n                    case 'ORDER_PLACEMENT_FAILED': {\n                        throw new ArccosError({\n                            message: \"When we attempted to process your order, we successfully charged your card, but the order didn't go through to the fulfillment center correctly. You may temporarily see a charge on your card, but we have successfully processed a refund. Please email starter@arccosgolf.com and let them know what happened so that we can help you complete your order. Thank you for your patience.\",\n                        })\n                    }\n                    case 'DUPLICATE_ADDRESS': {\n                        throw new ArccosError({\n                            message: \"We were unable to place your order because the address you entered has been used too many times. You may temporarily see a charge on your card, but we have successfully processed a refund. If you feel this is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'INVALID_COUNTRY': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the country you entered is not eligible for this offer. You may temporarily see a charge on your card, but we have successfully processed a refund. If you feel this is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'INCORRECT_PAYMENT_DETAILS': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the details you entered are incorrect. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'RESTRICTED_CARD': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the card you entered is restricted. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'CVV_ERROR': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the CVV code you entered is incorrect. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'EXPIRED_TOKEN': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the session has expired. Please refresh the page and try again. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'INVALID_CARD_NUMBER': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the card number you entered is invalid. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance. \",\n                        })\n                    }\n                    case 'EXPIRED_CARD': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the card you entered has expired. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'INVALID_TRANSACTION': {\n                        throw new ArccosError({\n                            message: \"We were unable to process your payment because the transaction is invalid. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'PICKUP_CARD': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because the card you entered has been reported lost or stolen. Please use a different card or contact your card issuer for more information. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'CARD_LOST_OR_STOLEN': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because the card you entered has been reported lost or stolen. Please use a different card or contact your card issuer for more information. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'ERROR_IN_REQUEST': {\n                        // TODO\n                        throw new ArccosError({\n                            message: \"There was an error in your payment request. Please review your information and try again. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'AUTHORIZATION_REVOKED': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because authorization for this transaction has been revoked. Please use a different payment method or contact your card issuer. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'HIGH_RISK_ERROR': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because it was flagged as high risk. Please try a different payment method or contact us at starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'DO_NOT_HONOR': {\n                        throw new ArccosError({\n                            message: \"Your payment was declined by the issuing bank. Please try a different payment method or try again in 24 hours. If you have questions, contact your bank or card issuer. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'LIMIT_EXCEEDED': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because your card's limit has been exceeded. Please use a different card or try again later. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'INSUFFICIENT_FUNDS': {\n                        throw new ArccosError({\n                            message: \"Your payment could not be processed due to insufficient funds. Please use a different payment method or add funds and try again. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'ACCOUNT_CLOSED': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because the account associated with this card is closed. Please use a different card. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'NEW_ACCOUNT_INFORMATION_AVAILABLE': {\n                        throw new ArccosError({\n                            message: \"Your payment could not be processed because the account associated with this card is no longer active. Please contact your card issuer for more details or use a different card. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'STRONG_CUSTOMER_AUTHENTICATION_REQUIRED': {\n                        throw new ArccosError({\n                            message: \"This transaction requires additional authentication. Please check your card details and try again, or contact your bank for assistance.\",\n                        })\n                    }\n                    case 'THREE_D_SECURITY_AUTHENTICATION_REQUIRED': {\n                        throw new ArccosError({\n                            message: \"This transaction requires 3D Secure authentication. Please complete the authentication process or use a different card. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'THE_ISSUER_IS_UNAVAILABLE_OR_OFFLINE': {\n                        throw new ArccosError({\n                            message: \"We're unable to process your payment because your card issuer is currently unavailable. Please try again later. If you feel this error is incorrect, please contact starter@arccosgolf.com for assistance.\",\n                        })\n                    }\n                    case 'MERCHANT_CONFIGURATION_ERROR':\n                    case 'SYSTEM_TECHNICAL_ERROR':\n                    case 'VALIDATION_GENERAL_FAILURE':\n                    case 'PROCESSING_AMOUNT_ERROR':\n                    default: {\n                        throw new ArccosError({\n                            message: \"An unknown error occurred. Please try again. If this issue persists, or if you feel this error is incorrect, please contact starter@arccosgolf.com.\",\n                        })\n                    }\n                }\n            };\n\n            return dataFetcher({\n                path: `/v3/offers/redeem`,\n                body,\n                init: {\n                    method: 'POST',\n                },\n                retries: 0,\n                timeout: 30000,\n                customErrorHandler: redeemOfferErrorHandler,\n            });\n        },\n    })\n    return mutateAsync\n}\n\n\nexport const useValidateOfferAndCreateUser = () => {\n    const password = uuidV4()\n    const navigate = useNavigate()\n    const updateRefreshToken = useUpdateRefreshToken()\n    const updateAccessToken = useUpdateAccessToken()\n    const insertUser = useInsertUser()\n    const acceptableUserStates = useAcceptableUserStates()\n    const validateOffer = useValidateOffer()\n    const dispatch = useDispatch()\n    const offerKey = useOfferKey()\n    const partner = getPartnerFromWindowLocation()\n    const updateCheckoutSessionsMetadata = useUpdateCheckoutSessionsMetadata()\n\n    return useCallback(async (\n        email: string,\n        setError: (error: ArccosError) => void,\n        isReferral?: boolean,\n        redemptionCode?: string,\n\n    ) => {\n        console.log('[VALIDATE-AND-CREATE-USER] Starting validation with params:', {\n            email,\n            offerKey,\n            isReferral,\n            redemptionCode,\n            timestamp: Date.now()\n        })\n\n        const validationResult = await validateOffer({ email, offerKey, isReferral, redemptionCode })\n\n\n        if (validationResult.valid === undefined) {\n            setError({ name: \"ArccosValidationError\", message: 'An error occurred. Please try again.', title: 'Error' })\n        }\n        if (validationResult.valid === false) {\n            if (validationResult.validationErrors.includes('INVALID_REFERRAL_CODE')) {\n                setError({\n                    name: \"ArccosValidationError\",\n                    message: 'This referral link is invalid. Please double-check the link and try again.',\n                    title: 'Invalid Referral'\n                })\n                return\n            } else if (validationResult.validationErrors.includes('REFERRAL_CODE_ALREADY_REDEEMED')) {\n                setError({\n                    name: \"ArccosValidationError\",\n                    message: 'This referral link has already been redeemed. Please double-check the link and try again.',\n                    title: 'Referral Already Redeemed'\n                })\n            }\n\n            if (validationResult.validationErrors.includes('USER_HAS_ALREADY_REDEEMED_OFFER')) {\n                setError({\n                    name: \"ArccosValidationError\",\n                    message: 'The email you entered has already redeemed this offer. This offer is only available to be redeemed once.',\n                    title: 'Ineligible for Offer'\n                })\n                return\n            }\n            if (validationResult.validationErrors.includes('NEW_USER_NOT_ACCEPTABLE_FOR_OFFER')) {\n                if (partner === 'smart-laser') {\n                    setError({\n                        name: \"ArccosValidationError\",\n                        message: 'This Smart Laser pre-order is only available to existing Arccos users. Explore our other products and services to get started with Arccos.',\n                        title: 'New User',\n                        actionUrl: 'https://arccosgolf.com',\n                        actionText: 'Browse Arccos Products'\n                    })\n                } else {\n                    setError({\n                        name: \"ArccosValidationError\",\n                        message: 'The email you entered does not exist in our system. This offer is only available for users who have already had an Arccos Subscription.',\n                        title: 'Ineligible for Offer'\n                    })\n                }\n                return\n            }\n            if (validationResult.validationErrors.includes('USER_STATE_NOT_ACCEPTABLE_FOR_OFFER')) {\n                if (validationResult.userState?.accountState === 'EXISTING') {\n                    switch (validationResult.userState?.subscriptionState) {\n                        case 'CANCELED_SUBSCRIPTION_OVER_90_DAYS':\n                        case 'HAS_HAD_SUBSCRIPTION': {\n                            if (partner === 'smart-laser') {\n                                setError({\n                                    name: \"ArccosValidationError\",\n                                    message: 'We see you had an Arccos subscription in the past. Reactivate your subscription to get access to the Smart Laser pre-order and all Arccos features.',\n                                    title: 'Reactivate Your Subscription',\n                                    actionUrl: 'https://resubscribe.arccosgolf.com',\n                                    actionText: 'Reactivate Subscription'\n                                })\n                            } else {\n                                if (offerKey.includes('OPTIONAL') && validationResult.userState?.subscriptionState === 'HAS_HAD_SUBSCRIPTION') {\n                                    setError({\n                                        name: \"ArccosValidationError\",\n                                        message: 'The email you entered is already associated with an Arccos subscription that has been canceled for less than 90 days. This offer is only available for users who have had an Arccos Subscription that has been canceled for more than 90 days.',\n                                        title: 'Ineligible for Offer'\n                                    })\n                                } else {\n                                    if (acceptableUserStates?.some(userState => userState?.subscriptionState?.includes('HAS_ACTIVE_SUBSCRIPTION'))) {\n                                        setError({\n                                            name: \"ArccosValidationError\",\n                                            message: 'The email you entered is already associated with a previously active Arccos subscription. This offer is only available for users who have an active Arccos subscription.',\n                                            title: 'Ineligible for Offer'\n                                        })\n                                    } else {\n                                        setError({\n                                            name: \"ArccosValidationError\",\n                                            message: 'The email you entered is already associated with a previously active Arccos subscription. This offer is only available for users who have never had an Arccos Subscription.',\n                                            title: 'Ineligible for Offer'\n                                        })\n                                    }\n                                }\n                            }\n                            break\n                        }\n                        case 'NEVER_HAD_SUBSCRIPTION': {\n                            setError({\n                                name: \"ArccosValidationError\",\n                                message: 'This offer is only available to existing Arccos users. Explore our other products and services to get started with Arccos.',\n                                title: 'New User',\n                                actionUrl: 'https://arccosgolf.com',\n                                actionText: 'Browse Arccos Products'\n                            })\n                            break\n                        }\n                        case 'HAS_ACTIVE_SUBSCRIPTION': {\n                            setError({\n                                name: \"ArccosValidationError\",\n                                message: 'You already have an active Arccos subscription. Visit our store to browse other products.',\n                                title: 'Already Subscribed',\n                                actionUrl: 'https://arccosgolf.com',\n                                actionText: 'Browse Arccos Products'\n                            })\n                            break\n                        }\n                        default: {\n                            setError({\n                                name: \"ArccosValidationError\",\n                                message: 'Your email is not eligible for this offer. Please contact starter@arccosgolf.com for assistance.',\n                                title: 'Ineligible for Offer'\n                            })\n                            break\n                        }\n                    }\n                    return\n                }\n            }\n\n            // Default case - use original behavior for all offers\n            setError({\n                name: \"ArccosValidationError\",\n                message: 'The email you entered is already associated with an active Arccos subscription. This offer is only available for users who are not currently subscribed to Arccos.',\n                title: 'Ineligible for Offer'\n            })\n            return\n\n\n        }\n\n        console.log('[VALIDATE-AND-CREATE-USER] Validation result:', {\n            valid: validationResult?.valid,\n            hasCustomerId: !!validationResult?.customerId,\n            customerId: validationResult?.customerId,\n            timestamp: Date.now()\n        })\n\n        // Check if validation result includes customer_id and notify callback\n        if (validationResult && validationResult.customerId) {\n            console.log('[VALIDATE-AND-CREATE-USER] Found customer_id, calling callback:', {\n                customerId: validationResult.customerId,\n                timestamp: Date.now()\n            })\n            dispatch(setCustomerId(validationResult.customerId))\n        }\n        queryParamSetEmail(email)\n        let accessKeysResponse\n        if (validationResult.userId) {\n            if (!validationResult.accessKey) {\n                navigate({\n                    to: Page.LANDING_PAGE\n                })\n                return\n            }\n            accessKeysResponse = {\n                userId: validationResult.userId,\n                accessKey: validationResult.accessKey,\n            }\n            dispatch(setRefreshToken(validationResult.accessKey))\n            dispatch(setUserId(validationResult.userId))\n        } else {\n            await insertUser({ email, password, firstName: 'Arccos', lastName: 'Customer' })\n            accessKeysResponse = await updateRefreshToken(email, password)\n        }\n        // Skip await here to avoid blocking the UI. /tokens sometimes\n        // 404s for returning visitors with stale refreshToken cookies,\n        // but /stripe/checkout_session does not require the resulting\n        // access token, so a failure here does not break activation.\n        // Capture at warning level so the failure stays visible in\n        // Sentry without surfacing as an unhandled rejection.\n        updateAccessToken(accessKeysResponse).catch((error) => {\n            console.warn('[VALIDATE-AND-CREATE-USER] Background token refresh failed:', error)\n            Sentry.captureException(error, {\n                level: 'warning',\n                tags: { source: 'background-token-refresh' },\n            })\n        })\n\n        // Update pre-created checkout sessions with the user ID and email (fire-and-forget)\n        if (accessKeysResponse?.userId) {\n            updateCheckoutSessionsMetadata({\n                arccos_user_id: accessKeysResponse.userId,\n                email,\n            }).catch((error) => {\n                console.error('[VALIDATE-AND-CREATE-USER] Failed to update checkout session metadata:', error)\n            })\n        }\n\n        // Lead fire — Meta Pixel (browser) + Meta CAPI (server) with shared\n        // eventID for dedup on the legacy dataset. Fires here in the common\n        // path so every entry point (vintage create-account-form, modern\n        // alps-next, sensorless, full-content-landing) gets the same fire.\n        // Per-email sessionStorage keying means email-submit retries with\n        // the same email reuse the id.\n        if (offerKey) {\n            const leadEventId = getOrCreateLeadEventId(email)\n            analytics.track(\"Lead\", { eventID: leadEventId })\n            fireLead({\n                eventId: leadEventId,\n                email,\n                offerKey,\n                userId: accessKeysResponse?.userId || undefined,\n                partner: partner || undefined,\n            }).catch(() => {})\n        }\n\n        navigate({\n            to: Page.PAYMENT\n        })\n    }, [\n        insertUser,\n        navigate,\n        updateAccessToken,\n        updateRefreshToken,\n        validateOffer,\n        offerKey,\n        partner,\n        dispatch,\n        password,\n        updateCheckoutSessionsMetadata,\n    ])\n}\n\nexport const getCurrencyByCountryCode = (country: string) => {\n    switch (country) {\n        case 'GB': // United Kingdom\n        case 'IM': // Isle of Man\n        case 'JE': // Jersey\n        case 'GG': // Guernsey\n            return 'GBP';\n        case 'CA': // Canada\n            return 'CAD';\n        case 'AU': // Australia\n        case 'NZ': // New Zealand\n            return 'AUD';\n        case 'JP': // Japan\n            return 'JPY';\n        case 'KR': // South Korea\n            return 'KRW';\n        case 'AT': // Austria\n        case 'BE': // Belgium\n        case 'HR': // Croatia\n        case 'CY': // Cyprus\n        case 'EE': // Estonia\n        case 'FI': // Finland\n        case 'FR': // France\n        case 'DE': // Germany\n        case 'GR': // Greece\n        case 'IE': // Ireland\n        case 'IT': // Italy\n        case 'LV': // Latvia\n        case 'LT': // Lithuania\n        case 'LU': // Luxembourg\n        case 'MT': // Malta\n        case 'NL': // Netherlands\n        case 'PT': // Portugal\n        case 'SK': // Slovakia\n        case 'SI': // Slovenia\n        case 'ES': // Spain\n        case 'BG': // Bulgaria\n        case 'CZ': // Czech Republic\n        case 'HU': // Hungary\n        case 'PL': // Poland\n        case 'RO': // Romania\n        case 'SE': // Sweden\n        case 'DK': // Denmark\n        case 'CH': // Switzerland\n            return 'EUR';\n        case 'ZA':\n            return 'ZAR'\n        default:\n            return 'USD';\n    }\n}\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./packages/@logrocket/console/src/index.js\":\n/*!**************************************************!*\\\n  !*** ./packages/@logrocket/console/src/index.js ***!\n  \\**************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar _registerConsole = _interopRequireDefault(__webpack_require__(/*! ./registerConsole */ \"./packages/@logrocket/console/src/registerConsole.js\"));\nvar _default = _registerConsole.default;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/console/src/registerConsole.js\":\n/*!************************************************************!*\\\n  !*** ./packages/@logrocket/console/src/registerConsole.js ***!\n  \\************************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = registerConsole;\nvar _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\"));\nvar _enhanceFunc = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/enhanceFunc */ \"./packages/@logrocket/utils/src/enhanceFunc.ts\"));\nvar _exceptions = __webpack_require__(/*! @logrocket/exceptions */ \"./packages/@logrocket/exceptions/src/index.js\");\n// eslint-disable-line no-restricted-imports\n\nfunction registerConsole(logger) {\n  var unsubFunctions = [];\n  var methods = ['log', 'warn', 'info', 'error', 'debug'];\n  methods.forEach(function (method) {\n    unsubFunctions.push((0, _enhanceFunc.default)(console, method, function () {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      logger.addEvent('lr.core.LogEvent', function () {\n        var consoleOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n        var isEnabled = consoleOptions.isEnabled;\n        if ((0, _typeof2.default)(isEnabled) === 'object' && isEnabled[method] === false || isEnabled === false) {\n          return null;\n        }\n        if (method === 'error' && consoleOptions.shouldAggregateConsoleErrors) {\n          // some customers have loggers that add the log level as the first arg\n          if (!!args && args.length >= 2 && args[0] === 'ERROR') {\n            var secondArg = '';\n            try {\n              secondArg = \" \".concat(args[1]);\n            } catch (_unused) {} // eslint-disable-line no-empty\n            _exceptions.Capture.captureMessage(logger, \"\".concat(args[0]).concat(secondArg), args, {}, true);\n          } else {\n            _exceptions.Capture.captureMessage(logger, args[0], args, {}, true);\n          }\n        }\n        return {\n          logLevel: method.toUpperCase(),\n          args: args\n        };\n      });\n    }));\n  });\n  return function () {\n    unsubFunctions.forEach(function (unsubFunction) {\n      return unsubFunction();\n    });\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/exceptions/src/Capture.js\":\n/*!*******************************************************!*\\\n  !*** ./packages/@logrocket/exceptions/src/Capture.js ***!\n  \\*******************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.captureMessage = captureMessage;\nexports.captureException = captureException;\nvar _scrubException = __webpack_require__(/*! @logrocket/utils/src/scrubException */ \"./packages/@logrocket/utils/src/scrubException.ts\");\nvar _TraceKit = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/TraceKit */ \"./packages/@logrocket/utils/src/TraceKit.js\"));\nvar _stackTraceFromError = _interopRequireDefault(__webpack_require__(/*! ./stackTraceFromError */ \"./packages/@logrocket/exceptions/src/stackTraceFromError.js\"));\n// eslint-disable-line no-restricted-imports\n// eslint-disable-line no-restricted-imports\n\nfunction captureMessage(logger, message, messageArgs) {\n  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  var isConsole = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n  var data = {\n    exceptionType: isConsole ? 'CONSOLE' : 'MESSAGE',\n    message: message,\n    messageArgs: messageArgs,\n    browserHref: window.location ? window.location.href : ''\n  };\n  (0, _scrubException.scrubException)(data, options);\n  logger.addEvent('lr.core.Exception', function () {\n    return data;\n  });\n}\nfunction captureException(logger, exception) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var preppedTrace = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n  var exceptionType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'WINDOW';\n  var trace = preppedTrace || _TraceKit.default.computeStackTrace(exception);\n  var data = {\n    exceptionType: exceptionType,\n    errorType: trace.name,\n    message: trace.message,\n    browserHref: window.location ? window.location.href : ''\n  };\n  (0, _scrubException.scrubException)(data, options);\n  var addEventOptions = {\n    _stackTrace: (0, _stackTraceFromError.default)(trace)\n  };\n  logger.addEvent('lr.core.Exception', function () {\n    return data;\n  }, addEventOptions);\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/exceptions/src/index.js\":\n/*!*****************************************************!*\\\n  !*** ./packages/@logrocket/exceptions/src/index.js ***!\n  \\*****************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nObject.defineProperty(exports, \"registerExceptions\", ({\n  enumerable: true,\n  get: function get() {\n    return _registerExceptions.default;\n  }\n}));\nexports.Capture = void 0;\nvar _registerExceptions = _interopRequireDefault(__webpack_require__(/*! ./registerExceptions */ \"./packages/@logrocket/exceptions/src/registerExceptions.js\"));\nvar Capture = _interopRequireWildcard(__webpack_require__(/*! ./Capture */ \"./packages/@logrocket/exceptions/src/Capture.js\"));\nexports.Capture = Capture;\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/exceptions/src/raven/raven.js\":\n/*!***********************************************************!*\\\n  !*** ./packages/@logrocket/exceptions/src/raven/raven.js ***!\n  \\***********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\"));\nvar _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\"));\nvar _TraceKit = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/TraceKit */ \"./packages/@logrocket/utils/src/TraceKit.js\"));\n/* eslint-disable */\n\n/*\nSome contents of this file were originaly from raven-js, BSD-2 Clause\n\nCopyright (c) 2018 Sentry (https://sentry.io) and individual contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\nvar objectPrototype = Object.prototype;\nfunction isUndefined(what) {\n  return what === void 0;\n}\nfunction isFunction(what) {\n  return typeof what === 'function';\n}\nfunction each(obj, callback) {\n  var i, j;\n  if (isUndefined(obj.length)) {\n    for (i in obj) {\n      if (hasKey(obj, i)) {\n        callback.call(null, i, obj[i]);\n      }\n    }\n  } else {\n    j = obj.length;\n    if (j) {\n      for (i = 0; i < j; i++) {\n        callback.call(null, i, obj[i]);\n      }\n    }\n  }\n}\n\n/**\n * hasKey, a better form of hasOwnProperty\n * Example: hasKey(MainHostObject, property) === true/false\n *\n * @param {Object} host object to check property\n * @param {string} key to check\n */\nfunction hasKey(object, key) {\n  return objectPrototype.hasOwnProperty.call(object, key);\n}\n\n/**\n * Polyfill a method\n * @param obj object e.g. `document`\n * @param name method name present on object e.g. `addEventListener`\n * @param replacement replacement function\n * @param track {optional} record instrumentation to an array\n */\nfunction fill(obj, name, replacement, track) {\n  var orig = obj[name];\n  obj[name] = replacement(orig);\n  if (track) {\n    track.push([obj, name, orig]);\n  }\n}\nvar _window = typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};\nvar _document = _window.document;\nvar Handler = /*#__PURE__*/function () {\n  function Handler(_ref) {\n    var captureException = _ref.captureException;\n    (0, _classCallCheck2.default)(this, Handler);\n    this._errorHandler = this._errorHandler.bind(this);\n    this._ignoreOnError = 0;\n    this._wrappedBuiltIns = [];\n    this.captureException = captureException;\n    _TraceKit.default.report.subscribe(this._errorHandler);\n    this._instrumentTryCatch();\n  }\n  (0, _createClass2.default)(Handler, [{\n    key: \"uninstall\",\n    value: function uninstall() {\n      _TraceKit.default.report.unsubscribe(this._errorHandler);\n\n      // restore any wrapped builtins\n      var builtin;\n      while (this._wrappedBuiltIns.length) {\n        builtin = this._wrappedBuiltIns.shift();\n        var obj = builtin[0],\n          name = builtin[1],\n          orig = builtin[2];\n        obj[name] = orig;\n      }\n    }\n  }, {\n    key: \"_errorHandler\",\n    value: function _errorHandler(report) {\n      if (!this._ignoreOnError) {\n        this.captureException(report);\n      }\n    }\n  }, {\n    key: \"_ignoreNextOnError\",\n    value: function _ignoreNextOnError() {\n      var _this = this;\n      this._ignoreOnError += 1;\n      setTimeout(function () {\n        // onerror should trigger before setTimeout\n        _this._ignoreOnError -= 1;\n      });\n    }\n\n    /*\n     * Wrap code within a context so Handler can capture errors\n     * reliably across domains that is executed immediately.\n     *\n     * @param {object} options A specific set of options for this context [optional]\n     * @param {function} func The callback to be immediately executed within the context\n     * @param {array} args An array of arguments to be called with the callback [optional]\n     */\n  }, {\n    key: \"context\",\n    value: function context(options, func, args) {\n      if (isFunction(options)) {\n        args = func || [];\n        func = options;\n        options = undefined;\n      }\n      return this.wrap(options, func).apply(this, args);\n    }\n  }, {\n    key: \"wrap\",\n    value:\n    /*\n     * Wrap code within a context and returns back a new function to be executed\n     *\n     * @param {object} options A specific set of options for this context [optional]\n     * @param {function} func The function to be wrapped in a new context\n     * @param {function} func A function to call before the try/catch wrapper [optional, private]\n     * @return {function} The newly wrapped functions with a context\n     */\n    function wrap(options, func, _before) {\n      var self = this;\n      // 1 argument has been passed, and it's not a function\n      // so just return it\n      if (isUndefined(func) && !isFunction(options)) {\n        return options;\n      }\n\n      // options is optional\n      if (isFunction(options)) {\n        func = options;\n        options = undefined;\n      }\n\n      // At this point, we've passed along 2 arguments, and the second one\n      // is not a function either, so we'll just return the second argument.\n      if (!isFunction(func)) {\n        return func;\n      }\n\n      // We don't wanna wrap it twice!\n      try {\n        if (func.__lr__) {\n          return func;\n        }\n\n        // If this has already been wrapped in the past, return that\n        if (func.__lr_wrapper__) {\n          return func.__lr_wrapper__;\n        }\n\n        // If func is not extensible, return the function as-is to prevent TypeErrors\n        // when trying to add new props & to assure immutable funcs aren't changed\n        if (!Object.isExtensible(func)) {\n          return func;\n        }\n      } catch (e) {\n        // Just accessing custom props in some Selenium environments\n        // can cause a \"Permission denied\" exception (see lr-js#495).\n        // Bail on wrapping and return the function as-is (defers to window.onerror).\n        return func;\n      }\n      function wrapped() {\n        var args = [],\n          i = arguments.length,\n          deep = !options || options && options.deep !== false;\n        if (_before && isFunction(_before)) {\n          _before.apply(this, arguments);\n        }\n\n        // Recursively wrap all of a function's arguments that are\n        // functions themselves.\n        while (i--) {\n          args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];\n        }\n        try {\n          // Attempt to invoke user-land function. This is part of the LogRocket SDK.\n          // If you're seeing this frame in a stack trace, it means that LogRocket caught\n          // an unhandled error thrown by your application code, reported it, then bubbled\n          // it up. This is expected behavior and is not a bug with LogRocket.\n          return func.apply(this, args);\n        } catch (e) {\n          self._ignoreNextOnError();\n          self.captureException(_TraceKit.default.computeStackTrace(e), options);\n          throw e;\n        }\n      }\n\n      // copy over properties of the old function\n      for (var property in func) {\n        if (hasKey(func, property)) {\n          wrapped[property] = func[property];\n        }\n      }\n      wrapped.prototype = func.prototype;\n      func.__lr_wrapper__ = wrapped;\n      // Signal that this function has been wrapped already\n      // for both debugging and to prevent it to being wrapped twice\n      wrapped.__lr__ = true;\n      wrapped.__inner__ = func;\n      return wrapped;\n    }\n  }, {\n    key: \"_instrumentTryCatch\",\n    value:\n    /**\n     * Install any queued plugins\n     */\n    function _instrumentTryCatch() {\n      var self = this;\n      var wrappedBuiltIns = self._wrappedBuiltIns;\n      function wrapTimeFn(orig) {\n        return function (fn, t) {\n          // preserve arity\n          // Make a copy of the arguments to prevent deoptimization\n          // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n          var args = new Array(arguments.length);\n          for (var i = 0; i < args.length; ++i) {\n            args[i] = arguments[i];\n          }\n          var originalCallback = args[0];\n          if (isFunction(originalCallback)) {\n            args[0] = self.wrap(originalCallback);\n          }\n\n          // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n          // also supports only two arguments and doesn't care what this is, so we\n          // can just call the original function directly.\n          if (orig.apply) {\n            return orig.apply(this, args);\n          } else {\n            return orig(args[0], args[1]);\n          }\n        };\n      }\n      function wrapEventTarget(global) {\n        var proto = _window[global] && _window[global].prototype;\n        if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {\n          fill(proto, 'addEventListener', function (orig) {\n            return function (evtName, fn, capture, secure) {\n              // preserve arity\n              try {\n                if (fn && fn.handleEvent) {\n                  fn.handleEvent = self.wrap(fn.handleEvent);\n                }\n              } catch (err) {\n                // can sometimes get 'Permission denied to access property \"handle Event'\n              }\n\n              // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`\n              // so that we don't have more than one wrapper function\n              var before;\n              return orig.call(this, evtName, self.wrap(fn, undefined, before), capture, secure);\n            };\n          }, wrappedBuiltIns);\n          fill(proto, 'removeEventListener', function (orig) {\n            return function (evt, fn, capture, secure) {\n              /**\n               * There are 3 scenararios to consider when removing an event listener\n               *\n               * 1. 'addEventListener' was called when the LR SDK was uninitialized.\n               * In this case, the event handler has not been wrapped, so this behaves \n               * as a passthrough and just removes the original handler.\n               *\n               * 2. 'addEventListener' was called while the LR SDK was initialized, which means\n               * our wrapped 'addEventListener' was called. In this case, the tracked event handler\n               * is also wrapped, so we need to remove that wrapped version of the handler.\n               *\n               * 3. 'addEventListener' was called both before and after the LR SDK was initialized\n               * for the same event handler. In this case, we have to remove both of them.\n               * If we'd remove only the wrapped one, the initial handler would stick around forever.\n               */\n              try {\n                var wrappedFn = fn === null || fn === void 0 ? void 0 : fn.__lr_wrapper__;\n                if (wrappedFn) {\n                  orig.call(this, evt, wrappedFn, capture, secure);\n                }\n              } catch (e) {\n                // ignore, accessing __lr_wrapper__ will throw in some Selenium environments\n              }\n              return orig.call(this, evt, fn, capture, secure);\n            };\n          },\n          // undefined is provided here to skip tracking for uninstall.\n          // Once our removeEventListener is installed, it can't be uninstalled.\n          // We always need to support removing logrocket wrapped event handlers (event\n          // handlers added when logrocket was installed) even after SDK shutdown.\n          undefined);\n        }\n      }\n      fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);\n      fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);\n      if (_window.requestAnimationFrame) {\n        fill(_window, 'requestAnimationFrame', function (orig) {\n          return function (cb) {\n            return orig(self.wrap(cb));\n          };\n        }, wrappedBuiltIns);\n      }\n\n      // event targets borrowed from bugsnag-js:\n      // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666\n      var eventTargets = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];\n      for (var i = 0; i < eventTargets.length; i++) {\n        wrapEventTarget(eventTargets[i]);\n      }\n      var $ = _window.jQuery || _window.$;\n      if ($ && $.fn && $.fn.ready) {\n        fill($.fn, 'ready', function (orig) {\n          return function (fn) {\n            return orig.call(this, self.wrap(fn));\n          };\n        }, wrappedBuiltIns);\n      }\n    }\n  }]);\n  return Handler;\n}();\nexports[\"default\"] = Handler;\n;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/exceptions/src/registerExceptions.js\":\n/*!******************************************************************!*\\\n  !*** ./packages/@logrocket/exceptions/src/registerExceptions.js ***!\n  \\******************************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nvar _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = registerCore;\nvar _raven = _interopRequireDefault(__webpack_require__(/*! ./raven/raven */ \"./packages/@logrocket/exceptions/src/raven/raven.js\"));\nvar Capture = _interopRequireWildcard(__webpack_require__(/*! ./Capture */ \"./packages/@logrocket/exceptions/src/Capture.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction registerCore(logger) {\n  var raven = new _raven.default({\n    captureException: function captureException(errorReport) {\n      Capture.captureException(logger, null, null, errorReport);\n    }\n  });\n  var rejectionHandler = function rejectionHandler(evt) {\n    // http://2ality.com/2016/04/unhandled-rejections.html\n    if (evt.reason instanceof Error) {\n      Capture.captureException(logger, evt.reason, null, null, 'UNHANDLED_REJECTION');\n    } else {\n      logger.addEvent('lr.core.Exception', function () {\n        return {\n          exceptionType: 'UNHANDLED_REJECTION',\n          message: evt.reason || 'Unhandled Promise rejection'\n        };\n      });\n    }\n  };\n  window.addEventListener('unhandledrejection', rejectionHandler);\n  return function () {\n    window.removeEventListener('unhandledrejection', rejectionHandler);\n    raven.uninstall();\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/exceptions/src/stackTraceFromError.js\":\n/*!*******************************************************************!*\\\n  !*** ./packages/@logrocket/exceptions/src/stackTraceFromError.js ***!\n  \\*******************************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = stackTraceFromError;\nfunction stackTraceFromError(errorReport) {\n  function makeNotNull(val) {\n    return val === null ? undefined : val;\n  }\n  return errorReport.stack ? errorReport.stack.map(function (frame) {\n    return {\n      lineNumber: makeNotNull(frame.line),\n      columnNumber: makeNotNull(frame.column),\n      fileName: makeNotNull(frame.url),\n      functionName: makeNotNull(frame.func)\n    };\n  }) : undefined;\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/fetchIntercept.js\":\n/*!***********************************************************!*\\\n  !*** ./packages/@logrocket/network/src/fetchIntercept.js ***!\n  \\***********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\"));\nvar _registerXHR = __webpack_require__(/*! ./registerXHR */ \"./packages/@logrocket/network/src/registerXHR.js\");\nvar interceptors = [];\nfunction makeInterceptor(fetch, fetchId) {\n  var reversedInterceptors = interceptors.reduce(function (array, interceptor) {\n    return [interceptor].concat(array);\n  }, []);\n  // if a browser supports fetch, it supports promise\n  // eslint-disable-next-line compat/compat\n  for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    args[_key - 2] = arguments[_key];\n  }\n  var promise = Promise.resolve(args);\n\n  // Register request interceptors\n  reversedInterceptors.forEach(function (_ref) {\n    var request = _ref.request,\n      requestError = _ref.requestError;\n    if (request || requestError) {\n      promise = promise.then(function (args) {\n        return request.apply(void 0, [fetchId].concat((0, _toConsumableArray2.default)(args)));\n      }, function (args) {\n        return requestError.apply(void 0, [fetchId].concat((0, _toConsumableArray2.default)(args)));\n      });\n    }\n  });\n  promise = promise.then(function (args) {\n    (0, _registerXHR.setActive)(false);\n    var res;\n    var err;\n    try {\n      res = fetch.apply(void 0, (0, _toConsumableArray2.default)(args));\n    } catch (_err) {\n      err = _err;\n    }\n    (0, _registerXHR.setActive)(true);\n    if (err) {\n      throw err;\n    }\n    return res;\n  });\n  reversedInterceptors.forEach(function (_ref2) {\n    var response = _ref2.response,\n      responseError = _ref2.responseError;\n    if (response || responseError) {\n      promise = promise.then(function (res) {\n        return response(fetchId, res);\n      }, function (err) {\n        return responseError && responseError(fetchId, err);\n      });\n    }\n  });\n  return promise;\n}\nfunction attach(env) {\n  if (!env.fetch || !env.Promise) {\n    // Make sure fetch is available in the given environment. If it's not, then\n    // default to using XHR intercept.\n    return;\n  }\n  var isPolyfill = env.fetch.polyfill;\n\n  // eslint-disable-next-line no-param-reassign\n  env.fetch = function (fetch) {\n    var fetchId = 0;\n    return function () {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      return makeInterceptor.apply(void 0, [fetch, fetchId++].concat(args));\n    };\n  }(env.fetch);\n\n  // Forward the polyfill properly from fetch (set by github/whatwg-fetch).\n  if (isPolyfill) {\n    // eslint-disable-next-line no-param-reassign\n    env.fetch.polyfill = isPolyfill;\n  }\n}\n\n// TODO: React Native\n//   attach(global);\n\nvar didAttach = false;\nvar _default = {\n  register: function register(interceptor) {\n    if (!didAttach) {\n      didAttach = true;\n      attach(window);\n    }\n    interceptors.push(interceptor);\n    return function () {\n      var index = interceptors.indexOf(interceptor);\n      if (index >= 0) {\n        interceptors.splice(index, 1);\n      }\n    };\n  },\n  clear: function clear() {\n    interceptors = [];\n  }\n};\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/index.js\":\n/*!**************************************************!*\\\n  !*** ./packages/@logrocket/network/src/index.js ***!\n  \\**************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = registerNetwork;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\"));\nvar _registerFetch = _interopRequireDefault(__webpack_require__(/*! ./registerFetch */ \"./packages/@logrocket/network/src/registerFetch.js\"));\nvar _registerIonic = __webpack_require__(/*! ./registerIonic */ \"./packages/@logrocket/network/src/registerIonic.ts\");\nvar _registerNetworkInformation = _interopRequireDefault(__webpack_require__(/*! ./registerNetworkInformation */ \"./packages/@logrocket/network/src/registerNetworkInformation.js\"));\nvar _registerXHR = _interopRequireDefault(__webpack_require__(/*! ./registerXHR */ \"./packages/@logrocket/network/src/registerXHR.js\"));\nvar _mapValues = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/mapValues */ \"./packages/@logrocket/utils/src/mapValues.ts\"));\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n// eslint-disable-line no-restricted-imports\n\nfunction registerNetwork(logger) {\n  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n    isReactNative: false,\n    isDisabled: false\n  };\n  if ((config === null || config === void 0 ? void 0 : config.isDisabled) === true) {\n    return function () {};\n  }\n  var isReactNative = config.isReactNative,\n    shouldAugmentNPS = config.shouldAugmentNPS,\n    shouldParseXHRBlob = config.shouldParseXHRBlob;\n  var ignoredNetwork = {};\n\n  // truncate if > 4MB in size\n  var truncate = function truncate(data) {\n    var limit = 1024 * 1000 * 4;\n    var str = data;\n    if ((0, _typeof2.default)(data) === 'object' && data != null) {\n      var proto = Object.getPrototypeOf(data);\n      if (proto === Object.prototype || proto === null) {\n        // plain object - jsonify for the size check\n        str = JSON.stringify(data);\n      }\n    }\n    if (str && str.length && str.length > limit && typeof str === 'string') {\n      var beginning = str.substring(0, 1000);\n      return \"\".concat(beginning, \" ... LogRocket truncating to first 1000 characters.\\n      Keep data under 4MB to prevent truncation. https://docs.logrocket.com/reference/network\");\n    }\n    return data;\n  };\n  var addRequest = function addRequest(reqId, request) {\n    var method = request.method;\n    logger.addEvent('lr.network.RequestEvent', function () {\n      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n        _ref$isEnabled = _ref.isEnabled,\n        isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,\n        _ref$requestSanitizer = _ref.requestSanitizer,\n        requestSanitizer = _ref$requestSanitizer === void 0 ? function (f) {\n          return f;\n        } : _ref$requestSanitizer;\n      if (!isEnabled) {\n        return null;\n      }\n      var sanitized = null;\n      try {\n        // only try catch user defined functions\n        sanitized = requestSanitizer(_objectSpread(_objectSpread({}, request), {}, {\n          reqId: reqId\n        }));\n      } catch (err) {\n        console.error(err);\n      }\n      if (sanitized) {\n        var url = sanitized.url;\n        if (typeof document !== 'undefined' && typeof document.createElement === 'function') {\n          // Writing and then reading from an a tag turns a relative\n          // url into an absolute one.\n          var a = document.createElement('a');\n          a.href = sanitized.url;\n          url = a.href;\n        }\n        return {\n          reqId: reqId,\n          // default\n          url: url,\n          // sanitized\n          headers: (0, _mapValues.default)(sanitized.headers, function (headerValue) {\n            // sanitized\n            return \"\".concat(headerValue);\n          }),\n          body: truncate(sanitized.body),\n          // sanitized\n          method: method,\n          // default\n          referrer: sanitized.referrer || undefined,\n          // sanitized\n          mode: sanitized.mode || undefined,\n          // sanitized\n          credentials: sanitized.credentials || undefined // sanitized\n        };\n      }\n\n      ignoredNetwork[reqId] = true;\n      return null;\n    });\n  };\n  var addResponse = function addResponse(reqId, response) {\n    var method = response.method,\n      status = response.status,\n      responseType = response.responseType;\n    logger.addEvent('lr.network.ResponseEvent', function () {\n      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n        _ref2$isEnabled = _ref2.isEnabled,\n        isEnabled = _ref2$isEnabled === void 0 ? true : _ref2$isEnabled,\n        _ref2$responseSanitiz = _ref2.responseSanitizer,\n        responseSanitizer = _ref2$responseSanitiz === void 0 ? function (f) {\n          return f;\n        } : _ref2$responseSanitiz;\n      if (!isEnabled) {\n        return null;\n      } else if (ignoredNetwork[reqId]) {\n        delete ignoredNetwork[reqId];\n        return null;\n      }\n      var sanitized = null;\n      try {\n        // only try catch user defined functions\n        sanitized = responseSanitizer(_objectSpread(_objectSpread({}, response), {}, {\n          reqId: reqId\n        }));\n      } catch (err) {\n        console.error(err);\n        // fall through to redacted log\n      }\n\n      if (sanitized) {\n        return {\n          reqId: reqId,\n          // default\n          responseType: responseType,\n          status: sanitized.status,\n          // sanitized\n          headers: (0, _mapValues.default)(sanitized.headers, function (headerValue) {\n            // sanitized\n            return \"\".concat(headerValue);\n          }),\n          body: truncate(sanitized.body),\n          // sanitized\n          method: method // default\n        };\n      }\n\n      return {\n        reqId: reqId,\n        // default\n        responseType: responseType,\n        status: status,\n        // default\n        headers: {},\n        // redacted\n        body: null,\n        // redacted\n        method: method // default\n      };\n    });\n  };\n\n  var isIgnored = function isIgnored(reqId) {\n    return logger.isDisabled || ignoredNetwork[reqId] === true;\n  };\n  var unsubFetch = (0, _registerFetch.default)({\n    addRequest: addRequest,\n    addResponse: addResponse,\n    isIgnored: isIgnored\n  });\n  var unsubXHR = (0, _registerXHR.default)({\n    addRequest: addRequest,\n    addResponse: addResponse,\n    isIgnored: isIgnored,\n    logger: logger,\n    shouldAugmentNPS: shouldAugmentNPS,\n    shouldParseXHRBlob: shouldParseXHRBlob\n  });\n  var unsubIonic = (0, _registerIonic.registerIonic)({\n    addRequest: addRequest,\n    addResponse: addResponse,\n    isIgnored: isIgnored\n  });\n  var unsubNetworkInformation = isReactNative ? function () {} : (0, _registerNetworkInformation.default)(logger);\n  return function () {\n    unsubNetworkInformation();\n    unsubFetch();\n    unsubXHR();\n    unsubIonic();\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/registerFetch.js\":\n/*!**********************************************************!*\\\n  !*** ./packages/@logrocket/network/src/registerFetch.js ***!\n  \\**********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = registerFetch;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _mapValues = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/mapValues */ \"./packages/@logrocket/utils/src/mapValues.ts\"));\nvar _fetchIntercept = _interopRequireDefault(__webpack_require__(/*! ./fetchIntercept */ \"./packages/@logrocket/network/src/fetchIntercept.js\"));\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction makeObjectFromHeaders(headers) {\n  // If using real fetch, we must stringify the Headers object.\n  if (headers == null || typeof headers.forEach !== 'function') {\n    return headers;\n  }\n  var result = {};\n  headers.forEach(function (value, key) {\n    if (result[key]) {\n      result[key] = \"\".concat(result[key], \",\").concat(value);\n    } else {\n      result[key] = \"\".concat(value);\n    }\n  });\n  return result;\n}\n\n// XHR specification is unclear of what types to allow in value so using toString method for now\nvar stringifyHeaders = function stringifyHeaders(headers) {\n  return (0, _mapValues.default)(makeObjectFromHeaders(headers), function (value) {\n    return \"\".concat(value);\n  });\n};\nfunction pluckFetchFields() {\n  var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  return {\n    url: arg.url,\n    headers: stringifyHeaders(arg.headers),\n    method: arg.method && arg.method.toUpperCase(),\n    referrer: arg.referrer || undefined,\n    mode: arg.mode || undefined,\n    credentials: arg.credentials || undefined\n  };\n}\nfunction registerFetch(_ref) {\n  var addRequest = _ref.addRequest,\n    addResponse = _ref.addResponse,\n    isIgnored = _ref.isIgnored;\n  var LOGROCKET_FETCH_LABEL = 'fetch-';\n  var fetchMethodMap = {};\n  var unregister = _fetchIntercept.default.register({\n    request: function request(fetchId) {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n      var p;\n      if (typeof Request !== 'undefined' && args[0] instanceof Request) {\n        var clonedText;\n\n        // Request.clone() and Request.text() may throw in Safari (e.g., when\n        // request body contains FormData)\n        try {\n          clonedText = args[0].clone().text();\n        } catch (err) {\n          // if a browser supports fetch, it supports promise\n          // eslint-disable-next-line compat/compat\n          clonedText = Promise.resolve(\"LogRocket fetch error: \".concat(err.message));\n        }\n        p = clonedText.then(function (body) {\n          return _objectSpread(_objectSpread({}, pluckFetchFields(args[0])), {}, {\n            body: body\n          });\n        }, function (err) {\n          return _objectSpread(_objectSpread({}, pluckFetchFields(args[0])), {}, {\n            body: \"LogRocket fetch error: \".concat(err.message)\n          });\n        });\n      } else {\n        // if a browser supports fetch, it supports promise\n        // eslint-disable-next-line compat/compat\n        p = Promise.resolve(_objectSpread(_objectSpread({}, pluckFetchFields(args[1])), {}, {\n          url: \"\".concat(args[0]),\n          body: (args[1] || {}).body\n        }));\n      }\n      return p.then(function (req) {\n        fetchMethodMap[fetchId] = req.method;\n        addRequest(\"\".concat(LOGROCKET_FETCH_LABEL).concat(fetchId), req);\n        return args;\n      });\n    },\n    requestError: function requestError(fetchId, error) {\n      // if a browser supports fetch, it supports promise\n      // eslint-disable-next-line compat/compat\n      return Promise.reject(error);\n    },\n    response: function response(fetchId, _response) {\n      var responseClone;\n      var responseTextPromise;\n      if (isIgnored(\"\".concat(LOGROCKET_FETCH_LABEL).concat(fetchId))) {\n        // Don't even try to read ignored requests\n        return _response;\n      }\n\n      // event-streams are meant to remain open and be consumed over time by the sender. Attempting to capture the body\n      // of these requests will cause us to \"stall\" here, and prevents the users of our SDK from using event-streams\n      // unless they have explicitly ignored the request.\n      if (_response.headers.get('content-type') === 'text/event-stream') {\n        // eslint-disable-next-line compat/compat\n        responseTextPromise = Promise.resolve('LogRocket skipped consuming an event-stream body.');\n      } else {\n        try {\n          // TODO: enhance function on original response and future clones for:\n          // text(), json(), blob(), formdata(), arraybuffer()\n          responseClone = _response.clone();\n        } catch (err) {\n          // safari has a bug where cloning can fail\n          var responseHash = {\n            url: _response.url,\n            responseType: _response.type.toUpperCase(),\n            status: _response.status,\n            headers: stringifyHeaders(_response.headers),\n            body: \"LogRocket fetch error: \".concat(err.message),\n            method: fetchMethodMap[fetchId]\n          };\n          delete fetchMethodMap[fetchId];\n          addResponse(\"\".concat(LOGROCKET_FETCH_LABEL).concat(fetchId), responseHash);\n          return _response;\n        }\n        try {\n          if (window.TextDecoder && responseClone.body) {\n            // use a reader to manually read the response body rather than calling response.text()\n            // response.text() was timing out for some responses, in some cases because Apollo sends\n            //   an abort signal or because the stream wasn't getting terminated cleanly\n            // using a reader allows us to capture what we can from response bodies before the\n            //   response receives an abort signal\n            var reader = responseClone.body.getReader();\n            // response bodies always decode with UTF-8\n            // https://developer.mozilla.org/en-US/docs/Web/API/Response/text\n            var utf8Decoder = new window.TextDecoder('utf-8');\n            var bodyContents = '';\n            responseTextPromise = reader.read().then(function readResponseBody(_ref2) {\n              var done = _ref2.done,\n                value = _ref2.value;\n              if (done) {\n                return bodyContents;\n              }\n              var chunk = value ? utf8Decoder.decode(value, {\n                stream: true\n              }) : '';\n              bodyContents += chunk;\n              return reader.read().then(readResponseBody);\n            });\n          } else {\n            // TextDecoder doesn't have support across all browsers that LR supports, so if there's\n            //  no TextDecoder, fall back to the old approach\n            responseTextPromise = responseClone.text();\n          }\n        } catch (error) {\n          // eslint-disable-next-line compat/compat\n          responseTextPromise = Promise.resolve(\"LogRocket error reading body: \".concat(error.message));\n        }\n      }\n      responseTextPromise.catch(function (error) {\n        // don't drop request & log to console when the request is aborted,\n        // as it may have already completed\n        // https://github.com/LogRocket/logrocket/issues/34\n        if (error.name === 'AbortError' && error instanceof DOMException) {\n          return;\n        }\n        return \"LogRocket error reading body: \".concat(error.message);\n      }).then(function (data) {\n        var responseHash = {\n          url: _response.url,\n          responseType: _response.type.toUpperCase(),\n          status: _response.status,\n          headers: stringifyHeaders(_response.headers),\n          body: data,\n          method: fetchMethodMap[fetchId]\n        };\n        delete fetchMethodMap[fetchId];\n        addResponse(\"\".concat(LOGROCKET_FETCH_LABEL).concat(fetchId), responseHash);\n      });\n      return _response;\n    },\n    responseError: function responseError(fetchId, error) {\n      var response = {\n        url: undefined,\n        status: 0,\n        headers: {},\n        body: \"\".concat(error)\n      };\n      addResponse(\"\".concat(LOGROCKET_FETCH_LABEL).concat(fetchId), response);\n      // if a browser supports fetch, it supports promise\n      // eslint-disable-next-line compat/compat\n      return Promise.reject(error);\n    }\n  });\n  return unregister;\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/registerIonic.ts\":\n/*!**********************************************************!*\\\n  !*** ./packages/@logrocket/network/src/registerIonic.ts ***!\n  \\**********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.mergeHeaders = mergeHeaders;\nexports.serializeQueryParams = serializeQueryParams;\nexports.appendQueryParamsString = appendQueryParamsString;\nexports.processData = processData;\nexports.registerIonic = registerIonic;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\"));\nvar _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\"));\nvar _protectFunc = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/protectFunc */ \"./packages/@logrocket/utils/src/protectFunc.ts\"));\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar VALID_HTTP_METHODS = new Set(['get', 'put', 'post', 'patch', 'head', 'delete', 'options', 'upload', 'download']);\nvar VALID_SERIALIZERS = new Set(['urlencoded', 'json', 'utf8']);\nvar UNSUPPORTED_SERIALIZERS = new Set(['raw', 'multipart']);\nvar LOGROCKET_IONIC_LABEL = 'ionic-';\nvar UNSUPPORTED_PLATFORMS = new Set(['desktop', 'mobileweb', 'pwa']);\nvar FORM_DATA = new Set(['FormData']);\nvar EMPTY_SET = new Set();\nvar STRING_SET = new Set(['string']);\nvar STRING_ARRAY_SET = new Set(['string', 'array']);\nvar ALLOWED_DATA_TYPES = {\n  utf8: STRING_SET,\n  urlencoded: new Set(['object']),\n  json: new Set(['array', 'object']),\n  raw: new Set(['Uint8Array', 'ArrayBuffer']),\n  default: EMPTY_SET\n};\n\n// Used in intercepting Ionic pugin requests found here https://www.npmjs.com/package/@ionic-native/http\n// based on https://github.com/silkimen/cordova-plugin-advanced-http/blob/master/www/public-interface.js\n\nfunction checkForValidStringValue(list, value, fieldName) {\n  if (typeof value !== 'string') {\n    throw new Error(\"\".concat(fieldName, \" must be one of: \").concat((0, _toConsumableArray2.default)(list).join(', ')));\n  }\n\n  // eslint-disable-next-line no-param-reassign\n  value = value.trim().toLowerCase();\n  if (!list.has(value)) {\n    throw new Error(\"\".concat(fieldName, \" must be one of: \").concat((0, _toConsumableArray2.default)(list).join(', ')));\n  }\n  return value;\n}\nfunction checkKeyValuePairObject(obj, allowedChildren, onInvalidValueMessage) {\n  if ((0, _typeof2.default)(obj) !== 'object') {\n    throw new Error(onInvalidValueMessage);\n  }\n  for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n    var key = _Object$keys[_i];\n    if (!allowedChildren.has((0, _typeof2.default)(obj[key]))) {\n      throw new Error(onInvalidValueMessage);\n    }\n  }\n  return obj;\n}\nfunction getMatchingHostHeaders(url, ionicHttp) {\n  var _URL = new URL(url),\n    host = _URL.host;\n  return ionicHttp.getHeaders(host) || null;\n}\nfunction mergeHeaders(defaultHeaders, headers) {\n  return _objectSpread(_objectSpread({}, defaultHeaders), headers);\n}\nfunction getMergedHeaders(url, requestHeaders, ionicHttp) {\n  // get global headers via public method\n  var globalHeaders = ionicHttp.getHeaders('*') || {};\n  var hostHeaders = getMatchingHostHeaders(url, ionicHttp) || {};\n  return mergeHeaders(mergeHeaders(globalHeaders, hostHeaders), requestHeaders);\n}\nfunction serializeValue(value, encode) {\n  if (encode) {\n    return encodeURIComponent(value);\n  } else {\n    return value;\n  }\n}\nfunction serializeIdentifier(parentKey, key, encode) {\n  if (!parentKey.length) {\n    return encode ? encodeURIComponent(key) : key;\n  }\n  if (encode) {\n    return \"\".concat(encodeURIComponent(parentKey), \"[\").concat(encodeURIComponent(key), \"]\");\n  } else {\n    return \"\".concat(parentKey, \"[\").concat(key, \"]\");\n  }\n}\nfunction serializeArray(parentKey, array, encode) {\n  var parts = [];\n  var _iterator = _createForOfIteratorHelper(array),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var e = _step.value;\n      if (Array.isArray(e)) {\n        parts.push(serializeArray(\"\".concat(parentKey, \"[]\"), e, encode));\n        continue;\n      } else if ((0, _typeof2.default)(e) === 'object') {\n        /* This replicates what appears to be a bug in the Ionic code in order to capture everything identically\n           parts.push(serializeObject(`${parentKey}[]${array[i]}`, encode));\n           https://github.com/silkimen/cordova-plugin-advanced-http/blob/master/www/url-util.js#L73\n        */\n        // eslint-disable-next-line @typescript-eslint/no-use-before-define\n        parts.push(serializeObject(\"\".concat(parentKey, \"[]\").concat(e), encode, undefined));\n        continue;\n      }\n      parts.push(\"\".concat(serializeIdentifier(parentKey, '', encode), \"=\").concat(serializeValue(e, encode)));\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  return parts.join('&');\n}\nfunction serializeObject(parentKey, object, encode) {\n  var parts = [];\n  for (var key in object) {\n    if (!object.hasOwnProperty(key)) {\n      continue;\n    }\n    var identifier = parentKey.length ? \"\".concat(parentKey, \"[\").concat(key, \"]\") : key;\n    if (Array.isArray(object[key])) {\n      parts.push(serializeArray(identifier, object[key], encode));\n      continue;\n    } else if ((0, _typeof2.default)(object[key]) === 'object' && object[key] !== null) {\n      parts.push(serializeObject(identifier, object[key], encode));\n      continue;\n    }\n    parts.push(\"\".concat(serializeIdentifier(parentKey, key, encode), \"=\").concat(serializeValue(object[key], encode)));\n  }\n  return parts.join('&');\n}\nfunction serializeQueryParams(params, encode) {\n  return serializeObject('', params, encode);\n}\nfunction appendQueryParamsString(url, params) {\n  if (!url.length || !params.length) {\n    return url;\n  }\n  var _URL2 = new URL(url),\n    host = _URL2.host,\n    pathname = _URL2.pathname,\n    search = _URL2.search,\n    hash = _URL2.hash,\n    protocol = _URL2.protocol;\n  return \"\".concat(protocol, \"//\").concat(host).concat(pathname).concat(search.length ? \"\".concat(search, \"&\").concat(params) : \"?\".concat(params)).concat(hash);\n}\nfunction getAllowedDataTypes(dataSerializer) {\n  return ALLOWED_DATA_TYPES[dataSerializer] || ALLOWED_DATA_TYPES.default;\n}\nfunction getAllowedInstanceTypes(dataSerializer) {\n  return dataSerializer === 'multipart' ? FORM_DATA : EMPTY_SET;\n}\nfunction processData(data, dataSerializer) {\n  var currentDataType = (0, _typeof2.default)(data);\n  var allowedDataTypes = getAllowedDataTypes(dataSerializer);\n  var allowedInstanceTypes = getAllowedInstanceTypes(dataSerializer);\n  if (allowedInstanceTypes.size > 0) {\n    var isCorrectInstanceType = false;\n    allowedInstanceTypes.forEach(function (type) {\n      if (__webpack_require__.g[type] && data instanceof __webpack_require__.g[type]) {\n        isCorrectInstanceType = true;\n      }\n    });\n    if (!isCorrectInstanceType) {\n      throw new Error(\"INSTANCE_TYPE_MISMATCH_DATA \".concat((0, _toConsumableArray2.default)(allowedInstanceTypes).join(', ')));\n    }\n  }\n  if (allowedInstanceTypes.size === 0 && !allowedDataTypes.has(currentDataType)) {\n    throw new Error(\"TYPE_MISMATCH_DATA \".concat((0, _toConsumableArray2.default)(allowedDataTypes).join(', ')));\n  }\n  switch (dataSerializer) {\n    case 'utf8':\n      // already a string\n      return data;\n    default:\n      // object of some sort (urlencoded or json)\n      return JSON.stringify(data, undefined, 2);\n  }\n}\nfunction handleMissingOptions(options, ionicHttp) {\n  // eslint-disable-next-line no-param-reassign\n  options = options || {};\n  var serializer;\n  var data = options.data;\n  try {\n    // need to check special case if data type is not handled by LR but otherwise valid\n    serializer = checkForValidStringValue(VALID_SERIALIZERS, options.serializer || ionicHttp.getDataSerializer(), 'serializer / data payload type');\n  } catch (_unused) {\n    // if this fails it's of entirely invalid type, let it fail\n    serializer = checkForValidStringValue(UNSUPPORTED_SERIALIZERS, options.serializer || ionicHttp.getDataSerializer(), 'serializer / data payload type');\n    // is of a valid but unsupported to LR type, set data to empty\n    data = {};\n  }\n  return {\n    data: data,\n    filePath: options.filePath,\n    followRedirect: options.followRedirect,\n    headers: checkKeyValuePairObject(options.headers || {}, STRING_SET, 'Invalid header type, must be string'),\n    method: checkForValidStringValue(VALID_HTTP_METHODS, options.method || VALID_HTTP_METHODS[0], 'method'),\n    name: options.name,\n    params: checkKeyValuePairObject(options.params || {}, STRING_ARRAY_SET, 'Invalid param, must be of type string or array'),\n    responseType: options.responseType,\n    serializer: serializer,\n    connectTimeout: options.connectTimeout,\n    readTimeout: options.readTimeout,\n    timeout: options.timeout\n  };\n}\nvar ionicIdCounter = 0;\nfunction registerIonic(_ref) {\n  var _cordova, _cordova$plugin, _window$ionic;\n  var addRequest = _ref.addRequest,\n    addResponse = _ref.addResponse,\n    isIgnored = _ref.isIgnored;\n  var ionicHttp = (_cordova = window.cordova) === null || _cordova === void 0 ? void 0 : (_cordova$plugin = _cordova.plugin) === null || _cordova$plugin === void 0 ? void 0 : _cordova$plugin.http;\n  var ionicMap = {};\n  var unsubscribedFromIonic = false;\n  if (typeof ionicHttp === 'undefined') {\n    // Plugin does not exist! Empty uninstall hook.\n    return function () {};\n  }\n  var platforms = (_window$ionic = window.ionic) === null || _window$ionic === void 0 ? void 0 : _window$ionic.platforms;\n  if (typeof platforms !== 'undefined' && typeof platforms.some === 'function' && platforms.some(function (e) {\n    return UNSUPPORTED_PLATFORMS.has(e);\n  })) {\n    // We appear to be running in a web browser, do not hook and let XHR wrap instead.\n    return function () {};\n  }\n  var originalSendRequest = ionicHttp.sendRequest;\n  var handleResponse = (0, _protectFunc.default)(function (response, isSuccess, ionicReqId) {\n    if (!isIgnored(\"\".concat(LOGROCKET_IONIC_LABEL).concat(ionicReqId))) {\n      try {\n        var responseHash = {\n          url: response.url || '',\n          status: response.status < 600 && response.status >= 100 ? response.status : 0,\n          headers: response.headers || {},\n          body: isSuccess ? response.data : response.error,\n          method: ionicMap[ionicReqId].toUpperCase()\n        };\n        addResponse(\"\".concat(LOGROCKET_IONIC_LABEL).concat(ionicReqId), responseHash);\n      } catch (err) {\n        var _responseHash = {\n          url: response.url || '',\n          status: response.status < 600 && response.status >= 100 ? response.status : 0,\n          headers: response.headers || {},\n          body: \"LogRocket fetch error: \".concat(err.message),\n          method: ionicMap[ionicReqId].toUpperCase()\n        };\n        addResponse(\"\".concat(LOGROCKET_IONIC_LABEL).concat(ionicReqId), _responseHash);\n      }\n    } // Otherwise, don't even try to read ignored / unsubscribed requests\n  });\n\n  ionicHttp.sendRequest = function (url, options, success, failure) {\n    var currentId = ++ionicIdCounter;\n    var ourSuccessHandler = function ourSuccessHandler(response) {\n      if (!unsubscribedFromIonic) {\n        handleResponse(response, true, currentId);\n        delete ionicMap[currentId];\n      }\n      success(response);\n    };\n    var ourFailureHandler = function ourFailureHandler(response) {\n      if (!unsubscribedFromIonic) {\n        handleResponse(response, false, currentId);\n        delete ionicMap[currentId];\n      }\n      failure(response);\n    };\n    if (!unsubscribedFromIonic) {\n      try {\n        // will throw just like identical ionic code if input is invalid\n        var modifiedOptions = handleMissingOptions(options, ionicHttp);\n        var modifiedUrl = appendQueryParamsString(url, serializeObject('', modifiedOptions.params, true));\n        // need to minic behavior of Ionic API by adding global headers\n        var mergedHeaders = getMergedHeaders(url, modifiedOptions.headers, ionicHttp);\n\n        // ionic APIs default to get method\n        var method = modifiedOptions.method || 'get';\n        ionicMap[currentId] = method;\n        var requestHash = {\n          url: modifiedUrl,\n          method: method.toUpperCase(),\n          headers: mergedHeaders || {},\n          // only applicable on post, put or patch methods\n          body: processData(modifiedOptions.data || {}, modifiedOptions.serializer)\n        };\n        addRequest(\"\".concat(LOGROCKET_IONIC_LABEL).concat(currentId), requestHash);\n      } catch (err) {\n        var _requestHash = {\n          url: url,\n          method: (options.method || 'get').toUpperCase(),\n          headers: {},\n          body: \"LogRocket fetch error: \".concat(err.message)\n        };\n        addRequest(\"\".concat(LOGROCKET_IONIC_LABEL).concat(currentId), _requestHash);\n      }\n    }\n    return originalSendRequest(url, options, ourSuccessHandler, ourFailureHandler);\n  };\n  return function () {\n    unsubscribedFromIonic = true;\n    ionicHttp.sendRequest = originalSendRequest;\n    ionicMap = {};\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/registerNetworkInformation.js\":\n/*!***********************************************************************!*\\\n  !*** ./packages/@logrocket/network/src/registerNetworkInformation.js ***!\n  \\***********************************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = registerNetworkInformation;\nvar EFFECTIVE_TYPE_VALS = {\n  'slow-2g': 'SLOW2G',\n  '2g': 'TWOG',\n  '3g': 'THREEG',\n  '4g': 'FOURG'\n};\nfunction registerNetworkInformation(logger) {\n  var lastStatus = undefined;\n  function sendNetworkInformation() {\n    var newStatus = {\n      online: window.navigator.onLine,\n      effectiveType: 'UNKOWN'\n    };\n    if (!window.navigator.onLine) {\n      newStatus.effectiveType = 'NONE';\n    } else if (window.navigator.connection && window.navigator.connection.effectiveType) {\n      newStatus.effectiveType = EFFECTIVE_TYPE_VALS[window.navigator.connection.effectiveType] || 'UNKNOWN';\n    }\n    if (lastStatus && newStatus.online === lastStatus.online && newStatus.effectiveType === lastStatus.effectiveType) {\n      return;\n    }\n    lastStatus = newStatus;\n    logger.addEvent('lr.network.NetworkStatusEvent', function () {\n      var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n        _ref$isEnabled = _ref.isEnabled,\n        isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;\n      if (!isEnabled) {\n        return null;\n      }\n      return newStatus;\n    });\n  }\n  setTimeout(sendNetworkInformation);\n  if (window.navigator.connection && typeof window.navigator.connection.addEventListener === 'function') {\n    window.navigator.connection.addEventListener('change', sendNetworkInformation);\n  }\n  window.addEventListener('online', sendNetworkInformation);\n  window.addEventListener('offline', sendNetworkInformation);\n  return function () {\n    window.removeEventListener('offline', sendNetworkInformation);\n    window.removeEventListener('online', sendNetworkInformation);\n    if (window.navigator.connection && typeof window.navigator.connection.removeEventListener === 'function') {\n      window.navigator.connection.removeEventListener('change', sendNetworkInformation);\n    }\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/network/src/registerXHR.js\":\n/*!********************************************************!*\\\n  !*** ./packages/@logrocket/network/src/registerXHR.js ***!\n  \\********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.setActive = setActive;\nexports[\"default\"] = registerXHR;\nvar _mapValues = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/mapValues */ \"./packages/@logrocket/utils/src/mapValues.ts\"));\nvar _enhanceFunc = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/enhanceFunc */ \"./packages/@logrocket/utils/src/enhanceFunc.ts\"));\nvar _protectFunc = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/protectFunc */ \"./packages/@logrocket/utils/src/protectFunc.ts\"));\nvar _startsWith = _interopRequireDefault(__webpack_require__(/*! @logrocket/utils/src/startsWith */ \"./packages/@logrocket/utils/src/startsWith.js\"));\nvar _nps = __webpack_require__(/*! @logrocket/utils/src/constants/nps */ \"./packages/@logrocket/utils/src/constants/nps.js\");\nvar _statusCodes = __webpack_require__(/*! @logrocket/utils/src/constants/statusCodes */ \"./packages/@logrocket/utils/src/constants/statusCodes.ts\");\n// eslint-disable-line no-restricted-imports\n// eslint-disable-line no-restricted-imports\n// eslint-disable-line no-restricted-imports\n// eslint-disable-line no-restricted-imports\n\n// eslint-disable-line no-restricted-imports\n\nvar isActive = true;\nfunction setActive(shouldBeActive) {\n  isActive = shouldBeActive;\n}\nvar currentXHRId = 0;\nfunction registerXHR(_ref) {\n  var addRequest = _ref.addRequest,\n    addResponse = _ref.addResponse,\n    isIgnored = _ref.isIgnored,\n    logger = _ref.logger,\n    _ref$shouldAugmentNPS = _ref.shouldAugmentNPS,\n    shouldAugmentNPS = _ref$shouldAugmentNPS === void 0 ? true : _ref$shouldAugmentNPS,\n    _ref$shouldParseXHRBl = _ref.shouldParseXHRBlob,\n    shouldParseXHRBlob = _ref$shouldParseXHRBl === void 0 ? false : _ref$shouldParseXHRBl;\n  var _XHR = XMLHttpRequest;\n  var xhrMap = new WeakMap();\n  var unsubscribedFromXhr = false;\n  var LOGROCKET_XHR_LABEL = 'xhr-';\n  window._lrXMLHttpRequest = XMLHttpRequest;\n\n  // eslint-disable-next-line no-native-reassign\n  XMLHttpRequest = function XMLHttpRequest(mozAnon, mozSystem) {\n    var xhrObject = new _XHR(mozAnon, mozSystem);\n    if (!isActive) {\n      return xhrObject;\n    }\n    xhrMap.set(xhrObject, {\n      xhrId: ++currentXHRId,\n      requestHeaders: {},\n      sent: false,\n      done: false\n    });\n    var openOriginal = xhrObject.open;\n    function openShim() {\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      try {\n        var url = args[1];\n        if (window.URL && typeof window.URL === 'function' && url.search(_nps.WOOTRIC_RESPONSES_REGEX) === 0) {\n          var logrocketSessionURL = new window.URL(logger.recordingURL);\n          logrocketSessionURL.searchParams.set('nps', 'wootric');\n          var urlObj = new window.URL(url);\n          var responseText = urlObj.searchParams.get('response[text]');\n          var feedback = responseText ? \"\".concat(responseText, \"\\n\\n\") : '';\n          urlObj.searchParams.set('response[text]', \"\".concat(feedback, \"<\").concat(logrocketSessionURL.href, \"|View LogRocket session>\"));\n          args[1] = urlObj.href; // eslint-disable-line no-param-reassign\n        }\n      } catch (e) {/* do nothing */}\n      return openOriginal.apply(this, args);\n    }\n    var sendOriginal = xhrObject.send;\n    function sendShim() {\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      try {\n        var currentXHR = xhrMap.get(xhrObject);\n        if (window.URL && typeof window.URL === 'function' && currentXHR && currentXHR.url && currentXHR.url.search(_nps.DELIGHTED_RESPONSES_REGEX) === 0 && args.length && args[0].indexOf(_nps.DELIGHTED_FEEDBACK_PREFIX) !== -1) {\n          var recordingURL = new window.URL(logger.recordingURL);\n          recordingURL.searchParams.set('nps', 'delighted');\n          var logrocketSessionURL = encodeURIComponent(recordingURL.href);\n          var data = args[0].split('&').map(function (dataString) {\n            if ((0, _startsWith.default)(dataString, _nps.DELIGHTED_FEEDBACK_PREFIX)) {\n              var isEmpty = dataString === _nps.DELIGHTED_FEEDBACK_PREFIX;\n              return \"\".concat(dataString).concat(isEmpty ? '' : '\\n\\n', \"<\").concat(logrocketSessionURL, \"|View LogRocket session>\");\n            }\n            return dataString;\n          }).join('&');\n          args[0] = data; // eslint-disable-line no-param-reassign\n        }\n      } catch (e) {/* do nothing */}\n      return sendOriginal.apply(this, args);\n    }\n    if (shouldAugmentNPS) {\n      xhrObject.open = openShim;\n      xhrObject.send = sendShim;\n    }\n    var captureResponse = function captureResponse() {\n      var _window$navigator;\n      if (unsubscribedFromXhr) {\n        return;\n      }\n      var currentXHR = xhrMap.get(xhrObject);\n      if (!currentXHR || isIgnored(\"\".concat(LOGROCKET_XHR_LABEL).concat(currentXHR.xhrId))) {\n        return;\n      }\n      if (!currentXHR.sent || !currentXHR.done) {\n        // Don't capture the response if we haven't yet captured the request, or if we haven't received the response.\n        // The flow of events is different for async and sync requests.\n        // Async requests:\n        //   1. open\n        //   2. original send\n        //   3. our send enhancer (captures request)\n        //   4. loadstart\n        //   5. readyStateChange(readyState: 4)\n        //   6. load, abort, error, or timeout\n        //   7. loadend (captures response)\n        // Sync requests:\n        //   1. open\n        //   2. original send\n        //   3. loadstart\n        //   4. readyStateChange(readyState: 4)\n        //   5. load, abort, error, or timeout\n        //   6. loadend\n        //   7. our send enhancer (captures request and response)\n        return;\n      }\n      var status = currentXHR.status || _statusCodes.XHR_CUSTOM_STATUS_CODES.error;\n      if (status === _statusCodes.XHR_CUSTOM_STATUS_CODES.error && ((_window$navigator = window.navigator) === null || _window$navigator === void 0 ? void 0 : _window$navigator.onLine) === false) {\n        // requests to localhost can still succeed when offline\n        status = _statusCodes.XHR_CUSTOM_STATUS_CODES.offline;\n      }\n      var response = {\n        url: currentXHR.url,\n        status: status,\n        headers: currentXHR.responseHeaders,\n        body: currentXHR.responseBody,\n        method: (currentXHR.method || '').toUpperCase()\n      };\n      if (shouldParseXHRBlob && response.body instanceof Blob) {\n        var blobReader = new FileReader();\n        blobReader.readAsText(response.body);\n        blobReader.onload = function () {\n          try {\n            response.body = JSON.parse(blobReader.result);\n          } catch (_unused) {} // eslint-disable-line no-empty\n          addResponse(\"\".concat(LOGROCKET_XHR_LABEL).concat(currentXHR.xhrId), response);\n        };\n      } else {\n        addResponse(\"\".concat(LOGROCKET_XHR_LABEL).concat(currentXHR.xhrId), response);\n      }\n    };\n\n    // ..., 'open', (method, url, async, username, password) => {\n    (0, _enhanceFunc.default)(xhrObject, 'open', (0, _protectFunc.default)(function (method, url) {\n      if (unsubscribedFromXhr) {\n        return;\n      }\n      var currentXHR = xhrMap.get(xhrObject);\n      currentXHR.method = method;\n      currentXHR.url = url;\n    }));\n    (0, _enhanceFunc.default)(xhrObject, 'send', (0, _protectFunc.default)(function (data) {\n      if (unsubscribedFromXhr) {\n        return;\n      }\n      var currentXHR = xhrMap.get(xhrObject);\n      if (!currentXHR) {\n        return;\n      }\n      var request = {\n        url: currentXHR.url,\n        method: currentXHR.method && currentXHR.method.toUpperCase(),\n        headers: (0, _mapValues.default)(currentXHR.requestHeaders || {}, function (headerValues) {\n          return headerValues.join(', ');\n        }),\n        body: data\n      };\n      addRequest(\"\".concat(LOGROCKET_XHR_LABEL).concat(currentXHR.xhrId), request);\n      currentXHR.sent = true;\n\n      // Attempt to capture the response event for synchronous requests\n      captureResponse();\n    }));\n    (0, _enhanceFunc.default)(xhrObject, 'setRequestHeader', (0, _protectFunc.default)(function (header, value) {\n      if (unsubscribedFromXhr) {\n        return;\n      }\n      var currentXHR = xhrMap.get(xhrObject);\n      if (!currentXHR) {\n        return;\n      }\n      currentXHR.requestHeaders = currentXHR.requestHeaders || {};\n      currentXHR.requestHeaders[header] = currentXHR.requestHeaders[header] || [];\n      currentXHR.requestHeaders[header].push(value);\n    }));\n    var xhrListeners = {\n      readystatechange: (0, _protectFunc.default)(function () {\n        if (unsubscribedFromXhr) {\n          return;\n        }\n        if (xhrObject.readyState === 4) {\n          var currentXHR = xhrMap.get(xhrObject);\n          if (!currentXHR) {\n            return;\n          }\n\n          // Do not read ignored requests at all.\n          if (isIgnored(\"\".concat(LOGROCKET_XHR_LABEL).concat(currentXHR.xhrId))) {\n            return;\n          }\n          var headerString = xhrObject.getAllResponseHeaders() || '';\n          currentXHR.responseHeaders = headerString.split(/[\\r\\n]+/).reduce(function (previous, current) {\n            var next = previous;\n            var headerParts = current.split(': ');\n            if (headerParts.length > 0) {\n              var key = headerParts.shift(); // first index of the array\n              var value = headerParts.join(': '); // rest of the array repaired\n              if (previous[key]) {\n                next[key] += \", \".concat(value);\n              } else {\n                next[key] = value;\n              }\n            }\n            return next;\n          }, {});\n          var body;\n\n          // IE 11 sometimes throws when trying to access large responses\n          try {\n            switch (xhrObject.responseType) {\n              case 'json':\n                body = logger._shouldCloneResponse ? JSON.parse(JSON.stringify(xhrObject.response)) : xhrObject.response;\n                break;\n              case 'arraybuffer':\n              case 'blob':\n                {\n                  body = xhrObject.response;\n                  break;\n                }\n              case 'document':\n                {\n                  body = xhrObject.responseXML;\n                  break;\n                }\n              case 'text':\n              case '':\n                {\n                  body = xhrObject.responseText;\n                  break;\n                }\n              default:\n                {\n                  body = '';\n                }\n            }\n          } catch (err) {\n            body = 'LogRocket: Error accessing response.';\n          }\n          currentXHR.responseBody = body;\n          currentXHR.status = xhrObject.status;\n          currentXHR.done = true;\n        }\n      }),\n      abort: (0, _protectFunc.default)(function () {\n        var currentXHR = xhrMap.get(xhrObject);\n        if (currentXHR) {\n          currentXHR.status = _statusCodes.XHR_CUSTOM_STATUS_CODES.aborted;\n        }\n      }),\n      timeout: (0, _protectFunc.default)(function () {\n        var currentXHR = xhrMap.get(xhrObject);\n        if (currentXHR) {\n          currentXHR.status = _statusCodes.XHR_CUSTOM_STATUS_CODES.timeout;\n        }\n      }),\n      loadend: (0, _protectFunc.default)(function () {\n        captureResponse();\n      })\n      // // Unused Event Listeners\n      // loadstart: () => {},\n      // progress: () => {},\n      // error: () => {},\n      // load: () => {},\n    };\n\n    Object.keys(xhrListeners).forEach(function (key) {\n      xhrObject.addEventListener(key, xhrListeners[key]);\n    });\n    return xhrObject;\n  };\n\n  // this allows \"instanceof XMLHttpRequest\" to work\n  XMLHttpRequest.prototype = _XHR.prototype;\n\n  // Persist the static variables.\n  ['UNSENT', 'OPENED', 'HEADERS_RECEIVED', 'LOADING', 'DONE'].forEach(function (variable) {\n    XMLHttpRequest[variable] = _XHR[variable];\n  });\n  return function () {\n    unsubscribedFromXhr = true;\n    // eslint-disable-next-line no-native-reassign\n    XMLHttpRequest = _XHR;\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/now/src/index.js\":\n/*!**********************************************!*\\\n  !*** ./packages/@logrocket/now/src/index.js ***!\n  \\**********************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\n/* eslint-disable compat/compat */\nvar dateNow = Date.now.bind(Date);\nvar loadTime = dateNow();\nvar _default = typeof performance !== 'undefined' && performance.now ? performance.now.bind(performance) : function () {\n  return dateNow() - loadTime;\n};\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/redux/src/createEnhancer.js\":\n/*!*********************************************************!*\\\n  !*** ./packages/@logrocket/redux/src/createEnhancer.js ***!\n  \\*********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = createEnhancer;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _now = _interopRequireDefault(__webpack_require__(/*! @logrocket/now */ \"./packages/@logrocket/now/src/index.js\"));\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar storeIdCounter = 0;\nfunction createEnhancer(logger) {\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref$stateSanitizer = _ref.stateSanitizer,\n    stateSanitizer = _ref$stateSanitizer === void 0 ? function (f) {\n      return f;\n    } : _ref$stateSanitizer,\n    _ref$actionSanitizer = _ref.actionSanitizer,\n    actionSanitizer = _ref$actionSanitizer === void 0 ? function (f) {\n      return f;\n    } : _ref$actionSanitizer;\n  // an enhancer is a function that returns a Store\n  return function (createStore) {\n    return function (reducer, initialState, enhancer) {\n      var store = createStore(reducer, initialState, enhancer);\n      var originalDispatch = store.dispatch;\n      var storeId = storeIdCounter++;\n      logger.addEvent('lr.redux.InitialState', function () {\n        var sanitizedState;\n        try {\n          // only try catch user defined functions\n          sanitizedState = stateSanitizer(store.getState());\n        } catch (err) {\n          console.error(err.toString());\n        }\n        return {\n          state: sanitizedState,\n          storeId: storeId\n        };\n      });\n      var dispatch = function dispatch(action) {\n        var start = (0, _now.default)();\n        var err;\n        var res;\n        try {\n          res = originalDispatch(action);\n        } catch (_err) {\n          err = _err;\n        } finally {\n          var duration = (0, _now.default)() - start;\n          logger.addEvent('lr.redux.ReduxAction', function () {\n            var sanitizedState = null;\n            var sanitizedAction = null;\n            try {\n              // only try catch user defined functions\n              sanitizedState = stateSanitizer(store.getState());\n              sanitizedAction = actionSanitizer(action);\n            } catch (err) {\n              console.error(err.toString());\n            }\n            if (sanitizedState && sanitizedAction) {\n              return {\n                storeId: storeId,\n                action: sanitizedAction,\n                duration: duration,\n                stateDelta: sanitizedState\n              };\n            }\n            return null;\n          });\n        }\n        if (err) {\n          throw err;\n        }\n        return res;\n      };\n      return _objectSpread(_objectSpread({}, store), {}, {\n        dispatch: dispatch\n      });\n    };\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/redux/src/createMiddleware.js\":\n/*!***********************************************************!*\\\n  !*** ./packages/@logrocket/redux/src/createMiddleware.js ***!\n  \\***********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = createMiddleware;\nvar _now = _interopRequireDefault(__webpack_require__(/*! @logrocket/now */ \"./packages/@logrocket/now/src/index.js\"));\nvar storeIdCounter = 0;\nfunction createMiddleware(logger) {\n  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref$stateSanitizer = _ref.stateSanitizer,\n    stateSanitizer = _ref$stateSanitizer === void 0 ? function (f) {\n      return f;\n    } : _ref$stateSanitizer,\n    _ref$actionSanitizer = _ref.actionSanitizer,\n    actionSanitizer = _ref$actionSanitizer === void 0 ? function (f) {\n      return f;\n    } : _ref$actionSanitizer;\n  return function (store) {\n    var storeId = storeIdCounter++;\n    logger.addEvent('lr.redux.InitialState', function () {\n      var sanitizedState;\n      try {\n        // only try catch user defined functions\n        sanitizedState = stateSanitizer(store.getState());\n      } catch (err) {\n        console.error(err.toString());\n      }\n      return {\n        state: sanitizedState,\n        storeId: storeId\n      };\n    });\n    return function (next) {\n      return function (action) {\n        var start = (0, _now.default)();\n        var err;\n        var res;\n        try {\n          res = next(action);\n        } catch (_err) {\n          err = _err;\n        } finally {\n          var duration = (0, _now.default)() - start;\n          logger.addEvent('lr.redux.ReduxAction', function () {\n            var sanitizedState = null;\n            var sanitizedAction = null;\n            try {\n              // only try catch user defined functions\n              sanitizedState = stateSanitizer(store.getState());\n              sanitizedAction = actionSanitizer(action);\n            } catch (err) {\n              console.error(err.toString());\n            }\n            if (sanitizedState && sanitizedAction) {\n              return {\n                storeId: storeId,\n                action: sanitizedAction,\n                duration: duration,\n                stateDelta: sanitizedState\n              };\n            }\n            return null;\n          });\n        }\n        if (err) {\n          throw err;\n        }\n        return res;\n      };\n    };\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/redux/src/index.js\":\n/*!************************************************!*\\\n  !*** ./packages/@logrocket/redux/src/index.js ***!\n  \\************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nObject.defineProperty(exports, \"createEnhancer\", ({\n  enumerable: true,\n  get: function get() {\n    return _createEnhancer.default;\n  }\n}));\nObject.defineProperty(exports, \"createMiddleware\", ({\n  enumerable: true,\n  get: function get() {\n    return _createMiddleware.default;\n  }\n}));\nvar _createEnhancer = _interopRequireDefault(__webpack_require__(/*! ./createEnhancer */ \"./packages/@logrocket/redux/src/createEnhancer.js\"));\nvar _createMiddleware = _interopRequireDefault(__webpack_require__(/*! ./createMiddleware */ \"./packages/@logrocket/redux/src/createMiddleware.js\"));\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/TraceKit.js\":\n/*!***************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/TraceKit.js ***!\n  \\***************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n/* eslint-disable */\n\n\n\n/*\n TraceKit - Cross browser stack traces - github.com/occ/TraceKit\n\n This was originally forked from github.com/occ/TraceKit, but has since been\n largely re-written and is now maintained as part of raven-js.  Tests for\n this are in test/vendor.\n\n MIT license\n*/\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar TraceKit = {\n  collectWindowErrors: true,\n  debug: false\n};\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window = typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {};\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;\nfunction getLocationHref() {\n  if (typeof document === 'undefined' || typeof document.location === 'undefined') return '';\n  return document.location.href;\n}\n\n/**\n * TraceKit.report: cross-browser processing of unhandled exceptions\n *\n * Syntax:\n *   TraceKit.report.subscribe(function(stackInfo) { ... })\n *   TraceKit.report.unsubscribe(function(stackInfo) { ... })\n *   TraceKit.report(exception)\n *   try { ...code... } catch(ex) { TraceKit.report(ex); }\n *\n * Supports:\n *   - Firefox: full stack trace with line numbers, plus column number\n *              on top frame; column number is not guaranteed\n *   - Opera:   full stack trace with line and column numbers\n *   - Chrome:  full stack trace with line and column numbers\n *   - Safari:  line and column number for the top frame only; some frames\n *              may be missing, and column number is not guaranteed\n *   - IE:      line and column number for the top frame only; some frames\n *              may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n *   - IE5.5+ (only 8.0 tested)\n *   - Firefox 0.9+ (only 3.5+ tested)\n *   - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n *     Exceptions Have Stacktrace to be enabled in opera:config)\n *   - Safari 3+ (only 4+ tested)\n *   - Chrome 1+ (only 5+ tested)\n *   - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a stackInfo object as described in the\n * TraceKit.computeStackTrace docs.\n */\nTraceKit.report = function reportModuleWrapper() {\n  var handlers = [],\n    lastArgs = null,\n    lastException = null,\n    lastExceptionStack = null;\n\n  /**\n   * Add a crash handler.\n   * @param {Function} handler\n   */\n  function subscribe(handler) {\n    installGlobalHandler();\n    handlers.push(handler);\n  }\n\n  /**\n   * Remove a crash handler.\n   * @param {Function} handler\n   */\n  function unsubscribe(handler) {\n    for (var i = handlers.length - 1; i >= 0; --i) {\n      if (handlers[i] === handler) {\n        handlers.splice(i, 1);\n      }\n    }\n  }\n\n  /**\n   * Remove all crash handlers.\n   */\n  function unsubscribeAll() {\n    uninstallGlobalHandler();\n    handlers = [];\n  }\n\n  /**\n   * Dispatch stack information to all handlers.\n   * @param {Object.<string, *>} stack\n   */\n  function notifyHandlers(stack, isWindowError) {\n    var exception = null;\n    if (isWindowError && !TraceKit.collectWindowErrors) {\n      return;\n    }\n    for (var i in handlers) {\n      if (handlers.hasOwnProperty(i)) {\n        try {\n          handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));\n        } catch (inner) {\n          exception = inner;\n        }\n      }\n    }\n    if (exception) {\n      throw exception;\n    }\n  }\n  var _oldOnerrorHandler, _onErrorHandlerInstalled;\n\n  /**\n   * Ensures all global unhandled exceptions are recorded.\n   * Supported by Gecko and IE.\n   * @param {string} message Error message.\n   * @param {string} url URL of script that generated the exception.\n   * @param {(number|string)} lineNo The line number at which the error\n   * occurred.\n   * @param {?(number|string)} colNo The column number at which the error\n   * occurred.\n   * @param {?Error} ex The actual Error object.\n   */\n  function traceKitWindowOnError(message, url, lineNo, colNo, ex) {\n    var stack = null;\n    if (lastExceptionStack) {\n      TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(lastExceptionStack, url, lineNo, message);\n      processLastException();\n    } else if (ex) {\n      // New chrome and blink send along a real error object\n      // Let's just report that like a normal error.\n      // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror\n      stack = TraceKit.computeStackTrace(ex);\n      notifyHandlers(stack, true);\n    } else {\n      var location = {\n        'url': url,\n        'line': lineNo,\n        'column': colNo\n      };\n      var name = undefined;\n      var msg = message; // must be new var or will modify original `arguments`\n      var groups;\n      if ({}.toString.call(message) === '[object String]') {\n        var groups = message.match(ERROR_TYPES_RE);\n        if (groups) {\n          name = groups[1];\n          msg = groups[2];\n        }\n      }\n      location.func = UNKNOWN_FUNCTION;\n      stack = {\n        'name': name,\n        'message': msg,\n        'url': getLocationHref(),\n        'stack': [location]\n      };\n      notifyHandlers(stack, true);\n    }\n    if (_oldOnerrorHandler) {\n      return _oldOnerrorHandler.apply(this, arguments);\n    }\n    return false;\n  }\n  function installGlobalHandler() {\n    if (_onErrorHandlerInstalled) {\n      return;\n    }\n    _oldOnerrorHandler = _window.onerror;\n    _window.onerror = traceKitWindowOnError;\n    _onErrorHandlerInstalled = true;\n  }\n  function uninstallGlobalHandler() {\n    if (!_onErrorHandlerInstalled) {\n      return;\n    }\n    _window.onerror = _oldOnerrorHandler;\n    _onErrorHandlerInstalled = false;\n    _oldOnerrorHandler = undefined;\n  }\n  function processLastException() {\n    var _lastExceptionStack = lastExceptionStack,\n      _lastArgs = lastArgs;\n    lastArgs = null;\n    lastExceptionStack = null;\n    lastException = null;\n    notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));\n  }\n\n  /**\n   * Reports an unhandled Error to TraceKit.\n   * @param {Error} ex\n   * @param {?boolean} rethrow If false, do not re-throw the exception.\n   * Only used for window.onerror to not cause an infinite loop of\n   * rethrowing.\n   */\n  function report(ex, rethrow) {\n    var args = _slice.call(arguments, 1);\n    if (lastExceptionStack) {\n      if (lastException === ex) {\n        return; // already caught by an inner catch block, ignore\n      } else {\n        processLastException();\n      }\n    }\n    var stack = TraceKit.computeStackTrace(ex);\n    lastExceptionStack = stack;\n    lastException = ex;\n    lastArgs = args;\n\n    // If the stack trace is incomplete, wait for 2 seconds for\n    // slow slow IE to see if onerror occurs or not before reporting\n    // this exception; otherwise, we will end up with an incomplete\n    // stack trace\n    setTimeout(function () {\n      if (lastException === ex) {\n        processLastException();\n      }\n    }, stack.incomplete ? 2000 : 0);\n    if (rethrow !== false) {\n      throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n    }\n  }\n\n  report.subscribe = subscribe;\n  report.unsubscribe = unsubscribe;\n  report.uninstall = unsubscribeAll;\n  return report;\n}();\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n *   s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n * Returns:\n *   s.name              - exception name\n *   s.message           - exception message\n *   s.stack[i].url      - JavaScript or HTML file URL\n *   s.stack[i].func     - function name, or empty for anonymous functions (if guessing did not work)\n *   s.stack[i].args     - arguments passed to the function, if known\n *   s.stack[i].line     - line number, if known\n *   s.stack[i].column   - column number, if known\n *\n * Supports:\n *   - Firefox:  full stack trace with line numbers and unreliable column\n *               number on top frame\n *   - Opera 10: full stack trace with line and column numbers\n *   - Opera 9-: full stack trace with line numbers\n *   - Chrome:   full stack trace with line and column numbers\n *   - Safari:   line and column number for the topmost stacktrace element\n *               only\n *   - IE:       no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n *  * in Safari, some methods may be missing from the stack trace;\n *  * in IE, the topmost function in the stack trace will always be the\n *    caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n */\nTraceKit.computeStackTrace = function computeStackTraceWrapper() {\n  /**\n   * Escapes special characters, except for whitespace, in a string to be\n   * used inside a regular expression as a string literal.\n   * @param {string} text The string.\n   * @return {string} The escaped string literal.\n   */\n  function escapeRegExp(text) {\n    return text.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#]/g, '\\\\$&');\n  }\n\n  /**\n   * Escapes special characters in a string to be used inside a regular\n   * expression as a string literal. Also ensures that HTML entities will\n   * be matched the same as their literal friends.\n   * @param {string} body The string.\n   * @return {string} The escaped string.\n   */\n  function escapeCodeAsRegExpForMatchingInsideHTML(body) {\n    return escapeRegExp(body).replace('<', '(?:<|&lt;)').replace('>', '(?:>|&gt;)').replace('&', '(?:&|&amp;)').replace('\"', '(?:\"|&quot;)').replace(/\\s+/g, '\\\\s+');\n  }\n\n  // Contents of Exception in various browsers.\n  //\n  // SAFARI:\n  // ex.message = Can't find variable: qq\n  // ex.line = 59\n  // ex.sourceId = 580238192\n  // ex.sourceURL = http://...\n  // ex.expressionBeginOffset = 96\n  // ex.expressionCaretOffset = 98\n  // ex.expressionEndOffset = 98\n  // ex.name = ReferenceError\n  //\n  // FIREFOX:\n  // ex.message = qq is not defined\n  // ex.fileName = http://...\n  // ex.lineNumber = 59\n  // ex.columnNumber = 69\n  // ex.stack = ...stack trace... (see the example below)\n  // ex.name = ReferenceError\n  //\n  // CHROME:\n  // ex.message = qq is not defined\n  // ex.name = ReferenceError\n  // ex.type = not_defined\n  // ex.arguments = ['aa']\n  // ex.stack = ...stack trace...\n  //\n  // INTERNET EXPLORER:\n  // ex.message = ...\n  // ex.name = ReferenceError\n  //\n  // OPERA:\n  // ex.message = ...message... (see the example below)\n  // ex.name = ReferenceError\n  // ex.opera#sourceloc = 11  (pretty much useless, duplicates the info in ex.message)\n  // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n  /**\n   * Computes stack trace information from the stack property.\n   * Chrome and Gecko use this property.\n   * @param {Error} ex\n   * @return {?Object.<string, *>} Stack trace information.\n   */\n  function computeStackTraceFromStackProp(ex) {\n    if (typeof ex.stack === 'undefined' || !ex.stack) return;\n    var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n      gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|resource|\\[native).*?)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n      winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n      lines = ex.stack.split('\\n'),\n      stack = [],\n      parts,\n      element,\n      reference = /^(.*) is undefined$/.exec(ex.message);\n    for (var i = 0, j = lines.length; i < j; ++i) {\n      if (parts = chrome.exec(lines[i])) {\n        var isNative = parts[2] && parts[2].indexOf('native') !== -1;\n        element = {\n          'url': !isNative ? parts[2] : null,\n          'func': parts[1] || UNKNOWN_FUNCTION,\n          'args': isNative ? [parts[2]] : [],\n          'line': parts[3] ? +parts[3] : null,\n          'column': parts[4] ? +parts[4] : null\n        };\n      } else if (parts = winjs.exec(lines[i])) {\n        element = {\n          'url': parts[2],\n          'func': parts[1] || UNKNOWN_FUNCTION,\n          'args': [],\n          'line': +parts[3],\n          'column': parts[4] ? +parts[4] : null\n        };\n      } else if (parts = gecko.exec(lines[i])) {\n        element = {\n          'url': parts[3],\n          'func': parts[1] || UNKNOWN_FUNCTION,\n          'args': parts[2] ? parts[2].split(',') : [],\n          'line': parts[4] ? +parts[4] : null,\n          'column': parts[5] ? +parts[5] : null\n        };\n      } else {\n        continue;\n      }\n      if (!element.func && element.line) {\n        element.func = UNKNOWN_FUNCTION;\n      }\n      stack.push(element);\n    }\n    if (!stack.length) {\n      return null;\n    }\n    if (!stack[0].column && typeof ex.columnNumber !== 'undefined') {\n      // FireFox uses this awesome columnNumber property for its top frame\n      // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n      // so adding 1\n      stack[0].column = ex.columnNumber + 1;\n    }\n    return {\n      'name': ex.name,\n      'message': ex.message,\n      'url': getLocationHref(),\n      'stack': stack\n    };\n  }\n\n  /**\n   * Adds information about the first frame to incomplete stack traces.\n   * Safari and IE require this to get complete data on the first frame.\n   * @param {Object.<string, *>} stackInfo Stack trace information from\n   * one of the compute* methods.\n   * @param {string} url The URL of the script that caused an error.\n   * @param {(number|string)} lineNo The line number of the script that\n   * caused an error.\n   * @param {string=} message The error generated by the browser, which\n   * hopefully contains the name of the object that caused the error.\n   * @return {boolean} Whether or not the stack information was\n   * augmented.\n   */\n  function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n    var initial = {\n      'url': url,\n      'line': lineNo\n    };\n    if (initial.url && initial.line) {\n      stackInfo.incomplete = false;\n      if (!initial.func) {\n        initial.func = UNKNOWN_FUNCTION;\n      }\n      if (stackInfo.stack.length > 0) {\n        if (stackInfo.stack[0].url === initial.url) {\n          if (stackInfo.stack[0].line === initial.line) {\n            return false; // already in stack trace\n          } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) {\n            stackInfo.stack[0].line = initial.line;\n            return false;\n          }\n        }\n      }\n      stackInfo.stack.unshift(initial);\n      stackInfo.partial = true;\n      return true;\n    } else {\n      stackInfo.incomplete = true;\n    }\n    return false;\n  }\n\n  /**\n   * Computes stack trace information by walking the arguments.caller\n   * chain at the time the exception occurred. This will cause earlier\n   * frames to be missed but is the only way to get any stack trace in\n   * Safari and IE. The top frame is restored by\n   * {@link augmentStackTraceWithInitialElement}.\n   * @param {Error} ex\n   * @return {?Object.<string, *>} Stack trace information.\n   */\n  function computeStackTraceByWalkingCallerChain(ex, depth) {\n    var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n      stack = [],\n      funcs = {},\n      recursion = false,\n      parts,\n      item,\n      source;\n    for (var curr = computeStackTraceByWalkingCallerChain.caller; curr && !recursion; curr = curr.caller) {\n      if (curr === computeStackTrace || curr === TraceKit.report) {\n        // console.log('skipping internal function');\n        continue;\n      }\n      item = {\n        'url': null,\n        'func': UNKNOWN_FUNCTION,\n        'line': null,\n        'column': null\n      };\n      if (curr.name) {\n        item.func = curr.name;\n      } else if (parts = functionName.exec(curr.toString())) {\n        item.func = parts[1];\n      }\n      if (typeof item.func === 'undefined') {\n        try {\n          item.func = parts.input.substring(0, parts.input.indexOf('{'));\n        } catch (e) {}\n      }\n      if (funcs['' + curr]) {\n        recursion = true;\n      } else {\n        funcs['' + curr] = true;\n      }\n      stack.push(item);\n    }\n    if (depth) {\n      // console.log('depth is ' + depth);\n      // console.log('stack is ' + stack.length);\n      stack.splice(0, depth);\n    }\n    var result = {\n      'name': ex.name,\n      'message': ex.message,\n      'url': getLocationHref(),\n      'stack': stack\n    };\n    augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description);\n    return result;\n  }\n\n  /**\n   * Computes a stack trace for an exception.\n   * @param {Error} ex\n   * @param {(string|number)=} depth\n   */\n  function computeStackTrace(ex, depth) {\n    var stack = null;\n    depth = depth == null ? 0 : +depth;\n    try {\n      stack = computeStackTraceFromStackProp(ex);\n      if (stack) {\n        return stack;\n      }\n    } catch (e) {\n      if (TraceKit.debug) {\n        throw e;\n      }\n    }\n    try {\n      stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n      if (stack) {\n        return stack;\n      }\n    } catch (e) {\n      if (TraceKit.debug) {\n        throw e;\n      }\n    }\n    return {\n      'name': ex.name,\n      'message': ex.message,\n      'url': getLocationHref()\n    };\n  }\n  computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n  computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n  return computeStackTrace;\n}();\nvar _default = TraceKit;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/constants/nps.js\":\n/*!********************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/constants/nps.js ***!\n  \\********************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.DELIGHTED_FEEDBACK_PREFIX = exports.DELIGHTED_RESPONSES_REGEX = exports.WOOTRIC_RESPONSES_REGEX = void 0;\nvar WOOTRIC_RESPONSES_REGEX = /^https:\\/\\/production.wootric.com\\/responses/;\nexports.WOOTRIC_RESPONSES_REGEX = WOOTRIC_RESPONSES_REGEX;\nvar DELIGHTED_RESPONSES_REGEX = /^https:\\/\\/web.delighted.com\\/e\\/[a-zA-Z-]*\\/c/;\nexports.DELIGHTED_RESPONSES_REGEX = DELIGHTED_RESPONSES_REGEX;\nvar DELIGHTED_FEEDBACK_PREFIX = 'comment=';\nexports.DELIGHTED_FEEDBACK_PREFIX = DELIGHTED_FEEDBACK_PREFIX;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/constants/statusCodes.ts\":\n/*!****************************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/constants/statusCodes.ts ***!\n  \\****************************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.getStatusText = getStatusText;\nexports.XHR_CUSTOM_FAILURE_STATUSES = exports.XHR_CUSTOM_STATUS_CODES = exports.STATUS_CODES = void 0;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _XHR_CUSTOM_FAILURE_S;\n// status codes via https://developer.mozilla.org/en-US/docs/Web/HTTP/Status\n\nvar STATUS_CODES = {\n  0: '',\n  100: 'Continue',\n  101: 'Switching Protocol',\n  102: 'Processing',\n  103: 'Early Hints',\n  200: 'OK',\n  201: 'Created',\n  202: 'Accepted',\n  203: 'Non-Authoritative Information',\n  204: 'No Content',\n  205: 'Reset Content',\n  206: 'Partial Content',\n  207: 'Multi-Status',\n  208: 'Already Reported',\n  226: 'IM Used',\n  300: 'Multiple Choices',\n  301: 'Moved Permanently',\n  302: 'Found',\n  303: 'See Other',\n  304: 'Not Modified',\n  305: 'Use Proxy',\n  306: 'unused',\n  307: 'Temporary Redirect',\n  308: 'Permanent Redirect',\n  400: 'Bad Request',\n  401: 'Unauthorized',\n  402: 'Payment Required',\n  403: 'Forbidden',\n  404: 'Not Found',\n  405: 'Method Not Allowed',\n  406: 'Not Acceptable',\n  407: 'Proxy Authentication Required',\n  408: 'Request Timeout',\n  409: 'Conflict',\n  410: 'Gone',\n  411: 'Length Required',\n  412: 'Precondition Failed',\n  413: 'Payload Too Large',\n  414: 'URI Too Long',\n  415: 'Unsupported Media Type',\n  416: 'Range Not Satisfiable',\n  417: 'Expectation Failed',\n  418: 'I\\'m a teapot',\n  421: 'Misdirected Request',\n  422: 'Unprocessable Entity',\n  423: 'Locked',\n  424: 'Failed Dependency',\n  425: 'Too Early',\n  426: 'Upgrade Required',\n  428: 'Precondition Required',\n  429: 'Too Many Requests',\n  431: 'Request Header Fields Too Large',\n  451: 'Unavailable For Legal Reasons',\n  500: 'Internal Server Error',\n  501: 'Not Implemented',\n  502: 'Bad Gateway',\n  503: 'Service Unavailable',\n  504: 'Gateway Timeout',\n  505: 'HTTP Version Not Supported',\n  506: 'Variant Also Negotiates',\n  507: 'Insufficient Storage',\n  508: 'Loop Detected',\n  510: 'Not Extended',\n  511: 'Network Authentication Required'\n};\nexports.STATUS_CODES = STATUS_CODES;\nvar XHR_CUSTOM_STATUS_CODES = {\n  error: 0,\n  timeout: 444,\n  aborted: 499,\n  offline: 1001\n};\nexports.XHR_CUSTOM_STATUS_CODES = XHR_CUSTOM_STATUS_CODES;\nvar XHR_CUSTOM_FAILURE_STATUSES = (_XHR_CUSTOM_FAILURE_S = {}, (0, _defineProperty2.default)(_XHR_CUSTOM_FAILURE_S, XHR_CUSTOM_STATUS_CODES.error, 'Error'), (0, _defineProperty2.default)(_XHR_CUSTOM_FAILURE_S, XHR_CUSTOM_STATUS_CODES.timeout, 'Timeout'), (0, _defineProperty2.default)(_XHR_CUSTOM_FAILURE_S, XHR_CUSTOM_STATUS_CODES.aborted, 'Aborted'), (0, _defineProperty2.default)(_XHR_CUSTOM_FAILURE_S, XHR_CUSTOM_STATUS_CODES.offline, 'Offline'), _XHR_CUSTOM_FAILURE_S);\nexports.XHR_CUSTOM_FAILURE_STATUSES = XHR_CUSTOM_FAILURE_STATUSES;\nfunction getStatusText(statusCode) {\n  return STATUS_CODES[String(statusCode)];\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/createUnsubListener.ts\":\n/*!**************************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/createUnsubListener.ts ***!\n  \\**************************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.createUnsubListener = createUnsubListener;\nexports.Handler = void 0;\nvar _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\"));\nvar _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\"));\nvar Handler = /*#__PURE__*/function () {\n  function Handler(value) {\n    (0, _classCallCheck2.default)(this, Handler);\n    this._value = void 0;\n    this._value = value;\n  }\n  (0, _createClass2.default)(Handler, [{\n    key: \"get\",\n    value: function get() {\n      return this._value;\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      this._value = undefined;\n    }\n  }]);\n  return Handler;\n}();\n/*\n * This approach ensures the unsub function never keeps a reference to the event listener's target element.\n * This is not a concern in Chrome or Firefox, but Safari will hold the entire context of a function's parent function\n * in scope of that child function. This means that creating the unsub function inside 'addListener' could cause the\n * target element (the 'obj' argument) to be held in scope of the unsub function even though it is never referenced\n * in the unsub function itself. This would lead to a memory leak after the target element is removed from the DOM.\n *\n * This function is in a separate file to prevent the Terser minifier from inline-ing the function into 'addListener'.\n */\nexports.Handler = Handler;\nfunction createUnsubListener(handler) {\n  return function () {\n    handler.clear();\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/enhanceFunc.ts\":\n/*!******************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/enhanceFunc.ts ***!\n  \\******************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = enhanceFunc;\nvar _createUnsubListener = __webpack_require__(/*! ./createUnsubListener */ \"./packages/@logrocket/utils/src/createUnsubListener.ts\");\nvar NO_OP_UNREGISTER = function NO_OP_UNREGISTER() {};\nfunction enhanceFunc(obj, method, handler) {\n  if (typeof obj[method] !== 'function') {\n    return NO_OP_UNREGISTER;\n  }\n  try {\n    // eslint-disable-next-line no-inner-declarations\n    var shim = function shim() {\n      var _h$get;\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      var res = original.apply(this, args);\n      (_h$get = h.get()) === null || _h$get === void 0 ? void 0 : _h$get.apply(this, args);\n      return res;\n    }; // eslint-disable-next-line no-param-reassign\n    var original = obj[method];\n    var h = new _createUnsubListener.Handler(handler);\n    obj[method] = shim;\n    return function () {\n      // Disable our shim from running, and if the method hasn't been re-shimmed\n      // since our shim was applied, safely reset the method to its prior state\n      h.clear();\n      if (obj[method] === shim) {\n        // eslint-disable-next-line no-param-reassign\n        obj[method] = original;\n      }\n    };\n  } catch (_error) {\n    return NO_OP_UNREGISTER;\n  }\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/logError.js\":\n/*!***************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/logError.js ***!\n  \\***************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar canBind = typeof console !== 'undefined' && console.error && console.error.bind;\nvar logError = canBind ? console.error.bind(console) : function () {};\nvar _default = logError;\nexports[\"default\"] = _default;\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/mapValues.ts\":\n/*!****************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/mapValues.ts ***!\n  \\****************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = mapValues;\nfunction mapValues(obj, f) {\n  if (obj == null) {\n    return {};\n  }\n  var res = {};\n  Object.keys(obj).forEach(function (key) {\n    res[key] = f(obj[key]);\n  });\n  return res;\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/protectFunc.ts\":\n/*!******************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/protectFunc.ts ***!\n  \\******************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = protectFunc;\nvar _sendTelemetryData = _interopRequireDefault(__webpack_require__(/*! ./sendTelemetryData */ \"./packages/@logrocket/utils/src/sendTelemetryData.js\"));\nvar _logError = _interopRequireDefault(__webpack_require__(/*! ./logError */ \"./packages/@logrocket/utils/src/logError.js\"));\nfunction protectFunc(f) {\n  var onFail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};\n  return function () {\n    var result;\n    try {\n      result = f.apply(void 0, arguments);\n    } catch (err) {\n      if (typeof window !== 'undefined' && window._lrdebug) {\n        throw err;\n      }\n      var payload = onFail(err);\n      (0, _logError.default)('LogRocket', err);\n      (0, _sendTelemetryData.default)(err, payload);\n    }\n    return result;\n  };\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/scrubException.ts\":\n/*!*********************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/scrubException.ts ***!\n  \\*********************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.scrubException = scrubException;\nvar _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\"));\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction isScalar(value) {\n  return /boolean|number|string/.test((0, _typeof2.default)(value));\n}\nvar optionalScalars = [\n// Valid values for 'level' are 'fatal', 'error', 'warning', 'info',\n// and 'debug'. Defaults to 'error'.\n'level', 'logger'];\nvar optionalMaps = ['tags', 'extra'];\nfunction scrubException(data, options) {\n  if (options) {\n    var _iterator = _createForOfIteratorHelper(optionalScalars),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var field = _step.value;\n        var value = options[field];\n        if (isScalar(value)) {\n          // eslint-disable-next-line no-param-reassign\n          data[field] = value.toString();\n        }\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    var _iterator2 = _createForOfIteratorHelper(optionalMaps),\n      _step2;\n    try {\n      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n        var _field = _step2.value;\n        var dirty = options[_field] || {};\n        var scrubbed = {};\n        for (var _i = 0, _Object$keys = Object.keys(dirty); _i < _Object$keys.length; _i++) {\n          var key = _Object$keys[_i];\n          var _value = dirty[key];\n          if (isScalar(_value)) {\n            scrubbed[key.toString()] = _value.toString();\n          }\n        }\n\n        // eslint-disable-next-line no-param-reassign\n        data[_field] = scrubbed;\n      }\n    } catch (err) {\n      _iterator2.e(err);\n    } finally {\n      _iterator2.f();\n    }\n  }\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/sendTelemetryData.js\":\n/*!************************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/sendTelemetryData.js ***!\n  \\************************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.sendTelemetry = sendTelemetry;\nexports[\"default\"] = sendErrorTelemetry;\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _logError = _interopRequireDefault(__webpack_require__(/*! ./logError */ \"./packages/@logrocket/utils/src/logError.js\"));\nvar _TraceKit = _interopRequireDefault(__webpack_require__(/*! ./TraceKit */ \"./packages/@logrocket/utils/src/TraceKit.js\"));\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n// eslint-disable-next-line no-undef\nvar SCRIPT_VERSION =  true ? \"8304d923ee86bbba88df4d491ccbc1c75ecfbe70\" : 0;\nfunction _sendToSentry(data) {\n  try {\n    var _window, _window$__SDKCONFIG__;\n    var message = data.message;\n    var url = 'https://e.logrocket.com/api/3/store/?sentry_version=7&sentry_client=http%2F3.8.0&sentry_key=b64162b4187a4c5caae8a68a7e291793';\n    var body = JSON.stringify(_objectSpread({\n      message: message,\n      logger: 'javascript',\n      platform: 'javascript',\n      request: {\n        headers: {\n          'User-Agent': typeof navigator !== 'undefined' && navigator.userAgent\n        },\n        url: typeof location !== 'undefined' && location.href\n      },\n      release: SCRIPT_VERSION,\n      environment: ((_window = window) === null || _window === void 0 ? void 0 : (_window$__SDKCONFIG__ = _window.__SDKCONFIG__) === null || _window$__SDKCONFIG__ === void 0 ? void 0 : _window$__SDKCONFIG__.scriptEnv) || 'prod'\n    }, data));\n    if (typeof window !== 'undefined') {\n      var XHR = window._lrXMLHttpRequest || XMLHttpRequest;\n      var req = new XHR();\n      req.open('POST', url);\n      req.send(body);\n    } else if (typeof fetch !== 'undefined') {\n      // NOTE: fetch is intended only to be used in a web worker context where the main web SDK hasn't be initialized\n      //       (ex. Shopify SDK). Otherwise this fetch call would get captured by LogRocket and we don't want to record\n      //       network requests to LogRocket. Eventually this potential issue will be resolved by SSDK-2149.\n      // eslint-disable-next-line compat/compat\n      fetch(url, {\n        method: 'POST',\n        body: body\n      }).catch(function (rejectReason) {\n        (0, _logError.default)('Failed to send via fetch', rejectReason);\n      });\n    }\n  } catch (err) {\n    (0, _logError.default)('Failed to send', err);\n  }\n}\nfunction sendTelemetry(message, more) {\n  if (typeof window !== 'undefined' && window._lrdebug) {\n    return void (0, _logError.default)(message);\n  }\n  if (more && more.extra && more.extra.appID && typeof more.extra.appID.indexOf === 'function' && more.extra.appID.indexOf('au2drp/') === 0 && Math.random() >= 0.25) {\n    return;\n  }\n  _sendToSentry(_objectSpread({\n    message: message\n  }, more));\n}\nfunction sendErrorTelemetry(err, payload) {\n  try {\n    var message = err.message;\n    var stringPayload;\n    try {\n      stringPayload = JSON.stringify(payload).slice(0, 1000);\n    } catch (err) {\n      try {\n        stringPayload = \"Could not stringify payload: \".concat(Object.prototype.toString.call(payload));\n      } catch (err) {/* nada */}\n    }\n    var stack;\n    try {\n      stack = _TraceKit.default.computeStackTrace(err).stack.map(function (frame) {\n        return {\n          filename: frame.url,\n          lineno: frame.line,\n          colno: frame.column,\n          function: frame.func || '?'\n        };\n      });\n    } catch (err) {\n      /* nada */\n    }\n    _sendToSentry({\n      message: message,\n      extra: {\n        stringPayload: stringPayload\n      },\n      exception: {\n        values: [{\n          type: err.type,\n          value: message,\n          stacktrace: {\n            frames: stack\n          }\n        }]\n      }\n    });\n  } catch (err) {\n    (0, _logError.default)('Failed to send', err);\n  }\n}\n\n/***/ }),\n\n/***/ \"./packages/@logrocket/utils/src/startsWith.js\":\n/*!*****************************************************!*\\\n  !*** ./packages/@logrocket/utils/src/startsWith.js ***!\n  \\*****************************************************/\n/***/ (function(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = startsWith;\nfunction startsWith(value, search) {\n  var pos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n  return value && search && value.substring(pos, pos + search.length) === search;\n}\n\n/***/ }),\n\n/***/ \"./packages/logrocket/src/LogRocket.js\":\n/*!*********************************************!*\\\n  !*** ./packages/logrocket/src/LogRocket.js ***!\n  \\*********************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = exports.MAX_QUEUE_SIZE = void 0;\nvar _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\"));\nvar _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\"));\nvar _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\"));\nvar _network = _interopRequireDefault(__webpack_require__(/*! @logrocket/network */ \"./packages/@logrocket/network/src/index.js\"));\nvar _exceptions = __webpack_require__(/*! @logrocket/exceptions */ \"./packages/@logrocket/exceptions/src/index.js\");\nvar _console = _interopRequireDefault(__webpack_require__(/*! @logrocket/console */ \"./packages/@logrocket/console/src/index.js\"));\nvar _redux = __webpack_require__(/*! @logrocket/redux */ \"./packages/@logrocket/redux/src/index.js\");\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nvar MAX_QUEUE_SIZE = 1000;\nexports.MAX_QUEUE_SIZE = MAX_QUEUE_SIZE;\nvar considerIngestServerOption = function considerIngestServerOption() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n    ingestServer = _ref.ingestServer,\n    options = (0, _objectWithoutProperties2.default)(_ref, [\"ingestServer\"]);\n  if (ingestServer) {\n    return _objectSpread({\n      serverURL: \"\".concat(ingestServer, \"/i\"),\n      statsURL: \"\".concat(ingestServer, \"/s\")\n    }, options);\n  }\n  return options;\n};\nvar LogRocket = /*#__PURE__*/function () {\n  function LogRocket() {\n    var _this = this;\n    (0, _classCallCheck2.default)(this, LogRocket);\n    this._buffer = [];\n    // TODO: tests for these exposed methods.\n    ['log', 'info', 'warn', 'error', 'debug'].forEach(function (method) {\n      _this[method] = function () {\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        _this.addEvent('lr.core.LogEvent', function () {\n          var consoleOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n          if (method === 'error' && consoleOptions.shouldAggregateConsoleErrors) {\n            _exceptions.Capture.captureMessage(_this, args[0], args, {}, true);\n          }\n          return {\n            logLevel: method.toUpperCase(),\n            args: args\n          };\n        }, {\n          shouldCaptureStackTrace: true\n        });\n      };\n    });\n    this._isInitialized = false;\n    this._installed = [];\n\n    // expose a callback to get the session URL from the global context\n    window._lr_surl_cb = this.getSessionURL.bind(this);\n  }\n  (0, _createClass2.default)(LogRocket, [{\n    key: \"addEvent\",\n    value: function addEvent(type, getMessage) {\n      var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n      var time = Date.now();\n      this._run(function (logger) {\n        logger.addEvent(type, getMessage, _objectSpread(_objectSpread({}, opts), {}, {\n          timeOverride: time\n        }));\n      });\n    }\n  }, {\n    key: \"onLogger\",\n    value: function onLogger(logger) {\n      this._logger = logger;\n      while (this._buffer.length > 0) {\n        var f = this._buffer.shift();\n        f(this._logger);\n      }\n    }\n  }, {\n    key: \"_run\",\n    value: function _run(f) {\n      if (this._isDisabled) {\n        return;\n      }\n      if (this._logger) {\n        f(this._logger);\n      } else {\n        if (this._buffer.length >= MAX_QUEUE_SIZE) {\n          this._isDisabled = true;\n          console.warn('LogRocket: script did not load. Check that you have a valid network connection.');\n          this.uninstall();\n          return;\n        }\n        this._buffer.push(f.bind(this));\n      }\n    }\n  }, {\n    key: \"init\",\n    value: function init(appID) {\n      var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      if (!this._isInitialized) {\n        var _opts$network;\n        var _opts$shouldAugmentNP = opts.shouldAugmentNPS,\n          shouldAugmentNPS = _opts$shouldAugmentNP === void 0 ? true : _opts$shouldAugmentNP,\n          _opts$shouldParseXHRB = opts.shouldParseXHRBlob,\n          shouldParseXHRBlob = _opts$shouldParseXHRB === void 0 ? false : _opts$shouldParseXHRB,\n          _opts$shouldDetectExc = opts.shouldDetectExceptions,\n          shouldDetectExceptions = _opts$shouldDetectExc === void 0 ? true : _opts$shouldDetectExc;\n        if (shouldDetectExceptions) {\n          this._installed.push((0, _exceptions.registerExceptions)(this));\n        }\n        this._installed.push((0, _network.default)(this, {\n          shouldAugmentNPS: !!shouldAugmentNPS,\n          shouldParseXHRBlob: !!shouldParseXHRBlob,\n          isDisabled: (opts === null || opts === void 0 ? void 0 : (_opts$network = opts.network) === null || _opts$network === void 0 ? void 0 : _opts$network.isEnabled) === false\n        }));\n        this._installed.push((0, _console.default)(this));\n        this._isInitialized = true;\n        this._run(function (logger) {\n          logger.init(appID, considerIngestServerOption(opts));\n        });\n      }\n    }\n  }, {\n    key: \"start\",\n    value: function start() {\n      this._run(function (logger) {\n        logger.start();\n      });\n    }\n  }, {\n    key: \"uninstall\",\n    value: function uninstall() {\n      this._installed.forEach(function (f) {\n        return f();\n      });\n      this._buffer = [];\n      this._run(function (logger) {\n        logger.uninstall();\n      });\n    }\n  }, {\n    key: \"identify\",\n    value: function identify(id, opts) {\n      this._run(function (logger) {\n        logger.identify(id, opts);\n      });\n    }\n  }, {\n    key: \"startNewSession\",\n    value: function startNewSession() {\n      this._run(function (logger) {\n        logger.startNewSession();\n      });\n    }\n  }, {\n    key: \"track\",\n    value: function track(customEventName, eventProperties) {\n      this._run(function (logger) {\n        logger.track(customEventName, eventProperties);\n      });\n    }\n  }, {\n    key: \"getSessionURL\",\n    value: function getSessionURL(cb) {\n      if (typeof cb !== 'function') {\n        throw new Error('LogRocket: must pass callback to getSessionURL()');\n      }\n      this._run(function (logger) {\n        if (logger.getSessionURL) {\n          logger.getSessionURL(cb);\n        } else {\n          cb(logger.recordingURL);\n        }\n      });\n    }\n  }, {\n    key: \"trackScrollEvent\",\n    value: function trackScrollEvent(target) {\n      // Only reigster the event if the core logger is available,\n      //  otherwise we won't yet have captured the target element:\n      if (this._logger) {\n        this._logger.trackScrollEvent(target);\n      }\n    }\n  }, {\n    key: \"getVersion\",\n    value: function getVersion(cb) {\n      this._run(function (logger) {\n        cb(logger.version);\n      });\n    }\n  }, {\n    key: \"captureMessage\",\n    value: function captureMessage(message) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      _exceptions.Capture.captureMessage(this, message, [message], options);\n    }\n  }, {\n    key: \"captureException\",\n    value: function captureException(exception) {\n      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      _exceptions.Capture.captureException(this, exception, options);\n    }\n  }, {\n    key: \"version\",\n    get: function get() {\n      return this._logger && this._logger.version;\n    }\n  }, {\n    key: \"sessionURL\",\n    get: function get() {\n      return this._logger && this._logger.recordingURL;\n    }\n  }, {\n    key: \"recordingURL\",\n    get: function get() {\n      return this._logger && this._logger.recordingURL;\n    }\n  }, {\n    key: \"recordingID\",\n    get: function get() {\n      return this._logger && this._logger.recordingID;\n    }\n  }, {\n    key: \"threadID\",\n    get: function get() {\n      return this._logger && this._logger.threadID;\n    }\n  }, {\n    key: \"tabID\",\n    get: function get() {\n      return this._logger && this._logger.tabID;\n    }\n  }, {\n    key: \"reduxEnhancer\",\n    value: function reduxEnhancer() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      return (0, _redux.createEnhancer)(this, options);\n    }\n  }, {\n    key: \"reduxMiddleware\",\n    value: function reduxMiddleware() {\n      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      return (0, _redux.createMiddleware)(this, options);\n    }\n  }, {\n    key: \"isDisabled\",\n    get: function get() {\n      return !!(this._isDisabled || this._logger && this._logger._isDisabled);\n    }\n  }]);\n  return LogRocket;\n}();\nexports[\"default\"] = LogRocket;\n\n/***/ }),\n\n/***/ \"./packages/logrocket/src/makeLogRocket.js\":\n/*!*************************************************!*\\\n  !*** ./packages/logrocket/src/makeLogRocket.js ***!\n  \\*************************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = makeLogRocket;\nvar _LogRocket = _interopRequireDefault(__webpack_require__(/*! ./LogRocket */ \"./packages/logrocket/src/LogRocket.js\"));\nvar REACT_NATIVE_NOTICE = 'LogRocket on React Native requires the LogRocket React Native specific SDK. See setup guide here https://docs.logrocket.com/reference/react-native.';\nvar makeNoopPolyfill = function makeNoopPolyfill() {\n  return {\n    init: function init() {},\n    uninstall: function uninstall() {},\n    log: function log() {},\n    info: function info() {},\n    warn: function warn() {},\n    error: function error() {},\n    debug: function debug() {},\n    addEvent: function addEvent() {},\n    identify: function identify() {},\n    start: function start() {},\n    get threadID() {\n      return null;\n    },\n    get recordingID() {\n      return null;\n    },\n    get recordingURL() {\n      return null;\n    },\n    reduxEnhancer: function reduxEnhancer() {\n      return function (store) {\n        return function () {\n          return store.apply(void 0, arguments);\n        };\n      };\n    },\n    reduxMiddleware: function reduxMiddleware() {\n      return function () {\n        return function (next) {\n          return function (action) {\n            return next(action);\n          };\n        };\n      };\n    },\n    track: function track() {},\n    getSessionURL: function getSessionURL() {},\n    getVersion: function getVersion() {},\n    startNewSession: function startNewSession() {},\n    onLogger: function onLogger() {},\n    setClock: function setClock() {},\n    captureMessage: function captureMessage() {},\n    captureException: function captureException() {}\n  };\n};\nfunction makeLogRocket() {\n  var getLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};\n  var getNoopPolyfill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : makeNoopPolyfill;\n  var getInstance = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n    return new _LogRocket.default();\n  };\n  if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n    throw new Error(REACT_NATIVE_NOTICE);\n  }\n  if (typeof window !== 'undefined') {\n    if (window._disableLogRocket) {\n      return getNoopPolyfill();\n    }\n    if (window.MutationObserver && window.WeakMap) {\n      // Save window globals that we rely on.\n      window._lrMutationObserver = window.MutationObserver;\n      var instance = getInstance();\n      getLogger(instance);\n      return instance;\n    }\n  }\n  return makeNoopPolyfill();\n}\n\n/***/ }),\n\n/***/ \"./packages/logrocket/src/setup.js\":\n/*!*****************************************!*\\\n  !*** ./packages/logrocket/src/setup.js ***!\n  \\*****************************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.getDomainsAndEnv = getDomainsAndEnv;\nexports.setupBaseSDKCONFIG = setupBaseSDKCONFIG;\nexports[\"default\"] = setup;\nvar _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\"));\nvar _makeLogRocket = _interopRequireDefault(__webpack_require__(/*! ./makeLogRocket */ \"./packages/logrocket/src/makeLogRocket.js\"));\nvar CDN_SERVER_MAP = {\n  'cdn.logrocket.com': 'https://r.logrocket.io',\n  'cdn.logrocket.io': 'https://r.logrocket.io',\n  'cdn.lr-ingest.io': 'https://r.lr-ingest.io',\n  'cdn.lr-in.com': 'https://r.lr-in.com',\n  'cdn.lr-in-prod.com': 'https://r.lr-in-prod.com',\n  'cdn.lr-ingest.com': 'https://r.lr-ingest.com',\n  'cdn.ingest-lr.com': 'https://r.ingest-lr.com',\n  'cdn.lr-intake.com': 'https://r.lr-intake.com',\n  'cdn.intake-lr.com': 'https://r.intake-lr.com',\n  'cdn.logr-ingest.com': 'https://r.logr-ingest.com',\n  'cdn.lrkt-in.com': 'https://r.lrkt-in.com',\n  'cdn.lgrckt-in.com': 'https://r.lgrckt-in.com',\n  'cdn-staging.logrocket.io': 'https://staging-i.logrocket.io',\n  'cdn-staging.lr-ingest.io': 'https://staging-i.lr-ingest.io',\n  'cdn-staging.lr-in.com': 'https://staging-i.lr-in.com',\n  'cdn-staging.lr-in-prod.com': 'https://staging-i.lr-in-prod.com',\n  'cdn-staging.lr-ingest.com': 'https://staging-i.lr-ingest.com',\n  'cdn-staging.ingest-lr.com': 'https://staging-i.ingest-lr.com',\n  'cdn-staging.lr-intake.com': 'https://staging-i.lr-intake.com',\n  'cdn-staging.intake-lr.com': 'https://staging-i.intake-lr.com',\n  'cdn-staging.logr-ingest.com': 'https://staging-i.logr-ingest.com',\n  'cdn-staging.lrkt-in.com': 'https://staging-i.lrkt-in.com',\n  'cdn-staging.lgrckt-in.com': 'https://staging-i.lgrckt-in.com'\n};\nfunction envFromHostname(hostname) {\n  if (hostname.startsWith('cdn-staging')) {\n    return 'staging';\n  } else if (hostname.startsWith('localhost')) {\n    return 'development';\n  } else {\n    return 'prod';\n  }\n}\nfunction getDomainsAndEnv(sdkVersion) {\n  if (sdkVersion === 'script' || sdkVersion === 'shopify-pixel') {\n    // We cannot rely on the DEPLOY_ENV config for script tag usage: we deploy the script built for staging to prod to\n    // improve deployment times, so the DEPLOY_ENV is always 'staging' for script usage! Instead we default to 'prod'\n    // and inspect the script's URL to determine if the environment should instead be staging or development.\n    try {\n      // eslint-disable-next-line compat/compat\n      var scriptTag = document.currentScript;\n      var matches = scriptTag.src.match(/^(https?:\\/\\/([^\\\\]+))\\/.+$/);\n      var scriptHostname = matches && matches[2];\n      if (scriptHostname && CDN_SERVER_MAP[scriptHostname]) {\n        return {\n          scriptEnv: envFromHostname(scriptHostname),\n          scriptOrigin: matches && matches[1],\n          scriptIngest: CDN_SERVER_MAP[scriptHostname]\n        };\n      }\n    } catch (_) {\n      /* no-op */\n    }\n\n    // If we cannot determine the env based on the script's URL we default to prod.\n    return {\n      scriptEnv: 'prod',\n      scriptOrigin: 'https://cdn.logrocket.io'\n    };\n  } else {\n    // NPM package\n    return {\n      scriptEnv: undefined,\n      scriptOrigin:  false ? 0 : 'https://cdn.lgrckt-in.com',\n      scriptIngest:  false ? 0 : 'https://r.lgrckt-in.com'\n    };\n  }\n}\nfunction setupBaseSDKCONFIG(ingestServer) {\n  if (typeof window.__SDKCONFIG__ === 'undefined') {\n    window.__SDKCONFIG__ = {};\n  }\n  window.__SDKCONFIG__.serverURL = \"\".concat(ingestServer, \"/i\");\n  window.__SDKCONFIG__.statsURL = \"\".concat(ingestServer, \"/s\");\n}\nfunction setup() {\n  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n    enterpriseServer = _ref.enterpriseServer,\n    _ref$sdkVersion = _ref.sdkVersion,\n    sdkVersion = _ref$sdkVersion === void 0 ? \"10.1.0\" : _ref$sdkVersion,\n    opts = (0, _objectWithoutProperties2.default)(_ref, [\"enterpriseServer\", \"sdkVersion\"]);\n  var _getDomainsAndEnv = getDomainsAndEnv(sdkVersion),\n    scriptEnv = _getDomainsAndEnv.scriptEnv,\n    scriptOrigin = _getDomainsAndEnv.scriptOrigin,\n    scriptIngest = _getDomainsAndEnv.scriptIngest;\n  var sdkServer = opts.sdkServer || enterpriseServer;\n  var ingestServer = opts.ingestServer || enterpriseServer || scriptIngest;\n  var instance = (0, _makeLogRocket.default)(function () {\n    var script = document.createElement('script');\n    if (ingestServer) {\n      setupBaseSDKCONFIG(ingestServer);\n      window.__SDKCONFIG__.scriptEnv = scriptEnv;\n    }\n    if (sdkServer) {\n      script.src = \"\".concat(sdkServer, \"/logger.min.js\");\n    } else if (window.__SDKCONFIG__ && window.__SDKCONFIG__.loggerURL) {\n      script.src = window.__SDKCONFIG__.loggerURL;\n    } else if (window._lrAsyncScript) {\n      script.src = window._lrAsyncScript;\n    } else {\n      script.src = \"\".concat(scriptOrigin, \"/logger-1.min.js\");\n    }\n    script.async = true;\n    document.head.appendChild(script);\n    script.onload = function () {\n      // Brave browser: Advertises its user-agent as Chrome ##.##... then\n      // loads logger.min.js, but blocks the execution of the script\n      // causing _LRlogger to be undefined.  Let's make sure its there first.\n      if (typeof window._LRLogger === 'function') {\n        setTimeout(function () {\n          instance.onLogger(new window._LRLogger({\n            sdkVersion: sdkVersion\n          }));\n        });\n      } else {\n        console.warn('LogRocket: script execution has been blocked by a product or service.');\n        instance.uninstall();\n      }\n    };\n    script.onerror = function () {\n      console.warn('LogRocket: script could not load. Check that you have a valid network connection.');\n      instance.uninstall();\n    };\n  });\n  return instance;\n}\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\":\n/*!*****************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!\n  \\*****************************************************************/\n/***/ (function(module) {\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!\n  \\******************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!\n  \\***************************************************************/\n/***/ (function(module) {\n\nfunction _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/createClass.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!\n  \\************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"./node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/defineProperty.js\":\n/*!***************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!\n  \\***************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"./node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n  key = toPropertyKey(key);\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\":\n/*!**********************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!\n  \\**********************************************************************/\n/***/ (function(module) {\n\nfunction _interopRequireDefault(obj) {\n  return obj && obj.__esModule ? obj : {\n    \"default\": obj\n  };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\":\n/*!****************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!\n  \\****************************************************************/\n/***/ (function(module) {\n\nfunction _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!\n  \\******************************************************************/\n/***/ (function(module) {\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/objectWithoutProperties.js\":\n/*!************************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!\n  \\************************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\");\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nmodule.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\":\n/*!*****************************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!\n  \\*****************************************************************************/\n/***/ (function(module) {\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nmodule.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!\n  \\******************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/toPrimitive.js\":\n/*!************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!\n  \\************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar _typeof = (__webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"]);\nfunction _toPrimitive(input, hint) {\n  if (_typeof(input) !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (_typeof(res) !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/toPropertyKey.js\":\n/*!**************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!\n  \\**************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar _typeof = (__webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"]);\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"./node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n  var key = toPrimitive(arg, \"string\");\n  return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/typeof.js\":\n/*!*******************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!\n  \\*******************************************************/\n/***/ (function(module) {\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\":\n/*!***************************************************************************!*\\\n  !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!\n  \\***************************************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nvar arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/global */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t}();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be in strict mode.\n!function() {\n\"use strict\";\nvar exports = __webpack_exports__;\n/*!**********************************************!*\\\n  !*** ./packages/logrocket/src/module-npm.js ***!\n  \\**********************************************/\n\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\nvar _setup = _interopRequireDefault(__webpack_require__(/*! ./setup */ \"./packages/logrocket/src/setup.js\"));\nvar instance = (0, _setup.default)();\nvar _default = instance;\nexports[\"default\"] = _default;\n}();\n__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});","import { useEffect } from 'react'\nimport LogRocket from 'logrocket'\n\nconst IS_PRODUCTION = import.meta.env.STAGE === 'prod'\nconst LOGROCKET_SAMPLE_RATE = IS_PRODUCTION ? 0.05 : 1.0 // 5% prod, 100% QA/dev\n\n/**\n * Hook to conditionally initialize LogRocket with session sampling.\n */\nexport const useLogRocket = () => {\n    useEffect(() => {\n        if (import.meta.env.CLIENT_LOG_ROCKET_APP_ID) {\n            const randomValue = Math.random()\n            const shouldRecord = randomValue < LOGROCKET_SAMPLE_RATE\n            console.debug('LogRocket: randomValue', randomValue)\n            console.debug('LogRocket: shouldRecord', shouldRecord)\n            if (shouldRecord) {\n                console.debug('LogRocket: initializing LogRocket (sampled session)')\n                LogRocket.init(import.meta.env.CLIENT_LOG_ROCKET_APP_ID)\n            } else {\n                console.debug('LogRocket: skipping LogRocket initialization (not sampled)')\n            }\n        }\n    }, [])\n}\n","import React, {ComponentProps} from 'react'\n\nexport const CircledExclamation: React.FC<ComponentProps<'svg'>> = (props) => (\n    <svg\n        viewBox=\"0 0 44 44\"\n        fill=\"none\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        {...props}\n    >\n        <circle cx=\"22\" cy=\"22\" r=\"22\" fill=\"#F26565\"/>\n        <path\n            d=\"M22.137 27.1818C21.0665 27.1818 20.1747 26.3612 20.0858 25.2944L19.0111 12.3973C18.8587 10.5685 20.3019 9 22.137 9C23.9722 9 25.4154 10.5685 25.263 12.3973L24.1883 25.2944C24.0994 26.3612 23.2075 27.1818 22.137 27.1818Z\"\n            fill=\"white\"/>\n        <path\n            d=\"M22.137 36C20.6726 36 19.4855 34.8129 19.4855 33.3485C19.4855 31.8841 20.6726 30.697 22.137 30.697C23.6014 30.697 24.7885 31.8841 24.7885 33.3485C24.7885 34.8129 23.6014 36 22.137 36Z\"\n            fill=\"white\"/>\n    </svg>\n)\n","import React, {ComponentProps, memo, useEffect} from 'react'\nimport {localize} from \"../../lang/localized-content.mjs\";\nimport './error-display.css'\nimport {CircledExclamation} from \"../common-components/svg-components/circled-exclamation\";\nimport {analytics} from \"../../analytics/analytics.mjs\";\n\ntype Props = {\n    title?: string\n    body?: string\n    buttonText?: string\n    onDismiss?: () => void\n    actionUrl?: string\n    actionText?: string\n} & ComponentProps<'div'>\n\nexport const ErrorDisplay: React.FC<Props> = memo((props) => {\n    const {\n        title,\n        body,\n        buttonText,\n        onDismiss,\n        actionUrl,\n        actionText,\n        className,\n        ...restProps\n    } = props\n\n    const hasContent = [title, body].some(Boolean)\n\n    useEffect(() => {\n        if (!hasContent) return\n        analytics.track('error', {\n            message: [title, body].filter(Boolean).join(': '),\n        })\n    }, [title, body])\n\n    if (!hasContent) {\n        return null\n    }\n    return (\n        <div className={`error-display ${className || ''}`} {...restProps}>\n            <div\n                className={'background-mask'}\n                onClick={onDismiss}\n            />\n            <div className={'container'}>\n                <CircledExclamation className={'icon'}/>\n                <h1 className={'title'}>{title || localize('Something went wrong')}</h1>\n                <p className={'body'}>{body || localize('Please try again later')}</p>\n                <div className={'button-container'}>\n                    {actionUrl && actionText && (\n                        <a\n                            href={actionUrl}\n                            className={'button action-button'}\n                            target=\"_blank\"\n                            rel=\"noopener noreferrer\"\n                        >\n                            {actionText}\n                        </a>\n                    )}\n                    {onDismiss && (\n                        <button\n                            type={'button'}\n                            className={'button dismiss-button'}\n                            onClick={onDismiss}\n                        >\n                            {buttonText || localize('Close')}\n                        </button>\n                    )}\n                </div>\n            </div>\n        </div>\n    )\n})\n","import React from 'react'\nimport {ErrorDisplay} from \"../error/error-display.tsx\";\nimport {localize} from \"../../lang/localized-content.mjs\";\nimport {useOffersResponse, useUserSubscriptionState} from \"../../data/api/query/offers.mjs\";\n\nexport const NoOffersAvailable: React.FC = () => {\n    const offersResponse = useOffersResponse()\n    console.debug(JSON.stringify({offersResponse}))\n    const body = useBody()\n    return (\n        <\n            ErrorDisplay\n            title={localize('No offers are currently available')}\n            body={body}\n        />\n    )\n}\n\nconst useBody = () => {\n    const userState = useUserSubscriptionState()\n    const support_email = 'starter@arccosgolf.com'\n    if (userState?.includes('SUBSCRIBED')) {\n        return localize('You already have an active subscription. If you feel like this is an error, please contact us at {support_email}', {\n            values: {\n                support_email,\n            }\n        })\n    }\n    if (userState?.includes('NEVER_HAD_SUBSCRIPTION')) {\n        return localize('You have never had a subscription. If you feel like this is an error, please contact us at {support_email}', {\n            values: {\n                support_email,\n            }\n        })\n    }\n    if (userState?.includes('LEGACY')) {\n        return localize('You have a legacy subscription. If you feel like this is an error, please contact us at {support_email}', {\n            values: {\n                support_email,\n            }\n        })\n    }\n    return localize('If you feel like this is an error, please contact us at {support_email}', {\n        values: {\n            support_email,\n        }\n    })\n}\n","export const validateEmail = email => {\n    if (!email) {\n        return false\n    }\n    // eslint-disable-next-line\n    const match = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n    const re = new RegExp(match);\n    return email.length > 0 && re.test(email);\n};\n","import React, {ComponentProps, useState} from 'react'\nimport './loading.css'\n\ntype Props = {\n    color?: string\n    svgProps?: ComponentProps<'svg'>\n} & ComponentProps<'div'>\n\nexport const Loading: React.FC<Props> = (props) => {\n    const {\n        color,\n        className,\n        svgProps: {\n            className: svgClassName,\n            ...restSvgProps\n        } = {},\n        ...restProps\n    } = props\n    const [pathLength, setPathLength] = useState<number>(0)\n\n    const setSVGPathLength = (path: SVGPathElement) => {\n        if (!path) return\n        const SVGPathLength = path.getTotalLength()\n        setPathLength(SVGPathLength)\n    }\n    return (\n        <div className={`loading ${className || ''}`} {...restProps}>\n            <svg\n                viewBox=\"0 0 100 50\"\n                className={`svg ${svgClassName}`}\n                {...restSvgProps}\n            >\n                <g>\n                    <path\n                        className={'path'}\n                        ref={setSVGPathLength}\n                        d=\"M50 11.25\n                                L64.58333333333333 45\n                                L79.16666666666667 15.75\n                                A 5 5 0 0 1 84.16666666666667 7.0897459621556145\n                                A 5 5 0 0 1 79.16666666666667 15.75\n                                L50 45\n                                L20.833333333333332 15.75\n                                A 5 5 0 0 1 15.833333333333332 7.0897459621556145\n                                A 5 5 0 0 1 20.833333333333332 15.75\n                                L35.416666666666664 45\n                                L50 11.25\n                                A 5 5 0 1 0 50 1.25\n                                A 5 5 0 1 0 50 11.25\"\n                        strokeWidth=\"2.5\"\n                        strokeLinecap=\"round\"\n                        strokeLinejoin=\"round\"\n                        fill=\"none\"\n                        strokeDasharray={pathLength / 2}\n                        strokeDashoffset={pathLength}\n                    />\n                </g>\n            </svg>\n        </div>\n    )\n}\n","import React, { useCallback, useState } from \"react\";\nimport \"./nucap-main-section.css\";\nimport { getEmail } from \"../../../../data/url/query-params.mjs\";\nimport { ArccosError } from \"../../../../util/arccos-error.mjs\";\nimport { getDynamicContentNucapLandingPage } from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport { validateEmail } from \"../../../../util/input-validation-utils.ts\";\nimport {\n  getShouldOfferLinkProTrial,\n  useTrialPeriodDays,\n  useValidateOfferAndCreateUser,\n} from \"../../../../data/api/query/offers.mjs\";\nimport { getPartnerFromWindowLocation } from \"../../../../util/partner-selectors.mjs\";\nimport { ErrorDisplay } from \"../../../error/error-display.tsx\";\nimport { localize } from \"../../../../lang/localized-content.mjs\";\nimport { Loading } from \"../../../common-components/loading/loading.tsx\";\n\nexport const NucapMainSection: React.FC<{ dynamicContentData?: any }> = ({\n  dynamicContentData,\n}) => {\n  const [email, setEmail] = useState(getEmail());\n  const [error, setError] = useState<ArccosError>();\n  const [isLoading, setIsLoading] = useState(false);\n\n  const isEmailValid = validateEmail(email);\n  const validateOfferAndCreateUser = useValidateOfferAndCreateUser();\n  const partner = getPartnerFromWindowLocation();\n  const isReferral = partner === \"referrals\";\n  const trialPeriodDays = useTrialPeriodDays();\n  const getRedemptionCode = () => {\n    const redemptionCode = new URLSearchParams(window.location.search).get(\n      \"redemptionCode\",\n    );\n    const affiliate = new URLSearchParams(window.location.search).get(\n      \"affiliate\",\n    );\n\n    return redemptionCode !== null ? redemptionCode : affiliate;\n  };\n\n  const redemptionCode = getRedemptionCode();\n\n  const getIsButtonDisabled = () => {\n    if (isLoading || !isEmailValid) {\n      return true;\n    }\n    return isReferral && !redemptionCode;\n  };\n\n  const onSubmit = useCallback(\n    async (e: React.FormEvent) => {\n      e.preventDefault();\n      try {\n        setIsLoading(true);\n        await validateOfferAndCreateUser(\n          email,\n          setError,\n          isReferral,\n          redemptionCode,\n        );\n      } catch (e) {\n        setError(e);\n      } finally {\n        setIsLoading(false);\n      }\n    },\n    [email, validateOfferAndCreateUser],\n  );\n\n  const REFERRALS_CONTENT = {\n    header: { en: \"Get 16 FREE Smart Sensors When You Join Arccos\" },\n    subheader: { en: \"Smarter golf starts here. Track every shot, analyze your game, and get AI-powered insights to lower your scores.\" },\n    email_placeholder: { en: \"ENTER EMAIL\" },\n    mobile_image: \"https://cdn.arccosgolf.com/images/activation/nucap/three-phones-mobile2.webp\",\n    desktop_image: \"https://cdn.arccosgolf.com/images/activation/nucap/three-phones-desktop2.webp\",\n    pga_logo: \"https://cdn.arccosgolf.com/images/activation/nucap/pga-game-tracker-gray.svg\",\n  };\n\n  const dynamicContent = isReferral\n    ? REFERRALS_CONTENT\n    : dynamicContentData || getDynamicContentNucapLandingPage()?.main_section;\n  const doesHaveBackgroundImage =\n    dynamicContent?.background_image_mobile ||\n    dynamicContent?.background_image_desktop;\n\n  const shouldOfferLinkProTrial = getShouldOfferLinkProTrial();\n  const backgroundImageCaption = dynamicContent?.background_image_caption;\n  const backgroundImageSubcaption = dynamicContent?.background_image_subcaption;\n  const limitedTimeOffer = dynamicContent?.limited_time_offer;\n\n  return (\n    <div className={\"nucap-main-section\"} id=\"nucap-main-section\">\n      {error && (\n        <ErrorDisplay\n          title={error.title}\n          body={error.message}\n          onDismiss={() => setError(undefined)}\n        />\n      )}\n      {doesHaveBackgroundImage && (\n        <>\n          <img\n            className={\"background-image mobile\"}\n            src={dynamicContent.background_image_mobile}\n          />\n          <img\n            className={\"background-image desktop\"}\n            src={dynamicContent.background_image_desktop}\n          />\n          {backgroundImageCaption && (\n            <div className={\"background-image-caption\"}>\n              <p className={\"caption\"}>{localize(backgroundImageCaption)}</p>\n              <p className={\"subcaption\"}>\n                {localize(backgroundImageSubcaption || \"\")}\n              </p>\n            </div>\n          )}\n        </>\n      )}\n      {!!dynamicContent.mobile_image && (\n        <img\n          className={\"three-phones mobile\"}\n          src={\n            shouldOfferLinkProTrial\n              ? \"https://cdn.arccosgolf.com/images/activation/nucap/three-phones-with-link-pro-and-sensors.png\"\n              : dynamicContent.mobile_image\n          }\n        />\n      )}\n      <div\n        className={`nucap-main-section-content ${doesHaveBackgroundImage ? \"light-text\" : \"\"}`}\n      >\n        {dynamicContent.pga_logo && (\n          <img className={\"pga-logo\"} src={dynamicContent.pga_logo} />\n        )}\n        {limitedTimeOffer && (\n          <p className={\"limited-time-offer\"}>{localize(limitedTimeOffer)}</p>\n        )}\n\n        <h1\n          className={`nucap-main-section-title ${partner === \"titleist\" ? \"narrow-mobile\" : \"\"}`}\n        >\n          {localize(dynamicContent.header, {\n            values: {\n              trial_period_days: trialPeriodDays?.toString(),\n            },\n          })}\n        </h1>\n        <p className={\"nucap-main-section-body\"}>\n          {localize(dynamicContent.subheader)}\n        </p>\n        <p\n          className={\"nucap-main-section-body line-2\"}\n          style={{ fontWeight: 700 }}\n        >\n          {shouldOfferLinkProTrial\n            ? \"Sign up today and try Arccos Air for FREE!\"\n            : localize(dynamicContent.subheader_2)}\n        </p>\n        <form className={\"main-section-form\"} onSubmit={onSubmit}>\n          {partner !== \"za\" ? (\n            <>\n              <input\n                className={\"email-input\"}\n                type={\"email\"}\n                placeholder={localize(dynamicContent.email_placeholder)}\n                value={email}\n                onChange={(e) => setEmail(e.target.value)}\n              />\n              <button\n                type={\"submit\"}\n                className={\"submit-button\"}\n                disabled={getIsButtonDisabled()}\n              >\n                {!isLoading ? (\n                  <p className={\"submit-button-text\"}>\n                    {isReferral\n                      ? \"Activate\"\n                      : localize(dynamicContent.buttonText)}\n                  </p>\n                ) : (\n                  <Loading className={\"submit-loading\"} />\n                )}\n              </button>\n            </>\n          ) : (\n            <div className={\"za-buttons\"}>\n              <a\n                className={\"shop-now-button\"}\n                href={\n                  \"https://www.theproshop.co.za/products/brands/arccos?sort=all_search\"\n                }\n              >\n                Shop Now at The Pro Shop\n              </a>\n              <a\n                className={\"learn-more-button\"}\n                target={\"_blank\"}\n                href={\n                  \"https://www.arccosgolf.com/pages/arccos-app/?geolizr_redirect=off\"\n                }\n              >\n                Learn More at ArccosGolf.com\n              </a>\n            </div>\n          )}\n        </form>\n      </div>\n      {!!dynamicContent.desktop_image && (\n        <img\n          className={\"three-phones desktop\"}\n          src={\n            shouldOfferLinkProTrial\n              ? \"https://cdn.arccosgolf.com/images/activation/nucap/three-phones-with-link-pro-and-sensors.png\"\n              : dynamicContent.desktop_image\n          }\n        />\n      )}\n    </div>\n  );\n};\n","import React from \"react\";\nimport \"./link-pro-section.css\";\n\nexport const LinkProSection = () => {\n  return (\n    <div className=\"link-pro-section\">\n      <img\n        src=\"https://cdn.arccosgolf.com/images/activation/alps/link-pro-product-image.png\"\n        alt=\"Arccos Air\"\n      />\n    </div>\n  );\n};\n","import React from 'react';\n\n\nconst DeviceCardBack: React.FC<{ children: React.ReactNode, title: string, className?: string }> = ({ children, title, className }) => {\n    return (\n        <div className={`card-back-content ${className}`}>\n            <h3 className=\"card-back-title\">{title}</h3>  \n           \n            {children}\n            <svg height=\"40\" width=\"40\" fill=\"none\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-flip-button\">\n                <rect height=\"39\" width=\"39\" rx=\"19.5\" stroke=\"white\" x=\"0.5\" y=\"0.5\"/>\n                <path d=\"M25.1088 20.1094H14.8906H25.1088Z\" fill=\"white\"/>\n                <path d=\"M25.1088 20.1094H14.8906\" stroke=\"white\" strokeWidth=\"1.25\"/>\n            </svg>\n        </div>\n    )\n}\n\nexport const PlaysLikeDistanceCardBack: React.FC = () => {\n    return (\n        <DeviceCardBack title=\"Plays Like Distance\" className=\"plays-like-distance-card-back\">\n            <p className=\"card-back-description\">The only rangefinder to automatically factor in</p>\n            <ul className=\"feature-list\">\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <circle cx=\"10.7721\" cy=\"10.772\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <path d=\"M14.498 5.38615L7.54972 9.27104L14.3883 13.346L14.498 5.38615ZM7.82499 16.5848L8.41723 16.9377L11.9141 11.0692L11.3219 10.7163L10.7297 10.3634L7.23275 16.2319L7.82499 16.5848Z\" fill=\"white\"/>\n                    </svg>\n                    <p className=\"feature-text\">Wind & Gusts</p>\n                </li>\n                <div className=\"feature-divider\"></div>\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"23\" viewBox=\"0 0 22 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <circle cx=\"10.7721\" cy=\"11.27\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <path d=\"M10.7721 15.848C9.17477 15.8478 7.81021 14.472 7.81021 12.6869C7.81024 12.1921 7.9905 11.5586 8.32388 10.8392C8.65137 10.1326 9.09597 9.40686 9.5524 8.74451C9.99196 8.10663 10.434 7.54237 10.7731 7.1283C11.1121 7.54225 11.5526 8.10709 11.9919 8.74451C12.4482 9.40679 12.8929 10.1327 13.2204 10.8392C13.5538 11.5586 13.735 12.1921 13.735 12.6869C13.735 14.4721 12.3696 15.848 10.7721 15.848Z\" stroke=\"#B2BEC6\" stroke-width=\"1.6158\"/>\n                    </svg>\n                    <p className=\"feature-text\">Humidity</p>\n                </li>\n                <div className=\"feature-divider\"></div>\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"23\" viewBox=\"0 0 22 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <path d=\"M15.083 13.0324L10.7742 15.8332L6.46543 13.0324\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\" stroke-linecap=\"round\"/>\n                        <path d=\"M15.083 8.91916L10.7742 11.7199L6.46543 8.91916\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\" stroke-linecap=\"round\"/>\n                        <circle cx=\"10.7721\" cy=\"11.6129\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                    </svg>\n                    <p className=\"feature-text\">Slope</p>\n                </li>\n                <div className=\"feature-divider\"></div>\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <circle cx=\"10.7721\" cy=\"11.1113\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <path d=\"M11.4454 15.1506V11.7843M16.1581 8.41806H11.4454V11.7843M11.4454 11.7843H14.8116\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <circle cx=\"7.54021\" cy=\"9.7646\" r=\"1.48115\" stroke=\"#A0ADB7\" stroke-width=\"1.3465\"/>\n                    </svg>\n                    <p className=\"feature-text\">Temperature</p>\n                </li>\n                <div className=\"feature-divider\"></div>\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <circle cx=\"10.7721\" cy=\"11.5308\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <path d=\"M3.60623 17.4549L6.70268 11.4035L9.47866 14.006L12.5073 7.76006L17.9364 17.4549\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\" stroke-linecap=\"round\"/>\n                        <path d=\"M12.1296 11.8332L11.1086 10.7146L12.4795 7.82961L14.5095 11.348L12.9052 10.7086L12.1296 11.8332Z\" fill=\"#A0ADB7\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                    </svg>\n                    <p className=\"feature-text\">Altitude</p>\n                </li>\n                <div className=\"feature-divider\"></div>\n                <li className=\"feature-item\">\n                    <svg width=\"22\" height=\"22\" viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className=\"card-feature-icon\">\n                        <circle cx=\"10.772\" cy=\"10.7719\" r=\"9.96411\" stroke=\"#A0ADB7\" stroke-width=\"1.6158\"/>\n                        <path d=\"M11.0771 6.99707C11.7891 7.0335 12.3564 7.55895 12.3975 8.2207C12.4309 8.74017 12.123 9.23124 11.626 9.46289L13.1846 12.8262L15.4502 10.2891C15.2765 10.0519 15.1915 9.76517 15.21 9.47656C15.2547 8.81657 15.8221 8.29251 16.5322 8.25781C16.9198 8.23707 17.2868 8.36346 17.5664 8.61328C17.8498 8.86148 18.0048 9.19643 18.0049 9.55762C18.0049 10.2767 17.3761 10.8594 16.6045 10.8594H16.582L14.5527 15.3398C14.4664 15.5302 14.2747 15.6484 14.0537 15.6484C13.8309 15.6467 13.639 15.5315 13.5508 15.3428L12.9834 14.1152L11.4893 15.7871C11.3656 15.9265 11.1839 16.0049 10.9912 16.0049H10.9902C10.7976 16.0049 10.6158 15.9247 10.4922 15.7871L9.00977 14.1191L8.4541 15.3379C8.36594 15.5282 8.17503 15.6474 7.9541 15.6475C7.73309 15.6457 7.53947 15.5264 7.45312 15.3359L5.4248 10.8594H5.39551C4.62389 10.8594 3.99512 10.2767 3.99512 9.55762C3.99515 9.19642 4.15205 8.86146 4.43359 8.61328C4.7151 8.36344 5.0821 8.23705 5.46973 8.25781C6.17987 8.29251 6.74721 8.8146 6.79199 9.47461C6.81052 9.76339 6.72475 10.0499 6.55273 10.2871L8.80859 12.8232L10.3496 9.4502C9.89375 9.22559 9.6026 8.78168 9.60254 8.29883C9.60254 7.93761 9.75747 7.60076 10.0391 7.35254C10.3206 7.10436 10.6895 6.97976 11.0771 6.99707ZM9.33398 13.415L10.9717 15.2568C10.9792 15.2649 10.9878 15.2656 10.9932 15.2656V15.2705C10.9934 15.2709 10.9949 15.2689 10.9971 15.2686C10.9965 15.2675 10.9966 15.2659 10.9961 15.2656L11.002 15.2637C11.0067 15.2621 11.0119 15.2593 11.0156 15.2559L12.6592 13.4131L10.9854 9.79883L9.33398 13.415ZM13.5088 13.5273L14.0508 14.6953L15.6836 11.0928L13.5088 13.5273ZM7.95508 14.6914L8.48633 13.5303L6.33008 11.1064L7.95508 14.6914ZM5.39551 8.91406C5.01336 8.91406 4.70319 9.20277 4.70312 9.55762C4.70312 9.91252 5.01332 10.2012 5.39551 10.2012C5.77762 10.2011 6.08691 9.91248 6.08691 9.55762C6.08684 9.20281 5.77758 8.91414 5.39551 8.91406ZM16.6064 8.91406C16.2262 8.91409 15.9151 9.20279 15.915 9.55762C15.915 9.9125 16.2261 10.2011 16.6064 10.2012C16.9886 10.2012 17.2979 9.91252 17.2979 9.55762C17.2978 9.20277 16.9867 8.91406 16.6064 8.91406ZM11.001 7.65527C10.6188 7.65527 10.3096 7.94392 10.3096 8.29883C10.3097 8.65193 10.6188 8.94043 11.001 8.94043C11.3831 8.94041 11.6923 8.65364 11.6924 8.29883C11.6924 7.94394 11.3831 7.6553 11.001 7.65527Z\" fill=\"#56C271\" stroke=\"#56C271\" stroke-width=\"0.01\"/>\n                    </svg>\n                    <p className=\"feature-text\"><span className=\"feature-text-highlight\">\"Plays Like\" Number</span></p>\n                </li>\n            </ul>\n            <p className=\"card-back-description\">for the most precise yardage in the game.</p>\n\n        </DeviceCardBack>\n    )\n}\n\n\nexport const SmarterDataCardBack: React.FC = () => {\n    return (\n        <DeviceCardBack title=\"Smarter Data\" className='smarter-data-card-back'>\n            <p className='card-back-description'>Experience Smarter Data</p>\n            <ul className=\"feature-list\">\n                <li className=\"feature-item\">\n                    <CheckIcon />\n                    <p className=\"feature-text\">Auto pin setting</p>\n                </li>\n                <li className=\"feature-item\">\n                    <CheckIcon />\n                    <p className=\"feature-text\">Syncs with the app</p>\n                </li>\n                <li className=\"feature-item\">\n                    <CheckIcon />\n                    <p className=\"feature-text\">Less editing</p>\n                </li>\n                <li className=\"feature-item\">\n                    <CheckIcon />\n                    <p className=\"feature-text\">More accurate stats</p>\n                </li>\n                <li className=\"feature-item\">\n                    <CrownIcon />\n                    <p className=\"feature-text\">Smarter insights</p>\n                </li>\n            </ul>\n        </DeviceCardBack>\n    )\n}\n\nexport const TournamentModeCardBack: React.FC = () => {\n    return (\n        <DeviceCardBack title=\"Tournament Mode\" className='tournament-mode-card-back'>\n            <p className='card-back-description'>Built for casual or competitive rounds.</p>\n            <div className='toggle-section'>\n                <p className='card-back-description small'>Toggle Tournament mode off</p>\n                <ToggleOffIcon />\n                <p className='card-back-description small'>Toggle Tournament mode on</p>\n                <ToggleOnIcon />\n                <p className='card-back-description small'>Permissible under the Rules of Golf when Tournament Mode is toggled on.</p>\n            </div>\n        </DeviceCardBack>\n    )\n}\n\n\nconst CheckIcon: React.FC = () => (\n    <svg height=\"24\" width=\"24\" fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n        <path d=\"M19.97 5.96997L10 15.939L5.03003 10.97\" stroke=\"#56C271\" strokeMiterlimit=\"10\" strokeWidth=\"1.5\"/>\n    </svg>\n); \n\nconst CrownIcon: React.FC = () => (\n    <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<mask id=\"mask0_5_45\" maskUnits=\"userSpaceOnUse\" x=\"2\" y=\"5\" width=\"20\" height=\"14\">\n<path d=\"M21.3762 7.51519C20.9781 7.12778 20.4552 6.9314 19.9032 6.96368C18.8918 7.01749 18.0849 7.82995 18.0213 8.85226C17.9947 9.30153 18.1167 9.74812 18.3663 10.1167L15.1201 14.0768L12.8852 8.82805C13.5965 8.47024 14.0372 7.7062 13.9894 6.89911C13.9309 5.87412 13.1241 5.05896 12.1102 5.00247C11.5581 4.97556 11.0325 5.16926 10.6317 5.55397C10.2309 5.93868 10.0106 6.4606 10.0106 7.02018C10.0106 7.77076 10.4273 8.46217 11.0803 8.80922L8.87193 14.0741L5.63902 10.114C5.88586 9.74543 6.00796 9.29885 5.98142 8.84957C5.91772 7.82727 5.11082 7.01749 4.09954 6.96368C3.54744 6.9314 3.02455 7.12778 2.62376 7.51519C2.22296 7.8999 2 8.41912 2 8.9787C2 10.0925 2.89449 10.9964 3.99337 10.9964H4.04114L6.93961 17.9642C7.06172 18.2575 7.33511 18.4404 7.64831 18.4431C7.96152 18.4431 8.23225 18.2602 8.357 17.9669L9.15594 16.0623L11.2794 18.6637C11.4545 18.8763 11.712 19 11.9854 19H11.9881C12.2614 19 12.5189 18.879 12.6941 18.6637L14.8361 16.0542L15.6509 17.975C15.7757 18.2655 16.0464 18.4431 16.3623 18.4458C16.6755 18.4458 16.9462 18.2628 17.0683 17.9696L19.9695 10.9964H20.0066C21.1055 10.9964 22 10.0925 22 8.9787C22 8.41912 21.7797 7.8999 21.3762 7.51519ZM3.99337 9.98755C3.44393 9.98755 2.99801 9.53559 2.99801 8.9787C2.99801 8.42182 3.44393 7.96985 3.99337 7.96985C4.5428 7.96985 4.98872 8.42182 4.98872 8.9787C4.98872 9.53559 4.5428 9.98755 3.99337 9.98755ZM7.65096 16.9823L5.30458 11.3461L8.41805 15.1583L7.65096 16.9823ZM11.006 7.02018C11.006 6.46329 11.4519 6.01132 12.0013 6.01132C12.5507 6.01132 12.9966 6.46329 12.9966 7.02018C12.9966 7.57707 12.5507 8.02635 12.0013 8.02635C11.4519 8.02635 11.006 7.57437 11.006 7.02018ZM12.0279 17.8486C12.0146 17.862 11.9907 17.8674 11.9907 17.8647C11.9827 17.8647 11.9668 17.8647 11.9535 17.8486L9.61247 14.9807L11.9801 9.33651L14.3796 14.978L12.0279 17.8486ZM20.0093 9.98755C19.4625 9.98755 19.0139 9.53559 19.0139 8.9787C19.0139 8.42182 19.4625 7.96985 20.0093 7.96985C20.5561 7.96985 21.0046 8.42182 21.0046 8.9787C21.0046 9.53559 20.5587 9.98755 20.0093 9.98755ZM16.3597 16.9904L15.5766 15.1529L18.7166 11.3246L16.3597 16.9904Z\" fill=\"white\"/>\n</mask>\n<g mask=\"url(#mask0_5_45)\">\n<path d=\"M21.3762 7.51521L19.9253 9.07592L19.933 9.08341L19.9408 9.09081L21.3762 7.51521ZM19.9031 6.96371L20.0124 9.11468L20.0232 9.11404L19.9031 6.96371ZM18.0212 8.85229L15.9202 8.71525L15.9198 8.72234L18.0212 8.85229ZM18.3663 10.1167L19.9793 11.5007L21.0116 10.2415L20.097 8.89041L18.3663 10.1167ZM15.1201 14.0768L13.19 14.937L14.5481 18.1265L16.7331 15.4608L15.1201 14.0768ZM12.8851 8.82808L11.9563 6.89521L10.1522 7.80266L10.9551 9.68826L12.8851 8.82808ZM13.9893 6.89914L11.8877 7.02447L11.8879 7.02935L13.9893 6.89914ZM12.1101 5.00249L12.2246 2.85178L12.2103 2.85109L12.1101 5.00249ZM11.0803 8.80924L13.0149 9.65862L13.7861 7.82021L12.0508 6.89793L11.0803 8.80924ZM8.8719 14.0741L7.25609 15.4548L9.45427 18.1474L10.8066 14.9235L8.8719 14.0741ZM5.639 10.114L3.90231 8.89658L3.00089 10.2425L4.02318 11.4947L5.639 10.114ZM5.9814 8.8496L8.08284 8.71965L8.0824 8.71257L5.9814 8.8496ZM4.09951 6.96371L3.97938 9.11408L3.99018 9.11465L4.09951 6.96371ZM2.62373 7.51521L4.0642 9.08598L4.06952 9.08083L2.62373 7.51521ZM4.04111 10.9964L5.97825 10.153L5.43315 8.8426H4.04111V10.9964ZM7.64828 18.4431L7.63061 20.5969L7.63945 20.597H7.64828V18.4431ZM8.35698 17.9669L10.2874 18.8265L10.2916 18.8163L8.35698 17.9669ZM9.15591 16.0623L10.7718 14.6817L8.57368 11.9886L7.22127 15.2129L9.15591 16.0623ZM11.2793 18.6637L9.66339 20.0443L9.66993 20.0523L11.2793 18.6637ZM12.6941 18.6637L11.0819 17.2786L11.0763 17.2855L12.6941 18.6637ZM14.8361 16.0542L16.7673 15.1967L15.4124 12.0028L13.2239 14.6691L14.8361 16.0542ZM15.6509 17.975L13.7197 18.8326L13.7234 18.8413L15.6509 17.975ZM16.3623 18.4458L16.3447 20.5996L16.3536 20.5997H16.3623V18.4458ZM19.9694 10.9964V8.8426H18.5774L18.0324 10.1529L19.9694 10.9964ZM7.65093 16.9823L5.71404 17.8263L7.64113 22.4553L9.5848 17.8336L7.65093 16.9823ZM5.30456 11.3462L6.92008 9.96514L3.36766 12.1902L5.30456 11.3462ZM8.41803 15.1583L10.3519 16.0095L10.8634 14.7933L10.0336 13.7773L8.41803 15.1583ZM12.0278 17.8486L13.5096 19.3787L13.5787 19.3086L13.6413 19.2321L12.0278 17.8486ZM11.9907 17.8647H14.096V15.7109H11.9907V17.8647ZM11.9535 17.8486L10.3377 19.2292L10.3424 19.235L11.9535 17.8486ZM9.61245 14.9807L7.67782 14.1313L7.16809 15.3465L7.9966 16.3613L9.61245 14.9807ZM11.9801 9.33654L13.9105 8.47715L11.9667 3.90699L10.0454 8.48711L11.9801 9.33654ZM14.3796 14.9781L15.993 16.3616L16.8297 15.3404L16.31 14.1187L14.3796 14.9781ZM16.3597 16.9904L14.4298 17.8512L16.3829 22.4343L18.2967 17.8338L16.3597 16.9904ZM15.5766 15.1529L13.964 13.7684L13.1256 14.7905L13.6468 16.0137L15.5766 15.1529ZM18.7166 11.3247L20.6538 12.1681L17.104 9.94014L18.7166 11.3247ZM21.3762 7.51521L22.827 5.95451C22.0062 5.15577 20.9142 4.74722 19.7829 4.81337L19.9031 6.96371L20.0232 9.11404C20.0165 9.11444 19.9977 9.11367 19.9733 9.10456C19.949 9.09545 19.9326 9.08301 19.9253 9.07592L21.3762 7.51521ZM19.9031 6.96371L19.7938 4.81277C17.7276 4.9227 16.0527 6.5892 15.9202 8.71525L18.0212 8.85229L20.1222 8.98932C20.1171 9.07076 20.0561 9.11235 20.0124 9.11468L19.9031 6.96371ZM18.0212 8.85229L15.9198 8.72234C15.8648 9.65254 16.1169 10.5769 16.6356 11.343L18.3663 10.1167L20.097 8.89041C20.1166 8.91939 20.1245 8.95059 20.1226 8.98223L18.0212 8.85229ZM18.3663 10.1167L16.7531 8.73269L13.507 12.6928L15.1201 14.0768L16.7331 15.4608L19.9793 11.5007L18.3663 10.1167ZM15.1201 14.0768L17.0502 13.2166L14.8152 7.96788L12.8851 8.82808L10.9551 9.68826L13.19 14.937L15.1201 14.0768ZM12.8851 8.82808L13.8141 10.7609C15.2747 10.0262 16.1907 8.45649 16.0908 6.76894L13.9893 6.89914L11.8879 7.02935C11.8856 6.99031 11.8958 6.96017 11.9063 6.94192C11.9165 6.92413 11.9328 6.90701 11.9563 6.89521L12.8851 8.82808ZM13.9893 6.89914L16.091 6.77382C15.9693 4.63661 14.2902 2.96687 12.2246 2.85178L12.1101 5.00249L11.9956 7.15315C11.9579 7.15105 11.8926 7.11168 11.8877 7.02447L13.9893 6.89914ZM12.1101 5.00249L12.2103 2.85109C11.1023 2.79709 10.0172 3.19044 9.19124 3.98325L10.6317 5.554L12.0722 7.12475C12.0646 7.13203 12.0508 7.14169 12.0334 7.14816C12.0164 7.15449 12.0069 7.15375 12.01 7.1539L12.1101 5.00249ZM10.6317 5.554L9.19124 3.98325C8.36623 4.77515 7.90533 5.86563 7.90533 7.0202H10.0106H12.1159C12.1159 7.03162 12.1132 7.05278 12.1028 7.07734C12.0924 7.10193 12.0793 7.11786 12.0722 7.12475L10.6317 5.554ZM10.0106 7.0202H7.90533C7.90533 8.5885 8.77168 10.0094 10.1097 10.7205L11.0803 8.80924L12.0508 6.89793C12.07 6.90811 12.085 6.92294 12.0954 6.9403C12.1061 6.9581 12.1159 6.98552 12.1159 7.0202H10.0106ZM11.0803 8.80924L9.14562 7.95986L6.93726 13.2247L8.8719 14.0741L10.8066 14.9235L13.0149 9.65862L11.0803 8.80924ZM8.8719 14.0741L10.4877 12.6934L7.25481 8.73334L5.639 10.114L4.02318 11.4947L7.25609 15.4548L8.8719 14.0741ZM5.639 10.114L7.37568 11.3315C7.88595 10.5696 8.13776 9.64928 8.08284 8.71965L5.9814 8.8496L3.87997 8.97954C3.87814 8.94847 3.88575 8.92132 3.90231 8.89658L5.639 10.114ZM5.9814 8.8496L8.0824 8.71257C7.94968 6.58269 6.27133 4.9225 4.20885 4.81277L4.09951 6.96371L3.99018 9.11465C3.95025 9.11253 3.88571 9.07188 3.8804 8.98662L5.9814 8.8496ZM4.09951 6.96371L4.21964 4.81337C3.08709 4.74714 1.99832 5.15664 1.17794 5.9496L2.62373 7.51521L4.06952 9.08083C4.06525 9.08497 4.05123 9.0962 4.02805 9.10487C4.00477 9.11358 3.98629 9.11449 3.97938 9.11408L4.09951 6.96371ZM2.62373 7.51521L1.18327 5.94446C0.36563 6.72928 -0.105286 7.81389 -0.105286 8.97873H1.99998H4.10524C4.10524 8.99417 4.10163 9.01818 4.09073 9.0437C4.07998 9.0689 4.0677 9.08262 4.0642 9.08598L2.62373 7.51521ZM1.99998 8.97873H-0.105286C-0.105286 11.3047 1.75402 13.1503 3.99335 13.1503V10.9964V8.8426C4.01842 8.8426 4.04638 8.85504 4.06488 8.87376C4.08391 8.89301 4.10524 8.93218 4.10524 8.97873H1.99998ZM3.99335 10.9964V13.1503H4.04111V10.9964V8.8426H3.99335V10.9964ZM4.04111 10.9964L2.10398 11.8399L5.00246 18.8077L6.93959 17.9642L8.87672 17.1208L5.97825 10.153L4.04111 10.9964ZM6.93959 17.9642L5.00246 18.8077C5.46033 19.9073 6.49952 20.5872 7.63061 20.5969L7.64828 18.4431L7.66596 16.2894C8.17063 16.2937 8.66305 16.6076 8.87672 17.1208L6.93959 17.9642ZM7.64828 18.4431V20.597C8.80501 20.597 9.83049 19.9004 10.2874 18.8265L8.35698 17.9669L6.42663 17.1074C6.63399 16.62 7.11798 16.2893 7.64828 16.2893V18.4431ZM8.35698 17.9669L10.2916 18.8163L11.0906 16.9117L9.15591 16.0623L7.22127 15.2129L6.42232 17.1176L8.35698 17.9669ZM9.15591 16.0623L7.53999 17.4428L9.66339 20.0443L11.2793 18.6637L12.8952 17.2832L10.7718 14.6817L9.15591 16.0623ZM11.2793 18.6637L9.66993 20.0523C10.2421 20.7464 11.0867 21.1539 11.9854 21.1539V19V16.8462C12.3372 16.8462 12.667 17.0062 12.8887 17.2752L11.2793 18.6637ZM11.9854 19V21.1539H11.988V19V16.8462H11.9854V19ZM11.988 19V21.1539C12.8747 21.1539 13.7291 20.7579 14.3119 20.0421L12.6941 18.6637L11.0763 17.2855C11.3086 17.0001 11.6482 16.8462 11.988 16.8462V19ZM12.6941 18.6637L14.3063 20.0488L16.4483 17.4392L14.8361 16.0542L13.2239 14.6691L11.0819 17.2786L12.6941 18.6637ZM14.8361 16.0542L12.9048 16.9117L13.7197 18.8326L15.6509 17.975L17.5822 17.1176L16.7673 15.1967L14.8361 16.0542ZM15.6509 17.975L13.7234 18.8413C14.1943 19.9379 15.2322 20.5901 16.3447 20.5996L16.3623 18.4458L16.3798 16.2921C16.8607 16.2962 17.357 16.5932 17.5784 17.1088L15.6509 17.975ZM16.3623 18.4458V20.5997C17.5161 20.5997 18.5511 19.9043 19.0051 18.8137L17.0683 17.9696L15.1315 17.1255C15.3413 16.6214 15.8349 16.292 16.3623 16.292V18.4458ZM17.0683 17.9696L19.0051 18.8137L21.9065 11.84L19.9694 10.9964L18.0324 10.1529L15.1315 17.1255L17.0683 17.9696ZM19.9694 10.9964V13.1503H20.0066V10.9964V8.8426H19.9694V10.9964ZM20.0066 10.9964V13.1503C22.246 13.1503 24.1052 11.3047 24.1052 8.97873H22H19.8947C19.8947 8.93218 19.9161 8.89301 19.935 8.87376C19.9536 8.85504 19.9816 8.8426 20.0066 8.8426V10.9964ZM22 8.97873H24.1052C24.1052 7.82014 23.6412 6.73072 22.8117 5.93962L21.3762 7.51521L19.9408 9.09081C19.935 9.08531 19.9209 9.06889 19.9092 9.04143C19.8976 9.014 19.8947 8.99054 19.8947 8.97873H22ZM3.99335 9.98758V7.83373C4.58803 7.83373 5.10325 8.32716 5.10325 8.97873H2.99799H0.892725C0.892725 10.7441 2.29979 12.1414 3.99335 12.1414V9.98758ZM2.99799 8.97873H5.10325C5.10325 9.6303 4.58802 10.1237 3.99335 10.1237V7.96988V5.81603C2.29979 5.81603 0.892725 7.21337 0.892725 8.97873H2.99799ZM3.99335 7.96988V10.1237C3.39866 10.1237 2.88343 9.6303 2.88343 8.97873H4.98869H7.09396C7.09396 7.21337 5.68689 5.81603 3.99335 5.81603V7.96988ZM4.98869 8.97873H2.88343C2.88343 8.32716 3.39866 7.83373 3.99335 7.83373V9.98758V12.1414C5.68689 12.1414 7.09396 10.7441 7.09396 8.97873H4.98869ZM7.65093 16.9823L9.58784 16.1383L7.24145 10.5022L5.30456 11.3462L3.36766 12.1902L5.71404 17.8263L7.65093 16.9823ZM5.30456 11.3462L3.68903 12.7272L6.8025 16.5394L8.41803 15.1583L10.0336 13.7773L6.92008 9.96514L5.30456 11.3462ZM8.41803 15.1583L6.48417 14.3071L5.71708 16.1311L7.65093 16.9823L9.5848 17.8336L10.3519 16.0095L8.41803 15.1583ZM11.0059 7.0202H13.1112C13.1112 7.67178 12.596 8.1652 12.0013 8.1652V6.01135V3.85751C10.3078 3.85751 8.90068 5.25485 8.90068 7.0202H11.0059ZM12.0013 6.01135V8.1652C11.4066 8.1652 10.8914 7.67178 10.8914 7.0202H12.9966H15.1019C15.1019 5.25485 13.6948 3.85751 12.0013 3.85751V6.01135ZM12.9966 7.0202H10.8914C10.8914 6.36118 11.414 5.87252 12.0013 5.87252V8.02637V10.1802C13.6874 10.1802 15.1019 8.793 15.1019 7.0202H12.9966ZM12.0013 8.02637V5.87252C12.5923 5.87252 13.1112 6.36222 13.1112 7.0202H11.0059H8.90068C8.90068 8.78658 10.3114 10.1802 12.0013 10.1802V8.02637ZM12.0278 17.8486L10.5462 16.3185C10.848 16.0125 11.1631 15.8811 11.3184 15.8263C11.4069 15.7952 11.5428 15.7541 11.7143 15.7306C11.7753 15.7222 11.9816 15.6945 12.2446 15.7271C12.356 15.7409 12.6828 15.7871 13.0423 15.9991C13.4691 16.2509 14.096 16.8616 14.096 17.8647H11.9907H9.88542C9.88542 18.8682 10.5124 19.4793 10.9396 19.7311C11.2994 19.9434 11.6268 19.9897 11.7389 20.0036C12.0033 20.0363 12.2115 20.0086 12.2749 19.9999C12.4513 19.9756 12.5941 19.933 12.6902 19.899C12.8607 19.8389 13.1944 19.6981 13.5096 19.3787L12.0278 17.8486ZM11.9907 17.8647V15.7109C11.9873 15.7109 12.0679 15.71 12.1667 15.7188C12.2707 15.7281 12.4119 15.7489 12.5739 15.7981C12.9244 15.9047 13.2821 16.1185 13.5646 16.4621L11.9535 17.8486L10.3424 19.235C11.0012 20.0363 11.8858 20.0186 11.9907 20.0186V17.8647ZM11.9535 17.8486L13.5693 16.468L11.2283 13.6001L9.61245 14.9807L7.9966 16.3613L10.3377 19.2292L11.9535 17.8486ZM9.61245 14.9807L11.5471 15.8302L13.9147 10.186L11.9801 9.33654L10.0454 8.48711L7.67782 14.1313L9.61245 14.9807ZM11.9801 9.33654L10.0497 10.1959L12.4491 15.8374L14.3796 14.9781L16.31 14.1187L13.9105 8.47715L11.9801 9.33654ZM14.3796 14.9781L12.7661 13.5945L10.4144 16.4651L12.0278 17.8486L13.6413 19.2321L15.993 16.3616L14.3796 14.9781ZM20.0092 9.98758V7.83373C20.6029 7.83373 21.1191 8.32344 21.1191 8.97873H19.0139H16.9086C16.9086 10.7478 18.3221 12.1414 20.0092 12.1414V9.98758ZM19.0139 8.97873H21.1191C21.1191 9.63403 20.6029 10.1237 20.0092 10.1237V7.96988V5.81603C18.3221 5.81603 16.9086 7.20966 16.9086 8.97873H19.0139ZM20.0092 7.96988V10.1237C19.4156 10.1237 18.8993 9.63403 18.8993 8.97873H21.0046H23.1099C23.1099 7.20966 21.6965 5.81603 20.0092 5.81603V7.96988ZM21.0046 8.97873H18.8993C18.8993 8.32716 19.4146 7.83373 20.0092 7.83373V9.98758V12.1414C21.7028 12.1414 23.1099 10.7441 23.1099 8.97873H21.0046ZM16.3597 16.9904L18.2895 16.1296L17.5065 14.2922L15.5766 15.1529L13.6468 16.0137L14.4298 17.8512L16.3597 16.9904ZM15.5766 15.1529L17.1893 16.5374L20.3293 12.7092L18.7166 11.3247L17.104 9.94014L13.964 13.7684L15.5766 15.1529ZM18.7166 11.3247L16.7796 10.4812L14.4225 16.1469L16.3597 16.9904L18.2967 17.8338L20.6538 12.1681L18.7166 11.3247Z\" fill=\"#56C271\"/>\n</g>\n</svg>\n\n    \n    );\n\nconst ToggleOffIcon: React.FC = () => (\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 101 101\" fill=\"none\" className='toggle-icon'>\n  <path d=\"M33.5 32.4531C23.6711 32.4531 15.7031 40.4211 15.7031 50.25C15.7031 60.0789 23.6711 68.0469 33.5 68.0469C43.3289 68.0469 51.2969 60.0789 51.2969 50.25C51.2969 40.4211 43.3289 32.4531 33.5 32.4531Z\" stroke=\"#56C271\" stroke-width=\"6\" stroke-miterlimit=\"10\"/>\n  <path d=\"M33.5 32.4531L67 32.4531C71.72 32.4531 76.2467 34.3281 79.5843 37.6657C82.9219 41.0033 84.7969 45.53 84.7969 50.25C84.7969 54.97 82.9219 59.4967 79.5843 62.8343C76.2467 66.1719 71.72 68.0469 67 68.0469L33.5 68.0469\" stroke=\"#56C271\" stroke-width=\"6\" stroke-miterlimit=\"10\"/>\n</svg>\n)\n\nconst ToggleOnIcon: React.FC = () => (\n    <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 101 101\" fill=\"none\" className='toggle-icon'>\n  <path d=\"M67 68.5469C76.8289 68.5469 84.7969 60.5789 84.7969 50.75C84.7969 40.9211 76.8289 32.9531 67 32.9531C57.1711 32.9531 49.2031 40.9211 49.2031 50.75C49.2031 60.5789 57.1711 68.5469 67 68.5469Z\" stroke=\"#626A77\" stroke-width=\"6\" stroke-miterlimit=\"10\"/>\n  <path d=\"M67 68.5469H33.5C28.78 68.5469 24.2533 66.6719 20.9157 63.3343C17.5781 59.9967 15.7031 55.47 15.7031 50.75C15.7031 46.03 17.5781 41.5033 20.9157 38.1657C24.2533 34.8281 28.78 32.9531 33.5 32.9531H67\" stroke=\"#626A77\" stroke-width=\"6\" stroke-miterlimit=\"10\"/>\n</svg>\n)","import React, {ComponentProps} from \"react\";\nimport './dot-container.css';\n\ntype DotContainerProps = {\n    length: number\n    activeIndex: number\n    onClick: (index: number) => unknown\n} & Omit<ComponentProps<'svg'>, 'onClick'>\n\nconst r = 4\nconst d = 2 * r\nconst g = 4 * r\nconst color = '#D9D9D9'\nconst activeOpacity = 1\nconst inactiveOpacity = 0.2\n\nexport const DotContainer: React.FC<DotContainerProps> = (props) => {\n    const {\n        length,\n        activeIndex,\n        onClick,\n        className,\n        ...restProps\n    } = props\n    return (\n        <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            viewBox={`0 0 ${g * (length - 1) + d} ${d}`}\n            fill=\"none\"\n            className={`dot-container ${className || ''}`}\n            {...restProps}\n        >\n            {Array.from({length}, (_, index) => (\n                <circle\n                    key={index}\n                    className={'dot'}\n                    cx={r + g * index}\n                    cy={r}\n                    r={r}\n                    fill={color}\n                    fillOpacity={\n                        index === activeIndex ?\n                            activeOpacity :\n                            inactiveOpacity\n                    }\n                    onClick={() => onClick(index)}\n                >\n                </circle>\n            ))}\n        </svg>\n    )\n}\n","import React from 'react'\nimport {localize, TextContent} from \"../../../../lang/localized-content.mjs\";\n\ntype Testimonial = {\n    image: string\n    quote: TextContent\n    name: TextContent\n    title: TextContent\n    subtitle?: TextContent\n    audioFile?: string\n}\nexport const TestimonialCard: React.FC<{ testimonial: Testimonial, desktopImage?: string }> = ({testimonial, desktopImage}) => {\n    return (\n        <div className={'testimonial-card'}>\n            {desktopImage && <img src={desktopImage} className={'testimonial-image desktop'}/>}\n            <img src={testimonial.image} className={`testimonial-image ${desktopImage ? 'mobile' : ''}`}/>\n            <div className={'testimonial-content'}>\n                <h3 className={'testimonial-quote'}>{localize(testimonial.quote)}</h3>\n                <div>\n                    <p className={'testimonial-name'}>{`${localize(testimonial.name)}, `}<span>{localize(testimonial.title)}</span>\n                    </p>\n                    {testimonial.subtitle && <p className={'testimonial-subtitle'}>{localize(testimonial.subtitle)}</p>}\n                </div>\n            </div>\n            {testimonial.audioFile && <audio src={testimonial.audioFile} controls controlsList='nodownload noplaybackrate' className={'testimonial-audio'} />}\n        </div>\n    )\n}\n\nconst QuoteGraphic: React.FC<{ className: string }> = ({className}) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" className={className} viewBox=\"0 0 54 101\" fill=\"none\">\n            <mask id=\"mask0_148_53\" maskUnits=\"userSpaceOnUse\" x=\"0\" y=\"0\" width=\"54\"\n                  height=\"101\">\n                <path d=\"M53.8899 0H0V100.362H53.8899V0Z\" fill=\"white\"/>\n            </mask>\n            <g mask=\"url(#mask0_148_53)\">\n                <path\n                    d=\"M14.4361 36.3956C13.7079 36.3956 13.1524 36.035 12.8897 35.3725C12.5744 34.585 12.8146 33.8196 13.5428 33.3191C13.8355 33.1204 14.1433 32.9511 14.4511 32.7818C14.8039 32.5904 15.1342 32.4064 15.4344 32.1856C17.1685 30.9786 18.0392 30.272 18.4446 29.72L18.5272 29.6317C18.7148 29.4109 18.7674 29.1312 18.6773 28.8589C18.5797 28.5571 18.332 28.3216 18.0092 28.248C17.9491 28.2333 17.8816 28.2185 17.8215 28.2112C16.1401 27.983 14.8639 27.2176 14.0232 25.9369C12.672 23.8687 12.5819 21.646 13.7605 19.5116C14.8789 17.4875 16.7631 16.4351 19.2403 16.4424C22.4081 16.4498 25.148 18.8639 25.7485 22.1686C26.2514 24.9139 25.5158 27.5267 23.4365 30.3898C21.725 32.7376 19.3979 34.5924 16.5079 35.9025C16.0575 36.1086 15.5245 36.2484 14.8339 36.3588C14.6988 36.3809 14.5712 36.3882 14.4436 36.3882L14.4361 36.3956ZM19.1652 17.1269C16.9808 17.1269 15.3669 18.0396 14.376 19.8354C13.3101 21.7638 13.3926 23.6921 14.6162 25.5616C15.3519 26.6803 16.4253 27.328 17.9191 27.5267C18.0092 27.5414 18.0993 27.5561 18.1894 27.5782C18.7373 27.7181 19.1727 28.1155 19.3454 28.6454C19.5105 29.1386 19.4054 29.6685 19.0751 30.0586L19.0226 30.1174C18.5572 30.7431 17.6714 31.4791 15.8548 32.7376C15.5245 32.9805 15.1567 33.1866 14.7964 33.378C14.4961 33.5399 14.2184 33.6944 13.9556 33.8784C13.6329 34.0993 13.3026 34.4967 13.5503 35.1149C13.7379 35.586 14.1358 35.7773 14.7288 35.6817C15.3594 35.5786 15.8323 35.4535 16.2226 35.2769C19.0001 34.0183 21.237 32.2372 22.8735 29.985C24.8402 27.2838 25.5383 24.8329 25.0729 22.279C24.5324 19.2981 22.0853 17.1269 19.2478 17.1195C19.2478 17.1195 19.2027 17.1195 19.1802 17.1195L19.1652 17.1269ZM29.682 36.3956C28.9538 36.3956 28.3983 36.035 28.1356 35.3725C27.8203 34.585 28.0605 33.8196 28.7887 33.3191C29.0814 33.1204 29.3892 32.9511 29.697 32.7818C30.0498 32.5904 30.3801 32.4064 30.6803 32.1856C32.4144 30.9786 33.2851 30.272 33.6905 29.72L33.7731 29.6317C33.9607 29.4109 34.0133 29.1312 33.9232 28.8589C33.8256 28.5571 33.5779 28.3216 33.2551 28.248C33.1951 28.2333 33.1275 28.2185 33.0674 28.2112C31.386 27.983 30.1098 27.2176 29.2691 25.9369C27.9179 23.8687 27.8278 21.646 29.0064 19.5116C30.1249 17.4802 32.054 16.4277 34.4862 16.4424C37.654 16.4498 40.3939 18.8639 40.9944 22.1686C41.4974 24.9139 40.7617 27.5267 38.6824 30.3898C36.9709 32.7376 34.6438 34.5924 31.7538 35.9025C31.3034 36.1086 30.7704 36.2484 30.0798 36.3588C29.9447 36.3809 29.8171 36.3882 29.6895 36.3882L29.682 36.3956ZM34.4111 17.1269C32.2192 17.1269 30.6128 18.0396 29.6219 19.8354C28.556 21.7638 28.6385 23.6921 29.8621 25.5616C30.5978 26.6803 31.6712 27.328 33.165 27.5267C33.2551 27.5414 33.3452 27.5561 33.4353 27.5782C33.9832 27.7181 34.4186 28.1155 34.5913 28.6454C34.7564 29.1386 34.6513 29.6685 34.321 30.0586L34.261 30.1174C33.7956 30.7431 32.9098 31.4791 31.0932 32.7376C30.7629 32.9805 30.3951 33.1866 30.0348 33.378C29.7345 33.5399 29.4493 33.6944 29.1865 33.8784C28.8637 34.0993 28.5335 34.4967 28.7812 35.1223C28.9688 35.5933 29.3667 35.7847 29.9597 35.689C30.5903 35.586 31.0632 35.4609 31.4535 35.2842C34.231 34.0257 36.4679 32.2445 38.1044 29.9923C40.0711 27.2912 40.7617 24.8403 40.3038 22.2863C39.7633 19.3055 37.3162 17.1343 34.4787 17.1269C34.4787 17.1269 34.4336 17.1269 34.4111 17.1269Z\"\n                    fill=\"#56C271\"/>\n                <path\n                    d=\"M26.9412 52.838C12.0856 52.838 0 40.9883 0 26.4153C0 11.8424 12.0856 0 26.9412 0C41.7967 0 53.8824 11.8497 53.8824 26.4153C53.8824 40.9809 41.7967 52.8307 26.9412 52.8307V52.838ZM26.9412 0.684488C12.4685 0.684488 0.698114 12.2325 0.698114 26.4153C0.698114 40.5982 12.476 52.1462 26.9412 52.1462C41.4064 52.1462 53.1843 40.5982 53.1843 26.4153C53.1843 12.2325 41.4139 0.684488 26.9412 0.684488Z\"\n                    fill=\"#56C271\"/>\n                <path\n                    d=\"M27.5211 100.362C27.3259 100.362 27.1758 100.208 27.1758 100.024V53.4637C27.1758 53.2723 27.3334 53.1251 27.5211 53.1251C27.7087 53.1251 27.8664 53.2797 27.8664 53.4637V100.024C27.8664 100.215 27.7087 100.362 27.5211 100.362Z\"\n                    fill=\"#56C271\"/>\n            </g>\n        </svg>\n    )\n}\n","import React, {useEffect, useRef} from 'react'\nimport './card-carousel.css'\nimport {DotContainer} from \"./dot-container/dot-container.tsx\";\nimport {\n    TestimonialCard\n} from \"../testimonial-card.tsx\";\nimport {getDynamicContentNucapLandingPage} from \"../../../../../data/initial-state/intial-state-accessors.mjs\";\n\nexport const CardCarousel: React.FC<React.ComponentProps<'div'>> = (props) => {\n    const {\n        className,\n        ...restProps\n    } = props\n    const scrollContainerRef = useRef<HTMLDivElement>(null)\n    const [activeIndex, setActiveIndex] = React.useState(0)\n\n    const scrollToIndex = (index: number) =>\n        scrollContainerRef.current?.scrollTo({\n            left: scrollContainerRef.current.getBoundingClientRect().width * index,\n            behavior: 'smooth',\n        })\n\n    const getVisibleIndex = () => {\n        const scrollContainer = scrollContainerRef.current\n        if (!scrollContainer) return 0\n        const {scrollLeft, clientWidth} = scrollContainer\n        return Math.round(scrollLeft / clientWidth)\n    }\n\n    useEffect(() => {\n        const interval = setInterval(() => {\n            scrollToIndex((activeIndex + 1) % testimonials.length)\n        }, 10000)\n\n        return () => clearInterval(interval)\n    }, [activeIndex]);\n\n    useEffect(() => {\n        const interval = setInterval(() => {\n            setActiveIndex(getVisibleIndex())\n        }, 300)\n\n        return () => clearInterval(interval)\n    }, []);\n\n    const testimonials = getDynamicContentNucapLandingPage().review_section.reviews\n\n\n    return (\n        <div\n            className={`card-carousel ${className || ''}`}\n            {...restProps}\n        >\n            <div\n                className={'card-container'}\n                ref={scrollContainerRef}\n            >\n                {testimonials.map((card, index) => (\n                    <TestimonialCard testimonial={card} key={index} />\n                ))}\n            </div>\n            <DotContainer\n                length={testimonials.length}\n                activeIndex={activeIndex}\n                onClick={scrollToIndex}\n                className={'card-carousel-dot-container'}\n            />\n        </div>\n    )\n}\n\n","export const mmgContent = {\n  header: {\n    partner_logo:\n      \"https://cdn.arccosgolf.com/images/activation/me-and-my-golf/mmg-logo.webp\",\n  },\n  create_account: {\n    headerFontSize: \"8.4dvw\",\n  },\n  nucap_landing_page: {\n    hero_section: {\n      header: {\n        en: \"Smarter Golf Starts Here\",\n      },\n      body: {\n        en: \"Track every shot, analyze your game, and get AI-powered insights to lower your scores.\",\n      },\n      subheader_2: {\n        en: \"Get Free Arccos Trial with Smart Sensors and Arccos Air.\",\n      },\n      buttonText: {\n        en: \"Activate Free Trial\",\n      },\n      image_caption: {\n        en: \"Andy Proudman + Piers Ward\",\n      },\n      image_subcaption: {\n        en: \"MMG Co-Founders\",\n      },\n      caption_font_color: \"#000000\",\n      background_image_mobile:\n        \"https://cdn.arccosgolf.com/images/activation/me-and-my-golf/mmg-hero-mobile3.webp\",\n      background_image_desktop:\n        \"https://cdn.arccosgolf.com/images/activation/me-and-my-golf/mmg-hero.webp\",\n      videoButtonUrl: \"\",\n    },\n    review_section: {\n      header: {\n        en: \"New members improve by an average of {highlight} in their 1st year.\",\n      },\n      header_highlight: {\n        en: \"5.71 strokes\",\n      },\n      reviews: [\n        {\n          name: {\n            en: \"Mike D.\",\n          },\n          quote: {\n            en: \"“I have gone from a 23 handicap to an 18 in only 5 months. The information it tracks shows me what is helping and what I need to work on. Highly recommend.”\",\n          },\n          title: {\n            en: \"Arccos Member\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/mike-d.webp\",\n        },\n        {\n          name: {\n            en: \"Parth Patel\",\n          },\n          quote: {\n            en: \"“I’ve had Arccos for 2 years, it’s helped me improve my game from a 15 handicap down to a 9.”\",\n          },\n          title: {\n            en: \"Arccos Member\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/parth-patel-testimonial.webp\",\n        },\n        {\n          name: {\n            en: \"Andy Proudman\",\n          },\n          quote: {\n            en: \"“Pairing Arccos's powerful analytics with Me And My Golf’s coaching plans will accelerate your improvements and take your game to the next level.”\",\n          },\n          title: {\n            en: \"Me And My Golf Co-Founder\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/me-and-my-golf/andy-proudman.webp\",\n        },\n        {\n          name: {\n            en: \"Tony Lee\",\n          },\n          quote: {\n            en: \"“I can't think of a better app that's usable, you don't have to think about it, everything's there. Now, I'm playing with purpose.”\",\n          },\n          title: {\n            en: \"Arccos Member\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/tony-lee.webp\",\n        },\n      ],\n    },\n    animation_section: {\n      header: {\n        en: \"Everything you need to \",\n      },\n      header_highlight: {\n        en: \"improve faster.\",\n      },\n      steps: [\n        {\n          title: {\n            en: \"Automatic Shot Tracking\",\n          },\n          body: {\n            en: \"Track and record your shots automatically on the course.\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/new-animation-slide1.webp\",\n        },\n        {\n          title: {\n            en: \"A.I. Rangefinder\",\n          },\n          body: {\n            en: \"Get precise “Plays Like” distances adjusted in real-time for environmental conditions.\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/newer-animation-slide-2.webp\",\n        },\n        {\n          title: {\n            en: \"Smart Club Distances\",\n          },\n          body: {\n            en: \"Know how far you actually hit each one of your clubs and get simulated distances for any situation.\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/titleist-animation-slide3.webp\",\n        },\n        {\n          title: {\n            en: \"Strokes Gained Insights\",\n          },\n          body: {\n            en: \"Transformative personal insights show you exactly what to practice to improve faster.\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/AG-4-StrokesGained.webp\",\n        },\n        {\n          title: {\n            en: \"PGA TOUR® QUALITY APPROACH\",\n          },\n          body: {\n            en: \"Compare your approach shots to PGA TOUR players. Share it with your friends as proof you were better, for one shot anyway!\",\n          },\n          image:\n            \"https://cdn.arccosgolf.com/images/activation/nucap/AG-5-PGA_TQA.webp\",\n        },\n      ],\n    },\n  },\n};\n","import React from 'react'\nimport './review-section.css'\nimport {CardCarousel} from \"./card-carousel/card-carousel.tsx\";\nimport {getDynamicContentNucapLandingPage} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport { mmgContent } from '../../../common-components/mmg_content.tsx';\nimport { getPartnerFromWindowLocation } from '../../../../util/partner-selectors.mjs';\n\nconst golfDigestAchievement = 'https://cdn.arccosgolf.com/images/activation/nucap/golf-digest-editors-choice.png'\nconst appStoreAchievement = 'https://cdn.arccosgolf.com/images/activation/nucap/app-store-ratings.png'\nconst playStoreAchievement = 'https://cdn.arccosgolf.com/images/activation/nucap/play-store-ratings.png'\nconst billionShotsAchievement = 'https://cdn.arccosgolf.com/images/activation/nucap/billion-shots.png'\nconst officialGameTracker = 'https://cdn.arccosgolf.com/images/activation/shared/official-game-tracker-condensed.png'\n\nconst getDynamicContent = () => {\n    const partner = getPartnerFromWindowLocation()\n\n    if (partner === 'mmg') {\n        return mmgContent.nucap_landing_page.review_section\n    }\n\n    return getDynamicContentNucapLandingPage().review_section\n}\n\nexport const ReviewSection: React.FC<{shouldShowAchievements?: boolean}> = ({shouldShowAchievements}) => {\n    const dynamicContent = getDynamicContent()\n\n    return (\n        <div className={'nucap-review-section'}>\n            { shouldShowAchievements &&\n                <AppAchievements />\n            }\n            <h2 className={`review-section-title ${!shouldShowAchievements ? 'without-achievements' : ''}`}>\n                {localize(dynamicContent.header,\n                    {values: {\n                        highlight: <span className={'highlight'}>{localize(dynamicContent.header_highlight)}</span>\n                    }\n                })}\n            </h2>\n            <CardCarousel className={'review-carousel'}/>\n        </div>\n    )\n}\n\nexport const AppAchievements: React.FC = () => {\n    return (\n        <div className={'achievements-section'}>\n            <img className={'achievement'} src={golfDigestAchievement} />\n            <img className={'achievement'} src={appStoreAchievement} />\n            <img className={'achievement'} src={playStoreAchievement} />\n            <img className={'achievement'} src={billionShotsAchievement} />\n        </div>\n    )\n}\n\nexport const AppAchievementsCondensed: React.FC = () => {\n    return (\n        <div className={'achievements-section condensed'}>\n            <img className={'achievement'} src={appStoreAchievement}/>\n            <img className={'achievement'} src={officialGameTracker}/>\n            <img className={'achievement'} src={playStoreAchievement}/>\n        </div>\n    )\n}\n","import React from 'react'\nimport './billion-shots-section.css'\nimport {getDynamicContentNucapLandingPage} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {scrollToTop} from \"../nucap-landing-page.tsx\";\nimport {getPartnerFromWindowLocation} from \"../../../../util/partner-selectors.mjs\";\n\nexport const BillionShotsSection: React.FC = () => {\n    const dynamicContent = getDynamicContentNucapLandingPage()?.billion_shots_section\n    const partner = getPartnerFromWindowLocation()\n    return (\n        <div className={'billion-shots-section'}>\n            <div className={'background-container'}>\n                <svg className={'white-mask'} xmlns=\"http://www.w3.org/2000/svg\"\n                     viewBox=\"0 0 393 66\" fill=\"none\">\n                    <path d=\"M392.728 0.0L-0.270142 65.5554V0.0H392.728Z\" fill=\"white\"/>\n                </svg>\n                <img className={'background-image mobile'} src={dynamicContent.background_image_mobile}/>\n                <img className={'background-image desktop'} src={dynamicContent.background_image_desktop}/>\n                <GreenShadow />\n            </div>\n            <div className={'billion-shots-section-content'}>\n                <div className={'text-content'}>\n                    <h2 className={'billion-shots-section-title'}>\n                        {localize(dynamicContent.header)}\n                    </h2>\n                    <p className={'billion-shots-section-body'}>\n                        {localize(dynamicContent.subheader)}\n                    </p>\n                    {partner !== 'za' ? (\n                        <button\n                            className={'billion-shots-section-button'}\n                            type={'button'}\n                            onClick={() => scrollToTop()}\n                        >\n                            Continue\n                        </button>\n                    ) : (\n                        <a href={'https://www.theproshop.co.za/products/brands/arccos?sort=all_search'}\n                           className={'shop-now'}>\n                            Shop Now\n                        </a>\n\n                    )}\n\n                </div>\n                <img className={'sensor-grip-image mobile'} src={dynamicContent.sensor_club_image_mobile}/>\n                <img className={'sensor-grip-image desktop'} src={dynamicContent.sensor_club_image_desktop}/>\n            </div>\n\n        </div>\n    )\n}\n\nconst GreenShadow: React.FC = () => {\n    return (\n        <svg className={'green-shadow'} viewBox=\"0 0 1440 188\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n            <g filter=\"url(#filter0_f_7_1682)\">\n                <ellipse cx=\"763\" cy=\"234.5\" rx=\"835\" ry=\"129.5\" fill=\"#56C271\"/>\n            </g>\n            <defs>\n                <filter id=\"filter0_f_7_1682\" x=\"-176.487\" y=\"0.512695\" width=\"1878.97\" height=\"467.975\"\n                        filterUnits=\"userSpaceOnUse\" colorInterpolationFilters=\"sRGB\">\n                    <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\"/>\n                    <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"/>\n                    <feGaussianBlur stdDeviation=\"52.2437\" result=\"effect1_foregroundBlur_7_1682\"/>\n                </filter>\n            </defs>\n        </svg>\n    )\n}\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n    listCacheDelete = require('./_listCacheDelete'),\n    listCacheGet = require('./_listCacheGet'),\n    listCacheHas = require('./_listCacheHas'),\n    listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n    isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n    isMasked = require('./_isMasked'),\n    isObject = require('./isObject'),\n    toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n    getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n    hashDelete = require('./_hashDelete'),\n    hashGet = require('./_hashGet'),\n    hashHas = require('./_hashHas'),\n    hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n    ListCache = require('./_ListCache'),\n    Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n    mapCacheDelete = require('./_mapCacheDelete'),\n    mapCacheGet = require('./_mapCacheGet'),\n    mapCacheHas = require('./_mapCacheHas'),\n    mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n    Map = require('./_Map'),\n    MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n    stackClear = require('./_stackClear'),\n    stackDelete = require('./_stackDelete'),\n    stackGet = require('./_stackGet'),\n    stackHas = require('./_stackHas'),\n    stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n    setCacheAdd = require('./_setCacheAdd'),\n    setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var Symbol = require('./_Symbol'),\n    Uint8Array = require('./_Uint8Array'),\n    eq = require('./eq'),\n    equalArrays = require('./_equalArrays'),\n    mapToArray = require('./_mapToArray'),\n    setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n    isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n    stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n    Map = require('./_Map'),\n    Promise = require('./_Promise'),\n    Set = require('./_Set'),\n    WeakMap = require('./_WeakMap'),\n    baseGetTag = require('./_baseGetTag'),\n    toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n","import {RefObject, useCallback, useEffect, useRef, useState} from 'react'\nimport {useThrottledScrollEventHandler} from '@arccosgolf/react-hooks'\nimport * as reactUse from 'react-use'\nimport isEqual from 'lodash/isEqual'\n\nconst {useInterval, useWindowSize} = reactUse\n\nexport const STEPS = [1, 2, 3, 4, 5] as const\nexport type Step = typeof STEPS[number]\nexport const useHeadline = (step: Step) => {\n    switch (step) {\n        case 1: {\n            return 'Tracking your data leads to better decisions and lower scores.'\n        }\n        case 2: {\n            return 'Smart sensors for every club to automatically track your shots.'\n        }\n        case 3: {\n            return 'Club Distances that just got a whole lot smarter.'\n        }\n        case 4: {\n            return 'Strokes Gained analytics for a clear way to improve faster.'\n        }\n    }\n}\n\nexport const useBody = (step: Step) => {\n    switch (step) {\n        case 1: {\n            return 'The game’s most complete on course tracking system helps players of all abilities know their game to play smarter and improve faster.'\n        }\n        case 2: {\n            return 'Once you pair your smart sensors with the Arccos app, just play the game like you normally would and we’ll record your shots as you play.'\n        }\n        case 3: {\n            return 'Our machine learning algorithm provides the most accurate details for how far you really hit each of your clubs in every situation and every environment.'\n        }\n        case 4: {\n            return 'The most advanced Strokes Gained platform in the game shows your strengths and weaknesses so you know exactly what aspects of your game you need to work on.'\n        }\n    }\n}\n\nexport const getElementDimensions = (el: HTMLElement | null): { height: number; width: number } => {\n    if (!el) {\n        return {\n            height: 999999999,\n            width: 999999999,\n        }\n    }\n    const {\n        top,\n        bottom,\n        left,\n        right,\n    } = el.getBoundingClientRect()\n    return {\n        height: bottom - top,\n        width: right - left,\n    }\n}\n\nexport const getCenterRelativeToViewport = (el: HTMLElement | null): { y: number; x: number } => {\n    if (!el) {\n        return {x: 999999999, y: 999999999}\n    }\n    const {\n        bottom,\n        right,\n    } = el.getBoundingClientRect()\n    const {\n        height,\n        width,\n    } = getElementDimensions(el)\n    return {\n        y: bottom - height / 2,\n        x: right - width / 2,\n    }\n}\n\nexport const getIsCentered = (el: HTMLDivElement | null): boolean => {\n    if (!el) {\n        return false\n    }\n    const {\n        x,\n        y,\n    } = getCenterRelativeToViewport(el)\n    return (\n        y > 0 &&\n        y < window.innerHeight &&\n        x > 0 &&\n        x < window.innerWidth\n    )\n}\n\nexport const getCenterRelativeToDocument = (el: HTMLElement | null): { x: number; y: number } => {\n    if (!el) {\n        return {\n            x: 999999999,\n            y: 999999999,\n        }\n    }\n    const {top, right} = el.getBoundingClientRect()\n    const {height, width} = getElementDimensions(el)\n    const scrollRight = document.documentElement.scrollLeft + document.documentElement.scrollWidth\n    const clientRight = document.documentElement.clientLeft + document.documentElement.clientWidth\n    return {\n        y: top +\n            document.documentElement.scrollTop -\n            document.documentElement.clientTop +\n            height / 2,\n        x: right +\n            scrollRight -\n            clientRight +\n            width / 2,\n    }\n}\n\nconst useInitialPosition = (elementRef: RefObject<HTMLElement>): { x: number; y: number } => {\n    const initialPositionCheckCounterRef = useRef(0)\n    const [initialPosition, setInitialPosition] = useState(getCenterRelativeToDocument(elementRef.current))\n    const {height, width} = useWindowSize()\n    useEffect(() => {\n        initialPositionCheckCounterRef.current = 0\n    }, [height, width])\n    useInterval(useCallback(() => {\n                if (!elementRef.current) {\n                    return\n                }\n                const center = getCenterRelativeToDocument(elementRef.current)\n                if (isEqual(initialPosition, center)) {\n                    initialPositionCheckCounterRef.current++\n                } else {\n                    initialPositionCheckCounterRef.current = 0\n                    setInitialPosition(center)\n                }\n            },\n            [elementRef, initialPosition],\n        ),\n        initialPositionCheckCounterRef.current > 50 ? null : 10,\n    )\n    return initialPosition\n}\n\nexport const MOBILE_VIEW_WIDTH = 768\n\nexport const useVerticalAnimationAlignment = (\n    elementRef: RefObject<HTMLElement>,\n): 'top' | 'bottom' | 'fixed' => {\n    const {width: viewportWidth} = useWindowSize()\n\n    const {y} = useInitialPosition(elementRef)\n    const getAlignment = useCallback(() => {\n        if (viewportWidth <= MOBILE_VIEW_WIDTH) {\n            return 'top'\n        }\n        const {height} = getElementDimensions(elementRef.current)\n        const headerHeight = window.innerHeight - height\n        const upperBound = (\n            y -\n            height / 2 -\n            headerHeight\n        )\n        const lowerBound = upperBound +\n            (STEPS.length - 1) * height\n        if (window.scrollY > upperBound) {\n            if (window.scrollY < lowerBound) {\n                return 'fixed'\n            }\n            return 'bottom'\n        }\n        return 'top'\n    }, [elementRef, viewportWidth, y])\n    const [alignment, setAlignment] = useState<'top' | 'bottom' | 'fixed'>(getAlignment())\n    const handleScroll = useCallback(() => {\n        setAlignment(getAlignment())\n    }, [getAlignment])\n    useInterval(handleScroll, 100)\n    useThrottledScrollEventHandler(handleScroll)\n    return alignment\n}\n\nexport const scrollToElement = (\n    elementRef: RefObject<HTMLElement>,\n    horizontalScrollContainer?: RefObject<HTMLElement>,\n): void => {\n    console.log('scrolling')\n    if (!elementRef.current) {\n        return\n    }\n    console.log('scrolling')\n    if (horizontalScrollContainer?.current) {\n        console.log('scrolling horizontally')\n        horizontalScrollContainer.current?.scrollTo({\n            left: elementRef.current.offsetLeft,\n            behavior: 'smooth',\n        })\n        return\n    }\n    const {y, x} = getCenterRelativeToDocument(elementRef.current)\n    window.scrollTo({\n        top: y - window.innerHeight / 2,\n        left: x,\n        behavior: 'smooth',\n    })\n}\n","import * as reactUse from \"react-use\"\n\nconst { useWindowSize } = reactUse\n\n\nexport const useIsDesktopView = () => {\n    const { width, height } = useWindowSize()\n    const aspectRatio = width / height\n    return width >= 768 && aspectRatio > 3 / 5\n}\n","import React, {useEffect, useRef} from 'react'\nimport './animation-carousel.css'\nimport {getDynamicContentNucapLandingPage} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {DotContainer} from \"../review-section/card-carousel/dot-container/dot-container.tsx\";\n\n\nexport const AnimationCarousel: React.FC<React.ComponentProps<'div'>> = (props) => {\n    const {\n        className,\n        ...restProps\n    } = props\n    const scrollContainerRef = useRef<HTMLDivElement>(null)\n    const [activeIndex, setActiveIndex] = React.useState(0)\n\n    const scrollToIndex = (index: number) =>\n        scrollContainerRef.current?.scrollTo({\n            left: scrollContainerRef.current.getBoundingClientRect().width * index,\n            behavior: 'smooth',\n        })\n\n    const getVisibleIndex = () => {\n        const scrollContainer = scrollContainerRef.current\n        if (!scrollContainer) return 0\n        const {scrollLeft, clientWidth} = scrollContainer\n        return Math.round(scrollLeft / clientWidth)\n    }\n\n    useEffect(() => {\n        const interval = setInterval(() => {\n            scrollToIndex((activeIndex + 1) % animation_slides.length)\n        }, 10000)\n\n        return () => clearInterval(interval)\n    }, [activeIndex]);\n\n    useEffect(() => {\n        const interval = setInterval(() => {\n            setActiveIndex(getVisibleIndex())\n        }, 300)\n\n        return () => clearInterval(interval)\n    }, []);\n\n    const animation_slides = getDynamicContentNucapLandingPage()?.animation_section.steps\n\n    return (\n        <div\n            className={`card-carousel ${className || ''}`}\n            {...restProps}\n        >\n                <div\n                    className={'card-container'}\n                    ref={scrollContainerRef}\n                >\n                    {animation_slides.map((slide, index) => (\n                        <div key={index} className={'animation-slide'}>\n                            <img src={slide.image} className={'animation-image'}/>\n\n\n                            <p className={'slide-title'}>{localize(slide.title)}</p>\n                            <p className={'slide-body'}>{localize(slide.body)}</p>\n\n                        </div>\n                    ))}\n                </div>\n            <DotContainer length={animation_slides.length} activeIndex={activeIndex} onClick={scrollToIndex}\n                          className={'card-carousel-dot-container'}/>\n\n        </div>\n    )\n}\n\n","import React, {RefObject, useCallback, useEffect, useRef, useState} from 'react'\nimport './animation-section.css'\nimport {\n    getIsCentered,\n    MOBILE_VIEW_WIDTH,\n    scrollToElement,\n    Step,\n    STEPS,\n    useVerticalAnimationAlignment\n} from \"./utils.ts\";\nimport {useIsScrollingDown, useThrottledScrollEventHandler} from \"@arccosgolf/react-hooks\";\nimport {steps} from \"./steps.ts\";\n\nimport * as pkg from 'react-use';\nimport {getDynamicContentNucapLandingPage} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {useIsDesktopView} from \"../../../../util/view-utils.mjs\";\nimport {AnimationCarousel} from \"./animation-carousel.tsx\";\nimport {scrollToTop} from \"../nucap-landing-page.tsx\";\nimport {getPartnerFromWindowLocation} from \"../../../../util/partner-selectors.mjs\";\nimport { mmgContent } from '../../../common-components/mmg_content.tsx';\n\nconst {useWindowSize, usePrevious} = pkg;\n\nconst ProgressBar: React.FC<{\n    step: Step | undefined\n    setStep: (step: Step) => unknown\n    forwardRef: RefObject<HTMLDivElement>\n} & React.ComponentProps<'div'>> = ({step, setStep, forwardRef, className, ...restProps}) => {\n    return (\n        <div className={`vertical-progress-bar ${className || ''}`} ref={forwardRef} {...restProps}>\n            <div className='progress-bar-line'/>\n            <div className='dot-container'>\n                {\n                    STEPS.map(ztep => (\n                        <button\n                            key={ztep}\n                            className={\n                                ztep === step ?\n                                    `progress-bar-active-dot` :\n                                    `progress-bar-inactive-dot`\n                            }\n                            onClick={e => {\n                                e.preventDefault()\n                                e.stopPropagation()\n                                setStep(ztep)\n                            }}\n                        />\n                    ))\n                }\n            </div>\n        </div>\n    )\n}\n\nexport const useVisibleStep = (\n    step1Ref: RefObject<HTMLDivElement>,\n    step2Ref: RefObject<HTMLDivElement>,\n    step3Ref: RefObject<HTMLDivElement>,\n    step4Ref: RefObject<HTMLDivElement>,\n    step5Ref: RefObject<HTMLDivElement>,\n    additionalScrollContainer: RefObject<HTMLDivElement>,\n): Step | undefined => {\n    const getVisibleStep = useCallback(() => {\n        if (getIsCentered(step5Ref.current)) {\n            return 5\n        } else if (getIsCentered(step4Ref.current)) {\n            return 4\n        } else if (getIsCentered(step3Ref.current)) {\n            return 3\n        } else if (getIsCentered(step2Ref.current)) {\n            return 2\n        } else if (getIsCentered(step1Ref.current)) {\n            return 1\n        }\n        return 1\n    }, [step1Ref, step2Ref, step3Ref, step4Ref])\n    const [visibleStep, setVisibleStep] = useState<Step | undefined>(getVisibleStep())\n\n    return visibleStep\n}\n\nconst useVisibleCollapsedSteps =  (\n    activeStep: Step, additionalScrollContainer: RefObject<HTMLDivElement>): Step[] => {\n    const getVisibleCollapsedSteps = useCallback(() => {\n        if (activeStep === 5) {\n            return [1, 2] as Step[]\n        } else if (activeStep === 4) {\n            return [5, 1] as Step[]\n        } else if (activeStep === 3) {\n            return [4, 5] as Step[]\n        } else if (activeStep === 2) {\n            return [3, 4] as Step[]\n        } else if (activeStep === 1) {\n            return [2, 3] as Step[]\n        }\n        return undefined\n    }, [activeStep])\n\n    return getVisibleCollapsedSteps()\n}\n\nexport const useScrollSnapping = (\n    step1Ref: RefObject<HTMLDivElement>,\n    step2Ref: RefObject<HTMLDivElement>,\n    step3Ref: RefObject<HTMLDivElement>,\n    step4Ref: RefObject<HTMLDivElement>,\n    step: Step | undefined,\n) => {\n    const isScrollingDown = useIsScrollingDown()\n    const [doneSnapping, setDoneSnapping] = useState<boolean>(true)\n    const timeoutRef = useRef<number | null>(null)\n    const prevStep = usePrevious(step)\n    const handleScroll = useCallback(() => {\n        const refs = [step1Ref, step2Ref, step3Ref]\n        if (!!step && doneSnapping) {\n            setDoneSnapping(false)\n            timeoutRef.current = setTimeout(() => setDoneSnapping(true), 1500)\n            if (isScrollingDown) {\n                if (!prevStep && step === 1) {\n                    scrollToElement(refs[0])\n                } else if (step) {\n                    scrollToElement(refs[Math.min(step, 2)])\n                }\n            } else {\n                if (!prevStep && step === 3) {\n                    scrollToElement(refs[2])\n                } else if (step) {\n                    scrollToElement(refs[Math.max(step - 1, 1) - 1])\n                }\n            }\n        }\n    }, [doneSnapping, isScrollingDown, prevStep, step, step1Ref, step2Ref, step3Ref])\n    useThrottledScrollEventHandler(handleScroll, 500)\n}\n\nconst TextScroller: React.FC<{step: Step, isActiveStep: boolean,  onClick?: () => void}> = ({step, isActiveStep, onClick}) => {\n    const dynamicContent = getDynamicContentNucapLandingPage()?.animation_section.steps\n\n    return (\n        <div className={`text-scroller`} onClick={onClick}>\n            <h3 className={`text-scroller-headline ${isActiveStep ? 'active' : ''}`}>{localize(dynamicContent[step - 1].title)}</h3>\n            <p className={`text-scroller-body ${isActiveStep ? 'active' : ''}`}>{localize(dynamicContent[step - 1].body)}</p>\n        </div>\n    )\n}\n\nconst getDynamicContent = () => {\n    const partner = getPartnerFromWindowLocation()\n\n    if (partner === 'mmg') {\n        return mmgContent.nucap_landing_page.animation_section\n    }\n\n    return getDynamicContentNucapLandingPage().animation_section\n}\n\nexport const AnimationSection: React.FC = () => {\n\n    const middleSectionRef = useRef<HTMLDivElement>(null)\n\n    const [stepsOrder, setStepsOrder] = useState([1, 2, 3, 4, 5] as Step[])\n\n    const stepForward = () => {\n        setStepsOrder((stepsOrder) => {\n            if (stepsOrder.length > 1)\n                return stepsOrder.slice(1)\n            else\n                return stepsOrder\n        })\n    }\n\n    const stepBackward = () => {\n        setStepsOrder((stepsOrder) => {\n            if (stepsOrder[0] > 1)\n                return [stepsOrder[0] - 1, ...stepsOrder] as Step[]\n            else\n                return stepsOrder\n        })\n    }\n\n    const [currentIndex, setCurrentIndex] = useState(0);\n    const [scrollLock, setScrollLock] = useState(false);\n\n    const makeActiveStep = (activeStep: Step) => {\n        if (stepsOrder[0] < activeStep) {\n            stepForward()\n        } else if (stepsOrder[0] > activeStep) {\n            stepBackward()\n        }\n    }\n\n    const handleScroll = () => {\n        const container = middleSectionRef.current;\n        if (!container || scrollLock) return;\n\n\n        const { scrollTop, clientHeight } = container;\n        const topPadding = clientHeight / 8\n\n        const stepHeight = clientHeight / 2.7\n\n        // Determine current step index using scroll position\n        const nextIndex = Math.round(scrollTop / stepHeight);\n\n        // console.log({stepHeight, scrollTop, clientHeight});\n\n        // Snap to the next step\n        if (nextIndex !== currentIndex) {\n            setScrollLock(true)\n            console.log(\"Current Index:\", currentIndex);\n            console.log(\"Next Index:\", nextIndex);\n\n            setCurrentIndex(nextIndex);\n            const nextStep = nextIndex + 1 as Step\n\n            makeActiveStep(nextStep)\n\n            // Programmatically snap to the step\n            container.scrollTo({\n                top: (nextIndex * stepHeight) , // Snap to the next step\n                behavior: \"smooth\",\n            });\n\n            setTimeout(() => {\n                setScrollLock(false);\n            }, 200);\n        }\n    };\n\n    const dynamicContent = getDynamicContent()\n    const animation_images = dynamicContent?.steps.map(step => step.image)\n\n    const isDesktop = useIsDesktopView()\n    const partner = getPartnerFromWindowLocation()\n\n    return isDesktop ? (\n        <div className={'animation-section'}>\n            <h2>\n                {localize(dynamicContent.header)}\n                <span>{localize(dynamicContent.header_highlight)}</span>\n            </h2>\n            <div className={'animation-wrapper'}>\n                <div className={'image-container'}>\n                    {STEPS.map(stepIter => (\n                        <img src={animation_images[stepIter - 1]} alt={''} className={`animation-image ${stepIter === stepsOrder[0] ? 'active' : 'hidden'}`}/>\n                    ))}\n                </div>\n                <ProgressBarSvg />\n                <div className={'text-container'}>\n                    <div className={'middle-section-wrapper animation-container-middle-section'} ref={middleSectionRef} id={'scroll-container'} onScroll={handleScroll}>\n                        <div className='animation-container-middle-section'>\n                            {STEPS.map(stepIter => (\n                                <TextScroller step={stepIter} isActiveStep={stepIter === stepsOrder[0]} />\n                            ))}\n                        </div>\n                    </div>\n                    {partner !== 'za' ? (\n                        <button className={'animation-button'} type={'button'} onClick={() => scrollToTop()}>Continue</button>\n                    ) : (\n                        <a href={'https://www.theproshop.co.za/products/brands/arccos?sort=all_search'}\n                           className={'shop-now'}>\n                            Shop Now\n                        </a>\n                    )}\n\n                </div>\n            </div>\n        </div>\n    ) : (\n        <div className={'animation-section'}>\n            <h2 className={'animation-section-header'}>\n                {localize(dynamicContent.header)}\n                <span>{localize(dynamicContent.header_highlight)}</span>\n            </h2>\n            <AnimationCarousel/>\n            {partner !== 'za' ? (\n                <button className={'animation-button'} type={'button'} onClick={() => scrollToTop()}>Continue</button>\n            ) : (\n                <a href={'https://www.theproshop.co.za/products/brands/arccos?sort=all_search'} className={'shop-now'}>\n                    Shop Now\n                </a>\n                )}\n        </div>\n    )\n}\n\nconst ProgressBarSvg: React.FC = () => {\n    return (\n        <svg viewBox=\"0 0 25 259\" fill=\"none\" className={'progress-bar'}>\n            <g clip-path=\"url(#clip0_59_33)\">\n                <path d=\"M12 0L13 259\" stroke=\"url(#paint0_linear_59_33)\"/>\n                <path\n                    d=\"M12.5 43C18.299 43 23 38.299 23 32.5C23 26.701 18.299 22 12.5 22C6.70101 22 2 26.701 2 32.5C2 38.299 6.70101 43 12.5 43Z\"\n                    fill=\"#F2F2F2\" stroke=\"#56C271\" strokeWidth=\"4\"/>\n            </g>\n            <defs>\n                <linearGradient id=\"paint0_linear_59_33\" x1=\"13.0049\" y1=\"279.041\" x2=\"46.5822\" y2=\"274.94\"\n                                gradientUnits=\"userSpaceOnUse\">\n                    <stop stop-color=\"#A0ADB7\" stop-opacity=\"0\"/>\n                    <stop offset=\"0.882322\" stop-color=\"#A0ADB7\"/>\n                    <stop offset=\"1\" stop-color=\"#A0ADB7\" stop-opacity=\"0\"/>\n                </linearGradient>\n                <clipPath id=\"clip0_59_33\">\n                    <rect width=\"25\" height=\"259\" fill=\"white\"/>\n                </clipPath>\n            </defs>\n        </svg>\n    )\n}\n","import React from 'react'\nimport './phone-screen-section.css'\nimport {AppAchievements, AppAchievementsCondensed} from \"../../review-section/review-section.tsx\";\nimport {getPartnerFromWindowLocation} from \"../../../../../util/partner-selectors.mjs\";\nimport { getShouldOfferLinkProTrial } from '../../../../../data/api/query/offers.mts';\nimport { getIsVintageExperience } from '../../../../../util/alps-experiment.mts';\n\nconst phoneScreenImage = 'https://cdn.arccosgolf.com/images/activation/nucap/three-phones-desktop2.png'\nconst phoneScreenImageTitleist = 'https://cdn.arccosgolf.com/images/activation/nucap/phone-screen-group2.png'\nconst phoneScreenImageLinkProTrial = 'https://cdn.arccosgolf.com/images/activation/nucap/three-phones-with-link-pro-and-sensors.png'\nconst phoneScreenImageVintage = 'https://cdn.arccosgolf.com/images/activation/vintage/device-screenshot-group.webp'\n\nexport const PhoneScreenSection: React.FC = () => {\n    const partner = getPartnerFromWindowLocation()\n    const isVintage = getIsVintageExperience()\n\n    const getShouldShowCondensedAchievements = () => {\n        if (isVintage) return false\n        return !['cobra', 'dunlopsports', 'mmg', 'easports', 'taylormade', 'clubchampion', 'skillest', 'clubchampion-instore', 'referrals'].includes(partner)\n    }\n\n    let imageToUse = phoneScreenImage\n    if (isVintage) {\n        imageToUse = phoneScreenImageVintage\n    } else if (partner === 'titleist') {\n        imageToUse = phoneScreenImageTitleist\n    } else if (getShouldOfferLinkProTrial()) {\n        imageToUse = phoneScreenImageLinkProTrial\n    }\n\n    return (\n        <div className={'phone-screen-section'}>\n            <img className={'phone-screen-image'} src={imageToUse} />\n            {getShouldShowCondensedAchievements() ? <AppAchievementsCondensed /> : <AppAchievements />}\n        </div>\n    )\n}\n","import React, {useEffect} from 'react'\nimport './skillest-giveaway.css'\nimport {useCurrency, useFormatPrice} from \"../../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport {useSelectedLineItems} from \"../../../../../data/api/query/offers.mjs\";\nimport {getShouldOfferSkillest} from \"../../../../../util/partner-selectors.mjs\";\nimport { scrollToTop } from '../../../../pages/nucap-landing-page/nucap-landing-page.tsx';\n\ntype Props = {\n    titleClassName?: string\n    bodyClassName?: string\n    buttonClassName?: string\n}\n\nexport const useSkillestValue = (): number => {\n    const currency = useCurrency()\n    switch (currency) {\n        case 'JPY': {\n            return 14800\n        }\n        case 'KRW': {\n            return 133000\n        }\n        case 'GBP': {\n            return 80\n        }\n        case 'EUR': {\n            return 90\n        }\n        case 'AUD': {\n            return 150\n        }\n        case 'CAD': {\n            return 135\n        }\n        case 'USD':\n        default: {\n            return 100\n        }\n    }\n}\n\nexport const SkillestGiveawaySection: React.FC<Props & React.ComponentProps<'section'>> =\n    ({\n         className,\n         bodyClassName,\n         titleClassName,\n         buttonClassName,\n         ...props\n     }) => {\n        const lineItems = useSelectedLineItems()\n        const shouldOfferSkillest = getShouldOfferSkillest()\n        const skillestValue = useSkillestValue()\n        const formatPrice = useFormatPrice()\n        \n        if (!shouldOfferSkillest) {\n            return null\n        }\n        return (\n            <section className={`skillest-giveaway-section`} id={'skillest-section'} {...props}>\n                <div\n                    className={'phones'}\n                >\n                    <img\n                        className={'phones-img'}\n                        src={'https://cdn.arccosgolf.com/images/activation/ping/skillest-phones-v2.png'}\n                        alt={''}\n                    />\n                </div>\n                <div className={'logo'}>\n                    <img\n                        src={'https://cdn.arccosgolf.com/images/activation/ping/skillest-logo-clear-bg-762x330.png'}\n                        alt={''}\n                    />\n                </div>\n                <div className={`text-and-button`}>\n                    <h2 className={`title  ${titleClassName}`}>{`Activate now to access a free swing lesson from a coach.`}</h2>\n                    <div\n                        className={`text ${bodyClassName}`}>{`Via our partners at Skillest, you'll get one-on-one instruction based on your swing videos and your Arccos data. Improve faster and play your best with this incredible offer. No purchase necessary. Valued at ${formatPrice(skillestValue)}.`}</div>\n                    <button\n                        type={'button'}\n                        className={`button ${buttonClassName}`}\n                        onClick={() => scrollToTop()}\n                    >\n                        {`Continue`}\n                    </button>\n                </div>\n            </section>\n        )\n    }\n","import React from 'react'\nimport {NucapMainSection} from \"./main-section/nucap-main-section.tsx\";\nimport {ReviewSection} from \"./review-section/review-section.tsx\";\nimport {BillionShotsSection} from \"./billion-shots-section/billion-shots-section.tsx\";\nimport {AnimationSection} from \"./animation-section/animation-section.tsx\";\nimport {PhoneScreenSection} from \"./v2/phone-screen-section/phone-screen-section.tsx\";\nimport {getPartnerFromWindowLocation} from \"../../../util/partner-selectors.mjs\";\nimport {SkillestGiveawaySection} from \"../full-content-landing-page/sections/skillest-giveaway/skillest-giveaway.tsx\";\n\nexport const NucapLandingPage: React.FC = () => {\n    const partner = getPartnerFromWindowLocation()\n    return (\n        <>\n            <NucapMainSection />\n            {partner === 'titleist' &&\n                <PhoneScreenSection />\n            }\n            <ReviewSection shouldShowAchievements={partner !== 'titleist'} />\n            <AnimationSection />\n            <SkillestGiveawaySection />\n            <BillionShotsSection />\n        </>\n    )\n}\n\nexport const scrollToTop = () => {\n    window.scrollTo({top: 0, behavior: 'smooth'})\n}\n","import React, { useState } from 'react'\nimport './features-section.css'\nimport { PlaysLikeDistanceCardBack, SmarterDataCardBack, TournamentModeCardBack } from './features-section-card-backs'\nimport { scrollToTop } from '../../../nucap-landing-page/nucap-landing-page'\n\nexport interface FlippableCardItem {\n    image: string\n    title: string\n    description?: string\n    cardBack?: React.ReactNode\n}\n\ninterface FeaturesSectionProps {\n    title?: string\n    subtitle?: string\n    flippableCards?: FlippableCardItem[]\n    features?: string[]\n    hasGetStartedButton?: boolean\n}\n\nconst defaultFeatures = [\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/precision-accuracy.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/auto-pin-setting.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/vibration-pin-lock.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/6.1x-optical-zoom.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/1110-yd-range.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/weather-resistance2.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/storage-magnet.png',\n    'https://cdn.arccosgolf.com/images/activation/smart-laser/bluetooth-connectivity.png',\n]\n\nconst defaultFlippableCards: FlippableCardItem[] = [\n    {\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/plays-like-distance2.png',\n        title: 'Plays Like Distance',\n        cardBack: <PlaysLikeDistanceCardBack />\n    },\n    {\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/smarter-data-phone-screen.png',\n        title: 'Smarter Data',\n        cardBack: <SmarterDataCardBack />\n    },\n    {\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/tournament-mode-switch3.png',\n        title: 'Tournament Mode',\n        description: 'Built for casual or competitive rounds. Toggle Tournament mode on/off to meet USGA regulations.',\n        cardBack: <TournamentModeCardBack />\n    },\n]\n\nexport const InfoButton: React.FC<{rotate?: boolean}> = ({ rotate }) => {\n    return (\n        <button className=\"info-button\">\n            <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" style={{ transform: rotate ? 'rotate(45deg)' : 'rotate(0deg)' }}>\n                <rect x=\"0.3\" y=\"0.3\" width=\"23.4\" height=\"23.4\" rx=\"11.7\" fill=\"white\"/>\n                <rect x=\"0.3\" y=\"0.3\" width=\"23.4\" height=\"23.4\" rx=\"11.7\" stroke=\"black\" strokeWidth=\"0.6\"/>\n                <path d=\"M12 15.1308V9V15.1308Z\" fill=\"black\"/>\n                <path d=\"M12 15.1308V9\" stroke=\"black\" strokeWidth=\"0.75\"/>\n                <path d=\"M15.0652 12.0657H8.93433H15.0652Z\" fill=\"black\"/>\n                <path d=\"M15.0652 12.0657H8.93433\" stroke=\"black\" strokeWidth=\"0.75\"/>\n            </svg>\n        </button>\n    )\n}\n\nexport const FeaturesSection: React.FC<FeaturesSectionProps> = ({\n    title = \"Not Just a Number. A Smarter Number.\",\n    subtitle = \"Experience a full suite of advanced features that seamlessly connect to your Arccos app. Designed to help you lock in and play your smartest.\",\n    flippableCards = defaultFlippableCards,\n    features = defaultFeatures,\n    hasGetStartedButton = false\n}) => {\n    const [flippedCard, setFlippedCard] = useState<number | null>(null)\n\n    const handleCardClick = (index: number) => {\n        setFlippedCard(flippedCard === index ? null : index)\n    }\n\n    return (\n        <section className=\"features-section\">\n            <div className=\"features-container\">\n                <h2 className=\"features-title\">{title}</h2>\n                <p className=\"features-subtitle\">\n                    {subtitle}\n                </p>\n                {hasGetStartedButton && (\n                    <button className=\"get-started-button\" type=\"button\" onClick={scrollToTop}>Get Started</button>\n                )}\n                {flippableCards.length > 0 && (\n                    <div className=\"device-showcase\">\n                        {flippableCards.map((item, index) => (\n                            <div key={index} className={`device-card ${flippedCard === index ? 'flipped' : ''}`} onClick={() => handleCardClick(index)}>\n                                <div className=\"card-inner\">\n                                    <div className=\"card-front\">\n                                        <img src={item.image} alt={item.title} className=\"device-image\" />\n                                        <div className=\"device-card-background\"></div>\n                                        <div className=\"device-content\">\n                                            <h3 className=\"device-title\">{item.title}</h3>\n                                            {item.cardBack && (\n                                                <InfoButton />\n                                            )}\n                                        </div>  \n                                    </div>\n                                    {item.cardBack && (\n                                        <div className=\"card-back\">\n                                            {item.cardBack}\n                                        </div>\n                                    )}\n                                </div>\n                            </div>\n                        ))}\n                    </div>\n                )}\n                \n                {features.length > 0 && (\n                    <div className=\"features-grid\">\n                        {features.map((feature, index) => (\n                            <img \n                                key={index}\n                                src={feature} \n                                alt={`Feature ${index + 1}`}\n                                className=\"feature-icon\"\n                            />\n                        ))}\n                    </div>\n                )}\n            </div>\n        </section>\n    )\n}\n\n\n","import React, { createContext, useContext, useRef, useState, useCallback } from 'react'\n\nexport type AudioSource = 'comparison-video' | 'testimonial-audio' | 'subscription-video'\n\ninterface AudioManagerContextType {\n    currentlyPlaying: AudioSource | null\n    startPlaying: (source: AudioSource, element: HTMLVideoElement | HTMLAudioElement) => void\n    stopPlaying: (source: AudioSource) => void\n    stopAllOthers: (source: AudioSource) => void\n}\n\nconst AudioManagerContext = createContext<AudioManagerContextType | undefined>(undefined)\n\nexport const AudioManagerProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n    const [currentlyPlaying, setCurrentlyPlaying] = useState<AudioSource | null>(null)\n    const activeElementRef = useRef<HTMLVideoElement | HTMLAudioElement | null>(null)\n\n    const startPlaying = useCallback((source: AudioSource, element: HTMLVideoElement | HTMLAudioElement) => {\n        // Stop any currently playing audio/video (but don't reset their position)\n        if (activeElementRef.current && currentlyPlaying && currentlyPlaying !== source) {\n            activeElementRef.current.pause()\n        }\n\n        // Set the new active element and source\n        activeElementRef.current = element\n        setCurrentlyPlaying(source)\n\n        // Add event listener to reset when playback ends\n        const handleEnded = () => {\n            setCurrentlyPlaying(null)\n            activeElementRef.current = null\n        }\n        element.addEventListener('ended', handleEnded)\n\n        // Clean up event listener when component unmounts or changes\n        return () => {\n            element.removeEventListener('ended', handleEnded)\n        }\n    }, [currentlyPlaying])\n\n    const stopPlaying = useCallback((source: AudioSource) => {\n        if (currentlyPlaying === source && activeElementRef.current) {\n            activeElementRef.current.pause()\n            setCurrentlyPlaying(null)\n            activeElementRef.current = null\n        }\n    }, [currentlyPlaying])\n\n    const stopAllOthers = useCallback((source: AudioSource) => {\n        if (currentlyPlaying && currentlyPlaying !== source && activeElementRef.current) {\n            activeElementRef.current.pause()\n            setCurrentlyPlaying(null)\n            activeElementRef.current = null\n        }\n    }, [currentlyPlaying])\n\n    return (\n        <AudioManagerContext.Provider value={{ currentlyPlaying, startPlaying, stopPlaying, stopAllOthers }}>\n            {children}\n        </AudioManagerContext.Provider>\n    )\n}\n\nexport const useAudioManager = () => {\n    const context = useContext(AudioManagerContext)\n    if (context === undefined) {\n        throw new Error('useAudioManager must be used within an AudioManagerProvider')\n    }\n    return context\n}","import React, { useState, useRef, useEffect } from 'react'\nimport './inline-video-section.css'\nimport { AudioSource, useAudioManager } from '../../audio-manager'\n\ninterface InlineVideoSectionProps {\n    title: string\n    subtitle: string\n    videoUrl: string\n    videoId: string\n    posterUrl?: string\n    overlayTitle?: string\n    overlaySubtitle?: string\n    shouldShowOverlay?: boolean\n    className?: string\n}\n\nexport const InlineVideoSection: React.FC<InlineVideoSectionProps> = ({\n    title,\n    subtitle,\n    videoUrl,\n    videoId,\n    posterUrl,\n    overlayTitle,\n    overlaySubtitle,\n    shouldShowOverlay = false,\n    className = 'inline-video-section'\n}) => {\n    const [isPlaying, setIsPlaying] = useState(false)\n    const videoRef = useRef<HTMLVideoElement>(null)\n    const { startPlaying, stopAllOthers } = useAudioManager()\n\n    const handlePlayClick = () => {\n        if (videoRef.current) {\n            stopAllOthers(videoId as AudioSource)\n            videoRef.current.play()\n            setIsPlaying(true)\n            startPlaying(videoId as AudioSource, videoRef.current)\n        }\n    }\n\n    useEffect(() => {\n        const video = videoRef.current\n        if (video) {\n            const handleEnded = () => setIsPlaying(false)\n            const handlePause = () => setIsPlaying(false)\n            video.addEventListener('ended', handleEnded)\n            video.addEventListener('pause', handlePause)\n            \n            return () => {\n                video.removeEventListener('ended', handleEnded)\n                video.removeEventListener('pause', handlePause)\n            }\n        }\n    }, [])\n\n    return (\n        <section className={className}>\n        <div className=\"inline-video-container\">\n            <h2 className=\"inline-video-title\">{title}</h2>\n            <p className=\"inline-video-subtitle\">{subtitle}</p>\n            <div className=\"video-container\">\n                <video \n                    ref={videoRef}\n                    src={videoUrl}\n                    controls={isPlaying}\n                    className=\"inline-video\"\n                    poster={posterUrl}\n                >\n                    Your browser does not support the video tag.\n                </video>\n                {!isPlaying && (\n                    <div className={`video-overlay-container ${shouldShowOverlay ? '' : 'transparent'}`}>\n                        <button className=\"custom-play-button\" onClick={handlePlayClick}>\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\" fill=\"none\">\n                                <path d=\"M62 48L40 62V34L62 48Z\" fill=\"black\"/>\n                                <path d=\"M48 77C64.0163 77 77 64.0163 77 48C77 31.9837 64.0163 19 48 19C31.9837 19 19 31.9837 19 48C19 64.0163 31.9837 77 48 77Z\" stroke=\"black\" stroke-width=\"2.5\"/>\n                            </svg>\n                        </button>\n                        {!!overlayTitle && !!overlaySubtitle && (\n                        <div className=\"video-overlay\">\n                            <h2 className=\"video-title\">{overlayTitle}</h2>\n                            <p className=\"video-subtitle\">{overlaySubtitle}</p>\n                        </div>\n                        )}\n                    </div>\n                )}\n               \n            </div>\n        </div>\n    </section>\n    )\n}","import React from 'react'\n\ninterface FeatureImage {\n    mobile: string\n    desktop: string\n}\n\ninterface ComparisonColumnProps {\n    title: string\n    subtitle: string\n    productImage: string\n    features: (string | FeatureImage)[]\n    theme: 'sensors' | 'linkpro'\n}\n\nexport const ComparisonColumn: React.FC<ComparisonColumnProps> = ({\n    title,\n    subtitle,\n    productImage,\n    features,\n    theme\n}) => {\n    return (\n        <div className={`comparison-column ${theme}`}>\n            <div className=\"column-background\">\n            <img src={productImage} alt=\"product-image\" className=\"product-image\" />\n                <div className=\"column-header\">\n                    <div className=\"product-title\">\n                        <span className=\"title-main\">{title}</span>\n                        <span className=\"title-sub\">{subtitle}</span>\n                    </div>\n                </div>\n                \n               \n\n                <div className=\"features-list\">\n                    {features.map((feature, index) => {\n                        if (typeof feature === 'string') {\n                            return <img key={index} src={feature} alt=\"feature-icon\" className=\"feature-icon\" />\n                        }\n                        return (\n                            <picture key={index}>\n                                <source media=\"(min-width: 768px)\" srcSet={feature.desktop} />\n                                <img src={feature.mobile} alt=\"feature-icon\" className=\"feature-icon\" />\n                            </picture>\n                        )\n                    })}\n                </div>\n            </div>\n        </div>\n    )\n}","import React from 'react'\nimport './sensor-link-comparison-section.css'\nimport { ComparisonColumn } from './comparison-column'\nimport { scrollToTop } from '../../nucap-landing-page/nucap-landing-page'\n\ninterface SensorLinkComparisonSectionProps extends React.ComponentProps<'section'> {\n    className?: string\n}\n\nconst smartSensorsFeatures = [\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2a-NoSensors-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2a-NoSensors-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2b-ShotTracking-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2b-ShotTracking-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2c-StrokesGained-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2c-StrokesGained-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2d-Rangefinder-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2d-Rangefinder-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2e-StrokesGained-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2e-StrokesGained-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/2f-Caddie-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/2f-Caddie-Desktop.png'\n    },\n]\nconst linkProFeatures = [\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1a-NoSensors-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1a-NoSensors-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1b-ShotTracking-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1b-ShotTracking-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1c-StrokesGained-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1c-StrokesGained-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1d-Rangefinder-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1d-Rangefinder-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1e-StrokesGained-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1e-StrokesGained-Desktop.png'\n    },\n    {\n        mobile: 'https://cdn.arccosgolf.com/images/activation/alps/1f-Caddie-Mobile.png',\n        desktop: 'https://cdn.arccosgolf.com/images/activation/alps/1f-Caddie-Desktop.png'\n    },\n]\n\nexport const SensorLinkComparisonSection: React.FC<SensorLinkComparisonSectionProps> = ({\n    className = 'sensor-link-comparison-section',\n    ...props\n}) => {\n\n    const handleGetStartedClick = () => {\n        scrollToTop()\n    }\n\n    return (\n        <section className={className} {...props}>\n            <div className=\"comparison-content\">\n                <h2 className=\"comparison-main-title\">It's a New Way to Track Your Game</h2>\n                \n                <div className=\"comparison-columns\">\n                    <ComparisonColumn\n                        title=\"LINK\"\n                        subtitle=\"PRO\"\n                        productImage={'https://cdn.arccosgolf.com/images/activation/alps/ALPS-Mobile-4a.webp'}\n                        features={linkProFeatures}\n                        theme=\"linkpro\"\n                    />\n                    <ComparisonColumn\n                        title=\"SMART\"\n                        subtitle=\"SENSORS\"\n                        productImage={'https://cdn.arccosgolf.com/images/activation/alps/ALPS-Mobile-4b.webp'}\n                        features={smartSensorsFeatures}\n                        theme=\"sensors\"\n                    />\n                   \n                </div>\n\n                <button className=\"cta-button\" type=\"button\" onClick={handleGetStartedClick}>\n                    Get Started without Sensors\n                </button>\n            </div>\n        </section>\n    )\n}","import React, { useRef, useEffect } from 'react'\nimport {localize, TextContent} from \"../../../../../lang/localized-content.mjs\";\nimport { useAudioManager } from '../../audio-manager'\n\ntype Testimonial = {\n    image: string\n    quote: TextContent\n    name: TextContent\n    title: TextContent\n    subtitle?: TextContent\n    audioFile?: string\n}\n\nexport const TestimonialCard: React.FC<{ testimonial: Testimonial, desktopImage?: string }> = ({testimonial, desktopImage}) => {\n    const audioRef = useRef<HTMLAudioElement>(null)\n    const { startPlaying, stopAllOthers } = useAudioManager()\n\n    useEffect(() => {\n        const audio = audioRef.current\n        if (audio && testimonial.audioFile) {\n            const handlePlay = () => {\n                stopAllOthers('testimonial-audio')\n                startPlaying('testimonial-audio', audio)\n            }\n            \n            audio.addEventListener('play', handlePlay)\n            \n            return () => {\n                audio.removeEventListener('play', handlePlay)\n            }\n        }\n    }, [testimonial.audioFile, startPlaying, stopAllOthers])\n\n    return (\n        <div className={'testimonial-card'}>\n            {desktopImage && <img src={desktopImage} className={'testimonial-image desktop'}/>}\n            <img src={testimonial.image} className={`testimonial-image ${desktopImage ? 'mobile' : ''}`}/>\n            <div className={'testimonial-content'}>\n                <h3 className={'testimonial-quote'}>{localize(testimonial.quote)}</h3>\n                <div>\n                    <p className={'testimonial-name'}>{`${localize(testimonial.name)}, `}<span>{localize(testimonial.title)}</span>\n                    </p>\n                    {testimonial.subtitle && <p className={'testimonial-subtitle'}>{localize(testimonial.subtitle)}</p>}\n                </div>\n            </div>\n            {testimonial.audioFile && (\n                <audio \n                    ref={audioRef}\n                    src={testimonial.audioFile} \n                    controls \n                    controlsList='nodownload noplaybackrate' \n                    className={'testimonial-audio'} \n                />\n            )}\n        </div>\n    )\n}","import React, { useEffect, useRef } from 'react'\nimport './testimonials-section.css'\nimport { TestimonialCard } from './testimonial-card'\n\nexport type Testimonial = {\n    name: string\n    quote: string\n    image: string\n    desktopImage: string\n    title: string\n    audioFile?: string\n}\n\nconst defaultTestimonials: Testimonial[] = [\n    {\n        name: 'Trillium Rose',\n        quote: '“Having a true yardage, that factors in more than just slope is so important. Over 18 holes, that can save 5 or more shots.”',\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/trillium-rose-smart-laser.png',\n        desktopImage: 'https://cdn.arccosgolf.com/images/activation/smart-laser/trillium_rose.png',\n        title: 'Golf Digest Top 50 Teacher in America',\n    },\n    {\n        name: 'Edoardo Molinari',\n        quote: '“My caddie and I thought it was 10 yds. longer, Arccos said 25. We played the “Plays Like number”, hit it to 4ft. We laughed. Arccos was smarter than both of us.”',\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/edoardo-smart-laser.png',\n        desktopImage: 'https://cdn.arccosgolf.com/images/activation/smart-laser/edoardo-smart-laser.png',\n        title: 'European Ryder Cup Vice Captain, Arccos Chief Data Strategist, Titleist Brand Ambassador',\n        audioFile: 'https://cdn.arccosgolf.com/audio/Dodo-Testimonial.mp3'\n    },\n    {\n        name: 'Erika Larkin',\n        quote: '“Smartest rangefinder I’ve ever used. It factors in the environment and sets the pin, for even sharper Arccos stats.”',\n        image: 'https://cdn.arccosgolf.com/images/activation/smart-laser/erika-larkin-smart-laser.png',\n        desktopImage: 'https://cdn.arccosgolf.com/images/activation/smart-laser/erika-larkin.png',\n        title: 'Golf Digest Top 50 Teacher in America',\n    }\n]\n\nexport const TestimonialsSection: React.FC<React.ComponentProps<'div'> & { testimonials?: Testimonial[], title?: string }> = (props) => {\n    const {\n        className,\n        testimonials = defaultTestimonials,\n        title = 'So Out With The Old & In With Arccos',\n        ...restProps\n    } = props\n    const scrollContainerRef = useRef<HTMLDivElement>(null)\n    const [activeIndex, setActiveIndex] = React.useState(0)\n   \n    const scrollToIndex = (index: number) =>\n        scrollContainerRef.current?.scrollTo({\n            left: scrollContainerRef.current.getBoundingClientRect().width * index,\n            behavior: 'smooth',\n        })\n\n    const getVisibleIndex = () => {\n        const scrollContainer = scrollContainerRef.current\n        if (!scrollContainer) return 0\n        const {scrollLeft, clientWidth} = scrollContainer\n        return Math.round(scrollLeft / clientWidth)\n    }\n\n    const handleScroll = () => {\n        if (scrollContainerRef.current) {\n            const { scrollLeft, clientWidth } = scrollContainerRef.current\n            const newIndex = Math.round(scrollLeft / clientWidth)\n            setActiveIndex(newIndex)\n        }\n    }\n\n   // Replace the two separate intervals with one\n    useEffect(() => {\n        const interval = setInterval(() => {\n            const nextIndex = (activeIndex + 1) % testimonials.length\n            setActiveIndex(nextIndex)\n            scrollToIndex(nextIndex)\n        }, 10000)\n        return () => clearInterval(interval)\n    }, [activeIndex])\n\n    useEffect(() => {\n        const scrollContainer = scrollContainerRef.current\n        if (scrollContainer) {\n            scrollContainer.addEventListener('scroll', handleScroll)\n            return () => scrollContainer.removeEventListener('scroll', handleScroll)\n        }\n    }, [])\n\n    return (\n        <section className=\"testimonials-section\">\n            <div className=\"testimonials-container card-carousel\" {...restProps}>\n                <h2 className=\"testimonials-title\">{title}</h2>\n                <div className=\"testimonials-cards card-container\" ref={scrollContainerRef}>\n                    {testimonials.map((testimonial, index) => (\n                        <TestimonialCard key={index} testimonial={testimonial} desktopImage={testimonial.desktopImage} />\n                    ))}\n                </div>\n                <div className=\"testimonials-pagination\">\n                    {testimonials.map((_, index) => (\n                        <button\n                            key={index}\n                            className={`pagination-dot ${index === activeIndex ? 'active' : ''}`}\n                            onClick={() => scrollToIndex(index)}\n                            aria-label={`Go to testimonial ${index + 1}`}\n                        />\n                    ))}\n                </div>\n            </div>\n        </section>\n    )\n}","import React from \"react\";\nimport \"./wrap-up-section.css\";\nimport { scrollToTop } from \"../../nucap-landing-page/nucap-landing-page\";\n\nexport const WrapUpSection: React.FC<{\n  title: string;\n  body: string;\n  cta: string;\n}> = ({ title, body, cta }) => {\n  const handleGetStartedClick = () => {\n    scrollToTop();\n  };\n  return (\n    <section className=\"wrap-up-section\">\n      <div className=\"wrap-up-background\">\n        <div className=\"wrap-up-content\">\n          <div className=\"wrap-up-product-image\">\n            <img\n              src=\"https://cdn.arccosgolf.com/images/activation/alps/LINK-PRO-MOBILE-OPEN.png\"\n              alt=\"Arccos Air device\"\n            />\n          </div>\n          <div className=\"wrap-up-text-content\">\n            <h2 className=\"wrap-up-title\">{title}</h2>\n            <p className=\"wrap-up-description\">{body}</p>\n            <button\n              className=\"wrap-up-cta\"\n              type=\"button\"\n              onClick={handleGetStartedClick}\n            >\n              {cta}\n            </button>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n};\n","import React from \"react\";\nimport { useSubscriptionOptions } from \"../../../data/api/query/offers.mts\";\nimport { useFormatPrice } from \"../../../data/redux/slices/offers/offers-slice.mjs\";\nimport \"./alps-landing-page.css\";\nimport { NucapMainSection as HeroSection } from \"../nucap-landing-page/main-section/nucap-main-section\";\nimport { LinkProSection } from \"./link-pro-section\";\nimport { FeaturesSection } from \"../smart-laser/sections/features-section/features-section\";\nimport { FlippableCardItem } from \"../smart-laser/sections/features-section/features-section\";\nimport { InfoButton } from \"../smart-laser/sections/features-section/features-section\";\nimport { InlineVideoSection } from \"../smart-laser/sections/inline-video-section/inline-video-section\";\nimport { AudioManagerProvider } from \"../smart-laser/audio-manager\";\nimport { SensorLinkComparisonSection } from \"./sensor-link-comparison-section/sensor-link-comparison-section\";\nimport {\n  Testimonial,\n  TestimonialsSection,\n} from \"../smart-laser/sections/testimonials-section/testimonials-section\";\nimport { WrapUpSection } from \"./wrap-up-section/wrap-up-section\";\nimport { SkillestGiveawaySection } from \"../full-content-landing-page/sections/skillest-giveaway/skillest-giveaway\";\n\nexport const AlpsCardBack: React.FC<{\n  text: string;\n  infoButton: React.ReactNode;\n  text2?: string;\n}> = ({ text, infoButton, text2 }) => {\n  return (\n    <div className=\"landing-page-flippable-card-back\">\n      <p>{text}</p>\n      <p>{text2}</p>\n      {infoButton}\n    </div>\n  );\n};\n\nexport const AlpsLandingPage = () => {\n  const options = useSubscriptionOptions();\n  const formatPrice = useFormatPrice();\n\n  const cheapestOption = options\n    .map((option) => option.phases[0]?.items[0]?.charge_amount || 0)\n    .sort((a, b) => a - b)[0];\n\n  const dynamicContentData = {\n    header: {\n      en: \"30-Day FREE Arccos Trial with Arccos Air\",\n    },\n    subheader: {\n      en: \"Track your game to improve faster with just Arccos Air. Smart Sensors not required.\",\n    },\n    subheader_2: {\n      en: `Get Started Today With a FREE Trial - Starting at $299.99.`,\n    },\n    buttonText: {\n      en: \"Get Started\",\n    },\n    email_placeholder: {\n      en: \"Enter your email address\",\n    },\n    mobile_image: \"\",\n    desktop_image: \"\",\n    pga_logo: \"\",\n    background_image_mobile:\n      \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Mobile-Hero.webp\",\n    background_image_desktop:\n      \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-HERO.webp\",\n    background_image_caption: {\n      en: \"Matt Fitzpatrick\",\n    },\n    background_image_subcaption: {\n      en: \"Major Champion & Arccos Ambassador\",\n    },\n  };\n\n  const flippableCards: FlippableCardItem[] = [\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-2Aa.webp\",\n      title: \"Connect\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"Only takes a minute. Probably Less. Simply connect your Arccos Air to the Arccos app and play.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-2Ba.webp\",\n      title: \"Play\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"Keep your clubs exactly as they are. No sensors, no changes, just focus on playing your best.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-2Ca.webp\",\n      title: \"Learn\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"No Smart Sensors doesn’t mean losing insights. You’ll still have access to the full power of Arccos data.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n  ];\n\n  const testimonials: Testimonial[] = [\n    {\n      name: \"Erika Larkin\",\n      quote:\n        \"“Arccos helps my students make better decisions on the course by identifying their weaknesses and strengths.”\",\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ERIKA-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Erika-Desktop.webp\",\n      title: \"Golf Digest Top 50 Teacher in America\",\n    },\n    {\n      name: \"Edoardo Molinari\",\n      quote:\n        \"“Because of Arccos Air, I never miss tracking a round and always know what’s happening in my game.”\",\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/DODO-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/DoDo-Desktop.webp\",\n      title:\n        \"European Ryder Cup Vice Captain, Arccos Chief Data Strategist, Arccos Ambassador\",\n    },\n    {\n      name: \"Matt Fitzpatrick\",\n      quote:\n        \"“Arccos provides me with the perfect strategy so I know exactly what shot to hit in every situation.”\",\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Fitzy-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Fitzy-Desktop.webp\",\n      title: \"Major Champion & Tour Ambassador\",\n    },\n  ];\n\n  return (\n    <AudioManagerProvider>\n      <div className=\"alps-landing-page\">\n        <HeroSection dynamicContentData={dynamicContentData} />\n        <LinkProSection />\n        <FeaturesSection\n          title=\"We Made it Simple & Easy\"\n          subtitle=\"\"\n          flippableCards={flippableCards}\n          features={[]}\n        />\n        <InlineVideoSection\n          title=\"No Distractions, Just Pair & Play\"\n          subtitle=\"Watch how Mike Ballo uses Arccos Air without sensors to play smarter and eliminate any blind spots from his game.\"\n          videoUrl=\"https://cdn.arccosgolf.com/videos/activation/alps/Ballo_Testimonial_v2.mp4\"\n          videoId=\"alps-landing-page-ballo-video\"\n          posterUrl=\"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-3.webp\"\n          overlayTitle=\"Mike Ballo\"\n          overlaySubtitle=\"PGA Professional & Arccos Ambassador\"\n          shouldShowOverlay={true}\n        />\n        <SensorLinkComparisonSection />\n        <InlineVideoSection\n          title=\"I Made the Switch\"\n          subtitle=\"Meet Mario Guerra: Quaker Ridge’s Head Pro and long time Arccos member shares his experience on why he switched to playing without sensors.\"\n          videoUrl=\"https://cdn.arccosgolf.com/videos/activation/alps/Guerra_Testimonial_v2.mp4\"\n          videoId=\"alps-landing-page-guerra-video\"\n          posterUrl=\"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-4.webp\"\n          overlayTitle=\"Mario Guerra\"\n          overlaySubtitle=\"PGA Professional & Arccos Ambassador\"\n          shouldShowOverlay={true}\n        />\n        <TestimonialsSection\n          testimonials={testimonials}\n          title=\"Trusted by the Pros\"\n        />\n        <SkillestGiveawaySection />\n        <WrapUpSection\n          title=\"More Power for Every Moment\"\n          body=\"Harness the many powerful insights and features Arccos has to offer to help you improve your game, even faster.\"\n          cta=\"Get Started\"\n        />\n      </div>\n    </AudioManagerProvider>\n  );\n};\n","import React from \"react\";\nimport { useSubscriptionOptions } from \"../../../data/api/query/offers.mts\";\nimport { useFormatPrice } from \"../../../data/redux/slices/offers/offers-slice.mjs\";\nimport \"./alps-landing-page.css\";\nimport { NucapMainSection as HeroSection } from \"../nucap-landing-page/main-section/nucap-main-section\";\nimport { LinkProSection } from \"./link-pro-section\";\nimport { FeaturesSection } from \"../smart-laser/sections/features-section/features-section\";\nimport { FlippableCardItem } from \"../smart-laser/sections/features-section/features-section\";\nimport { InfoButton } from \"../smart-laser/sections/features-section/features-section\";\nimport { InlineVideoSection } from \"../smart-laser/sections/inline-video-section/inline-video-section\";\nimport { AudioManagerProvider } from \"../smart-laser/audio-manager\";\nimport { SensorLinkComparisonSection } from \"./sensor-link-comparison-section/sensor-link-comparison-section\";\nimport {\n  Testimonial,\n  TestimonialsSection,\n} from \"../smart-laser/sections/testimonials-section/testimonials-section\";\nimport { WrapUpSection } from \"./wrap-up-section/wrap-up-section\";\nimport { SkillestGiveawaySection } from \"../full-content-landing-page/sections/skillest-giveaway/skillest-giveaway\";\nimport { getPartnerFromWindowLocation } from \"../../../util/partner-selectors.mjs\";\n\nexport const AlpsCardBack: React.FC<{\n  text: string;\n  infoButton: React.ReactNode;\n  text2?: string;\n}> = ({ text, infoButton, text2 }) => {\n  return (\n    <div className=\"landing-page-flippable-card-back\">\n      <p>{text}</p>\n      <p>{text2}</p>\n      {infoButton}\n    </div>\n  );\n};\n\nexport const AlpsLandingPageGeneric = () => {\n  const options = useSubscriptionOptions();\n  const formatPrice = useFormatPrice();\n  const partner = getPartnerFromWindowLocation();\n  const isPingOrCobra = partner === \"ping\" || partner === \"cobra\";\n\n  const cheapestOption = options\n    .map((option) => option.phases[0]?.items[0]?.charge_amount || 0)\n    .sort((a, b) => a - b)[0];\n\n  const dynamicContentData = {\n    header: {\n      en: \"30-Day FREE Arccos Trial with Arccos Air\",\n    },\n    subheader: {\n      en: \"Track your game to improve faster with just Arccos Air. Smart Sensors not required.\",\n    },\n    subheader_2: {\n      en: `Get Started Today With a FREE Trial - Starting at $299.99.`,\n    },\n    buttonText: {\n      en: \"Get Started\",\n    },\n    email_placeholder: {\n      en: \"Enter your email address\",\n    },\n    mobile_image: \"\",\n    desktop_image: \"\",\n    pga_logo: \"\",\n    background_image_mobile:\n      \"https://cdn.arccosgolf.com/images/activation/alps/generic/Mobile/Hero - Mobile.webp\",\n    background_image_desktop:\n      \"https://cdn.arccosgolf.com/images/activation/alps/generic/Desktop/Hero - Dektop.webp\",\n    background_image_caption: undefined,\n    background_image_subcaption: undefined,\n  };\n\n  const flippableCards: FlippableCardItem[] = [\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-2Aa.webp\",\n      title: \"Connect\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"Only takes a minute. Probably Less. Simply connect your Arccos Air to the Arccos app and play.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/generic/Desktop/ALPS-Desktop-2B.webp\",\n      title: \"Play\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"Keep your clubs exactly as they are. No sensors, no changes, just focus on playing your best.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n    {\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/generic/Desktop/ALPS-Desktop-2C.webp\",\n      title: \"Learn\",\n      cardBack: (\n        <AlpsCardBack\n          text=\"No Smart Sensors doesn't mean losing insights. You'll still have access to the full power of Arccos data.\"\n          infoButton={<InfoButton rotate />}\n        />\n      ),\n    },\n  ];\n\n  const testimonials: Testimonial[] = [\n    {\n      name: \"Erika Larkin\",\n      quote:\n        '\"Arccos helps my students make better decisions on the course by identifying their weaknesses and strengths.\"',\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/ERIKA-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Erika-Desktop.webp\",\n      title: \"Golf Digest Top 50 Teacher in America\",\n    },\n    {\n      name: \"Edoardo Molinari\",\n      quote: `\"Because of Arccos Air, I never miss tracking a round and always know what's happening in my game.\"`,\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/DODO-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/DoDo-Desktop.webp\",\n      title:\n        \"European Ryder Cup Vice Captain, Arccos Chief Data Strategist, Arccos Ambassador\",\n    },\n    {\n      name: \"Matt Fitzpatrick\",\n      quote:\n        '\"Arccos provides me with the perfect strategy so I know exactly what shot to hit in every situation.\"',\n      image:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Fitzy-Mobile.webp\",\n      desktopImage:\n        \"https://cdn.arccosgolf.com/images/activation/alps/Fitzy-Desktop.webp\",\n      title: \"Major Champion & Tour Ambassador\",\n    },\n  ];\n\n  return (\n    <AudioManagerProvider>\n      <div className=\"alps-landing-page\">\n        <HeroSection dynamicContentData={dynamicContentData} />\n        <LinkProSection />\n        <FeaturesSection\n          title=\"We Made it Simple & Easy\"\n          subtitle=\"\"\n          flippableCards={flippableCards}\n          features={[]}\n        />\n        {!isPingOrCobra && (\n          <InlineVideoSection\n            title=\"I Made the Switch\"\n            subtitle=\"Meet Mario Guerra: Quaker Ridge's Head Pro and long time Arccos member shares his experience on why he switched to playing without sensors.\"\n            videoUrl=\"https://cdn.arccosgolf.com/videos/activation/alps/Guerra_Testimonial_v2.mp4\"\n            videoId=\"alps-landing-page-guerra-video\"\n            posterUrl=\"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-4.webp\"\n            overlayTitle=\"Mario Guerra\"\n            overlaySubtitle=\"PGA Professional & Arccos Ambassador\"\n            shouldShowOverlay={true}\n          />\n        )}\n        <SensorLinkComparisonSection\n          style={isPingOrCobra ? { backgroundColor: \"#F2F2F2\" } : undefined}\n        />\n        <SkillestGiveawaySection\n          style={\n            isPingOrCobra\n              ? { backgroundColor: \"white\" }\n              : { backgroundColor: \"#F2F2F2\" }\n          }\n        />\n        <WrapUpSection\n          title=\"More Power for Every Moment\"\n          body=\"Harness the many powerful insights and features Arccos has to offer to help you improve your game, even faster.\"\n          cta=\"Get Started\"\n        />\n      </div>\n    </AudioManagerProvider>\n  );\n};\n","import React from 'react'\nimport styles from \"./primary-button.module.css\";\n\nexport default function PrimaryButton({\n  children,\n  onClick,\n  href,\n  className,\n  isLoading,\n  ...props\n}: Readonly<{\n  children: React.ReactNode;\n  onClick?: () => void;\n  href?: string;\n  className?: string;\n  isLoading?: boolean;\n}> &\n  React.ButtonHTMLAttributes<HTMLButtonElement> &\n  React.AnchorHTMLAttributes<HTMLAnchorElement>) {\n  const content = (\n    <>\n      <span className={styles.text}>{children}</span>\n      <span className={styles.iconCircle}>\n        <svg\n          width=\"14\"\n          height=\"14\"\n          viewBox=\"0 0 14 14\"\n          fill=\"none\"\n          xmlns=\"http://www.w3.org/2000/svg\"\n          aria-hidden=\"true\"\n        >\n          <path\n            d=\"M1 7h12M8 2l5 5-5 5\"\n            stroke=\"currentColor\"\n            strokeWidth=\"2\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n          />\n        </svg>\n      </span>\n    </>\n  );\n\n  const combinedClassName = `${styles.button}${className ? ` ${className}` : \"\"}${isLoading ? ` ${styles.loading}` : \"\"}`;\n\n  if (href) {\n    return (\n      <a href={href} className={combinedClassName} {...props}>\n        {content}\n      </a>\n    );\n  }\n\n  return (\n    <button onClick={onClick} className={combinedClassName} {...props}>\n      {content}\n    </button>\n  );\n}\n","import React from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport styles from \"./hero-section.module.css\";\nimport PrimaryButton from \"../primary-button/primary-button\";\nimport { Loading } from \"../../../../common-components/loading/loading\";\n\ntype HeroSectionProps = {\n  heroImage: string\n  heroImageMobile?: string\n  email: string\n  onEmailChange: (email: string) => void\n  onSubmit: (e: React.FormEvent) => void\n  isButtonDisabled: boolean\n  isLoading: boolean\n  inputRef?: React.RefObject<HTMLInputElement | null>\n  partner?: string | null\n  isCK14?: boolean;\n  isUsOrCa?: boolean;\n}\n\nexport default function HeroSection({\n  heroImage,\n  heroImageMobile,\n  email,\n  onEmailChange,\n  onSubmit,\n  isButtonDisabled,\n  isLoading,\n  inputRef: externalRef,\n  partner,\n  isCK14,\n  isUsOrCa,\n}: Readonly<HeroSectionProps>) {\n  const internalRef = useRef<HTMLInputElement>(null);\n  const inputRef = externalRef ?? internalRef;\n\n  useEffect(() => {\n    const handleScroll = () => {\n      const input = inputRef.current;\n      if (!input || document.activeElement !== input) return;\n\n      const rect = input.getBoundingClientRect();\n      const isOutOfView = rect.bottom < 0 || rect.top > window.innerHeight;\n\n      if (isOutOfView) {\n        input.blur();\n      }\n    };\n\n    window.addEventListener(\"scroll\", handleScroll, { passive: true });\n    return () => window.removeEventListener(\"scroll\", handleScroll);\n  }, [inputRef]);\n\n  return (\n    <section className={`hero ${styles.hero}${partner ? ` ${styles[`partner-${partner}`] ?? ''}` : ''}${isCK14 && partner !== 'mmg' && partner !== 'titleist' ? ` ${styles.ck14}` : ''}`}>\n      <div\n        className={styles.heroContainer}\n        style={{\n          '--hero-image': `url(${heroImage})`,\n          '--hero-image-mobile': `url(${heroImageMobile ?? heroImage})`,\n        } as React.CSSProperties}\n      >\n        {isCK14 && partner !== 'mmg' && partner !== 'titleist' && (\n          <div className={styles.ambassador}>\n            <p className={styles.ambassadorName}>Matt Fitzpatrick</p>\n            <p className={styles.ambassadorTitle}>\n              U.S. Open Champion<br />\n              &amp; Arccos Ambassador\n            </p>\n          </div>\n        )}\n        <div className={`${styles.heroContent} container max-w-3xl`}>\n         {!isCK14 && <p className={styles.superheader}>AI-Powered Game Tracking</p>}\n         {isCK14 ? <h1 className={styles.heading}>Smarter Golf Starts Here</h1> :<h1 className={styles.heading}>No Sensors. No Phone.<br className=\"sm:hidden\" />{\" \"}Just Golf.</h1>}\n          {isCK14 ? (\n            <>\n              <p className={styles.confidence}>\n                Play with confidence, backed by the best data <br className=\"mobileOnly\" /> in golf. Stop guessing. Start knowing and <br className=\"mobileOnly\" /> shoot lower scores.\n              </p>\n              <p className={styles.emphasis}>\n                {isUsOrCa\n                  ? <>Free trial with Smart Sensors and <br className=\"mobileOnly\" /> Arccos Air included.</>\n                  : \"Free trial with Smart Sensors included.\"}\n              </p>\n            </>\n          ) : (\n            <>\n              <p className={styles.confidence}>\n                Play with confidence, backed by the best data in golf. Stop guessing. Start knowing and shoot lower scores.\n              </p>\n              <p className={styles.emphasis}>\n                Free trial with Arccos Air wearable included.\n              </p>\n            </>\n          )}\n          <form onSubmit={onSubmit} className={styles.inputContainer}>\n            <input\n              ref={inputRef}\n              name=\"email\"\n              type=\"email\"\n              className={styles.input}\n              placeholder=\"Enter email\"\n              autoComplete=\"email\"\n              value={email}\n              onChange={(e) => onEmailChange(e.target.value)}\n            />\n            <PrimaryButton\n              className={`${styles.heroPrimaryCta} alps-next-primary-cta`}\n              disabled={isButtonDisabled}\n              type=\"submit\"\n              isLoading={isLoading}\n            >\n              {isLoading ? (\n                <Loading\n                  color=\"white\"\n                  className={styles.heroButtonLoadingSvg}\n                  svgProps={{ className: styles.heroButtonLoadingSvg }}\n                />\n              ) : (\n                \"Start free trial\"\n              )}\n            </PrimaryButton>\n          </form>\n        </div>\n      </div>\n    </section>\n  );\n}\n","\"use client\"\n\n\nfunction ___$insertStyle(css) {\n    if (!css || typeof window === 'undefined') {\n        return;\n    }\n    const style = document.createElement('style');\n    style.setAttribute('type', 'text/css');\n    style.innerHTML = css;\n    document.head.appendChild(style);\n    return css;\n}\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar React = require('react');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n___$insertStyle(\".rfm-marquee-container {\\n  overflow-x: hidden;\\n  display: flex;\\n  flex-direction: row;\\n  position: relative;\\n  width: var(--width);\\n  transform: var(--transform);\\n}\\n.rfm-marquee-container:hover div {\\n  animation-play-state: var(--pause-on-hover);\\n}\\n.rfm-marquee-container:active div {\\n  animation-play-state: var(--pause-on-click);\\n}\\n\\n.rfm-overlay {\\n  position: absolute;\\n  width: 100%;\\n  height: 100%;\\n}\\n.rfm-overlay::before, .rfm-overlay::after {\\n  background: linear-gradient(to right, var(--gradient-color), rgba(255, 255, 255, 0));\\n  content: \\\"\\\";\\n  height: 100%;\\n  position: absolute;\\n  width: var(--gradient-width);\\n  z-index: 2;\\n  pointer-events: none;\\n  touch-action: none;\\n}\\n.rfm-overlay::after {\\n  right: 0;\\n  top: 0;\\n  transform: rotateZ(180deg);\\n}\\n.rfm-overlay::before {\\n  left: 0;\\n  top: 0;\\n}\\n\\n.rfm-marquee {\\n  flex: 0 0 auto;\\n  min-width: var(--min-width);\\n  z-index: 1;\\n  display: flex;\\n  flex-direction: row;\\n  align-items: center;\\n  animation: scroll var(--duration) linear var(--delay) var(--iteration-count);\\n  animation-play-state: var(--play);\\n  animation-delay: var(--delay);\\n  animation-direction: var(--direction);\\n}\\n@keyframes scroll {\\n  0% {\\n    transform: translateX(0%);\\n  }\\n  100% {\\n    transform: translateX(-100%);\\n  }\\n}\\n\\n.rfm-initial-child-container {\\n  flex: 0 0 auto;\\n  display: flex;\\n  min-width: auto;\\n  flex-direction: row;\\n  align-items: center;\\n}\\n\\n.rfm-child {\\n  transform: var(--transform);\\n}\");\n\nconst Marquee = React.forwardRef(function Marquee({ style = {}, className = \"\", autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = \"left\", speed = 50, delay = 0, loop = 0, gradient = false, gradientColor = \"white\", gradientWidth = 200, onFinish, onCycleComplete, onMount, children, }, ref) {\r\n    // React Hooks\r\n    const [containerWidth, setContainerWidth] = React.useState(0);\r\n    const [marqueeWidth, setMarqueeWidth] = React.useState(0);\r\n    const [multiplier, setMultiplier] = React.useState(1);\r\n    const [isMounted, setIsMounted] = React.useState(false);\r\n    const rootRef = React.useRef(null);\r\n    const containerRef = ref || rootRef;\r\n    const marqueeRef = React.useRef(null);\r\n    // Calculate width of container and marquee and set multiplier\r\n    const calculateWidth = React.useCallback(() => {\r\n        if (marqueeRef.current && containerRef.current) {\r\n            const containerRect = containerRef.current.getBoundingClientRect();\r\n            const marqueeRect = marqueeRef.current.getBoundingClientRect();\r\n            let containerWidth = containerRect.width;\r\n            let marqueeWidth = marqueeRect.width;\r\n            // Swap width and height if direction is up or down\r\n            if (direction === \"up\" || direction === \"down\") {\r\n                containerWidth = containerRect.height;\r\n                marqueeWidth = marqueeRect.height;\r\n            }\r\n            if (autoFill && containerWidth && marqueeWidth) {\r\n                setMultiplier(marqueeWidth < containerWidth\r\n                    ? Math.ceil(containerWidth / marqueeWidth)\r\n                    : 1);\r\n            }\r\n            else {\r\n                setMultiplier(1);\r\n            }\r\n            setContainerWidth(containerWidth);\r\n            setMarqueeWidth(marqueeWidth);\r\n        }\r\n    }, [autoFill, containerRef, direction]);\r\n    // Calculate width and multiplier on mount and on window resize\r\n    React.useEffect(() => {\r\n        if (!isMounted)\r\n            return;\r\n        calculateWidth();\r\n        if (marqueeRef.current && containerRef.current) {\r\n            const resizeObserver = new ResizeObserver(() => calculateWidth());\r\n            resizeObserver.observe(containerRef.current);\r\n            resizeObserver.observe(marqueeRef.current);\r\n            return () => {\r\n                if (!resizeObserver)\r\n                    return;\r\n                resizeObserver.disconnect();\r\n            };\r\n        }\r\n    }, [calculateWidth, containerRef, isMounted]);\r\n    // Recalculate width when children change\r\n    React.useEffect(() => {\r\n        calculateWidth();\r\n    }, [calculateWidth, children]);\r\n    React.useEffect(() => {\r\n        setIsMounted(true);\r\n    }, []);\r\n    // Runs the onMount callback, if it is a function, when Marquee is mounted.\r\n    React.useEffect(() => {\r\n        if (typeof onMount === \"function\") {\r\n            onMount();\r\n        }\r\n    }, []);\r\n    // Animation duration\r\n    const duration = React.useMemo(() => {\r\n        if (autoFill) {\r\n            return (marqueeWidth * multiplier) / speed;\r\n        }\r\n        else {\r\n            return marqueeWidth < containerWidth\r\n                ? containerWidth / speed\r\n                : marqueeWidth / speed;\r\n        }\r\n    }, [autoFill, containerWidth, marqueeWidth, multiplier, speed]);\r\n    const containerStyle = React.useMemo(() => (Object.assign(Object.assign({}, style), { [\"--pause-on-hover\"]: !play || pauseOnHover ? \"paused\" : \"running\", [\"--pause-on-click\"]: !play || (pauseOnHover && !pauseOnClick) || pauseOnClick\r\n            ? \"paused\"\r\n            : \"running\", [\"--width\"]: direction === \"up\" || direction === \"down\" ? `100vh` : \"100%\", [\"--transform\"]: direction === \"up\"\r\n            ? \"rotate(-90deg)\"\r\n            : direction === \"down\"\r\n                ? \"rotate(90deg)\"\r\n                : \"none\" })), [style, play, pauseOnHover, pauseOnClick, direction]);\r\n    const gradientStyle = React.useMemo(() => ({\r\n        [\"--gradient-color\"]: gradientColor,\r\n        [\"--gradient-width\"]: typeof gradientWidth === \"number\"\r\n            ? `${gradientWidth}px`\r\n            : gradientWidth,\r\n    }), [gradientColor, gradientWidth]);\r\n    const marqueeStyle = React.useMemo(() => ({\r\n        [\"--play\"]: play ? \"running\" : \"paused\",\r\n        [\"--direction\"]: direction === \"left\" ? \"normal\" : \"reverse\",\r\n        [\"--duration\"]: `${duration}s`,\r\n        [\"--delay\"]: `${delay}s`,\r\n        [\"--iteration-count\"]: !!loop ? `${loop}` : \"infinite\",\r\n        [\"--min-width\"]: autoFill ? `auto` : \"100%\",\r\n    }), [play, direction, duration, delay, loop, autoFill]);\r\n    const childStyle = React.useMemo(() => ({\r\n        [\"--transform\"]: direction === \"up\"\r\n            ? \"rotate(90deg)\"\r\n            : direction === \"down\"\r\n                ? \"rotate(-90deg)\"\r\n                : \"none\",\r\n    }), [direction]);\r\n    // Render {multiplier} number of children\r\n    const multiplyChildren = React.useCallback((multiplier) => {\r\n        return [\r\n            ...Array(Number.isFinite(multiplier) && multiplier >= 0 ? multiplier : 0),\r\n        ].map((_, i) => (React__default['default'].createElement(React.Fragment, { key: i }, React.Children.map(children, (child) => {\r\n            return (React__default['default'].createElement(\"div\", { style: childStyle, className: \"rfm-child\" }, child));\r\n        }))));\r\n    }, [childStyle, children]);\r\n    return !isMounted ? null : (React__default['default'].createElement(\"div\", { ref: containerRef, style: containerStyle, className: \"rfm-marquee-container \" + className },\r\n        gradient && React__default['default'].createElement(\"div\", { style: gradientStyle, className: \"rfm-overlay\" }),\r\n        React__default['default'].createElement(\"div\", { className: \"rfm-marquee\", style: marqueeStyle, onAnimationIteration: onCycleComplete, onAnimationEnd: onFinish },\r\n            React__default['default'].createElement(\"div\", { className: \"rfm-initial-child-container\", ref: marqueeRef }, React.Children.map(children, (child) => {\r\n                return (React__default['default'].createElement(\"div\", { style: childStyle, className: \"rfm-child\" }, child));\r\n            })),\r\n            multiplyChildren(multiplier - 1)),\r\n        React__default['default'].createElement(\"div\", { className: \"rfm-marquee\", style: marqueeStyle }, multiplyChildren(multiplier))));\r\n});\n\nexports.default = Marquee;\n//# sourceMappingURL=index.js.map\n","import React from 'react'\nimport styles from './marquee-section.module.css'\nimport Marquee from \"react-fast-marquee\";\n\nexport default function MarqueeSection() {\n  return (\n    <section className={styles.partnersMarquee}>\n      <h2 className={styles.marqueeHeading}>Featured in</h2>\n      <Marquee speed={100}>\n        <img\n          srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee@2x.webp 2x\"\n          alt=\"Arccos Partners: Golf Channel, No Laying Up, Forbes, Golfweek, Golf Digest, My Golf Spy, The Wall Street Journal\"\n        />\n        <img\n          srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee@2x.webp 2x\"\n          alt=\"Arccos Partners: Golf Channel, No Laying Up, Forbes, Golfweek, Golf Digest, My Golf Spy, The Wall Street Journal\"\n        />\n        <img\n          srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/partner-marquee@2x.webp 2x\"\n          alt=\"Arccos Partners: Golf Channel, No Laying Up, Forbes, Golfweek, Golf Digest, My Golf Spy, The Wall Street Journal\"\n        />\n      </Marquee>\n    </section>\n  )\n}\n","import React from \"react\";\nimport styles from \"./linkpro-section.module.css\";\n\ntype LinkProSectionProps = {\n  isCK14?: boolean\n}\n\nexport default function LinkProSection({ isCK14 }: Readonly<LinkProSectionProps>) {\n  return (\n    <section className={`${styles.linkPro}${isCK14 ? ` ${styles.ck14}` : ''}`}>\n      <div className={`${styles.linkProSectionWrap}`}>\n        <picture className={styles.linkProImage}>\n          <source\n            srcSet={isCK14\n              ? \"https://cdn.arccosgolf.com/images/activation/ck14/air_sensor1x.webp 1x, https://cdn.arccosgolf.com/images/activation/ck14/air_sensor.webp 2x\"\n              : \"https://cdn.arccosgolf.com/images/activation/alps-bc/linkpro.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/linkpro@2x.webp 2x\"\n            }\n            type=\"image/webp\"\n          />\n          <img\n            src={isCK14\n              ? \"https://cdn.arccosgolf.com/images/activation/ck14/air_sensor1x.webp\"\n              : \"https://cdn.arccosgolf.com/images/activation/alps-bc/linkpro.webp\"\n            }\n            alt=\"Arccos Air AI Wearable\"\n          />\n        </picture>\n        <div className={styles.contentWrap}>\n          <p className={styles.superheader}>Arccos Air Wearable</p>\n          {isCK14\n            ? <h3>Game Tracking with<br />No Phone Required</h3>\n            : <h3>AI Built on 1.5 Billion Shots</h3>\n          }\n          {isCK14 ? (\n            <p className={styles.ck14Body}>Smaller and lighter than an AirPods case. Carry it in your pocket. Pairs with your Smart Sensors. Wireless charging case<br className=\"mobileOnly\" /> included<br className=\"desktopOnly\" /> (12 rounds battery life).</p>\n          ) : (\n            <p className=\"text-center\">\n              Smaller and lighter than your AirPods. Carry it in any pocket.<br className=\"desktopOnly\" />\n              {\" \"}It&apos;s all you need to seamlessly track every shot.\n            </p>\n          )}\n          <picture className={styles.pgaTourImage}>\n            <source\n              srcSet=\"https://cdn.arccosgolf.com/images/activation/ck14/pga-tour1x.webp 1x, https://cdn.arccosgolf.com/images/activation/ck14/pga-tour2x.webp 2x\"\n              type=\"image/webp\"\n            />\n            <img\n              src=\"https://cdn.arccosgolf.com/images/activation/ck14/pga-tour2x.webp\"\n              alt=\"Official Game Tracker of the PGA Tour\"\n            />\n          </picture>\n        </div>\n      </div>\n    </section>\n  );\n}\n","import React from \"react\";\nimport styles from \"./caption-card.module.css\";\n\nexport type CaptionData = {\n  imageSrc: string;\n  caption: string;\n  captionMaxWidth?: string;\n  imagePosition?: string;\n  imageSize?: string;\n  title?: React.ReactNode;\n  className?: string;\n};\n\nexport function CaptionCard({\n  imageSrc,\n  caption,\n  captionMaxWidth = \"80%\",\n  imagePosition = \"center\",\n  imageSize = \"cover\",\n  title,\n  className,\n}: Readonly<CaptionData>) {\n  return (\n    <figure\n      className={`${styles.card}${className ? ` ${className}` : ''}`}\n      style={{\n        backgroundImage: `url(${imageSrc})`,\n        backgroundPosition: imagePosition,\n        backgroundSize: imageSize,\n      }}\n    >\n      {title && <div className={styles.cardTitle}>{title}</div>}\n      {caption && (\n        <figcaption\n          className={styles.caption}\n          style={{ maxWidth: captionMaxWidth }}\n        >\n          {caption}\n        </figcaption>\n      )}\n    </figure>\n  );\n}\n","import React from \"react\";\nimport styles from \"./captions-section.module.css\";\nimport {CaptionData, CaptionCard} from \"../caption-card/caption-card\";\nimport { getStatsigUserCountry } from \"../../../../../data/initial-state/intial-state-accessors.mjs\";\n\nconst getCaptions = (partner?: string | null): CaptionData[] => [\n  {\n    imageSrc:\n      \"https://cdn.arccosgolf.com/images/activation/alps-bc/arccos-bandon.webp\",\n    caption: \"Connect to the Arccos app and place Arccos Air in any pocket.\",\n    captionMaxWidth: \"75%\",\n  },\n  {\n    imageSrc:\n      \"https://cdn.arccosgolf.com/images/activation/alps-bc/fitz-8i.webp\",\n    caption: \"Experience seamless GPS data capture for every shot.\",\n    captionMaxWidth: \"66%\",\n  },\n  {\n    imageSrc:\n      partner === \"titleist\"\n        ? \"https://cdn.arccosgolf.com/images/activation/alps-bc/fitz-titleist-testimonial.webp\"\n        : \"https://cdn.arccosgolf.com/images/activation/alps-bc/am.webp\",\n    caption: \"Know your game and precisely what to work on.\",\n    captionMaxWidth: \"66%\",\n  },\n];\n\nconst getCk14Captions = (showGreenMaps: boolean): CaptionData[] => [\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/ck14/ck14_1.webp\",\n    caption: \"\",\n    title: \"Automatic Game Tracking\",\n  },\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/ck14/ck14_2.webp\",\n    caption: \"\",\n    title: \"Smart Club Distances\",\n  },\n  {\n    imageSrc: showGreenMaps ? \"https://cdn.arccosgolf.com/images/activation/ck14/ck14_3_greenmap.webp\":  \"https://cdn.arccosgolf.com/images/activation/ck14/ck14_3.png\",\n    caption: \"\",\n    title: showGreenMaps ? <>AI Strategy &amp;<br />Green Maps</> : \"AI Strategy\",\n  },\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/ck14/ck14_4.webp\",\n    caption: \"\",\n    title: \"Strokes Gained Analytics\",\n  },\n];\n\ntype CaptionsSectionProps = {\n  partner?: string | null\n  isCK14?: boolean\n}\n\nexport default function CaptionsSection({ partner, isCK14 }: Readonly<CaptionsSectionProps>) {\n  const country = getStatsigUserCountry()\n  const isAltBg = country === 'US' || country === 'CA'\n  const captions = isCK14 ? getCk14Captions(isAltBg) : getCaptions(partner)\n\n  return (\n    <section className={`${styles.captionCards}${isCK14 ? ` ${styles.ck14}` : ''}${isAltBg ? ` ${styles.altBg}` : ''}`}>\n      <div className={styles.captionCardsContentWrap}>\n        <h3 className={`${styles.sectionHeading}${isCK14 ? '' : ' max-w-[60%] m-auto'}`}>\n          {isCK14 ? <>Everything You Need<br className=\"sm:hidden\" /> to Improve Faster</> : ' Just Pair Arccos Air and Go Play'}\n        </h3>\n        <div className={styles.captionCardsContainer}>\n          {captions.map((captionData, index) => (\n            <CaptionCard key={index} {...captionData} className={isCK14 ? styles.ck14Card : undefined} />\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n","import React from \"react\";\nimport styles from \"./pre-footer-section.module.css\";\n\ninterface PreFooterProps {\n  isCK14?: boolean;\n}\n\nexport default function PreFooter({ isCK14 }: PreFooterProps) {\n  return (\n    <section\n      className={`${styles.preFooter}${isCK14 ? ` ${styles.ck14}` : \"\"}`}\n    >\n      <div className={styles.sectionWrap}>\n        <div className={styles.contentWrap}>\n          <h3>\n            Turn Your Data Into\n            <br className=\"sm:hidden\" /> Lower Scores\n          </h3>\n          <p className={`md:w-[90%]${isCK14 ? ` ${styles.ck14MobilePreLine}` : \"\"}`}>\n            {isCK14\n              ? \"Join hundreds of thousands of golfers worldwide by harnessing the power of Arccos intelligence, based on 1.5 billion \\nshots and counting.\"\n              : \"See where you’re losing strokes. Know what to work on. Make smarter decisions on the course.\"}\n          </p>\n          <p className={isCK14 ? styles.ck14MobilePreLine : undefined}>\n            {isCK14\n              ? \"See where you’re losing strokes. Know what to work on. Make smarter decisions \\nabout your game.\"\n              : \"That's the power of real-world intelligence fueled by golf's richest dataset: 1.5 billion shots and counting.\"}\n          </p>\n     {!isCK14 &&     <div className={styles.closing}>\n            <p>Start your free trial with Arccos Air.</p>\n            {!isCK14 && <p>No phone. No sensors.</p>}\n            <p>Cancel any time.</p>\n          </div>}\n        </div>\n        {!isCK14 && (\n          <div className={styles.imageWrap}>\n            <picture className={styles.linkProInfographic}>\n              <source\n                srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/air-case.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/air-case@2x.webp 2x\"\n                type=\"image/webp\"\n              />\n              <img\n                src=\"https://cdn.arccosgolf.com/images/activation/alps-bc/air-case.webp\"\n                alt=\"Arccos Air and Charging Case\"\n              />\n            </picture>\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n","\"use client\";\n\nimport React, { useEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport PrimaryButton from \"../primary-button/primary-button\";\nimport styles from \"./floating-primary-cta.module.css\";\n\nexport default function FloatingPrimaryCTA({\n  children,\n  heroSelector = \".hero\",\n  onClick,\n  href,\n}: Readonly<{\n  children: React.ReactNode;\n  heroSelector?: string;\n  onClick?: () => void;\n  href?: string;\n}>) {\n  const [isVisible, setIsVisible] = useState(false);\n  const [isMounted, setIsMounted] = useState(false);\n\n  useEffect(() => {\n    setIsMounted(true);\n  }, []);\n\n  useEffect(() => {\n    const handleScroll = () => {\n      const hero = document.querySelector(heroSelector);\n      if (!hero) {\n        setIsVisible(false);\n        return;\n      }\n\n      const heroRect = hero.getBoundingClientRect();\n      const heroHeight = heroRect.height;\n      const heroVisibleHeight = Math.max(0, heroRect.bottom);\n      const percentVisible = heroVisibleHeight / heroHeight;\n\n      // Show floating CTA when hero is more than 50% scrolled out of view\n      setIsVisible(percentVisible < 0.5);\n    };\n\n    window.addEventListener(\"scroll\", handleScroll, { passive: true });\n    handleScroll();\n\n    return () => window.removeEventListener(\"scroll\", handleScroll);\n  }, [heroSelector]);\n\n  const content = (\n    <div className={`${styles.floatingContainer} ${isVisible ? styles.visible : \"\"}`}>\n      <PrimaryButton onClick={onClick} href={href}>\n        {children}\n      </PrimaryButton>\n    </div>\n  );\n\n  // Use portal to render outside of any transformed ancestors\n  if (!isMounted) {\n    return null;\n  }\n\n  return createPortal(content, document.body);\n}\n","import React from \"react\";\nimport styles from \"./testimonial-card.module.css\";\n\nexport interface TestimonialCardData {\n  imageSrc: string;\n  imagePosition?: \"left\" | \"right\";\n  quote: string;\n  name: string;\n  title: React.ReactNode;\n  isCK14?: boolean;\n}\n\nexport function TestimonialCard({\n  imageSrc,\n  imagePosition = \"left\",\n  quote,\n  name,\n  title,\n  isCK14 = false,\n}: Readonly<TestimonialCardData>) {\n  return (\n    <div\n      className={`${styles.card} ${imagePosition === \"right\" ? styles.imageRight : \"\"} ${isCK14 ? styles.ck14 : \"\"}`}\n    >\n      <div className={styles.imageContainer}>\n        <img src={imageSrc} alt={name} className={styles.image} />\n      </div>\n      <div className={styles.content}>\n        <blockquote className={styles.quote}>“{quote}”</blockquote>\n        <p className={styles.name}>{name}</p>\n        <p className={styles.title}>{title}</p>\n      </div>\n    </div>\n  );\n}\n","import React from \"react\";\nimport styles from \"./pros-section.module.css\";\nimport {\n  TestimonialCard,\n  TestimonialCardData,\n} from \"../testimonial-card/testimonial-card\";\n\nconst getTestimonials = (partner?: string | null): TestimonialCardData[] => [\n  {\n    imageSrc:\n      partner === \"titleist\"\n        ? \"https://cdn.arccosgolf.com/images/activation/alps-bc/eduardo@2x.webp\"\n        : \"https://cdn.arccosgolf.com/images/activation/alps-bc/dodo-affiliate@2x.webp\",\n    imagePosition: \"left\",\n    quote:\n      \"Because of Arccos Air, I never miss tracking a round and always know what’s happening in my game.\",\n    name: \"Edoardo Molinari\",\n    title:\n      partner === \"titleist\" ? (\n        <>\n          Ryder Cup Vice Captain,\n          <br /> Titleist Brand Ambassador &amp;\n          <br /> Arccos Chief Data Strategist\n        </>\n      ) : (\n        <>\n          Ryder Cup Vice Captain\n          <br />\n          Arccos Chief Data Strategist\n        </>\n      ),\n  },\n  {\n    imageSrc:\n      \"https://cdn.arccosgolf.com/images/activation/alps-bc/fitzy@2x.webp\",\n    imagePosition: \"right\",\n    quote:\n      \"Arccos provides me with the perfect strategy so I know exactly what shot to hit in every situation.\",\n    name: \"Matt Fitzpatrick\",\n    title:\n      partner === \"titleist\" ? (\n        <>\n          Major Champion,\n          <br /> Titleist Golf Ball Player &amp;\n          <br /> Arccos Tour Ambassador\n        </>\n      ) : (\n        <>\n          Major Champion\n          <br />\n          Tour Ambassador\n        </>\n      ),\n  },\n  partner === \"titleist\"\n    ? {\n        imageSrc:\n          \"https://cdn.arccosgolf.com/images/activation/alps-bc/trillium-titleist-testimonial@2x.webp\",\n        imagePosition: \"left\" as const,\n        quote:\n          \"Arccos helps you play smarter, making every round more fun and every practice session more focused.\",\n        name: \"Trillium Rose\",\n        title: (\n          <>\n            Golf Digest Top 50 Teacher,\n            <br /> Titleist Staff Professional &amp;\n            <br /> Arccos Ambassador\n          </>\n        ),\n      }\n    : partner === \"mmg\"\n    ? {\n        imageSrc:\n          \"https://cdn.arccosgolf.com/images/activation/mmg/andy_proudman.webp\",\n        imagePosition: \"left\" as const,\n        quote:\n          \"Arccos' powerful analytics with Me And My Golf’s coaching plans will accelerate your improvements\",\n        name: \"Andy Proudman\",\n        title: (\n          <>\n            Me And My Golf Co-founder\n          </>\n        ),\n      } : {\n        imageSrc:\n          \"https://cdn.arccosgolf.com/images/activation/alps-bc/erika@2x.webp\",\n        imagePosition: \"left\" as const,\n        quote:\n          \"Arccos helps my students make better decisions on the course by identifying their weaknesses and strengths.\",\n        name: \"Erika Larkin\",\n        title: (\n          <>\n            Golf Digest Top 50 Teacher\n            <br />\n            Arccos Ambassador\n          </>\n        ),\n      },\n];\n\nconst getCk14Testimonials = (): TestimonialCardData[] => [\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/alps-bc/fitzy@2x.webp\",\n    imagePosition: \"left\",\n    quote: \"Arccos provides me with the perfect strategy so I know exactly what shot to hit in every\\u00A0situation.\",\n    name: \"Matt Fitzpatrick\",\n    title: <>U.S. Open Champion<br />&amp; Arccos Ambassador</>,\n  },\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/alps-bc/dodo-affiliate@2x.webp\",\n    imagePosition: \"right\",\n    quote: \"I never miss tracking a round and always know what's happening in my game.\",\n    name: \"Edoardo Molinari\",\n    title: <>Ryder Cup Vice Captain<br />&amp; Arccos Chief Data Strategist</>,\n  },\n  {\n    imageSrc: \"https://cdn.arccosgolf.com/images/activation/alps-bc/erika@2x.webp\",\n    imagePosition: \"left\",\n    quote: \"Arccos helps my students make better decisions on the course by identifying their weaknesses and\\u00A0strengths.\",\n    name: \"Erika Larkin\",\n    title: <>Golf Digest Top 50 Teacher<br />&amp; Arccos Ambassador</>,\n  },\n]\n\ntype ProsSectionProps = {\n  partner?: string | null\n  isCK14?: boolean\n}\n\nexport default function ProsSection({ partner, isCK14 }: Readonly<ProsSectionProps>) {\n  const testimonials = isCK14 && partner !== 'mmg' ? getCk14Testimonials() : getTestimonials(partner)\n\n  return (\n    <section className={styles.prosSection}>\n      <h3>Trusted by the Pros</h3>\n      <div className={styles.prosCardContainer}>\n        {testimonials.map((testimonial, index) => (\n          <TestimonialCard key={index} {...testimonial} isCK14={isCK14} />\n        ))}\n      </div>\n    </section>\n  );\n}\n","export default \"__VITE_ASSET__IHvsLUlO__\"","import React, { useState, useRef, useEffect, isValidElement, cloneElement } from 'react'\nimport styles from './member-spotlight.module.css'\nimport customPlayButton from './custom-playbutton.svg'\n\ninterface MemberSpotlightProps {\n  media: React.ReactElement\n  memberName: string\n  memberTitle: React.ReactNode\n  anchorName?: string\n  shouldShowOverlay?: boolean\n  isCK14?: boolean\n  altBackground?: boolean\n  children: React.ReactNode\n}\n\nexport const MemberSpotlight: React.FC<MemberSpotlightProps> = ({\n  media,\n  memberName,\n  memberTitle,\n  anchorName,\n  shouldShowOverlay = false,\n  isCK14 = false,\n  altBackground = false,\n  children,\n}) => {\n  const [isPlaying, setIsPlaying] = useState(false)\n  const videoRef = useRef<HTMLVideoElement>(null)\n\n  // Check if the media is a video element\n  const isVideoChild = isValidElement(media) && media.type === 'video'\n\n  const handlePlayClick = () => {\n    if (videoRef.current) {\n      videoRef.current.play()\n      setIsPlaying(true)\n    }\n  }\n\n  useEffect(() => {\n    const video = videoRef.current\n    if (video) {\n      const handleEnded = () => {\n        setIsPlaying(false)\n        video.currentTime = 0\n        video.load()\n      }\n      const handlePause = () => setIsPlaying(false)\n      video.addEventListener('ended', handleEnded)\n      video.addEventListener('pause', handlePause)\n\n      return () => {\n        video.removeEventListener('ended', handleEnded)\n        video.removeEventListener('pause', handlePause)\n      }\n    }\n  }, [])\n\n  // Clone video element with ref if it's a video\n  const renderMedia = () => {\n    if (isVideoChild && isValidElement<React.VideoHTMLAttributes<HTMLVideoElement>>(media)) {\n      return cloneElement(media, {\n        ref: videoRef,\n        controls: isPlaying,\n      } as React.VideoHTMLAttributes<HTMLVideoElement> & { ref: React.Ref<HTMLVideoElement> })\n    }\n    return media\n  }\n\n  return (\n    <section className={`${styles.sectionWrapper}${isCK14 ? ` ${styles.ck14}` : ''}${altBackground ? ` ${styles.altBg}` : ''}`}>\n      <div className={styles.memberSpotlight}>\n        <div className={styles.contentContainer}>\n          {children}\n          {isCK14 && (\n            <div className={styles.memberInfoInline}>\n              <span className={styles.memberName}>{memberName}</span>\n              <span className={styles.memberTitle}>{memberTitle}</span>\n            </div>\n          )}\n        </div>\n        <div className={`${styles.mediaContainer} ${isPlaying ? styles.playing : ''}`} style={{ anchorName: `--${anchorName}` } as React.CSSProperties}>\n          {renderMedia()}\n          {isVideoChild && !isPlaying && (\n            <div className={`${styles.videoOverlayContainer} ${shouldShowOverlay ? '' : styles.transparent}`}>\n              <button className={styles.customPlayButton} onClick={handlePlayClick}>\n                <img src={customPlayButton} alt=\"Play video\" />\n              </button>\n            </div>\n          )}\n          {!isCK14 && (!isVideoChild || !isPlaying) && (\n            <div className={styles.memberInfo} style={{ positionAnchor: `--${anchorName}` } as React.CSSProperties}>\n              <span className={styles.memberName}>{memberName}</span>\n              <span className={styles.memberTitle}>{memberTitle}</span>\n            </div>\n          )}\n        </div>\n      </div>\n    </section>\n  )\n}\n","export const AIR_TITLE = 'Try Arccos Golf Free | AI Shot Tracking & GPS'\nexport const AIR_META_DESCRIPTION = 'Start your Arccos free trial and track every golf shot automatically. AI strategy, strokes gained analytics and GPS powered by 1.5 billion shots.'\nexport const AIR_CANONICAL_URL = 'https://activate.arccosgolf.com'\n","import React from \"react\";\n\nexport const CK14_SPOTLIGHT_CONFIG = {\n  soly: {\n    media: (\n      <video\n        src=\"https://cdn.arccosgolf.com/videos/activation/ck14/own_it.mp4\"\n        controls\n        id=\"ck14-spotlight-video\"\n        poster=\"https://cdn.arccosgolf.com/images/activation/ck14/soly_preview.webp\"\n      />\n    ),\n    memberName: 'Chris \"Soly\" Solomon',\n    memberTitle: <>Co-Founder of No Laying Up<br />&amp; Arccos Ambassador</>,\n    anchorName: \"ck14-spotlight-video\",\n    heading: (\n      <h2>\n        &ldquo;Arccos doesn&rsquo;t tell you how to hit the shot – it helps you\n        make better&nbsp;choices.&rdquo;\n      </h2>\n    ),\n    description: null as React.ReactNode,\n  },\n  tony: {\n    media: (\n      <video\n        src=\"https://cdn.arccosgolf.com/videos/activation/ck14/tony_lee.mp4\"\n        controls\n        id=\"ck14-tony-lee-video\"\n        poster=\"https://cdn.arccosgolf.com/images/activation/alps-bc/tony@2x.webp\"\n      />\n    ),\n    memberName: \"Tony Lee\",\n    memberTitle: \"Arccos Member\",\n    anchorName: \"ck14-tony-lee-video\",\n    heading: <h2>From 10 Handicap <span style={{ whiteSpace: 'nowrap' }}>to Scratch</span></h2>,\n    description: (\n      <p>\n        &ldquo;I was struggling to break 80. Using Arccos I got my handicap\n        down to 0.9. Now, I&rsquo;m playing with&nbsp;purpose.&rdquo;\n      </p>\n    ),\n  },\n};\n\nexport const SPOTLIGHT_CONFIGS = {\n  titleist: {\n    media: (\n      <video\n        src=\"https://cdn.arccosgolf.com/videos/activation/alps/Ballo_Testimonial_v2.mp4\"\n        controls\n        id=\"ballo-video\"\n        poster=\"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-3.webp\"\n      />\n    ),\n    memberName: \"Mike Ballo\",\n    memberTitle: \"Titleist Staff Professional & Arccos Ambassador\",\n    anchorName: \"ballo-video\",\n    heading: <h2>\"I just put Arccos Air in my pocket and play.\"</h2>,\n    description: (\n      <p>Hear why PGA Professional Mike Ballo trusts Arccos to help him win.</p>\n    ),\n  },\n  default: {\n    media: (\n      <video\n        src=\"https://cdn.arccosgolf.com/videos/activation/alps/Guerra_Testimonial_v2.mp4\"\n        controls\n        id=\"mario-video\"\n        poster=\"https://cdn.arccosgolf.com/images/activation/alps/ALPS-Desktop-4.webp\"\n      />\n    ),\n    memberName: \"Mario Guerra\",\n    memberTitle: \"PGA Professional & Arccos Ambassador\",\n    anchorName: \"mario-video\",\n    heading: (\n      <h2>\n        {\"\\u201CIt\\u2019s so easy.\\u00A0\"}\n        <br />\n        {\" I just play golf.\\u201D\"}\n      </h2>\n    ),\n    description: (\n      <p>\n        Hear why PGA Professional Mario Guerra\n        <br className={\"desktopOnly\"} /> won't compete without Arccos Air.\n      </p>\n    ),\n  },\n} as const;\n\nexport const getSpotlightConfig = (partner: string | null) =>\n  SPOTLIGHT_CONFIGS[partner as keyof typeof SPOTLIGHT_CONFIGS] ??\n  SPOTLIGHT_CONFIGS.default;\n","import React, { useState } from \"react\";\nimport styles from \"./faq-section.module.css\";\nimport { getIsUsOrCa } from \"../../../../../data/initial-state/intial-state-accessors.mjs\";\n\ntype FaqItem = {\n  question: string;\n  answer: string;\n};\n\nconst FAQS: FaqItem[] = [\n  {\n    question: \"I thought Arccos required sensors on my clubs?\",\n    answer:\n      \"Not anymore. With Arccos Air, there are no sensors required. Just carry the small wearable device in your pocket or clip it to your belt and play — no sensors and no phone required during your round. After you finish, your data and insights are ready in the Arccos app.\",\n  },\n  {\n    question: \"How does Arccos Air know what club I hit?\",\n    answer:\n      \"Arccos Air automatically tracks the location, type and terrain of every shot you hit – everything needed for strokes gained analytics. Golfers who want the richest club-level analysis can choose between two play settings:\\n\\n1. User Club ID – After your round, use our one-click review interface to quickly select the club for each shot. It takes about 2 seconds per shot.\\n\\n2. Smart Club ID – Our algorithm automatically assigns a club to each shot based on factors like your driving distance, clubs in your bag and skill level. After the round, you can make any adjustments using the same one-click interface.\\n\\nMost golfers review and confirm their round in about 3 minutes.\",\n  },\n  {\n    question: \"How does the Arccos Air free trial work?\",\n    answer:\n      \"Start your Arccos trial today and receive the Arccos Air wearable. Seamlessly track your rounds for 30 days.\\n\\nCancel anytime during the trial.\",\n  },\n  {\n    question: \"Do I need a credit card to start the trial?\",\n    answer:\n      \"Yes. A credit card is required to cover shipping. You will not be charged for membership unless you continue after the trial period.\",\n  },\n  {\n    question: \"What does Arccos track during a round?\",\n    answer:\n      \"Arccos automatically and accurately records every shot you take using GPS. For the most powerful insights, review your data post round to confirm shot and hole locations. The entire process takes ~3 minutes.\",\n  },\n  {\n    question: \"Do I need my phone while playing?\",\n    answer:\n      \"No. The Arccos Air wearable allows you to track shots automatically without needing to carry your phone while you play your round.\",\n  },\n  {\n    question: \"How does AI Strategy work?\",\n    answer:\n      \"AI Strategy is built using models developed by Edoardo Molinari, Arccos Chief Data Strategist, that are trusted  each week by Arccos clients on the PGA TOUR, including major champions and FedExCup winners like Matt Fitzpatrick and Viktor Hovland. AI Strategy uses your shot data and dispersion patterns, real-time weather, hole locations and more to show your ideal target line, aim point and club selection, along with personalized outcome predictions. Where applicable, it also relies on LiDAR green maps which Arccos offers for ~10,000 courses.\",\n  },\n  {\n    question: \"How quickly will I see insights about my game?\",\n    answer:\n      \"Most golfers begin seeing meaningful insights after just 2–3 rounds, including which parts of their game are costing the most strokes and where the greatest improvement opportunities lie.\",\n  },\n  {\n    question: \"Can I cancel before the trial ends?\",\n    answer:\n      \"Yes. You can cancel anytime during the trial period and you will not be charged for membership. If you cancel, you will need to return the Arccos Air within 60 days.\",\n  },\n];\n  \nexport const CK14_INTL_FAQS: FaqItem[] = [\n  {\n    question: \"How does the Arccos Free Trial Work?\",\n    answer:\n      \"Start your Arccos trial today and we ship you a set of Smart Sensors. Seamlessly track your rounds for 45 days. Cancel anytime during the trial.\",\n  },\n  {\n    question: \"Do I need a credit card to start the trial?\",\n    answer:\n      \"Yes. A credit card is required to cover shipping. You will not be charged for membership unless you continue after the trial period.\",\n  },\n  {\n    question: \"What does Arccos track during a round?\",\n    answer:\n      \"Arccos automatically and accurately records every shot you take using GPS and sensors. For the most powerful insights, review your data post round to confirm shot and hole locations. The entire process takes ~3 minutes.\",\n  },\n  {\n    question: \"Do I need my phone while playing?\",\n    answer:\n      \"No. You have the option to purchase the Arccos Air wearable, which allows you to track shots automatically without needing to carry your phone while you play your round.\",\n  },\n  {\n    question: \"How does AI Strategy work?\",\n    answer:\n      \"AI Strategy is built using models developed by Edoardo Molinari, Arccos Chief Data Strategist, that are trusted  each week by Arccos clients on the PGA TOUR, including major champions and FedExCup winners like Matt Fitzpatrick and Viktor Hovland. AI Strategy uses your shot data and dispersion patterns, real-time weather, hole locations and more to show your ideal target line, aim point and club selection, along with personalized outcome predictions. Where applicable, it also relies on LiDAR green maps which Arccos offers for ~10,000 courses.\",\n  },\n  {\n    question: \"How quickly will I see insights about my game?\",\n    answer:\n      \"Most golfers begin seeing meaningful insights after just 2–3 rounds, including which parts of their game are costing the most strokes and where the greatest improvement opportunities lie.\",\n  },\n  {\n    question: \"Can I cancel before the trial ends?\",\n    answer:\n      \"Yes. You can cancel anytime during the trial period and you will not be charged for membership.\",\n  },\n];\n\nexport const CK14_FAQS: FaqItem[] = [\n  {\n    question: \"How does the Arccos Free Trial Work?\",\n    answer:\n      \"Start your Arccos trial today and receive sensors and the Arccos Air wearable. Seamlessly track your rounds for 45 days. Cancel anytime during the trial.\",\n  },\n  {\n    question: \"Do I need a credit card to start the trial?\",\n    answer:\n      \"Yes. A credit card is required to cover shipping. You will not be charged for membership unless you continue after the trial period.\",\n  },\n  {\n    question: \"What does Arccos track during a round?\",\n    answer:\n      \"Arccos automatically and accurately records every shot you take using GPS and sensors. For the most powerful insights, review your data post round to confirm shot and hole locations. The entire process takes ~3 minutes.\",\n  },\n  {\n    question: \"Do I need my phone while playing?\",\n    answer:\n      \"No. The Arccos Air wearable allows you to track shots automatically without needing to carry your phone while you play your round.\",\n  },\n  {\n    question: \"How does AI Strategy work?\",\n    answer:\n      \"AI Strategy is built using models developed by Edoardo Molinari, Arccos Chief Data Strategist, that are trusted each week by Arccos clients on the PGA TOUR, including major champions and FedExCup winners like Matt Fitzpatrick and Viktor Hovland. AI Strategy uses your shot data and dispersion patterns, real-time weather, hole locations and more to show your ideal target line, aim point and club selection, along with personalized outcome predictions. Where applicable, it also relies on LiDAR green maps which Arccos offers for ~10,000 courses.\",\n  },\n  {\n    question: \"How quickly will I see insights about my game?\",\n    answer:\n      \"Most golfers begin seeing meaningful insights after just 2–3 rounds, including which parts of their game are costing the most strokes and where the greatest improvement opportunities lie.\",\n  },\n  {\n    question: \"Can I cancel before the trial ends?\",\n    answer:\n      \"Yes. You can cancel anytime during the trial period and you will not be charged for membership. If you cancel, you will need to return the Arccos Air within 60 days.\",\n  },\n];\n\ntype FaqSectionProps = {\n  isCK14?: boolean;\n};\n\nexport default function FaqSection({ isCK14 = false }: FaqSectionProps) {\n  const isUsOrCa = getIsUsOrCa();\n  const faqs = isCK14 ? (isUsOrCa ? CK14_FAQS : CK14_INTL_FAQS) : FAQS;\n  const [openIndex, setOpenIndex] = useState<number>(0);\n\n  return (\n    <section className={styles.faqSection}>\n      <div className={styles.faqWrap}>\n        <h2 className={styles.heading}>FAQs</h2>\n        <ul className={styles.list}>\n          {faqs.map((faq, index) => {\n            const isOpen = openIndex === index;\n            return (\n              <li key={index} className={styles.item}>\n                <button\n                  className={styles.question}\n                  onClick={() => setOpenIndex(isOpen ? -1 : index)}\n                  aria-expanded={isOpen}\n                >\n                  <span>{faq.question}</span>\n                  <span className={styles.icon}>\n                    <svg\n                      width=\"24\"\n                      height=\"24\"\n                      viewBox=\"0 0 24 24\"\n                      fill=\"none\"\n                      aria-hidden=\"true\"\n                    >\n                      <path\n                        d=\"M4 12H20\"\n                        stroke=\"#1a1a1a\"\n                        strokeWidth=\"1.5\"\n                        strokeLinecap=\"square\"\n                      />\n                      <path\n                        d=\"M12 4V20\"\n                        stroke=\"#1a1a1a\"\n                        strokeWidth=\"1.5\"\n                        strokeLinecap=\"square\"\n                        className={`${styles.iconVertical} ${isOpen ? styles.iconVerticalHidden : \"\"}`}\n                      />\n                    </svg>\n                  </span>\n                </button>\n                <div\n                  className={`${styles.answerWrapper} ${isOpen ? styles.answerOpen : \"\"}`}\n                >\n                  <div className={styles.answerInner}>\n                    {faq.answer.split(\"\\n\\n\").map((paragraph, i) => (\n                      <p key={i} className={styles.answer}>\n                        {paragraph}\n                      </p>\n                    ))}\n                  </div>\n                </div>\n                <div className={styles.divider} />\n              </li>\n            );\n          })}\n        </ul>\n      </div>\n    </section>\n  );\n}\n","import \"./alps-next.css\";\nimport React, { useCallback, useRef, useState } from \"react\";\nimport HeroSection from \"./components/hero-section/hero-section\";\nimport MarqueeSection from \"./components/marquee-section/marquee-section\";\nimport LinkProSection from \"./components/linkpro-section/linkpro-section\";\nimport CaptionsSection from \"./components/captions-section/captions-section\";\nimport PreFooterSection from \"./components/pre-footer-section/pre-footer-section\";\nimport FloatingPrimaryCTA from \"./components/floating-primary-cta/floating-primary-cta\";\nimport ProsSection from \"./components/pros-section/pros-section\";\nimport { useValidateOfferAndCreateUser } from \"../../../data/api/query/offers.mjs\";\nimport { getEmail } from \"../../../data/url/query-params.mjs\";\nimport { ArccosError } from \"../../../util/arccos-error.mjs\";\nimport { validateEmail } from \"../../../util/input-validation-utils.ts\";\nimport {\n  getPartnerFromWindowLocation,\n  getStatsigPartner,\n} from \"../../../util/partner-selectors.mjs\";\nimport { ErrorDisplay } from \"../../error/error-display.tsx\";\nimport { MemberSpotlight } from \"./components/member-spotlight/member-spotlight\";\nimport { getRedemptionCodeFromUrl } from \"../../../util/url-params.mts\";\nimport { AIR_TITLE } from \"../../../util/air-seo.mts\";\nimport { getSpotlightConfig, CK14_SPOTLIGHT_CONFIG } from \"./spotlight-configs\";\nimport { getIsCk14Experience } from \"../../../util/alps-experiment.mjs\";\nimport { getIsUsOrCa } from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport FaqSection from \"./components/faq-section/faq-section.tsx\";\n\nexport const AlpsNextLandingPage: React.FC = () => {\n  const titlePrefix = import.meta.env.DEV ? \"[DEV] \" : \"\";\n  document.title = `${titlePrefix}${AIR_TITLE}`;\n\n  const [email, setEmail] = useState(getEmail());\n  const [error, setError] = useState<ArccosError>();\n  const [isLoading, setIsLoading] = useState(false);\n  const heroInputRef = useRef<HTMLInputElement>(null);\n\n  const validateOfferAndCreateUser = useValidateOfferAndCreateUser();\n\n  const rawPartner = getPartnerFromWindowLocation();\n  const partner = getStatsigPartner(rawPartner);\n  const isReferral = rawPartner === \"referrals\";\n  const redemptionCode = getRedemptionCodeFromUrl();\n  const isEmailValid = validateEmail(email);\n  const isCK14 = getIsCk14Experience();\n  const isUsOrCa = getIsUsOrCa();\n\n  const isButtonDisabled = !isEmailValid || (isReferral && !redemptionCode);\n\n  const onSubmit = useCallback(\n    async (e: React.FormEvent) => {\n      e.preventDefault();\n      try {\n        setIsLoading(true);\n        await validateOfferAndCreateUser(\n          email,\n          setError,\n          isReferral,\n          redemptionCode,\n        );\n      } catch (err) {\n        setError(err as ArccosError);\n      } finally {\n        setIsLoading(false);\n      }\n    },\n    [email, validateOfferAndCreateUser, isReferral, redemptionCode],\n  );\n\n  const primarySpotlight = getSpotlightConfig(partner);\n\n  const handleFloatingCtaClick = () => {\n    if (!heroInputRef.current) return;\n\n    window.scrollTo({ top: 0, behavior: \"smooth\" });\n\n    setTimeout(() => {\n      heroInputRef.current?.focus();\n      setTimeout(() => {\n        heroInputRef.current?.scrollIntoView({\n          behavior: \"smooth\",\n          block: \"center\",\n        });\n      }, 150);\n    }, 500);\n  };\n\n  return (\n    <div className=\"alps-next-page font-montserrat\">\n      {error && (\n        <ErrorDisplay\n          title={error.title}\n          body={error.message}\n          onDismiss={() => setError(undefined)}\n        />\n      )}\n      <HeroSection\n        partner={partner}\n        heroImage={\n          partner === \"mmg\"\n            ? \"https://cdn.arccosgolf.com/images/activation/mmg/mmg_hero2.webp\"\n            : partner === \"titleist\"\n              ? \"https://cdn.arccosgolf.com/images/activation/alps-bc/hero-titleist-full-grad@2x.webp\"\n              : partner === \"onsite\"\n                ? \"https://cdn.arccosgolf.com/images/activation/onsite/current-onsite-hero.webp\"\n                : isCK14\n                  ? \"https://cdn.arccosgolf.com/images/activation/ck14/fitzy_2.webp\"\n                  : \"https://cdn.arccosgolf.com/images/activation/alps-bc/hero-full@2x.webp\"\n        }\n        email={email}\n        onEmailChange={setEmail}\n        onSubmit={onSubmit}\n        isButtonDisabled={isButtonDisabled}\n        isLoading={isLoading}\n        inputRef={heroInputRef}\n        heroImageMobile={\n          isCK14\n            ? partner === \"mmg\" || partner === \"titleist\"\n              ? undefined\n              : \"https://cdn.arccosgolf.com/images/activation/ck14/fitzpatrick-hero-mobile.webp\"\n            : undefined\n        }\n        isCK14={isCK14}\n        isUsOrCa={isUsOrCa}\n      />\n      <MarqueeSection />\n      {isUsOrCa && <LinkProSection isCK14={isCK14} />}\n      {isCK14 && (\n        <MemberSpotlight\n          media={CK14_SPOTLIGHT_CONFIG.soly.media}\n          memberName={CK14_SPOTLIGHT_CONFIG.soly.memberName}\n          memberTitle={CK14_SPOTLIGHT_CONFIG.soly.memberTitle}\n          anchorName={CK14_SPOTLIGHT_CONFIG.soly.anchorName}\n          isCK14={true}\n        >\n          {CK14_SPOTLIGHT_CONFIG.soly.heading}\n        </MemberSpotlight>\n      )}\n      <CaptionsSection partner={partner} isCK14={isCK14} />\n      {!isCK14 && (\n        <MemberSpotlight\n          media={primarySpotlight.media}\n          memberName={primarySpotlight.memberName}\n          memberTitle={primarySpotlight.memberTitle}\n          anchorName={primarySpotlight.anchorName}\n        >\n          {primarySpotlight.heading}\n          {primarySpotlight.description}\n        </MemberSpotlight>\n      )}\n      <ProsSection partner={partner} isCK14={isCK14} />\n      {isCK14 && (\n        <MemberSpotlight\n          media={CK14_SPOTLIGHT_CONFIG.tony.media}\n          memberName={CK14_SPOTLIGHT_CONFIG.tony.memberName}\n          memberTitle={CK14_SPOTLIGHT_CONFIG.tony.memberTitle}\n          anchorName={CK14_SPOTLIGHT_CONFIG.tony.anchorName}\n          isCK14={true}\n          altBackground={true}\n        >\n          {CK14_SPOTLIGHT_CONFIG.tony.heading}\n          {CK14_SPOTLIGHT_CONFIG.tony.description}\n        </MemberSpotlight>\n      )}\n      {partner !== \"titleist\" && !isCK14 && (\n        <MemberSpotlight\n          media={\n            <picture>\n              <img\n                src=\"https://cdn.arccosgolf.com/images/activation/alps-bc/tony@2x.webp\"\n                alt=\"Tony Lee, Arccos Member\"\n              />\n            </picture>\n          }\n          memberName=\"Tony Lee\"\n          memberTitle=\"Arccos Member\"\n          anchorName=\"tony-pic\"\n        >\n          <h2>\n            From 10 Handicap <br className={\"mobileOnly\"} /> to Scratch\n          </h2>\n          <p>\n            “I was struggling to break 80. Using Arccos I got my handicap down\n            to 0.9. Now, I'm playing with purpose.”\n          </p>\n        </MemberSpotlight>\n      )}\n\n      <PreFooterSection isCK14={isCK14} />\n      <FaqSection isCK14={isCK14} />\n      <FloatingPrimaryCTA onClick={handleFloatingCtaClick}>\n        Start free trial\n      </FloatingPrimaryCTA>\n    </div>\n  );\n};\n","import React from \"react\";\nimport styles from \"./appstore-links.module.css\";\nimport PrimaryButton from \"../../primary-button/primary-button\";\nimport {\n  getIsAndroid,\n  getIsIOS,\n} from \"../../../../../../data/initial-state/intial-state-accessors.mts\";\nimport { useSelectedCompletionKitLineItem } from \"../../../../../../data/api/query/offers.mts\";\nimport { useShouldIncludeSensors } from \"../../../../../../data/redux/slices/offers/offers-slice.mts\";\n\nconst APP_STORE_URL = \"https://apps.apple.com/us/app/arccos/id841396631\";\nconst PLAY_STORE_URL = \"https://play.google.com/store/apps/details?id=com.arccosgolf.androidFlagship&hl=en_US\";\nconst QR_CODE_URL = \"https://cdn.arccosgolf.com/images/activation/alps-bc/appstore-qrcode@2x.webp\";\n\nexport const AppstoreLinks: React.FC = () => {\n  const isIOS = getIsIOS();\n  const isAndroid = getIsAndroid();\n  const ckLineItem = useSelectedCompletionKitLineItem();\n  const shouldIncludeSensors = useShouldIncludeSensors();\n  // Sensors ship when the offer carries a completion_kit line item and either it\n  // is required or the user opted in (mirrors the price-calc gate in useTotalPrice).\n  const orderHasSensors =\n    !!ckLineItem && (ckLineItem.is_required || !!shouldIncludeSensors);\n\n  const sensorsOnTheWayCopy = orderHasSensors ? (\n    <p className={styles.body}>\n      Your Smart Sensors are on the way and will arrive within a week. Download the app to activate your account and check your inbox for tips on getting started with Arccos.\n    </p>\n  ) : null;\n\n  // Mobile - show a single CTA button linking to the correct store\n  if (isAndroid || isIOS) {\n    const storeUrl = isAndroid ? PLAY_STORE_URL : APP_STORE_URL;\n    return (\n      <div className={styles.appstoreLinks}>\n        {sensorsOnTheWayCopy}\n        <PrimaryButton href={storeUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n          Let's go\n        </PrimaryButton>\n      </div>\n    );\n  }\n\n  // Desktop - show both badges and QR code\n  return (\n    <div className={styles.appstoreLinks}>\n      {sensorsOnTheWayCopy}\n      <p className={styles.body}>\n        Scan to install Arccos on your phone.\n      </p>\n      <div className={styles.badges}>\n        <a href={APP_STORE_URL} target=\"_blank\" rel=\"noopener noreferrer\">\n          <picture>\n              <source srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/apple-appstore-badge.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/apple-appstore-badge@2x.webp 2x\" type=\"image/webp\"/>\n              <img alt=\"Android Cadddie for iOS\" src=\"https://cdn.arccosgolf.com/images/activation/alps-bc/apple-appstore-badge.webp\" />\n          </picture>\n        </a>\n        <a href={PLAY_STORE_URL} target=\"_blank\" rel=\"noopener noreferrer\">\n          <picture>\n              <source srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/google-appstore-badge.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/google-appstore-badge@2x.webp 2x\" type=\"image/webp\"/>\n              <img alt=\"Android Cadddie for Android\" src=\"https://cdn.arccosgolf.com/images/activation/alps-bc/google-appstore-badge.webp\" />\n          </picture>\n        </a>\n      </div>\n      <div className={styles.qrCode}>\n        <img src={QR_CODE_URL} alt=\"Scan to download the app\" />\n      </div>\n    </div>\n  );\n};\n\nexport default AppstoreLinks;\n","import { getCookie, clearCookie, getAccessToken } from '../auth-cookies/auth-cookies.ts'\nimport { getIsTrackingDisabled } from '../local-storage/local-storage.mjs'\nimport * as Sentry from '@sentry/react'\n\nconst IMPACT_COOKIE_NAME = '_impact_im_ref'\n\n// Module-scoped guard — survives re-renders and remounts within the same page session\nlet impactConversionFired = false\n\ntype ConversionParams = {\n    userId: string\n    email: string\n    offerKey: string\n    currency: string\n    subtotal: number\n}\n\nexport const sendImpactConversion = async (params: ConversionParams): Promise<void> => {\n    if (impactConversionFired) return\n\n    const clickId = getCookie(IMPACT_COOKIE_NAME)\n    if (!clickId || getIsTrackingDisabled()) return\n\n    const accessToken = getAccessToken()\n    if (!accessToken) return\n\n    // Set guard and clear cookie SYNCHRONOUSLY before any async work\n    // This prevents a navigate→success double-fire race condition\n    impactConversionFired = true\n    clearCookie(IMPACT_COOKIE_NAME)\n\n    try {\n        await fetch('/api/impact-conversion', {\n            method: 'POST',\n            headers: {\n                'Content-Type': 'application/json',\n            },\n            body: JSON.stringify({\n                userId: params.userId,\n                email: params.email,\n                offerKey: params.offerKey,\n                clickId,\n                currency: params.currency,\n                subtotal: params.subtotal,\n            }),\n        })\n    } catch (err) {\n        // Do NOT reset impactConversionFired — a missed conversion is better\n        // than a double-charged affiliate commission\n        Sentry.captureException(err)\n    }\n}\n","/**\n * Browser-side helper that fires the success-page server-analytics POST.\n *\n * Called fire-and-forget from the success-page useEffect alongside the\n * existing browser `analytics.track('CompleteRegistration')` calls.\n * Mirrors the shape of `sendImpactConversion` in\n * `../impact/send-impact-conversion.mts` — same `keepalive: true`,\n * same silent error-swallowing, same `credentials: include` for the\n * access_token cookie.\n *\n * The `eventId` arg is browser-owned (see\n * `src/util/conversion-event-id.mts`). The same `eventId` MUST also be\n * passed to the `analytics.track('CompleteRegistration', ..., { eventID })`\n * call in the success page so Meta dedupes the browser pixel and server\n * CAPI on `(event_name, event_id)`.\n *\n * Plan: docs/plans/2026-05-19-001-feat-activation-server-analytics-port-plan.md (U7).\n */\n\nexport interface FireServerAnalyticsSuccessParams {\n    stripeSessionId: string\n    eventId: string\n    email: string\n    userId: string\n    offerKey: string\n    /** Subtotal from the offer — used as Meta CAPI custom_data.value. */\n    value: number\n    currency: string\n    trialPeriodDays: number\n    partner?: string\n    stableId?: string\n    predictedLtv?: number\n    firstName?: string\n    lastName?: string\n    city?: string\n    state?: string\n    zip?: string\n    country?: string\n}\n\nfunction getCookie(name: string): string | undefined {\n    if (typeof document === 'undefined') return undefined\n    const cookies = document.cookie.split('; ')\n    const match = cookies.find((c) => c.startsWith(`${name}=`))\n    return match ? decodeURIComponent(match.slice(name.length + 1)) : undefined\n}\n\nfunction readFbclidFromUrl(): string | undefined {\n    if (typeof window === 'undefined') return undefined\n    const params = new URLSearchParams(window.location.search)\n    const fbclid = params.get('fbclid')\n    return fbclid ?? undefined\n}\n\n/**\n * Fire-and-forget POST to /api/server-analytics/success. Resolves on\n * success or failure — errors are swallowed silently (matches\n * `sendImpactConversion`'s posture, which the caller's existing\n * `.catch(() => {})` chain depends on).\n *\n * Returns a resolved Promise<void> when stripeSessionId is empty so\n * callers can `await` (or `void` / `.catch()`) uniformly.\n */\nexport async function fireServerAnalyticsSuccess(\n    params: FireServerAnalyticsSuccessParams,\n): Promise<void> {\n    if (!params.stripeSessionId) return\n\n    const body = {\n        stripeSessionId: params.stripeSessionId,\n        eventId: params.eventId,\n        email: params.email,\n        userId: params.userId,\n        offerKey: params.offerKey,\n        value: params.value,\n        currency: params.currency,\n        trialPeriodDays: params.trialPeriodDays,\n        partner: params.partner,\n        // Browser reads first-party cookies and the fbclid URL param;\n        // server resolves the effective fbc via `resolveFbc`.\n        fbp: getCookie('_fbp'),\n        fbc: getCookie('_fbc'),\n        fbclid: readFbclidFromUrl(),\n        stableId: params.stableId,\n        predictedLtv: params.predictedLtv,\n        firstName: params.firstName,\n        lastName: params.lastName,\n        city: params.city,\n        state: params.state,\n        zip: params.zip,\n        country: params.country,\n    }\n\n    try {\n        await fetch('/api/server-analytics/success', {\n            method: 'POST',\n            credentials: 'include',\n            headers: { 'Content-Type': 'application/json' },\n            body: JSON.stringify(body),\n            // keepalive: true keeps the fetch alive across navigation —\n            // matters because the success page is the first page after\n            // a Stripe redirect and the user often clicks through to\n            // the next step (or closes the tab) before the response\n            // resolves. Same pattern as sendImpactConversion.\n            keepalive: true,\n        })\n    } catch {\n        // Silent — analytics fire must never surface to the success-page UI.\n    }\n}\n","import React, { useEffect } from \"react\";\nimport styles from \"./alps-next-success.module.css\";\nimport { analytics } from \"../../../../../analytics/analytics.mjs\";\nimport { getPartnerFromWindowLocation, isOnsiteEventPartner } from \"../../../../../util/partner-selectors.mjs\";\nimport {\n  useOfferKey,\n  useSelectedLineItems,\n  useSelectedSubscriptionLineItem,\n  useTrialPeriodDays,\n} from \"../../../../../data/api/query/offers.mts\";\nimport { AppstoreLinks } from \"./appstore-links/appstore-links\";\nimport { sendImpactConversion } from \"../../../../../data/impact/send-impact-conversion.mts\";\nimport { fireServerAnalyticsSuccess } from \"../../../../../data/server-analytics/fire-server-analytics.mts\";\nimport { getEmail } from \"../../../../../data/url/query-params.mjs\";\nimport { getUserId } from \"../../../../../data/auth-cookies/auth-cookies.ts\";\nimport { useCurrency } from \"../../../../../data/redux/slices/offers/offers-slice.mts\";\nimport { getIsCk14Experience, getIsVintageExperience } from \"../../../../../util/alps-experiment.mts\";\nimport { getOrCreateConversionEventId } from \"../../../../../util/conversion-event-id.mts\";\n\nexport const AlpsNextSuccess: React.FC = () => {\n  const isCK14 = getIsCk14Experience();\n  const isVintage = getIsVintageExperience();\n  const offerKey = useOfferKey();\n  const partner = getPartnerFromWindowLocation();\n  const currency = useCurrency();\n  const lineItems = useSelectedLineItems();\n  const subscriptionPrice =\n    useSelectedSubscriptionLineItem()?.actual_price || 0;\n  const trialPeriodDays = useTrialPeriodDays();\n  const subtotal =\n    lineItems\n      .filter(\n        (l) => l.charge_type === \"INITIAL\" && l.key !== \"shipping_and_handling\",\n      )\n      .reduce((sum, l) => sum + l.actual_price, 0) +\n    (trialPeriodDays ? 0 : subscriptionPrice);\n\n  useEffect(() => {\n    // Browser-owned Meta event_id, keyed by Stripe session so reloads\n    // dedupe at Meta. Same id is shared with the server CAPI fire below.\n    const stripeSessionId =\n      new URLSearchParams(window.location.search).get(\"session_id\") ?? \"\";\n    const metaEventId = stripeSessionId\n      ? getOrCreateConversionEventId(stripeSessionId)\n      : \"\";\n\n    const alpsNextProperties = {\n      property: JSON.stringify({\n        partner,\n        offerKey,\n        isAlpsNext: !isCK14,\n        isVintage,\n      }),\n      eventID: metaEventId,\n    };\n\n    analytics.track(\"CompleteRegistration\", alpsNextProperties);\n    analytics.track(\"activation_successful\", alpsNextProperties);\n\n    // Impact.com affiliate conversion tracking\n    sendImpactConversion({\n      userId: getUserId() || \"\",\n      email: getEmail() || \"\",\n      offerKey: offerKey || \"\",\n      currency: currency || \"USD\",\n      subtotal,\n    }).catch(() => {}); // fire-and-forget, errors handled inside sendImpactConversion\n\n    analytics.track(\"stripe_payment_successful\", alpsNextProperties);\n\n    // Server-side analytics fanout — Meta CAPI + Snowplow. Same shape\n    // as success.tsx; consolidating into a helper hook would be tidy\n    // but is YAGNI for two call sites.\n    if (stripeSessionId && metaEventId && offerKey) {\n      fireServerAnalyticsSuccess({\n        stripeSessionId,\n        eventId: metaEventId,\n        email: getEmail() || \"\",\n        userId: getUserId() || \"\",\n        offerKey,\n        value: subtotal,\n        currency: currency || \"USD\",\n        trialPeriodDays: trialPeriodDays ?? 0,\n        partner: partner || undefined,\n      }).catch(() => {});\n    }\n  }, [offerKey, partner, currency, subtotal, trialPeriodDays]);\n\n  return (\n    <div className={styles.successPage}>\n      <div className={styles.content}>\n        <h3 className={styles.superheader}>\n          {isVintage ? \"Congratulations\" : \"You're in\"}\n        </h3>\n        <h2 className={styles.heading}>\n          {isVintage\n            ? \"You’re on Your Way to Playing Smarter Golf\"\n            : isOnsiteEventPartner(partner)\n            ? \"Lower scores start now.\"\n            : isCK14\n            ? \"Get Ready to Play Your Smartest Golf\"\n            : \"Arccos Air is on the way and lower scores start now.\"}\n        </h2>\n        <div className={styles.buttonContainer}>\n          <AppstoreLinks />\n        </div>\n      </div>\n    </div>\n  );\n};\n","import React, {useEffect, useState} from 'react'\n\nexport type Props = {\n    children: React.ReactNode\n}\n\nexport const isClientSide = typeof window !== 'undefined'\n\nexport const ClientOnly: React.FC<Props> = ({ children }) => {\n    const [mounted, setMounted] = useState(false)\n    useEffect(() => {\n        setMounted(true)\n    }, [])\n    return mounted ? <>{children}</> : null\n}\n","import React, {useEffect, useRef, useState} from \"react\";\nimport {useDispatch} from \"react-redux\";\nimport {VideoConfig} from \"../../pages/full-content-landing-page/sections/window-pane/window-pane.tsx\";\nimport {closeModalAction, openModalAction} from \"../../../data/redux/slices/modal/modal-slice.mjs\";\nimport * as reactUse from \"react-use\";\nconst {usePrevious} = reactUse;\nimport './large-video-button.css'\n\nexport const LargeBoringVideoButton: React.FC<{\n    videoData: VideoConfig[]\n    useIframe?: boolean\n    defaultVolume?: number\n    className?: string\n    textClassName?: string\n    id: string\n    buttonText?: string\n    circleColor: string\n}> = ({ defaultVolume, videoData, className, id, circleColor }) => {\n    const dispatch = useDispatch()\n    return (\n        <button\n            id={id}\n            type='button'\n            className={`large-boring-video-button ${className || ''}`}\n            onClick={() =>\n                dispatch(\n                    openModalAction({\n                        // @ts-ignore\n                        modalComponent: VideoModal,\n                        modalProps: {\n                            defaultVolume,\n                            useIframe: false,\n                            videoData,\n                            className: 'video-modal',\n                        },\n                    }),\n                )\n            }\n        >\n            <svg className={'large-boring-video-button-asset'} width='249' height='249' viewBox='0 0 249 249' fill='none' xmlns='http://www.w3.org/2000/svg'>\n                <g filter='url(#filter0_d_1166_6953)'>\n                    <g style={{\n                        mixBlendMode: 'multiply',\n                    }} opacity='0.5'>\n                        <circle cx='124.5' cy='124.5' r='62.5' fill='black' />\n                    </g>\n                    <circle className='green-outer-circle' cx='124.5' cy='124.5' r='69.25' stroke={circleColor} />\n                    <path\n                        d='M111 100L146.213 122.637C147.933 123.743 147.933 126.257 146.213 127.363L115.329 147.217C113.459 148.419 111 147.077 111 144.854V120.833'\n                        stroke='url(#paint0_angular_1166_6953)' strokeWidth='5' strokeLinecap='round' />\n                </g>\n                <defs>\n                    <filter id='filter0_d_1166_6953' x='0' y='0' width='249' height='249' filterUnits='userSpaceOnUse'\n                            colorInterpolationFilters='sRGB'>\n                        <feFlood floodOpacity='0' result='BackgroundImageFix' />\n                        <feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0'\n                                       result='hardAlpha' />\n                        <feOffset />\n                        <feGaussianBlur stdDeviation='27' />\n                        <feComposite in2='hardAlpha' operator='out' />\n                        <feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0' />\n                        <feBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow_1166_6953' />\n                        <feBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow_1166_6953' result='shape' />\n                    </filter>\n                    <radialGradient id='paint0_angular_1166_6953' cx='0' cy='0' r='1' gradientUnits='userSpaceOnUse'\n                                    gradientTransform='translate(130.444 125) rotate(-160.346) scale(41.2946 39.5877)'>\n                        <stop offset='0.0691621' stopColor='white' />\n                        <stop offset='0.78324' stopColor='white' stopOpacity='0.956669' />\n                        <stop offset='0.980538' stopColor='white' stopOpacity='0' />\n                        <stop offset='1' stopColor='white' stopOpacity='0' />\n                    </radialGradient>\n                </defs>\n            </svg>\n        </button>\n    )\n}\n\nexport interface VideoModalProps {\n    videoData: VideoConfig[];\n    useIframe?: boolean;\n    defaultVolume?: number;\n    shouldCloseModalOnVideoEnd?: boolean;\n}\n\nexport const VideoModal: React.FC<VideoModalProps> = ({\n                                                          useIframe,\n                                                          videoData,\n                                                          defaultVolume = 1, shouldCloseModalOnVideoEnd\n                                                      }) => {\n    const videoRef = useRef<HTMLVideoElement>(null)\n    const dispatch = useDispatch()\n    const [isFullScreen, setIsFullScreen] = useState<boolean>(!!document.fullscreenElement)\n    const prevFullScreen = usePrevious(isFullScreen)\n\n    useEffect(() => {\n        if (videoRef && videoRef.current) {\n            videoRef.current.volume = defaultVolume\n        }\n    }, [\n        defaultVolume,\n        videoRef,\n    ])\n\n    useEffect(() => {\n        document.addEventListener('fullscreenchange', () => {\n            console.log('fullscreenchange')\n            setIsFullScreen(!!document.fullscreenElement)\n        })\n        document.addEventListener('webkitEnterFullscreen', () => {\n            setIsFullScreen(true)\n            console.log('started full screen')\n        })\n        document.addEventListener('webkitExitFullscreen', () => {\n            setIsFullScreen(false)\n            console.log('ended full screen')\n        })\n        if (shouldCloseModalOnVideoEnd) {\n            document.getElementById('modal-video')?.addEventListener('ended', () => {\n                dispatch(closeModalAction())\n            })\n        }\n    })\n\n    useEffect(() => {\n        if (prevFullScreen && !isFullScreen) {\n            dispatch(closeModalAction())\n        }\n    }, [dispatch, isFullScreen, prevFullScreen])\n\n    return (\n        <div className='video-modal'>\n            {\n                useIframe ?\n                    <iframe\n                        className={'video-iframe'}\n                        title='PING'\n                        src={videoData[0].url}\n                        allowFullScreen\n                        allow={'autoplay'}\n                        width={'100%'}\n                        height={'100%'}\n                    /> :\n                    <video\n                        autoPlay\n                        ref={videoRef}\n                        controls\n                        playsInline\n                        id={'modal-video'}\n                    >\n                        {\n                            videoData.map(({\n                                               url,\n                                               type,\n                                           }, index) => (\n                                <source src={url} type={type} key={index} />\n                            ))\n                        }\n                    </video>\n            }\n        </div>\n    )\n}\n","import React, { useCallback, useState } from \"react\";\nimport { localize, TextContent } from \"../../../lang/localized-content.mjs\";\nimport { ClientOnly } from \"../client-only/client-only.tsx\";\nimport {\n  getDynamicContentCreateAccountVideoButtonUrl,\n  getDynamicContentEmailPlaceholder,\n  getDynamicContentNucapLandingPage,\n} from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport { Loading } from \"../loading/loading.tsx\";\nimport { analytics } from \"../../../analytics/analytics.mjs\";\nimport { openModalAction } from \"../../../data/redux/slices/modal/modal-slice.mjs\";\nimport { VideoModal } from \"../video-buttons/large-video-button.tsx\";\nimport { validateEmail } from \"../../../util/input-validation-utils.ts\";\nimport {\n  getShouldOfferLinkProTrial,\n  useTrialPeriodDays,\n  useValidateOfferAndCreateUser,\n} from \"../../../data/api/query/offers.mjs\";\nimport { getPartnerFromWindowLocation } from \"../../../util/partner-selectors.mjs\";\n// Lead fire (browser pixel + server CAPI) lives in\n// data/api/query/offers.mts:validateOfferAndCreateUser so every sign-up\n// entry point — vintage create-account-form, modern alps-next, sensorless,\n// full-content-landing — gets the same fire from the common path.\nimport { getIsVintageExperience } from \"../../../util/alps-experiment.mts\";\nimport { getEmail } from \"../../../data/url/query-params.mjs\";\nimport { useIsDesktopView } from \"../../../util/view-utils.mjs\";\nimport { useDispatch } from \"react-redux\";\nimport { setCustomerId } from \"../../../data/redux/slices/auth/auth-slice.mts\";\nimport { mmgContent } from \"../mmg_content.tsx\";\n\nconst pgaCallout =\n  \"https://cdn.arccosgolf.com/images/activation/shared/pga-official-game-tracker.png\";\nconst vintagePgaLockup =\n  \"https://cdn.arccosgolf.com/images/activation/vintage/pga-lockup.webp\";\n\nexport type CreatAccountFormDynamicContent = {\n  header: TextContent;\n  headerFontSize?: TextContent;\n  desktopHeaderFontSize?: TextContent;\n  body: TextContent;\n  subheader_2?: TextContent;\n  buttonText: TextContent;\n  videoButtonUrl: string;\n};\n\nexport const CreateAccountForm: React.FC<{\n  dynamicContent: CreatAccountFormDynamicContent;\n  setError: (e: any) => void;\n  shouldShowPGALogo?: boolean;\n}> = ({ dynamicContent, setError, shouldShowPGALogo }) => {\n  const [email, setEmail] = useState(getEmail());\n\n  const [isLoading, setIsLoading] = useState(false);\n  const isEmailValid = validateEmail(email);\n  const validateOfferAndCreateUser = useValidateOfferAndCreateUser();\n  const partner = getPartnerFromWindowLocation();\n  const isReferral = partner === \"referrals\";\n  const body = dynamicContent?.body;\n  const isDesktopView = useIsDesktopView();\n  const dispatch = useDispatch();\n  const videoButtonUrl = dynamicContent?.videoButtonUrl;\n  const shouldShowWatchVideoButton = !!videoButtonUrl;\n\n  const getRedemptionCode = () => {\n    const redemptionCode = new URLSearchParams(window.location.search).get(\n      \"redemptionCode\",\n    );\n    const affiliate = new URLSearchParams(window.location.search).get(\n      \"affiliate\",\n    );\n\n    return redemptionCode !== null ? redemptionCode : affiliate;\n  };\n\n  const redemptionCode = getRedemptionCode();\n\n  const getIsButtonDisabled = () => {\n    if (isLoading || !isEmailValid) {\n      return true;\n    }\n    return isReferral && !redemptionCode;\n  };\n\n  const onSubmit = useCallback(\n    async (e: React.FormEvent) => {\n      e.preventDefault();\n      try {\n        setIsLoading(true);\n\n        const handleCustomerIdFound = (customerId: string) => {\n          console.log(\n            \"[CREATE-ACCOUNT-FORM] Customer ID found, dispatching to Redux:\",\n            {\n              customerId,\n              currentUrl: window.location.href,\n              timestamp: Date.now(),\n            },\n          );\n          // Store customer ID in Redux state\n          dispatch(setCustomerId(customerId));\n        };\n\n        await validateOfferAndCreateUser(\n          email,\n          setError,\n          isReferral,\n          redemptionCode,\n          handleCustomerIdFound,\n        );\n      } catch (e) {\n        setError(e);\n      } finally {\n        setIsLoading(false);\n      }\n    },\n    [email, validateOfferAndCreateUser],\n  );\n\n  const shouldOfferLinkProTrial = getShouldOfferLinkProTrial();\n  const trialPeriodDays = useTrialPeriodDays();\n\n  const getHeaderFontSize = () => {\n    if (partner === \"mmg\" && !isDesktopView) {\n      return mmgContent.create_account.headerFontSize;\n    }\n\n    return isDesktopView\n      ? localize(dynamicContent?.desktopHeaderFontSize)\n      : localize(dynamicContent?.headerFontSize);\n  };\n  return (\n    <form onSubmit={onSubmit} className={\"form\"}>\n      {getIsVintageExperience() && (\n        <img\n          className={\"pga-callout\"}\n          src={vintagePgaLockup}\n          alt=\"PGA Tour Official Game Tracker\"\n        />\n      )}\n      {shouldShowPGALogo && (\n        <img className={\"pga-callout\"} src={pgaCallout} alt={\"\"} />\n      )}\n      <h2\n        className={\"title\"}\n        style={{\n          fontSize: getHeaderFontSize(),\n        }}\n      >\n        {localize(dynamicContent.header, {\n          values: {\n            trial_period_days: trialPeriodDays?.toString(),\n          },\n        })}\n      </h2>\n      <p className={\"subtitle\"}>{localize(body)}</p>\n      <p className={\"subtitle\"} style={{ fontWeight: 700 }}>\n        {shouldOfferLinkProTrial && !getIsVintageExperience()\n          ? \"Sign up today and try Arccos Air for FREE!\"\n          : localize(dynamicContent.subheader_2)}\n      </p>\n      <div className={\"interactive-container\"}>\n        <ClientOnly>\n          <>\n            <input\n              type={\"text\"}\n              value={email || \"\"}\n              onChange={(e) => setEmail(e.target.value)}\n              placeholder={localize(getDynamicContentEmailPlaceholder())}\n              autoComplete={\"email\"}\n              className={\"form-input\"}\n              required\n            />\n          </>\n        </ClientOnly>\n        <div className={\"button-container\"}>\n          <button\n            className={`button`}\n            type={\"submit\"}\n            disabled={getIsButtonDisabled()}\n          >\n            <div className={`button-content ${isLoading ? \"hidden\" : \"\"}`}>\n              <span>{localize(dynamicContent?.buttonText)}</span>\n            </div>\n            {isLoading && (\n              <div className={\"button-loading\"}>\n                <Loading />\n              </div>\n            )}\n          </button>\n          {shouldShowWatchVideoButton && (\n            <button\n              className={\"video-button\"}\n              type={\"button\"}\n              onClick={() => {\n                analytics.track(\"video_button_clicked\", {\n                  properties: {\n                    partner,\n                  },\n                });\n                dispatch(\n                  openModalAction({\n                    // @ts-ignore\n                    modalComponent: VideoModal,\n                    modalProps: {\n                      useIframe: false,\n                      videoData: [\n                        {\n                          url: videoButtonUrl,\n                          type: \"video/mp4\",\n                        },\n                      ],\n                      className: \"video-modal\",\n                    },\n                  }),\n                );\n              }}\n            >\n              <svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 21 26\"\n                fill=\"none\"\n              >\n                <path\n                  d=\"M19.511 13.9572C20.2078 13.5093 20.2078 12.4907 19.511 12.0428L1.75328 0.627106C0.995969 0.140266 0 0.684016 0 1.58431V24.4157C0 25.316 0.99597 25.8597 1.75328 25.3729L19.511 13.9572Z\"\n                  fill=\"white\"\n                />\n              </svg>\n              <p>Watch Video</p>\n            </button>\n          )}\n        </div>\n      </div>\n    </form>\n  );\n};\n","import React, {useState} from 'react'\nimport './hero-section.css'\nimport '../../../create-account/create-account.css'\nimport { getDynamicContentNucapLandingPage } from \"../../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {ArccosError} from \"../../../../../util/arccos-error.mjs\";\nimport {ErrorDisplay} from \"../../../../error/error-display.tsx\";\nimport {localize} from \"../../../../../lang/localized-content.mjs\";\nimport {CreateAccountForm} from \"../../../../common-components/forms/create-account-form.tsx\";\nimport { mmgContent } from '../../../../common-components/mmg_content.tsx';\nimport { getPartnerFromWindowLocation } from '../../../../../util/partner-selectors.mjs'\n\nconst getDynamicContent = () => {\n    const partner = getPartnerFromWindowLocation()\n\n    if (partner === 'mmg') {\n        return mmgContent.nucap_landing_page.hero_section\n    }\n\n    return getDynamicContentNucapLandingPage()?.hero_section\n}\n\nexport const HeroSection: React.FC = () => {\n    const dynamicContent = getDynamicContent()\n\n    const [error, setError] = useState<ArccosError>()\n    const backgroundPictureUrl = dynamicContent?.background_image_mobile\n    const desktopBackgroundPictureUrl = dynamicContent?.background_image_desktop\n\n    const backgroundImageCaption = dynamicContent?.image_caption\n    const backgroundImageSubcaption = dynamicContent?.image_subcaption\n\n    return (\n        <div className={'create-account hero-section'} style={{color: dynamicContent?.caption_font_color || '#626A77'}}>\n            <>\n                <div className={'background-image-caption'}>\n                    <div className={'border-top'}/>\n                    <p className={'caption'}>{localize(backgroundImageCaption)}</p>\n                    <p className={'subcaption'}>{localize(backgroundImageSubcaption)}</p>\n                </div>\n                {(!!backgroundPictureUrl || !!desktopBackgroundPictureUrl) &&\n                    <>\n                        <img\n                            className={'background-picture mobile'}\n                            src={backgroundPictureUrl}\n                            alt={''}\n                        />\n                        <div className={'background-picture-tint mobile'}/>\n\n                        <img\n                            className={'background-picture desktop'}\n                            src={desktopBackgroundPictureUrl}\n                            alt={''}\n                        />\n                        <div className={'background-picture-tint desktop'}/>\n\n                    </>\n\n                }\n\n            </>\n            {error && (\n                <ErrorDisplay\n                    title={error.title}\n                    body={error.message}\n                    onDismiss={() => setError(undefined)}\n                />\n            )}\n\n            <CreateAccountForm dynamicContent={dynamicContent} setError={setError} shouldShowPGALogo={false}/>\n\n            <div className={'green-shadow'}/>\n        </div>\n    )\n}\n","import React from 'react'\nimport {ReviewSection} from \"../review-section/review-section.tsx\";\nimport {AnimationSection} from \"../animation-section/animation-section.tsx\";\nimport {BillionShotsSection} from \"../billion-shots-section/billion-shots-section.tsx\";\nimport {HeroSection} from \"./hero-section/hero-section.tsx\";\nimport {CreateAccount} from \"../../create-account/create-account.tsx\";\nimport {PhoneScreenSection} from \"./phone-screen-section/phone-screen-section.tsx\";\nimport {\n    SkillestGiveawaySection\n} from \"../../full-content-landing-page/sections/skillest-giveaway/skillest-giveaway.tsx\";\nimport {getIsVintageExperience} from \"../../../../util/alps-experiment.mts\";\n\nexport const NucapLandingPageV2: React.FC = () => {\n    const isVintage = getIsVintageExperience()\n    return (\n        <>\n            <HeroSection />\n            <PhoneScreenSection />\n            <ReviewSection shouldShowAchievements={false}/>\n            <AnimationSection />\n            {!isVintage && <SkillestGiveawaySection />}\n            <BillionShotsSection />\n        </>\n    )\n}\n","export default class CountryCodes {\n    \n    static COUNTRIES = {\n    \tAF:\"Afghanistan\",\n        AX:\"Åland Islands\",\n        AL:\"Albania\",\n        DZ:\"Algeria\",\n        AS:\"American Samoa\",\n        AD:\"Andorra\",\n        AO:\"Angola\",\n        AI:\"Anguilla\",\n        AQ:\"Antarctica\",\n        AG:\"Antigua and Barbuda\",\n        AR:\"Argentina\",\n        AM:\"Armenia\",\n        AW:\"Aruba\",\n        AU:\"Australia\",\n        AT:\"Austria\",\n        AZ:\"Azerbaijan\",\n        BS:\"Bahamas\",\n        BH:\"Bahrain\",\n        BD:\"Bangladesh\",\n        BB:\"Barbados\",\n        BY:\"Belarus\",\n        BE:\"Belgium\",\n        BZ:\"Belize\",\n        BJ:\"Benin\",\n        BM:\"Bermuda\",\n        BT:\"Bhutan\",\n        BO:\"Bolivia, Plurinational State of\",\n        BQ:\"Bonaire, Sint Eustatius and Saba\",\n        BA:\"Bosnia and Herzegovina\",\n        BW:\"Botswana\",\n        BV:\"Bouvet Island\",\n        BR:\"Brazil\",\n        IO:\"British Indian Ocean Territory\",\n        BN:\"Brunei Darussalam\",\n        BG:\"Bulgaria\",\n        BF:\"Burkina Faso\",\n        BI:\"Burundi\",\n        KH:\"Cambodia\",\n        CM:\"Cameroon\",\n        CA:\"Canada\",\n        CV:\"Cape Verde\",\n        KY:\"Cayman Islands\",\n        CF:\"Central African Republic\",\n        TD:\"Chad\",\n        CL:\"Chile\",\n        CN:\"China\",\n        CX:\"Christmas Island\",\n        CC:\"Cocos (Keeling) Islands\",\n        CO:\"Colombia\",\n        KM:\"Comoros\",\n        CG:\"Congo\",\n        CD:\"Congo, the Democratic Republic of the\",\n        CK:\"Cook Islands\",\n        CR:\"Costa Rica\",\n        CI:\"Côte d'Ivoire\",\n        HR:\"Croatia\",\n        CU:\"Cuba\",\n        CW:\"Curaçao\",\n        CY:\"Cyprus\",\n        CZ:\"Czech Republic\",\n        DK:\"Denmark\",\n        DJ:\"Djibouti\",\n        DM:\"Dominica\",\n        DO:\"Dominican Republic\",\n        EC:\"Ecuador\",\n        EG:\"Egypt\",\n        SV:\"El Salvador\",\n        GQ:\"Equatorial Guinea\",\n        ER:\"Eritrea\",\n        EE:\"Estonia\",\n        ET:\"Ethiopia\",\n        FK:\"Falkland Islands (Malvinas)\",\n        FO:\"Faroe Islands\",\n        FJ:\"Fiji\",\n        FI:\"Finland\",\n        FR:\"France\",\n        GF:\"French Guiana\",\n        PF:\"French Polynesia\",\n        TF:\"French Southern Territories\",\n        GA:\"Gabon\",\n        GM:\"Gambia\",\n        GE:\"Georgia\",\n        DE:\"Germany\",\n        GH:\"Ghana\",\n        GI:\"Gibraltar\",\n        GR:\"Greece\",\n        GL:\"Greenland\",\n        GD:\"Grenada\",\n        GP:\"Guadeloupe\",\n        GU:\"Guam\",\n        GT:\"Guatemala\",\n        GG:\"Guernsey\",\n        GN:\"Guinea\",\n        GW:\"Guinea-Bissau\",\n        GY:\"Guyana\",\n        HT:\"Haiti\",\n        HM:\"Heard Island and McDonald Islands\",\n        VA:\"Holy See (Vatican City State)\",\n        HN:\"Honduras\",\n        HK:\"Hong Kong\",\n        HU:\"Hungary\",\n        IS:\"Iceland\",\n        IN:\"India\",\n        ID:\"Indonesia\",\n        IR:\"Iran, Islamic Republic of\",\n        IQ:\"Iraq\",\n        IE:\"Ireland\",\n        IM:\"Isle of Man\",\n        IL:\"Israel\",\n        IT:\"Italy\",\n        JM:\"Jamaica\",\n        JP:\"Japan\",\n        JE:\"Jersey\",\n        JO:\"Jordan\",\n        KZ:\"Kazakhstan\",\n        KE:\"Kenya\",\n        KI:\"Kiribati\",\n        KR:\"Korea, Republic of\",\n        KW:\"Kuwait\",\n        KG:\"Kyrgyzstan\",\n        LA:\"Lao People's Democratic Republic\",\n        LV:\"Latvia\",\n        LB:\"Lebanon\",\n        LS:\"Lesotho\",\n        LR:\"Liberia\",\n        LY:\"Libya\",\n        LI:\"Liechtenstein\",\n        LT:\"Lithuania\",\n        LU:\"Luxembourg\",\n        MO:\"Macao\",\n        MK:\"Macedonia, the former Yugoslav Republic of\",\n        MG:\"Madagascar\",\n        MW:\"Malawi\",\n        MY:\"Malaysia\",\n        MV:\"Maldives\",\n        ML:\"Mali\",\n        MT:\"Malta\",\n        MH:\"Marshall Islands\",\n        MQ:\"Martinique\",\n        MR:\"Mauritania\",\n        MU:\"Mauritius\",\n        YT:\"Mayotte\",\n        MX:\"Mexico\",\n        FM:\"Micronesia, Federated States of\",\n        MD:\"Moldova, Republic of\",\n        MC:\"Monaco\",\n        MN:\"Mongolia\",\n        ME:\"Montenegro\",\n        MS:\"Montserrat\",\n        MA:\"Morocco\",\n        MZ:\"Mozambique\",\n        MM:\"Myanmar\",\n        NA:\"Namibia\",\n        NR:\"Nauru\",\n        NP:\"Nepal\",\n        NL:\"Netherlands\",\n        NC:\"New Caledonia\",\n        NZ:\"New Zealand\",\n        NI:\"Nicaragua\",\n        NE:\"Niger\",\n        NG:\"Nigeria\",\n        NU:\"Niue\",\n        NF:\"Norfolk Island\",\n        MP:\"Northern Mariana Islands\",\n        NO:\"Norway\",\n        OM:\"Oman\",\n        PK:\"Pakistan\",\n        PW:\"Palau\",\n        PS:\"Palestinian Territory, Occupied\",\n        PA:\"Panama\",\n        PG:\"Papua New Guinea\",\n        PY:\"Paraguay\",\n        PE:\"Peru\",\n        PH:\"Philippines\",\n        PN:\"Pitcairn\",\n        PL:\"Poland\",\n        PT:\"Portugal\",\n        QA:\"Qatar\",\n        RE:\"Réunion\",\n        RO:\"Romania\",\n        RU:\"Russian Federation\",\n        RW:\"Rwanda\",\n        BL:\"Saint Barthélemy\",\n        SH:\"Saint Helena, Ascension and Tristan da Cunha\",\n        KN:\"Saint Kitts and Nevis\",\n        LC:\"Saint Lucia\",\n        MF:\"Saint Martin (French part)\",\n        PM:\"Saint Pierre and Miquelon\",\n        VC:\"Saint Vincent and the Grenadines\",\n        WS:\"Samoa\",\n        SM:\"San Marino\",\n        ST:\"Sao Tome and Principe\",\n        SA:\"Saudi Arabia\",\n        SN:\"Senegal\",\n        RS:\"Serbia\",\n        SC:\"Seychelles\",\n        SL:\"Sierra Leone\",\n        SG:\"Singapore\",\n        SX:\"Sint Maarten (Dutch part)\",\n        SK:\"Slovakia\",\n        SI:\"Slovenia\",\n        SB:\"Solomon Islands\",\n        SO:\"Somalia\",\n        ZA:\"South Africa\",\n        GS:\"South Georgia and the South Sandwich Islands\",\n        SS:\"South Sudan\",\n        ES:\"Spain\",\n        LK:\"Sri Lanka\",\n        SD:\"Sudan\",\n        SR:\"Suriname\",\n        SJ:\"Svalbard and Jan Mayen\",\n        SZ:\"Swaziland\",\n        SE:\"Sweden\",\n        CH:\"Switzerland\",\n        SY:\"Syrian Arab Republic\",\n        TW:\"Taiwan, Province of China\",\n        TJ:\"Tajikistan\",\n        TZ:\"Tanzania, United Republic of\",\n        TH:\"Thailand\",\n        TL:\"Timor-Leste\",\n        TG:\"Togo\",\n        TK:\"Tokelau\",\n        TO:\"Tonga\",\n        TT:\"Trinidad and Tobago\",\n        TN:\"Tunisia\",\n        TR:\"Turkey\",\n        TM:\"Turkmenistan\",\n        TC:\"Turks and Caicos Islands\",\n        TV:\"Tuvalu\",\n        UG:\"Uganda\",\n        UA:\"Ukraine\",\n        AE:\"United Arab Emirates\",\n        GB:\"United Kingdom\",\n        US:\"United States\",\n        UM:\"United States Minor Outlying Islands\",\n        UY:\"Uruguay\",\n        UZ:\"Uzbekistan\",\n        VU:\"Vanuatu\",\n        VE:\"Venezuela, Bolivarian Republic of\",\n        VN:\"Viet Nam\",\n        VG:\"Virgin Islands, British\",\n        VI:\"Virgin Islands, U.S.\",\n        WF:\"Wallis and Futuna\",\n        EH:\"Western Sahara\",\n        YE:\"Yemen\",\n        ZM:\"Zambia\",\n        ZW:\"Zimbabwe\"\n    }\n\n    static CODES = Object.keys(CountryCodes.COUNTRIES)\n\n    static NAMES = CountryCodes.CODES.map(key => CountryCodes.COUNTRIES[key])\n\n    static ENTRIES = CountryCodes.CODES.map(key => `${key} - ${CountryCodes.COUNTRIES[key]}`)\n\n    /**\n     * Get country code (XX) for an entry from a list of `CountryCodes.NAMES`\n     */\n    static GET_CODE_FOR_NAME = (countryName = \"\") => {\n        const valueIndex = CountryCodes.NAMES.indexOf(countryName);\n        if (valueIndex > -1) return CountryCodes.CODES[valueIndex];\n        return undefined\n    }\n\n    /**\n     * Get country name from a list of `CountryCodes.NAMES` for code (XX) \n     */\n    static GET_NAME_FOR_CODE = (countryCode = \"\") => {\n        return CountryCodes.COUNTRIES[countryCode] || null;\n    }\n}","/******************************************\n *  Created On : Tue Feb 13 2018\n *  File : USStateCodes.ts\n *******************************************/\n\nexport default class USStateCodes {\n\n    static STATES = {\n        AL: \"Alabama\",\n        AK: \"Alaska\",\n        AZ: \"Arizona\",\n        AR: \"Arkansas\",\n        CA: \"California\",\n        CO: \"Colorado\",\n        CT: \"Connecticut\",\n        DE: \"Delaware\",\n        DC: \"District of Columbia\",\n        FL: \"Florida\",\n        GA: \"Georgia\",\n        HI: \"Hawaii\",\n        ID: \"Idaho\",\n        IL: \"Illinois\",\n        IN: \"Indiana\",\n        IA: \"Iowa\",\n        KS: \"Kansas\",\n        KY: \"Kentucky\",\n        LA: \"Louisiana\",\n        ME: \"Maine\",\n        MD: \"Maryland\",\n        MA: \"Massachusetts\",\n        MI: \"Michigan\",\n        MN: \"Minnesota\",\n        MS: \"Mississippi\",\n        MO: \"Missouri\",\n        MT: \"Montana\",\n        NE: \"Nebraska\",\n        NV: \"Nevada\",\n        NH: \"New Hampshire\",\n        NJ: \"New Jersey\",\n        NM: \"New Mexico\",\n        NY: \"New York\",\n        NC: \"North Carolina\",\n        ND: \"North Dakota\",\n        OH: \"Ohio\",\n        OK: \"Oklahoma\",\n        OR: \"Oregon\",\n        PA: \"Pennsylvania\",\n        PR: \"Puerto Rico\",\n        RI: \"Rhode Island\",\n        SC: \"South Carolina\",\n        SD: \"South Dakota\",\n        TN: \"Tennessee\",\n        TX: \"Texas\",\n        UT: \"Utah\",\n        VT: \"Vermont\",\n        VA: \"Virginia\",\n        WA: \"Washington\",\n        WV: \"West Virginia\",\n        WI: \"Wisconsin\",\n        WY: \"Wyoming\",\n    }\n\n    static CODES = Object.keys(USStateCodes.STATES)\n\n    static NAMES = USStateCodes.CODES.map(key => USStateCodes.STATES[key])\n\n    static ENTRIES = USStateCodes.CODES.map(key => `${key} - ${USStateCodes.STATES[key]}`)\n\n    /**\n     * Get country code (XX) for an entry from a list of `USStateCodes.NAMES`\n     */\n    static GET_CODE_FOR_NAME = (countryName = \"\") => {\n        const valueIndex = USStateCodes.NAMES.indexOf(countryName);\n        if (valueIndex > -1) return USStateCodes.CODES[valueIndex];\n        return undefined\n    }\n}","import {\n    useEligibleCountriesByCurrency,\n    useSelectedSubscriptionLineItem\n} from \"../../../data/api/query/offers.mjs\";\nimport {CountryCodes} from \"@arccosgolf/web-subscriptions/src/models\";\nimport {useAddress} from \"../../../data/redux/slices/address/address-selectors.js\";\nimport {useCurrency} from \"../../../data/redux/slices/offers/offers-slice.mjs\";\n\nexport const getDefaultCountryForCurrency = (currency: string) => {\n    switch (currency) {\n        case 'ZAR':\n            return 'ZA'\n        case 'CAD':\n            return 'CA'\n        case 'GBP':\n            return 'GB'\n        case 'JPY':\n            return 'JP'\n        case 'KRW':\n            return 'KR'\n        case 'AUD':\n            return 'AU'\n        case 'USD':\n        default:\n            return 'US'\n    }\n}\n\nexport const useEligibleCountries = () => {\n    const currency = useCurrency()\n    const eligibleCountries = useEligibleCountriesByCurrency()\n    return eligibleCountries?.[currency] || [\"ALL\"]\n}\n\nexport const useCountryList = () => {\n    const eligibleCountries = useEligibleCountries()\n    const includeAllCountries = eligibleCountries.includes('ALL')\n    const filteredCountries = Object.entries(CountryCodes.COUNTRIES)\n        .filter(([key]) => includeAllCountries || eligibleCountries.includes(key)) as [keyof typeof CountryCodes.COUNTRIES, string][]\n    return filteredCountries.map(([code, fullName]) => ({\n        code,\n        fullName\n    }))\n}\n","import React from \"react\";\n\nexport type CheckoutIconName = \"linkpro\" | \"strategy\" | \"subscription\";\n\ninterface CheckoutIconProps {\n  name: CheckoutIconName;\n  className?: string;\n}\n\nconst icons: Record<CheckoutIconName, React.ReactNode> = {\n  linkpro: (\n    <img\n      src=\"//cdn.arccosgolf.com/images/activation/alps-bc/arccos-air-product-img.webp\"\n      alt=\"Arccos Air Wearable\"\n    />\n  ),\n  strategy: (\n    <svg\n      width=\"60\"\n      height=\"60\"\n      viewBox=\"0 0 60 60\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n    >\n      <g filter=\"url(#filter0_d_1237_4480)\">\n        <circle\n          cx=\"30\"\n          cy=\"27.21\"\n          r=\"22.875\"\n          stroke=\"#252628\"\n          stroke-width=\"2.25\"\n          shape-rendering=\"crispEdges\"\n        />\n      </g>\n      <path\n        d=\"M22.2295 19.8379L29.8096 13.5352L37.3896 19.8379L29.8096 37.96L22.2295 19.8379Z\"\n        fill=\"url(#paint0_linear_1237_4480)\"\n        stroke=\"#252628\"\n        stroke-width=\"2.03494\"\n      />\n      <defs>\n        <filter\n          id=\"filter0_d_1237_4480\"\n          x=\"0\"\n          y=\"-8.58307e-06\"\n          width=\"60\"\n          height=\"60\"\n          filterUnits=\"userSpaceOnUse\"\n          color-interpolation-filters=\"sRGB\"\n        >\n          <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n          <feColorMatrix\n            in=\"SourceAlpha\"\n            type=\"matrix\"\n            values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n            result=\"hardAlpha\"\n          />\n          <feOffset dy=\"2.79\" />\n          <feGaussianBlur stdDeviation=\"3\" />\n          <feComposite in2=\"hardAlpha\" operator=\"out\" />\n          <feColorMatrix\n            type=\"matrix\"\n            values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"\n          />\n          <feBlend\n            mode=\"normal\"\n            in2=\"BackgroundImageFix\"\n            result=\"effect1_dropShadow_1237_4480\"\n          />\n          <feBlend\n            mode=\"normal\"\n            in=\"SourceGraphic\"\n            in2=\"effect1_dropShadow_1237_4480\"\n            result=\"shape\"\n          />\n        </filter>\n        <linearGradient\n          id=\"paint0_linear_1237_4480\"\n          x1=\"29.8091\"\n          y1=\"12.2109\"\n          x2=\"29.8091\"\n          y2=\"40.5967\"\n          gradientUnits=\"userSpaceOnUse\"\n        >\n          <stop offset=\"0.15\" stop-color=\"#5ABDFF\" />\n          <stop offset=\"0.6\" stop-color=\"#2862E7\" />\n        </linearGradient>\n      </defs>\n    </svg>\n  ),\n  subscription: (\n    <svg\n      width=\"60\"\n      height=\"60\"\n      viewBox=\"0 0 60 60\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n    >\n      <g filter=\"url(#filter0_d_1237_4489)\">\n        <circle\n          cx=\"30\"\n          cy=\"27.21\"\n          r=\"22.7143\"\n          stroke=\"#252628\"\n          stroke-width=\"2.57143\"\n          shape-rendering=\"crispEdges\"\n        />\n      </g>\n      <path\n        d=\"M15.9261 20.4206C16.52 19.8491 17.304 19.5594 18.1275 19.607C19.636 19.6864 20.8396 20.885 20.9347 22.3931C20.9743 23.056 20.7921 23.7148 20.42 24.2585L25.2622 30.1008L28.5959 22.3574C27.5348 21.8296 26.8776 20.7024 26.9488 19.5117C27.0359 17.9996 28.2396 16.797 29.752 16.7136C30.5756 16.674 31.3595 16.9597 31.9574 17.5273C32.5552 18.0948 32.8838 18.8648 32.8838 19.6903C32.8838 20.7976 32.2622 21.8177 31.2882 22.3296L34.5824 30.0968L39.4048 24.2546C39.0366 23.7108 38.8545 23.052 38.8941 22.3892C38.9891 20.881 40.1927 19.6864 41.7012 19.607C42.5247 19.5594 43.3047 19.8491 43.9026 20.4206C44.5004 20.9882 44.833 21.7542 44.833 22.5797C44.833 24.2228 43.4987 25.5564 41.8596 25.5564H41.7883L37.4647 35.8358C37.2826 36.2684 36.8748 36.5383 36.4076 36.5423C35.9404 36.5423 35.5366 36.2724 35.3505 35.8398L34.1587 33.0298L30.9913 36.8677C30.73 37.1813 30.342 37.3639 29.9342 37.3639C29.5263 37.3639 29.1423 37.1853 28.881 36.8677L25.6858 33.0179L24.4703 35.8517C24.2842 36.2803 23.8804 36.5423 23.4092 36.5463C22.942 36.5463 22.5382 36.2764 22.3561 35.8438L18.0285 25.5564H17.9731C16.334 25.5564 14.9997 24.2228 14.9997 22.5797C14.9997 21.7542 15.3243 20.9882 15.9261 20.4206ZM41.8596 24.068C42.6791 24.068 43.3443 23.4012 43.3443 22.5797C43.3443 21.7581 42.6791 21.0913 41.8596 21.0913C41.04 21.0913 40.3748 21.7581 40.3748 22.5797C40.3748 23.4012 41.04 24.068 41.8596 24.068ZM36.4037 34.3872L39.9037 26.0723L35.2594 31.6963L36.4037 34.3872ZM31.3991 19.6903C31.3991 18.8688 30.7339 18.202 29.9144 18.202C29.0948 18.202 28.4296 18.8688 28.4296 19.6903C28.4296 20.5119 29.0948 21.1747 29.9144 21.1747C30.7339 21.1747 31.3991 20.5079 31.3991 19.6903ZM29.8748 35.6652C29.8946 35.685 29.9302 35.6929 29.9302 35.689C29.9421 35.689 29.9658 35.689 29.9856 35.6652L33.4777 31.4343L29.946 23.1076L26.3668 31.4303L29.8748 35.6652ZM17.9691 24.068C18.7848 24.068 19.4539 23.4012 19.4539 22.5797C19.4539 21.7581 18.7848 21.0913 17.9691 21.0913C17.1535 21.0913 16.4844 21.7581 16.4844 22.5797C16.4844 23.4012 17.1496 24.068 17.9691 24.068ZM23.4132 34.3991L24.5812 31.6883L19.8973 26.0406L23.4132 34.3991Z\"\n        fill=\"#252628\"\n      />\n      <defs>\n        <filter\n          id=\"filter0_d_1237_4489\"\n          x=\"0\"\n          y=\"6.67572e-06\"\n          width=\"60\"\n          height=\"60\"\n          filterUnits=\"userSpaceOnUse\"\n          color-interpolation-filters=\"sRGB\"\n        >\n          <feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\" />\n          <feColorMatrix\n            in=\"SourceAlpha\"\n            type=\"matrix\"\n            values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\n            result=\"hardAlpha\"\n          />\n          <feOffset dy=\"2.79\" />\n          <feGaussianBlur stdDeviation=\"3\" />\n          <feComposite in2=\"hardAlpha\" operator=\"out\" />\n          <feColorMatrix\n            type=\"matrix\"\n            values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"\n          />\n          <feBlend\n            mode=\"normal\"\n            in2=\"BackgroundImageFix\"\n            result=\"effect1_dropShadow_1237_4489\"\n          />\n          <feBlend\n            mode=\"normal\"\n            in=\"SourceGraphic\"\n            in2=\"effect1_dropShadow_1237_4489\"\n            result=\"shape\"\n          />\n        </filter>\n      </defs>\n    </svg>\n  ),\n};\n\nexport const CheckoutIcon: React.FC<CheckoutIconProps> = ({\n  name,\n  className,\n}) => {\n  const icon = icons[name];\n\n  if (!icon) {\n    console.warn(`CheckoutIcon \"${name}\" not found`);\n    return null;\n  }\n\n  return <div className={className}>{icon}</div>;\n};\n","import React from \"react\";\nimport \"./link-offer.css\";\nimport {\n  Currency,\n  LineItem,\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n  useTrialPeriodDays,\n} from \"../../../../data/api/query/offers.mts\";\nimport {\n  setShouldIncludeLink,\n  useCurrency,\n  useFormatPrice,\n  useShouldIncludeLink,\n} from \"../../../../data/redux/slices/offers/offers-slice.mts\";\nimport { useDispatch } from \"react-redux\";\nimport {\n  getDynamicContentPaymentLinkCalloutBenefits,\n  getDynamicContentPaymentLinkCalloutButtonText,\n  getDynamicContentPaymentLinkCalloutImage,\n  getDynamicContentPaymentLinkCalloutTitle,\n  getDynamicContentPaymentProducts,\n} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport { localize } from \"../../../../lang/localized-content.mts\";\nimport { getPartnerFromWindowLocation } from \"../../../../util/partner-selectors.mts\";\nimport { CheckoutIcon } from \"../../alps-next/components/checkout-icon/checkout-icon.tsx\";\n\nconst linkGen2 =\n  \"https://cdn.arccosgolf.com/images/activation/universal-flow/link_gen2.png\";\n\nexport const LinkOffer: React.FC<{\n  buttonAction: () => void;\n  isAlpsNext?: boolean;\n  className?: string;\n}> = ({ buttonAction, isAlpsNext, className }) => {\n  const linkLineItem = useSelectedLinkGen2LineItem();\n  const dispatch = useDispatch();\n  const formatPrice = useFormatPrice();\n  const lineItems = useSelectedLineItems();\n  const doesOfferIncludeLink =\n    !!lineItems?.some((lineItem) =>\n      [\"link_pro\", \"link_gen_2\"].includes(lineItem?.key),\n    ) &&\n    getDynamicContentPaymentProducts().some((product) =>\n      [\"link_pro\", \"link_gen_2\"].includes(product.key),\n    );\n  const isLinkAddOnActivated = useShouldIncludeLink();\n\n  const linkDiscountDisplay = useLinkDiscountDisplay();\n\n  const linkProduct = getDynamicContentPaymentProducts().find((product) =>\n    [\"link_pro\", \"link_gen_2\"].includes(product.key),\n  );\n\n  const offerTitle = getDynamicContentPaymentLinkCalloutTitle();\n  const alpsNextBenefits = [\n    { en: \"Track shots with no phone\" },\n    { en: \"Wireless charging case (12 round battery)\" },\n    // { en: \"12 rounds battery life\" },\n  ];\n  const benefits = isAlpsNext\n    ? alpsNextBenefits\n    : getDynamicContentPaymentLinkCalloutBenefits();\n  const isLinkProTrial = linkLineItem?.charge_type === \"SCHEDULED\";\n  const partner = getPartnerFromWindowLocation();\n  const trialPeriodDays = useTrialPeriodDays();\n  const shippingLineItem = lineItems?.find(\n    (item) => item.key === \"shipping_and_handling\",\n  );\n  const shippingCost = shippingLineItem?.actual_price;\n\n  if (!doesOfferIncludeLink || (isLinkAddOnActivated && !isLinkProTrial)) {\n    return null;\n  }\n  return (\n    <div\n      className={`link-offer-container ${isLinkProTrial ? \"is-link-pro-trial\" : \"\"} ${className || \"\"}`}\n    >\n      <div className={\"link-offer\"}>\n        <div className={\"content-container\"}>\n          {isAlpsNext ? (\n            <CheckoutIcon name=\"linkpro\" className=\"link-image\" />\n          ) : (\n            <img\n              className={\"link-image\"}\n              src={getDynamicContentPaymentLinkCalloutImage()}\n              alt=\"Arccos Air\"\n            />\n          )}\n          <div className={\"text-container\"}>\n            {!isLinkProTrial && <p className={\"subheader\"}>One-Time Offer</p>}\n            <p className={\"offer-title\"}>\n              {isLinkProTrial ? (\n                isAlpsNext ? (\n                  <>\n                    Arccos Air Wearable\n                    {shippingCost != null && (\n                      <>\n                        {\" \"}\n                        <span style={{ fontWeight: 400, fontSize: \"80%\" }}>\n                          ({formatPrice(shippingCost)} shipping)\n                        </span>\n                      </>\n                    )}\n                  </>\n                ) : (\n                  `${trialPeriodDays}-Day Arccos Air Trial`\n                )\n              ) : linkDiscountDisplay ? (\n                `Arccos Air (${linkDiscountDisplay} off)`\n              ) : (\n                \"Arccos Air Wearable\"\n              )}\n            </p>\n            <ul className={\"link-benefits\"}>\n              {benefits.map((benefit, index) => (\n                <li className={\"benefit\"} key={index}>\n                  {localize(benefit)}\n                </li>\n              ))}\n            </ul>\n            <div className={\"bottom-item-wrapper\"}>\n              {isLinkProTrial ? (\n                <>\n                  <span className={\"link-pro-trial-terms\"}>\n                    {isAlpsNext ? (\n                      <span>\n                        At conclusion of free trial, if you choose not to continue your Arccos Air device must be returned.\n                        {\" \"}\n                        {isLinkProTrial ? (\n                          <a\n                            className=\"trial-info-link\"\n                            onClick={buttonAction}\n                            style={{\n                              cursor: \"pointer\",\n                              textDecoration: \"underline\",\n                            }}\n                          >\n                            Terms and conditions apply.\n                          </a>\n                        ) : (\n                          \"Terms and conditions apply.\"\n                        )}\n                      </span>\n                    ) : (\n                      \"When your free trial ends, if you choose not to continue with Arccos Air your device must be returned. \"\n                    )}\n                  </span>\n                  {isAlpsNext && (\n                    <>\n                      {!isLinkAddOnActivated && (\n                        <a\n                          className=\"action-link typography body-sm\"\n                          onClick={() => {\n                            dispatch(setShouldIncludeLink(true));\n                          }}\n                        >\n                          Add\n                        </a>\n                      )}\n                      {isLinkAddOnActivated && !linkLineItem?.is_required && (\n                        <a\n                          className=\"action-link typography body-sm\"\n                          onClick={() => {\n                            dispatch(setShouldIncludeLink(false));\n                          }}\n                        >\n                          Remove\n                        </a>\n                      )}\n                    </>\n                  )}\n                </>\n              ) : (\n                <button\n                  className={\"learn-more-button\"}\n                  type={\"button\"}\n                  onClick={buttonAction}\n                >\n                  {localize(linkProduct?.label)}\n                </button>\n              )}\n              {!isAlpsNext && (\n                <>\n                  {!isLinkAddOnActivated && (\n                    <button\n                      className={\"action-button add-link-button\"}\n                      type={\"button\"}\n                      onClick={() => {\n                        dispatch(setShouldIncludeLink(true));\n                      }}\n                    >\n                      ADD\n                    </button>\n                  )}\n                  {isLinkAddOnActivated && !linkLineItem?.is_required && (\n                    <button\n                      className={\"action-button remove-link-button\"}\n                      type={\"button\"}\n                      onClick={() => {\n                        dispatch(setShouldIncludeLink(false));\n                      }}\n                    >\n                      REMOVE\n                    </button>\n                  )}\n                </>\n              )}\n            </div>\n          </div>\n          {!isAlpsNext && (\n            <div className={\"price-wrapper\"}>\n              <p className={\"actual-price\"}>\n                {isLinkProTrial\n                  ? \"FREE\"\n                  : formatPrice(linkLineItem?.actual_price)}\n              </p>\n              {linkLineItem?.actual_price !== linkLineItem?.original_price && (\n                <p className={\"original-price\"}>\n                  {formatPrice(linkLineItem?.original_price)}\n                </p>\n              )}\n            </div>\n          )}\n        </div>\n      </div>\n    </div>\n  );\n};\n\nexport const useLinkDiscountDisplay = () => {\n  const currency = useCurrency();\n  const linkLineItem = useSelectedLinkGen2LineItem();\n  const formatPrice = useFormatPrice();\n\n  const discountPercent =\n    1 - linkLineItem?.actual_price / linkLineItem?.original_price;\n  const formattedDiscount = Math.round(discountPercent * 100);\n\n  const discountDollarAmount =\n    linkLineItem?.original_price - linkLineItem?.actual_price;\n\n  if (!discountDollarAmount) {\n    return undefined;\n  }\n\n  const formattedDiscountDollarAmount = formatPrice(discountDollarAmount, {\n    preferredFractionDigits: 0,\n  });\n\n  return currency === \"USD\"\n    ? formattedDiscountDollarAmount\n    : `${formattedDiscount}%`;\n};\n","import React from 'react'\nimport './sensor-addon.css'\nimport {\n    useSelectedCompletionKitLineItem,\n    useSelectedShippingAndHandlingLineItem\n} from \"../../../data/api/query/offers.mjs\";\nimport {\n    setShouldIncludeSensors,\n    useFormatPrice,\n    useShouldIncludeSensors\n} from \"../../../data/redux/slices/offers/offers-slice.mjs\";\nimport {useDispatch} from \"react-redux\";\nimport {\n    getDynamicContentOptionalSensorsCalloutBodyText,\n    getDynamicContentOptionalSensorsCalloutButtonText,\n    getDynamicContentOptionalSensorsCalloutSensorImage,\n    getDynamicContentOptionalSensorsCalloutShippingDisclaimer,\n    getDynamicContentOptionalSensorsCalloutTitle\n} from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../lang/localized-content.mjs\";\n\n\nexport const SensorAddon: React.FC = () => {\n    const shippingLineItem = useSelectedShippingAndHandlingLineItem()\n    const dispatch = useDispatch()\n    const formatPrice = useFormatPrice()\n    const isSensorAddonActivated = useShouldIncludeSensors()\n    const isCKOptional = useSelectedCompletionKitLineItem()?.is_required === false\n\n\n    if (!(isCKOptional && !isSensorAddonActivated)) {\n        return null\n    }\n\n    return (\n        <div className={'sensor-offer-container'}>\n            <div className={'sensor-offer-title-wrapper'}>\n                <h3 className={'sensor-offer-title'}>{localize(getDynamicContentOptionalSensorsCalloutTitle())}</h3>\n            </div>\n            <div className={'sensor-offer'}>\n                <div className={'content-container'}>\n                    <img className={'sensor-image'} src={getDynamicContentOptionalSensorsCalloutSensorImage()}/>\n                    <div>\n                        <p className={'sensor-body-text'}>{localize(getDynamicContentOptionalSensorsCalloutBodyText())}</p>\n                        <p className={'sensor-body-text shipping'}>\n                            {localize(getDynamicContentOptionalSensorsCalloutShippingDisclaimer(), {\n                                values: {\n                                    shipping_price: `${formatPrice(shippingLineItem?.actual_price)}`\n                                }\n                            })}\n                        </p>\n                    </div>\n\n                </div>\n                <button\n                    className={'add-sensor-button'}\n                    type={'button'}\n                    onClick={() => {\n                        dispatch(setShouldIncludeSensors(true))\n                    }}\n                >\n                    {localize(getDynamicContentOptionalSensorsCalloutButtonText())}\n                </button>\n            </div>\n        </div>\n    )\n}\n","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n  if (typeof object === 'object' && object !== null) {\n    var $$typeof = object.$$typeof;\n\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        var type = object.type;\n\n        switch (type) {\n          case REACT_ASYNC_MODE_TYPE:\n          case REACT_CONCURRENT_MODE_TYPE:\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n            return type;\n\n          default:\n            var $$typeofType = type && type.$$typeof;\n\n            switch ($$typeofType) {\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n              case REACT_PROVIDER_TYPE:\n                return $$typeofType;\n\n              default:\n                return $$typeof;\n            }\n\n        }\n\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n\n  return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n    }\n  }\n\n  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n  return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n  return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n  return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n  return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n  return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n  return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n  return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n  return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n  return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n  })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n  var has = require('./lib/has');\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) { /**/ }\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n              'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          );\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n  if (process.env.NODE_ENV !== 'production') {\n    loggedTypeFailures = {};\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bigint: createPrimitiveTypeChecker('bigint'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    elementType: createElementTypeTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message, data) {\n    this.message = message;\n    this.data = data && typeof data === 'object' ? data: {};\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError(\n          'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n          {expectedType: expectedType}\n        );\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!ReactIs.isValidElementType(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (arguments.length > 1) {\n          printWarning(\n            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n          );\n        } else {\n          printWarning('Invalid argument supplied to oneOf, expected an array.');\n        }\n      }\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n        var type = getPreciseType(value);\n        if (type === 'symbol') {\n          return String(value);\n        }\n        return value;\n      });\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (has(propValue, key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var expectedTypes = [];\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n        if (checkerResult == null) {\n          return null;\n        }\n        if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n          expectedTypes.push(checkerResult.data.expectedType);\n        }\n      }\n      var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function invalidValidatorError(componentName, location, propFullName, key, type) {\n    return new PropTypeError(\n      (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n      'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n    );\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (has(shapeTypes, key) && typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // falsy value can't be a Symbol\n    if (!propValue) {\n      return false;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n\n    if (enumerableOnly) {\n      symbols = symbols.filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n      });\n    }\n\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nfunction _slicedToArray(arr, i) {\n  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n  var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n\n  var _s, _e;\n\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar useAttachEvent = function useAttachEvent(element, event, cb) {\n  var cbDefined = !!cb;\n  var cbRef = React.useRef(cb); // In many integrations the callback prop changes on each render.\n  // Using a ref saves us from calling element.on/.off every render.\n\n  React.useEffect(function () {\n    cbRef.current = cb;\n  }, [cb]);\n  React.useEffect(function () {\n    if (!cbDefined || !element) {\n      return function () {};\n    }\n\n    var decoratedCb = function decoratedCb() {\n      if (cbRef.current) {\n        cbRef.current.apply(cbRef, arguments);\n      }\n    };\n\n    element.on(event, decoratedCb);\n    return function () {\n      element.off(event, decoratedCb);\n    };\n  }, [cbDefined, event, element, cbRef]);\n};\n\nvar usePrevious = function usePrevious(value) {\n  var ref = React.useRef(value);\n  React.useEffect(function () {\n    ref.current = value;\n  }, [value]);\n  return ref.current;\n};\n\nvar isUnknownObject = function isUnknownObject(raw) {\n  return raw !== null && _typeof(raw) === 'object';\n};\nvar isPromise = function isPromise(raw) {\n  return isUnknownObject(raw) && typeof raw.then === 'function';\n}; // We are using types to enforce the `stripe` prop in this lib,\n// but in an untyped integration `stripe` could be anything, so we need\n// to do some sanity validation to prevent type errors.\n\nvar isStripe = function isStripe(raw) {\n  return isUnknownObject(raw) && typeof raw.elements === 'function' && typeof raw.createToken === 'function' && typeof raw.createPaymentMethod === 'function' && typeof raw.confirmCardPayment === 'function';\n};\n\nvar PLAIN_OBJECT_STR = '[object Object]';\nvar isEqual = function isEqual(left, right) {\n  if (!isUnknownObject(left) || !isUnknownObject(right)) {\n    return left === right;\n  }\n\n  var leftArray = Array.isArray(left);\n  var rightArray = Array.isArray(right);\n  if (leftArray !== rightArray) return false;\n  var leftPlainObject = Object.prototype.toString.call(left) === PLAIN_OBJECT_STR;\n  var rightPlainObject = Object.prototype.toString.call(right) === PLAIN_OBJECT_STR;\n  if (leftPlainObject !== rightPlainObject) return false; // not sure what sort of special object this is (regexp is one option), so\n  // fallback to reference check.\n\n  if (!leftPlainObject && !leftArray) return left === right;\n  var leftKeys = Object.keys(left);\n  var rightKeys = Object.keys(right);\n  if (leftKeys.length !== rightKeys.length) return false;\n  var keySet = {};\n\n  for (var i = 0; i < leftKeys.length; i += 1) {\n    keySet[leftKeys[i]] = true;\n  }\n\n  for (var _i = 0; _i < rightKeys.length; _i += 1) {\n    keySet[rightKeys[_i]] = true;\n  }\n\n  var allKeys = Object.keys(keySet);\n\n  if (allKeys.length !== leftKeys.length) {\n    return false;\n  }\n\n  var l = left;\n  var r = right;\n\n  var pred = function pred(key) {\n    return isEqual(l[key], r[key]);\n  };\n\n  return allKeys.every(pred);\n};\n\nvar extractAllowedOptionsUpdates = function extractAllowedOptionsUpdates(options, prevOptions, immutableKeys) {\n  if (!isUnknownObject(options)) {\n    return null;\n  }\n\n  return Object.keys(options).reduce(function (newOptions, key) {\n    var isUpdated = !isUnknownObject(prevOptions) || !isEqual(options[key], prevOptions[key]);\n\n    if (immutableKeys.includes(key)) {\n      if (isUpdated) {\n        console.warn(\"Unsupported prop change: options.\".concat(key, \" is not a mutable property.\"));\n      }\n\n      return newOptions;\n    }\n\n    if (!isUpdated) {\n      return newOptions;\n    }\n\n    return _objectSpread2(_objectSpread2({}, newOptions || {}), {}, _defineProperty({}, key, options[key]));\n  }, null);\n};\n\nvar INVALID_STRIPE_ERROR$2 = 'Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.'; // We are using types to enforce the `stripe` prop in this lib, but in a real\n// integration `stripe` could be anything, so we need to do some sanity\n// validation to prevent type errors.\n\nvar validateStripe = function validateStripe(maybeStripe) {\n  var errorMsg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INVALID_STRIPE_ERROR$2;\n\n  if (maybeStripe === null || isStripe(maybeStripe)) {\n    return maybeStripe;\n  }\n\n  throw new Error(errorMsg);\n};\n\nvar parseStripeProp = function parseStripeProp(raw) {\n  var errorMsg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : INVALID_STRIPE_ERROR$2;\n\n  if (isPromise(raw)) {\n    return {\n      tag: 'async',\n      stripePromise: Promise.resolve(raw).then(function (result) {\n        return validateStripe(result, errorMsg);\n      })\n    };\n  }\n\n  var stripe = validateStripe(raw, errorMsg);\n\n  if (stripe === null) {\n    return {\n      tag: 'empty'\n    };\n  }\n\n  return {\n    tag: 'sync',\n    stripe: stripe\n  };\n};\n\nvar registerWithStripeJs = function registerWithStripeJs(stripe) {\n  if (!stripe || !stripe._registerWrapper || !stripe.registerAppInfo) {\n    return;\n  }\n\n  stripe._registerWrapper({\n    name: 'react-stripe-js',\n    version: \"3.10.0\"\n  });\n\n  stripe.registerAppInfo({\n    name: 'react-stripe-js',\n    version: \"3.10.0\",\n    url: 'https://stripe.com/docs/stripe-js/react'\n  });\n};\n\nvar ElementsContext = /*#__PURE__*/React.createContext(null);\nElementsContext.displayName = 'ElementsContext';\nvar parseElementsContext = function parseElementsContext(ctx, useCase) {\n  if (!ctx) {\n    throw new Error(\"Could not find Elements context; You need to wrap the part of your app that \".concat(useCase, \" in an <Elements> provider.\"));\n  }\n\n  return ctx;\n};\n/**\n * The `Elements` provider allows you to use [Element components](https://stripe.com/docs/stripe-js/react#element-components) and access the [Stripe object](https://stripe.com/docs/js/initializing) in any nested component.\n * Render an `Elements` provider at the root of your React app so that it is available everywhere you need it.\n *\n * To use the `Elements` provider, call `loadStripe` from `@stripe/stripe-js` with your publishable key.\n * The `loadStripe` function will asynchronously load the Stripe.js script and initialize a `Stripe` object.\n * Pass the returned `Promise` to `Elements`.\n *\n * @docs https://docs.stripe.com/sdks/stripejs-react?ui=elements#elements-provider\n */\n\nvar Elements = function Elements(_ref) {\n  var rawStripeProp = _ref.stripe,\n      options = _ref.options,\n      children = _ref.children;\n  var parsed = React.useMemo(function () {\n    return parseStripeProp(rawStripeProp);\n  }, [rawStripeProp]); // For a sync stripe instance, initialize into context\n\n  var _React$useState = React.useState(function () {\n    return {\n      stripe: parsed.tag === 'sync' ? parsed.stripe : null,\n      elements: parsed.tag === 'sync' ? parsed.stripe.elements(options) : null\n    };\n  }),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      ctx = _React$useState2[0],\n      setContext = _React$useState2[1];\n\n  React.useEffect(function () {\n    var isMounted = true;\n\n    var safeSetContext = function safeSetContext(stripe) {\n      setContext(function (ctx) {\n        // no-op if we already have a stripe instance (https://github.com/stripe/react-stripe-js/issues/296)\n        if (ctx.stripe) return ctx;\n        return {\n          stripe: stripe,\n          elements: stripe.elements(options)\n        };\n      });\n    }; // For an async stripePromise, store it in context once resolved\n\n\n    if (parsed.tag === 'async' && !ctx.stripe) {\n      parsed.stripePromise.then(function (stripe) {\n        if (stripe && isMounted) {\n          // Only update Elements context if the component is still mounted\n          // and stripe is not null. We allow stripe to be null to make\n          // handling SSR easier.\n          safeSetContext(stripe);\n        }\n      });\n    } else if (parsed.tag === 'sync' && !ctx.stripe) {\n      // Or, handle a sync stripe instance going from null -> populated\n      safeSetContext(parsed.stripe);\n    }\n\n    return function () {\n      isMounted = false;\n    };\n  }, [parsed, ctx, options]); // Warn on changes to stripe prop\n\n  var prevStripe = usePrevious(rawStripeProp);\n  React.useEffect(function () {\n    if (prevStripe !== null && prevStripe !== rawStripeProp) {\n      console.warn('Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.');\n    }\n  }, [prevStripe, rawStripeProp]); // Apply updates to elements when options prop has relevant changes\n\n  var prevOptions = usePrevious(options);\n  React.useEffect(function () {\n    if (!ctx.elements) {\n      return;\n    }\n\n    var updates = extractAllowedOptionsUpdates(options, prevOptions, ['clientSecret', 'fonts']);\n\n    if (updates) {\n      ctx.elements.update(updates);\n    }\n  }, [options, prevOptions, ctx.elements]); // Attach react-stripe-js version to stripe.js instance\n\n  React.useEffect(function () {\n    registerWithStripeJs(ctx.stripe);\n  }, [ctx.stripe]);\n  return /*#__PURE__*/React.createElement(ElementsContext.Provider, {\n    value: ctx\n  }, children);\n};\nElements.propTypes = {\n  stripe: PropTypes.any,\n  options: PropTypes.object\n};\nvar useElementsContextWithUseCase = function useElementsContextWithUseCase(useCaseMessage) {\n  var ctx = React.useContext(ElementsContext);\n  return parseElementsContext(ctx, useCaseMessage);\n};\n/**\n * @docs https://stripe.com/docs/stripe-js/react#useelements-hook\n */\n\nvar useElements = function useElements() {\n  var _useElementsContextWi = useElementsContextWithUseCase('calls useElements()'),\n      elements = _useElementsContextWi.elements;\n\n  return elements;\n};\n/**\n * @docs https://stripe.com/docs/stripe-js/react#elements-consumer\n */\n\nvar ElementsConsumer = function ElementsConsumer(_ref2) {\n  var children = _ref2.children;\n  var ctx = useElementsContextWithUseCase('mounts <ElementsConsumer>'); // Assert to satisfy the busted React.FC return type (it should be ReactNode)\n\n  return children(ctx);\n};\nElementsConsumer.propTypes = {\n  children: PropTypes.func.isRequired\n};\n\nvar _excluded$1 = [\"on\", \"session\"];\nvar CheckoutSdkContext = /*#__PURE__*/React.createContext(null);\nCheckoutSdkContext.displayName = 'CheckoutSdkContext';\nvar parseCheckoutSdkContext = function parseCheckoutSdkContext(ctx, useCase) {\n  if (!ctx) {\n    throw new Error(\"Could not find CheckoutProvider context; You need to wrap the part of your app that \".concat(useCase, \" in an <CheckoutProvider> provider.\"));\n  }\n\n  return ctx;\n};\nvar CheckoutContext = /*#__PURE__*/React.createContext(null);\nCheckoutContext.displayName = 'CheckoutContext';\nvar extractCheckoutContextValue = function extractCheckoutContextValue(checkoutSdk, sessionState) {\n  if (!checkoutSdk) {\n    return null;\n  }\n\n  checkoutSdk.on;\n      checkoutSdk.session;\n      var actions = _objectWithoutProperties(checkoutSdk, _excluded$1);\n\n  if (!sessionState) {\n    return Object.assign(checkoutSdk.session(), actions);\n  }\n\n  return Object.assign(sessionState, actions);\n};\nvar INVALID_STRIPE_ERROR$1 = 'Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.';\nvar CheckoutProvider = function CheckoutProvider(_ref) {\n  var rawStripeProp = _ref.stripe,\n      options = _ref.options,\n      children = _ref.children;\n  var parsed = React.useMemo(function () {\n    return parseStripeProp(rawStripeProp, INVALID_STRIPE_ERROR$1);\n  }, [rawStripeProp]); // State used to trigger a re-render when sdk.session is updated\n\n  var _React$useState = React.useState(null),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      session = _React$useState2[0],\n      setSession = _React$useState2[1];\n\n  var _React$useState3 = React.useState(function () {\n    return {\n      stripe: parsed.tag === 'sync' ? parsed.stripe : null,\n      checkoutSdk: null\n    };\n  }),\n      _React$useState4 = _slicedToArray(_React$useState3, 2),\n      ctx = _React$useState4[0],\n      setContext = _React$useState4[1];\n\n  var safeSetContext = function safeSetContext(stripe, checkoutSdk) {\n    setContext(function (ctx) {\n      if (ctx.stripe && ctx.checkoutSdk) {\n        return ctx;\n      }\n\n      return {\n        stripe: stripe,\n        checkoutSdk: checkoutSdk\n      };\n    });\n  }; // Ref used to avoid calling initCheckout multiple times when options changes\n\n\n  var initCheckoutCalledRef = React.useRef(false);\n  React.useEffect(function () {\n    var isMounted = true;\n\n    if (parsed.tag === 'async' && !ctx.stripe) {\n      parsed.stripePromise.then(function (stripe) {\n        if (stripe && isMounted && !initCheckoutCalledRef.current) {\n          // Only update context if the component is still mounted\n          // and stripe is not null. We allow stripe to be null to make\n          // handling SSR easier.\n          initCheckoutCalledRef.current = true;\n          stripe.initCheckout(options).then(function (checkoutSdk) {\n            if (checkoutSdk) {\n              safeSetContext(stripe, checkoutSdk);\n              checkoutSdk.on('change', setSession);\n            }\n          });\n        }\n      });\n    } else if (parsed.tag === 'sync' && parsed.stripe && !initCheckoutCalledRef.current) {\n      initCheckoutCalledRef.current = true;\n      parsed.stripe.initCheckout(options).then(function (checkoutSdk) {\n        if (checkoutSdk) {\n          safeSetContext(parsed.stripe, checkoutSdk);\n          checkoutSdk.on('change', setSession);\n        }\n      });\n    }\n\n    return function () {\n      isMounted = false;\n    };\n  }, [parsed, ctx, options, setSession]); // Warn on changes to stripe prop\n\n  var prevStripe = usePrevious(rawStripeProp);\n  React.useEffect(function () {\n    if (prevStripe !== null && prevStripe !== rawStripeProp) {\n      console.warn('Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.');\n    }\n  }, [prevStripe, rawStripeProp]); // Apply updates to elements when options prop has relevant changes\n\n  var prevOptions = usePrevious(options);\n  var prevCheckoutSdk = usePrevious(ctx.checkoutSdk);\n  React.useEffect(function () {\n    var _prevOptions$elements, _options$elementsOpti, _prevOptions$elements2, _options$elementsOpti2;\n\n    // Ignore changes while checkout sdk is not initialized.\n    if (!ctx.checkoutSdk) {\n      return;\n    }\n\n    var hasSdkLoaded = Boolean(!prevCheckoutSdk && ctx.checkoutSdk); // Handle appearance changes\n\n    var previousAppearance = prevOptions === null || prevOptions === void 0 ? void 0 : (_prevOptions$elements = prevOptions.elementsOptions) === null || _prevOptions$elements === void 0 ? void 0 : _prevOptions$elements.appearance;\n    var currentAppearance = options === null || options === void 0 ? void 0 : (_options$elementsOpti = options.elementsOptions) === null || _options$elementsOpti === void 0 ? void 0 : _options$elementsOpti.appearance;\n    var hasAppearanceChanged = !isEqual(currentAppearance, previousAppearance);\n\n    if (currentAppearance && (hasAppearanceChanged || hasSdkLoaded)) {\n      ctx.checkoutSdk.changeAppearance(currentAppearance);\n    } // Handle fonts changes\n\n\n    var previousFonts = prevOptions === null || prevOptions === void 0 ? void 0 : (_prevOptions$elements2 = prevOptions.elementsOptions) === null || _prevOptions$elements2 === void 0 ? void 0 : _prevOptions$elements2.fonts;\n    var currentFonts = options === null || options === void 0 ? void 0 : (_options$elementsOpti2 = options.elementsOptions) === null || _options$elementsOpti2 === void 0 ? void 0 : _options$elementsOpti2.fonts;\n    var hasFontsChanged = !isEqual(previousFonts, currentFonts);\n\n    if (currentFonts && (hasFontsChanged || hasSdkLoaded)) {\n      ctx.checkoutSdk.loadFonts(currentFonts);\n    }\n  }, [options, prevOptions, ctx.checkoutSdk, prevCheckoutSdk]); // Attach react-stripe-js version to stripe.js instance\n\n  React.useEffect(function () {\n    registerWithStripeJs(ctx.stripe);\n  }, [ctx.stripe]);\n  var checkoutContextValue = React.useMemo(function () {\n    return extractCheckoutContextValue(ctx.checkoutSdk, session);\n  }, [ctx.checkoutSdk, session]);\n\n  if (!ctx.checkoutSdk) {\n    return null;\n  }\n\n  return /*#__PURE__*/React.createElement(CheckoutSdkContext.Provider, {\n    value: ctx\n  }, /*#__PURE__*/React.createElement(CheckoutContext.Provider, {\n    value: checkoutContextValue\n  }, children));\n};\nCheckoutProvider.propTypes = {\n  stripe: PropTypes.any,\n  options: PropTypes.shape({\n    fetchClientSecret: PropTypes.func.isRequired,\n    elementsOptions: PropTypes.object\n  }).isRequired\n};\nvar useCheckoutSdkContextWithUseCase = function useCheckoutSdkContextWithUseCase(useCaseString) {\n  var ctx = React.useContext(CheckoutSdkContext);\n  return parseCheckoutSdkContext(ctx, useCaseString);\n};\nvar useElementsOrCheckoutSdkContextWithUseCase = function useElementsOrCheckoutSdkContextWithUseCase(useCaseString) {\n  var checkoutSdkContext = React.useContext(CheckoutSdkContext);\n  var elementsContext = React.useContext(ElementsContext);\n\n  if (checkoutSdkContext && elementsContext) {\n    throw new Error(\"You cannot wrap the part of your app that \".concat(useCaseString, \" in both <CheckoutProvider> and <Elements> providers.\"));\n  }\n\n  if (checkoutSdkContext) {\n    return parseCheckoutSdkContext(checkoutSdkContext, useCaseString);\n  }\n\n  return parseElementsContext(elementsContext, useCaseString);\n};\nvar useCheckout = function useCheckout() {\n  // ensure it's in CheckoutProvider\n  useCheckoutSdkContextWithUseCase('calls useCheckout()');\n  var ctx = React.useContext(CheckoutContext);\n\n  if (!ctx) {\n    throw new Error('Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.');\n  }\n\n  return ctx;\n};\n\nvar _excluded = [\"mode\"];\n\nvar capitalized = function capitalized(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\nvar createElementComponent = function createElementComponent(type, isServer) {\n  var displayName = \"\".concat(capitalized(type), \"Element\");\n\n  var ClientElement = function ClientElement(_ref) {\n    var id = _ref.id,\n        className = _ref.className,\n        _ref$options = _ref.options,\n        options = _ref$options === void 0 ? {} : _ref$options,\n        onBlur = _ref.onBlur,\n        onFocus = _ref.onFocus,\n        onReady = _ref.onReady,\n        onChange = _ref.onChange,\n        onEscape = _ref.onEscape,\n        onClick = _ref.onClick,\n        onLoadError = _ref.onLoadError,\n        onLoaderStart = _ref.onLoaderStart,\n        onNetworksChange = _ref.onNetworksChange,\n        onConfirm = _ref.onConfirm,\n        onCancel = _ref.onCancel,\n        onShippingAddressChange = _ref.onShippingAddressChange,\n        onShippingRateChange = _ref.onShippingRateChange,\n        onSavedPaymentMethodRemove = _ref.onSavedPaymentMethodRemove,\n        onSavedPaymentMethodUpdate = _ref.onSavedPaymentMethodUpdate;\n    var ctx = useElementsOrCheckoutSdkContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n    var elements = 'elements' in ctx ? ctx.elements : null;\n    var checkoutSdk = 'checkoutSdk' in ctx ? ctx.checkoutSdk : null;\n\n    var _React$useState = React.useState(null),\n        _React$useState2 = _slicedToArray(_React$useState, 2),\n        element = _React$useState2[0],\n        setElement = _React$useState2[1];\n\n    var elementRef = React.useRef(null);\n    var domNode = React.useRef(null); // For every event where the merchant provides a callback, call element.on\n    // with that callback. If the merchant ever changes the callback, removes\n    // the old callback with element.off and then call element.on with the new one.\n\n    useAttachEvent(element, 'blur', onBlur);\n    useAttachEvent(element, 'focus', onFocus);\n    useAttachEvent(element, 'escape', onEscape);\n    useAttachEvent(element, 'click', onClick);\n    useAttachEvent(element, 'loaderror', onLoadError);\n    useAttachEvent(element, 'loaderstart', onLoaderStart);\n    useAttachEvent(element, 'networkschange', onNetworksChange);\n    useAttachEvent(element, 'confirm', onConfirm);\n    useAttachEvent(element, 'cancel', onCancel);\n    useAttachEvent(element, 'shippingaddresschange', onShippingAddressChange);\n    useAttachEvent(element, 'shippingratechange', onShippingRateChange);\n    useAttachEvent(element, 'savedpaymentmethodremove', onSavedPaymentMethodRemove);\n    useAttachEvent(element, 'savedpaymentmethodupdate', onSavedPaymentMethodUpdate);\n    useAttachEvent(element, 'change', onChange);\n    var readyCallback;\n\n    if (onReady) {\n      if (type === 'expressCheckout') {\n        // Passes through the event, which includes visible PM types\n        readyCallback = onReady;\n      } else {\n        // For other Elements, pass through the Element itself.\n        readyCallback = function readyCallback() {\n          onReady(element);\n        };\n      }\n    }\n\n    useAttachEvent(element, 'ready', readyCallback);\n    React.useLayoutEffect(function () {\n      if (elementRef.current === null && domNode.current !== null && (elements || checkoutSdk)) {\n        var newElement = null;\n\n        if (checkoutSdk) {\n          switch (type) {\n            case 'payment':\n              newElement = checkoutSdk.createPaymentElement(options);\n              break;\n\n            case 'address':\n              if ('mode' in options) {\n                var mode = options.mode,\n                    restOptions = _objectWithoutProperties(options, _excluded);\n\n                if (mode === 'shipping') {\n                  newElement = checkoutSdk.createShippingAddressElement(restOptions);\n                } else if (mode === 'billing') {\n                  newElement = checkoutSdk.createBillingAddressElement(restOptions);\n                } else {\n                  throw new Error(\"Invalid options.mode. mode must be 'billing' or 'shipping'.\");\n                }\n              } else {\n                throw new Error(\"You must supply options.mode. mode must be 'billing' or 'shipping'.\");\n              }\n\n              break;\n\n            case 'expressCheckout':\n              newElement = checkoutSdk.createExpressCheckoutElement(options);\n              break;\n\n            case 'currencySelector':\n              newElement = checkoutSdk.createCurrencySelectorElement();\n              break;\n\n            case 'taxId':\n              newElement = checkoutSdk.createTaxIdElement(options);\n              break;\n\n            default:\n              throw new Error(\"Invalid Element type \".concat(displayName, \". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />.\"));\n          }\n        } else if (elements) {\n          newElement = elements.create(type, options);\n        } // Store element in a ref to ensure it's _immediately_ available in cleanup hooks in StrictMode\n\n\n        elementRef.current = newElement; // Store element in state to facilitate event listener attachment\n\n        setElement(newElement);\n\n        if (newElement) {\n          newElement.mount(domNode.current);\n        }\n      }\n    }, [elements, checkoutSdk, options]);\n    var prevOptions = usePrevious(options);\n    React.useEffect(function () {\n      if (!elementRef.current) {\n        return;\n      }\n\n      var updates = extractAllowedOptionsUpdates(options, prevOptions, ['paymentRequest']);\n\n      if (updates && 'update' in elementRef.current) {\n        elementRef.current.update(updates);\n      }\n    }, [options, prevOptions]);\n    React.useLayoutEffect(function () {\n      return function () {\n        if (elementRef.current && typeof elementRef.current.destroy === 'function') {\n          try {\n            elementRef.current.destroy();\n            elementRef.current = null;\n          } catch (error) {// Do nothing\n          }\n        }\n      };\n    }, []);\n    return /*#__PURE__*/React.createElement(\"div\", {\n      id: id,\n      className: className,\n      ref: domNode\n    });\n  }; // Only render the Element wrapper in a server environment.\n\n\n  var ServerElement = function ServerElement(props) {\n    useElementsOrCheckoutSdkContextWithUseCase(\"mounts <\".concat(displayName, \">\"));\n    var id = props.id,\n        className = props.className;\n    return /*#__PURE__*/React.createElement(\"div\", {\n      id: id,\n      className: className\n    });\n  };\n\n  var Element = isServer ? ServerElement : ClientElement;\n  Element.propTypes = {\n    id: PropTypes.string,\n    className: PropTypes.string,\n    onChange: PropTypes.func,\n    onBlur: PropTypes.func,\n    onFocus: PropTypes.func,\n    onReady: PropTypes.func,\n    onEscape: PropTypes.func,\n    onClick: PropTypes.func,\n    onLoadError: PropTypes.func,\n    onLoaderStart: PropTypes.func,\n    onNetworksChange: PropTypes.func,\n    onConfirm: PropTypes.func,\n    onCancel: PropTypes.func,\n    onShippingAddressChange: PropTypes.func,\n    onShippingRateChange: PropTypes.func,\n    onSavedPaymentMethodRemove: PropTypes.func,\n    onSavedPaymentMethodUpdate: PropTypes.func,\n    options: PropTypes.object\n  };\n  Element.displayName = displayName;\n  Element.__elementType = type;\n  return Element;\n};\n\nvar isServer = typeof window === 'undefined';\n\nvar EmbeddedCheckoutContext = /*#__PURE__*/React.createContext(null);\nEmbeddedCheckoutContext.displayName = 'EmbeddedCheckoutProviderContext';\nvar useEmbeddedCheckoutContext = function useEmbeddedCheckoutContext() {\n  var ctx = React.useContext(EmbeddedCheckoutContext);\n\n  if (!ctx) {\n    throw new Error('<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>');\n  }\n\n  return ctx;\n};\nvar INVALID_STRIPE_ERROR = 'Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.';\nvar EmbeddedCheckoutProvider = function EmbeddedCheckoutProvider(_ref) {\n  var rawStripeProp = _ref.stripe,\n      options = _ref.options,\n      children = _ref.children;\n  var parsed = React.useMemo(function () {\n    return parseStripeProp(rawStripeProp, INVALID_STRIPE_ERROR);\n  }, [rawStripeProp]);\n  var embeddedCheckoutPromise = React.useRef(null);\n  var loadedStripe = React.useRef(null);\n\n  var _React$useState = React.useState({\n    embeddedCheckout: null\n  }),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      ctx = _React$useState2[0],\n      setContext = _React$useState2[1];\n\n  React.useEffect(function () {\n    // Don't support any ctx updates once embeddedCheckout or stripe is set.\n    if (loadedStripe.current || embeddedCheckoutPromise.current) {\n      return;\n    }\n\n    var setStripeAndInitEmbeddedCheckout = function setStripeAndInitEmbeddedCheckout(stripe) {\n      if (loadedStripe.current || embeddedCheckoutPromise.current) return;\n      loadedStripe.current = stripe;\n      embeddedCheckoutPromise.current = loadedStripe.current.initEmbeddedCheckout(options).then(function (embeddedCheckout) {\n        setContext({\n          embeddedCheckout: embeddedCheckout\n        });\n      });\n    }; // For an async stripePromise, store it once resolved\n\n\n    if (parsed.tag === 'async' && !loadedStripe.current && (options.clientSecret || options.fetchClientSecret)) {\n      parsed.stripePromise.then(function (stripe) {\n        if (stripe) {\n          setStripeAndInitEmbeddedCheckout(stripe);\n        }\n      });\n    } else if (parsed.tag === 'sync' && !loadedStripe.current && (options.clientSecret || options.fetchClientSecret)) {\n      // Or, handle a sync stripe instance going from null -> populated\n      setStripeAndInitEmbeddedCheckout(parsed.stripe);\n    }\n  }, [parsed, options, ctx, loadedStripe]);\n  React.useEffect(function () {\n    // cleanup on unmount\n    return function () {\n      // If embedded checkout is fully initialized, destroy it.\n      if (ctx.embeddedCheckout) {\n        embeddedCheckoutPromise.current = null;\n        ctx.embeddedCheckout.destroy();\n      } else if (embeddedCheckoutPromise.current) {\n        // If embedded checkout is still initializing, destroy it once\n        // it's done. This could be caused by unmounting very quickly\n        // after mounting.\n        embeddedCheckoutPromise.current.then(function () {\n          embeddedCheckoutPromise.current = null;\n\n          if (ctx.embeddedCheckout) {\n            ctx.embeddedCheckout.destroy();\n          }\n        });\n      }\n    };\n  }, [ctx.embeddedCheckout]); // Attach react-stripe-js version to stripe.js instance\n\n  React.useEffect(function () {\n    registerWithStripeJs(loadedStripe);\n  }, [loadedStripe]); // Warn on changes to stripe prop.\n  // The stripe prop value can only go from null to non-null once and\n  // can't be changed after that.\n\n  var prevStripe = usePrevious(rawStripeProp);\n  React.useEffect(function () {\n    if (prevStripe !== null && prevStripe !== rawStripeProp) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.');\n    }\n  }, [prevStripe, rawStripeProp]); // Warn on changes to options.\n\n  var prevOptions = usePrevious(options);\n  React.useEffect(function () {\n    if (prevOptions == null) {\n      return;\n    }\n\n    if (options == null) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.');\n      return;\n    }\n\n    if (options.clientSecret === undefined && options.fetchClientSecret === undefined) {\n      console.warn('Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`.');\n    }\n\n    if (prevOptions.clientSecret != null && options.clientSecret !== prevOptions.clientSecret) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead.');\n    }\n\n    if (prevOptions.fetchClientSecret != null && options.fetchClientSecret !== prevOptions.fetchClientSecret) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead.');\n    }\n\n    if (prevOptions.onComplete != null && options.onComplete !== prevOptions.onComplete) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it.');\n    }\n\n    if (prevOptions.onShippingDetailsChange != null && options.onShippingDetailsChange !== prevOptions.onShippingDetailsChange) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it.');\n    }\n\n    if (prevOptions.onLineItemsChange != null && options.onLineItemsChange !== prevOptions.onLineItemsChange) {\n      console.warn('Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.');\n    }\n  }, [prevOptions, options]);\n  return /*#__PURE__*/React.createElement(EmbeddedCheckoutContext.Provider, {\n    value: ctx\n  }, children);\n};\n\nvar EmbeddedCheckoutClientElement = function EmbeddedCheckoutClientElement(_ref) {\n  var id = _ref.id,\n      className = _ref.className;\n\n  var _useEmbeddedCheckoutC = useEmbeddedCheckoutContext(),\n      embeddedCheckout = _useEmbeddedCheckoutC.embeddedCheckout;\n\n  var isMounted = React.useRef(false);\n  var domNode = React.useRef(null);\n  React.useLayoutEffect(function () {\n    if (!isMounted.current && embeddedCheckout && domNode.current !== null) {\n      embeddedCheckout.mount(domNode.current);\n      isMounted.current = true;\n    } // Clean up on unmount\n\n\n    return function () {\n      if (isMounted.current && embeddedCheckout) {\n        try {\n          embeddedCheckout.unmount();\n          isMounted.current = false;\n        } catch (e) {// Do nothing.\n          // Parent effects are destroyed before child effects, so\n          // in cases where both the EmbeddedCheckoutProvider and\n          // the EmbeddedCheckout component are removed at the same\n          // time, the embeddedCheckout instance will be destroyed,\n          // which causes an error when calling unmount.\n        }\n      }\n    };\n  }, [embeddedCheckout]);\n  return /*#__PURE__*/React.createElement(\"div\", {\n    ref: domNode,\n    id: id,\n    className: className\n  });\n}; // Only render the wrapper in a server environment.\n\n\nvar EmbeddedCheckoutServerElement = function EmbeddedCheckoutServerElement(_ref2) {\n  var id = _ref2.id,\n      className = _ref2.className;\n  // Validate that we are in the right context by calling useEmbeddedCheckoutContext.\n  useEmbeddedCheckoutContext();\n  return /*#__PURE__*/React.createElement(\"div\", {\n    id: id,\n    className: className\n  });\n};\n\nvar EmbeddedCheckout = isServer ? EmbeddedCheckoutServerElement : EmbeddedCheckoutClientElement;\n\n/**\n * @docs https://stripe.com/docs/stripe-js/react#usestripe-hook\n */\n\nvar useStripe = function useStripe() {\n  var _useElementsOrCheckou = useElementsOrCheckoutSdkContextWithUseCase('calls useStripe()'),\n      stripe = _useElementsOrCheckou.stripe;\n\n  return stripe;\n};\n\n/**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar AuBankAccountElement = createElementComponent('auBankAccount', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar CardElement = createElementComponent('card', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar CardNumberElement = createElementComponent('cardNumber', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar CardExpiryElement = createElementComponent('cardExpiry', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar CardCvcElement = createElementComponent('cardCvc', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar FpxBankElement = createElementComponent('fpxBank', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar IbanElement = createElementComponent('iban', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar IdealBankElement = createElementComponent('idealBank', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar P24BankElement = createElementComponent('p24Bank', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar EpsBankElement = createElementComponent('epsBank', isServer);\nvar PaymentElement = createElementComponent('payment', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar ExpressCheckoutElement = createElementComponent('expressCheckout', isServer);\n/**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n */\n\nvar CurrencySelectorElement = createElementComponent('currencySelector', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar PaymentRequestButtonElement = createElementComponent('paymentRequestButton', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar LinkAuthenticationElement = createElementComponent('linkAuthentication', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar AddressElement = createElementComponent('address', isServer);\n/**\n * @deprecated\n * Use `AddressElement` instead.\n *\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar ShippingAddressElement = createElementComponent('shippingAddress', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar PaymentMethodMessagingElement = createElementComponent('paymentMethodMessaging', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar AffirmMessageElement = createElementComponent('affirmMessage', isServer);\n/**\n * @docs https://stripe.com/docs/stripe-js/react#element-components\n */\n\nvar AfterpayClearpayMessageElement = createElementComponent('afterpayClearpayMessage', isServer);\n/**\n * Requires beta access:\n * Contact [Stripe support](https://support.stripe.com/) for more information.\n */\n\nvar TaxIdElement = createElementComponent('taxId', isServer);\n\nexport { AddressElement, AffirmMessageElement, AfterpayClearpayMessageElement, AuBankAccountElement, CardCvcElement, CardElement, CardExpiryElement, CardNumberElement, CheckoutProvider, CurrencySelectorElement, Elements, ElementsConsumer, EmbeddedCheckout, EmbeddedCheckoutProvider, EpsBankElement, ExpressCheckoutElement, FpxBankElement, IbanElement, IdealBankElement, LinkAuthenticationElement, P24BankElement, PaymentElement, PaymentMethodMessagingElement, PaymentRequestButtonElement, ShippingAddressElement, TaxIdElement, useCheckout, useElements, useStripe };\n","/*!\n * Core functionality for Snowplow JavaScript trackers v4.6.7 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { __spreadArray, __assign, __awaiter, __generator } from 'tslib';\nimport { v4 } from 'uuid';\n\nvar version$1 = \"4.6.7\";\n\n/*\n * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io)\n * and Contributors (http://phpjs.org/authors)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation files (the \"Software\"), to deal in\n * the Software without restriction, including without limitation the rights to\n * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is furnished to do\n * so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/**\n * Decodes a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to decode\n * @returns The decoded string\n */\nfunction base64urldecode(data) {\n    if (!data) {\n        return data;\n    }\n    var padding = 4 - (data.length % 4);\n    switch (padding) {\n        case 2:\n            data += '==';\n            break;\n        case 3:\n            data += '=';\n            break;\n    }\n    var b64Data = data.replace(/-/g, '+').replace(/_/g, '/');\n    return base64decode(b64Data);\n}\n/**\n * Encodes a string into a url safe Base 64 encoded string\n * @remarks See: {@link http://tools.ietf.org/html/rfc4648#page-7}\n * @param data - String to encode\n * @returns The url safe Base 64 string\n */\nfunction base64urlencode(data) {\n    if (!data) {\n        return data;\n    }\n    var enc = base64encode(data);\n    return enc.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\nvar b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n/**\n * Encode string as base64.\n * Any type can be passed, but will be stringified\n *\n * @param data - string to encode\n * @returns base64-encoded string\n */\nfunction base64encode(data) {\n    // discuss at: http://phpjs.org/functions/base64_encode/\n    // original by: Tyler Akins (http://rumkin.com)\n    // improved by: Bayron Guevara\n    // improved by: Thunder.m\n    // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n    // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)\n    // improved by: Rafał Kukawski (http://kukawski.pl)\n    // bugfixed by: Pellentesque Malesuada\n    // example 1: base64_encode('Kevin van Zonneveld');\n    // returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA=='\n    // example 2: base64_encode('a');\n    // returns 2: 'YQ=='\n    // example 3: base64_encode('✓ à la mode');\n    // returns 3: '4pyTIMOgIGxhIG1vZGU='\n    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0;\n    var tmp_arr = [];\n    if (!data) {\n        return data;\n    }\n    data = unescape(encodeURIComponent(data));\n    do {\n        // pack three octets into four hexets\n        o1 = data.charCodeAt(i++);\n        o2 = data.charCodeAt(i++);\n        o3 = data.charCodeAt(i++);\n        bits = (o1 << 16) | (o2 << 8) | o3;\n        h1 = (bits >> 18) & 0x3f;\n        h2 = (bits >> 12) & 0x3f;\n        h3 = (bits >> 6) & 0x3f;\n        h4 = bits & 0x3f;\n        // use hexets to index into b64, and append result to encoded string\n        tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n    } while (i < data.length);\n    var enc = tmp_arr.join('');\n    var r = data.length % 3;\n    return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3);\n}\n/**\n * Decode base64 to string\n *\n * @param data - base64 to string\n * @returns decoded string\n */\nfunction base64decode(encodedData) {\n    //  discuss at: http://locutus.io/php/base64_decode/\n    // original by: Tyler Akins (http://rumkin.com)\n    // improved by: Thunder.m\n    // improved by: Kevin van Zonneveld (http://kvz.io)\n    // improved by: Kevin van Zonneveld (http://kvz.io)\n    //    input by: Aman Gupta\n    //    input by: Brett Zamir (http://brett-zamir.me)\n    // bugfixed by: Onno Marsman (https://twitter.com/onnomarsman)\n    // bugfixed by: Pellentesque Malesuada\n    // bugfixed by: Kevin van Zonneveld (http://kvz.io)\n    // improved by: Indigo744\n    //   example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA==')\n    //   returns 1: 'Kevin van Zonneveld'\n    //   example 2: base64_decode('YQ==')\n    //   returns 2: 'a'\n    //   example 3: base64_decode('4pyTIMOgIGxhIG1vZGU=')\n    //   returns 3: '✓ à la mode'\n    // decodeUTF8string()\n    // Internal function to decode properly UTF8 string\n    // Adapted from Solution #1 at https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n    var decodeUTF8string = function (str) {\n        // Going backwards: from bytestream, to percent-encoding, to original string.\n        return decodeURIComponent(str\n            .split('')\n            .map(function (c) {\n            return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);\n        })\n            .join(''));\n    };\n    var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = '';\n    var tmpArr = [];\n    if (!encodedData) {\n        return encodedData;\n    }\n    encodedData += '';\n    do {\n        // unpack four hexets into three octets using index points in b64\n        h1 = b64.indexOf(encodedData.charAt(i++));\n        h2 = b64.indexOf(encodedData.charAt(i++));\n        h3 = b64.indexOf(encodedData.charAt(i++));\n        h4 = b64.indexOf(encodedData.charAt(i++));\n        bits = (h1 << 18) | (h2 << 12) | (h3 << 6) | h4;\n        o1 = (bits >> 16) & 0xff;\n        o2 = (bits >> 8) & 0xff;\n        o3 = bits & 0xff;\n        if (h3 === 64) {\n            tmpArr[ac++] = String.fromCharCode(o1);\n        }\n        else if (h4 === 64) {\n            tmpArr[ac++] = String.fromCharCode(o1, o2);\n        }\n        else {\n            tmpArr[ac++] = String.fromCharCode(o1, o2, o3);\n        }\n    } while (i < encodedData.length);\n    dec = tmpArr.join('');\n    return decodeUTF8string(dec.replace(/\\0+$/, ''));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nfunction payloadBuilder() {\n    var dict = {}, allJson = [], jsonForProcessing = [], contextEntitiesForProcessing = [];\n    var processor;\n    var add = function (key, value) {\n        if (value != null && value !== '') {\n            // null also checks undefined\n            dict[key] = value;\n        }\n    };\n    var addDict = function (dict) {\n        for (var key in dict) {\n            if (Object.prototype.hasOwnProperty.call(dict, key)) {\n                add(key, dict[key]);\n            }\n        }\n    };\n    var addJson = function (keyIfEncoded, keyIfNotEncoded, json) {\n        if (json && isNonEmptyJson(json)) {\n            var jsonWithKeys = { keyIfEncoded: keyIfEncoded, keyIfNotEncoded: keyIfNotEncoded, json: json };\n            jsonForProcessing.push(jsonWithKeys);\n            allJson.push(jsonWithKeys);\n        }\n    };\n    var addContextEntity = function (entity) {\n        contextEntitiesForProcessing.push(entity);\n    };\n    return {\n        add: add,\n        addDict: addDict,\n        addJson: addJson,\n        addContextEntity: addContextEntity,\n        getPayload: function () { return dict; },\n        getJson: function () { return allJson; },\n        withJsonProcessor: function (jsonProcessor) {\n            processor = jsonProcessor;\n        },\n        build: function () {\n            processor === null || processor === void 0 ? void 0 : processor(this, jsonForProcessing, contextEntitiesForProcessing);\n            return dict;\n        },\n    };\n}\n/**\n * A helper to build a Snowplow request from a set of name-value pairs, provided using the add methods.\n * Will base64 encode JSON, if desired, on build\n *\n * @returns The request builder, with add and build methods\n */\nfunction payloadJsonProcessor(encodeBase64) {\n    return function (payloadBuilder, jsonForProcessing, contextEntitiesForProcessing) {\n        var add = function (json, keyIfEncoded, keyIfNotEncoded) {\n            var str = JSON.stringify(json);\n            if (encodeBase64) {\n                payloadBuilder.add(keyIfEncoded, base64urlencode(str));\n            }\n            else {\n                payloadBuilder.add(keyIfNotEncoded, str);\n            }\n        };\n        var getContextFromPayload = function () {\n            var payload = payloadBuilder.getPayload();\n            if (encodeBase64 ? payload.cx : payload.co) {\n                return JSON.parse(encodeBase64 ? base64urldecode(payload.cx) : payload.co);\n            }\n            return undefined;\n        };\n        var combineContexts = function (originalContext, newContext) {\n            var context = originalContext || getContextFromPayload();\n            if (context) {\n                context.data = context.data.concat(newContext.data);\n            }\n            else {\n                context = newContext;\n            }\n            return context;\n        };\n        var context = undefined;\n        for (var _i = 0, jsonForProcessing_1 = jsonForProcessing; _i < jsonForProcessing_1.length; _i++) {\n            var json = jsonForProcessing_1[_i];\n            if (json.keyIfEncoded === 'cx') {\n                context = combineContexts(context, json.json);\n            }\n            else {\n                add(json.json, json.keyIfEncoded, json.keyIfNotEncoded);\n            }\n        }\n        jsonForProcessing.length = 0;\n        if (contextEntitiesForProcessing.length) {\n            var newContext = {\n                schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n                data: __spreadArray([], contextEntitiesForProcessing, true),\n            };\n            context = combineContexts(context, newContext);\n            contextEntitiesForProcessing.length = 0;\n        }\n        if (context) {\n            add(context, 'cx', 'co');\n        }\n    };\n}\n/**\n * Is property a non-empty JSON?\n * @param property - Checks if object is non-empty json\n */\nfunction isNonEmptyJson(property) {\n    if (!isJson(property)) {\n        return false;\n    }\n    for (var key in property) {\n        if (Object.prototype.hasOwnProperty.call(property, key)) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Is property a JSON?\n * @param property - Checks if object is json\n */\nfunction isJson(property) {\n    return (typeof property !== 'undefined' &&\n        property !== null &&\n        (property.constructor === {}.constructor || property.constructor === [].constructor));\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar label = 'Snowplow: ';\nvar LOG_LEVEL;\n(function (LOG_LEVEL) {\n    LOG_LEVEL[LOG_LEVEL[\"none\"] = 0] = \"none\";\n    LOG_LEVEL[LOG_LEVEL[\"error\"] = 1] = \"error\";\n    LOG_LEVEL[LOG_LEVEL[\"warn\"] = 2] = \"warn\";\n    LOG_LEVEL[LOG_LEVEL[\"debug\"] = 3] = \"debug\";\n    LOG_LEVEL[LOG_LEVEL[\"info\"] = 4] = \"info\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nvar LOG = logger();\nfunction logger(logLevel) {\n    if (logLevel === void 0) { logLevel = LOG_LEVEL.warn; }\n    function setLogLevel(level) {\n        if (LOG_LEVEL[level]) {\n            logLevel = level;\n        }\n        else {\n            logLevel = LOG_LEVEL.warn;\n        }\n    }\n    /**\n     * Log errors, with or without error object\n     */\n    function error(message, error) {\n        var extraParams = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            extraParams[_i - 2] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.error && typeof console !== 'undefined') {\n            var logMsg = label + message + '\\n';\n            if (error) {\n                console.error.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n            }\n            else {\n                console.error.apply(console, __spreadArray([logMsg], extraParams, false));\n            }\n        }\n    }\n    /**\n     * Log warnings, with or without error object\n     */\n    function warn(message, error) {\n        var extraParams = [];\n        for (var _i = 2; _i < arguments.length; _i++) {\n            extraParams[_i - 2] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.warn && typeof console !== 'undefined') {\n            var logMsg = label + message;\n            if (error) {\n                console.warn.apply(console, __spreadArray([logMsg + '\\n', error], extraParams, false));\n            }\n            else {\n                console.warn.apply(console, __spreadArray([logMsg], extraParams, false));\n            }\n        }\n    }\n    /**\n     * Log debug messages\n     */\n    function debug(message) {\n        var extraParams = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            extraParams[_i - 1] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.debug && typeof console !== 'undefined') {\n            console.debug.apply(console, __spreadArray([label + message], extraParams, false));\n        }\n    }\n    /**\n     * Log info messages\n     */\n    function info(message) {\n        var extraParams = [];\n        for (var _i = 1; _i < arguments.length; _i++) {\n            extraParams[_i - 1] = arguments[_i];\n        }\n        if (logLevel >= LOG_LEVEL.info && typeof console !== 'undefined') {\n            console.info.apply(console, __spreadArray([label + message], extraParams, false));\n        }\n    }\n    return { setLogLevel: setLogLevel, warn: warn, error: error, debug: debug, info: info };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Contains helper functions to aid in the addition and removal of Global Contexts\n */\nfunction globalContexts() {\n    var globalPrimitives = [];\n    var conditionalProviders = [];\n    var namedPrimitives = {};\n    var namedConditionalProviders = {};\n    /**\n     * Returns all applicable global contexts for a specified event\n     * @param event - The event to check for applicable global contexts for\n     * @returns An array of contexts\n     */\n    var assembleAllContexts = function (event) {\n        var eventSchema = getUsefulSchema(event);\n        var eventType = getEventType(event);\n        var contexts = [];\n        var generatedPrimitives = generatePrimitives(globalPrimitives.concat(Object.values(namedPrimitives)), event, eventType, eventSchema);\n        contexts.push.apply(contexts, generatedPrimitives);\n        var generatedConditionals = generateConditionals(conditionalProviders.concat(Object.values(namedConditionalProviders)), event, eventType, eventSchema);\n        contexts.push.apply(contexts, generatedConditionals);\n        return contexts;\n    };\n    return {\n        getGlobalPrimitives: function () {\n            return globalPrimitives.concat(Object.values(namedPrimitives));\n        },\n        getConditionalProviders: function () {\n            return conditionalProviders.concat(Object.values(namedConditionalProviders));\n        },\n        addGlobalContexts: function (contexts) {\n            if (Array.isArray(contexts)) {\n                var acceptedConditionalContexts = [];\n                var acceptedContextPrimitives = [];\n                for (var _i = 0, contexts_1 = contexts; _i < contexts_1.length; _i++) {\n                    var context = contexts_1[_i];\n                    if (isConditionalContextProvider(context)) {\n                        acceptedConditionalContexts.push(context);\n                    }\n                    else if (isContextPrimitive(context)) {\n                        acceptedContextPrimitives.push(context);\n                    }\n                }\n                globalPrimitives = globalPrimitives.concat(acceptedContextPrimitives);\n                conditionalProviders = conditionalProviders.concat(acceptedConditionalContexts);\n            }\n            else {\n                for (var _a = 0, _b = Object.entries(contexts); _a < _b.length; _a++) {\n                    var _c = _b[_a], name_1 = _c[0], context = _c[1];\n                    if (isConditionalContextProvider(context)) {\n                        namedConditionalProviders[name_1] = context;\n                    }\n                    else if (isContextPrimitive(context)) {\n                        namedPrimitives[name_1] = context;\n                    }\n                }\n            }\n        },\n        clearGlobalContexts: function () {\n            conditionalProviders = [];\n            globalPrimitives = [];\n            namedConditionalProviders = {};\n            namedPrimitives = {};\n        },\n        removeGlobalContexts: function (contexts) {\n            var _loop_1 = function (context) {\n                if (typeof context === 'string') {\n                    delete namedConditionalProviders[context];\n                    delete namedPrimitives[context];\n                }\n                else if (isConditionalContextProvider(context)) {\n                    conditionalProviders = conditionalProviders.filter(function (item) { return !compareProvider(context, item); });\n                }\n                else if (isContextPrimitive(context)) {\n                    globalPrimitives = globalPrimitives.filter(function (item) { return !compareProvider(context, item); });\n                }\n            };\n            for (var _i = 0, contexts_2 = contexts; _i < contexts_2.length; _i++) {\n                var context = contexts_2[_i];\n                _loop_1(context);\n            }\n        },\n        getApplicableContexts: function (event) {\n            return assembleAllContexts(event);\n        },\n    };\n}\nfunction pluginContexts(plugins) {\n    /**\n     * Add common contexts to every event\n     *\n     * @param array - additionalContexts List of user-defined contexts\n     * @returns userContexts combined with commonContexts\n     */\n    return {\n        addPluginContexts: function (additionalContexts) {\n            var combinedContexts = additionalContexts\n                ? __spreadArray([], additionalContexts, true) : [];\n            plugins.forEach(function (plugin) {\n                try {\n                    if (plugin.contexts) {\n                        combinedContexts.push.apply(combinedContexts, plugin.contexts());\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Error adding plugin contexts', ex);\n                }\n            });\n            return combinedContexts;\n        },\n    };\n}\n/**\n * Find dynamic context generating functions and return their results to be merged into the static contexts\n * Combine an array of unchanging contexts with the result of a context-creating function\n *\n * @param dynamicOrStaticContexts - Array of custom context Objects or custom context generating functions\n * @param Parameters - to pass to dynamic context callbacks\n * @returns An array of Self Describing JSON context\n */\nfunction resolveDynamicContext(dynamicOrStaticContexts) {\n    var _a;\n    var extraParams = [];\n    for (var _i = 1; _i < arguments.length; _i++) {\n        extraParams[_i - 1] = arguments[_i];\n    }\n    return ((_a = dynamicOrStaticContexts === null || dynamicOrStaticContexts === void 0 ? void 0 : dynamicOrStaticContexts.map(function (context) {\n        if (typeof context === 'function') {\n            try {\n                return context.apply(void 0, extraParams);\n            }\n            catch (e) {\n                //TODO: provide warning\n                return undefined;\n            }\n        }\n        else {\n            return context;\n        }\n    }).filter(Boolean)) !== null && _a !== void 0 ? _a : []);\n}\n/**\n * Slices a schema into its composite parts. Useful for ruleset filtering.\n * @param input - A schema string\n * @returns The vendor, schema name, major, minor and patch information of a schema string\n */\nfunction getSchemaParts(input) {\n    var re = new RegExp('^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/jsonschema/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$');\n    var matches = re.exec(input);\n    if (matches !== null)\n        return matches.slice(1, 6);\n    return undefined;\n}\n/**\n * Validates the vendor section of a schema string contains allowed wildcard values\n * @param parts - Array of parts from a schema string\n * @returns Whether the vendor validation parts are a valid combination\n */\nfunction validateVendorParts(parts) {\n    if (parts[0] === '*' || parts[1] === '*') {\n        return false; // no wildcard in first or second part\n    }\n    if (parts.slice(2).length > 0) {\n        var asterisk = false;\n        for (var _i = 0, _a = parts.slice(2); _i < _a.length; _i++) {\n            var part = _a[_i];\n            if (part === '*')\n                // mark when we've found a wildcard\n                asterisk = true;\n            else if (asterisk)\n                // invalid if alpha parts come after wildcard\n                return false;\n        }\n        return true;\n    }\n    else if (parts.length == 2)\n        return true;\n    return false;\n}\n/**\n * Validates the vendor part of a schema string is valid for a rule set\n * @param input - Vendor part of a schema string\n * @returns Whether the vendor validation string is valid\n */\nfunction validateVendor(input) {\n    var parts = input.split('.');\n    if (parts && parts.length > 1)\n        return validateVendorParts(parts);\n    return false;\n}\n/**\n * Checks for validity of input and returns all the sections of a schema string that are used to match rules in a ruleset\n * @param input - A Schema string\n * @returns The sections of a schema string that are used to match rules in a ruleset\n */\nfunction getRuleParts(input) {\n    var re = new RegExp('^iglu:((?:(?:[a-zA-Z0-9-_]+|\\\\*).)+(?:[a-zA-Z0-9-_]+|\\\\*))/([a-zA-Z0-9-_.]+|\\\\*)/jsonschema/([1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)-(0|[1-9][0-9]*|\\\\*)$');\n    var matches = re.exec(input);\n    if (matches !== null && validateVendor(matches[1]))\n        return matches.slice(1, 6);\n    return undefined;\n}\n/**\n * Ensures the rules specified in a schema string of a ruleset are valid\n * @param input - A Schema string\n * @returns if there rule is valid\n */\nfunction isValidRule(input) {\n    var ruleParts = getRuleParts(input);\n    if (ruleParts) {\n        var vendor = ruleParts[0];\n        return ruleParts.length === 5 && validateVendor(vendor);\n    }\n    return false;\n}\n/**\n * Check if a variable is an Array containing only strings\n * @param input - The variable to validate\n * @returns True if the input is an array containing only strings\n */\nfunction isStringArray(input) {\n    return (Array.isArray(input) &&\n        input.every(function (x) {\n            return typeof x === 'string';\n        }));\n}\n/**\n * Validates whether a rule set is an array of valid ruleset strings\n * @param input - The Array of rule set arguments\n * @returns True is the input is an array of valid rules\n */\nfunction isValidRuleSetArg(input) {\n    if (isStringArray(input))\n        return input.every(function (x) {\n            return isValidRule(x);\n        });\n    else if (typeof input === 'string')\n        return isValidRule(input);\n    return false;\n}\n/**\n * Check if a variable is a valid, non-empty Self Describing JSON\n * @param input - The variable to validate\n * @returns True if a valid Self Describing JSON\n */\nfunction isSelfDescribingJson(input) {\n    var sdj = input;\n    if (isNonEmptyJson(sdj))\n        if ('schema' in sdj && 'data' in sdj)\n            return typeof sdj.schema === 'string' && typeof sdj.data === 'object';\n    return false;\n}\n/**\n * Validates if the input object contains the expected properties of a ruleset\n * @param input - The object containing a rule set\n * @returns True if a valid rule set\n */\nfunction isRuleSet(input) {\n    var ruleSet = input;\n    var ruleCount = 0;\n    if (input != null && typeof input === 'object' && !Array.isArray(input)) {\n        if (Object.prototype.hasOwnProperty.call(ruleSet, 'accept')) {\n            if (isValidRuleSetArg(ruleSet['accept'])) {\n                ruleCount += 1;\n            }\n            else {\n                return false;\n            }\n        }\n        if (Object.prototype.hasOwnProperty.call(ruleSet, 'reject')) {\n            if (isValidRuleSetArg(ruleSet['reject'])) {\n                ruleCount += 1;\n            }\n            else {\n                return false;\n            }\n        }\n        // if either 'reject' or 'accept' or both exists,\n        // we have a valid ruleset\n        return ruleCount > 0 && ruleCount <= 2;\n    }\n    return false;\n}\n/**\n * Validates if the function can be a valid context generator function\n * @param input - The function to be validated\n */\nfunction isContextCallbackFunction(input) {\n    return typeof input === 'function' && input.length <= 1;\n}\n/**\n * Validates if the function can be a valid context primitive function or self describing json\n * @param input - The function or orbject to be validated\n * @returns True if either a Context Generator or Self Describing JSON\n */\nfunction isContextPrimitive(input) {\n    return isContextCallbackFunction(input) || isSelfDescribingJson(input);\n}\n/**\n * Validates if an array is a valid shape to be a Filter Provider\n * @param input - The Array of Context filter callbacks\n */\nfunction isFilterProvider(input) {\n    if (Array.isArray(input)) {\n        if (input.length === 2) {\n            if (Array.isArray(input[1])) {\n                return isContextCallbackFunction(input[0]) && input[1].every(isContextPrimitive);\n            }\n            return isContextCallbackFunction(input[0]) && isContextPrimitive(input[1]);\n        }\n    }\n    return false;\n}\n/**\n * Validates if an array is a valid shape to be an array of rule sets\n * @param input - The Array of Rule Sets\n */\nfunction isRuleSetProvider(input) {\n    if (Array.isArray(input) && input.length === 2) {\n        if (!isRuleSet(input[0]))\n            return false;\n        if (Array.isArray(input[1]))\n            return input[1].every(isContextPrimitive);\n        return isContextPrimitive(input[1]);\n    }\n    return false;\n}\n/**\n * Checks if an input array is either a filter provider or a rule set provider\n * @param input - An array of filter providers or rule set providers\n * @returns Whether the array is a valid {@link ConditionalContextProvider}\n */\nfunction isConditionalContextProvider(input) {\n    return isFilterProvider(input) || isRuleSetProvider(input);\n}\n/**\n * Checks if a given schema matches any rules within the provided rule set\n * @param ruleSet - The rule set containing rules to match schema against\n * @param schema - The schema to be matched against the rule set\n */\nfunction matchSchemaAgainstRuleSet(ruleSet, schema) {\n    var rejectCount = 0;\n    var acceptCount = 0;\n    var acceptRules = ruleSet['accept'];\n    if (Array.isArray(acceptRules)) {\n        if (ruleSet.accept.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n            acceptCount++;\n        }\n    }\n    else if (typeof acceptRules === 'string') {\n        if (matchSchemaAgainstRule(acceptRules, schema)) {\n            acceptCount++;\n        }\n    }\n    var rejectRules = ruleSet['reject'];\n    if (Array.isArray(rejectRules)) {\n        if (ruleSet.reject.some(function (rule) { return matchSchemaAgainstRule(rule, schema); })) {\n            rejectCount++;\n        }\n    }\n    else if (typeof rejectRules === 'string') {\n        if (matchSchemaAgainstRule(rejectRules, schema)) {\n            rejectCount++;\n        }\n    }\n    if (acceptCount > 0 && rejectCount === 0) {\n        return true;\n    }\n    else if (acceptCount === 0 && rejectCount > 0) {\n        return false;\n    }\n    return false;\n}\n/**\n * Checks if a given schema matches a specific rule from a rule set\n * @param rule - The rule to match schema against\n * @param schema - The schema to be matched against the rule\n */\nfunction matchSchemaAgainstRule(rule, schema) {\n    if (!isValidRule(rule))\n        return false;\n    var ruleParts = getRuleParts(rule);\n    var schemaParts = getSchemaParts(schema);\n    if (ruleParts && schemaParts) {\n        if (!matchVendor(ruleParts[0], schemaParts[0]))\n            return false;\n        for (var i = 1; i < 5; i++) {\n            if (!matchPart(ruleParts[i], schemaParts[i]))\n                return false;\n        }\n        return true; // if it hasn't failed, it passes\n    }\n    return false;\n}\nfunction matchVendor(rule, vendor) {\n    // rule and vendor must have same number of elements\n    var vendorParts = vendor.split('.');\n    var ruleParts = rule.split('.');\n    if (vendorParts && ruleParts) {\n        if (vendorParts.length !== ruleParts.length)\n            return false;\n        for (var i = 0; i < ruleParts.length; i++) {\n            if (!matchPart(vendorParts[i], ruleParts[i]))\n                return false;\n        }\n        return true;\n    }\n    return false;\n}\nfunction matchPart(rule, schema) {\n    // parts should be the string nested between slashes in the URI: /example/\n    return (rule && schema && rule === '*') || rule === schema;\n}\n// Returns the \"useful\" schema, i.e. what would someone want to use to identify events.\n// For some events this is the 'e' property but for unstructured events, this is the\n// 'schema' from the 'ue_px' field.\nfunction getUsefulSchema(sb) {\n    var eventJson = sb.getJson();\n    for (var _i = 0, eventJson_1 = eventJson; _i < eventJson_1.length; _i++) {\n        var json = eventJson_1[_i];\n        if (json.keyIfEncoded === 'ue_px' && typeof json.json['data'] === 'object') {\n            var schema = json.json['data']['schema'];\n            if (typeof schema == 'string') {\n                return schema;\n            }\n        }\n    }\n    return '';\n}\nfunction getEventType(payloadBuilder) {\n    var eventType = payloadBuilder.getPayload()['e'];\n    return typeof eventType === 'string' ? eventType : '';\n}\nfunction buildGenerator(generator, event, eventType, eventSchema) {\n    var contextGeneratorResult = undefined;\n    try {\n        // try to evaluate context generator\n        var args = {\n            event: event.getPayload(),\n            eventType: eventType,\n            eventSchema: eventSchema,\n        };\n        contextGeneratorResult = generator(args);\n        // determine if the produced result is a valid SDJ\n        if (Array.isArray(contextGeneratorResult) && contextGeneratorResult.every(isSelfDescribingJson)) {\n            return contextGeneratorResult;\n        }\n        else if (isSelfDescribingJson(contextGeneratorResult)) {\n            return contextGeneratorResult;\n        }\n        else {\n            return undefined;\n        }\n    }\n    catch (error) {\n        contextGeneratorResult = undefined;\n    }\n    return contextGeneratorResult;\n}\nfunction normalizeToArray(input) {\n    if (Array.isArray(input)) {\n        return input;\n    }\n    return Array.of(input);\n}\nfunction generatePrimitives(contextPrimitives, event, eventType, eventSchema) {\n    var _a;\n    var normalizedInputs = normalizeToArray(contextPrimitives);\n    var partialEvaluate = function (primitive) {\n        var result = evaluatePrimitive(primitive, event, eventType, eventSchema);\n        if (result && result.length !== 0) {\n            return result;\n        }\n        return undefined;\n    };\n    var generatedContexts = normalizedInputs.map(partialEvaluate);\n    return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\nfunction evaluatePrimitive(contextPrimitive, event, eventType, eventSchema) {\n    if (isSelfDescribingJson(contextPrimitive)) {\n        return [contextPrimitive];\n    }\n    else if (isContextCallbackFunction(contextPrimitive)) {\n        var generatorOutput = buildGenerator(contextPrimitive, event, eventType, eventSchema);\n        if (isSelfDescribingJson(generatorOutput)) {\n            return [generatorOutput];\n        }\n        else if (Array.isArray(generatorOutput)) {\n            return generatorOutput;\n        }\n    }\n    return undefined;\n}\nfunction evaluateProvider(provider, event, eventType, eventSchema) {\n    if (isFilterProvider(provider)) {\n        var filter = provider[0];\n        var filterResult = false;\n        try {\n            var args = {\n                event: event.getPayload(),\n                eventType: eventType,\n                eventSchema: eventSchema,\n            };\n            filterResult = filter(args);\n        }\n        catch (error) {\n            filterResult = false;\n        }\n        if (filterResult === true) {\n            return generatePrimitives(provider[1], event, eventType, eventSchema);\n        }\n    }\n    else if (isRuleSetProvider(provider)) {\n        if (matchSchemaAgainstRuleSet(provider[0], eventSchema)) {\n            return generatePrimitives(provider[1], event, eventType, eventSchema);\n        }\n    }\n    return [];\n}\nfunction compareProviderPart(a, b) {\n    if (typeof a === 'function')\n        return a === b;\n    return JSON.stringify(a) === JSON.stringify(b);\n}\nfunction compareProvider(a, b) {\n    if (isConditionalContextProvider(a)) {\n        if (!isConditionalContextProvider(b))\n            return false;\n        var ruleA = a[0], primitivesA = a[1];\n        var ruleB = b[0], primitivesB_1 = b[1];\n        if (!compareProviderPart(ruleA, ruleB))\n            return false;\n        if (Array.isArray(primitivesA)) {\n            if (!Array.isArray(primitivesB_1))\n                return false;\n            if (primitivesA.length !== primitivesB_1.length)\n                return false;\n            return primitivesA.reduce(function (matches, a, i) { return matches && compareProviderPart(a, primitivesB_1[i]); }, true);\n        }\n        else {\n            if (Array.isArray(primitivesB_1))\n                return false;\n            return compareProviderPart(primitivesA, primitivesB_1);\n        }\n    }\n    else if (isContextPrimitive(a)) {\n        if (!isContextPrimitive(b))\n            return false;\n        return compareProviderPart(a, b);\n    }\n    return false;\n}\nfunction generateConditionals(providers, event, eventType, eventSchema) {\n    var _a;\n    var normalizedInput = normalizeToArray(providers);\n    var partialEvaluate = function (provider) {\n        var result = evaluateProvider(provider, event, eventType, eventSchema);\n        if (result && result.length !== 0) {\n            return result;\n        }\n        return undefined;\n    };\n    var generatedContexts = normalizedInput.map(partialEvaluate);\n    return (_a = []).concat.apply(_a, generatedContexts.filter(function (c) { return c != null && c.filter(Boolean); }));\n}\n\n/**\n * Create a new EventStorePayload\n */\nfunction newEventStorePayload(_a) {\n    var payload = _a.payload, _b = _a.svrAnon, svrAnon = _b === void 0 ? false : _b;\n    return {\n        payload: payload,\n        svrAnon: svrAnon,\n    };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Transform optional/old-behavior number timestamp into`Timestamp` ADT\n *\n * @param timestamp - optional number or timestamp object\n * @returns correct timestamp object\n */\nfunction getTimestamp(timestamp) {\n    if (timestamp == null) {\n        return { type: 'dtm', value: new Date().getTime() };\n    }\n    else if (typeof timestamp === 'number') {\n        return { type: 'dtm', value: timestamp };\n    }\n    else if (timestamp.type === 'ttm') {\n        // We can return timestamp here, but this is safer fallback\n        return { type: 'ttm', value: timestamp.value };\n    }\n    else {\n        return { type: 'dtm', value: timestamp.value || new Date().getTime() };\n    }\n}\n/**\n * Create a tracker core object\n *\n * @param base64 - Whether to base 64 encode contexts and self describing event JSONs\n * @param corePlugins - The core plugins to be processed with each event\n * @param callback - Function applied to every payload dictionary object\n * @returns Tracker core\n */\nfunction trackerCore(configuration) {\n    if (configuration === void 0) { configuration = {}; }\n    function newCore(base64, corePlugins, callback) {\n        var pluginContextsHelper = pluginContexts(corePlugins), globalContextsHelper = globalContexts();\n        var encodeBase64 = base64, payloadPairs = {}; // Dictionary of key-value pairs which get added to every payload, e.g. tracker version\n        /**\n         * Wraps an array of custom contexts in a self-describing JSON\n         *\n         * @param contexts - Array of custom context self-describing JSONs\n         * @returns Outer JSON\n         */\n        function completeContexts(contexts) {\n            if (contexts && contexts.length) {\n                return {\n                    schema: 'iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0',\n                    data: contexts,\n                };\n            }\n            return undefined;\n        }\n        /**\n         * Adds all global contexts to a contexts array\n         *\n         * @param pb - PayloadData\n         * @param contexts - Custom contexts relating to the event\n         */\n        function attachGlobalContexts(pb, contexts) {\n            var applicableContexts = globalContextsHelper.getApplicableContexts(pb);\n            var returnedContexts = [];\n            if (contexts && contexts.length) {\n                returnedContexts.push.apply(returnedContexts, contexts);\n            }\n            if (applicableContexts && applicableContexts.length) {\n                returnedContexts.push.apply(returnedContexts, applicableContexts);\n            }\n            return returnedContexts;\n        }\n        /**\n         * Gets called by every trackXXX method\n         * Adds context and payloadPairs name-value pairs to the payload\n         * Applies the callback to the built payload\n         *\n         * @param pb - Payload\n         * @param context - Custom contexts relating to the event\n         * @param timestamp - Timestamp of the event\n         * @returns Payload after the callback is applied or undefined if the event is skipped\n         */\n        function track(pb, context, timestamp) {\n            if (!active) {\n                LOG.error('Track called on deactivated tracker');\n                return undefined;\n            }\n            pb.withJsonProcessor(payloadJsonProcessor(encodeBase64));\n            pb.add('eid', v4());\n            pb.addDict(payloadPairs);\n            var tstamp = getTimestamp(timestamp);\n            pb.add(tstamp.type, tstamp.value.toString());\n            var allContexts = attachGlobalContexts(pb, pluginContextsHelper.addPluginContexts(context));\n            var wrappedContexts = completeContexts(allContexts);\n            if (wrappedContexts !== undefined) {\n                pb.addJson('cx', 'co', wrappedContexts);\n            }\n            corePlugins.forEach(function (plugin) {\n                try {\n                    if (plugin.beforeTrack) {\n                        plugin.beforeTrack(pb);\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Plugin beforeTrack', ex);\n                }\n            });\n            // Call the filter on plugins to determine if the event should be tracked\n            var skip = corePlugins.find(function (plugin) {\n                try {\n                    return plugin.filter && plugin.filter(pb.build()) === false;\n                }\n                catch (ex) {\n                    LOG.error('Plugin filter', ex);\n                    return false;\n                }\n            });\n            if (skip) {\n                return undefined;\n            }\n            if (typeof callback === 'function') {\n                callback(pb);\n            }\n            var finalPayload = pb.build();\n            corePlugins.forEach(function (plugin) {\n                try {\n                    if (plugin.afterTrack) {\n                        plugin.afterTrack(finalPayload);\n                    }\n                }\n                catch (ex) {\n                    LOG.error('Plugin afterTrack', ex);\n                }\n            });\n            return finalPayload;\n        }\n        /**\n         * Set a persistent key-value pair to be added to every payload\n         *\n         * @param key - Field name\n         * @param value - Field value\n         */\n        function addPayloadPair(key, value) {\n            payloadPairs[key] = value;\n        }\n        var core = {\n            track: track,\n            addPayloadPair: addPayloadPair,\n            getBase64Encoding: function () {\n                return encodeBase64;\n            },\n            setBase64Encoding: function (encode) {\n                encodeBase64 = encode;\n            },\n            addPayloadDict: function (dict) {\n                for (var key in dict) {\n                    if (Object.prototype.hasOwnProperty.call(dict, key)) {\n                        payloadPairs[key] = dict[key];\n                    }\n                }\n            },\n            resetPayloadPairs: function (dict) {\n                payloadPairs = isJson(dict) ? dict : {};\n            },\n            setTrackerVersion: function (version) {\n                addPayloadPair('tv', version);\n            },\n            setTrackerNamespace: function (name) {\n                addPayloadPair('tna', name);\n            },\n            setAppId: function (appId) {\n                addPayloadPair('aid', appId);\n            },\n            setPlatform: function (value) {\n                addPayloadPair('p', value);\n            },\n            setUserId: function (userId) {\n                addPayloadPair('uid', userId);\n            },\n            setScreenResolution: function (width, height) {\n                addPayloadPair('res', width + 'x' + height);\n            },\n            setViewport: function (width, height) {\n                addPayloadPair('vp', width + 'x' + height);\n            },\n            setColorDepth: function (depth) {\n                addPayloadPair('cd', depth);\n            },\n            setTimezone: function (timezone) {\n                addPayloadPair('tz', timezone);\n            },\n            setLang: function (lang) {\n                addPayloadPair('lang', lang);\n            },\n            setIpAddress: function (ip) {\n                addPayloadPair('ip', ip);\n            },\n            setUseragent: function (useragent) {\n                addPayloadPair('ua', useragent);\n            },\n            addGlobalContexts: function (contexts) {\n                globalContextsHelper.addGlobalContexts(contexts);\n            },\n            clearGlobalContexts: function () {\n                globalContextsHelper.clearGlobalContexts();\n            },\n            removeGlobalContexts: function (contexts) {\n                globalContextsHelper.removeGlobalContexts(contexts);\n            },\n        };\n        return core;\n    }\n    var active = true;\n    var base64 = configuration.base64, corePlugins = configuration.corePlugins, callback = configuration.callback, plugins = corePlugins !== null && corePlugins !== void 0 ? corePlugins : [], partialCore = newCore(base64 !== null && base64 !== void 0 ? base64 : true, plugins, callback), core = __assign(__assign({}, partialCore), { addPlugin: function (configuration) {\n            var _a, _b;\n            var plugin = configuration.plugin;\n            plugins.push(plugin);\n            (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n            (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n        }, deactivate: function () {\n            plugins.forEach(function (plugin) {\n                var _a;\n                (_a = plugin.deactivatePlugin) === null || _a === void 0 ? void 0 : _a.call(plugin, core);\n            });\n            plugins.length = 0;\n            active = false;\n        } });\n    plugins === null || plugins === void 0 ? void 0 : plugins.forEach(function (plugin) {\n        var _a, _b;\n        (_a = plugin.logger) === null || _a === void 0 ? void 0 : _a.call(plugin, LOG);\n        (_b = plugin.activateCorePlugin) === null || _b === void 0 ? void 0 : _b.call(plugin, core);\n    });\n    return core;\n}\n/**\n * Build a self-describing event\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - Contains the properties and schema location for the event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSelfDescribingEvent(event) {\n    var _a = event.event, schema = _a.schema, data = _a.data, pb = payloadBuilder();\n    var ueJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0',\n        data: { schema: schema, data: data },\n    };\n    pb.add('e', 'ue');\n    pb.addJson('ue_px', 'ue_pr', ueJson);\n    return pb;\n}\n/**\n * Build a Page View Event\n * Represents a Page View, which is typically fired as soon as possible when a web page\n * is loaded within the users browser. Often also fired on \"virtual page views\" within\n * Single Page Applications (SPA).\n *\n * @param event - Contains the properties for the Page View event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPageView(event) {\n    var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, pb = payloadBuilder();\n    pb.add('e', 'pv'); // 'pv' for Page View\n    pb.add('url', pageUrl);\n    pb.add('page', pageTitle);\n    pb.add('refr', referrer);\n    return pb;\n}\n/**\n * Build a Page Ping Event\n * Fires when activity tracking is enabled in the browser.\n * Tracks same information as the last tracked Page View and includes scroll\n * information from the current page view\n *\n * @param event - Contains the properties for the Page Ping event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildPagePing(event) {\n    var pageUrl = event.pageUrl, pageTitle = event.pageTitle, referrer = event.referrer, minXOffset = event.minXOffset, maxXOffset = event.maxXOffset, minYOffset = event.minYOffset, maxYOffset = event.maxYOffset, pb = payloadBuilder();\n    pb.add('e', 'pp'); // 'pp' for Page Ping\n    pb.add('url', pageUrl);\n    pb.add('page', pageTitle);\n    pb.add('refr', referrer);\n    if (minXOffset && !isNaN(Number(minXOffset)))\n        pb.add('pp_mix', minXOffset.toString());\n    if (maxXOffset && !isNaN(Number(maxXOffset)))\n        pb.add('pp_max', maxXOffset.toString());\n    if (minYOffset && !isNaN(Number(minYOffset)))\n        pb.add('pp_miy', minYOffset.toString());\n    if (maxYOffset && !isNaN(Number(maxYOffset)))\n        pb.add('pp_may', maxYOffset.toString());\n    return pb;\n}\n/**\n * Build a Structured Event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - Contains the properties for the Structured event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildStructEvent(event) {\n    var category = event.category, action = event.action, label = event.label, property = event.property, value = event.value, pb = payloadBuilder();\n    pb.add('e', 'se'); // 'se' for Structured Event\n    pb.add('se_ca', category);\n    pb.add('se_ac', action);\n    pb.add('se_la', label);\n    pb.add('se_pr', property);\n    pb.add('se_va', value == null ? undefined : value.toString());\n    return pb;\n}\n/**\n * Build an Ecommerce Transaction Event\n * Allows for tracking common ecommerce events, this event is usually used when\n * a consumer completes a transaction.\n *\n * @param event - Contains the properties for the Ecommerce Transactoion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransaction(event) {\n    var orderId = event.orderId, total = event.total, affiliation = event.affiliation, tax = event.tax, shipping = event.shipping, city = event.city, state = event.state, country = event.country, currency = event.currency, pb = payloadBuilder();\n    pb.add('e', 'tr'); // 'tr' for Transaction\n    pb.add('tr_id', orderId);\n    pb.add('tr_af', affiliation);\n    pb.add('tr_tt', total);\n    pb.add('tr_tx', tax);\n    pb.add('tr_sh', shipping);\n    pb.add('tr_ci', city);\n    pb.add('tr_st', state);\n    pb.add('tr_co', country);\n    pb.add('tr_cu', currency);\n    return pb;\n}\n/**\n * Build an Ecommerce Transaction Item Event\n * Related to the {@link buildEcommerceTransaction}\n * Each Ecommerce Transaction may contain one or more EcommerceTransactionItem events\n *\n * @param event - Contains the properties for the Ecommerce Transaction Item event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildEcommerceTransactionItem(event) {\n    var orderId = event.orderId, sku = event.sku, price = event.price, name = event.name, category = event.category, quantity = event.quantity, currency = event.currency, pb = payloadBuilder();\n    pb.add('e', 'ti'); // 'tr' for Transaction Item\n    pb.add('ti_id', orderId);\n    pb.add('ti_sk', sku);\n    pb.add('ti_nm', name);\n    pb.add('ti_ca', category);\n    pb.add('ti_pr', price);\n    pb.add('ti_qu', quantity);\n    pb.add('ti_cu', currency);\n    return pb;\n}\n/**\n * Build a Scren View Event\n * Similar to a Page View but less focused on typical web properties\n * Often used for mobile applications as the user is presented with\n * new views as they performance navigation events\n *\n * @param event - Contains the properties for the Screen View event. One or more properties must be included.\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildScreenView(event) {\n    var name = event.name, id = event.id;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/screen_view/jsonschema/1-0-0',\n            data: removeEmptyProperties({ name: name, id: id }),\n        },\n    });\n}\n/**\n * Build a Link Click Event\n * Used when a user clicks on a link on a webpage, typically an anchor tag `<a>`\n *\n * @param event - Contains the properties for the Link Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildLinkClick(event) {\n    var targetUrl = event.targetUrl, elementId = event.elementId, elementClasses = event.elementClasses, elementTarget = event.elementTarget, elementContent = event.elementContent;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/link_click/jsonschema/1-0-1',\n        data: removeEmptyProperties({ targetUrl: targetUrl, elementId: elementId, elementClasses: elementClasses, elementTarget: elementTarget, elementContent: elementContent }),\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Impression Event\n * Used to track an advertisement impression\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Impression event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdImpression(event) {\n    var impressionId = event.impressionId, costModel = event.costModel, cost = event.cost, targetUrl = event.targetUrl, bannerId = event.bannerId, zoneId = event.zoneId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_impression/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            impressionId: impressionId,\n            costModel: costModel,\n            cost: cost,\n            targetUrl: targetUrl,\n            bannerId: bannerId,\n            zoneId: zoneId,\n            advertiserId: advertiserId,\n            campaignId: campaignId,\n        }),\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Click Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Click event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdClick(event) {\n    var targetUrl = event.targetUrl, clickId = event.clickId, costModel = event.costModel, cost = event.cost, bannerId = event.bannerId, zoneId = event.zoneId, impressionId = event.impressionId, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            targetUrl: targetUrl,\n            clickId: clickId,\n            costModel: costModel,\n            cost: cost,\n            bannerId: bannerId,\n            zoneId: zoneId,\n            impressionId: impressionId,\n            advertiserId: advertiserId,\n            campaignId: campaignId,\n        }),\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Ad Conversion Event\n * Used to track an advertisement click\n *\n * @remarks\n * If you provide the cost field, you must also provide one of 'cpa', 'cpc', and 'cpm' for the costModel field.\n *\n * @param event - Contains the properties for the Ad Conversion event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAdConversion(event) {\n    var conversionId = event.conversionId, costModel = event.costModel, cost = event.cost, category = event.category, action = event.action, property = event.property, initialValue = event.initialValue, advertiserId = event.advertiserId, campaignId = event.campaignId;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/ad_conversion/jsonschema/1-0-0',\n        data: removeEmptyProperties({\n            conversionId: conversionId,\n            costModel: costModel,\n            cost: cost,\n            category: category,\n            action: action,\n            property: property,\n            initialValue: initialValue,\n            advertiserId: advertiserId,\n            campaignId: campaignId,\n        }),\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Social Interaction Event\n * Social tracking will be used to track the way users interact\n * with Facebook, Twitter and Google + widgets\n * e.g. to capture “like this” or “tweet this” events.\n *\n * @param event - Contains the properties for the Social Interaction event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSocialInteraction(event) {\n    var action = event.action, network = event.network, target = event.target;\n    var eventJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/social_interaction/jsonschema/1-0-0',\n        data: removeEmptyProperties({ action: action, network: network, target: target }),\n    };\n    return buildSelfDescribingEvent({ event: eventJson });\n}\n/**\n * Build a Add To Cart Event\n * For tracking users adding items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Add To Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildAddToCart(event) {\n    var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/add_to_cart/jsonschema/1-0-0',\n            data: removeEmptyProperties({\n                sku: sku,\n                quantity: quantity,\n                name: name,\n                category: category,\n                unitPrice: unitPrice,\n                currency: currency,\n            }),\n        },\n    });\n}\n/**\n * Build a Remove From Cart Event\n * For tracking users removing items from a cart\n * on an ecommerce site.\n *\n * @param event - Contains the properties for the Remove From Cart event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildRemoveFromCart(event) {\n    var sku = event.sku, quantity = event.quantity, name = event.name, category = event.category, unitPrice = event.unitPrice, currency = event.currency;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/remove_from_cart/jsonschema/1-0-0',\n            data: removeEmptyProperties({\n                sku: sku,\n                quantity: quantity,\n                name: name,\n                category: category,\n                unitPrice: unitPrice,\n                currency: currency,\n            }),\n        },\n    });\n}\n/**\n * Build a Form Focus or Change Form Event based on schema property\n * When a user focuses on a form element or when a user makes a\n * change to a form element.\n *\n * @param event - Contains the properties for the Form Focus or Change Form event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormFocusOrChange(event) {\n    var event_schema = '';\n    var schema = event.schema, formId = event.formId, elementId = event.elementId, nodeName = event.nodeName, elementClasses = event.elementClasses, value = event.value, type = event.type;\n    var event_data = { formId: formId, elementId: elementId, nodeName: nodeName, elementClasses: elementClasses, value: value };\n    if (schema === 'change_form') {\n        event_schema = 'iglu:com.snowplowanalytics.snowplow/change_form/jsonschema/1-0-0';\n        event_data.type = type;\n    }\n    else if (schema === 'focus_form') {\n        event_schema = 'iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0';\n        event_data.elementType = type;\n    }\n    return buildSelfDescribingEvent({\n        event: {\n            schema: event_schema,\n            data: removeEmptyProperties(event_data, { value: true }),\n        },\n    });\n}\n/**\n * Build a Form Submission Event\n * Used to track when a user submits a form\n *\n * @param event - Contains the properties for the Form Submission event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildFormSubmission(event) {\n    var formId = event.formId, formClasses = event.formClasses, elements = event.elements;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/submit_form/jsonschema/1-0-0',\n            data: removeEmptyProperties({ formId: formId, formClasses: formClasses, elements: elements }),\n        },\n    });\n}\n/**\n * Build a Site Search Event\n * Used when a user performs a search action on a page\n *\n * @param event - Contains the properties for the Site Search event\n * @returns PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track}\n */\nfunction buildSiteSearch(event) {\n    var terms = event.terms, filters = event.filters, totalResults = event.totalResults, pageResults = event.pageResults;\n    return buildSelfDescribingEvent({\n        event: {\n            schema: 'iglu:com.snowplowanalytics.snowplow/site_search/jsonschema/1-0-0',\n            data: removeEmptyProperties({ terms: terms, filters: filters, totalResults: totalResults, pageResults: pageResults }),\n        },\n    });\n}\n/**\n * Build a Consent Withdrawn Event\n * Used for tracking when a user withdraws their consent\n *\n * @param event - Contains the properties for the Consent Withdrawn event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentWithdrawn(event) {\n    var all = event.all, id = event.id, version = event.version, name = event.name, description = event.description;\n    var documentJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n        data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n    };\n    return {\n        event: buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/consent_withdrawn/jsonschema/1-0-0',\n                data: removeEmptyProperties({\n                    all: all,\n                }),\n            },\n        }),\n        context: [documentJson],\n    };\n}\n/**\n * Build a Consent Granted Event\n * Used for tracking when a user grants their consent\n *\n * @param event - Contains the properties for the Consent Granted event\n * @returns An object containing the PayloadBuilder to be sent to {@link @snowplow/tracker-core#TrackerCore.track} and a 'consent_document' context\n */\nfunction buildConsentGranted(event) {\n    var expiry = event.expiry, id = event.id, version = event.version, name = event.name, description = event.description;\n    var documentJson = {\n        schema: 'iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0',\n        data: removeEmptyProperties({ id: id, version: version, name: name, description: description }),\n    };\n    return {\n        event: buildSelfDescribingEvent({\n            event: {\n                schema: 'iglu:com.snowplowanalytics.snowplow/consent_granted/jsonschema/1-0-0',\n                data: removeEmptyProperties({\n                    expiry: expiry,\n                }),\n            },\n        }),\n        context: [documentJson],\n    };\n}\n/**\n * Returns a copy of a JSON with undefined and null properties removed\n *\n * @param event - JSON object to clean\n * @param exemptFields - Set of fields which should not be removed even if empty\n * @returns A cleaned copy of eventJson\n */\nfunction removeEmptyProperties(event, exemptFields) {\n    if (exemptFields === void 0) { exemptFields = {}; }\n    var ret = {};\n    for (var k in event) {\n        if (exemptFields[k] || (event[k] !== null && typeof event[k] !== 'undefined')) {\n            ret[k] = event[k];\n        }\n    }\n    return ret;\n}\n\nfunction newInMemoryEventStore(_a) {\n    var _b = _a.maxSize, maxSize = _b === void 0 ? 1000 : _b, _c = _a.events, events = _c === void 0 ? [] : _c;\n    var store = __spreadArray([], events, true);\n    var count = function () { return Promise.resolve(store.length); };\n    return {\n        count: count,\n        add: function (payload) {\n            store.push(payload);\n            while (store.length > maxSize) {\n                store.shift();\n            }\n            return count();\n        },\n        removeHead: function (count) {\n            for (var i = 0; i < count; i++) {\n                store.shift();\n            }\n            return Promise.resolve();\n        },\n        iterator: function () {\n            var index = 0;\n            // copy the store to prevent mutation\n            var events = __spreadArray([], store, true);\n            return {\n                next: function () {\n                    if (index < events.length) {\n                        return Promise.resolve({ value: events[index++], done: false });\n                    }\n                    return Promise.resolve({ value: undefined, done: true });\n                },\n            };\n        },\n        getAll: function () { return Promise.resolve(__spreadArray([], store, true)); },\n        getAllPayloads: function () { return Promise.resolve(store.map(function (e) { return e.payload; })); },\n    };\n}\n\nvar PAYLOAD_DATA_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4';\n\n/**\n * Enclose an array of events in a self-describing payload_data JSON string\n *\n * @param array - events Batch of events\n * @returns string payload_data self-describing JSON\n */\nfunction encloseInPayloadDataEnvelope(events) {\n    return JSON.stringify({\n        schema: PAYLOAD_DATA_SCHEMA,\n        data: events,\n    });\n}\n/**\n * Attaches the STM field to outbound POST events.\n *\n * @param events - the events to attach the STM to\n */\nfunction attachStmToEvent(events) {\n    var stm = new Date().getTime().toString();\n    for (var i = 0; i < events.length; i++) {\n        events[i]['stm'] = stm;\n    }\n    return events;\n}\nfunction newEmitterRequest(_a) {\n    var endpoint = _a.endpoint, _b = _a.protocol, protocol = _b === void 0 ? 'https' : _b, port = _a.port, _c = _a.eventMethod, eventMethod = _c === void 0 ? 'post' : _c, customHeaders = _a.customHeaders, connectionTimeout = _a.connectionTimeout, _d = _a.keepalive, keepalive = _d === void 0 ? false : _d, _e = _a.postPath, postPath = _e === void 0 ? '/com.snowplowanalytics.snowplow/tp2' : _e, _f = _a.useStm, useStm = _f === void 0 ? true : _f, _g = _a.maxPostBytes, maxPostBytes = _g === void 0 ? 40000 : _g, _h = _a.credentials, credentials = _h === void 0 ? 'include' : _h;\n    var events = [];\n    var usePost = eventMethod.toLowerCase() === 'post';\n    var timer;\n    var abortController;\n    function countBytes() {\n        var count = events.reduce(function (acc, event) { return acc + (usePost ? event.getPOSTRequestBytesCount() : event.getGETRequestBytesCount()); }, 0);\n        if (usePost) {\n            count += 88; // 88 bytes for the payload_data envelope\n        }\n        return count;\n    }\n    function countEvents() {\n        return events.length;\n    }\n    function getServerAnonymizationOfExistingEvents() {\n        return events.length > 0 ? events[0].getServerAnonymization() : undefined;\n    }\n    function addEvent(event) {\n        if (events.length > 0 && getServerAnonymizationOfExistingEvents() !== event.getServerAnonymization()) {\n            return false;\n        }\n        else {\n            events.push(event);\n            return true;\n        }\n    }\n    function getEvents() {\n        return events;\n    }\n    function isFull() {\n        if (usePost) {\n            return countBytes() >= maxPostBytes;\n        }\n        else {\n            return events.length >= 1;\n        }\n    }\n    function createHeaders() {\n        var headers = new Headers();\n        if (usePost) {\n            headers.append('Content-Type', 'application/json; charset=UTF-8');\n        }\n        if (customHeaders) {\n            Object.keys(customHeaders).forEach(function (key) {\n                headers.append(key, customHeaders[key]);\n            });\n        }\n        if (getServerAnonymizationOfExistingEvents()) {\n            headers.append('SP-Anonymous', '*');\n        }\n        return headers;\n    }\n    function getFullCollectorUrl() {\n        var collectorUrl = endpoint;\n        if (!endpoint.includes('://')) {\n            collectorUrl = \"\".concat(protocol, \"://\").concat(endpoint);\n        }\n        if (port) {\n            collectorUrl = \"\".concat(collectorUrl, \":\").concat(port);\n        }\n        var path = usePost ? postPath : '/i';\n        return collectorUrl + path;\n    }\n    function makeRequest(url, options) {\n        closeRequest(false);\n        abortController = new AbortController();\n        timer = setTimeout(function () {\n            var reason = 'Request timed out';\n            console.error(reason);\n            timer = undefined;\n            closeRequest(false, reason);\n        }, connectionTimeout !== null && connectionTimeout !== void 0 ? connectionTimeout : 5000);\n        var requestOptions = __assign({ headers: createHeaders(), signal: abortController.signal, keepalive: keepalive, credentials: credentials }, options);\n        var request = new Request(url, requestOptions);\n        return request;\n    }\n    function makePostRequest() {\n        var batch = attachStmToEvent(events.map(function (event) { return event.getPOSTRequestBody(); }));\n        return makeRequest(getFullCollectorUrl(), {\n            method: 'POST',\n            body: encloseInPayloadDataEnvelope(batch),\n        });\n    }\n    function makeGetRequest() {\n        if (events.length !== 1) {\n            throw new Error('Only one event can be sent in a GET request');\n        }\n        var event = events[0];\n        var url = event.getGETRequestURL(getFullCollectorUrl(), useStm);\n        return makeRequest(url, {\n            method: 'GET',\n        });\n    }\n    function toRequest() {\n        if (events.length === 0) {\n            return undefined;\n        }\n        if (usePost) {\n            return makePostRequest();\n        }\n        else {\n            return makeGetRequest();\n        }\n    }\n    function closeRequest(successful, reason) {\n        if (timer !== undefined) {\n            clearTimeout(timer);\n            timer = undefined;\n        }\n        if (abortController !== undefined) {\n            var controller = abortController;\n            abortController = undefined;\n            if (!successful) {\n                controller.abort(reason);\n            }\n        }\n    }\n    return {\n        addEvent: addEvent,\n        getEvents: getEvents,\n        toRequest: toRequest,\n        countBytes: countBytes,\n        countEvents: countEvents,\n        isFull: isFull,\n        closeRequest: closeRequest,\n    };\n}\n\n/**\n * Count the number of bytes a string will occupy when UTF-8 encoded\n * Taken from http://stackoverflow.com/questions/2848462/count-bytes-in-textarea-using-javascript/\n *\n * @param s - The string\n * @returns number Length of s in bytes when UTF-8 encoded\n */\nfunction getUTF8Length(s) {\n    var len = 0;\n    for (var i = 0; i < s.length; i++) {\n        var code = s.charCodeAt(i);\n        if (code <= 0x7f) {\n            len += 1;\n        }\n        else if (code <= 0x7ff) {\n            len += 2;\n        }\n        else if (code >= 0xd800 && code <= 0xdfff) {\n            // Surrogate pair: These take 4 bytes in UTF-8 and 2 chars in UCS-2\n            // (Assume next char is the other [valid] half and just skip it)\n            len += 4;\n            i++;\n        }\n        else if (code < 0xffff) {\n            len += 3;\n        }\n        else {\n            len += 4;\n        }\n    }\n    return len;\n}\n/*\n  * Convert a dictionary to a querystring\n  * The context field is the last in the querystring\n  */\nfunction getQuerystring(request) {\n    var lowPriorityKeys = { co: true, cx: true };\n    var args = [];\n    for (var key in request) {\n        if (request.hasOwnProperty(key) && !lowPriorityKeys[key]) {\n            args.push(key + '=' + encodeURIComponent(request[key]));\n        }\n    }\n    for (var contextKey in lowPriorityKeys) {\n        if (request.hasOwnProperty(contextKey) && lowPriorityKeys[contextKey]) {\n            args.push(contextKey + '=' + encodeURIComponent(request[contextKey]));\n        }\n    }\n    return '?' + args.join('&');\n}\n/*\n  * Convert numeric fields to strings to match payload_data schema\n  */\nfunction preparePostBody(request) {\n    var cleanedRequest = Object.keys(request)\n        .map(function (k) { return [k, request[k]]; })\n        .reduce(function (acc, _a) {\n        var key = _a[0], value = _a[1];\n        acc[key] = value.toString();\n        return acc;\n    }, {});\n    return cleanedRequest;\n}\nfunction newEmitterEvent(eventStorePayload) {\n    var querystring = null;\n    var postBody = null;\n    var byteCountGET = null;\n    var byteCountPOST = null;\n    function getPayload() {\n        return eventStorePayload.payload;\n    }\n    function getServerAnonymization() {\n        var _a;\n        return (_a = eventStorePayload.svrAnon) !== null && _a !== void 0 ? _a : false;\n    }\n    function getCachedQuerystring(payload) {\n        if (querystring === null) {\n            querystring = getQuerystring(payload);\n        }\n        return querystring;\n    }\n    function getGETRequestURL(collectorUrl, useStm) {\n        var querystring = getCachedQuerystring(getPayload());\n        if (useStm) {\n            return collectorUrl + querystring.replace('?', '?stm=' + new Date().getTime() + '&');\n        }\n        return collectorUrl + querystring;\n    }\n    function getGETRequestBytesCount() {\n        if (byteCountGET === null) {\n            var querystring_1 = getCachedQuerystring(getPayload());\n            byteCountGET = getUTF8Length(querystring_1);\n        }\n        return byteCountGET;\n    }\n    function getPOSTRequestBody() {\n        if (postBody === null) {\n            postBody = preparePostBody(getPayload());\n        }\n        return postBody;\n    }\n    function getPOSTRequestBytesCount() {\n        if (byteCountPOST === null) {\n            byteCountPOST = getUTF8Length(JSON.stringify(getPOSTRequestBody()));\n        }\n        return byteCountPOST;\n    }\n    return {\n        getPayload: getPayload,\n        getServerAnonymization: getServerAnonymization,\n        getGETRequestURL: getGETRequestURL,\n        getGETRequestBytesCount: getGETRequestBytesCount,\n        getPOSTRequestBody: getPOSTRequestBody,\n        getPOSTRequestBytesCount: getPOSTRequestBytesCount,\n    };\n}\n\nfunction newEmitter(_a) {\n    var endpoint = _a.endpoint, _b = _a.eventMethod, eventMethod = _b === void 0 ? 'post' : _b, postPath = _a.postPath, protocol = _a.protocol, port = _a.port, _c = _a.maxPostBytes, maxPostBytes = _c === void 0 ? 40000 : _c, maxGetBytes = _a.maxGetBytes, _d = _a.bufferSize, bufferSize = _d === void 0 ? 1 : _d, customHeaders = _a.customHeaders, serverAnonymization = _a.serverAnonymization, connectionTimeout = _a.connectionTimeout, keepalive = _a.keepalive, cookieExtensionService = _a.cookieExtensionService, idService = _a.idService, _e = _a.dontRetryStatusCodes, dontRetryStatusCodes = _e === void 0 ? [] : _e, _f = _a.retryStatusCodes, retryStatusCodes = _f === void 0 ? [] : _f, _g = _a.retryFailedRequests, retryFailedRequests = _g === void 0 ? true : _g, onRequestFailure = _a.onRequestFailure, onRequestSuccess = _a.onRequestSuccess, _h = _a.customFetch, customFetch = _h === void 0 ? fetch : _h, useStm = _a.useStm, _j = _a.eventStore, eventStore = _j === void 0 ? newInMemoryEventStore({}) : _j, credentials = _a.credentials;\n    /* `cookieExtensionService` gets priority until `idService` is completely removed. */\n    cookieExtensionService = cookieExtensionService || idService;\n    var cookieExtensionServiceCalled = false;\n    var flushInProgress = false;\n    var usePost = eventMethod.toLowerCase() === 'post';\n    dontRetryStatusCodes = dontRetryStatusCodes.concat([400, 401, 403, 410, 422]);\n    function shouldRetryForStatusCode(statusCode) {\n        // success, don't retry\n        if (statusCode >= 200 && statusCode < 300) {\n            return false;\n        }\n        if (!retryFailedRequests) {\n            return false;\n        }\n        // retry if status code among custom user-supplied retry codes\n        if (retryStatusCodes.includes(statusCode)) {\n            return true;\n        }\n        // retry if status code *not* among the don't retry codes\n        return !dontRetryStatusCodes.includes(statusCode);\n    }\n    function callOnRequestSuccess(payloads, response) {\n        if (onRequestSuccess !== undefined) {\n            setTimeout(function () {\n                try {\n                    onRequestSuccess === null || onRequestSuccess === void 0 ? void 0 : onRequestSuccess(payloads, response);\n                }\n                catch (e) {\n                    LOG.error('Error in onRequestSuccess', e);\n                }\n            }, 0);\n        }\n    }\n    function callOnRequestFailure(failure, response) {\n        if (onRequestFailure !== undefined) {\n            setTimeout(function () {\n                try {\n                    onRequestFailure === null || onRequestFailure === void 0 ? void 0 : onRequestFailure(failure, response);\n                }\n                catch (e) {\n                    LOG.error('Error in onRequestFailure', e);\n                }\n            }, 0);\n        }\n    }\n    function executeRequest(request) {\n        return __awaiter(this, void 0, void 0, function () {\n            var fetchRequest, payloads, response, willRetry, e_1, message;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        fetchRequest = request.toRequest();\n                        if (fetchRequest === undefined) {\n                            throw new Error('Empty batch');\n                        }\n                        payloads = request.getEvents().map(function (event) { return event.getPayload(); });\n                        _a.label = 1;\n                    case 1:\n                        _a.trys.push([1, 4, , 5]);\n                        return [4 /*yield*/, customFetch(fetchRequest)];\n                    case 2:\n                        response = _a.sent();\n                        return [4 /*yield*/, response.text()];\n                    case 3:\n                        _a.sent(); // wait for the response to be fully read\n                        request.closeRequest(true);\n                        if (response.ok) {\n                            callOnRequestSuccess(payloads, response);\n                            return [2 /*return*/, { success: true, retry: false, status: response.status }];\n                        }\n                        else {\n                            willRetry = shouldRetryForStatusCode(response.status);\n                            callOnRequestFailure({\n                                events: payloads,\n                                status: response.status,\n                                message: response.statusText,\n                                willRetry: willRetry,\n                            }, response);\n                            return [2 /*return*/, { success: false, retry: willRetry, status: response.status }];\n                        }\n                    case 4:\n                        e_1 = _a.sent();\n                        request.closeRequest(false);\n                        message = typeof e_1 === 'string' ? e_1 : e_1 ? e_1.message : 'Unknown error';\n                        callOnRequestFailure({\n                            events: payloads,\n                            message: message,\n                            willRetry: true,\n                        });\n                        return [2 /*return*/, { success: false, retry: true }];\n                    case 5: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function newEmitterRequestWithConfig() {\n        return newEmitterRequest({\n            endpoint: endpoint,\n            protocol: protocol,\n            port: port,\n            eventMethod: eventMethod,\n            customHeaders: customHeaders,\n            connectionTimeout: connectionTimeout,\n            keepalive: keepalive,\n            maxPostBytes: maxPostBytes,\n            useStm: useStm,\n            credentials: credentials,\n            postPath: postPath,\n        });\n    }\n    function shouldSkipEventStore(emitterEvent) {\n        var eventTooBigWarning = function (bytes, maxBytes) {\n            return LOG.warn('Event (' + bytes + 'B) too big, max is ' + maxBytes);\n        };\n        if (usePost) {\n            var bytes = emitterEvent.getPOSTRequestBytesCount() + 88; // 88 bytes for the payload_data envelope\n            var tooBig = bytes > maxPostBytes;\n            if (tooBig) {\n                eventTooBigWarning(bytes, maxPostBytes);\n            }\n            return tooBig;\n        }\n        else {\n            if (maxGetBytes === undefined) {\n                return false;\n            }\n            var bytes = emitterEvent.getGETRequestBytesCount();\n            var tooBig = bytes > maxGetBytes;\n            if (tooBig) {\n                eventTooBigWarning(bytes, maxGetBytes);\n            }\n            return tooBig;\n        }\n    }\n    function callCookieExtensionService() {\n        return __awaiter(this, void 0, void 0, function () {\n            var request;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        if (!(cookieExtensionService && !cookieExtensionServiceCalled)) return [3 /*break*/, 2];\n                        cookieExtensionServiceCalled = true;\n                        request = new Request(cookieExtensionService, { method: 'GET' });\n                        return [4 /*yield*/, customFetch(request)];\n                    case 1:\n                        _a.sent();\n                        _a.label = 2;\n                    case 2: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function flush() {\n        return __awaiter(this, void 0, void 0, function () {\n            var e_2;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        if (!!flushInProgress) return [3 /*break*/, 5];\n                        flushInProgress = true;\n                        _a.label = 1;\n                    case 1:\n                        _a.trys.push([1, 3, 4, 5]);\n                        return [4 /*yield*/, continueFlush()];\n                    case 2:\n                        _a.sent();\n                        return [3 /*break*/, 5];\n                    case 3:\n                        e_2 = _a.sent();\n                        LOG.error('Error sending events', e_2);\n                        return [3 /*break*/, 5];\n                    case 4:\n                        flushInProgress = false;\n                        return [7 /*endfinally*/];\n                    case 5: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function continueFlush() {\n        return __awaiter(this, void 0, void 0, function () {\n            var request, eventStoreIterator, _a, value, done, event_1, _b, success, retry, status;\n            return __generator(this, function (_c) {\n                switch (_c.label) {\n                    case 0: return [4 /*yield*/, callCookieExtensionService()];\n                    case 1:\n                        _c.sent();\n                        request = newEmitterRequestWithConfig();\n                        eventStoreIterator = eventStore.iterator();\n                        _c.label = 2;\n                    case 2:\n                        if (request.isFull()) {\n                            return [3 /*break*/, 4];\n                        }\n                        return [4 /*yield*/, eventStoreIterator.next()];\n                    case 3:\n                        _a = _c.sent(), value = _a.value, done = _a.done;\n                        if (done || value === undefined) {\n                            return [3 /*break*/, 4];\n                        }\n                        event_1 = newEmitterEvent(value);\n                        if (!request.addEvent(event_1)) {\n                            return [3 /*break*/, 4];\n                        }\n                        return [3 /*break*/, 2];\n                    case 4:\n                        if (request.countEvents() === 0) {\n                            return [2 /*return*/];\n                        }\n                        return [4 /*yield*/, executeRequest(request)];\n                    case 5:\n                        _b = _c.sent(), success = _b.success, retry = _b.retry, status = _b.status;\n                        if (!(success || !retry)) return [3 /*break*/, 7];\n                        if (!success) {\n                            LOG.error(\"Status \".concat(status, \", will not retry.\"));\n                        }\n                        return [4 /*yield*/, eventStore.removeHead(request.countEvents())];\n                    case 6:\n                        _c.sent();\n                        _c.label = 7;\n                    case 7:\n                        if (!success) return [3 /*break*/, 9];\n                        return [4 /*yield*/, continueFlush()];\n                    case 8:\n                        _c.sent();\n                        _c.label = 9;\n                    case 9: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function input(payload) {\n        return __awaiter(this, void 0, void 0, function () {\n            var eventStorePayload, event, request, count;\n            return __generator(this, function (_a) {\n                switch (_a.label) {\n                    case 0:\n                        eventStorePayload = newEventStorePayload({ payload: payload, svrAnon: serverAnonymization });\n                        event = newEmitterEvent(eventStorePayload);\n                        if (!shouldSkipEventStore(event)) return [3 /*break*/, 2];\n                        request = newEmitterRequestWithConfig();\n                        request.addEvent(event);\n                        return [4 /*yield*/, executeRequest(request)];\n                    case 1:\n                        _a.sent();\n                        return [3 /*break*/, 5];\n                    case 2: return [4 /*yield*/, eventStore.add(eventStorePayload)];\n                    case 3:\n                        count = _a.sent();\n                        if (!(count >= bufferSize)) return [3 /*break*/, 5];\n                        return [4 /*yield*/, flush()];\n                    case 4:\n                        _a.sent();\n                        _a.label = 5;\n                    case 5: return [2 /*return*/];\n                }\n            });\n        });\n    }\n    function setCollectorUrl(url) {\n        endpoint = url;\n    }\n    function setAnonymousTracking(at) {\n        serverAnonymization = at;\n    }\n    function setBufferSize(bs) {\n        bufferSize = bs;\n    }\n    return {\n        flush: flush,\n        input: input,\n        setCollectorUrl: setCollectorUrl,\n        setAnonymousTracking: setAnonymousTracking,\n        setBufferSize: setBufferSize,\n    };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar version = version$1;\n\nexport { LOG, LOG_LEVEL, buildAdClick, buildAdConversion, buildAdImpression, buildAddToCart, buildConsentGranted, buildConsentWithdrawn, buildEcommerceTransaction, buildEcommerceTransactionItem, buildFormFocusOrChange, buildFormSubmission, buildLinkClick, buildPagePing, buildPageView, buildRemoveFromCart, buildScreenView, buildSelfDescribingEvent, buildSiteSearch, buildSocialInteraction, buildStructEvent, getRuleParts, getSchemaParts, globalContexts, isConditionalContextProvider, isContextCallbackFunction, isContextPrimitive, isFilterProvider, isJson, isNonEmptyJson, isRuleSet, isRuleSetProvider, isSelfDescribingJson, isStringArray, isValidRule, isValidRuleSetArg, matchSchemaAgainstRule, matchSchemaAgainstRuleSet, newEmitter, newEventStorePayload, newInMemoryEventStore, payloadBuilder, payloadJsonProcessor, pluginContexts, removeEmptyProperties, resolveDynamicContext, trackerCore, validateVendor, validateVendorParts, version };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Core functionality for Snowplow Browser trackers v4.6.7 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { newInMemoryEventStore, newEmitter, trackerCore, buildPageView, LOG, buildPagePing } from '@snowplow/tracker-core';\nimport { __assign, __spreadArray } from 'tslib';\nimport hash from 'sha1';\nimport { v4 } from 'uuid';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Attempt to get a value from localStorage\n *\n * @param string - key\n * @returns string The value obtained from localStorage, or\n *                undefined if localStorage is inaccessible\n */\nfunction attemptGetLocalStorage(key) {\n    try {\n        var localStorageAlias = window.localStorage, exp = localStorageAlias.getItem(key + '.expires');\n        if (exp === null || +exp > Date.now()) {\n            return localStorageAlias.getItem(key);\n        }\n        else {\n            localStorageAlias.removeItem(key);\n            localStorageAlias.removeItem(key + '.expires');\n        }\n        return undefined;\n    }\n    catch (e) {\n        return undefined;\n    }\n}\n/**\n * Attempt to write a value to localStorage\n *\n * @param string - key\n * @param string - value\n * @param number - ttl Time to live in seconds, defaults to 2 years from Date.now()\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptWriteLocalStorage(key, value, ttl) {\n    if (ttl === void 0) { ttl = 63072000; }\n    try {\n        var localStorageAlias = window.localStorage, t = Date.now() + ttl * 1000;\n        localStorageAlias.setItem(\"\".concat(key, \".expires\"), t.toString());\n        localStorageAlias.setItem(key, value);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n/**\n * Attempt to delete a value from localStorage\n *\n * @param string - key\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptDeleteLocalStorage(key) {\n    try {\n        var localStorageAlias = window.localStorage;\n        localStorageAlias.removeItem(key);\n        localStorageAlias.removeItem(key + '.expires');\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n/**\n * Attempt to get a value from sessionStorage\n *\n * @param string - key\n * @returns string The value obtained from sessionStorage, or\n *                undefined if sessionStorage is inaccessible\n */\nfunction attemptGetSessionStorage(key) {\n    try {\n        return window.sessionStorage.getItem(key);\n    }\n    catch (e) {\n        return undefined;\n    }\n}\n/**\n * Attempt to write a value to sessionStorage\n *\n * @param string - key\n * @param string - value\n * @returns boolean Whether the operation succeeded\n */\nfunction attemptWriteSessionStorage(key, value) {\n    try {\n        window.sessionStorage.setItem(key, value);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n\nvar DEFAULT_CROSS_DOMAIN_LINKER_PARAMS = {\n    sessionId: true,\n    sourceId: true,\n    sourcePlatform: false,\n    userId: false,\n    reason: false,\n};\nfunction createCrossDomainParameterValue(isExtendedFormat, attributeConfiguration, attributeValues) {\n    var _a;\n    var crossDomainParameterValue;\n    var timestamp = new Date().getTime();\n    var config = __assign(__assign({}, DEFAULT_CROSS_DOMAIN_LINKER_PARAMS), attributeConfiguration);\n    var domainUserId = attributeValues.domainUserId, userId = attributeValues.userId, sessionId = attributeValues.sessionId, sourceId = attributeValues.sourceId, sourcePlatform = attributeValues.sourcePlatform, event = attributeValues.event;\n    var eventTarget = event.currentTarget;\n    var reason = typeof config.reason === 'function' ? config.reason(event) : (_a = eventTarget === null || eventTarget === void 0 ? void 0 : eventTarget.textContent) === null || _a === void 0 ? void 0 : _a.trim();\n    if (isExtendedFormat) {\n        /* Index is used by Enrich, so it should not be changed. */\n        crossDomainParameterValue = [\n            domainUserId,\n            timestamp,\n            config.sessionId && sessionId,\n            config.userId && urlSafeBase64Encode(userId || ''),\n            config.sourceId && urlSafeBase64Encode(sourceId || ''),\n            config.sourcePlatform && sourcePlatform,\n            config.reason && urlSafeBase64Encode(reason || ''),\n        ]\n            .map(function (attribute) { return attribute || ''; })\n            .join('.')\n            // Remove trailing dots\n            .replace(/([.]*$)/, '');\n    }\n    else {\n        crossDomainParameterValue = attributeValues.domainUserId + '.' + timestamp;\n    }\n    return crossDomainParameterValue;\n}\n/**\n *\n * The url-safe variation emits - and _ instead of + and / characters. Also removes = sign padding.\n * @param {string} str The string to encode in a URL safe manner\n * @return {string}\n */\nfunction urlSafeBase64Encode(str) {\n    return btoa(str).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/\\=+$/, '');\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Checks if an object is a string\n * @param str - The object to check\n */\nfunction isString(str) {\n    if (str && typeof str.valueOf() === 'string') {\n        return true;\n    }\n    return false;\n}\n/**\n * Checks if an object is an integer\n * @param int - The object to check\n */\nfunction isInteger(int) {\n    return ((Number.isInteger && Number.isInteger(int)) || (typeof int === 'number' && isFinite(int) && Math.floor(int) === int));\n}\n/**\n * Checks if the input parameter is a function\n * @param func - The object to check\n */\nfunction isFunction(func) {\n    if (func && typeof func === 'function') {\n        return true;\n    }\n    return false;\n}\n/**\n * Lightweight configured runtime timezone detection\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions#getting_the_users_time_zone_and_locale_preferences\n * @returns IANA timezone name of current runtime preference\n */\nfunction getTimeZone() {\n    if (typeof Intl === 'object' && typeof Intl.DateTimeFormat === 'function') {\n        var systemPreferences = new Intl.DateTimeFormat().resolvedOptions();\n        return systemPreferences.timeZone;\n    }\n}\n/**\n * Cleans up the page title\n */\nfunction fixupTitle(title) {\n    if (!isString(title)) {\n        title = title.text || '';\n        var tmp = document.getElementsByTagName('title');\n        if (tmp && tmp[0] != null) {\n            title = tmp[0].text;\n        }\n    }\n    return title;\n}\n/**\n * Extract hostname from URL\n */\nfunction getHostName(url) {\n    // scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n    var e = new RegExp('^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)'), matches = e.exec(url);\n    return matches ? matches[1] : url;\n}\n/**\n * Fix-up domain\n */\nfunction fixupDomain(domain) {\n    var dl = domain.length;\n    // remove trailing '.'\n    if (domain.charAt(--dl) === '.') {\n        domain = domain.slice(0, dl);\n    }\n    // remove leading '*'\n    if (domain.slice(0, 2) === '*.') {\n        domain = domain.slice(1);\n    }\n    return domain;\n}\n/**\n * Get page referrer. In the case of a single-page app,\n * if the URL changes without the page reloading, pass\n * in the old URL. It will be returned unless overriden\n * by a \"refer(r)er\" parameter in the querystring.\n *\n * @param string - oldLocation Optional.\n * @returns string The referrer\n */\nfunction getReferrer(oldLocation) {\n    var windowAlias = window, fromQs = fromQuerystring('referrer', windowAlias.location.href) || fromQuerystring('referer', windowAlias.location.href);\n    // Short-circuit\n    if (fromQs) {\n        return fromQs;\n    }\n    // In the case of a single-page app, return the old URL\n    if (oldLocation) {\n        return oldLocation;\n    }\n    try {\n        if (windowAlias.top) {\n            return windowAlias.top.document.referrer;\n        }\n        else if (windowAlias.parent) {\n            return windowAlias.parent.document.referrer;\n        }\n    }\n    catch (_a) { }\n    return document.referrer;\n}\n/**\n * Cross-browser helper function to add event handler\n */\nfunction addEventListener(element, eventType, eventHandler, options) {\n    if (element.addEventListener) {\n        element.addEventListener(eventType, eventHandler, options);\n        return true;\n    }\n    // IE Support\n    if (element.attachEvent) {\n        return element.attachEvent('on' + eventType, eventHandler);\n    }\n    element['on' + eventType] = eventHandler;\n}\n/**\n * Return value from name-value pair in querystring\n */\nfunction fromQuerystring(field, url) {\n    var match = new RegExp('^[^#]*[?&]' + field + '=([^&#]*)').exec(url);\n    if (!match) {\n        return null;\n    }\n    return decodeURIComponent(match[1].replace(/\\+/g, ' '));\n}\n/**\n * Add a name-value pair to the querystring of a URL\n *\n * @param string - url URL to decorate\n * @param string - name Name of the querystring pair\n * @param string - value Value of the querystring pair\n */\nfunction decorateQuerystring(url, name, value) {\n    var initialQsParams = name + '=' + value;\n    var hashSplit = url.split('#');\n    var qsSplit = hashSplit[0].split('?');\n    var beforeQuerystring = qsSplit.shift();\n    // Necessary because a querystring may contain multiple question marks\n    var querystring = qsSplit.join('?');\n    if (!querystring) {\n        querystring = initialQsParams;\n    }\n    else {\n        // Whether this is the first time the link has been decorated\n        var initialDecoration = true;\n        var qsFields = querystring.split('&');\n        for (var i = 0; i < qsFields.length; i++) {\n            if (qsFields[i].substr(0, name.length + 1) === name + '=') {\n                initialDecoration = false;\n                qsFields[i] = initialQsParams;\n                querystring = qsFields.join('&');\n                break;\n            }\n        }\n        if (initialDecoration) {\n            querystring = initialQsParams + '&' + querystring;\n        }\n    }\n    hashSplit[0] = beforeQuerystring + '?' + querystring;\n    return hashSplit.join('#');\n}\n/**\n * Finds the root domain\n */\nfunction findRootDomain(sameSite, secure) {\n    var windowLocationHostnameAlias = window.location.hostname, cookiePrefix = '_sp_root_domain_test_', cookieName = cookiePrefix + new Date().getTime(), cookieValue = '_test_value_' + new Date().getTime();\n    var locationParts = windowLocationHostnameAlias.split('.');\n    for (var idx = locationParts.length - 2; idx >= 0; idx--) {\n        var currentDomain = locationParts.slice(idx).join('.');\n        cookie(cookieName, cookieValue, 0, '/', currentDomain, sameSite, secure);\n        if (cookie(cookieName) === cookieValue) {\n            // Clean up created cookie(s)\n            deleteCookie(cookieName, '/', currentDomain, sameSite, secure);\n            var cookieNames = getCookiesWithPrefix(cookiePrefix);\n            for (var i = 0; i < cookieNames.length; i++) {\n                deleteCookie(cookieNames[i], '/', currentDomain, sameSite, secure);\n            }\n            return currentDomain;\n        }\n    }\n    // Cookies cannot be read\n    return windowLocationHostnameAlias;\n}\n/**\n * Checks whether a value is present within an array\n *\n * @param val - The value to check for\n * @param array - The array to check within\n * @returns boolean Whether it exists\n */\nfunction isValueInArray(val, array) {\n    for (var i = 0; i < array.length; i++) {\n        if (array[i] === val) {\n            return true;\n        }\n    }\n    return false;\n}\n/**\n * Deletes an arbitrary cookie by setting the expiration date to the past\n *\n * @param cookieName - The name of the cookie to delete\n * @param domainName - The domain the cookie is in\n */\nfunction deleteCookie(cookieName, path, domainName, sameSite, secure) {\n    cookie(cookieName, '', -1, path, domainName, sameSite, secure);\n}\n/**\n * Fetches the name of all cookies beginning with a certain prefix\n *\n * @param cookiePrefix - The prefix to check for\n * @returns array The cookies that begin with the prefix\n */\nfunction getCookiesWithPrefix(cookiePrefix) {\n    var cookies = document.cookie.split('; ');\n    var cookieNames = [];\n    for (var i = 0; i < cookies.length; i++) {\n        if (cookies[i].substring(0, cookiePrefix.length) === cookiePrefix) {\n            cookieNames.push(cookies[i]);\n        }\n    }\n    return cookieNames;\n}\n/**\n * Get and set the cookies associated with the current document in browser\n * This implementation always returns a string, returns the cookie value if only name is specified\n *\n * @param name - The cookie name (required)\n * @param value - The cookie value\n * @param ttl - The cookie Time To Live (seconds)\n * @param path - The cookies path\n * @param domain - The cookies domain\n * @param samesite - The cookies samesite attribute\n * @param secure - Boolean to specify if cookie should be secure\n * @returns string The cookies value\n */\nfunction cookie(name, value, ttl, path, domain, samesite, secure) {\n    if (arguments.length > 1) {\n        return (document.cookie =\n            name +\n                '=' +\n                encodeURIComponent(value !== null && value !== void 0 ? value : '') +\n                (ttl ? '; Expires=' + new Date(+new Date() + ttl * 1000).toUTCString() : '') +\n                (path ? '; Path=' + path : '') +\n                (domain ? '; Domain=' + domain : '') +\n                (samesite ? '; SameSite=' + samesite : '') +\n                (secure ? '; Secure' : ''));\n    }\n    return decodeURIComponent((('; ' + document.cookie).split('; ' + name + '=')[1] || '').split(';')[0]);\n}\n/**\n * Parses an object and returns either the\n * integer or undefined.\n *\n * @param obj - The object to parse\n * @returns the result of the parse operation\n */\nfunction parseAndValidateInt(obj) {\n    var result = parseInt(obj);\n    return isNaN(result) ? undefined : result;\n}\n/**\n * Parses an object and returns either the\n * number or undefined.\n *\n * @param obj - The object to parse\n * @returns the result of the parse operation\n */\nfunction parseAndValidateFloat(obj) {\n    var result = parseFloat(obj);\n    return isNaN(result) ? undefined : result;\n}\n/**\n * Convert a criterion object to a filter function\n *\n * @param object - criterion Either {allowlist: [array of allowable strings]}\n *                             or {denylist: [array of allowable strings]}\n *                             or {filter: function (elt) {return whether to track the element}\n * @param boolean - byClass Whether to allowlist/denylist based on an element's classes (for forms)\n *                        or name attribute (for fields)\n */\nfunction getFilterByClass(criterion) {\n    // If the criterion argument is not an object, add listeners to all elements\n    if (criterion == null || typeof criterion !== 'object' || Array.isArray(criterion)) {\n        return function () {\n            return true;\n        };\n    }\n    var inclusive = Object.prototype.hasOwnProperty.call(criterion, 'allowlist');\n    var specifiedClassesSet = getSpecifiedClassesSet(criterion);\n    return getFilter(criterion, function (elt) {\n        return checkClass(elt, specifiedClassesSet) === inclusive;\n    });\n}\n/**\n * Convert a criterion object to a filter function\n *\n * @param object - criterion Either {allowlist: [array of allowable strings]}\n *                             or {denylist: [array of allowable strings]}\n *                             or {filter: function (elt) {return whether to track the element}\n */\nfunction getFilterByName(criterion) {\n    // If the criterion argument is not an object, add listeners to all elements\n    if (criterion == null || typeof criterion !== 'object' || Array.isArray(criterion)) {\n        return function () {\n            return true;\n        };\n    }\n    var inclusive = criterion.hasOwnProperty('allowlist');\n    var specifiedClassesSet = getSpecifiedClassesSet(criterion);\n    return getFilter(criterion, function (elt) {\n        return elt.name in specifiedClassesSet === inclusive;\n    });\n}\n/**\n * List the classes of a DOM element without using elt.classList (for compatibility with IE 9)\n */\nfunction getCssClasses(elt) {\n    return elt.className.match(/\\S+/g) || [];\n}\n/**\n * Check whether an element has at least one class from a given list\n */\nfunction checkClass(elt, classList) {\n    var classes = getCssClasses(elt);\n    for (var _i = 0, classes_1 = classes; _i < classes_1.length; _i++) {\n        var className = classes_1[_i];\n        if (classList[className]) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getFilter(criterion, fallbackFilter) {\n    if (criterion.hasOwnProperty('filter') && criterion.filter) {\n        return criterion.filter;\n    }\n    return fallbackFilter;\n}\nfunction getSpecifiedClassesSet(criterion) {\n    // Convert the array of classes to an object of the form {class1: true, class2: true, ...}\n    var specifiedClassesSet = {};\n    var specifiedClasses = criterion.allowlist || criterion.denylist;\n    if (specifiedClasses) {\n        if (!Array.isArray(specifiedClasses)) {\n            specifiedClasses = [specifiedClasses];\n        }\n        for (var i = 0; i < specifiedClasses.length; i++) {\n            specifiedClassesSet[specifiedClasses[i]] = true;\n        }\n    }\n    return specifiedClassesSet;\n}\n\nfunction newLocalStorageEventStore(_a) {\n    var trackerId = _a.trackerId, _b = _a.maxLocalStorageQueueSize, maxLocalStorageQueueSize = _b === void 0 ? 1000 : _b, _c = _a.useLocalStorage, useLocalStorage = _c === void 0 ? true : _c;\n    var queueName = \"snowplowOutQueue_\".concat(trackerId);\n    function newInMemoryEventStoreFromLocalStorage() {\n        if (useLocalStorage) {\n            try {\n                var localStorageQueue = window.localStorage.getItem(queueName);\n                var events = localStorageQueue ? JSON.parse(localStorageQueue) : [];\n                return newInMemoryEventStore({ maxSize: maxLocalStorageQueueSize, events: events });\n            }\n            catch (e) {\n                console.error('Failed to access localStorage when initializing event store:', e);\n                return newInMemoryEventStore({ maxSize: maxLocalStorageQueueSize });\n            }\n        }\n        else {\n            return newInMemoryEventStore({ maxSize: maxLocalStorageQueueSize });\n        }\n    }\n    var _d = newInMemoryEventStoreFromLocalStorage(), getAll = _d.getAll, getAllPayloads = _d.getAllPayloads, add = _d.add, count = _d.count, iterator = _d.iterator, removeHead = _d.removeHead;\n    function sync() {\n        if (useLocalStorage) {\n            return getAll().then(function (events) {\n                try {\n                    window.localStorage.setItem(queueName, JSON.stringify(events));\n                }\n                catch (e) {\n                    console.error('Failed to persist events to localStorage:', e);\n                }\n            });\n        }\n        else {\n            return Promise.resolve();\n        }\n    }\n    return {\n        count: count,\n        add: function (payload) {\n            add(payload);\n            return sync().then(count);\n        },\n        removeHead: function (count) {\n            removeHead(count);\n            return sync();\n        },\n        iterator: iterator,\n        getAll: getAll,\n        getAllPayloads: getAllPayloads,\n        setUseLocalStorage: function (use) {\n            useLocalStorage = use;\n        },\n    };\n}\n\nfunction newOutQueue(configuration, sharedState) {\n    var _a;\n    var eventStore = (_a = configuration.eventStore) !== null && _a !== void 0 ? _a : newLocalStorageEventStore(configuration);\n    configuration.eventStore = eventStore;\n    var emitter = newEmitter(configuration);\n    sharedState.bufferFlushers.push(emitter.flush);\n    return {\n        enqueueRequest: emitter.input,\n        executeQueue: emitter.flush,\n        setAnonymousTracking: emitter.setAnonymousTracking,\n        setCollectorUrl: emitter.setCollectorUrl,\n        setBufferSize: emitter.setBufferSize,\n        setUseLocalStorage: function (localStorage) {\n            if (eventStore.hasOwnProperty('setUseLocalStorage')) {\n                var localStorageStore = eventStore;\n                localStorageStore.setUseLocalStorage(localStorage);\n            }\n        },\n    };\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/*\n * Extract parameter from URL\n */\nfunction getParameter(url, name) {\n    // scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n    var e = new RegExp('^(?:https?|ftp)(?::/*(?:[^?]+))([?][^#]+)'), matches = e.exec(url);\n    if (matches && (matches === null || matches === void 0 ? void 0 : matches.length) > 1) {\n        return fromQuerystring(name, matches[1]);\n    }\n    return null;\n}\n/*\n * Fix-up URL when page rendered from search engine cache or translated page.\n */\nfunction fixupUrl(hostName, href, referrer) {\n    var _a;\n    if (hostName === 'translate.googleusercontent.com') {\n        // Google\n        if (referrer === '') {\n            referrer = href;\n        }\n        href = (_a = getParameter(href, 'u')) !== null && _a !== void 0 ? _a : '';\n        hostName = getHostName(href);\n    }\n    else if (hostName === 'cc.bingj.com' || // Bing & Yahoo\n        hostName === 'webcache.googleusercontent.com' // Google\n    ) {\n        href = document.links[0].href;\n        hostName = getHostName(href);\n    }\n    return [hostName, href, referrer];\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Indices of cookie values\n */\nvar cookieDisabledIndex = 0, domainUserIdIndex = 1, createTsIndex = 2, visitCountIndex = 3, nowTsIndex = 4, lastVisitTsIndex = 5, sessionIdIndex = 6, previousSessionIdIndex = 7, firstEventIdIndex = 8, firstEventTsInMsIndex = 9, eventIndexIndex = 10;\nfunction emptyIdCookie() {\n    var idCookie = ['1', '', 0, 0, 0, undefined, '', '', '', undefined, 0];\n    return idCookie;\n}\n/**\n * Parses the cookie values from its string representation.\n *\n * @param id Cookie value as string\n * @param domainUserId Domain user ID to be used in case of empty cookie string\n * @returns Parsed ID cookie tuple\n */\nfunction parseIdCookie(id, domainUserId, memorizedSessionId, memorizedVisitCount) {\n    var now = new Date(), nowTs = Math.round(now.getTime() / 1000), tmpContainer;\n    if (id) {\n        tmpContainer = id.split('.');\n        // cookies enabled\n        tmpContainer.unshift('0');\n    }\n    else {\n        tmpContainer = [\n            // cookies disabled\n            '1',\n            // Domain user ID\n            domainUserId,\n            // Creation timestamp - seconds since Unix epoch\n            nowTs,\n            // visitCount - 0 = no previous visit\n            memorizedVisitCount,\n            // Current visit timestamp\n            nowTs,\n            // Last visit timestamp - blank meaning no previous visit\n            '',\n            // Session ID\n            memorizedSessionId,\n        ];\n    }\n    if (!tmpContainer[sessionIdIndex] || tmpContainer[sessionIdIndex] === 'undefined') {\n        // session id\n        tmpContainer[sessionIdIndex] = v4();\n    }\n    if (!tmpContainer[previousSessionIdIndex] || tmpContainer[previousSessionIdIndex] === 'undefined') {\n        // previous session id\n        tmpContainer[previousSessionIdIndex] = '';\n    }\n    if (!tmpContainer[firstEventIdIndex] || tmpContainer[firstEventIdIndex] === 'undefined') {\n        // firstEventId - blank meaning no previous event\n        tmpContainer[firstEventIdIndex] = '';\n    }\n    if (!tmpContainer[firstEventTsInMsIndex] || tmpContainer[firstEventTsInMsIndex] === 'undefined') {\n        // firstEventTs - blank meaning no previous event\n        tmpContainer[firstEventTsInMsIndex] = '';\n    }\n    if (!tmpContainer[eventIndexIndex] || tmpContainer[eventIndexIndex] === 'undefined') {\n        // eventIndex – 0 = no previous event\n        tmpContainer[eventIndexIndex] = 0;\n    }\n    var parseIntOr = function (value, defaultValue) {\n        var parsed = parseInt(value);\n        return isNaN(parsed) ? defaultValue : parsed;\n    };\n    var parseIntOrUndefined = function (value) { return (value ? parseIntOr(value, undefined) : undefined); };\n    var parsed = [\n        tmpContainer[cookieDisabledIndex],\n        tmpContainer[domainUserIdIndex],\n        parseIntOr(tmpContainer[createTsIndex], nowTs),\n        parseIntOr(tmpContainer[visitCountIndex], memorizedVisitCount),\n        parseIntOr(tmpContainer[nowTsIndex], nowTs),\n        parseIntOrUndefined(tmpContainer[lastVisitTsIndex]),\n        tmpContainer[sessionIdIndex],\n        tmpContainer[previousSessionIdIndex],\n        tmpContainer[firstEventIdIndex],\n        parseIntOrUndefined(tmpContainer[firstEventTsInMsIndex]),\n        parseIntOr(tmpContainer[eventIndexIndex], 0),\n    ];\n    return parsed;\n}\n/**\n * Initializes the domain user ID if not already present in the cookie. Sets an empty string if anonymous tracking.\n *\n * @param idCookie Parsed cookie\n * @param configAnonymousTracking Whether anonymous tracking is enabled\n * @returns Domain user ID\n */\nfunction initializeDomainUserId(idCookie, configAnonymousTracking) {\n    var domainUserId;\n    if (idCookie[domainUserIdIndex]) {\n        domainUserId = idCookie[domainUserIdIndex];\n    }\n    else if (!configAnonymousTracking) {\n        domainUserId = v4();\n        idCookie[domainUserIdIndex] = domainUserId;\n    }\n    else {\n        domainUserId = '';\n        idCookie[domainUserIdIndex] = domainUserId;\n    }\n    return domainUserId;\n}\n/**\n * Starts a new session with a new ID.\n * Sets the previous session, last visit timestamp, and increments visit count if cookies enabled.\n * First event references are reset and will be updated in `updateFirstEventInIdCookie`.\n *\n * @param idCookie Parsed cookie\n * @param options.configStateStorageStrategy Cookie storage strategy\n * @param options.configAnonymousTracking If anonymous tracking is enabled\n * @param options.memorizedVisitCount Visit count to be used if cookies not enabled\n * @param options.onSessionUpdateCallback Session callback triggered on every session update\n * @returns New session ID\n */\nfunction startNewIdCookieSession(idCookie, options) {\n    if (options === void 0) { options = { memorizedVisitCount: 1 }; }\n    var memorizedVisitCount = options.memorizedVisitCount;\n    // If cookies are enabled, base visit count and session ID on the cookies\n    if (cookiesEnabledInIdCookie(idCookie)) {\n        // Store the previous session ID\n        idCookie[previousSessionIdIndex] = idCookie[sessionIdIndex];\n        // Set lastVisitTs to currentVisitTs\n        idCookie[lastVisitTsIndex] = idCookie[nowTsIndex];\n        // Increment the session ID\n        idCookie[visitCountIndex]++;\n    }\n    else {\n        idCookie[visitCountIndex] = memorizedVisitCount;\n    }\n    // Create a new sessionId\n    var sessionId = v4();\n    idCookie[sessionIdIndex] = sessionId;\n    // Reset event index and first event references\n    idCookie[eventIndexIndex] = 0;\n    idCookie[firstEventIdIndex] = '';\n    idCookie[firstEventTsInMsIndex] = undefined;\n    return sessionId;\n}\n/**\n * Update now timestamp in cookie.\n *\n * @param idCookie Parsed cookie\n */\nfunction updateNowTsInIdCookie(idCookie) {\n    idCookie[nowTsIndex] = Math.round(new Date().getTime() / 1000);\n}\n/**\n * Updates the first event references according to the event payload if first event in session.\n *\n * @param idCookie - Parsed cookie\n * @param payloadBuilder - Event payload builder\n */\nfunction updateFirstEventInIdCookie(idCookie, payloadBuilder) {\n    // Update first event references if new session or not present\n    if (idCookie[eventIndexIndex] === 0) {\n        var payload = payloadBuilder.build();\n        idCookie[firstEventIdIndex] = payload['eid'];\n        var ts = (payload['dtm'] || payload['ttm']);\n        idCookie[firstEventTsInMsIndex] = ts ? parseInt(ts) : undefined;\n    }\n}\n/**\n * Increments event index counter.\n *\n * @param idCookie Parsed cookie\n */\nfunction incrementEventIndexInIdCookie(idCookie) {\n    idCookie[eventIndexIndex] += 1;\n}\n/**\n * Serializes parsed cookie to string representation.\n *\n * @param idCookie Parsed cookie\n * @returns String cookie value\n */\nfunction serializeIdCookie(idCookie, configAnonymousTracking) {\n    var anonymizedIdCookie = __spreadArray([], idCookie, true);\n    if (configAnonymousTracking) {\n        anonymizedIdCookie[domainUserIdIndex] = '';\n        anonymizedIdCookie[previousSessionIdIndex] = '';\n    }\n    anonymizedIdCookie.shift();\n    return anonymizedIdCookie.join('.');\n}\n/**\n * Transforms the parsed cookie into a client session context entity.\n *\n * @param idCookie Parsed cookie\n * @param configStateStorageStrategy Cookie storage strategy\n * @param configAnonymousTracking If anonymous tracking is enabled\n * @returns Client session context entity\n */\nfunction clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking) {\n    var firstEventTsInMs = idCookie[firstEventTsInMsIndex];\n    var clientSession = {\n        userId: configAnonymousTracking\n            ? '00000000-0000-0000-0000-000000000000' // TODO: use uuid.NIL when we upgrade to uuid v8.3\n            : idCookie[domainUserIdIndex],\n        sessionId: idCookie[sessionIdIndex],\n        eventIndex: idCookie[eventIndexIndex],\n        sessionIndex: idCookie[visitCountIndex],\n        previousSessionId: configAnonymousTracking ? null : idCookie[previousSessionIdIndex] || null,\n        storageMechanism: configStateStorageStrategy == 'localStorage' ? 'LOCAL_STORAGE' : 'COOKIE_1',\n        firstEventId: idCookie[firstEventIdIndex] || null,\n        firstEventTimestamp: firstEventTsInMs ? new Date(firstEventTsInMs).toISOString() : null,\n    };\n    return clientSession;\n}\nfunction sessionIdFromIdCookie(idCookie) {\n    return idCookie[sessionIdIndex];\n}\nfunction domainUserIdFromIdCookie(idCookie) {\n    return idCookie[domainUserIdIndex];\n}\nfunction visitCountFromIdCookie(idCookie) {\n    return idCookie[visitCountIndex];\n}\nfunction cookiesEnabledInIdCookie(idCookie) {\n    return idCookie[cookieDisabledIndex] === '0';\n}\nfunction eventIndexFromIdCookie(idCookie) {\n    return idCookie[eventIndexIndex];\n}\n\nvar WEB_PAGE_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0';\nvar BROWSER_CONTEXT_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0';\nvar CLIENT_SESSION_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2';\nvar APPLICATION_CONTEXT_SCHEMA = 'iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0';\n\nfunction useResizeObserver() {\n    return 'ResizeObserver' in window;\n}\nvar resizeObserverInitialized = false;\nvar readBrowserPropertiesTask = null;\nfunction initializeResizeObserver() {\n    if (resizeObserverInitialized) {\n        return;\n    }\n    if (!document || !document.body || !document.documentElement) {\n        return;\n    }\n    resizeObserverInitialized = true;\n    var resizeObserver = new ResizeObserver(function () {\n        if (!readBrowserPropertiesTask) {\n            // The browser property lookup causes a forced synchronous layout when offsets/sizes are\n            // queried. It's possible that the forced synchronous layout causes the ResizeObserver\n            // to be fired again, leading to an infinite loop and the \"ResizeObserver loop completed\n            // with undelivered notifications\" error.\n            readBrowserPropertiesTask = requestAnimationFrame(function () {\n                readBrowserPropertiesTask = null;\n                cachedProperties = readBrowserProperties();\n            });\n        }\n    });\n    resizeObserver.observe(document.body);\n    resizeObserver.observe(document.documentElement);\n}\nvar cachedProperties;\n/**\n * Gets various browser properties (that are expensive to read!)\n * - Will use a \"ResizeObserver\" approach in modern browsers to update cached properties only on change\n * - Will fallback to a direct read approach without cache in old browsers\n *\n * @returns BrowserProperties\n */\nfunction getBrowserProperties() {\n    if (!useResizeObserver()) {\n        return readBrowserProperties();\n    }\n    if (!cachedProperties) {\n        cachedProperties = readBrowserProperties();\n    }\n    initializeResizeObserver();\n    return cachedProperties;\n}\n/**\n * Reads the browser properties - expensive call!\n *\n * @returns BrowserProperties\n */\nfunction readBrowserProperties() {\n    return {\n        viewport: detectViewport(),\n        documentSize: detectDocumentSize(),\n        resolution: detectScreenResolution(),\n        colorDepth: screen.colorDepth,\n        devicePixelRatio: window.devicePixelRatio,\n        cookiesEnabled: window.navigator.cookieEnabled,\n        online: window.navigator.onLine,\n        browserLanguage: window.navigator.language || window.navigator.userLanguage,\n        documentLanguage: document.documentElement.lang,\n        webdriver: window.navigator.webdriver,\n        deviceMemory: window.navigator.deviceMemory,\n        hardwareConcurrency: Math.floor(window.navigator.hardwareConcurrency) || undefined,\n    };\n}\n/**\n * Gets the current viewport.\n *\n * Code based on:\n * - http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\n * - http://responsejs.com/labs/dimensions/\n */\nfunction detectViewport() {\n    var width, height;\n    if ('innerWidth' in window) {\n        width = window['innerWidth'];\n        height = window['innerHeight'];\n    }\n    else {\n        var e = document.documentElement || document.body;\n        width = e['clientWidth'];\n        height = e['clientHeight'];\n    }\n    return makeDimension(Math.max(0, width), Math.max(0, height));\n}\n/**\n * Gets the dimensions of the current\n * document.\n *\n * Code based on:\n * - http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/\n */\nfunction detectDocumentSize() {\n    var de = document.documentElement, // Alias\n    be = document.body, \n    // document.body may not have rendered, so check whether be.offsetHeight is null\n    bodyHeight = be ? Math.max(be.offsetHeight, be.scrollHeight) : 0;\n    return makeDimension(Math.max(de.clientWidth, de.offsetWidth, de.scrollWidth), Math.max(de.clientHeight, de.offsetHeight, de.scrollHeight, bodyHeight));\n}\nfunction detectScreenResolution() {\n    return makeDimension(screen.width, screen.height);\n}\nfunction makeDimension(width, height) {\n    if (isNaN(width) || isNaN(height)) {\n        return null;\n    }\n    return Math.floor(width) + 'x' + Math.floor(height);\n}\n\nfunction newCookie(name) {\n    var flushTimer;\n    var lastSetValueArgs;\n    var cacheExpireAt;\n    var flushed = true;\n    var flushTimeout = 10; // milliseconds\n    var maxCacheTtl = 0.05; // seconds\n    function getValue() {\n        var _a;\n        // Note: we can't cache the cookie value as we don't know the expiration date\n        if (lastSetValueArgs && (!cacheExpireAt || cacheExpireAt > new Date())) {\n            return (_a = lastSetValueArgs[0]) !== null && _a !== void 0 ? _a : cookie(name);\n        }\n        return cookie(name);\n    }\n    function setValue(value, ttl, path, domain, samesite, secure) {\n        lastSetValueArgs = [value, ttl, path, domain, samesite, secure];\n        flushed = false;\n        // throttle setting the cookie\n        if (flushTimer === undefined) {\n            flushTimer = setTimeout(function () {\n                flushTimer = undefined;\n                flush();\n            }, flushTimeout);\n        }\n        cacheExpireAt = new Date(Date.now() + Math.min(maxCacheTtl, ttl !== null && ttl !== void 0 ? ttl : maxCacheTtl) * 1000);\n        return true;\n    }\n    function deleteValue(path, domainName, sameSite, secure) {\n        lastSetValueArgs = undefined;\n        flushed = true;\n        // cancel setting the cookie\n        if (flushTimer !== undefined) {\n            clearTimeout(flushTimer);\n            flushTimer = undefined;\n        }\n        deleteCookie(name, path, domainName, sameSite, secure);\n    }\n    function flush() {\n        if (flushTimer !== undefined) {\n            clearTimeout(flushTimer);\n            flushTimer = undefined;\n        }\n        if (flushed) {\n            return;\n        }\n        flushed = true;\n        if (lastSetValueArgs !== undefined) {\n            var value = lastSetValueArgs[0], ttl = lastSetValueArgs[1], path = lastSetValueArgs[2], domain = lastSetValueArgs[3], samesite = lastSetValueArgs[4], secure = lastSetValueArgs[5];\n            cookie(name, value, ttl, path, domain, samesite, secure);\n        }\n    }\n    return {\n        getValue: getValue,\n        setValue: setValue,\n        deleteValue: deleteValue,\n        flush: flush,\n    };\n}\n/**\n * Create a new async cookie storage\n *\n * @returns A new cookie storage\n */\nfunction newCookieStorage() {\n    var cache = {};\n    function getOrInitCookie(name) {\n        if (!cache[name]) {\n            cache[name] = newCookie(name);\n        }\n        return cache[name];\n    }\n    function getCookie(name) {\n        return getOrInitCookie(name).getValue();\n    }\n    function setCookie(name, value, ttl, path, domain, samesite, secure) {\n        return getOrInitCookie(name).setValue(value, ttl, path, domain, samesite, secure);\n    }\n    function deleteCookie(name, path, domainName, sameSite, secure) {\n        getOrInitCookie(name).deleteValue(path, domainName, sameSite, secure);\n    }\n    function clearCache() {\n        cache = {};\n    }\n    function flush() {\n        for (var _i = 0, _a = Object.values(cache); _i < _a.length; _i++) {\n            var cookie_1 = _a[_i];\n            cookie_1.flush();\n        }\n    }\n    return {\n        getCookie: getCookie,\n        setCookie: setCookie,\n        deleteCookie: deleteCookie,\n        clearCache: clearCache,\n        flush: flush,\n    };\n}\n/**\n * Cookie storage instance with asynchronous cookie writes\n */\nvar asyncCookieStorage = newCookieStorage();\n/**\n * Cookie storage instance with synchronous cookie writes\n */\nvar syncCookieStorage = {\n    getCookie: cookie,\n    setCookie: function (name, value, ttl, path, domain, samesite, secure) {\n        cookie(name, value, ttl, path, domain, samesite, secure);\n        return document.cookie.indexOf(\"\".concat(name, \"=\")) !== -1;\n    },\n    deleteCookie: deleteCookie,\n    flush: function () { },\n};\n\n/**\n * The Snowplow Tracker\n *\n * @param trackerId - The unique identifier of the tracker\n * @param namespace - The namespace of the tracker object\n * @param version - The current version of the JavaScript Tracker\n * @param endpoint - The collector endpoint to send events to, with or without protocol\n * @param sharedState - An object containing state which is shared across tracker instances\n * @param trackerConfiguration - Dictionary of configuration options\n */\nfunction Tracker(trackerId, namespace, version, endpoint, sharedState, trackerConfiguration) {\n    if (trackerConfiguration === void 0) { trackerConfiguration = {}; }\n    var browserPlugins = [];\n    var newTracker = function (trackerId, namespace, version, endpoint, state, trackerConfiguration) {\n        /************************************************************\n         * Private members\n         ************************************************************/\n        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;\n        //use POST if eventMethod isn't present on the newTrackerConfiguration\n        trackerConfiguration.eventMethod = (_a = trackerConfiguration.eventMethod) !== null && _a !== void 0 ? _a : 'post';\n        var getStateStorageStrategy = function (config) { var _a; return (_a = config.stateStorageStrategy) !== null && _a !== void 0 ? _a : 'cookieAndLocalStorage'; }, getAnonymousSessionTracking = function (config) {\n            var _a;\n            if (typeof config.anonymousTracking === 'boolean') {\n                return false;\n            }\n            return ((_a = config.anonymousTracking) === null || _a === void 0 ? void 0 : _a.withSessionTracking) === true;\n        }, getAnonymousServerTracking = function (config) {\n            var _a;\n            if (typeof config.anonymousTracking === 'boolean') {\n                return false;\n            }\n            return ((_a = config.anonymousTracking) === null || _a === void 0 ? void 0 : _a.withServerAnonymisation) === true;\n        }, getAnonymousTracking = function (config) { return !!config.anonymousTracking; }, isBrowserContextAvailable = (_c = (_b = trackerConfiguration === null || trackerConfiguration === void 0 ? void 0 : trackerConfiguration.contexts) === null || _b === void 0 ? void 0 : _b.browser) !== null && _c !== void 0 ? _c : false, isWebPageContextAvailable = (_e = (_d = trackerConfiguration === null || trackerConfiguration === void 0 ? void 0 : trackerConfiguration.contexts) === null || _d === void 0 ? void 0 : _d.webPage) !== null && _e !== void 0 ? _e : true, getExtendedCrossDomainTrackingConfiguration = function (crossDomainTrackingConfig) {\n            if (typeof crossDomainTrackingConfig === 'boolean') {\n                return { useExtendedCrossDomainLinker: crossDomainTrackingConfig };\n            }\n            return {\n                useExtendedCrossDomainLinker: true,\n                collectCrossDomainAttributes: crossDomainTrackingConfig,\n            };\n        };\n        // Create a new cookie storage instance with synchronous cookie write if configured\n        var cookieStorage = trackerConfiguration.synchronousCookieWrite ? syncCookieStorage : asyncCookieStorage;\n        // Get all injected plugins\n        browserPlugins.push(getBrowserDataPlugin());\n        /* When including the Web Page context, we add the relevant internal plugins */\n        if (isWebPageContextAvailable) {\n            browserPlugins.push(getWebPagePlugin());\n        }\n        if (isBrowserContextAvailable) {\n            browserPlugins.push(getBrowserContextPlugin());\n        }\n        browserPlugins.push.apply(browserPlugins, ((_f = trackerConfiguration.plugins) !== null && _f !== void 0 ? _f : []));\n        var // Tracker core\n        core = trackerCore({\n            base64: (_g = trackerConfiguration.encodeBase64) !== null && _g !== void 0 ? _g : trackerConfiguration.eventMethod !== 'post',\n            corePlugins: browserPlugins,\n            callback: sendRequest,\n        }), \n        // Aliases\n        documentCharset = document.characterSet || document.charset, \n        // Current URL and Referrer URL\n        locationArray = fixupUrl(window.location.hostname, window.location.href, getReferrer()), domainAlias = fixupDomain(locationArray[0]), locationHrefAlias = locationArray[1], configReferrerUrl = locationArray[2], customReferrer, \n        // Platform defaults to web for this tracker\n        configPlatform = (_h = trackerConfiguration.platform) !== null && _h !== void 0 ? _h : 'web', \n        // Site ID\n        configTrackerSiteId = (_j = trackerConfiguration.appId) !== null && _j !== void 0 ? _j : '', \n        // Application version\n        configAppVersion = trackerConfiguration.appVersion, \n        // Document URL\n        configCustomUrl, \n        // Document title\n        lastDocumentTitle = document.title, \n        // Custom title\n        lastConfigTitle, \n        // Indicates that the lastConfigTitle was set from a trackPageView call\n        // Custom title configured this way has a shorter lifespan than when set using setDocumentTitle.\n        // It only lasts until the next trackPageView call.\n        lastConfigTitleFromTrackPageView = false, \n        // Controls whether activity tracking page ping event timers are reset on page view events\n        resetActivityTrackingOnPageView = (_k = trackerConfiguration.resetActivityTrackingOnPageView) !== null && _k !== void 0 ? _k : true, \n        // Disallow hash tags in URL. TODO: Should this be set to true by default?\n        configDiscardHashTag, \n        // Disallow brace in URL.\n        configDiscardBrace, \n        // First-party cookie name prefix\n        configCookieNamePrefix = (_l = trackerConfiguration.cookieName) !== null && _l !== void 0 ? _l : '_sp_', \n        // First-party cookie domain\n        // User agent defaults to origin hostname\n        configCookieDomain = (_m = trackerConfiguration.cookieDomain) !== null && _m !== void 0 ? _m : undefined, discoverRootDomain = (_o = trackerConfiguration.discoverRootDomain) !== null && _o !== void 0 ? _o : configCookieDomain === undefined, \n        // First-party cookie path\n        // Default is user agent defined.\n        configCookiePath = '/', \n        // First-party cookie samesite attribute\n        configCookieSameSite = (_p = trackerConfiguration.cookieSameSite) !== null && _p !== void 0 ? _p : 'Lax', \n        // First-party cookie secure attribute\n        configCookieSecure = (_q = trackerConfiguration.cookieSecure) !== null && _q !== void 0 ? _q : true, \n        // Do Not Track browser feature\n        dnt = window.navigator.doNotTrack || window.navigator.msDoNotTrack || window.doNotTrack, \n        // Do Not Track\n        configDoNotTrack = typeof trackerConfiguration.respectDoNotTrack !== 'undefined'\n            ? trackerConfiguration.respectDoNotTrack && (dnt === 'yes' || dnt === '1')\n            : false, \n        // Opt out of cookie tracking\n        configOptOutCookie, \n        // Life of the visitor cookie (in seconds)\n        configVisitorCookieTimeout = (_r = trackerConfiguration.cookieLifetime) !== null && _r !== void 0 ? _r : 63072000, // 2 years\n        // Life of the session cookie (in seconds)\n        configSessionCookieTimeout = (_s = trackerConfiguration.sessionCookieTimeout) !== null && _s !== void 0 ? _s : 1800, // 30 minutes\n        // Allows tracking user session (using cookies or local storage), can only be used with anonymousTracking\n        configAnonymousSessionTracking = getAnonymousSessionTracking(trackerConfiguration), \n        // Will send a header to server to prevent returning cookie and capturing IP\n        configAnonymousServerTracking = getAnonymousServerTracking(trackerConfiguration), \n        // Sets tracker to work in anonymous mode without accessing client storage\n        configAnonymousTracking = getAnonymousTracking(trackerConfiguration), \n        // Strategy defining how to store the state: cookie, localStorage, cookieAndLocalStorage or none\n        configStateStorageStrategy = getStateStorageStrategy(trackerConfiguration), \n        // Last activity timestamp\n        lastActivityTime, \n        // The last time an event was fired on the page - used to invalidate session if cookies are disabled\n        lastEventTime = new Date().getTime(), \n        // How are we scrolling?\n        minXOffset, maxXOffset, minYOffset, maxYOffset, \n        // Domain hash value\n        domainHash, \n        // Domain unique user ID\n        domainUserId, \n        // ID for the current session\n        memorizedSessionId, \n        // Index for the current session - kept in memory in case cookies are disabled\n        memorizedVisitCount = 1, \n        // Business-defined unique user ID\n        businessUserId, \n        // Manager for local storage queue\n        outQueue = newOutQueue(__assign({ trackerId: trackerId, endpoint: asCollectorUrl(endpoint), serverAnonymization: configAnonymousServerTracking, useLocalStorage: configStateStorageStrategy == 'localStorage' || configStateStorageStrategy == 'cookieAndLocalStorage' }, trackerConfiguration), state), \n        // Whether pageViewId should be regenerated after each trackPageView. Affect web_page context\n        preservePageViewId = false, \n        // Whether pageViewId should be kept the same until the page URL changes. Affects web_page context\n        preservePageViewIdForUrl = (_t = trackerConfiguration.preservePageViewIdForUrl) !== null && _t !== void 0 ? _t : false, \n        // The pageViewId of the last page view event or undefined if no page view tracked yet. Used to determine if pageViewId should be regenerated for a new page view.\n        lastSentPageViewId = undefined, \n        // Activity tracking config for callback and page ping variants\n        activityTrackingConfig = {\n            enabled: false,\n            installed: false,\n            configurations: {},\n        }, configSessionContext = (_v = (_u = trackerConfiguration.contexts) === null || _u === void 0 ? void 0 : _u.session) !== null && _v !== void 0 ? _v : false, toOptoutByCookie, onSessionUpdateCallback = trackerConfiguration.onSessionUpdateCallback, manualSessionUpdateCalled = false, _w = getExtendedCrossDomainTrackingConfiguration(trackerConfiguration.useExtendedCrossDomainLinker || false), useExtendedCrossDomainLinker = _w.useExtendedCrossDomainLinker, collectCrossDomainAttributes = _w.collectCrossDomainAttributes;\n        if (discoverRootDomain && !configCookieDomain) {\n            configCookieDomain = findRootDomain(configCookieSameSite, configCookieSecure);\n        }\n        var _x = getBrowserProperties(), browserLanguage = _x.browserLanguage, resolution = _x.resolution, colorDepth = _x.colorDepth, cookiesEnabled = _x.cookiesEnabled;\n        var timeZone = getTimeZone();\n        // Set up unchanging name-value pairs\n        core.setTrackerVersion(version);\n        core.setTrackerNamespace(namespace);\n        core.setAppId(configTrackerSiteId);\n        core.setPlatform(configPlatform);\n        core.addPayloadPair('cookie', cookiesEnabled ? '1' : '0');\n        core.addPayloadPair('cs', documentCharset);\n        core.addPayloadPair('lang', browserLanguage);\n        core.addPayloadPair('res', resolution);\n        core.addPayloadPair('cd', colorDepth);\n        if (timeZone)\n            core.addPayloadPair('tz', timeZone);\n        // Add the application version context entity\n        if (configAppVersion) {\n            core.addPlugin({\n                plugin: {\n                    contexts: function () { return [\n                        {\n                            schema: APPLICATION_CONTEXT_SCHEMA,\n                            data: { version: configAppVersion },\n                        },\n                    ]; },\n                },\n            });\n        }\n        /*\n         * Initialize tracker\n         */\n        updateDomainHash();\n        initializeIdsAndCookies();\n        if (trackerConfiguration.crossDomainLinker) {\n            decorateLinks(trackerConfiguration.crossDomainLinker);\n        }\n        /**\n         * Recalculate the domain, URL, and referrer\n         */\n        function refreshUrl() {\n            locationArray = fixupUrl(window.location.hostname, window.location.href, getReferrer());\n            // If this is a single-page app and the page URL has changed, then:\n            //   - if the new URL's querystring contains a \"refer(r)er\" parameter, use it as the referrer\n            //   - otherwise use the old URL as the referer\n            if (locationArray[1] !== locationHrefAlias) {\n                configReferrerUrl = getReferrer(locationHrefAlias);\n            }\n            domainAlias = fixupDomain(locationArray[0]);\n            locationHrefAlias = locationArray[1];\n        }\n        /**\n         * Create link handler to decorate the querystring of a link (onClick/onMouseDown)\n         *\n         * @param event - e The event targeting the link\n         */\n        function addLinkDecorationHandler(extended) {\n            var CROSS_DOMAIN_PARAMETER_NAME = '_sp';\n            return function (evt) {\n                var elt = evt.currentTarget;\n                var crossDomainParameterValue = createCrossDomainParameterValue(extended, collectCrossDomainAttributes, {\n                    domainUserId: domainUserId,\n                    userId: businessUserId || undefined,\n                    sessionId: memorizedSessionId,\n                    sourceId: configTrackerSiteId,\n                    sourcePlatform: configPlatform,\n                    event: evt,\n                });\n                if (elt === null || elt === void 0 ? void 0 : elt.href) {\n                    elt.href = decorateQuerystring(elt.href, CROSS_DOMAIN_PARAMETER_NAME, crossDomainParameterValue);\n                }\n            };\n        }\n        /**\n         * Enable querystring decoration for links passing a filter\n         * Whenever such a link is clicked on or navigated to via the keyboard,\n         * add \"_sp={{duid}}.{{timestamp}}\" to its querystring\n         *\n         * @param crossDomainLinker - Function used to determine which links to decorate\n         */\n        function decorateLinks(crossDomainLinker) {\n            var crossDomainLinkHandler = addLinkDecorationHandler(useExtendedCrossDomainLinker);\n            for (var i = 0; i < document.links.length; i++) {\n                var elt = document.links[i];\n                if (!elt.spDecorationEnabled && crossDomainLinker(elt)) {\n                    elt.addEventListener('click', crossDomainLinkHandler, true);\n                    elt.addEventListener('mousedown', crossDomainLinkHandler, true);\n                    // Don't add event listeners more than once\n                    elt.spDecorationEnabled = true;\n                }\n            }\n        }\n        /*\n         * Removes hash tag from the URL\n         *\n         * URLs are purified before being recorded in the cookie,\n         * or before being sent as GET parameters\n         */\n        function purify(url) {\n            var targetPattern;\n            if (configDiscardHashTag) {\n                targetPattern = new RegExp('#.*');\n                url = url.replace(targetPattern, '');\n            }\n            if (configDiscardBrace) {\n                targetPattern = new RegExp('[{}]', 'g');\n                url = url.replace(targetPattern, '');\n            }\n            return url;\n        }\n        /*\n         * Extract scheme/protocol from URL\n         */\n        function getProtocolScheme(url) {\n            var e = new RegExp('^([a-z]+):'), matches = e.exec(url);\n            return matches ? matches[1] : null;\n        }\n        /*\n         * Resolve relative reference\n         *\n         * Note: not as described in rfc3986 section 5.2\n         */\n        function resolveRelativeReference(baseUrl, url) {\n            var protocol = getProtocolScheme(url), i;\n            if (protocol) {\n                return url;\n            }\n            if (url.slice(0, 1) === '/') {\n                return getProtocolScheme(baseUrl) + '://' + getHostName(baseUrl) + url;\n            }\n            baseUrl = purify(baseUrl);\n            if ((i = baseUrl.indexOf('?')) >= 0) {\n                baseUrl = baseUrl.slice(0, i);\n            }\n            if ((i = baseUrl.lastIndexOf('/')) !== baseUrl.length - 1) {\n                baseUrl = baseUrl.slice(0, i + 1);\n            }\n            return baseUrl + url;\n        }\n        /*\n         * Send request\n         */\n        function sendRequest(request) {\n            if (!(configDoNotTrack || toOptoutByCookie)) {\n                outQueue.enqueueRequest(request.build());\n            }\n        }\n        /*\n         * Get cookie name with prefix and domain hash\n         */\n        function getSnowplowCookieName(baseName) {\n            return configCookieNamePrefix + baseName + '.' + domainHash;\n        }\n        /*\n         * Cookie getter.\n         */\n        function getSnowplowCookieValue(cookieName) {\n            var fullName = getSnowplowCookieName(cookieName);\n            if (configStateStorageStrategy == 'localStorage') {\n                return attemptGetLocalStorage(fullName);\n            }\n            else if (configStateStorageStrategy == 'cookie' || configStateStorageStrategy == 'cookieAndLocalStorage') {\n                return cookieStorage.getCookie(fullName);\n            }\n            return undefined;\n        }\n        /*\n         * Update domain hash\n         */\n        function updateDomainHash() {\n            refreshUrl();\n            domainHash = hash((configCookieDomain || domainAlias) + (configCookiePath || '/')).slice(0, 4); // 4 hexits = 16 bits\n        }\n        /*\n         * Process all \"activity\" events.\n         * For performance, this function must have low overhead.\n         */\n        function activityHandler() {\n            var now = new Date();\n            lastActivityTime = now.getTime();\n        }\n        /*\n         * Process all \"scroll\" events.\n         */\n        function scrollHandler() {\n            updateMaxScrolls();\n            activityHandler();\n        }\n        /*\n         * Returns [pageXOffset, pageYOffset]\n         */\n        function getPageOffsets() {\n            var documentElement = document.documentElement;\n            if (documentElement) {\n                return [documentElement.scrollLeft || window.pageXOffset, documentElement.scrollTop || window.pageYOffset];\n            }\n            return [0, 0];\n        }\n        /*\n         * Quick initialization/reset of max scroll levels\n         */\n        function resetMaxScrolls() {\n            var offsets = getPageOffsets();\n            var x = offsets[0];\n            minXOffset = x;\n            maxXOffset = x;\n            var y = offsets[1];\n            minYOffset = y;\n            maxYOffset = y;\n        }\n        /*\n         * Check the max scroll levels, updating as necessary\n         */\n        function updateMaxScrolls() {\n            var offsets = getPageOffsets();\n            var x = offsets[0];\n            if (x < minXOffset) {\n                minXOffset = x;\n            }\n            else if (x > maxXOffset) {\n                maxXOffset = x;\n            }\n            var y = offsets[1];\n            if (y < minYOffset) {\n                minYOffset = y;\n            }\n            else if (y > maxYOffset) {\n                maxYOffset = y;\n            }\n        }\n        /*\n         * Prevents offsets from being decimal or NaN\n         * See https://github.com/snowplow/snowplow-javascript-tracker/issues/324\n         */\n        function cleanOffset(offset) {\n            return Math.round(offset);\n        }\n        /**\n         * Sets or renews the session cookie.\n         * Responsible for calling the `onSessionUpdateCallback` callback.\n         * @returns {boolean} If the value persisted in cookies or LocalStorage\n         */\n        function setSessionCookie() {\n            var cookieName = getSnowplowCookieName('ses');\n            var cookieValue = '*';\n            return persistValue(cookieName, cookieValue, configSessionCookieTimeout);\n        }\n        /**\n         * @mutates idCookie\n         * @param {ParsedIdCookie} idCookie\n         * @returns {boolean} If the value persisted in cookies or LocalStorage\n         */\n        function setDomainUserIdCookie(idCookie) {\n            var cookieName = getSnowplowCookieName('id');\n            var cookieValue = serializeIdCookie(idCookie, configAnonymousTracking);\n            return persistValue(cookieName, cookieValue, configVisitorCookieTimeout);\n        }\n        /**\n         * no-op if anonymousTracking enabled, will still set cookies if anonymousSessionTracking is enabled\n         * Sets a cookie based on the storage strategy:\n         * - if 'localStorage': attempts to write to local storage\n         * - if 'cookie' or 'cookieAndLocalStorage': writes to cookies\n         * - otherwise: no-op\n         * @param {string} name Name/key of the value to persist\n         * @param {string} value\n         * @param {number} timeout Used as the expiration date for cookies or as a TTL to be checked on LocalStorage\n         * @returns {boolean} If the operation was successful or not\n         */\n        function persistValue(name, value, timeout) {\n            if (configAnonymousTracking && !configAnonymousSessionTracking) {\n                return false;\n            }\n            if (configStateStorageStrategy == 'localStorage') {\n                return attemptWriteLocalStorage(name, value, timeout);\n            }\n            else if (configStateStorageStrategy == 'cookie' || configStateStorageStrategy == 'cookieAndLocalStorage') {\n                return cookieStorage.setCookie(name, value, timeout, configCookiePath, configCookieDomain, configCookieSameSite, configCookieSecure);\n            }\n            return false;\n        }\n        /**\n         * Clears all cookie and local storage for id and ses values\n         */\n        function clearUserDataAndCookies(configuration) {\n            var idname = getSnowplowCookieName('id');\n            var sesname = getSnowplowCookieName('ses');\n            attemptDeleteLocalStorage(idname);\n            attemptDeleteLocalStorage(sesname);\n            cookieStorage.deleteCookie(idname, configCookiePath, configCookieDomain, configCookieSameSite, configCookieSecure);\n            cookieStorage.deleteCookie(sesname, configCookiePath, configCookieDomain, configCookieSameSite, configCookieSecure);\n            if (!(configuration === null || configuration === void 0 ? void 0 : configuration.preserveSession)) {\n                memorizedSessionId = v4();\n                memorizedVisitCount = 1;\n            }\n            if (!(configuration === null || configuration === void 0 ? void 0 : configuration.preserveUser)) {\n                domainUserId = configAnonymousTracking ? '' : v4();\n                businessUserId = null;\n            }\n        }\n        /**\n         * Toggle Anonymous Tracking\n         */\n        function toggleAnonymousTracking(configuration) {\n            if (configuration && configuration.stateStorageStrategy) {\n                trackerConfiguration.stateStorageStrategy = configuration.stateStorageStrategy;\n                configStateStorageStrategy = getStateStorageStrategy(trackerConfiguration);\n            }\n            configAnonymousTracking = getAnonymousTracking(trackerConfiguration);\n            configAnonymousSessionTracking = getAnonymousSessionTracking(trackerConfiguration);\n            configAnonymousServerTracking = getAnonymousServerTracking(trackerConfiguration);\n            outQueue.setUseLocalStorage(configStateStorageStrategy == 'localStorage' || configStateStorageStrategy == 'cookieAndLocalStorage');\n            outQueue.setAnonymousTracking(configAnonymousServerTracking);\n        }\n        /*\n         * Load the domain user ID and the session ID\n         * Set the cookies (if cookies are enabled)\n         */\n        function initializeIdsAndCookies() {\n            if (configAnonymousTracking && !configAnonymousSessionTracking) {\n                return;\n            }\n            var sesCookieSet = configStateStorageStrategy != 'none' && !!getSnowplowCookieValue('ses');\n            var idCookie = loadDomainUserIdCookie();\n            domainUserId = initializeDomainUserId(idCookie, configAnonymousTracking);\n            if (!sesCookieSet) {\n                memorizedSessionId = startNewIdCookieSession(idCookie);\n            }\n            else {\n                memorizedSessionId = sessionIdFromIdCookie(idCookie);\n            }\n            memorizedVisitCount = visitCountFromIdCookie(idCookie);\n            if (configStateStorageStrategy != 'none') {\n                setSessionCookie();\n                // Update currentVisitTs\n                updateNowTsInIdCookie(idCookie);\n                setDomainUserIdCookie(idCookie);\n                if (!eventIndexFromIdCookie(idCookie)) {\n                    // Synchronously update the cookies to persist the new session ASAP\n                    cookieStorage.flush();\n                }\n            }\n        }\n        /*\n         * Load visitor ID cookie\n         */\n        function loadDomainUserIdCookie() {\n            if (configStateStorageStrategy == 'none') {\n                return emptyIdCookie();\n            }\n            var id = getSnowplowCookieValue('id') || undefined;\n            return parseIdCookie(id, domainUserId, memorizedSessionId, memorizedVisitCount);\n        }\n        /**\n         * Adds the protocol in front of our collector URL\n         *\n         * @param string - collectorUrl The collector URL with or without protocol\n         * @returns string collectorUrl The tracker URL with protocol\n         */\n        function asCollectorUrl(collectorUrl) {\n            if (collectorUrl.indexOf('http') === 0) {\n                return collectorUrl;\n            }\n            return ('https:' === document.location.protocol ? 'https' : 'http') + '://' + collectorUrl;\n        }\n        /**\n         * Initialize new `pageViewId` if it shouldn't be preserved.\n         * Should be called when `trackPageView` is invoked\n         */\n        function resetPageView() {\n            if (!preservePageViewId || state.pageViewId == null) {\n                state.pageViewId = v4();\n                state.pageViewUrl = configCustomUrl || locationHrefAlias;\n            }\n        }\n        /**\n         * Safe function to get `pageViewId`.\n         * Generates it if it wasn't initialized by other tracker\n         */\n        function getPageViewId() {\n            if (shouldGenerateNewPageViewId()) {\n                state.pageViewId = v4();\n                state.pageViewUrl = configCustomUrl || locationHrefAlias;\n            }\n            return state.pageViewId;\n        }\n        function shouldGenerateNewPageViewId() {\n            // If pageViewId is not initialized, generate it\n            if (state.pageViewId == null) {\n                return true;\n            }\n            // If pageViewId should be preserved regardless of the URL, don't generate a new one\n            if (preservePageViewId || !preservePageViewIdForUrl) {\n                return false;\n            }\n            // If doesn't have previous URL in state, generate a new pageViewId\n            if (state.pageViewUrl === undefined) {\n                return true;\n            }\n            var current = configCustomUrl || locationHrefAlias;\n            // If full preserve is enabled, compare the full URL\n            if (preservePageViewIdForUrl === true || preservePageViewIdForUrl == 'full' || !('URL' in window)) {\n                return state.pageViewUrl != current;\n            }\n            var currentUrl = new URL(current);\n            var previousUrl = new URL(state.pageViewUrl);\n            // If pathname preserve is enabled, compare the pathname\n            if (preservePageViewIdForUrl == 'pathname') {\n                return currentUrl.pathname != previousUrl.pathname;\n            }\n            // If pathname and search preserve is enabled, compare the pathname and search\n            if (preservePageViewIdForUrl == 'pathnameAndSearch') {\n                return currentUrl.pathname != previousUrl.pathname || currentUrl.search != previousUrl.search;\n            }\n            return false;\n        }\n        /**\n         * Safe function to get `tabId`.\n         * Generates it if it is not yet initialized. Shared between trackers.\n         */\n        function getTabId() {\n            if (configStateStorageStrategy === 'none' || configAnonymousTracking || !isWebPageContextAvailable) {\n                return null;\n            }\n            var SESSION_STORAGE_TAB_ID = '_sp_tab_id';\n            var tabId = attemptGetSessionStorage(SESSION_STORAGE_TAB_ID);\n            if (!tabId) {\n                attemptWriteSessionStorage(SESSION_STORAGE_TAB_ID, v4());\n                tabId = attemptGetSessionStorage(SESSION_STORAGE_TAB_ID);\n            }\n            return tabId || null;\n        }\n        /**\n         * Put together a web page context with a unique UUID for the page view\n         *\n         * @returns web_page context\n         */\n        function getWebPagePlugin() {\n            return {\n                contexts: function () {\n                    return [\n                        {\n                            schema: WEB_PAGE_SCHEMA,\n                            data: {\n                                id: getPageViewId(),\n                            },\n                        },\n                    ];\n                },\n            };\n        }\n        function getBrowserContextPlugin() {\n            return {\n                contexts: function () {\n                    return [\n                        {\n                            schema: BROWSER_CONTEXT_SCHEMA,\n                            data: __assign(__assign({}, getBrowserProperties()), { tabId: getTabId() }),\n                        },\n                    ];\n                },\n            };\n        }\n        /*\n         * Attaches common web fields to every request (resolution, url, referrer, etc.)\n         * Also sets the required cookies.\n         */\n        function getBrowserDataPlugin() {\n            var anonymizeOr = function (value) { return (configAnonymousTracking ? null : value); };\n            var anonymizeSessionOr = function (value) {\n                return configAnonymousSessionTracking ? value : anonymizeOr(value);\n            };\n            return {\n                beforeTrack: function (payloadBuilder) {\n                    var existingSession = getSnowplowCookieValue('ses'), idCookie = loadDomainUserIdCookie();\n                    var isFirstEventInSession = eventIndexFromIdCookie(idCookie) === 0;\n                    if (configOptOutCookie) {\n                        toOptoutByCookie = !!cookieStorage.getCookie(configOptOutCookie);\n                    }\n                    else {\n                        toOptoutByCookie = false;\n                    }\n                    if (configDoNotTrack || toOptoutByCookie) {\n                        clearUserDataAndCookies();\n                        return;\n                    }\n                    // If cookies are enabled, base visit count and session ID on the cookies\n                    if (cookiesEnabledInIdCookie(idCookie)) {\n                        // New session?\n                        if (!existingSession && configStateStorageStrategy != 'none') {\n                            memorizedSessionId = startNewIdCookieSession(idCookie);\n                        }\n                        else {\n                            memorizedSessionId = sessionIdFromIdCookie(idCookie);\n                        }\n                        memorizedVisitCount = visitCountFromIdCookie(idCookie);\n                    }\n                    else if (new Date().getTime() - lastEventTime > configSessionCookieTimeout * 1000) {\n                        memorizedVisitCount++;\n                        memorizedSessionId = startNewIdCookieSession(idCookie, {\n                            memorizedVisitCount: memorizedVisitCount,\n                        });\n                    }\n                    // Update cookie\n                    updateNowTsInIdCookie(idCookie);\n                    updateFirstEventInIdCookie(idCookie, payloadBuilder);\n                    incrementEventIndexInIdCookie(idCookie);\n                    var _a = getBrowserProperties(), viewport = _a.viewport, documentSize = _a.documentSize;\n                    payloadBuilder.add('vp', viewport);\n                    payloadBuilder.add('ds', documentSize);\n                    payloadBuilder.add('vid', anonymizeSessionOr(memorizedVisitCount));\n                    payloadBuilder.add('sid', anonymizeSessionOr(memorizedSessionId));\n                    payloadBuilder.add('duid', anonymizeOr(domainUserIdFromIdCookie(idCookie))); // Always load from cookie as this is better etiquette than in-memory values\n                    payloadBuilder.add('uid', anonymizeOr(businessUserId));\n                    refreshUrl();\n                    payloadBuilder.add('refr', purify(customReferrer || configReferrerUrl));\n                    // Add the page URL last as it may take us over the IE limit (and we don't always need it)\n                    payloadBuilder.add('url', purify(configCustomUrl || locationHrefAlias));\n                    var clientSession = clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking);\n                    if (configSessionContext && (!configAnonymousTracking || configAnonymousSessionTracking)) {\n                        addSessionContextToPayload(payloadBuilder, clientSession);\n                    }\n                    // Update cookies\n                    if (configStateStorageStrategy != 'none') {\n                        setDomainUserIdCookie(idCookie);\n                        var sessionIdentifierPersisted = setSessionCookie();\n                        if ((!existingSession || isFirstEventInSession) &&\n                            sessionIdentifierPersisted &&\n                            onSessionUpdateCallback &&\n                            !manualSessionUpdateCalled) {\n                            // Synchronously update the cookies to persist the new session ASAP\n                            cookieStorage.flush();\n                            onSessionUpdateCallback(clientSession);\n                            manualSessionUpdateCalled = false;\n                        }\n                    }\n                    lastEventTime = new Date().getTime();\n                },\n            };\n        }\n        function addSessionContextToPayload(payloadBuilder, clientSession) {\n            var sessionContext = {\n                schema: CLIENT_SESSION_SCHEMA,\n                data: clientSession,\n            };\n            payloadBuilder.addContextEntity(sessionContext);\n        }\n        /**\n         * Expires current session and starts a new session.\n         */\n        function newSession() {\n            // If cookies are enabled, base visit count and session ID on the cookies\n            var idCookie = loadDomainUserIdCookie();\n            // When cookies are enabled\n            if (cookiesEnabledInIdCookie(idCookie)) {\n                // When cookie/local storage is enabled - make a new session\n                if (configStateStorageStrategy != 'none') {\n                    memorizedSessionId = startNewIdCookieSession(idCookie);\n                }\n                else {\n                    memorizedSessionId = sessionIdFromIdCookie(idCookie);\n                }\n                memorizedVisitCount = visitCountFromIdCookie(idCookie);\n            }\n            else {\n                memorizedVisitCount++;\n                memorizedSessionId = startNewIdCookieSession(idCookie, {\n                    memorizedVisitCount: memorizedVisitCount,\n                });\n            }\n            updateNowTsInIdCookie(idCookie);\n            // Update cookies\n            if (configStateStorageStrategy != 'none') {\n                var clientSession = clientSessionFromIdCookie(idCookie, configStateStorageStrategy, configAnonymousTracking);\n                setDomainUserIdCookie(idCookie);\n                var sessionIdentifierPersisted = setSessionCookie();\n                // Synchronously update the cookies to persist the new session ASAP\n                cookieStorage.flush();\n                if (sessionIdentifierPersisted && onSessionUpdateCallback) {\n                    manualSessionUpdateCalled = true;\n                    onSessionUpdateCallback(clientSession);\n                }\n            }\n            lastEventTime = new Date().getTime();\n        }\n        /**\n         * Combine an array of unchanging contexts with the result of a context-creating function\n         *\n         * @param staticContexts - Array of custom contexts\n         * @param contextCallback - Function returning an array of contexts\n         */\n        function finalizeContexts(staticContexts, contextCallback) {\n            return (staticContexts || []).concat(contextCallback ? contextCallback() : []);\n        }\n        function logPageView(_a) {\n            var title = _a.title, context = _a.context, timestamp = _a.timestamp, contextCallback = _a.contextCallback;\n            refreshUrl();\n            if (lastSentPageViewId && lastSentPageViewId == getPageViewId()) {\n                // Do not reset pageViewId if a page view was not tracked yet or a different page view ID was used (in order to support multiple trackers with shared state)\n                resetPageView();\n            }\n            lastSentPageViewId = getPageViewId();\n            // So we know what document.title was at the time of trackPageView\n            lastDocumentTitle = document.title;\n            if (title) {\n                lastConfigTitle = title;\n                lastConfigTitleFromTrackPageView = true;\n            }\n            else if (lastConfigTitleFromTrackPageView) {\n                lastConfigTitle = null;\n            }\n            // Fixup page title\n            var pageTitle = fixupTitle(lastConfigTitle || lastDocumentTitle);\n            // Log page view\n            core.track(buildPageView({\n                pageUrl: purify(configCustomUrl || locationHrefAlias),\n                pageTitle: pageTitle,\n                referrer: purify(customReferrer || configReferrerUrl),\n            }), finalizeContexts(context, contextCallback), timestamp);\n            // Send ping (to log that user has stayed on page)\n            var now = new Date();\n            var installingActivityTracking = false;\n            if (activityTrackingConfig.enabled && !activityTrackingConfig.installed) {\n                activityTrackingConfig.installed = true;\n                installingActivityTracking = true;\n                // Add mousewheel event handler, detect passive event listeners for performance\n                var detectPassiveEvents_1 = {\n                    update: function update() {\n                        if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {\n                            var passive_1 = false;\n                            var options = Object.defineProperty({}, 'passive', {\n                                get: function get() {\n                                    passive_1 = true;\n                                },\n                                set: function set() { },\n                            });\n                            // note: have to set and remove a no-op listener instead of null\n                            // (which was used previously), because Edge v15 throws an error\n                            // when providing a null callback.\n                            // https://github.com/rafrex/detect-passive-events/pull/3\n                            var noop = function noop() { };\n                            window.addEventListener('testPassiveEventSupport', noop, options);\n                            window.removeEventListener('testPassiveEventSupport', noop, options);\n                            detectPassiveEvents_1.hasSupport = passive_1;\n                        }\n                    },\n                };\n                detectPassiveEvents_1.update();\n                // Detect available wheel event\n                var wheelEvent = 'onwheel' in document.createElement('div')\n                    ? 'wheel' // Modern browsers support \"wheel\"\n                    : document.onmousewheel !== undefined\n                        ? 'mousewheel' // Webkit and IE support at least \"mousewheel\"\n                        : 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox\n                if (Object.prototype.hasOwnProperty.call(detectPassiveEvents_1, 'hasSupport')) {\n                    addEventListener(document, wheelEvent, activityHandler, { passive: true });\n                }\n                else {\n                    addEventListener(document, wheelEvent, activityHandler);\n                }\n                // Capture our initial scroll points\n                resetMaxScrolls();\n                // Add event handlers; cross-browser compatibility here varies significantly\n                // @see http://quirksmode.org/dom/events\n                var documentHandlers = [\n                    'click',\n                    'mouseup',\n                    'mousedown',\n                    'mousemove',\n                    'keypress',\n                    'keydown',\n                    'keyup',\n                    'touchend',\n                    'touchstart',\n                ];\n                var windowHandlers = ['resize', 'focus', 'blur'];\n                var listener = function (_, handler) {\n                    if (handler === void 0) { handler = activityHandler; }\n                    return function (ev) {\n                        return addEventListener(document, ev, handler);\n                    };\n                };\n                documentHandlers.forEach(listener(document));\n                windowHandlers.forEach(listener(window));\n                listener(window, scrollHandler)('scroll');\n            }\n            if (activityTrackingConfig.enabled && (resetActivityTrackingOnPageView || installingActivityTracking)) {\n                // Periodic check for activity.\n                lastActivityTime = now.getTime();\n                var key = void 0;\n                for (key in activityTrackingConfig.configurations) {\n                    var config = activityTrackingConfig.configurations[key];\n                    if (config) {\n                        //Clear page ping heartbeat on new page view\n                        window.clearInterval(config.activityInterval);\n                        scheduleActivityInterval(config, context, contextCallback);\n                    }\n                }\n            }\n        }\n        function scheduleActivityInterval(config, context, contextCallback) {\n            var executePagePing = function (cb, context) {\n                refreshUrl();\n                cb({ context: context, pageViewId: getPageViewId(), minXOffset: minXOffset, minYOffset: minYOffset, maxXOffset: maxXOffset, maxYOffset: maxYOffset });\n                resetMaxScrolls();\n            };\n            var timeout = function () {\n                var now = new Date();\n                // There was activity during the heart beat period;\n                // on average, this is going to overstate the visitDuration by configHeartBeatTimer/2\n                if (lastActivityTime + config.configMinimumVisitLength > now.getTime()) {\n                    executePagePing(config.callback, finalizeContexts(context, contextCallback));\n                }\n                config.activityInterval = window.setInterval(heartbeat, config.configHeartBeatTimer);\n            };\n            var heartbeat = function () {\n                var now = new Date();\n                // There was activity during the heart beat period;\n                // on average, this is going to overstate the visitDuration by configHeartBeatTimer/2\n                if (lastActivityTime + config.configHeartBeatTimer > now.getTime()) {\n                    executePagePing(config.callback, finalizeContexts(context, contextCallback));\n                }\n            };\n            if (config.configMinimumVisitLength === 0) {\n                config.activityInterval = window.setInterval(heartbeat, config.configHeartBeatTimer);\n            }\n            else {\n                config.activityInterval = window.setTimeout(timeout, config.configMinimumVisitLength);\n            }\n        }\n        /**\n         * Configure the activity tracking and ensures integer values for min visit and heartbeat\n         */\n        function configureActivityTracking(configuration) {\n            var minimumVisitLength = configuration.minimumVisitLength, heartbeatDelay = configuration.heartbeatDelay, callback = configuration.callback;\n            if (isInteger(minimumVisitLength) && isInteger(heartbeatDelay)) {\n                return {\n                    configMinimumVisitLength: minimumVisitLength * 1000,\n                    configHeartBeatTimer: heartbeatDelay * 1000,\n                    callback: callback,\n                };\n            }\n            LOG.error('Activity tracking minimumVisitLength & heartbeatDelay must be integers');\n            return undefined;\n        }\n        /**\n         * Log that a user is still viewing a given page by sending a page ping.\n         * Not part of the public API - only called from logPageView() above.\n         */\n        function logPagePing(_a) {\n            var context = _a.context, minXOffset = _a.minXOffset, minYOffset = _a.minYOffset, maxXOffset = _a.maxXOffset, maxYOffset = _a.maxYOffset;\n            var newDocumentTitle = document.title;\n            if (newDocumentTitle !== lastDocumentTitle) {\n                lastDocumentTitle = newDocumentTitle;\n                lastConfigTitle = undefined;\n            }\n            core.track(buildPagePing({\n                pageUrl: purify(configCustomUrl || locationHrefAlias),\n                pageTitle: fixupTitle(lastConfigTitle || lastDocumentTitle),\n                referrer: purify(customReferrer || configReferrerUrl),\n                minXOffset: cleanOffset(minXOffset),\n                maxXOffset: cleanOffset(maxXOffset),\n                minYOffset: cleanOffset(minYOffset),\n                maxYOffset: cleanOffset(maxYOffset),\n            }), context);\n        }\n        function disableActivityTrackingAction(actionKey) {\n            var callbackConfiguration = activityTrackingConfig.configurations[actionKey];\n            if ((callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.configMinimumVisitLength) === 0) {\n                window.clearTimeout(callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.activityInterval);\n            }\n            else {\n                window.clearInterval(callbackConfiguration === null || callbackConfiguration === void 0 ? void 0 : callbackConfiguration.activityInterval);\n            }\n            activityTrackingConfig.configurations[actionKey] = undefined;\n        }\n        var apiMethods = {\n            getDomainSessionIndex: function () {\n                return memorizedVisitCount;\n            },\n            getPageViewId: getPageViewId,\n            getTabId: getTabId,\n            newSession: newSession,\n            getCookieName: function (basename) {\n                return getSnowplowCookieName(basename);\n            },\n            getUserId: function () {\n                return businessUserId;\n            },\n            getDomainUserId: function () {\n                return loadDomainUserIdCookie()[1];\n            },\n            getDomainUserInfo: function () {\n                return loadDomainUserIdCookie();\n            },\n            setReferrerUrl: function (url) {\n                customReferrer = url;\n            },\n            setCustomUrl: function (url) {\n                refreshUrl();\n                configCustomUrl = resolveRelativeReference(locationHrefAlias, url);\n            },\n            setDocumentTitle: function (title) {\n                // So we know what document.title was at the time of trackPageView\n                lastDocumentTitle = document.title;\n                lastConfigTitle = title;\n                lastConfigTitleFromTrackPageView = false;\n            },\n            discardHashTag: function (enableFilter) {\n                configDiscardHashTag = enableFilter;\n            },\n            discardBrace: function (enableFilter) {\n                configDiscardBrace = enableFilter;\n            },\n            setCookiePath: function (path) {\n                configCookiePath = path;\n                updateDomainHash();\n            },\n            setVisitorCookieTimeout: function (timeout) {\n                configVisitorCookieTimeout = timeout;\n            },\n            crossDomainLinker: function (crossDomainLinkerCriterion) {\n                decorateLinks(crossDomainLinkerCriterion);\n            },\n            enableActivityTracking: function (configuration) {\n                if (!activityTrackingConfig.configurations.pagePing) {\n                    activityTrackingConfig.enabled = true;\n                    activityTrackingConfig.configurations.pagePing = configureActivityTracking(__assign(__assign({}, configuration), { callback: logPagePing }));\n                }\n            },\n            enableActivityTrackingCallback: function (configuration) {\n                if (!activityTrackingConfig.configurations.callback) {\n                    activityTrackingConfig.enabled = true;\n                    activityTrackingConfig.configurations.callback = configureActivityTracking(configuration);\n                }\n            },\n            disableActivityTracking: function () {\n                disableActivityTrackingAction('pagePing');\n            },\n            disableActivityTrackingCallback: function () {\n                disableActivityTrackingAction('callback');\n            },\n            updatePageActivity: function () {\n                activityHandler();\n            },\n            setOptOutCookie: function (name) {\n                configOptOutCookie = name;\n            },\n            setUserId: function (userId) {\n                businessUserId = userId;\n            },\n            setUserIdFromLocation: function (querystringField) {\n                refreshUrl();\n                businessUserId = fromQuerystring(querystringField, locationHrefAlias);\n            },\n            setUserIdFromReferrer: function (querystringField) {\n                refreshUrl();\n                businessUserId = fromQuerystring(querystringField, configReferrerUrl);\n            },\n            setUserIdFromCookie: function (cookieName) {\n                businessUserId = cookieStorage.getCookie(cookieName);\n            },\n            setCollectorUrl: function (collectorUrl) {\n                outQueue.setCollectorUrl(asCollectorUrl(collectorUrl));\n            },\n            setBufferSize: function (newBufferSize) {\n                outQueue.setBufferSize(newBufferSize);\n            },\n            flushBuffer: function (configuration) {\n                if (configuration === void 0) { configuration = {}; }\n                outQueue.executeQueue();\n                if (configuration.newBufferSize) {\n                    outQueue.setBufferSize(configuration.newBufferSize);\n                }\n            },\n            trackPageView: function (event) {\n                if (event === void 0) { event = {}; }\n                logPageView(event);\n            },\n            preservePageViewId: function () {\n                preservePageViewId = true;\n            },\n            preservePageViewIdForUrl: function (preserve) {\n                preservePageViewIdForUrl = preserve;\n            },\n            disableAnonymousTracking: function (configuration) {\n                /*\n                  Flag for if the state storage strategy has changed and we are currently storing session state (anonymously or not).\n                  Because the strategy changes, the below call to initializeIdsAndCookies will fail to see that a session is currently in progress and start a new one.\n                  Detect this state, and once we've updated settings, bump the session cookie with the new strategy to ensure it exists before loading the ID cookie, which will resume the session.\n                */\n                var shouldResumeSession = (configuration === null || configuration === void 0 ? void 0 : configuration.stateStorageStrategy) && // a new strategy was defined (otherwise will already resume)\n                    configuration.stateStorageStrategy !== configStateStorageStrategy && // new strategy is different to old one (otherwise will already resume)\n                    (!configAnonymousTracking || configAnonymousSessionTracking) && // we were previously tracking session IDs (otherwise nothing to resume)\n                    getSnowplowCookieValue('ses'); // and we currently have a session in progress (otherwise we want a new session anyway)\n                trackerConfiguration.anonymousTracking = false;\n                toggleAnonymousTracking(configuration);\n                if (shouldResumeSession)\n                    setSessionCookie(); // ensure session cookie exists with new strategy\n                initializeIdsAndCookies();\n                outQueue.executeQueue(); // There might be some events in the queue we've been unable to send in anonymous mode\n            },\n            enableAnonymousTracking: function (configuration) {\n                var _a;\n                trackerConfiguration.anonymousTracking = (_a = (configuration && (configuration === null || configuration === void 0 ? void 0 : configuration.options))) !== null && _a !== void 0 ? _a : true;\n                toggleAnonymousTracking(configuration);\n                // Reset the page view, if not tracking the session, so can't stitch user into new events on the page view id\n                if (!configAnonymousSessionTracking) {\n                    resetPageView();\n                }\n            },\n            clearUserData: clearUserDataAndCookies,\n        };\n        return __assign(__assign({}, apiMethods), { id: trackerId, namespace: namespace, core: core, sharedState: state });\n    };\n    // Initialise the tracker\n    var partialTracker = newTracker(trackerId, namespace, version, endpoint, sharedState, trackerConfiguration), tracker = __assign(__assign({}, partialTracker), { addPlugin: function (configuration) {\n            var _a, _b;\n            tracker.core.addPlugin(configuration);\n            (_b = (_a = configuration.plugin).activateBrowserPlugin) === null || _b === void 0 ? void 0 : _b.call(_a, tracker);\n        } });\n    // Initialise each plugin with the tracker\n    browserPlugins.forEach(function (p) {\n        var _a;\n        (_a = p.activateBrowserPlugin) === null || _a === void 0 ? void 0 : _a.call(p, tracker);\n    });\n    return tracker;\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar namedTrackers = {};\n/**\n * Dispatch function to all specified trackers\n *\n * @param trackers - An optional list of trackers to send the event to, or will send to all trackers\n * @param fn - The function which will run against each tracker\n */\nfunction dispatchToTrackers(trackers, fn) {\n    try {\n        getTrackers(trackers !== null && trackers !== void 0 ? trackers : allTrackerNames()).forEach(fn);\n    }\n    catch (ex) {\n        LOG.error('Function failed', ex);\n    }\n}\n/**\n * Dispatch function to all specified trackers from the supplied collection\n *\n * @param trackers - An optional list of trackers to send the event to, or will send to all trackers\n * @param trackerCollection - The collection which the trackers will be selected from\n * @param fn - The function which will run against each tracker\n */\nfunction dispatchToTrackersInCollection(trackers, trackerCollection, fn) {\n    try {\n        getTrackersFromCollection(trackers !== null && trackers !== void 0 ? trackers : Object.keys(trackerCollection), trackerCollection).forEach(fn);\n    }\n    catch (ex) {\n        LOG.error('Function failed', ex);\n    }\n}\n/**\n * Checks if a tracker has been created for a particular identifier\n * @param trackerId - The unique identifier of the tracker\n */\nfunction trackerExists(trackerId) {\n    return namedTrackers.hasOwnProperty(trackerId);\n}\n/**\n * Creates a Tracker and adds it to the internal collection\n * @param trackerId - The unique identifier of the tracker\n * @param namespace - The namespace of the tracker, tracked with each event as `tna`\n * @param version - The current version of the tracker library\n * @param endpoint - The endpoint to send events to\n * @param sharedState - The instance of shared state to use for this tracker\n * @param configuration - The configuration to use for this tracker instance\n */\nfunction addTracker(trackerId, namespace, version, endpoint, sharedState, configuration) {\n    if (!namedTrackers.hasOwnProperty(trackerId)) {\n        namedTrackers[trackerId] = Tracker(trackerId, namespace, version, endpoint, sharedState, configuration);\n        return namedTrackers[trackerId];\n    }\n    return null;\n}\n/**\n * Gets a single instance of the internal tracker object\n * @param trackerId - The unique identifier of the tracker\n * @returns The tracker instance, or null if not found\n */\nfunction getTracker(trackerId) {\n    if (namedTrackers.hasOwnProperty(trackerId)) {\n        return namedTrackers[trackerId];\n    }\n    LOG.warn(trackerId + ' not configured');\n    return null;\n}\n/**\n * Gets an array of tracker instances based on the list of identifiers\n * @param trackerIds - An array of unique identifiers of the trackers\n * @returns The tracker instances, or empty list if none found\n */\nfunction getTrackers(trackerIds) {\n    return getTrackersFromCollection(trackerIds, namedTrackers);\n}\n/**\n * Gets all the trackers as a object, keyed by their unique identifiers\n */\nfunction allTrackers() {\n    return namedTrackers;\n}\n/**\n * Returns all the unique tracker identifiers\n */\nfunction allTrackerNames() {\n    return Object.keys(namedTrackers);\n}\nfunction getTrackersFromCollection(trackerIds, trackerCollection) {\n    var trackers = [];\n    for (var _i = 0, trackerIds_1 = trackerIds; _i < trackerIds_1.length; _i++) {\n        var id = trackerIds_1[_i];\n        if (trackerCollection.hasOwnProperty(id)) {\n            trackers.push(trackerCollection[id]);\n        }\n        else {\n            LOG.warn(id + ' not configured');\n        }\n    }\n    return trackers;\n}\n/**\n * Write all pending cookies to the browser.\n * Useful if you track events just before the page is unloaded.\n * This call is not necessary if `synchronousCookieWrite` is set to `true`.\n */\nfunction flushPendingCookies() {\n    asyncCookieStorage.flush();\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/*\n * Checks whether sessionStorage is available, in a way that\n * does not throw a SecurityError in Firefox if \"always ask\"\n * is enabled for cookies (https://github.com/snowplow/snowplow/issues/163).\n */\nfunction hasSessionStorage() {\n    try {\n        return !!window.sessionStorage;\n    }\n    catch (e) {\n        return true; // SecurityError when referencing it means it exists\n    }\n}\n/*\n * Checks whether localStorage is available, in a way that\n * does not throw a SecurityError in Firefox if \"always ask\"\n * is enabled for cookies (https://github.com/snowplow/snowplow/issues/163).\n */\nfunction hasLocalStorage() {\n    try {\n        return !!window.localStorage;\n    }\n    catch (e) {\n        return true; // SecurityError when referencing it means it exists\n    }\n}\n/*\n * Checks whether localStorage is accessible\n * sets and removes an item to handle private IOS5 browsing\n * (http://git.io/jFB2Xw)\n */\nfunction localStorageAccessible() {\n    var mod = 'modernizr';\n    if (!hasLocalStorage()) {\n        return false;\n    }\n    try {\n        var ls = window.localStorage;\n        ls.setItem(mod, mod);\n        ls.removeItem(mod);\n        return true;\n    }\n    catch (e) {\n        return false;\n    }\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * A set of variables which are shared among all initialised trackers\n */\nvar SharedState = /** @class */ (function () {\n    function SharedState() {\n        this.bufferFlushers = [];\n        /* DOM Ready */\n        this.hasLoaded = false;\n        this.registeredOnLoadHandlers = [];\n    }\n    return SharedState;\n}());\nfunction createSharedState() {\n    var sharedState = new SharedState(), documentAlias = document, windowAlias = window;\n    /*\n     * Handle page visibility event\n     * Works everywhere except IE9\n     */\n    function visibilityChangeHandler() {\n        if (documentAlias.visibilityState == 'hidden') {\n            // Flush all POST queues\n            sharedState.bufferFlushers.forEach(function (flusher) {\n                flusher(false);\n            });\n        }\n    }\n    function flushBuffers() {\n        // Flush all POST queues\n        sharedState.bufferFlushers.forEach(function (flusher) {\n            flusher(false);\n        });\n    }\n    /*\n     * Handler for onload event\n     */\n    function loadHandler() {\n        var i;\n        if (!sharedState.hasLoaded) {\n            sharedState.hasLoaded = true;\n            for (i = 0; i < sharedState.registeredOnLoadHandlers.length; i++) {\n                sharedState.registeredOnLoadHandlers[i]();\n            }\n        }\n        return true;\n    }\n    /*\n     * Add onload or DOM ready handler\n     */\n    function addReadyListener() {\n        if (documentAlias.addEventListener) {\n            documentAlias.addEventListener('DOMContentLoaded', function ready() {\n                documentAlias.removeEventListener('DOMContentLoaded', ready, false);\n                loadHandler();\n            });\n        }\n        else if (documentAlias.attachEvent) {\n            documentAlias.attachEvent('onreadystatechange', function ready() {\n                if (documentAlias.readyState === 'complete') {\n                    documentAlias.detachEvent('onreadystatechange', ready);\n                    loadHandler();\n                }\n            });\n        }\n        // fallback\n        addEventListener(windowAlias, 'load', loadHandler, false);\n    }\n    /************************************************************\n     * Constructor\n     ************************************************************/\n    // initialize the Snowplow singleton\n    if (documentAlias.visibilityState) {\n        // Flush for mobile and modern browsers\n        addEventListener(documentAlias, 'visibilitychange', visibilityChangeHandler, false);\n    }\n    // Last attempt at flushing in beforeunload\n    addEventListener(windowAlias, 'beforeunload', flushBuffers, false);\n    if (document.readyState === 'loading') {\n        addReadyListener();\n    }\n    else {\n        loadHandler();\n    }\n    return sharedState;\n}\n\nexport { SharedState, addEventListener, addTracker, allTrackerNames, allTrackers, attemptDeleteLocalStorage, attemptGetLocalStorage, attemptGetSessionStorage, attemptWriteLocalStorage, attemptWriteSessionStorage, cookie, createCrossDomainParameterValue, createSharedState, decorateQuerystring, deleteCookie, dispatchToTrackers, dispatchToTrackersInCollection, findRootDomain, fixupDomain, fixupTitle, fixupUrl, flushPendingCookies, fromQuerystring, getCookiesWithPrefix, getCssClasses, getFilterByClass, getFilterByName, getHostName, getReferrer, getTimeZone, getTracker, getTrackers, hasLocalStorage, hasSessionStorage, isFunction, isInteger, isString, isValueInArray, localStorageAccessible, parseAndValidateFloat, parseAndValidateInt, trackerExists, urlSafeBase64Encode };\n//# sourceMappingURL=index.module.js.map\n","/*!\n * Browser tracker for Snowplow v4.6.7 (http://bit.ly/sp-js)\n * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * Licensed under BSD-3-Clause\n */\n\nimport { dispatchToTrackers, createSharedState, addTracker } from '@snowplow/browser-tracker-core';\nexport { SharedState } from '@snowplow/browser-tracker-core';\nimport { buildStructEvent, buildSelfDescribingEvent, version } from '@snowplow/tracker-core';\nexport { version } from '@snowplow/tracker-core';\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n/**\n * Expires current session and starts a new session.\n *\n * @param trackers - The tracker identifiers which will have their session refreshed\n */\nfunction newSession(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.newSession();\n    });\n}\n/**\n * Override referrer\n *\n * @param url - Custom Referrer which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setReferrerUrl(url, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setReferrerUrl(url);\n    });\n}\n/**\n * Override url\n *\n * @param url - Custom URL which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCustomUrl(url, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCustomUrl(url);\n    });\n}\n/**\n * Override document.title\n *\n * @param title - Document title which will be used as override\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setDocumentTitle(title, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setDocumentTitle(title);\n    });\n}\n/**\n * Strip hash tag (or anchor) from URL\n *\n * @param enable - Whether to enable stripping of hash\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction discardHashTag(enable, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.discardHashTag(enable);\n    });\n}\n/**\n * Strip braces from URL\n *\n * @param enable - Whther to enable stripping of braces\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction discardBrace(enable, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.discardBrace(enable);\n    });\n}\n/**\n * Set first-party cookie path\n *\n * @param path - The path which will be used when setting cookies\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCookiePath(path, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCookiePath(path);\n    });\n}\n/**\n * Set visitor cookie timeout (in seconds)\n *\n * @param timeout - The timeout until cookies will expire\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setVisitorCookieTimeout(timeout, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setVisitorCookieTimeout(timeout);\n    });\n}\n/**\n * Enable querystring decoration for links passing a filter\n *\n * @param crossDomainLinker - Function used to determine which links to decorate\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction crossDomainLinker(crossDomainLinkerCriterion, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.crossDomainLinker(crossDomainLinkerCriterion);\n    });\n}\n/**\n * Enables page activity tracking (sends page pings to the Collector regularly).\n *\n * @param configuration - The activity tracking configuration\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction enableActivityTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableActivityTracking(configuration);\n    });\n}\n/**\n * Enables page activity tracking (replaces collector ping with callback).\n *\n * @param configuration - The activity tracking callback configuration\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction enableActivityTrackingCallback(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableActivityTrackingCallback(configuration);\n    });\n}\n/**\n * Disables page activity tracking.\n *\n * @param trackers - The tracker identifiers the activity tracking will be disabled.\n */\nfunction disableActivityTracking(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableActivityTracking();\n    });\n}\n/**\n * Disables page activity tracking callback.\n *\n * @param trackers - The tracker identifiers the activity tracking callback will be disabled.\n */\nfunction disableActivityTrackingCallback(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableActivityTrackingCallback();\n    });\n}\n/**\n * Triggers the activityHandler manually to allow external user defined activity. i.e. While watching a video\n *\n * @param trackers - The tracker identifiers which will be updated\n */\nfunction updatePageActivity(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.updatePageActivity();\n    });\n}\n/**\n * Sets the opt out cookie.\n *\n * @param name - of the opt out cookie\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setOptOutCookie(name, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setOptOutCookie(name);\n    });\n}\n/**\n * Set the business-defined user ID for this user.\n *\n * @param userId - The business-defined user ID\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserId(userId, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserId(userId);\n    });\n}\n/**\n * Set the business-defined user ID for this user using the location querystring.\n *\n * @param querystringField - Name of a querystring name-value pair\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromLocation(querystringField, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromLocation(querystringField);\n    });\n}\n/**\n * Set the business-defined user ID for this user using the referrer querystring.\n *\n * @param querystringField - Name of a querystring name-value pair\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromReferrer(querystringField, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromReferrer(querystringField);\n    });\n}\n/**\n * Set the business-defined user ID for this user to the value of a cookie.\n *\n * @param cookieName - Name of the cookie whose value will be assigned to businessUserId\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setUserIdFromCookie(cookieName, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setUserIdFromCookie(cookieName);\n    });\n}\n/**\n * Specify the Snowplow collector URL. Specific http or https to force it\n * or leave it off to match the website protocol.\n *\n * @param collectorUrl - The collector URL, with or without protocol\n * @param trackers - The tracker identifiers which will be configured\n */\nfunction setCollectorUrl(collectorUrl, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setCollectorUrl(collectorUrl);\n    });\n}\n/**\n * Set the buffer size\n * Can be useful if you want to stop batching requests to ensure events start\n * sending closer to event creation\n *\n * @param newBufferSize - The value with which to update the bufferSize to\n * @param trackers - The tracker identifiers which will be flushed\n */\nfunction setBufferSize(newBufferSize, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.setBufferSize(newBufferSize);\n    });\n}\n/**\n * Send all events in the outQueue\n * Only need to use this when sending events with a bufferSize of at least 2\n *\n * @param configuration - The configuration to use following flushing the buffer\n * @param trackers - The tracker identifiers which will be flushed\n */\nfunction flushBuffer(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.flushBuffer(configuration);\n    });\n}\n/**\n * Track a visit to a web page\n *\n * @param event - The Page View Event properties\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackPageView(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.trackPageView(event);\n    });\n}\n/**\n * Track a structured event\n * A classic style of event tracking, allows for easier movement between analytics\n * systems. A loosely typed event, creating a Self Describing event is preferred, but\n * useful for interoperability.\n *\n * @param event - The Structured Event properties\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackStructEvent(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.track(buildStructEvent(event), event.context, event.timestamp);\n    });\n}\n/**\n * Track a self-describing event happening on this page.\n * A custom event type, allowing for an event to be tracked using your own custom schema\n * and a data object which conforms to the supplied schema\n *\n * @param event - The event information\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction trackSelfDescribingEvent(event, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.track(buildSelfDescribingEvent({ event: event.event }), event.context, event.timestamp);\n    });\n}\n/**\n * All provided contexts will be sent with every event\n *\n * @param contexts - An array of contexts or conditional contexts\n * @param trackers - The tracker identifiers which the global contexts will be added to\n */\nfunction addGlobalContexts(contexts, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.addGlobalContexts(contexts);\n    });\n}\n/**\n * All provided contexts will no longer be sent with every event\n *\n * @param contexts - An array of contexts or conditional contexts\n * @param trackers - The tracker identifiers which the global contexts will be remove from\n */\nfunction removeGlobalContexts(contexts, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.removeGlobalContexts(contexts);\n    });\n}\n/**\n * Clear all global contexts that are sent with events\n *\n * @param trackers - The tracker identifiers which the global contexts will be cleared from\n */\nfunction clearGlobalContexts(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.core.clearGlobalContexts();\n    });\n}\n/**\n * Stop regenerating `pageViewId` (available from `web_page` context)\n *\n * @param trackers - The tracker identifiers which the event will preserve their Page View Ids\n */\nfunction preservePageViewId(trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.preservePageViewId();\n    });\n}\n/**\n * Disables anonymous tracking if active (ie. tracker initialized with `anonymousTracking`)\n * For stateStorageStrategy override, uses supplied value first,\n * falls back to one defined in initial config, otherwise uses cookieAndLocalStorage.\n *\n * @param configuration - The configuration for disabling anonymous tracking\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction disableAnonymousTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.disableAnonymousTracking(configuration);\n    });\n}\n/**\n * Enables anonymous tracking (ie. tracker initialized without `anonymousTracking`)\n *\n * @param configuration - The configuration for enabling anonymous tracking\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction enableAnonymousTracking(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.enableAnonymousTracking(configuration);\n    });\n}\n/**\n * Clears all cookies and local storage containing user and session identifiers\n *\n * @param trackers - The tracker identifiers which the event will be sent to\n */\nfunction clearUserData(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.clearUserData(configuration);\n    });\n}\n/**\n * Add a plugin into the plugin collection after trackers have already been initialised\n *\n * @param configuration - The plugin to add\n * @param trackers - The tracker identifiers which the plugin will be added to\n */\nfunction addPlugin(configuration, trackers) {\n    dispatchToTrackers(trackers, function (t) {\n        t.addPlugin(configuration);\n    });\n}\n\n/*\n * Copyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this\n *    list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n *    this list of conditions and the following disclaimer in the documentation\n *    and/or other materials provided with the distribution.\n *\n * 3. Neither the name of the copyright holder nor the names of its\n *    contributors may be used to endorse or promote products derived from\n *    this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\nvar state = typeof window !== 'undefined' ? createSharedState() : undefined;\n/**\n * Initialise a new tracker\n *\n * @param trackerId - The tracker id - also known as tracker namespace\n * @param endpoint - Collector endpoint in the form collector.mysite.com\n * @param configuration - The initialisation options of the tracker\n */\nfunction newTracker(trackerId, endpoint, configuration) {\n    if (state) {\n        return addTracker(trackerId, trackerId, \"js-\".concat(version), endpoint, state, configuration);\n    }\n    else {\n        return undefined;\n    }\n}\n\nexport { addGlobalContexts, addPlugin, clearGlobalContexts, clearUserData, crossDomainLinker, disableActivityTracking, disableActivityTrackingCallback, disableAnonymousTracking, discardBrace, discardHashTag, enableActivityTracking, enableActivityTrackingCallback, enableAnonymousTracking, flushBuffer, newSession, newTracker, preservePageViewId, removeGlobalContexts, setBufferSize, setCollectorUrl, setCookiePath, setCustomUrl, setDocumentTitle, setOptOutCookie, setReferrerUrl, setUserId, setUserIdFromCookie, setUserIdFromLocation, setUserIdFromReferrer, setVisitorCookieTimeout, trackPageView, trackSelfDescribingEvent, trackStructEvent, updatePageActivity };\n//# sourceMappingURL=index.module.js.map\n","import React, {useEffect} from 'react'\nimport './sensorless-popup.css'\nimport {getDynamicContentSensorlessPopupContent} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {useSelectedShippingAndHandlingLineItem} from \"../../../../data/api/query/offers.mjs\";\nimport {trackStructEvent} from '@snowplow/browser-tracker';\nimport {useFormatPrice} from \"../../../../data/redux/slices/offers/offers-slice.mjs\";\n\nconst newBannerImg = 'https://cdn.arccosgolf.com/images/activation/taylormade/new-banner2.png'\nexport const SensorlessPopup: React.FC<{ onClose: () => void }> = ({onClose}) => {\n    const content = getDynamicContentSensorlessPopupContent()\n    const shippingLineItem = useSelectedShippingAndHandlingLineItem()\n    const search = window.location.search\n    const formatPrice = useFormatPrice()\n\n    useEffect(() => {\n        trackStructEvent({\n            action: 'sensorless_popup_viewed',\n            category: 'sensorless_popup',\n        })\n    }, [])\n\n    return (\n        <div className={'popup-container'}>\n            <div className={'sensorless-popup-content'}>\n                <button\n                    type={'button'}\n                    className={'close-button'}\n                    onClick={() => {\n                        onClose()\n                        trackStructEvent({\n                            action: 'sensorless_popup_x_clicked',\n                            category: 'sensorless_popup',\n                        })\n                    }}\n                >\n                    <CloseSymbol className={'close-symbol'}/>\n                </button>\n                <div className={'header-section'}>\n                    {localize(content.header)}\n                </div>\n                <div className={'body-section'}>\n                    <h2>\n                        {localize(content.subheader)}\n                    </h2>\n                    <p className={'body-text'}>\n                        {localize(content.body)}\n                    </p>\n                    <div className={'button-container'}>\n                        <a className={'option-button selected'}\n                           href={`https://${import.meta.env.CLIENT_SENSORLESS_BASE_URL}/taylormade/payment${search}`}>\n                            <img className={'new-banner'} src={newBannerImg} alt={''}/>\n                            <img className={'product-image'} src={content.yes_button_image} alt={''}/>\n                            <div className={'text-section'}>\n                                <div className={'button-text'}>\n                                    {localize(content.yes_button_text)}\n                                </div>\n                                <div className={'sub-text'}>\n                                    {localize(content.yes_button_subtext)}\n                                </div>\n                            </div>\n                        </a>\n                        <button\n                            type={'button'}\n                            className={'option-button'}\n                            onClick={() => {\n                                onClose()\n                                trackStructEvent({\n                                    action: 'sensorless_popup_no_button_clicked',\n                                    category: 'sensorless_popup',\n                                })\n                            }}\n                        >\n                            <img className={'product-image'} src={content.no_button_image} alt={''}/>\n                            <div className={'text-section'}>\n                                <div className={'button-text'}>\n                                    {localize(content.no_button_text)}\n                                </div>\n                                <div className={'sub-text'}>\n                                    {localize(content.no_button_subtext, {\n                                        values: {\n                                            price: `${formatPrice(shippingLineItem?.actual_price)}`\n                                        }\n                                    })}\n                                </div>\n                            </div>\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </div>\n    )\n}\n\nexport const CloseSymbol: React.FC<{ className: string }> = ({className}) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"none\" className={className}>\n            <path\n                d=\"M0.842492 0.842491C1.30779 0.377196 2.06218 0.377196 2.52747 0.842491L19.1575 17.4725C19.6228 17.9378 19.6228 18.6922 19.1575 19.1575C18.6922 19.6228 17.9378 19.6228 17.4725 19.1575L0.842491 2.52747C0.377196 2.06218 0.377197 1.30779 0.842492 0.842491Z\"\n                fill=\"white\"/>\n            <path\n                d=\"M19.1575 0.842491C19.6228 1.30779 19.6228 2.06218 19.1575 2.52747L2.52747 19.1575C2.06218 19.6228 1.30779 19.6228 0.842491 19.1575C0.377196 18.6922 0.377196 17.9378 0.842491 17.4725L17.4725 0.84249C17.9378 0.377195 18.6922 0.377196 19.1575 0.842491Z\"\n                fill=\"white\"/>\n        </svg>\n    )\n}\n","import React, {useState} from 'react'\nimport './link-pro-popup.css'\nimport {CloseSymbol} from \"../sensorless-popup/sensorless-popup.tsx\";\nimport {useDispatch} from \"react-redux\";\nimport {setShouldIncludeLink} from \"../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport {getDynamicContentLinkProPopup} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {localize} from \"../../../../lang/localized-content.mjs\";\n\nexport const LinkProPopup: React.FC<{ onClose: () => void }> = ({onClose}) => {\n    const dispatch = useDispatch()\n    const content = getDynamicContentLinkProPopup()\n\n    const [isProductDetailsOpen, setIsProductDetailsOpen] = useState(false)\n    const [isKeyFeaturesOpen, setIsKeyFeaturesOpen] = useState(false)\n\n    return (\n        <div className={'popup-container'}>\n            <div className={'link-pro-popup-content'}>\n                <button type={'button'} onClick={onClose} className={'close-button'}><CloseSymbol className={'close-symbol'}/></button>\n                <img src={content.image} className={'link-pro-image'}/>\n                <div className={'body-section'}>\n                    <h2 className={'popup-title'}>{localize(content.title)}</h2>\n                    <p className={'popup-body-text'}>{localize(content.body)}</p>\n                    <p className={'popup-body-text'}>{localize(content.body2)}</p>\n                </div>\n                <button\n                    type={'button'}\n                    className={'offer-button'}\n                    onClick={() => {\n                        dispatch(setShouldIncludeLink(true))\n                        onClose()\n                    }}\n                >\n                    {localize(content.button_text)}\n                </button>\n                <div className={`product-details ${isProductDetailsOpen ? 'open' : ''}`}>\n                    <div\n                        className={'heading'}\n                        onClick={() => setIsProductDetailsOpen(!isProductDetailsOpen)}\n                    >\n                        {localize(content.product_details.title)}\n                        <CaratDown className={`carat ${isProductDetailsOpen ? 'open' : ''}`}/>\n                    </div>\n                    <ul className={'link-pro-list'}>\n                        {content.product_details.details.map((detail, index) => (\n                            <li className={'link-pro-list-item'} key={index}>{localize(detail)}</li>\n                        ))}\n                    </ul>\n                </div>\n                <div className={`key-features ${isKeyFeaturesOpen ? 'open' : ''}`}>\n                    <div\n                        className={'heading'}\n                        onClick={() => setIsKeyFeaturesOpen(!isKeyFeaturesOpen)}\n                    >\n                        {localize(content.key_features.title)}\n                        <CaratDown className={`carat ${isKeyFeaturesOpen ? 'open' : ''}`}/>\n                    </div>\n                    <ul className={'link-pro-list'}>\n                        {content.key_features.features.map((feature, index) => (\n                            <li className={'link-pro-list-item'} key={index}>\n                                <span>{localize(feature.feature)}</span>\n                                {localize(feature.description)}\n                            </li>\n                        ))}\n                    </ul>\n                </div>\n                <p className={'quote'}>{localize(content.quote)}</p>\n                <img src={content.golf_digest_logo} className={'golf-digest-logo'}/>\n            </div>\n        </div>\n    )\n}\n\nconst CaratDown: React.FC<{className?: string}> = ({className}) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 11 7\" fill=\"none\" className={className}>\n            <path d=\"M0.5 1L5.5 6L10.5 1\" stroke=\"black\" strokeWidth=\"1.11111\"/>\n        </svg>\n    )\n}\n","import type { ScheduledLineItem, LineItem } from \"../data/api/query/offers.mts\";\n\n/**\n * Type definition for a line item with invoice_data structure\n */\ntype LinkLineItemWithInvoiceData = {\n  invoice_data?: {\n    custom?: {\n      invoice_items?: {\n        custom?: {\n          actual_price?: number;\n        };\n      }[];\n    };\n  }[];\n};\n\n/**\n * Extracts the Arccos Air price from either a ScheduledLineItem or a line item with invoice_data structure.\n *\n * This helper function consolidates the complex logic for getting Arccos Air pricing that was\n * scattered throughout the codebase in this pattern:\n * `scheduledLineItem?.phases?.[0]?.items?.[0]?.charge_amount || linkLineItem?.invoice_data[0]?.custom?.invoice_items[0]?.custom?.actual_price`\n *\n * @param scheduledLineItem - The scheduled line item (from useSelectedLineItems with charge_type 'SCHEDULED')\n * @param linkLineItem - The link line item (typically from useSelectedLinkGen2LineItem) - can be LineItem or have invoice_data\n * @returns The Arccos Air price as a number, or undefined if no price is found\n */\nexport const getLinkProPrice = (\n  scheduledLineItem?: ScheduledLineItem | null,\n  linkLineItem?: (LineItem & LinkLineItemWithInvoiceData) | null,\n): number | undefined => {\n  // Try to get price from scheduledLineItem first\n  const scheduledPrice =\n    scheduledLineItem?.phases?.[0]?.items?.[0]?.charge_amount;\n  if (scheduledPrice !== undefined) {\n    return scheduledPrice;\n  }\n\n  // Fall back to linkLineItem invoice_data structure\n  const invoicePrice =\n    linkLineItem?.invoice_data?.[0]?.custom?.invoice_items?.[0]?.custom\n      ?.actual_price;\n  return invoicePrice;\n};\n\n/**\n * Simplified version that works with any line item that could have either phases or invoice_data structure.\n * Use this when you have a single line item that could be either type.\n *\n * @param lineItem - Any line item that might contain Arccos Air pricing in either structure\n * @returns The Arccos Air price as a number, or undefined if no price is found\n */\nexport const getLinkProPriceFromSingleItem = (\n  lineItem?: (LineItem & LinkLineItemWithInvoiceData) | null,\n): number | undefined => {\n  if (!lineItem) return undefined;\n\n  // Try phases structure first (ScheduledLineItem)\n  const scheduledPrice = (lineItem as any)?.phases?.[0]?.items?.[0]\n    ?.charge_amount;\n  if (scheduledPrice !== undefined) {\n    return scheduledPrice;\n  }\n\n  // Fall back to invoice_data structure\n  const invoicePrice =\n    lineItem?.invoice_data?.[0]?.custom?.invoice_items?.[0]?.custom\n      ?.actual_price;\n  return invoicePrice;\n};\n","import React, { useEffect } from \"react\";\nimport \"./link-pro-trial-popup.css\";\nimport { CloseSymbol } from \"../../sensorless-popup/sensorless-popup.tsx\";\nimport {\n  useCurrency,\n  useFormatPrice,\n} from \"../../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport { getDynamicContentLinkProPopup } from \"../../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {\n  useSelectedRedemptionOption,\n  useSelectedShippingAndHandlingLineItem,\n  useTrialPeriodDays,\n} from \"../../../../../data/api/query/offers.mjs\";\nimport { getLinkProPriceFromSingleItem } from \"../../../../../util/link-pro-price-utils.mts\";\n\nexport const LinkProTrialPopup: React.FC<{ onClose: () => void }> = ({\n  onClose,\n}) => {\n  const content = getDynamicContentLinkProPopup();\n  const shippingLineItem = useSelectedShippingAndHandlingLineItem();\n  const formatPrice = useFormatPrice();\n  const currency = useCurrency();\n  // not using selectedLinkGen2LineItem because we need the price regardless of if it's selected or not\n  const linkProLineItem = useSelectedRedemptionOption()?.lineItems?.find(\n    (lineItem) => lineItem.key === \"link_pro\",\n  );\n  const trialPeriodDays = useTrialPeriodDays();\n  useEffect(() => {\n    console.log(\"linkProLineItem: \", linkProLineItem);\n    console.log(\"shippingLineItem: \", shippingLineItem);\n  }, [linkProLineItem, shippingLineItem]);\n\n  return (\n    <div className={\"popup-container\"}>\n      <div className={\"link-pro-trial-popup-content\"}>\n        <button type={\"button\"} onClick={onClose} className={\"close-button\"}>\n          <CloseSymbol className={\"close-symbol\"} />\n        </button>\n        <img src={content.image} className={\"link-pro-image\"} />\n        <h2 className={\"trial-title\"}>\n          Try Arccos Air Free for {trialPeriodDays} days\n        </h2>\n        <div className={\"body-section\"}>\n          <p className={\"popup-body-text\"}>\n            Arccos Air trials come with a new or expertly inspected, pre-owned\n            device and charging case, all protected by a one-year warranty.\n          </p>\n          <p className={\"popup-body-text\"}>\n            If Arccos is not for you, cancel at any time during your free trial\n            and return your Arccos Air and charging case to Arccos for the cost\n            of shipping.* If you decide to continue using Arccos after your\n            trial period concludes, you will automatically be charged a one-time\n            fee of {formatPrice(getLinkProPriceFromSingleItem(linkProLineItem))}{\" \"}\n            for the Arccos Air and charging case (a $50 savings versus MSRP).\n          </p>\n          <p className={\"popup-body-text\"}>\n            <a\n              className={\"terms\"}\n              href={\"https://www.arccosgolf.com/pages/link-pro-trial-terms\"}\n              target={\"_blank\"}\n            >\n              Terms and conditions\n            </a>{\" \"}\n            apply.\n          </p>\n          <p className={\"popup-body-text\"}>\n            For questions please reach out to&nbsp;\n            <a\n              className={\"email\"}\n              href={\n                \"mailto:starter@arccosgolf.com?subject=Link%20Pro%20Trial%20Inquiry\"\n              }\n            >\n              starter@arccosgolf.com\n            </a>\n            .\n          </p>\n          <p className={\"rate-note\"}>\n            *Rates may vary for customers located outside US, UK, and Canada\n          </p>\n        </div>\n      </div>\n    </div>\n  );\n};\n","import React from 'react'\nimport {SensorlessPopup} from \"../sensorless-popup/sensorless-popup.tsx\";\nimport {LinkProPopup} from \"../link/link-pro-popup.tsx\";\nimport {LinkProTrialPopup} from \"../link/link-pro-trial-popup/link-pro-trial-popup.tsx\";\nimport {ErrorDisplay} from \"../../../error/error-display\";\nimport {ArccosError} from \"../../../../util/arccos-error.mjs\";\n\nexport const PaymentPageModals: React.FC<{\n    shouldShowSensorlessPopup: boolean\n    shouldShowLinkProPopup: boolean\n    isLinkProTrial: boolean\n    error: ArccosError | undefined\n    setShouldShowSensorlessPopup: (shouldShow: boolean) => void\n    setShouldShowLinkProPopup: (shouldShow: boolean) => void\n    setError: (error: ArccosError | undefined) => void\n}> = ({shouldShowSensorlessPopup, shouldShowLinkProPopup, isLinkProTrial, error, setShouldShowSensorlessPopup, setShouldShowLinkProPopup, setError}) => {\n\n    return (\n        <>\n        {shouldShowSensorlessPopup && (\n                <SensorlessPopup onClose={() => {\n                    setShouldShowSensorlessPopup(false);\n                }}/>\n            )}\n            {shouldShowLinkProPopup && (\n                isLinkProTrial ? (\n                    <LinkProTrialPopup onClose={() => {\n                        setShouldShowLinkProPopup(false)\n                    }}/>\n                ) : (\n                    <LinkProPopup onClose={() => {\n                        setShouldShowLinkProPopup(false)\n                    }}/>\n                )\n            )}\n            {!!error && (\n                <ErrorDisplay\n                    title={error?.title}\n                    body={error?.message}\n                    onDismiss={() => setError(undefined)}\n                />\n            )}\n        </>\n    )\n}","import React, {ComponentProps} from 'react'\n\nexport const CircledArccosCrown: React.FC<ComponentProps<'svg'>> = (props) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" fill=\"none\" className={'product-icon'}>\n            <circle cx=\"16\" cy=\"16\" r=\"15.1429\" stroke=\"#252628\" strokeWidth=\"1.71429\"/>\n            <path fillRule=\"evenodd\" clipRule=\"evenodd\"\n                  d=\"M24.4333 14.4252C23.7668 14.4252 23.2245 13.8832 23.2245 13.2168C23.2245 12.5504 23.7668 12.0082 24.4333 12.0082C25.0998 12.0082 25.6422 12.5504 25.6422 13.2168C25.6422 13.8832 25.0998 14.4252 24.4333 14.4252ZM23.5346 14.9733L20.6739 21.755C20.607 21.9135 20.5756 21.9121 20.508 21.7556L19.5889 19.625C19.5833 19.612 19.5855 19.597 19.5945 19.5861L23.4647 14.9308C23.478 14.9148 23.4965 14.9126 23.5117 14.9188C23.5139 14.92 23.5162 14.9211 23.5185 14.9223C23.5342 14.932 23.5438 14.9516 23.5346 14.9733ZM11.4998 21.7496C11.4329 21.907 11.4005 21.9075 11.3338 21.7493L8.48396 14.9934C8.46538 14.9496 8.52342 14.9144 8.55378 14.9509L12.3959 19.5916C12.4048 19.6025 12.407 19.6173 12.4016 19.6301L11.4998 21.7496ZM16.1516 22.5329C16.0672 22.6345 15.9113 22.6343 15.8271 22.5327L13.3136 19.4967C13.3047 19.4859 13.3025 19.4711 13.308 19.4582L15.9402 13.2712C15.9544 13.2377 16.0018 13.2375 16.0162 13.2709L18.6838 19.4552C18.6894 19.4681 18.6872 19.4831 18.6782 19.494L16.1516 22.5329ZM14.7913 11.1822C14.7913 10.5158 15.3337 9.97365 16.0002 9.97365C16.6668 9.97365 17.209 10.5158 17.209 11.1822C17.209 11.8486 16.6668 12.3906 16.0002 12.3906C15.3337 12.3906 14.7913 11.8486 14.7913 11.1822ZM6.3569 13.2168C6.3569 12.5504 6.89923 12.0082 7.56578 12.0082C8.23234 12.0082 8.77455 12.5504 8.77455 13.2168C8.77455 13.8832 8.23234 14.4252 7.56578 14.4252C6.89923 14.4252 6.3569 13.8832 6.3569 13.2168ZM24.3303 11.2843C23.3539 11.3358 22.5616 12.1209 22.5016 13.0965C22.4723 13.5737 22.6174 14.0166 22.8786 14.3686C22.8951 14.391 22.8948 14.4216 22.8769 14.443L19.2792 18.7707C19.2613 18.7921 19.2271 18.7872 19.216 18.7616L16.7456 13.0345C16.7328 13.0047 16.7463 12.9692 16.7758 12.9563C17.4917 12.6425 17.9829 11.9086 17.9343 11.0681C17.8778 10.0901 17.0848 9.30099 16.1063 9.24879C14.9906 9.1893 14.0639 10.0797 14.0639 11.1824C14.0639 11.9599 14.5249 12.6318 15.1878 12.9395C15.2168 12.953 15.2294 12.9875 15.2169 13.0169L12.7735 18.7603C12.7625 18.7861 12.7281 18.7911 12.7101 18.7695L9.12624 14.4405C9.10851 14.4192 9.10814 14.3887 9.12466 14.3664C9.38502 14.0144 9.5294 13.5718 9.49977 13.095C9.43906 12.1201 8.64706 11.3358 7.67133 11.2843C6.55607 11.2253 5.62988 12.1156 5.62988 13.2179C5.62988 14.2855 6.49875 15.1541 7.56677 15.1541C7.60442 15.1541 7.6417 15.1528 7.67873 15.1505C7.70436 15.1489 7.72816 15.1633 7.73812 15.1869L10.8188 22.49C11.042 23.0193 11.7919 23.0204 12.0168 22.4918L12.9372 20.3282C12.9483 20.3023 12.9826 20.2973 13.0005 20.3189L15.3652 23.1752C15.6883 23.5654 16.2867 23.566 16.6105 23.1764L18.9926 20.3111C19.0104 20.2897 19.0447 20.2945 19.0557 20.3202L19.9955 22.4988C20.2225 23.0249 20.9695 23.0218 21.1923 22.4941L24.2743 15.1875C24.2842 15.1641 24.3079 15.1497 24.3334 15.1511C24.3669 15.1531 24.4007 15.1541 24.4347 15.1541C25.5027 15.1541 26.3716 14.2855 26.3716 13.2179C26.3716 12.1156 25.4455 11.2255 24.3303 11.2843Z\"\n                  fill=\"#252628\"/>\n            <path\n                d=\"M23.5346 14.9733L23.2716 14.8616L23.2713 14.8623L23.5346 14.9733ZM20.6739 21.755L20.9371 21.866L20.9372 21.866L20.6739 21.755ZM20.508 21.7556L20.2457 21.8687L20.2457 21.8688L20.508 21.7556ZM19.5889 19.625L19.3264 19.7378L19.3265 19.7381L19.5889 19.625ZM19.5945 19.5861L19.3748 19.4035L19.3738 19.4046L19.5945 19.5861ZM23.4647 14.9308L23.6844 15.1135L23.685 15.1128L23.4647 14.9308ZM23.5117 14.9188L23.6505 14.669L23.6355 14.6607L23.6196 14.6543L23.5117 14.9188ZM23.5185 14.9223L23.6691 14.6795L23.6605 14.6742L23.6516 14.6695L23.5185 14.9223ZM11.4998 21.7496L11.2369 21.6377L11.2368 21.6378L11.4998 21.7496ZM11.3338 21.7493L11.5971 21.6384L11.597 21.6383L11.3338 21.7493ZM8.48396 14.9934L8.74721 14.8824L8.74701 14.8819L8.48396 14.9934ZM8.55378 14.9509L8.77386 14.7687L8.77355 14.7684L8.55378 14.9509ZM12.3959 19.5916L12.1758 19.7738L12.1762 19.7743L12.3959 19.5916ZM12.4016 19.6301L12.6645 19.742L12.6646 19.7418L12.4016 19.6301ZM16.1516 22.5329L15.9319 22.3503L15.9318 22.3504L16.1516 22.5329ZM15.8271 22.5327L15.6071 22.7149L15.6071 22.7149L15.8271 22.5327ZM13.3136 19.4967L13.0927 19.6779L13.0935 19.6789L13.3136 19.4967ZM13.308 19.4582L13.0451 19.3463L13.045 19.3465L13.308 19.4582ZM15.9402 13.2712L16.2031 13.383L16.2032 13.3827L15.9402 13.2712ZM16.0162 13.2709L16.2786 13.1578L16.2784 13.1574L16.0162 13.2709ZM18.6838 19.4552L18.9463 19.3423L18.9461 19.342L18.6838 19.4552ZM18.6782 19.494L18.8979 19.6767L18.8989 19.6755L18.6782 19.494ZM24.3303 11.2843L24.3453 11.5697L24.3453 11.5697L24.3303 11.2843ZM22.5016 13.0965L22.2164 13.079L22.2164 13.079L22.5016 13.0965ZM22.8786 14.3686L23.1088 14.1993L23.1081 14.1983L22.8786 14.3686ZM22.8769 14.443L22.6577 14.2598L22.6572 14.2603L22.8769 14.443ZM19.2792 18.7707L19.4984 18.9539L19.4989 18.9534L19.2792 18.7707ZM19.216 18.7616L18.9537 18.8748L18.9537 18.8748L19.216 18.7616ZM16.7456 13.0345L16.483 13.147L16.4832 13.1476L16.7456 13.0345ZM16.7758 12.9563L16.89 13.2182L16.8905 13.218L16.7758 12.9563ZM17.9343 11.0681L17.649 11.0846L17.649 11.0846L17.9343 11.0681ZM16.1063 9.24879L16.1215 8.96348L16.1215 8.96348L16.1063 9.24879ZM15.1878 12.9395L15.3081 12.6804L15.3081 12.6804L15.1878 12.9395ZM15.2169 13.0169L14.954 12.9049L14.954 12.905L15.2169 13.0169ZM12.7735 18.7603L13.0363 18.8725L13.0364 18.8721L12.7735 18.7603ZM12.7101 18.7695L12.4901 18.9517L12.4905 18.9522L12.7101 18.7695ZM9.12624 14.4405L9.34632 14.2583L9.34612 14.2581L9.12624 14.4405ZM9.12466 14.3664L8.89497 14.1964L8.89492 14.1965L9.12466 14.3664ZM9.49977 13.095L9.78494 13.0773L9.78493 13.0773L9.49977 13.095ZM7.67133 11.2843L7.65623 11.5697L7.65627 11.5697L7.67133 11.2843ZM7.67873 15.1505L7.66117 14.8653L7.66097 14.8653L7.67873 15.1505ZM7.73812 15.1869L7.47475 15.2977L7.47486 15.298L7.73812 15.1869ZM10.8188 22.49L11.0821 22.379L11.0821 22.3789L10.8188 22.49ZM12.0168 22.4918L12.2797 22.6037L12.2797 22.6037L12.0168 22.4918ZM12.9372 20.3282L12.6745 20.2159L12.6743 20.2163L12.9372 20.3282ZM13.0005 20.3189L12.7802 20.5009L12.7804 20.5012L13.0005 20.3189ZM15.3652 23.1752L15.1451 23.3574L15.1452 23.3574L15.3652 23.1752ZM16.6105 23.1764L16.3908 22.9937L16.3908 22.9937L16.6105 23.1764ZM18.9926 20.3111L18.7733 20.1279L18.7729 20.1284L18.9926 20.3111ZM19.0557 20.3202L19.3181 20.207L19.3181 20.207L19.0557 20.3202ZM19.9955 22.4988L19.7332 22.612L19.7332 22.612L19.9955 22.4988ZM21.1923 22.4941L21.4555 22.6052L21.4555 22.6052L21.1923 22.4941ZM24.2743 15.1875L24.0113 15.0758L24.011 15.0765L24.2743 15.1875ZM24.3334 15.1511L24.35 14.8659L24.3497 14.8659L24.3334 15.1511ZM24.4333 14.1395C23.9245 14.1395 23.5102 13.7253 23.5102 13.2168H22.9388C22.9388 14.0411 23.6091 14.711 24.4333 14.711V14.1395ZM23.5102 13.2168C23.5102 12.7083 23.9246 12.294 24.4333 12.294V11.7225C23.6091 11.7225 22.9388 12.3926 22.9388 13.2168H23.5102ZM24.4333 12.294C24.9421 12.294 25.3564 12.7083 25.3564 13.2168H25.9279C25.9279 12.3926 25.2575 11.7225 24.4333 11.7225V12.294ZM25.3564 13.2168C25.3564 13.7253 24.9421 14.1395 24.4333 14.1395V14.711C25.2575 14.711 25.9279 14.0411 25.9279 13.2168H25.3564ZM23.2713 14.8623L20.4107 21.6439L20.9372 21.866L23.7978 15.0844L23.2713 14.8623ZM20.4107 21.6439C20.395 21.681 20.3895 21.6884 20.393 21.6832C20.395 21.6804 20.408 21.6612 20.4342 21.6407C20.4629 21.6184 20.5173 21.5874 20.5924 21.5877C20.6672 21.588 20.7208 21.6192 20.7486 21.6409C20.7742 21.6609 20.7868 21.6795 20.7886 21.6822C20.7919 21.6869 20.7862 21.6792 20.7704 21.6424L20.2457 21.8688C20.2636 21.9102 20.2872 21.9614 20.3174 22.0054C20.3339 22.0295 20.421 22.1584 20.59 22.1591C20.7607 22.1598 20.8486 22.0295 20.8655 22.0047C20.8958 21.9601 20.9194 21.9082 20.9371 21.866L20.4107 21.6439ZM20.7704 21.6424L19.8512 19.5118L19.3265 19.7381L20.2457 21.8687L20.7704 21.6424ZM19.8514 19.5121C19.8884 19.5983 19.8734 19.6968 19.8151 19.7676L19.3738 19.4046C19.2976 19.4973 19.2782 19.6256 19.3264 19.7378L19.8514 19.5121ZM19.8142 19.7688L23.6844 15.1135L23.245 14.7482L19.3748 19.4035L19.8142 19.7688ZM23.685 15.1128C23.652 15.1528 23.6042 15.1835 23.548 15.1957C23.4944 15.2073 23.4442 15.1998 23.4038 15.1834L23.6196 14.6543C23.5036 14.6069 23.347 14.6247 23.2444 14.7489L23.685 15.1128ZM23.373 15.1686C23.3792 15.172 23.3844 15.1746 23.386 15.1755C23.3864 15.1757 23.3869 15.1759 23.3871 15.176C23.3873 15.1761 23.3874 15.1762 23.3874 15.1762C23.3873 15.1761 23.3866 15.1758 23.3855 15.1752L23.6516 14.6695C23.6493 14.6683 23.6474 14.6673 23.6462 14.6667C23.6456 14.6664 23.6451 14.6662 23.6448 14.666C23.6444 14.6658 23.6443 14.6657 23.6442 14.6657C23.6435 14.6654 23.6465 14.6668 23.6505 14.669L23.373 15.1686ZM23.368 15.1652C23.3263 15.1393 23.288 15.0977 23.2673 15.0409C23.2453 14.9803 23.2486 14.9158 23.2716 14.8616L23.7975 15.085C23.8698 14.9149 23.7865 14.7523 23.6691 14.6795L23.368 15.1652ZM11.2368 21.6378C11.2212 21.6745 11.2157 21.6819 11.2192 21.6769C11.2211 21.674 11.234 21.6552 11.2599 21.635C11.288 21.6131 11.3418 21.5822 11.4164 21.5821C11.491 21.582 11.545 21.6128 11.5735 21.635C11.5996 21.6553 11.6125 21.6744 11.6145 21.6773C11.6181 21.6825 11.6126 21.6752 11.5971 21.6384L11.0705 21.8603C11.0883 21.9026 11.1119 21.9545 11.1424 21.9992C11.1596 22.0244 11.2472 22.1537 11.4171 22.1535C11.5863 22.1533 11.6737 22.0245 11.6908 21.9995C11.7213 21.955 11.7449 21.9033 11.7628 21.8613L11.2368 21.6378ZM11.597 21.6383L8.74721 14.8824L8.22071 15.1045L11.0705 21.8604L11.597 21.6383ZM8.74701 14.8819C8.85796 15.1436 8.51205 15.3478 8.33402 15.1335L8.77355 14.7684C8.53479 14.481 8.0728 14.7556 8.2209 15.1049L8.74701 14.8819ZM8.3337 15.1331L12.1758 19.7738L12.6159 19.4094L8.77386 14.7687L8.3337 15.1331ZM12.1762 19.7743C12.117 19.7032 12.1021 19.6045 12.1386 19.5185L12.6646 19.7418C12.712 19.6301 12.6927 19.5017 12.6155 19.4089L12.1762 19.7743ZM12.1387 19.5183L11.2369 21.6377L11.7627 21.8614L12.6645 19.742L12.1387 19.5183ZM15.9318 22.3504C15.9619 22.3142 16.0173 22.3144 16.0472 22.3505L15.6071 22.7149C15.8053 22.9542 16.1725 22.9549 16.3714 22.7155L15.9318 22.3504ZM16.0472 22.3505L13.5336 19.3145L13.0935 19.6789L15.6071 22.7149L16.0472 22.3505ZM13.5344 19.3154C13.5924 19.3861 13.6074 19.484 13.571 19.5699L13.045 19.3465C12.9976 19.4581 13.017 19.5856 13.0927 19.6779L13.5344 19.3154ZM13.5709 19.57L16.2031 13.383L15.6773 13.1593L13.0451 19.3463L13.5709 19.57ZM16.2032 13.3827C16.1191 13.5812 15.8391 13.5809 15.754 13.3844L16.2784 13.1574C16.1645 12.8942 15.7897 12.8941 15.6772 13.1596L16.2032 13.3827ZM15.7539 13.3841L18.4214 19.5683L18.9461 19.342L16.2786 13.1578L15.7539 13.3841ZM18.4213 19.568C18.3842 19.4818 18.3993 19.3833 18.4575 19.3125L18.8989 19.6755C18.9751 19.5828 18.9945 19.4545 18.9463 19.3423L18.4213 19.568ZM18.4585 19.3113L15.9319 22.3503L16.3713 22.7156L18.8979 19.6767L18.4585 19.3113ZM15.077 11.1822C15.077 10.6737 15.4914 10.2594 16.0002 10.2594V9.68794C15.1759 9.68794 14.5056 10.358 14.5056 11.1822H15.077ZM16.0002 10.2594C16.509 10.2594 16.9233 10.6737 16.9233 11.1822H17.4947C17.4947 10.358 16.8245 9.68794 16.0002 9.68794V10.2594ZM16.9233 11.1822C16.9233 11.6907 16.509 12.1049 16.0002 12.1049V12.6764C16.8245 12.6764 17.4947 12.0065 17.4947 11.1822H16.9233ZM16.0002 12.1049C15.4913 12.1049 15.077 11.6907 15.077 11.1822H14.5056C14.5056 12.0065 15.176 12.6764 16.0002 12.6764V12.1049ZM6.64261 13.2168C6.64261 12.7083 7.05695 12.294 7.56578 12.294V11.7225C6.74151 11.7225 6.07118 12.3926 6.07118 13.2168H6.64261ZM7.56578 12.294C8.07458 12.294 8.48883 12.7083 8.48883 13.2168H9.06026C9.06026 12.3926 8.3901 11.7225 7.56578 11.7225V12.294ZM8.48883 13.2168C8.48883 13.7253 8.07462 14.1395 7.56578 14.1395V14.711C8.39006 14.711 9.06026 14.041 9.06026 13.2168H8.48883ZM7.56578 14.1395C7.05691 14.1395 6.64261 13.7253 6.64261 13.2168H6.07118C6.07118 14.0411 6.74154 14.711 7.56578 14.711V14.1395ZM24.3152 10.999C23.194 11.0581 22.2853 11.9583 22.2164 13.079L22.7867 13.114C22.8378 12.2835 23.5139 11.6135 24.3453 11.5697L24.3152 10.999ZM22.2164 13.079C22.1828 13.6262 22.3496 14.1351 22.6492 14.5388L23.1081 14.1983C22.8853 13.8981 22.7618 13.5212 22.7868 13.114L22.2164 13.079ZM22.6484 14.5378C22.5903 14.4587 22.5877 14.3436 22.6577 14.2598L23.0962 14.6262C23.2019 14.4997 23.2 14.3233 23.1088 14.1993L22.6484 14.5378ZM22.6572 14.2603L19.0595 18.5881L19.4989 18.9534L23.0966 14.6256L22.6572 14.2603ZM19.0599 18.5875C19.1776 18.4466 19.4045 18.4773 19.4784 18.6484L18.9537 18.8748C19.0496 19.0972 19.345 19.1375 19.4984 18.9539L19.0599 18.5875ZM19.4784 18.6484L17.0079 12.9213L16.4832 13.1476L18.9537 18.8748L19.4784 18.6484ZM17.0082 12.9219C17.0551 13.0314 17.0096 13.166 16.89 13.2182L16.6616 12.6944C16.483 12.7723 16.4105 12.9781 16.483 13.147L17.0082 12.9219ZM16.8905 13.218C17.7108 12.8584 18.2753 12.0167 18.2195 11.0516L17.649 11.0846C17.6904 11.8005 17.2725 12.4266 16.6611 12.6946L16.8905 13.218ZM18.2195 11.0517C18.1547 9.92822 17.2453 9.02343 16.1215 8.96348L16.0911 9.5341C16.9244 9.57855 17.601 10.252 17.649 11.0846L18.2195 11.0517ZM16.1215 8.96348C14.8414 8.89523 13.7782 9.91677 13.7782 11.1824H14.3496C14.3496 10.2426 15.1398 9.48338 16.0911 9.5341L16.1215 8.96348ZM13.7782 11.1824C13.7782 12.0756 14.3078 12.846 15.0675 13.1987L15.3081 12.6804C14.7419 12.4175 14.3496 11.8442 14.3496 11.1824H13.7782ZM15.0675 13.1987C14.9522 13.1451 14.9081 13.0129 14.954 12.9049L15.4798 13.1288C15.5508 12.9621 15.4814 12.7609 15.3081 12.6804L15.0675 13.1987ZM14.954 12.905L12.5106 18.6484L13.0364 18.8721L15.4798 13.1287L14.954 12.905ZM12.5108 18.648C12.5839 18.477 12.8115 18.4446 12.9298 18.5868L12.4905 18.9522C12.6447 19.1376 12.9411 19.0952 13.0363 18.8725L12.5108 18.648ZM12.9302 18.5873L9.34632 14.2583L8.90616 14.6227L12.4901 18.9517L12.9302 18.5873ZM9.34612 14.2581C9.41524 14.3414 9.41332 14.4565 9.3544 14.5362L8.89492 14.1965C8.80297 14.3209 8.80178 14.497 8.90636 14.623L9.34612 14.2581ZM9.35435 14.5363C9.65304 14.1325 9.81891 13.624 9.78494 13.0773L9.21461 13.1128C9.2399 13.5196 9.117 13.8963 8.89497 14.1964L9.35435 14.5363ZM9.78493 13.0773C9.71519 11.9574 8.80696 11.0581 7.68638 10.999L7.65627 11.5697C8.48715 11.6135 9.16292 12.2827 9.21461 13.1128L9.78493 13.0773ZM7.68642 10.999C6.40678 10.9313 5.34417 11.9527 5.34417 13.2179H5.9156C5.9156 12.2784 6.70535 11.5193 7.65623 11.5697L7.68642 10.999ZM5.34417 13.2179C5.34417 14.4434 6.34104 15.4399 7.56677 15.4399V14.8684C6.65646 14.8684 5.9156 14.1276 5.9156 13.2179H5.34417ZM7.56677 15.4399C7.61116 15.4399 7.65442 15.4383 7.69649 15.4357L7.66097 14.8653C7.62897 14.8673 7.59767 14.8684 7.56677 14.8684V15.4399ZM7.6963 15.4357C7.60438 15.4413 7.51327 15.3893 7.47475 15.2977L8.00148 15.0761C7.94305 14.9372 7.80433 14.8565 7.66117 14.8653L7.6963 15.4357ZM7.47486 15.298L10.5555 22.601L11.0821 22.3789L8.00137 15.0759L7.47486 15.298ZM10.5555 22.601C10.8768 23.3629 11.956 23.3644 12.2797 22.6037L11.7538 22.3799C11.6277 22.6764 11.2072 22.6757 11.0821 22.379L10.5555 22.601ZM12.2797 22.6037L13.2001 20.44L12.6743 20.2163L11.7538 22.38L12.2797 22.6037ZM13.2 20.4405C13.1273 20.6106 12.8992 20.645 12.7802 20.5009L13.2208 20.137C13.0661 19.9497 12.7693 19.9941 12.6745 20.2159L13.2 20.4405ZM12.7804 20.5012L15.1451 23.3574L15.5853 22.993L13.2206 20.1367L12.7804 20.5012ZM15.1452 23.3574C15.5824 23.8854 16.392 23.8862 16.8302 23.359L16.3908 22.9937C16.1813 23.2457 15.7943 23.2453 15.5853 22.9929L15.1452 23.3574ZM16.8302 23.359L19.2123 20.4937L18.7729 20.1284L16.3908 22.9937L16.8302 23.359ZM19.2119 20.4942C19.0941 20.6351 18.8672 20.6045 18.7934 20.4333L19.3181 20.207C19.2221 19.9846 18.9267 19.9442 18.7733 20.1279L19.2119 20.4942ZM18.7934 20.4333L19.7332 22.612L20.2579 22.3857L19.3181 20.207L18.7934 20.4333ZM19.7332 22.612C20.0598 23.3691 21.1349 23.3648 21.4555 22.6052L20.929 22.383C20.8041 22.6789 20.3851 22.6807 20.2579 22.3857L19.7332 22.612ZM21.4555 22.6052L24.5375 15.2986L24.011 15.0765L20.929 22.3831L21.4555 22.6052ZM24.5372 15.2993C24.4991 15.389 24.4096 15.4416 24.3171 15.4364L24.3497 14.8659C24.2062 14.8577 24.0694 14.9392 24.0113 15.0758L24.5372 15.2993ZM24.3169 15.4363C24.3553 15.4386 24.3946 15.4399 24.4347 15.4399V14.8684C24.4068 14.8684 24.3786 14.8675 24.35 14.8659L24.3169 15.4363ZM24.4347 15.4399C25.6604 15.4399 26.6573 14.4434 26.6573 13.2179H26.0859C26.0859 14.1276 25.345 14.8684 24.4347 14.8684V15.4399ZM26.6573 13.2179C26.6573 11.9527 25.5948 10.9315 24.3152 10.999L24.3453 11.5697C25.2962 11.5194 26.0859 12.2784 26.0859 13.2179H26.6573Z\"\n                fill=\"#252628\"/>\n        </svg>\n    )\n}\n","import React, { useState } from 'react'\nimport {localize, TextContent} from \"../../../lang/localized-content.mts\";\nimport {CircledArccosCrown} from \"../../common-components/svg-components/circled-arccos-crown.tsx\";\nimport {\n    setShouldIncludeLink,\n    setShouldIncludeSensors,\n    useFormatPrice,\n    useShouldIncludeLink,\n    useShouldIncludeSensors,\n} from \"../../../data/redux/slices/offers/offers-slice.mts\";\nimport {\n    useSelectedCompletionKitLineItem,\n    useSelectedLineItems,\n    useTrialPeriodDays\n} from \"../../../data/api/query/offers.mts\";\nimport {useDispatch} from \"react-redux\";\nimport {LinkOffer, useLinkDiscountDisplay} from \"./link/link-offer.tsx\";\nimport { getShouldOfferSkillest } from '../../../util/partner-selectors.mts';\n\ntype Product = { key: string, title: TextContent, icon: string, body: TextContent, label?: TextContent, bullet_points?: TextContent[] }\nexport const LineItem: React.FC<{ product: Product, buttonAction?: () => void }> = ({product, buttonAction}) => {\n    const [isExpanded, setIsExpanded] = useState(false)\n    const dispatch = useDispatch()\n    const lineItems = useSelectedLineItems()\n    console.debug('lineItems: ', lineItems)\n    const lineItem = lineItems?.find((lineItem) => lineItem.key === product.key)\n    const trialPeriodDays = useTrialPeriodDays()\n    const isLinkAddOnActivated = useShouldIncludeLink()\n    const doesOfferHaveFreeTrial = trialPeriodDays > 0\n    const isCKOptional = useSelectedCompletionKitLineItem()?.is_required === false\n    const isSensorAddonActivated = useShouldIncludeSensors()\n    const formatPrice = useFormatPrice()\n    const isLinkProTrial = lineItems?.find((lineItem) => ['link_pro', 'link_gen_2'].includes(lineItem?.key))?.charge_type === 'SCHEDULED'\n    console.log('isLinkProTrial: ', isLinkProTrial)\n\n    const isSmartLaserPreorder = lineItems.some(l => l.key.includes('smart_laser'))\n    const selectedSmartLaserSubscriptionKey = new URLSearchParams(window.location.search).get('selectedOption')\n    const selectedSmartLaserSubscription = lineItems.find(l => l.key === selectedSmartLaserSubscriptionKey)\n\n\n    const isProductLink = ['link_pro', 'link_gen_2'].includes(lineItem?.key)\n    const isLinkProTrialLineItem = isProductLink && lineItem?.charge_type === 'SCHEDULED' && !isSmartLaserPreorder\n    const linkDiscountDisplay = useLinkDiscountDisplay()\n\n\n    if (\n        (lineItem?.key === 'completion_kit' && isCKOptional && !isSensorAddonActivated) ||\n        lineItem?.key === 'shipping_and_handling' ||\n        (isProductLink && !isLinkAddOnActivated && !isLinkProTrialLineItem) ||\n        (isSmartLaserPreorder && lineItem?.key !== selectedSmartLaserSubscriptionKey && lineItem?.item_group === 'smart_laser_preorder')\n    ) {\n        return null\n    }\n\n    const price = (lineItem?.actual_price === 0 || lineItem?.key === 'subscription' && doesOfferHaveFreeTrial) ? localize(product.body) : `${formatPrice(lineItem?.actual_price)}`\n\n    return !isProductLink ? (\n        <div className={`product ${product.bullet_points ? 'with-details' : ''} ${isExpanded ? 'expanded' : ''}`}>\n            <div className={'line-wrapper'} onClick={() => setIsExpanded(!isExpanded)}>\n                {product.icon === 'arccos_circled' ?\n                    <CircledArccosCrown className={'product-icon'}/> :\n                    <img className={'product-icon'} src={product.icon} alt={''}/>\n                }\n                <div className={'product-title'}>{isLinkProTrial && lineItem?.key === 'subscription' ? `${trialPeriodDays}-Day Arccos Trial` : localize(product.title, {\n                    values: {\n                            trial_period_days: trialPeriodDays?.toString(),\n                        },\n                    })}\n                </div>\n                <div className={'price-wrapper'}>\n                    <div className={'sale-price-wrapper'}>\n                        {lineItem?.original_price !== lineItem?.actual_price && (\n                            <p className={'price original'}>\n                                {`${formatPrice(lineItem?.original_price)}`}\n                            </p>\n                        )}\n                        <p className={'price'}>\n                            {price}\n                        </p>\n                    </div>\n                    {lineItem?.key === 'completion_kit' && isCKOptional &&\n                        <button\n                            type={'button'} className={'remove-line-item-button'}\n                            onClick={() => dispatch(setShouldIncludeSensors(false))}\n                        >\n                            Remove\n                        </button>\n                    }\n                </div>\n                <CaratIcon isExpanded={isExpanded} />\n            </div>\n            {product.bullet_points && (\n                <div className={'product-details'}>\n                    <ul className={'product-details-list'}>\n                        {product.bullet_points?.map((bulletPoint, index) => (\n                            <li key={index}>{localize(bulletPoint)}</li>\n                        ))}\n                    </ul>\n                </div>\n            )}\n        </div>\n    ) : isLinkProTrialLineItem ?\n        <LinkOffer buttonAction={buttonAction} /> :\n        (\n        <div className={`product link`}>\n            <div className={'line-wrapper'}>\n                <img className={'product-icon'} src={product.icon} alt={''}/>\n                <div className={'product-info-wrapper'}>\n                    <div className={'product-title'}>\n                        {localize(product.title, {\n                            values: {\n                                discount: linkDiscountDisplay,\n                                trial_period_days: trialPeriodDays?.toString(),\n                            },\n                        }).replace('Link Pro', 'Arccos Air')}\n                        </div>\n                    <button\n                        type='button'\n                        className={`learn-more-button ${isLinkProTrialLineItem ? 'link-pro-trial' : ''}`}\n                        onClick={buttonAction}\n                    >\n                        {localize(product.label)}\n                    </button>\n                </div>\n                <div className={'price-wrapper'} onClick={() => dispatch(setShouldIncludeLink(!isLinkAddOnActivated))}>\n\n\n                    <p className={'price'}>\n                        {price}\n                    </p>\n                    <button\n                        type={'button'} className={'remove-line-item-button'}\n                    >\n                        Remove\n                    </button>\n\n\n                </div>\n            </div>\n        </div>\n    )\n}\n\nexport const SkillestLineItem: React.FC = () => {\n    const [isExpanded, setIsExpanded] = useState(false)\n    \n    if (!getShouldOfferSkillest()) {\n        return null\n    }\n\n    return (\n        <div className={`product with-details ${isExpanded ? 'expanded' : ''}`}>\n            <div className={'line-wrapper'} onClick={() => setIsExpanded(!isExpanded)}>\n                <img className={'product-icon'} src={'https://cdn.arccosgolf.com/images/icons/skillest-small.png'} alt={''}/>\n                <div className={'product-title'}>Skillest Swing Lesson</div>\n                <div className={'price-wrapper'}>\n                    <div className={'sale-price-wrapper'}>\n                        <p className={'price'}>\n                            FREE\n                        </p>\n                    </div>\n                </div>\n                <CaratIcon isExpanded={isExpanded} />\n            </div>\n                <div className={'product-details'}>\n                    <ul className={'product-details-list'}>\n                        <li>Free remote golf lesson</li>\n                        <li>Upload video anytime</li>\n                        <li>Pro feedback + drills</li>\n                    </ul>\n                </div>\n        </div>\n    )\n}\n\nconst CaratIcon: React.FC<{ onClick?: () => void, isExpanded?: boolean }> = ({ onClick, isExpanded }) => {\n    return (\n        <svg \n            xmlns=\"http://www.w3.org/2000/svg\" \n            viewBox=\"0 0 12 7\" \n            fill=\"none\" \n            className={`carat-icon ${isExpanded ? 'expanded' : ''}`}\n            onClick={onClick}\n            style={{ cursor: onClick ? 'pointer' : 'default' }}\n        >\n            <path d=\"M1 1L6 6L11 1\" stroke=\"black\" strokeWidth=\"1.11111\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n        </svg>\n    )\n}","import React from \"react\";\nimport { localize, TextContent } from \"../../../../lang/localized-content.mjs\";\nimport {\n  getDynamicContentPaymentLabel,\n  getDynamicContentPaymentProducts,\n} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport { LineItem, SkillestLineItem } from \"../line-item.tsx\";\nimport {\n  useIsCKOptional,\n  useSelectedLineItems,\n  useTrialPeriodDays,\n} from \"../../../../data/api/query/offers.mjs\";\nimport {\n  useFormatPrice,\n  useShouldIncludeLink,\n  useShouldIncludeSensors,\n} from \"../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport { useShouldUseAlpsExperiment } from \"../../../../util/alps-experiment.mjs\";\nimport { getPartnerFromWindowLocation } from \"../../../../util/partner-selectors.mts\";\n\nexport const useTotalDueAtCheckout = () => {\n  const lineItems = useSelectedLineItems();\n  const isLinkAddOnActivated = useShouldIncludeLink();\n  const trialPeriodDays = useTrialPeriodDays();\n  const isSensorAddonActivated = useShouldIncludeSensors();\n  const isCKOptional = useIsCKOptional();\n  const isSmartLaserPreorder = lineItems.some((l) =>\n    l.key.includes(\"smart_laser\"),\n  );\n\n  if (isSmartLaserPreorder) {\n    return 0;\n  }\n\n  const productPrices = getDynamicContentPaymentProducts().map(\n    (product, index) => {\n      const lineItem = lineItems?.find(\n        (lineItem) => lineItem.key === product.key,\n      );\n      console.log(\"lineItem: \", lineItem, product);\n      if (lineItem?.charge_type === \"SCHEDULED\") return 0;\n      if (\n        [\"link_pro\", \"link_gen_2\"].includes(lineItem?.key) &&\n        !isLinkAddOnActivated\n      )\n        return 0;\n      if (lineItem?.key === \"subscription\" && trialPeriodDays > 0) return 0;\n      if (\n        lineItem?.key === \"shipping_and_handling\" &&\n        isCKOptional &&\n        !isSensorAddonActivated\n      )\n        return 0;\n      return lineItem?.actual_price || 0;\n    },\n  );\n\n  return productPrices.reduce((acc, price) => acc + price, 0);\n};\n\nexport const ProductDetails: React.FC<{\n  titleContent: TextContent;\n  labelContent: TextContent;\n  bodyContent: TextContent;\n  isCKOptional: boolean;\n  isSensorAddonActivated: boolean;\n  setShouldShowLinkProPopup: (shouldShow: boolean) => void;\n}> = ({\n  titleContent,\n  labelContent,\n  bodyContent,\n  isCKOptional,\n  isSensorAddonActivated,\n  setShouldShowLinkProPopup,\n}) => {\n  const isSmartLaserPreorder = getDynamicContentPaymentProducts().some(\n    (product) => product.key.includes(\"smart_laser\"),\n  );\n  const lineItems = useSelectedLineItems();\n\n  const products = lineItems.map((lineItem) => lineItem.key);\n\n  const doesOfferRequireShipping =\n    products.includes(\"shipping_and_handling\") &&\n    (!isCKOptional || isSensorAddonActivated);\n  const totalDueAtCheckout = useTotalDueAtCheckout();\n  const formatPrice = useFormatPrice();\n  const isAlpsExperiment = useShouldUseAlpsExperiment();\n  const partner = getPartnerFromWindowLocation();\n  const isLinkProPartner = partner === \"link-pro\";\n\n  const dynamicContentPaymentProducts = isAlpsExperiment\n    ? alpsOfferPaymentPageDynamicContent.products\n    : isLinkProPartner\n      ? linkProOfferPaymentPageDynamicContent.products\n      : getDynamicContentPaymentProducts();\n\n  return (\n    <>\n      {titleContent && <h2 className={\"title\"}>{localize(titleContent)}</h2>}\n      {labelContent && (\n        <label className={\"label\"}>\n          {localize(getDynamicContentPaymentLabel())}\n        </label>\n      )}\n      {bodyContent && <p className={\"body\"}>{localize(bodyContent)}</p>}\n      <div\n        className={`content ${!(isCKOptional && !isSensorAddonActivated) ? \"\" : \"with-sensors\"}`}\n      >\n        <div className={\"order-summary\"}>\n          <label className={\"order-summary-label\"}>\n            {isSmartLaserPreorder ? \"Pre-Order Summary\" : \"Order Summary\"}\n          </label>\n          <div className={\"products\"}>\n            {dynamicContentPaymentProducts.map((product, index) => (\n              <LineItem\n                key={product.key}\n                product={product}\n                buttonAction={() => setShouldShowLinkProPopup(true)}\n              />\n            ))}\n            <SkillestLineItem />\n            <div className={\"total-price\"}>\n              <div className={\"line-wrapper\"}>\n                <div\n                  className={\"product-title\"}\n                >{`Total${doesOfferRequireShipping ? ` with Shipping & Handling` : \"\"}${isSmartLaserPreorder ? ` Due Today` : \"\"}`}</div>\n                <p className={\"price\"}>\n                  {totalDueAtCheckout != null\n                    ? `${formatPrice(totalDueAtCheckout, { preferredFractionDigits: totalDueAtCheckout === 0 ? 0 : undefined })}`\n                    : localize(getDynamicContentPaymentProducts()[0].body)}\n                </p>\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </>\n  );\n};\n\nconst linkProOfferPaymentPageDynamicContent = {\n  products: [\n    {\n      key: \"link_pro\",\n      title: {\n        en: \"Arccos Air\",\n      },\n      icon: \"https://cdn.arccosgolf.com/images/activation/shared/LinkPro-3.webp\",\n      label: {\n        en: \"Learn More\",\n      },\n    },\n    {\n      key: \"shipping_and_handling\",\n      title: {\n        en: \"Shipping & Handling\",\n        ja: \"の送料手数料\",\n        ko: \"배송 및 취급 수수료\",\n      },\n      icon: \"https://cdn.arccosgolf.com/images/icons/skillest-small.webp\",\n      body: {\n        en: \"FREE\",\n        ja: \"無料\",\n        ko: \"무료\",\n      },\n    },\n  ],\n  link_pro_popup: {\n    image:\n      \"https://cdn.arccosgolf.com/images/activation/shared/link-pro-matt-fitzpatrick.webp\",\n    title: {\n      en: \"Arccos Air Wearable\",\n    },\n    body: {\n      en: \"Next generation tech that allows Arccos members to automatically track shots right from their pocket, without a phone. Designed with new microphones and enhanced GPS for the most precise shot location. Comes with a wireless charging case that powers up to 12 rounds.\",\n    },\n    body2: {\n      en: \"The smartest solution for Arccos members who prefer not to carry a phone during the round. Play the game your way.\",\n    },\n    button_text: {\n      en: \"Add to Cart\",\n    },\n    product_details: {\n      title: {\n        en: \"Product Details\",\n      },\n      details: [\n        {\n          en: 'Small and ultra lightweight (<25g), measuring 2.25\" (L) x 1.25\" (W) x 0.75\" (D)',\n        },\n        {\n          en: \"Compatible with Arccos Smart Sensors and Smart Grips\",\n        },\n        {\n          en: \"Compatible with iPhone and Android devices\",\n        },\n        {\n          en: \"Weather-resistant\",\n        },\n        {\n          en: \"Permitted under the Rules of Golf\",\n        },\n      ],\n    },\n    key_features: {\n      title: {\n        en: \"Key Features\",\n      },\n      features: [\n        {\n          feature: {\n            en: \"Works in Your Pocket:\",\n          },\n          description: {\n            en: \"Arccos Air can be placed inside your pocket for seamless shot detection.\",\n          },\n        },\n        {\n          feature: {\n            en: \"Wireless Charging Case:\",\n          },\n          description: {\n            en: \"Powers up to 12 rounds of golf and secure storage for your Arccos Air.\",\n          },\n        },\n        {\n          feature: {\n            en: \"Mark the Pin Button:\",\n          },\n          description: {\n            en: \"For even more precise approach and putting stats.\",\n          },\n        },\n      ],\n    },\n    quote: {\n      en: '\"A powerful new way to make recording of shots and stats more seamless than ever.\"',\n    },\n    golf_digest_logo:\n      \"https://cdn.arccosgolf.com/images/activation/shared/golf-digest-logo-black2.webp\",\n  },\n  add_on: {\n    image: \"https://cdn.arccosgolf.com/images/activation/shared/LinkPro-3.webp\",\n    section_title: {\n      en: \"Arccos Air Wearable\",\n    },\n    benefits: [\n      {\n        en: \"Trusted by Tour pros\",\n      },\n      {\n        en: \"Automatic shot tracking w/o phone\",\n      },\n      {\n        en: \"Works in pocket or on belt\",\n      },\n      {\n        en: \"Charging case included\",\n      },\n      {\n        en: \"12 rounds battery life\",\n      },\n    ],\n    button_text: {\n      en: \"Purchase for {price}\",\n      ja: \"{price}で購入\",\n      ko: \"{price}에 구매하세요\",\n    },\n  },\n  payment_methods_title: {\n    en: \"Payment & Shipping\",\n    ja: \"お支払い方法\",\n    ko: \"결제 및 배송\",\n  },\n  shipping_address_label: {\n    en: \"Shipping Address\",\n    ja: \"お届け先の住所\",\n    ko: \"배송 주소\",\n  },\n  payment_methods: [\"apple_pay\", \"google_pay\", \"credit_card\"],\n  buttonText: {\n    en: \"Purchase Arccos Air\",\n    ja: \"Arccos Airを購入\",\n    ko: \"Arccos Air 구매\",\n  },\n  disclaimer: {\n    text: {\n      en: \"One-time purchase. No subscription required.\",\n      ja: \"一回限りの購入。サブスクリプションは不要です。\",\n      ko: \"일회성 구매. 구독이 필요하지 않습니다.\",\n    },\n    license_agreement: {\n      text: {\n        en: \"License Agreement\",\n        ja: \"ライセンス契約\",\n        ko: \"특허권 협약\",\n      },\n      href: \"https://www.arccosgolf.com/pages/end-user-license-agreement\",\n    },\n    privacy_policy: {\n      text: {\n        en: \"Privacy Policy\",\n        ja: \"プライバシーポリシー\",\n        ko: \"개인 정보 정책\",\n      },\n      href: \"https://www.arccosgolf.com/pages/privacy-policy\",\n    },\n  },\n};\n\nconst alpsOfferPaymentPageDynamicContent = {\n  products: [\n    {\n      key: \"subscription\",\n      title: {\n        en: \"{trial_period_days} Day Trial\",\n        ja: \"{trial_period_days}日間のトライアル\",\n        ko: \"{trial_period_days}일 체험\",\n      },\n      icon: \"arccos_circled\",\n      body: {\n        en: \"FREE\",\n        ja: \"無料\",\n        ko: \"무료\",\n      },\n      bullet_points: [\n        {\n          en: \"Game Tracking access\",\n        },\n        {\n          en: \"Advanced Analytics\",\n        },\n        {\n          en: \"Cancel anytime\",\n        },\n      ],\n    },\n    {\n      key: \"link_pro\",\n      title: {\n        en: \"Arccos Air ({discount} Off)\",\n      },\n      icon: \"https://cdn.arccosgolf.com/images/activation/shared/LinkPro-3.webp\",\n      label: {\n        en: \"Learn More\",\n      },\n    },\n    {\n      key: \"shipping_and_handling\",\n      title: {\n        en: \"Shipping & Handling\",\n        ja: \"の送料手数料\",\n        ko: \"배송 및 취급 수수료\",\n      },\n      icon: \"https://cdn.arccosgolf.com/images/icons/skillest-small.webp\",\n      body: {\n        en: \"FREE\",\n        ja: \"無料\",\n        ko: \"무료\",\n      },\n    },\n  ],\n  link_pro_popup: {\n    image:\n      \"https://cdn.arccosgolf.com/images/activation/shared/link-pro-matt-fitzpatrick.webp\",\n    title: {\n      en: \"Arccos Air Wearable\",\n    },\n    body: {\n      en: \"Next generation tech that allows Arccos members to automatically track shots right from their pocket, without a phone. Designed with new microphones and enhanced GPS for the most precise shot location. Comes with a wireless charging case that powers up to 12 rounds.\",\n    },\n    body2: {\n      en: \"The smartest solution for Arccos members who prefer not to carry a phone during the round. Play the game your way.\",\n    },\n    button_text: {\n      en: \"Add to Cart\",\n    },\n    product_details: {\n      title: {\n        en: \"Product Details\",\n      },\n      details: [\n        {\n          en: 'Small and ultra lightweight (<25g), measuring 2.25\" (L) x 1.25\" (W) x 0.75\" (D)',\n        },\n        {\n          en: \"Compatible with Arccos Smart Sensors and Smart Grips\",\n        },\n        {\n          en: \"Compatible with iPhone and Android devices\",\n        },\n        {\n          en: \"Weather-resistant\",\n        },\n        {\n          en: \"Permitted under the Rules of Golf\",\n        },\n      ],\n    },\n    key_features: {\n      title: {\n        en: \"Key Features\",\n      },\n      features: [\n        {\n          feature: {\n            en: \"Works in Your Pocket:\",\n          },\n          description: {\n            en: \"Arccos Air can be placed inside your pocket for seamless shot detection.\",\n          },\n        },\n        {\n          feature: {\n            en: \"Wireless Charging Case:\",\n          },\n          description: {\n            en: \"Powers up to 12 rounds of golf and secure storage for your Arccos Air.\",\n          },\n        },\n        {\n          feature: {\n            en: \"Mark the Pin Button:\",\n          },\n          description: {\n            en: \"For even more precise approach and putting stats.\",\n          },\n        },\n      ],\n    },\n    quote: {\n      en: \"“A powerful new way to make recording of shots and stats more seamless than ever.”\",\n    },\n    golf_digest_logo:\n      \"https://cdn.arccosgolf.com/images/activation/shared/golf-digest-logo-black2.webp\",\n  },\n  add_on: {\n    image: \"https://cdn.arccosgolf.com/images/activation/shared/LinkPro-3.webp\",\n    section_title: {\n      en: \"Arccos Air Wearable ({discount} Off)\",\n    },\n    benefits: [\n      {\n        en: \"Trusted by Tour pros\",\n      },\n      {\n        en: \"Automatic shot tracking w/o phone\",\n      },\n      {\n        en: \"Works in pocket or on belt\",\n      },\n      {\n        en: \"Charging case included\",\n      },\n      {\n        en: \"12 rounds battery life\",\n      },\n    ],\n    button_text: {\n      en: \"Add Now for {price}\",\n      ja: \"今すぐ{price}で追加\",\n      ko: \"지금 {price}에 추가하세요\",\n    },\n  },\n  payment_methods_title: {\n    en: \"Payment & Shipping\",\n    ja: \"お支払い方法\",\n    ko: \"결제 및 배송\",\n  },\n  shipping_address_label: {\n    en: \"Shipping Address\",\n    ja: \"お届け先の住所\",\n    ko: \"배송 주소\",\n  },\n  payment_methods: [\"apple_pay\", \"google_pay\", \"credit_card\"],\n  buttonText: {\n    en: \"Activate Trial\",\n    ja: \"メンバーシップを有効にする\",\n    ko: \"멤버십 활성화\",\n  },\n  disclaimer: {\n    text: {\n      en: \"{trial_period_days} days free. Then {monthly_price} / mo. billed annually. Cancel anytime.\",\n      ja: \"{trial_period_days} 日間無料。その後は {price} / 年。いつでもキャンセルできます\",\n      ko: \"{trial_period_days} 무료. 그 후 {price}/년. 언제든지 취소 가능\",\n    },\n    license_agreement: {\n      text: {\n        en: \"License Agreement\",\n        ja: \"ライセンス契約\",\n        ko: \"특허권 협약\",\n      },\n      href: \"https://www.arccosgolf.com/pages/end-user-license-agreement\",\n    },\n    privacy_policy: {\n      text: {\n        en: \"Privacy Policy\",\n        ja: \"プライバシーポリシー\",\n        ko: \"개인 정보 정책\",\n      },\n      href: \"https://www.arccosgolf.com/pages/privacy-policy\",\n    },\n  },\n};\n","import React from \"react\";\nimport \"./ck14-product-details.css\";\nimport { useDispatch } from \"react-redux\";\nimport {\n  setShouldIncludeLink,\n  useShouldIncludeLink,\n} from \"../../../../data/redux/slices/offers/offers-slice.mts\";\nimport { useTrialPeriodDays, useSelectedLinkGen2LineItem, useSelectedShippingAndHandlingLineItem } from \"../../../../data/api/query/offers.mts\";\nimport { CheckoutIcon } from \"../../alps-next/components/checkout-icon/checkout-icon.tsx\";\nimport { getIsUsOrCa } from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport { useFormatPrice } from \"../../../../data/redux/slices/offers/offers-slice.mts\";\nimport { getLinkProPriceFromSingleItem } from \"../../../../util/link-pro-price-utils.mts\";\n\nconst imgGen4Sensors =\n  \"https://cdn.arccosgolf.com/images/activation/ck14/sensor.webp\";\nconst imgLinkPro =\n   \"https://cdn.arccosgolf.com/images/activation/ck14/link-pro.webp\";\nconst PlusCircleIcon: React.FC = () => (\n  <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <circle cx=\"10\" cy=\"10\" r=\"10\" fill=\"#56C271\" />\n    <path d=\"M10 5.5V14.5M5.5 10H14.5\" stroke=\"white\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n  </svg>\n);\n\nconst Ck14LinkProSpecialOffer: React.FC<{ onAdd: () => void; price: string; onTermsClick?: () => void }> = ({ onAdd, price, onTermsClick }) => (\n  <div className=\"ck14-link-pro-special-offer\">\n    <div className=\"ck14-special-offer-badge\">$50 Off</div>\n    <div className=\"ck14-special-offer-inner\">\n      <div className=\"ck14-product-icon-wrapper\">\n        <img src={imgLinkPro} alt=\"Arccos Air Wearable\" className=\"ck14-product-img--linkpro\" />\n      </div>\n      <div className=\"ck14-product-meta\">\n        <p className=\"ck14-special-offer-label\">SPECIAL OFFER</p>\n        <div className=\"ck14-product-title-row\">\n          <span className=\"ck14-product-name\">Arccos Air Wearable</span>\n        </div>\n        <ul className=\"ck14-bullet-list\">\n          <li>Track shots with no phone</li>\n          <li>Wireless charging case (12 rounds battery)</li>\n          <li>Purchase today for {price}</li>\n        </ul>\n        <button type=\"button\" className=\"ck14-add-to-cart-btn\" onClick={onAdd}>\n          ADD TO CART\n          <PlusCircleIcon />\n        </button>\n      </div>\n    </div>\n  </div>\n);\n\nconst LinkProContent: React.FC<{ muted?: boolean; onTermsClick?: () => void; shippingPrice?: string; price?: string; showDiscount?: boolean }> = ({ muted = false, onTermsClick, shippingPrice, price, showDiscount = false }) => (\n  <>\n    <div className=\"ck14-product-title-row\">\n      <span className=\"ck14-product-name\">Arccos Air Wearable{showDiscount ? ' ($50 Off)' : ''}</span>\n      {shippingPrice && <span className=\"ck14-product-shipping ck14-link-pro-shipping\"> ({shippingPrice} shipping)</span>}\n    </div>\n    <ul className={`ck14-bullet-list${muted ? \" ck14-bullet-list--muted\" : \"\"}`}>\n      <li>Track shots with no phone</li>\n      <li>Wireless charging case (12 rounds battery)</li>\n      {price && <li>Purchase today for {price}</li>}\n    </ul>\n    {!price && (\n      <div className=\"ck14-terms\">\n        <p>\n          At conclusion of free trial, if you choose not to continue with Arccos Air\n          your device must be returned.\n        </p>\n        <p>\n          <button type=\"button\" className=\"ck14-terms-btn\" onClick={onTermsClick}>\n            <u>Terms and conditions apply.</u>\n          </button>\n        </p>\n      </div>\n    )}\n  </>\n);\n\nexport const Ck14ProductDetails: React.FC<{ setShouldShowLinkProPopup: (show: boolean) => void }> = ({ setShouldShowLinkProPopup }) => {\n  const dispatch = useDispatch();\n  const isLinkIncluded = useShouldIncludeLink();\n  const trialPeriodDays = useTrialPeriodDays();\n  const isUsOrCa = getIsUsOrCa();\n  const linkLineItem = useSelectedLinkGen2LineItem();\n  const shippingLineItem = useSelectedShippingAndHandlingLineItem();\n  const formatPrice = useFormatPrice();\n  const formatWithCommas = (price: number | undefined) =>\n    formatPrice(price).replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1,');\n  const shippingPrice = formatWithCommas(shippingLineItem?.actual_price);\n  const linkProPrice = formatWithCommas(getLinkProPriceFromSingleItem(linkLineItem) ?? linkLineItem?.actual_price);\n\n  return (\n    <div className=\"ck14-product-details\">\n      <div className=\"ck14-order-summary\">\n        <p className=\"ck14-whats-included\">WHAT'S INCLUDED</p>\n        <h2 className=\"ck14-trial-title\">\n          Arccos {trialPeriodDays}-Day Free Trial\n        </h2>\n        <div className=\"ck14-subtitle\">\n          <p>Stop guessing. Start knowing and shoot lower scores. Cancel anytime during your trial.</p>\n        </div>\n\n        <div className=\"ck14-products\">\n          {/* 14 Smart Sensors */}\n          <div className=\"ck14-product-item\">\n            <div className=\"ck14-product-icon-wrapper\">\n              <img\n                src={imgGen4Sensors}\n                alt=\"14 Smart Sensors\"\n                className=\"ck14-product-img--sensors\"\n              />\n            </div>\n            <div className=\"ck14-product-meta\">\n              <div className=\"ck14-product-title-row\">\n                <span className=\"ck14-product-name\">14 Smart Sensors</span>\n                {shippingPrice && <span className=\"ck14-product-shipping\"> ({shippingPrice} shipping)</span>}\n              </div>\n              <ul className=\"ck14-bullet-list\">\n                <li>Auto club identification</li>\n                <li>Smart Distance averages</li>\n              </ul>\n            </div>\n          </div>\n\n          {/* Automatic Game Tracking */}\n          <div className=\"ck14-product-item\">\n            <div className=\"ck14-product-icon-wrapper\">\n              <CheckoutIcon name=\"subscription\" />\n            </div>\n            <div className=\"ck14-product-meta\">\n              <div className=\"ck14-product-title-row\">\n                <span className=\"ck14-product-name\">\n                  Automatic Game Tracking\n                </span>\n              </div>\n              <ul className=\"ck14-bullet-list\">\n                <li>Strokes gained insights</li>\n                <li>Club-by-club performance analysis</li>\n              </ul>\n            </div>\n          </div>\n\n          {/* AI Strategy & Green Maps */}\n          <div className=\"ck14-product-item\">\n            <div className=\"ck14-product-icon-wrapper\">\n              <CheckoutIcon name=\"strategy\" />\n            </div>\n            <div className=\"ck14-product-meta\">\n              <div className=\"ck14-product-title-row\">\n                <span className=\"ck14-product-name\">\n                  AI Strategy &amp; Green Maps\n                </span>\n              </div>\n              <ul className=\"ck14-bullet-list\">\n                <li>Precise plan for every hole using your&nbsp;data</li>\n                <li>LiDAR green maps for ~10,000 courses</li>\n              </ul>\n            </div>\n          </div>\n\n          {/* Arccos Air — inside card when included (only if offer has a link_gen_2 line item) */}\n          {isLinkIncluded && linkLineItem && (\n            <div className=\"ck14-product-item\">\n              <div className=\"ck14-product-icon-wrapper\">\n                <img\n                  src={imgLinkPro}\n                  alt=\"Arccos Air\"\n                  className=\"ck14-product-img--linkpro\"\n                />\n              </div>\n              <div className=\"ck14-product-meta\">\n                <LinkProContent onTermsClick={() => setShouldShowLinkProPopup(true)} price={!isUsOrCa ? linkProPrice : undefined} showDiscount={!isUsOrCa} />\n                <button\n                  type=\"button\"\n                  className=\"ck14-remove-btn\"\n                  onClick={() => dispatch(setShouldIncludeLink(false))}\n                >\n                  REMOVE\n                </button>\n              </div>\n            </div>\n          )}\n        </div>\n      </div>\n\n      {/* Arccos Air detached — outside card when removed (only if offer has a link_gen_2 line item) */}\n      {!isLinkIncluded && linkLineItem && (\n        isUsOrCa ? (\n          <div className=\"ck14-link-pro-detached\">\n            <div className=\"ck14-product-icon-wrapper\">\n              <img\n                src={imgLinkPro}\n                alt=\"Arccos Air\"\n                className=\"ck14-product-img--linkpro\"\n              />\n            </div>\n            <div className=\"ck14-product-meta\">\n              <LinkProContent muted onTermsClick={() => setShouldShowLinkProPopup(true)} />\n              <button\n                type=\"button\"\n                className=\"ck14-add-to-cart-btn\"\n                onClick={() => dispatch(setShouldIncludeLink(true))}\n              >\n                ADD TO CART\n                <PlusCircleIcon />\n              </button>\n            </div>\n          </div>\n        ) : (\n          <Ck14LinkProSpecialOffer onAdd={() => dispatch(setShouldIncludeLink(true))} price={linkProPrice} onTermsClick={() => setShouldShowLinkProPopup(true)} />\n        )\n      )}\n    </div>\n  );\n};\n","import React from 'react'\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {getDynamicContentPaymentDisclaimerLicenseAgreement} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\n\nexport const LicenseAgreementLink: React.FC = () => {\n    return (\n        <a className={'link'}\n           href={localize(getDynamicContentPaymentDisclaimerLicenseAgreement().href)}\n           target={'_blank'}\n        >\n            {localize(getDynamicContentPaymentDisclaimerLicenseAgreement().text)}\n        </a>\n    )\n}","import React from 'react'\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {getDynamicContentPaymentDisclaimerPrivacyPolicy} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\n\nexport const PrivacyPolicyLink: React.FC = () => {\n    return (\n        <a className={'link'}\n           href={localize(getDynamicContentPaymentDisclaimerPrivacyPolicy().href)}\n           target={'_blank'}\n        >\n            {localize(getDynamicContentPaymentDisclaimerPrivacyPolicy().text)}\n        </a>\n    )\n}","import React from \"react\";\nimport { localize } from \"../../../../lang/localized-content.mjs\";\nimport {\n  getDynamicContentPaymentDisclaimer,\n  getDynamicContentPaymentDisclaimerText,\n} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport {\n  ScheduledLineItem,\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n  useSelectedSubscriptionLineItem,\n  useTrialPeriodDays,\n} from \"../../../../data/api/query/offers.mjs\";\nimport {\n  useFormatPrice,\n  useShouldIncludeLink,\n} from \"../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport { LicenseAgreementLink } from \"./license-agreement-link.tsx\";\nimport { PrivacyPolicyLink } from \"./privacy-policy-link.tsx\";\nimport { getLinkProPrice } from \"../../../../util/link-pro-price-utils.mts\";\nimport { getPartnerFromWindowLocation } from \"../../../../util/partner-selectors.mjs\";\n\nexport const Disclaimer: React.FC = () => {\n  const scheduledLineItem = useSelectedLineItems()?.find(\n    (l) => l.charge_type === \"SCHEDULED\",\n  ) as ScheduledLineItem;\n  const trialPeriodDays = useTrialPeriodDays();\n  const formatPrice = useFormatPrice();\n  const subscriptionLineItem = useSelectedSubscriptionLineItem();\n  const isLinkAddOnActivated = useShouldIncludeLink();\n  const lineItems = useSelectedLineItems();\n  const isReferral = getPartnerFromWindowLocation() === \"referrals\";\n  const selectedSmartLaserSubscriptionKey = new URLSearchParams(\n    window.location.search,\n  ).get(\"selectedOption\");\n  const selectedSmartLaserSubscription = lineItems?.find(\n    (l) => l.key === selectedSmartLaserSubscriptionKey,\n  );\n  const isSmartLaserPreorder =\n    lineItems?.some((l) => l.key.includes(\"smart_laser\")) || false;\n  const linkLineItem = useSelectedLinkGen2LineItem();\n  const isLinkProTrial =\n    linkLineItem?.charge_type === \"SCHEDULED\" && !isSmartLaserPreorder;\n  const shouldShowDefaultDisclaimer =\n    !getDynamicContentPaymentDisclaimer()?.titleist_privacy_notice;\n  const isNotSubscription =\n    !lineItems?.some((l) => l.key === \"subscription\") || false;\n\n  return (\n    <div className={\"disclaimer\"}>\n      <p>\n        {!isSmartLaserPreorder &&\n          isNotSubscription &&\n          localize(\n            \"By placing an order, you authorize Arccos to charge {link_price} + applicable taxes one time for Arccos Air after your {trial_period_days}-day free trial, unless you cancel and return the device before the trial ends. You may cancel anytime during the trial. Please review your order carefully, as changes cannot be made after submission.\",\n            {\n              values: {\n                link_price: formatPrice(\n                  getLinkProPrice(scheduledLineItem, linkLineItem),\n                ),\n                trial_period_days: `${trialPeriodDays || 0}`,\n              },\n            },\n          )}\n        {!isSmartLaserPreorder &&\n          !isNotSubscription &&\n          (scheduledLineItem\n            ? localize(\n                isLinkAddOnActivated\n                  ? \"By placing an order, you authorize Arccos to charge {link_price} one time for Arccos Air and {price} annually for membership after your {trial_period_days}-day free trial, plus applicable taxes, unless you cancel before the trial ends. You may cancel anytime during the trial. Arccos Air returns are accepted within 60 days of delivery. Please review your order carefully, as changes cannot be made after submission.\"\n                  : \"By placing an order, you authorize Arccos to charge {price} + applicable taxes annually for membership after your {trial_period_days}-day free trial, unless you cancel before the trial ends. You may cancel anytime during the trial. Please review your order carefully, as changes cannot be made after submission.\",\n                {\n                  values: {\n                    trial_period_days: `${trialPeriodDays || 0}`,\n                    price: formatPrice(subscriptionLineItem?.actual_price ?? 0),\n                    monthly_price: formatPrice(\n                      (subscriptionLineItem?.actual_price ?? 0) / 12,\n                    ),\n                    link_price: formatPrice(\n                      getLinkProPrice(scheduledLineItem, linkLineItem) ?? 0,\n                    ),\n                    license_agreement: <LicenseAgreementLink />,\n                    privacy_policy: <PrivacyPolicyLink />,\n                  },\n                },\n              )\n            : isReferral\n              ? localize(\n                  isLinkAddOnActivated && linkLineItem\n                    ? \"By placing an order, you authorize Arccos to charge {link_price} one time for Arccos Air and {price} + applicable taxes annually for your Arccos membership. Please review your order carefully, as changes cannot be made after submission.\"\n                    : \"By placing an order, you authorize Arccos to charge {price} + applicable taxes annually for your Arccos membership. Please review your order carefully, as changes cannot be made after submission.\",\n                  {\n                    values: {\n                      price: formatPrice(subscriptionLineItem?.actual_price ?? 0),\n                      link_price: formatPrice(linkLineItem?.actual_price ?? 0),\n                    },\n                  },\n                )\n              : localize(getDynamicContentPaymentDisclaimerText(), {\n                  values: {\n                    trial_period_days: `${trialPeriodDays || 0}`,\n                    price: `${formatPrice(subscriptionLineItem?.actual_price ?? 0)} + applicable taxes`,\n                    monthly_price: `${formatPrice((subscriptionLineItem?.actual_price ?? 0) / 12)}`,\n                  },\n                }))}\n      </p>\n      {isSmartLaserPreorder && (\n        <p className={\"legal\"}>\n          {localize(\n            `By placing an order, you authorize Arccos to charge {first_phase_price} for the Arccos Smart Laser and {first_phase_length}-year subscription upon shipment, plus applicable taxes. At the conclusion of your {first_phase_length} year subscription, you will be charged {second_phase_price} + applicable taxes annually for your Arccos Smart Laser Subscription. See our {license_agreement} and {privacy_policy} for more details.`,\n            {\n              values: {\n                first_phase_price: formatPrice(\n                  selectedSmartLaserSubscription?.phases?.[0]?.items[0]\n                    ?.charge_amount,\n                ),\n                first_phase_length: `${selectedSmartLaserSubscription?.phases?.[0]?.items[0]?.phase_length || \"UNKNOWN\"}`,\n                second_phase_price: formatPrice(\n                  selectedSmartLaserSubscription?.phases?.[1]?.items[0]\n                    ?.charge_amount,\n                ),\n                license_agreement: <LicenseAgreementLink />,\n                privacy_policy: <PrivacyPolicyLink />,\n              },\n            },\n          )}\n        </p>\n      )}\n      {!isLinkProTrial &&\n        shouldShowDefaultDisclaimer &&\n        !isSmartLaserPreorder && (\n          <p className={\"legal\"}>\n            <LicenseAgreementLink />\n            {\" and \"}\n            <PrivacyPolicyLink />.\n          </p>\n        )}\n    </div>\n  );\n};\n","import React from \"react\";\nimport { getDynamicContentPaymentDisclaimer, getIsUsOrCa } from \"../../../../data/initial-state/intial-state-accessors.mjs\";\nimport { localize } from \"../../../../lang/localized-content.mjs\";\nimport {\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n} from \"../../../../data/api/query/offers.mjs\";\nimport { getPartnerFromWindowLocation } from \"../../../../util/partner-selectors.mjs\";\nimport {\n  LicenseAgreementLink,\n  PrivacyPolicyLink,\n  TitleistPrivacyNoticeLink,\n} from \"./index.tsx\";\n\ntype AgeDisclaimerProps = {\n  /**\n   * Whether to include the subscription condition in the default disclaimer logic.\n   */\n  includeSubscriptionCondition?: boolean;\n};\n\nexport const AgeDisclaimer: React.FC<AgeDisclaimerProps> = ({\n  includeSubscriptionCondition = false,\n}) => {\n  const lineItems = useSelectedLineItems();\n  const isSmartLaserPreorder =\n    lineItems?.some((l) => l.key.includes(\"smart_laser\")) || false;\n  const isLinkProTrial =\n    useSelectedLinkGen2LineItem()?.charge_type === \"SCHEDULED\" &&\n    !isSmartLaserPreorder;\n  const partner = getPartnerFromWindowLocation();\n\n  // Determine if this is not a subscription\n  const isNotSubscription = ![\"subscription\", \"smart_laser_preorder\"].includes(\n    lineItems?.find((l) => l.charge_type === \"SCHEDULED\")?.key,\n  );\n\n  // Calculate shouldShowDefaultDisclaimer based on the component's usage\n  const isUsOrCa = getIsUsOrCa();\n  const shouldShowDefaultDisclaimer = includeSubscriptionCondition\n    ? !getDynamicContentPaymentDisclaimer()?.titleist_privacy_notice &&\n      (!isNotSubscription || !isUsOrCa)\n    : !getDynamicContentPaymentDisclaimer()?.titleist_privacy_notice;\n\n  if (shouldShowDefaultDisclaimer) {\n    // Special case for Arccos Air partner\n    if (partner === \"link-pro\") {\n      return (\n        <span className=\"age-disclaimer\">\n          By submitting your payment information, you affirm that you are at\n          least 13 years of age or older and that you consent to the{\" \"}\n          <LicenseAgreementLink /> and <PrivacyPolicyLink />.\n        </span>\n      );\n    }\n\n    if (isLinkProTrial || isSmartLaserPreorder) {\n      return (\n        <span className=\"age-disclaimer\">\n          By activating your membership, you affirm that you are at least 13\n          years of age or older and that you consent to the{\" \"}\n          <LicenseAgreementLink /> and <PrivacyPolicyLink />.\n        </span>\n      );\n    }\n\n    return (\n      <span className=\"age-disclaimer\">\n        By activating your membership, you affirm that you are at least 13 years\n        of age or older and that you consent to the license agreement and\n        privacy policy.\n      </span>\n    );\n  }\n\n  // Use dynamic content from getDynamicContentPaymentDisclaimer\n  const ageDisclaimerContent =\n    getDynamicContentPaymentDisclaimer()?.age_disclaimer;\n\n  if (!ageDisclaimerContent) {\n    return null;\n  }\n\n  return (\n    <span className=\"age-disclaimer\">\n      {localize(ageDisclaimerContent, {\n        values: {\n          license_agreement: <LicenseAgreementLink />,\n          privacy_policy: <PrivacyPolicyLink />,\n          titleist_privacy_notice: <TitleistPrivacyNoticeLink />,\n        },\n      })}\n    </span>\n  );\n};\n","import React from 'react'\nimport {localize} from \"../../../../lang/localized-content.mjs\";\nimport {getDynamicContentPaymentDisclaimer} from \"../../../../data/initial-state/intial-state-accessors.mjs\";\n\nexport const TitleistPrivacyNoticeLink: React.FC = () => {\n    const titleistPrivacyNotice = getDynamicContentPaymentDisclaimer()?.titleist_privacy_notice\n    if (!titleistPrivacyNotice) return null\n\n    return (\n        <a className={'link'}\n           href={localize(titleistPrivacyNotice.href)}\n           target={'_blank'}\n        >\n            {localize(titleistPrivacyNotice.text)}\n        </a>\n    )\n}","import React, {ComponentProps} from 'react'\n\nexport const CreditCardMark: React.FC<ComponentProps<'svg'>> = (props) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 14\" fill=\"none\" {...props} role=\"img\" aria-label=\"credit card\">\n            <rect opacity=\"0.5\" width=\"19.9996\" height=\"13.0432\" rx=\"1.09938\" fill=\"#B2BEC6\"/>\n            <rect y=\"1.73828\" width=\"19.9996\" height=\"2.17387\" fill=\"#575B65\"/>\n            <path\n                d=\"M3.87944 5.95154C4.11727 5.95586 4.35726 5.99694 4.59942 6.07478C4.84158 6.14829 5.0513 6.26072 5.2286 6.41207L4.7032 6.95692C4.60375 6.84449 4.47834 6.76017 4.32699 6.70395C4.17997 6.64341 4.03079 6.61314 3.87944 6.61314V7.92339C4.04376 7.97528 4.20808 8.03582 4.3724 8.105C4.53672 8.17419 4.68374 8.26284 4.81347 8.37094C4.94752 8.47473 5.05563 8.60229 5.13779 8.75364C5.21995 8.90499 5.26103 9.09093 5.26103 9.31146C5.26103 9.53632 5.22211 9.73524 5.14427 9.90821C5.07076 10.0769 4.96914 10.2196 4.83942 10.3363C4.71401 10.4487 4.56699 10.5352 4.39834 10.5958C4.23402 10.6563 4.06105 10.6887 3.87944 10.6931V11.1601H3.52917V10.6931C3.24378 10.6844 2.96919 10.6325 2.70541 10.5374C2.44595 10.4379 2.21245 10.2887 2.00488 10.0898L2.57568 9.54497C2.69244 9.68335 2.83946 9.79794 3.01675 9.88875C3.19405 9.97523 3.36485 10.0206 3.52917 10.025V8.58499C3.33891 8.5331 3.16161 8.47473 2.99729 8.40986C2.83297 8.34067 2.68811 8.25419 2.56271 8.15041C2.44163 8.04663 2.3465 7.92339 2.27731 7.78069C2.20812 7.63366 2.17353 7.45637 2.17353 7.24881C2.17353 7.05422 2.21028 6.88125 2.2838 6.7299C2.36163 6.57423 2.46325 6.44234 2.58865 6.33423C2.71838 6.22612 2.86324 6.1418 3.02324 6.08126C3.18756 6.0164 3.35621 5.97748 3.52917 5.96451V5.52344H3.87944V5.95154ZM3.52917 6.61314C3.37783 6.63044 3.24378 6.68666 3.12702 6.78179C3.01027 6.87692 2.95189 7.01962 2.95189 7.20989C2.95189 7.39151 3.00594 7.52988 3.11405 7.62501C3.22648 7.71582 3.36485 7.78501 3.52917 7.83258V6.61314ZM3.87944 10.025C4.06105 10.0163 4.20592 9.95145 4.31402 9.83037C4.42645 9.70929 4.48267 9.55146 4.48267 9.35687C4.48267 9.1666 4.42429 9.0239 4.30754 8.92877C4.19511 8.82931 4.05241 8.74931 3.87944 8.68877V10.025Z\"\n                fill=\"#575B65\"/>\n            <path\n                d=\"M7.83839 5.95154C8.07622 5.95586 8.31622 5.99694 8.55837 6.07478C8.80053 6.14829 9.01026 6.26072 9.18755 6.41207L8.66216 6.95692C8.5627 6.84449 8.43729 6.76017 8.28595 6.70395C8.13892 6.64341 7.98974 6.61314 7.83839 6.61314V7.92339C8.00271 7.97528 8.16703 8.03582 8.33135 8.105C8.49567 8.17419 8.6427 8.26284 8.77242 8.37094C8.90647 8.47473 9.01458 8.60229 9.09674 8.75364C9.1789 8.90499 9.21998 9.09093 9.21998 9.31146C9.21998 9.53632 9.18106 9.73524 9.10323 9.90821C9.02971 10.0769 8.9281 10.2196 8.79837 10.3363C8.67297 10.4487 8.52594 10.5352 8.3573 10.5958C8.19298 10.6563 8.02001 10.6887 7.83839 10.6931V11.1601H7.48813V10.6931C7.20273 10.6844 6.92814 10.6325 6.66436 10.5374C6.40491 10.4379 6.1714 10.2887 5.96383 10.0898L6.53463 9.54497C6.65139 9.68335 6.79841 9.79794 6.97571 9.88875C7.153 9.97523 7.32381 10.0206 7.48813 10.025V8.58499C7.29786 8.5331 7.12057 8.47473 6.95625 8.40986C6.79192 8.34067 6.64706 8.25419 6.52166 8.15041C6.40058 8.04663 6.30545 7.92339 6.23626 7.78069C6.16707 7.63366 6.13248 7.45637 6.13248 7.24881C6.13248 7.05422 6.16924 6.88125 6.24275 6.7299C6.32058 6.57423 6.4222 6.44234 6.54761 6.33423C6.67733 6.22612 6.8222 6.1418 6.98219 6.08126C7.14651 6.0164 7.31516 5.97748 7.48813 5.96451V5.52344H7.83839V5.95154ZM7.48813 6.61314C7.33678 6.63044 7.20273 6.68666 7.08597 6.78179C6.96922 6.87692 6.91084 7.01962 6.91084 7.20989C6.91084 7.39151 6.96489 7.52988 7.073 7.62501C7.18543 7.71582 7.32381 7.78501 7.48813 7.83258V6.61314ZM7.83839 10.025C8.02001 10.0163 8.16487 9.95145 8.27297 9.83037C8.3854 9.70929 8.44162 9.55146 8.44162 9.35687C8.44162 9.1666 8.38324 9.0239 8.26649 8.92877C8.15406 8.82931 8.01136 8.74931 7.83839 8.68877V10.025Z\"\n                fill=\"#575B65\"/>\n        </svg>\n    )\n}\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport { useValidateOffer } from \"../../../../../data/api/arccos/arccos-api.mts\";\nimport {\n  useShouldIncludeLink,\n  useShouldIncludeSensors,\n} from \"../../../../../data/redux/slices/offers/offers-slice.mjs\";\nimport {\n  AddressElement,\n  PaymentElement,\n  CheckoutProvider,\n  useCheckout,\n  ExpressCheckoutElement,\n} from \"@stripe/react-stripe-js\";\nimport {\n  StripeAddressElementChangeEvent,\n  StripeExpressCheckoutElementConfirmEvent,\n  StripePaymentElementChangeEvent,\n  StripeCheckoutConfirmResult,\n} from \"@stripe/stripe-js\";\nimport { Loading } from \"../../../../common-components/loading/loading.tsx\";\nimport \"./stripe.css\";\nimport {\n  useOfferKey,\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n} from \"../../../../../data/api/query/offers.mjs\";\nimport { stripePromise } from \"../../../../../app/main/routes/routes.tsx\";\nimport { AgeDisclaimer } from \"../../payment-components\";\nimport { CreditCardMark } from \"../credit-card/credit-card-mark.tsx\";\nimport { ArccosError } from \"../../../../../util/arccos-error.mjs\";\nimport { getEmail } from \"../../../../../data/url/query-params.mjs\";\nimport { getUserId } from \"../../../../../data/auth-cookies/auth-cookies.ts\";\nimport { fireAddPaymentInfo } from \"../../../../../data/server-analytics/fire-mid-funnel.mts\";\nimport { generateAddPaymentInfoEventId } from \"../../../../../util/conversion-event-id.mts\";\nimport { useWrappedFetchClientSecret, useUpdateCheckoutSessionMetadata } from \"../../../../../util/stripe-prefetch-utils.ts\";\nimport { getPartnerFromWindowLocation } from \"../../../../../util/partner-selectors.mjs\";\nimport { analytics } from \"../../../../../analytics/analytics.mjs\";\nimport { getIsAlpsNext } from \"../../../../../util/alps-experiment.mts\";\n\nconst AddressValidationErrors = {\n  MAX_REDEMPTIONS_FOR_ADDRESS: \"max redemptions for this address\",\n  NO_MATCH: \"no matching addresses\",\n  MAX_REDEMPTIONS_FOR_THIS_OFFER_AND_ADDRESS:\n    \"Maximum 1 redemption(s) per address for this offer\",\n};\n\ntype ValidationErrorHandlerParams = {\n  offerValidationResponse: any;\n  setError: (error: ArccosError) => void;\n  setIsSubmitting: (isSubmitting: boolean) => void;\n  isExpressCheckout?: boolean;\n};\n\nconst handleValidationErrors = ({\n  offerValidationResponse,\n  setError,\n  setIsSubmitting,\n  isExpressCheckout = false,\n}: ValidationErrorHandlerParams): boolean => {\n  if (offerValidationResponse.valid === false) {\n    if (offerValidationResponse.addressErrors) {\n      // Check if all address errors are ambiguous - if so, allow user to proceed\n      const hasNonAmbiguousErrors = offerValidationResponse.addressErrors.some(\n        (error) => !error.toLowerCase().includes(\"ambiguous\"),\n      );\n\n      if (hasNonAmbiguousErrors) {\n        if (\n          offerValidationResponse.addressErrors.includes(\n            AddressValidationErrors.MAX_REDEMPTIONS_FOR_ADDRESS,\n          ) ||\n          offerValidationResponse.addressErrors.includes(\n            AddressValidationErrors.MAX_REDEMPTIONS_FOR_THIS_OFFER_AND_ADDRESS,\n          )\n        ) {\n          setError(\n            new ArccosError({\n              message:\n                \"This offer is limited to one redemption per household. If you feel you've reached this error by mistake, please contact starter@arccosgolf.com\",\n              name: \"ArccosValidationError\",\n              actionUrl: `mailto:starter@arccosgolf.com?subject=${encodeURIComponent(\"Order Limit Error\")}`,\n              actionText: \"Contact Starter\",\n            }),\n          );\n        } else if (\n          offerValidationResponse.addressErrors.includes(\n            AddressValidationErrors.NO_MATCH,\n          )\n        ) {\n          const message = isExpressCheckout\n            ? \"We couldn't verify your address. If using express checkout, confirm your address is correct with that vendor, or choose credit card to enter it manually.\"\n            : \"We couldn't verify your address. Please confirm your address has been entered correctly.\";\n\n          setError(\n            new ArccosError({\n              message,\n              name: \"ArccosValidationError\",\n              actionUrl: `mailto:starter@arccosgolf.com?subject=${encodeURIComponent(\"Address Verification Error\")}`,\n              actionText: \"Contact Starter\",\n            }),\n          );\n        } else {\n          setError(\n            new ArccosError({\n              message: offerValidationResponse.validationErrors?.join(\", \"),\n              name: \"ArccosValidationError\",\n            }),\n          );\n        }\n        setIsSubmitting(false);\n        return false;\n      }\n    }\n\n    const unhandledValidationErrors =\n      offerValidationResponse.validationErrors?.filter(\n        (error) => ![\"INVALID_ADDRESS\"].includes(error),\n      ) || [];\n\n    // Check for other validation errors (non-address)\n    if (unhandledValidationErrors.length > 0) {\n      setError(\n        new ArccosError({\n          message: unhandledValidationErrors.join(\", \"),\n          name: \"ArccosValidationError\",\n        }),\n      );\n      setIsSubmitting(false);\n      return false;\n    }\n  }\n\n  // Return true if validation passed or only had ambiguous address errors\n  return true;\n};\n\nexport const Stripe: React.FC<{ setError: (error: ArccosError) => void }> = ({\n  setError,\n}) => {\n  const fetchClientSecret = useWrappedFetchClientSecret();\n  const [isLoading, setIsLoading] = useState(true);\n  const isLinkAddOnActivated = useShouldIncludeLink();\n  const isSensorAddonActivated = useShouldIncludeSensors();\n  const [checkoutKey, setCheckoutKey] = useState(0);\n  const isSmartLaserPreorder = useSelectedLineItems().some((l) =>\n    l.key.includes(\"smart_laser\"),\n  );\n  const isLinkProTrial =\n    useSelectedLinkGen2LineItem()?.charge_type === \"SCHEDULED\" &&\n    !isSmartLaserPreorder;\n  const isAlpsNext = getIsAlpsNext();\n  const offerKey = useOfferKey();\n  const hasRecurringLineItem = useSelectedLineItems().some(\n    (l) => l.charge_type === \"RECURRING\",\n  );\n\n  console.log(\"[STRIPE-COMPONENT] Stripe component rendered with state:\", {\n    hasFetchClientSecret: !!fetchClientSecret,\n    isLoading,\n    isLinkAddOnActivated,\n    isSensorAddonActivated,\n    checkoutKey,\n    isSmartLaserPreorder,\n    isLinkProTrial,\n    offerKey,\n    timestamp: Date.now(),\n  });\n\n  // Track Stripe payment page view and perform initial validation\n  useEffect(() => {\n    analytics.track(\"stripe_payment_page_viewed\", {\n      property: JSON.stringify({\n        partner: getPartnerFromWindowLocation(),\n        isLinkAddOnActivated,\n        isSensorAddonActivated,\n        isSmartLaserPreorder,\n        isLinkProTrial,\n        offerKey,\n      }),\n    });\n  }, []);\n\n  // Force CheckoutProvider to remount when Link or Sensor selection changes\n  useEffect(() => {\n    console.log(\"[STRIPE-COMPONENT] CheckoutProvider remount triggered\", {\n      isLinkAddOnActivated,\n      isSensorAddonActivated,\n      previousCheckoutKey: checkoutKey,\n      newCheckoutKey: checkoutKey + 1,\n      timestamp: Date.now(),\n    });\n\n    setCheckoutKey((prev) => prev + 1);\n    setIsLoading(true);\n\n    analytics.track(\"stripe_checkout_remounted\", {\n      property: JSON.stringify({\n        partner: getPartnerFromWindowLocation(),\n        isLinkAddOnActivated,\n        isSensorAddonActivated,\n        reason: \"addon_selection_changed\",\n      }),\n    });\n  }, [isLinkAddOnActivated, isSensorAddonActivated]);\n\n  if (!fetchClientSecret || !stripePromise) {\n    console.log(\"[STRIPE-COMPONENT] Missing dependencies, showing loading:\", {\n      hasFetchClientSecret: !!fetchClientSecret,\n      hasStripePromise: !!stripePromise,\n    });\n    return (\n      <div className={`credit-card-fields stripe`}>\n        <Loading className={\"credit-card-fields-loader\"} />\n      </div>\n    );\n  }\n  return (\n    <div className={`credit-card-fields stripe`}>\n      <AgeDisclaimer includeSubscriptionCondition={hasRecurringLineItem} />\n      {isLoading && (\n        <div className=\"credit-card-fields-loader-wrapper provider\">\n          <Loading className={\"credit-card-fields-loader\"} />\n          <p>Loading payment options...</p>\n        </div>\n      )}\n      <CheckoutProvider\n        key={checkoutKey}\n        stripe={stripePromise}\n        options={{\n          fetchClientSecret,\n        }}\n      >\n        <StripeCheckoutForm\n          onReady={() => {\n            console.log(\"[STRIPE-COMPONENT] StripeCheckoutForm ready\");\n            setIsLoading(false);\n          }}\n          setError={setError}\n        />\n      </CheckoutProvider>\n    </div>\n  );\n};\n\ntype Address = {\n  address: {\n    line1: string;\n    line2: string;\n    city: string;\n    state: string;\n    postal_code: string;\n    country: string;\n  };\n};\n\nconst StripeCheckoutForm: React.FC<{\n  onReady: () => void;\n  setError: (error: ArccosError) => void;\n}> = ({ onReady, setError }) => {\n  const checkout = useCheckout();\n  const isAlpsNext = getIsAlpsNext();\n  const isReferral = getPartnerFromWindowLocation() === \"referrals\";\n  const [isAddressReady, setIsAddressReady] = useState(false);\n  const [isPaymentReady, setIsPaymentReady] = useState(false);\n  const [isExpressCheckoutReady, setIsExpressCheckoutReady] = useState(false);\n  const [hasExpressCheckoutOptions, setHasExpressCheckoutOptions] =\n    useState(false);\n  const [isAddressComplete, setIsAddressComplete] = useState(false);\n  const [isPaymentComplete, setIsPaymentComplete] = useState(false);\n  const validateOffer = useValidateOffer();\n  const offerKey = useOfferKey();\n  const [visiblePaymentElementType, setVisiblePaymentElementType] = useState<\n    \"card\" | \"google_pay\" | \"apple_pay\" | string\n  >(null);\n\n  console.log(\"[STRIPE-FORM] StripeCheckoutForm rendered with state:\", {\n    hasCheckout: !!checkout,\n    isAddressReady,\n    isPaymentReady,\n    isExpressCheckoutReady,\n    isAddressComplete,\n    isPaymentComplete,\n    visiblePaymentElementType,\n    offerKey,\n    timestamp: Date.now(),\n  });\n\n  const isReady = isAddressReady && isPaymentReady;\n\n  const [selectedPaymentMethod, setSelectedPaymentMethod] = useState<\n    \"card\" | \"express\"\n  >(\"express\");\n\n  const [address, setAddress] = useState<Address | null>(null);\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const email = getEmail();\n  const updateSessionMetadata = useUpdateCheckoutSessionMetadata();\n\n  useEffect(() => {\n    console.log(\"[STRIPE-FORM] onReady effect triggered:\", {\n      isReady,\n      isExpressCheckoutReady,\n      isAddressReady,\n      isPaymentReady,\n    });\n    onReady();\n  }, [isReady, onReady, isExpressCheckoutReady]);\n\n  const handleSubmit = useCallback(\n    async (e) => {\n      e.preventDefault();\n\n      analytics.track(\"stripe_payment_submitted\", {\n        property: JSON.stringify({\n          partner: getPartnerFromWindowLocation(),\n          hasAddress: !!address,\n          isAddressComplete,\n          isPaymentComplete,\n          paymentElementType: visiblePaymentElementType,\n          offerKey,\n          email,\n        }),\n      });\n\n      // AddPaymentInfo fire (Meta CAPI parity with sv-activate). Fresh\n      // eventID per submission — each Stripe submit attempt is a\n      // distinct event at Meta (matches the Meta semantics for retries\n      // with a different card).\n      if (offerKey && email) {\n        const apiEventId = generateAddPaymentInfoEventId();\n        analytics.track(\"AddPaymentInfo\", { eventID: apiEventId });\n        fireAddPaymentInfo({\n          eventId: apiEventId,\n          email,\n          userId: getUserId() || \"\",\n          offerKey,\n          paymentMethod: visiblePaymentElementType ?? undefined,\n          partner: getPartnerFromWindowLocation() || undefined,\n        }).catch(() => {});\n      }\n\n      setIsSubmitting(true);\n      const offerValidationResponse = await validateOffer({\n        email,\n        offerKey: offerKey,\n        address: {\n          address1: address?.address.line1,\n          address2: address?.address.line2,\n          city: address?.address.city,\n          state: address?.address.state,\n          zip: address?.address.postal_code,\n          country: address?.address.country,\n        },\n      });\n      const shouldProceed = handleValidationErrors({\n        offerValidationResponse,\n        setError,\n        setIsSubmitting,\n        isExpressCheckout: false,\n      });\n\n      if (!shouldProceed) {\n        analytics.track(\"stripe_payment_validation_failed\", {\n          property: JSON.stringify({\n            partner: getPartnerFromWindowLocation(),\n            validationErrors:\n              offerValidationResponse.valid === false\n                ? offerValidationResponse.validationErrors\n                : undefined,\n            addressErrors:\n              offerValidationResponse.valid === false\n                ? offerValidationResponse.addressErrors\n                : undefined,\n            offerKey,\n          }),\n        });\n        return;\n      }\n\n      // Customer ID handling is now managed by the useCustomerIdFromValidation hook\n      // The checkout session will automatically use the customer-specific client secret\n      // when a customer_id is present in the validation response\n\n      // If validation passed or only had ambiguous address errors, proceed with normal checkout\n      let confirmResult: any;\n      try {\n        confirmResult = await checkout.confirm();\n      } catch (e) {\n        console.error(\"Error confirming checkout\", JSON.stringify(e));\n        try {\n          confirmResult = await checkout.confirm({\n            email,\n          });\n        } catch (retryErr) {\n          // Both confirm calls failed (e.g. Stripe IntegrationError when an\n          // Express Checkout Element is active and the user submits the\n          // regular form). Surface to the user instead of leaving an\n          // unhandled rejection (UCAP-SITES-EJ).\n          console.error(\"Retry confirming checkout failed\", JSON.stringify(retryErr));\n          const stripeMessage = retryErr instanceof Error ? retryErr.message : String(retryErr);\n          analytics.track(\"stripe_payment_failed\", {\n            property: JSON.stringify({\n              partner: getPartnerFromWindowLocation(),\n              error: stripeMessage,\n              errorType: (retryErr as { type?: string })?.type,\n              paymentElementType: visiblePaymentElementType,\n              offerKey,\n              stage: \"confirm_threw\",\n            }),\n          });\n          setError(\n            new ArccosError({\n              message: \"We couldn't complete your payment. Please try again or choose a different payment method.\",\n              name: \"paymentError\",\n            }),\n          );\n          setIsSubmitting(false);\n          return;\n        }\n      }\n      if (confirmResult?.type === \"error\") {\n        analytics.track(\"stripe_payment_failed\", {\n          property: JSON.stringify({\n            partner: getPartnerFromWindowLocation(),\n            error: confirmResult?.error?.message,\n            errorType: confirmResult?.error?.type,\n            paymentElementType: visiblePaymentElementType,\n            offerKey,\n          }),\n        });\n        setError(\n          new ArccosError({\n            message: confirmResult?.error?.message,\n            name: \"paymentError\",\n          }),\n        );\n      }\n      setIsSubmitting(false);\n    },\n    [\n      checkout,\n      address,\n      validateOffer,\n      offerKey,\n      email,\n      isAddressComplete,\n      isPaymentComplete,\n      visiblePaymentElementType,\n    ],\n  );\n\n  const handleExpressCheckoutElementConfirm = useCallback(\n    async (event: StripeExpressCheckoutElementConfirmEvent) => {\n      const address = event.shippingAddress;\n\n      analytics.track(\"stripe_express_checkout_submitted\", {\n        property: JSON.stringify({\n          partner: getPartnerFromWindowLocation(),\n          hasShippingAddress: !!address,\n          offerKey,\n          email,\n        }),\n      });\n\n      setIsSubmitting(true);\n      const offerValidationResponse = await validateOffer({\n        email,\n        offerKey: offerKey,\n        // When no shipping address is collected (e.g. no-shipping offers via Apple Pay),\n        // omit the address field entirely so the backend skips address validation.\n        // Sending address:{} with all-undefined fields serializes to {} and fails LocalValidator.\n        address: address ? {\n          address1: address.address.line1,\n          address2: address.address.line2,\n          city: address.address.city,\n          state: address.address.state,\n          zip: address.address.postal_code,\n          country: address.address.country,\n        } : undefined,\n      });\n      const shouldProceed = handleValidationErrors({\n        offerValidationResponse,\n        setError,\n        setIsSubmitting,\n        isExpressCheckout: true,\n      });\n\n      if (!shouldProceed) {\n        analytics.track(\"stripe_express_checkout_validation_failed\", {\n          property: JSON.stringify({\n            partner: getPartnerFromWindowLocation(),\n            validationErrors:\n              offerValidationResponse.valid === false\n                ? offerValidationResponse.validationErrors\n                : undefined,\n            addressErrors:\n              offerValidationResponse.valid === false\n                ? offerValidationResponse.addressErrors\n                : undefined,\n            offerKey,\n          }),\n        });\n        return;\n      }\n\n      // Customer ID handling is now managed by the useCustomerIdFromValidation hook\n      // The checkout session will automatically use the customer-specific client secret\n      // when a customer_id is present in the validation response\n      // Check if email from getEmail() differs from billing details email\n      // Note: The billing details email should be available in event.billingDetails.email\n      const clientEmail = email;\n      const billingEmail = event.billingDetails?.email;\n\n      if (clientEmail && clientEmail !== billingEmail) {\n        // Try to get session ID from the checkout session\n        try {\n          const sessionId = checkout?.id;\n          if (sessionId) {\n            await updateSessionMetadata(sessionId, {\n              from_client_entered_email: clientEmail,\n            });\n            console.debug(\n              \"Updated checkout session with client-entered email:\",\n              clientEmail,\n            );\n          } else {\n            console.error(\n              \"Could not access checkout session ID for metadata update\",\n            );\n          }\n        } catch (updateError) {\n          console.error(\n            \"Failed to update checkout session with client email:\",\n            updateError,\n          );\n        }\n      }\n\n      // If validation passed or only had ambiguous address errors, proceed with checkout\n      let confirmResult: any;\n      try {\n        confirmResult = await checkout.confirm({\n          expressCheckoutConfirmEvent: event,\n        });\n      } catch (e) {\n        console.error(\"Error confirming checkout\", JSON.stringify(e));\n        try {\n          confirmResult = await checkout.confirm({\n            expressCheckoutConfirmEvent: event,\n            email,\n          });\n        } catch (retryErr) {\n          // Both confirm calls failed — surface to the user instead of\n          // leaving an unhandled rejection.\n          console.error(\"Retry confirming express checkout failed\", JSON.stringify(retryErr));\n          const stripeMessage = retryErr instanceof Error ? retryErr.message : String(retryErr);\n          analytics.track(\"stripe_express_checkout_failed\", {\n            property: JSON.stringify({\n              partner: getPartnerFromWindowLocation(),\n              error: stripeMessage,\n              errorType: (retryErr as { type?: string })?.type,\n              offerKey,\n              stage: \"confirm_threw\",\n            }),\n          });\n          setError(\n            new ArccosError({\n              message: \"We couldn't complete your payment. Please try again or choose a different payment method.\",\n              name: \"paymentError\",\n            }),\n          );\n          setIsSubmitting(false);\n          return;\n        }\n      }\n      if (confirmResult?.type === \"error\") {\n        analytics.track(\"stripe_express_checkout_failed\", {\n          property: JSON.stringify({\n            partner: getPartnerFromWindowLocation(),\n            error: confirmResult?.error?.message,\n            errorType: confirmResult?.error?.type,\n            offerKey,\n          }),\n        });\n        setError(\n          new ArccosError({\n            message: confirmResult?.error?.message,\n            name: \"paymentError\",\n          }),\n        );\n      }\n      setIsSubmitting(false);\n    },\n    [checkout, address, validateOffer, offerKey, email, updateSessionMetadata],\n  );\n\n  const handleAddressElementChange = useCallback(\n    (event: StripeAddressElementChangeEvent) => {\n      setAddress(event.value);\n      setIsAddressComplete(event.complete);\n    },\n    [],\n  );\n\n  const handlePaymentElementChange = useCallback(\n    (event: StripePaymentElementChangeEvent) => {\n      setIsPaymentComplete(event.complete);\n      setVisiblePaymentElementType(event.value.type);\n    },\n    [],\n  );\n\n  return (\n    <form onSubmit={handleSubmit} id=\"payment-form\">\n      {!isExpressCheckoutReady && (\n        <div className=\"credit-card-fields-loader-wrapper\">\n          <Loading className={\"credit-card-fields-loader express\"} />\n          <p>Loading payment options...</p>\n        </div>\n      )}\n      <div\n        className=\"express-checkout-wrapper\"\n        style={!hasExpressCheckoutOptions ? { display: \"none\" } : undefined}\n      >\n        <ExpressCheckoutElement\n          onConfirm={handleExpressCheckoutElementConfirm}\n          onReady={({ availablePaymentMethods }) => {\n            setIsExpressCheckoutReady(true);\n            setHasExpressCheckoutOptions(\n              !!availablePaymentMethods &&\n                Object.values(availablePaymentMethods).some(Boolean),\n            );\n          }}\n          options={{\n            layout: {\n              maxRows: 0,\n              maxColumns: 1,\n              overflow: \"auto\",\n            },\n          }}\n        />\n      </div>\n\n      <div\n        className={`credit-card-fields-wrapper ${selectedPaymentMethod === \"card\" ? \"active\" : \"\"}`}\n      >\n        <div\n          className=\"credit-card-fields-header\"\n          onClick={() => setSelectedPaymentMethod(\"card\")}\n        >\n          <div\n            className={`credit-card-radio ${selectedPaymentMethod === \"card\" ? \"selected\" : \"\"}`}\n          />\n          <CreditCardMark className=\"payment-method-icon\" />\n          <p>Credit Card</p>\n        </div>\n\n        <div className=\"credit-card-fields-content\">\n          {!isReady && <Loading className={\"credit-card-fields-loader card\"} />}\n          <AddressElement\n            options={{\n              mode: \"shipping\",\n            }}\n            onReady={() => {\n              setIsAddressReady(true);\n            }}\n            onChange={handleAddressElementChange}\n          />\n          <div className={\"spacer\"} />\n          <PaymentElement\n            options={{\n              layout: {\n                type: \"accordion\",\n                defaultCollapsed: false,\n              },\n              wallets: {\n                applePay: \"auto\",\n                googlePay: \"auto\",\n              },\n            }}\n            onReady={() => {\n              setIsPaymentReady(true);\n            }}\n            onChange={handlePaymentElementChange}\n          />\n        </div>\n      </div>\n\n      <div className={\"spacer\"} />\n\n      <button\n        type=\"submit\"\n        className={`submit-button${isAlpsNext ? \" alps-next\" : \"\"}`}\n        disabled={\n          isSubmitting ||\n          ((!isAddressComplete || !isPaymentComplete) &&\n            visiblePaymentElementType === \"card\")\n        }\n      >\n        {isSubmitting ? (\n          <>\n            <Loading className={\"payment-loading\"} />\n            <span className=\"submit-button-text\">Processing...</span>\n          </>\n        ) : (\n          isReferral ? \"ACTIVATE MEMBERSHIP\" : \"START FREE TRIAL\"\n        )}\n      </button>\n    </form>\n  );\n};\n","import React from \"react\";\nimport { localize, TextContent } from \"../../../../lang/localized-content.mts\";\nimport { CheckoutIcon, type CheckoutIconName } from \"../../alps-next/components/checkout-icon/checkout-icon.tsx\";\nimport {\n  useFormatPrice,\n  useShouldIncludeLink,\n  useShouldIncludeSensors,\n} from \"../../../../data/redux/slices/offers/offers-slice.mts\";\nimport {\n  useSelectedCompletionKitLineItem,\n  useSelectedLineItems,\n  useTrialPeriodDays,\n} from \"../../../../data/api/query/offers.mts\";\nimport { LinkOffer } from \"../link/link-offer.tsx\";\n\ntype Product = {\n  key: string;\n  title: TextContent;\n  icon: string;\n  body?: TextContent;\n  label?: TextContent;\n  bullet_points?: TextContent[];\n};\n\nexport const AlpsNextLineItem: React.FC<{\n  product: Product;\n  buttonAction?: () => void;\n}> = ({ product, buttonAction }) => {\n  const lineItems = useSelectedLineItems();\n  const lineItem = lineItems?.find((lineItem) => lineItem.key === product.key);\n  const trialPeriodDays = useTrialPeriodDays();\n  const isLinkAddOnActivated = useShouldIncludeLink();\n  const isCKOptional =\n    useSelectedCompletionKitLineItem()?.is_required === false;\n  const isSensorAddonActivated = useShouldIncludeSensors();\n  const isSmartLaserPreorder = lineItems.some((l) =>\n    l.key.includes(\"smart_laser\"),\n  );\n  const selectedSmartLaserSubscriptionKey = new URLSearchParams(\n    window.location.search,\n  ).get(\"selectedOption\");\n\n  const isProductLink = [\"link_pro\", \"link_gen_2\"].includes(lineItem?.key);\n  const isLinkProTrialLineItem =\n    isProductLink &&\n    lineItem?.charge_type === \"SCHEDULED\" &&\n    !isSmartLaserPreorder;\n\n  if (\n    (lineItem?.key === \"completion_kit\" &&\n      isCKOptional &&\n      !isSensorAddonActivated) ||\n    lineItem?.key === \"shipping_and_handling\" ||\n    (isProductLink && !isLinkAddOnActivated && !isLinkProTrialLineItem) ||\n    (isSmartLaserPreorder &&\n      lineItem?.key !== selectedSmartLaserSubscriptionKey &&\n      lineItem?.item_group === \"smart_laser_preorder\")\n  ) {\n    return null;\n  }\n\n  if (isLinkProTrialLineItem) {\n    return (\n      <LinkOffer\n        buttonAction={buttonAction}\n        isAlpsNext={true}\n        className=\"linkoffer-alps-next\"\n      />\n    );\n  }\n\n  return (\n    <div className={`product-bc`}>\n      <div className=\"product-icon-wrapper\">\n        <CheckoutIcon name={product.key as CheckoutIconName} />\n      </div>\n      <div className=\"product-meta\">\n        <div className={\"product-title\"}>\n          {localize(product.title, {\n            values: {\n              trial_period_days: trialPeriodDays?.toString(),\n            },\n          })}\n        </div>\n        {product.bullet_points && (\n          <div className={\"product-details\"}>\n            <ul className={\"product-details-list\"}>\n              {product.bullet_points?.map((bulletPoint, index) => (\n                <li key={index}>{localize(bulletPoint)}</li>\n              ))}\n            </ul>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n};\n","import React from \"react\";\nimport {\n  useSelectedLineItems,\n  useTrialPeriodDays,\n} from \"../../../../data/api/query/offers.mjs\";\nimport { AlpsNextLineItem } from \"./alps-next-line-item.tsx\";\n\nconst alpsNextPaymentProducts = [\n  {\n    key: \"subscription\",\n    title: {\n      en: \"Automatic Game Tracking\",\n    },\n    icon: \"arccos_circled\",\n    body: {\n      en: \"FREE\",\n      ja: \"無料\",\n      ko: \"무료\",\n    },\n    bullet_points: [\n      { en: \"Strokes gained insights\" },\n      { en: \"Club-by-club performance analysis\" },\n    ],\n  },\n  {\n    key: \"strategy\",\n    title: {\n      en: \"AI Strategy & Green Maps\",\n    },\n    icon: \"arccos_circled\",\n    body: {\n      en: \"FREE\",\n      ja: \"無料\",\n      ko: \"무료\",\n    },\n    bullet_points: [\n      { en: \"Precise plan for every hole using your data\" },\n      { en: \"LiDAR green maps for ~10,000 courses\" },\n    ],\n  },\n  {\n    key: \"link_pro\",\n    title: {\n      en: \"Arccos Air ({discount} Off)\",\n    },\n    icon: \"https://cdn.arccosgolf.com/images/activation/shared/LinkPro-3.webp\",\n    label: {\n      en: \"Learn More\",\n    },\n  },\n  {\n    key: \"shipping_and_handling\",\n    title: {\n      en: \"Shipping & Handling\",\n      ja: \"の送料手数料\",\n      ko: \"배송 및 취급 수수료\",\n    },\n    icon: \"https://cdn.arccosgolf.com/images/icons/skillest-small.webp\",\n    body: {\n      en: \"FREE\",\n      ja: \"無料\",\n      ko: \"무료\",\n    },\n  },\n];\n\nexport const AlpsNextProductDetails: React.FC<{\n  setShouldShowLinkProPopup: (shouldShow: boolean) => void;\n}> = ({ setShouldShowLinkProPopup }) => {\n  const lineItems = useSelectedLineItems();\n  const trialPeriodDays = useTrialPeriodDays();\n  const offerLineItemKeys = new Set(lineItems?.map((item) => item.key) ?? []);\n  const visibleProducts = alpsNextPaymentProducts.filter(\n    (product) =>\n      product.key === \"subscription\" ||\n      product.key === \"strategy\" ||\n      offerLineItemKeys.has(product.key),\n  );\n\n  return (\n    <>\n      <div className=\"content\">\n        <div className=\"order-summary\">\n          <p className=\"eyebrow\">What's Included</p>\n          <label className=\"order-summary-label\">\n            Arccos {trialPeriodDays}-Day Free Trial\n          </label>\n          <div className=\"sub-headline\">\n            <p>Stop guessing. Start knowing and shoot lower scores.</p>\n            <p>Cancel anytime during your trial.</p>\n          </div>\n\n          <div className=\"products\">\n            {visibleProducts.map((product) => (\n              <AlpsNextLineItem\n                key={product.key}\n                product={product}\n                buttonAction={() => setShouldShowLinkProPopup(true)}\n              />\n            ))}\n          </div>\n        </div>\n      </div>\n    </>\n  );\n};\n","import React, { useEffect, useRef, useState } from \"react\";\nimport \"./payment.css\";\nimport \"../../lib/typography.css\";\nimport {\n  getDynamicContentPaymentLabel,\n  getDynamicContentPaymentSubtitle,\n  getDynamicContentPaymentTitle,\n} from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport {\n  useIsCKOptional,\n  useOfferKey,\n  useSelectedLineItems,\n  useSelectedLinkGen2LineItem,\n  useSelectedSubscriptionLineItem,\n  useTrialPeriodDays,\n} from \"../../../data/api/query/offers.mjs\";\nimport { getUserId } from \"../../../data/auth-cookies/auth-cookies.ts\";\nimport { getPartnerFromWindowLocation } from \"../../../util/partner-selectors.mjs\";\nimport { fireInitiateCheckout } from \"../../../data/server-analytics/fire-mid-funnel.mts\";\nimport { getOrCreateICEventId } from \"../../../util/conversion-event-id.mts\";\nimport {\n  useCurrency,\n  useShouldIncludeLink,\n  useShouldIncludeSensors,\n} from \"../../../data/redux/slices/offers/offers-slice.mjs\";\nimport { ArccosError } from \"../../../util/arccos-error.mjs\";\nimport { useDispatch } from \"react-redux\";\nimport { getEmail } from \"../../../data/url/query-params.mjs\";\nimport {\n  setCountry,\n  setEmail,\n} from \"../../../data/redux/slices/address/address-slice\";\nimport { getDefaultCountryForCurrency } from \"./shipping-utils\";\nimport { LinkOffer } from \"./link/link-offer.tsx\";\nimport { SensorAddon } from \"./sensor-addon.tsx\";\nimport { analytics } from \"../../../analytics/analytics.mjs\";\nimport { Stripe } from \"./payment-methods/stripe/stripe.tsx\";\nimport {\n  PaymentPageModals,\n  ProductDetails,\n  Ck14ProductDetails,\n  Disclaimer,\n} from \"./payment-components\";\nimport { AlpsNextProductDetails } from \"./payment-components/alps-next-product-details.tsx\";\nimport { getIsAlpsNext, getIsCk14Experience } from \"../../../util/alps-experiment.mts\";\n\ndeclare global {\n  interface Window {\n    MSStream: any;\n  }\n}\n\nconst getIsDeviceCutlassEligible = () => {\n  // const partner = getPartnerFromWindowLocation()\n  //\n  // if (partner !== 'taylormade' || isSensorlessDomain()) return false\n  //\n  // var userAgent = navigator.userAgent\n  //\n  // if (/iPhone/.test(userAgent) && !window.MSStream) {\n  //     console.log('is iphone')\n  //     const match = userAgent.match(/iPhone OS (\\d+)/)\n  //\n  //     if (match?.[1]) {\n  //         const version = parseInt(match[1], 10)\n  //         console.log('version: ', version)\n  //         // Redirect if the iPhone is iPhone 11 or earlier\n  //         if (version > 13) { // iPhone 11 is on iOS 13 and below\n  //             return true\n  //         }\n  //     }\n  // }\n  return false;\n};\n\nexport const Payment: React.FC = () => {\n  const dispatch = useDispatch();\n  const currency = useCurrency();\n  const lineItems = useSelectedLineItems();\n  const [error, setError] = useState<ArccosError>();\n\n  const defaultCountry = getDefaultCountryForCurrency(currency);\n\n  const email = getEmail();\n\n  useEffect(() => {\n    dispatch(setCountry(defaultCountry));\n    dispatch(setEmail(email));\n  }, [dispatch, defaultCountry, email]);\n\n  // ─── InitiateCheckout fire — Meta CAPI parity with sv-activate ─────────\n  // Fires once per offer when /payment mounts. Browser pixel + server\n  // CAPI share the same eventID (sessionStorage keyed by offerKey so\n  // re-mounts of /payment for the same offer dedupe at Meta).\n  const offerKey = useOfferKey();\n  const subscriptionPrice =\n    useSelectedSubscriptionLineItem()?.actual_price || 0;\n  const trialPeriodDays = useTrialPeriodDays();\n  const icSubtotal =\n    lineItems\n      .filter(\n        (l) => l.charge_type === \"INITIAL\" && l.key !== \"shipping_and_handling\",\n      )\n      .reduce((sum, l) => sum + l.actual_price, 0) +\n    (trialPeriodDays ? 0 : subscriptionPrice);\n  // Read userId outside the effect so it participates in the dependency\n  // array — if the access_token cookie isn't set on first render but\n  // populates on a later one, the effect should re-run and fire IC then.\n  // Without this, the early-return on missing userId could permanently\n  // skip the fire if no other dep changed.\n  const userId = getUserId() || \"\";\n  const hasFiredIC = useRef(false);\n  useEffect(() => {\n    if (hasFiredIC.current) return;\n    if (!offerKey || !email || !userId) return;\n    const icEventId = getOrCreateICEventId(offerKey);\n    analytics.track(\"InitiateCheckout\", { eventID: icEventId });\n    fireInitiateCheckout({\n      eventId: icEventId,\n      email,\n      userId,\n      offerKey,\n      value: icSubtotal,\n      currency: currency || \"USD\",\n      partner: getPartnerFromWindowLocation() || undefined,\n    }).catch(() => {});\n    hasFiredIC.current = true;\n  }, [offerKey, email, userId, icSubtotal, currency]);\n\n  const isCKOptional = useIsCKOptional();\n  const isSensorAddonActivated = useShouldIncludeSensors();\n\n  const [shouldShowSensorlessPopup, setShouldShowSensorlessPopup] = useState(\n    getIsDeviceCutlassEligible(),\n  );\n  const [shouldShowLinkProPopup, setShouldShowLinkProPopup] = useState(false);\n\n  const isSmartLaserPreorder = lineItems.some((l) =>\n    l.key.includes(\"smart_laser\"),\n  );\n  const selectedSmartLaserSubscriptionKey = new URLSearchParams(\n    window.location.search,\n  ).get(\"selectedOption\");\n  const selectedSmartLaserSubscription = lineItems.find(\n    (l) => l.key === selectedSmartLaserSubscriptionKey,\n  );\n\n  // Check if this is a Arccos Air trial offer\n  const linkLineItem = useSelectedLinkGen2LineItem();\n  const isLinkProTrial =\n    linkLineItem?.charge_type === \"SCHEDULED\" && !isSmartLaserPreorder;\n\n  const shouldIncludeLink = useShouldIncludeLink();\n  const previousShouldIncludeLink = useRef(shouldIncludeLink);\n\n  useEffect(() => {\n    if (previousShouldIncludeLink.current !== shouldIncludeLink) {\n      analytics.track(\"link_pro_selection_change\", {\n        isSelected: shouldIncludeLink,\n      });\n    }\n    previousShouldIncludeLink.current = shouldIncludeLink;\n  }, [shouldIncludeLink]);\n\n  const prevShouldShowLinkProPopup = useRef(shouldShowLinkProPopup);\n  useEffect(() => {\n    if (prevShouldShowLinkProPopup.current !== shouldShowLinkProPopup) {\n      analytics.track(\"link_pro_popup_displayed_change\", {\n        isDisplayed: shouldShowLinkProPopup,\n      });\n    }\n    prevShouldShowLinkProPopup.current = shouldShowLinkProPopup;\n  }, [shouldShowLinkProPopup]);\n\n  useEffect(() => {\n    if (isSmartLaserPreorder) {\n      analytics.track(\"smart_laser_preorder_selected\", {\n        property: JSON.stringify(selectedSmartLaserSubscription),\n      });\n    }\n  }, [isSmartLaserPreorder, selectedSmartLaserSubscription]);\n\n  const isAlpsNext = getIsAlpsNext();\n  const isCK14 = getIsCk14Experience();\n\n  return (\n    <div className={`payment${isCK14 ? ' ck14-payment' : ''}`}>\n      <PaymentPageModals\n        shouldShowSensorlessPopup={shouldShowSensorlessPopup}\n        shouldShowLinkProPopup={shouldShowLinkProPopup}\n        isLinkProTrial={isLinkProTrial}\n        error={error}\n        setShouldShowSensorlessPopup={setShouldShowSensorlessPopup}\n        setShouldShowLinkProPopup={setShouldShowLinkProPopup}\n        setError={setError}\n      />\n      {isCK14 ? (\n        <Ck14ProductDetails setShouldShowLinkProPopup={setShouldShowLinkProPopup} />\n      ) : isAlpsNext ? (\n        <AlpsNextProductDetails\n          setShouldShowLinkProPopup={setShouldShowLinkProPopup}\n        />\n      ) : (\n        <ProductDetails\n          titleContent={getDynamicContentPaymentTitle()}\n          labelContent={getDynamicContentPaymentLabel()}\n          bodyContent={getDynamicContentPaymentSubtitle()}\n          isCKOptional={isCKOptional}\n          isSensorAddonActivated={isSensorAddonActivated}\n          setShouldShowLinkProPopup={setShouldShowLinkProPopup}\n        />\n      )}\n      {!isLinkProTrial && !isCK14 && (\n        <LinkOffer buttonAction={() => setShouldShowLinkProPopup(true)} />\n      )}\n      <SensorAddon />\n      <Stripe setError={setError} />\n      <Disclaimer />\n    </div>\n  );\n};\n","import React, { useEffect } from \"react\";\nimport \"./success.css\";\nimport {\n  getPartnerFromWindowLocation,\n  isSensorlessDomain,\n} from \"../../../util/partner-selectors.mjs\";\nimport { localize } from \"../../../lang/localized-content.mjs\";\nimport {\n  getDynamicContentSuccessBackgroundImage,\n  getDynamicContentSuccessDesktopBackgroundImage,\n  getDynamicContentSuccessHeader,\n  getDynamicContentSuccessSubheader,\n  getDynamicSuccessContent,\n} from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport { analytics } from \"../../../analytics/analytics.mjs\";\nimport { useShouldUseAlpsExperiment } from \"../../../util/alps-experiment.mjs\";\nimport {\n  useOfferKey,\n  useSelectedLineItems,\n  useSelectedSubscriptionLineItem,\n  useTrialPeriodDays,\n} from \"../../../data/api/query/offers.mts\";\nimport { sendImpactConversion } from \"../../../data/impact/send-impact-conversion.mts\";\nimport { fireServerAnalyticsSuccess } from \"../../../data/server-analytics/fire-server-analytics.mts\";\nimport { getEmail } from \"../../../data/url/query-params.mjs\";\nimport { getUserId } from \"../../../data/auth-cookies/auth-cookies.ts\";\nimport { useCurrency } from \"../../../data/redux/slices/offers/offers-slice.mts\";\nimport { getOrCreateConversionEventId } from \"../../../util/conversion-event-id.mts\";\n\nconst appStoreButton =\n  \"https://cdn.arccosgolf.com/images/activation/universal-flow/app-store-button.svg\";\nconst googlePlayButton =\n  \"https://cdn.arccosgolf.com/images/activation/universal-flow/google-play-button.png\";\n\nconst getConversionEventId = () => {\n  const partner = getPartnerFromWindowLocation();\n  switch (partner) {\n    case \"ping\": {\n      return \"AW-941090723/pCD5COr4r6AYEKPP38AD\";\n    }\n    case \"taylormade\": {\n      if (isSensorlessDomain()) {\n        return \"AW-941090723/_VKpCJP4g8UZEKPP38AD\";\n      }\n      return \"AW-941090723/H9TxCNSPuqAYEKPP38AD\";\n    }\n    case \"dunlopsports\": {\n      return \"AW-941090723/K56UCLinraAYEKPP38AD\";\n    }\n    default: {\n      return undefined;\n    }\n  }\n};\n\nconst getAlpsTestSuccessDynamicContent = (partner?: string) => {\n  const isAffiliate = partner === \"affiliate\";\n  return {\n    header: {\n      en: \"You are ready for the Smart Play\",\n    },\n    subheader: {\n      en: \"Welcome to Arccos\",\n    },\n    body: {\n      en: \"Your Arccos Air is on its way! Download the Arccos app to start setting up your account.\",\n    },\n    background_image: isAffiliate\n      ? \"https://cdn.arccosgolf.com/images/activation/alps/alps-success-bg.webp\"\n      : \"https://cdn.arccosgolf.com/images/activation/taylormade/arccos-golfer-white-hat-swinging-mobile.webp\",\n    desktop_background_image: isAffiliate\n      ? \"https://cdn.arccosgolf.com/images/activation/alps/alps-success-bg-desktop.webp\"\n      : \"https://cdn.arccosgolf.com/images/activation/taylormade/arccos-golfer-white-hat-swinging-desktop.webp\",\n  };\n};\n\nconst linkProTrialSuccessDynamicContent = {\n  header: {\n    en: \"Your Arccos Air is on its way!\",\n  },\n  subheader: {\n    en: \"\",\n  },\n  body: {\n    en: \"The next generation of smarter shot tracking is about to be in your pocket.\",\n  },\n  background_image:\n    \"https://cdn.arccosgolf.com/images/activation/alps/alps-success-bg.webp\",\n  desktop_background_image:\n    \"https://cdn.arccosgolf.com/images/activation/alps/alps-success-bg-desktop.webp\",\n};\n\nconst useSuccessDynamicContent = () => {\n  const partner = getPartnerFromWindowLocation();\n  const isAlpsTest = useShouldUseAlpsExperiment();\n  if (partner === \"link-pro\") {\n    return linkProTrialSuccessDynamicContent;\n  }\n  if (isAlpsTest) {\n    return getAlpsTestSuccessDynamicContent(partner);\n  }\n  return {\n    header: getDynamicContentSuccessHeader(),\n    subheader: getDynamicContentSuccessSubheader(),\n    body: getDynamicSuccessContent()?.body,\n    background_image: getDynamicContentSuccessBackgroundImage(),\n    desktop_background_image: getDynamicContentSuccessDesktopBackgroundImage(),\n  };\n};\n\nexport const Success: React.FC = () => {\n  const offerKey = useOfferKey();\n  const currency = useCurrency();\n  const lineItems = useSelectedLineItems();\n  const subscriptionPrice =\n    useSelectedSubscriptionLineItem()?.actual_price || 0;\n  const trialPeriodDays = useTrialPeriodDays();\n  const subtotal =\n    lineItems\n      .filter(\n        (l) => l.charge_type === \"INITIAL\" && l.key !== \"shipping_and_handling\",\n      )\n      .reduce((sum, l) => sum + l.actual_price, 0) +\n    (trialPeriodDays ? 0 : subscriptionPrice);\n  useEffect(() => {\n    let conversionEventId = getConversionEventId();\n    console.debug(\"conversionEventId\", conversionEventId);\n    if (conversionEventId) {\n      analytics.track(\"conversion\", {\n        properties: {\n          send_to: conversionEventId,\n        },\n      });\n    }\n\n    // Browser-owned Meta event_id, shared with the server CAPI fire below\n    // so Meta dedupes the pair on the legacy dataset (1485154478460843).\n    // Keyed by Stripe session — success-page reloads in the same tab\n    // reuse the id so reloads collapse to a single conversion at Meta.\n    const stripeSessionId =\n      new URLSearchParams(window.location.search).get(\"session_id\") ?? \"\";\n    const partner = getPartnerFromWindowLocation();\n    const metaEventId = stripeSessionId\n      ? getOrCreateConversionEventId(stripeSessionId)\n      : \"\";\n\n    // Browser Pixel fire — `eventID` is forwarded by the in-repo\n    // facebook-pixel plugin (src/analytics/analytics.mts) to fbq's 4th\n    // arg, which is what Meta uses for browser↔server dedup.\n    analytics.track(\"CompleteRegistration\", { eventID: metaEventId });\n\n    // Fire activation_successful event for GTM conversion tracking\n    // This event is required by GTM trigger \"CAP Activation - Success - ALL CAP SITES\"\n    analytics.track(\"activation_successful\");\n\n    // Impact.com affiliate conversion tracking\n    sendImpactConversion({\n      userId: getUserId() || \"\",\n      email: getEmail() || \"\",\n      offerKey: offerKey || \"\",\n      currency: currency || \"USD\",\n      subtotal,\n    }).catch(() => {}); // fire-and-forget, errors handled inside sendImpactConversion\n\n    analytics.track(\"stripe_payment_successful\", {\n      property: JSON.stringify({\n        partner: partner,\n        offerKey: offerKey,\n      }),\n      eventID: metaEventId,\n    });\n\n    // Server-side analytics fanout — Meta CAPI (CompleteRegistration +\n    // StartTrial × 2 datasets) + Snowplow. Fire-and-forget; the handler\n    // awaits all downstream fetches before returning so no Lambda-freeze\n    // risk. Skips when stripeSessionId is missing (defensive — should\n    // always be present on the Stripe success redirect).\n    if (stripeSessionId && metaEventId && offerKey) {\n      fireServerAnalyticsSuccess({\n        stripeSessionId,\n        eventId: metaEventId,\n        email: getEmail() || \"\",\n        userId: getUserId() || \"\",\n        offerKey,\n        value: subtotal,\n        currency: currency || \"USD\",\n        trialPeriodDays: trialPeriodDays ?? 0,\n        partner: partner || undefined,\n      }).catch(() => {});\n    }\n  }, [offerKey, currency, subtotal, trialPeriodDays]);\n\n  const partner = getPartnerFromWindowLocation();\n  const isAlpsTest = useShouldUseAlpsExperiment();\n  const {\n    header,\n    subheader,\n    body,\n    background_image,\n    desktop_background_image,\n  } = useSuccessDynamicContent();\n  const headerText = localize(header);\n  const subheaderText = localize(subheader);\n  const bodyText = localize(body);\n\n  const mobileBackgroundImage = background_image;\n  const desktopBackgroundImage = desktop_background_image;\n\n  return (\n    <>\n      <div\n        className={`background-image-container mobile ${isAlpsTest ? \"alps-test\" : partner}`}\n      >\n        <img\n          src={mobileBackgroundImage}\n          alt={\"\"}\n          className={\"background-image mobile\"}\n        />\n      </div>\n      <div className={\"background-image-container desktop\"}>\n        <img\n          src={desktopBackgroundImage}\n          alt={\"\"}\n          className={\"background-image desktop\"}\n        />\n      </div>\n      <div className={`success ${isAlpsTest ? \"alps-test\" : \"\"}`}>\n        <h3 className={\"subheading\"}>{subheaderText}</h3>\n        <h2 className={\"heading\"}>{headerText}</h2>\n        {!!bodyText && <p className={\"body\"}>{bodyText}</p>}\n        {![\"smart-laser\", \"link-pro\"].includes(partner) && (\n          <div className={\"button-container\"}>\n            <a\n              href={\"https://apps.apple.com/us/app/arccos/id841396631\"}\n              target={\"_blank\"}\n              rel={\"noreferrer\"}\n            >\n              <img\n                src={appStoreButton}\n                alt={\"app store\"}\n                className={\"store-button\"}\n              />\n            </a>\n            <a\n              href={\n                \"https://play.google.com/store/apps/details?id=com.arccosgolf.androidFlagship&hl=en_US&pli=1\"\n              }\n              target={\"_blank\"}\n              rel={\"noreferrer\"}\n            >\n              <img\n                src={googlePlayButton}\n                alt={\"google play\"}\n                className={\"store-button\"}\n              />\n            </a>\n          </div>\n        )}\n      </div>\n    </>\n  );\n};\n","import React, {useEffect} from 'react'\nimport {useDispatch} from 'react-redux'\nimport {Navigate, Route, Routes as RouterRoutes, useLocation, Location} from 'react-router'\nimport {loadStripe, Stripe} from '@stripe/stripe-js'\n\nimport {analytics} from '../../../analytics/analytics.mjs'\nimport {useOfferKey, useSelectedLinkGen2LineItem} from '../../../data/api/query/offers.mjs'\nimport {getStatsigUserStableID} from '../../../data/initial-state/intial-state-accessors.mjs'\nimport {clearTokens} from '../../../data/redux/slices/auth/auth-slice.mjs'\nimport {useRefreshToken} from '../../../data/redux/slices/auth/auth-selectors.mjs'\nimport {useCurrency} from '../../../data/redux/slices/offers/offers-slice.mjs'\nimport {useShouldUseAlpsExperiment, getIsAlpsNext, getIsCk14Experience, getIsVintageExperience} from '../../../util/alps-experiment.mts'\nimport {useLogRocket} from '../../../util/logrocket-hook.mts'\nimport {getPageNameFromUrl, isOnPage, Page, useNavigate} from '../../../util/navigation.mjs'\nimport {getPartnerFromWindowLocation} from '../../../util/partner-selectors.mjs'\nimport {useWrappedFetchClientSecret} from '../../../util/stripe-prefetch-utils.ts'\nimport {NoOffersAvailable} from '../../no-offers/no-offers-available'\nimport {AlpsLandingPage} from '../../pages/alps-landing-page/alps-landing-page.tsx'\nimport {AlpsLandingPageGeneric} from '../../pages/alps-landing-page/alps-landing-page-generic.tsx'\nimport {AlpsNextLandingPage} from '../../pages/alps-next'\nimport {AlpsNextSuccess} from '../../pages/alps-next/components/success/alps-next-success'\nimport {NucapLandingPage} from '../../pages/nucap-landing-page/nucap-landing-page.tsx'\nimport {NucapLandingPageV2} from '../../pages/nucap-landing-page/v2/nucap-landing-page-v2.tsx'\nimport {Payment} from '../../pages/payment/payment'\nimport {Success} from '../../pages/success/success'\n\nimport './routes.css'\n\nexport let stripePromise: Promise<Stripe | null> = loadStripe(import.meta.env.CLIENT_STRIPE_KEY)\n\ntype RoutesProps = {\n    location: Location;\n    transitionStage: string;\n    onAnimationEnd: () => void;\n}\n\nconst useLandingPageComponent = () => {\n    const partner = getPartnerFromWindowLocation()\n    const shouldUseAlpsExperiment = useShouldUseAlpsExperiment()\n    const shouldUseAlpsNext = getIsAlpsNext()\n    const isCK14 = getIsCk14Experience();\n    const isVintage = getIsVintageExperience();\n    const getShouldShowHeroImage = () => {\n        return ![\n            'cobra',\n            'dunlopsports',\n            'easports',\n            'taylormade',\n            'titleist',\n            'clubchampion',\n            'skillest',\n            'clubchampion-instore',\n            'referrals',\n        ].includes(partner)\n    }\n    if (isVintage) {\n        return <NucapLandingPageV2 />\n    }\n    if (shouldUseAlpsNext || isCK14) {\n        return <AlpsNextLandingPage />\n    }\n    if (shouldUseAlpsExperiment) {\n        if (partner === 'affiliate') {\n            return <AlpsLandingPage />\n        } else {\n            return <AlpsLandingPageGeneric />\n        }\n    }\n    return getShouldShowHeroImage() ? <NucapLandingPageV2 /> : <NucapLandingPage />\n}\n\nexport const Routes: React.FC<RoutesProps> = ({ location: displayLocation, transitionStage, onAnimationEnd }) => {\n    const currency = useCurrency()\n    const partner = getPartnerFromWindowLocation()\n    const location = useLocation()\n    const stableId = getStatsigUserStableID()\n    const offerKey = useOfferKey()\n    const linkLineItem = useSelectedLinkGen2LineItem()\n    const disableAnimations = false\n    const isPaymentPage = displayLocation.pathname.includes('payment')\n    const isAlpsNext = getIsAlpsNext()\n    const isCK14 = getIsCk14Experience()\n    const isVintage = getIsVintageExperience()\n    const isLinkProTrial = linkLineItem?.charge_type === 'SCHEDULED';\n\n    useLogRocket()\n\n    useEffect(() => {\n        if (stableId) {\n            console.log('tracking STATSIG_STABLE_ID_CREATED', stableId)\n            analytics.track('STATSIG_STABLE_ID_CREATED', {\n                action: 'STATSIG_STABLE_ID_CREATED',\n                category: 'All',\n                property: stableId,\n                isCustom: true,\n            })\n        }\n    }, [stableId])\n\n    useEffect(() => {\n        console.log('tracking PAGE_VIEW', location.pathname)\n        analytics.page({\n            path: location.pathname,\n            search: location.search,\n            title: document.title,\n            url: window.location.href,\n            referrer: document.referrer,\n            width: `${window.innerWidth}`,\n            height: `${window.innerHeight}`,\n        })\n        const queryParams = Object.fromEntries(\n            new URLSearchParams(location.search).entries(),\n        )\n\n        analytics.track('route_change', {\n            property: JSON.stringify({\n                partner,\n                stableId,\n                funnel_step: getPageNameFromUrl(window.location.href),\n                path: location.pathname,\n                title: document.title,\n                url: window.location.href,\n                referrer: document.referrer,\n                paymentFlow: 'stripe',\n                isAlpsNext,\n                offerKey,\n                ...queryParams,\n            })\n        })\n    }, [location])\n\n    useEffect(() => {\n        analytics.track('payment_flow_assigned', {\n            property: JSON.stringify({\n                paymentFlow: 'stripe',\n                partner,\n                currency,\n                offerKey,\n                isLinkProTrial,\n            }),\n            isCustom: true,\n        })\n    }, [offerKey, isLinkProTrial, currency])\n\n    const routePrefixes = ['/', '/:partner']\n    const dispatch = useDispatch()\n\n    useEffect(() => {\n        if (isOnPage(Page.LANDING_PAGE))\n            dispatch(clearTokens())\n    }, []);\n\n    // prefetch client secrets for different cart configurations\n    const prefetchFunction = useWrappedFetchClientSecret()\n    console.log('[ROUTES] Prefetch function status:', {\n        hasPrefetchFunction: !!prefetchFunction,\n        timestamp: Date.now()\n    })\n\n    const LandingPageComponent = useLandingPageComponent()\n\n    return (\n        <div\n            className={`routes ${disableAnimations ? '' : transitionStage} ${isPaymentPage ? 'payment-page' : ''} ${isAlpsNext ? 'alps-next' : ''} ${isCK14 ? 'ck14' : ''} ${isVintage ? 'vintage' : ''}`}\n            onAnimationEnd={onAnimationEnd}\n        >\n            <RouterRoutes location={displayLocation}>\n                {routePrefixes\n                    .map(prefix => `${prefix}/`)\n                    .map((path) => (\n                        <Route\n                            key={path}\n                            path={path}\n                            element={(\n                                <Wrapper doesRequireOffer={partner !== 'za'}>\n                                    {LandingPageComponent}\n                                </Wrapper>\n                            )}\n                        />\n                    ))}\n                {routePrefixes\n                    .map(prefix => `${prefix}/payment`)\n                    .map((path) => (\n                        <Route\n                            key={path}\n                            path={path}\n                            element={(\n                                <Wrapper doesRequireOffer doesRequireRefreshToken={partner !== 'smart-laser'}>\n                                    <Payment/>\n                                </Wrapper>\n                            )}\n                        />\n                    ))}\n                {routePrefixes\n                    .map(prefix => `${prefix}/success`)\n                    .map((path) => (\n                        <Route\n                            key={path}\n                            path={path}\n                            element={(\n                                <Wrapper>\n                                    {(isAlpsNext || isCK14) ? <AlpsNextSuccess /> : <Success />}\n                                </Wrapper>\n                            )}\n                        />\n                    ))}\n                {partner === 'ping' && (\n                    <Route\n                        path='/qr2021'\n                        element={<Navigate to={{pathname: '/ping', search: '?qr=true'}}/>}\n                    />\n                )}\n                <Route\n                    path=\"*\"\n                    element={<Navigate to={`/${window.location.search}`}/>}\n                />\n            </RouterRoutes>\n        </div>\n    )\n}\n\ntype WrapperProps = {\n    doesRequireOffer?: boolean\n    doesRequireRefreshToken?: boolean\n    children: React.ReactNode\n}\n\nconst Wrapper: React.FC<WrapperProps> = (props) => {\n    const {\n        doesRequireOffer = false,\n        doesRequireRefreshToken = false,\n        children,\n    } = props\n\n    const offerKey = useOfferKey()\n    const refreshToken = useRefreshToken()\n    const navigate = useNavigate()\n    const location = useLocation()\n    useEffect(() => {\n        console.log({\n            offerKey,\n            refreshToken,\n            pathname: location.pathname,\n        })\n        if (doesRequireRefreshToken && !refreshToken && location.pathname !== Page.LANDING_PAGE) {\n            console.log('navigating away')\n            navigate({to: Page.LANDING_PAGE})\n        }\n    }, [refreshToken, doesRequireRefreshToken, navigate, location.pathname])\n\n    if (doesRequireOffer && !offerKey) {\n        return (\n            <NoOffersAvailable/>\n        )\n    }\n\n    return children\n}\n","import React, { createContext, useContext } from 'react'\nimport { Location } from 'react-router-dom'\n\ninterface TransitionContextType {\n    displayLocation: Location\n}\n\nconst TransitionContext = createContext<TransitionContextType | undefined>(undefined)\n\nexport const TransitionProvider: React.FC<{\n    displayLocation: Location\n    children: React.ReactNode\n}> = ({ displayLocation, children }) => {\n    return (\n        <TransitionContext.Provider value={{ displayLocation }}>\n            {children}\n        </TransitionContext.Provider>\n    )\n}\n\nexport const useTransitionContext = () => {\n    const context = useContext(TransitionContext)\n    if (!context) {\n        throw new Error('useTransitionContext must be used within a TransitionProvider')\n    }\n    return context\n}","import React from 'react'\nimport './mask.css'\n\nexport const Mask: React.FC = () => {\n    return (\n        <div className={'mask'}/>\n    )\n}\n","import {useEffect} from \"react\";\nimport {analytics} from \"./analytics.mjs\";\nimport {useUserId} from \"../data/redux/slices/auth/auth-selectors.mjs\";\n\ndeclare global {\n    interface Window {\n        fbq?: (type: string, event: string, data?: any) => void\n    }\n}\n\nexport const useIdentifyUser = () => {\n    const userId = useUserId()\n    useEffect(() => {\n        analytics.identify(userId, {\n            userId,\n        })\n    }, [userId])\n}\n","import React, {ComponentProps} from 'react'\n\ntype CaratProps = {\n    direction?: 'left' | 'right' | 'up' | 'down'\n} & ComponentProps<'svg'>\n\nexport const Carat: React.FC<CaratProps> = ({direction = 'down', ...restProps}) => {\n\n    let rotationAmount: number\n    switch (direction) {\n        case 'left':\n            rotationAmount = 90\n            break\n        case 'right':\n            rotationAmount = -90\n            break\n        case 'up':\n            rotationAmount = 180\n            break\n        case 'down':\n            rotationAmount = 0\n            break\n    }\n    return (\n        <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            viewBox=\"0 0 10 7\"\n            fill=\"none\"\n            style={{transform: `rotate(${rotationAmount}deg)`}}\n            {...restProps}\n        >\n            <path\n                d=\"M1 1L5 5L9 1\"\n                stroke=\"#90E178\"\n                strokeWidth=\"1.5\"\n                strokeLinecap=\"round\"\n            />\n        </svg>\n    )\n}\n","import React from 'react'\nimport './footer.css'\nimport {Carat} from \"../svg-components/carat.tsx\";\nimport {getPathPartnerFromWindowLocation, isSensorlessDomain} from \"../../../util/partner-selectors.mjs\";\n\nconst getMailToLink = () => {\n    const partner = getPathPartnerFromWindowLocation()\n\n    if (partner === 'smart-laser') {\n        return `mailto:starter@arccosgolf.com?subject=Smart%20Laser%20Pre-Order%20Inquiry`\n    }\n\n    return `mailto:starter@arccosgolf.com?subject=Activation%20Inquiry`\n}\n\nexport const Footer: React.FC = () => {\n    return (\n        <div className={'footer'}>\n            <div className={'content-wrapper'}>\n                <div className={'copyright'}>\n                    © Arccos Golf, LLC 2025\n                </div>\n                <div className={'questions'}>\n                    Questions about the program?\n                </div>\n                <div className={'link-wrapper'}>\n                    <div className={'contact-link-wrapper'}>\n                        {isSensorlessDomain() && (<a\n                            className={'contact-link'}\n                            target={'_blank'}\n                            href={'https://www.arccosgolf.com/pages/arccos-members-frequently-asked-questions'}\n                        >\n                            <div className={'contact-text'}>\n                                FAQs\n                            </div>\n                            <Carat className={'carat-svg'} direction={'right'}/>\n                        </a>)}\n                        <a\n                            className={'contact-link'}\n                            href={getMailToLink()}\n                        >\n                        <div className={'contact-text'}>\n                                Contact Us\n                            </div>\n                            <Carat className={'carat-svg'} direction={'right'}/>\n                        </a>\n                    </div>\n                </div>\n            </div>\n        </div>\n    )\n}\n","import React from \"react\";\nimport styles from \"./footer.module.css\";\n\nexport default function AlpsNextFooter() {\n  return (\n    <footer className={styles.footer}>\n      <div className={styles.content}>\n        <div className={styles.lockup}>\n          <picture>\n            <source\n              srcSet=\"https://cdn.arccosgolf.com/images/activation/alps-bc/footer-lockup.webp 1x, https://cdn.arccosgolf.com/images/activation/alps-bc/footer-lockup@2x.webp 2x\"\n              type=\"image/webp\"\n            />\n            <img\n              className=\"footer-tour-lockup\"\n              src=\"https://cdn.arccosgolf.com/images/activation/alps-bc/footer-lockup.webp\"\n              alt=\"Arccos Official Partner of the PGA Tour\"\n            />\n          </picture>\n        </div>\n        <div className={styles.contact}>\n          <span>© 2026 Arccos Golf LLC</span>\n          <span>|</span>\n          <a href=\"mailto:starter@arccosgolf.com\">Contact Us</a>\n        </div>\n      </div>\n    </footer>\n  );\n}\n","import React from \"react\";\nimport { useLocation } from \"react-router\";\nimport { Footer } from \"../common-components/footer/footer.tsx\";\nimport { getIsAlpsNext, getIsCk14Experience } from \"../../util/alps-experiment.mts\";\nimport AlpsNextFooter from \"../pages/alps-next/components/footer/footer\";\n\nexport const ConditionalFooterManager: React.FC = () => {\n  const isAlpsNext = getIsAlpsNext();\n  const isCK14 = getIsCk14Experience();\n  const location = useLocation();\n  const isSuccessPage = location.pathname.includes('/success');\n\n  if (isAlpsNext || isCK14) {\n    if (isSuccessPage) return null;\n    return <AlpsNextFooter />;\n  }\n\n  return <Footer />;\n};\n","import {RootState, useSelector} from \"../../createStore.mjs\";\n\nexport const useModalComponent = () => useSelector((state: RootState) => state.modal.modalComponent)\n\nexport const useModalProps = () => useSelector((state: RootState) => state.modal.modalProps)\n","import React, { useEffect } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport './modal.css'\nimport {useModalComponent, useModalProps} from \"../../../data/redux/slices/modal/modal-selectors.mjs\";\nimport {closeModalAction} from \"../../../data/redux/slices/modal/modal-slice.mjs\";\n\nconst keys = { 37: 1, 38: 1, 39: 1, 40: 1 }\n\nconst preventDefault = e => {\n    e.preventDefault();\n}\n\nconst preventDefaultForScrollKeys  = (e: KeyboardEvent) => {\n    if (keys[e.keyCode]) {\n        preventDefault(e);\n    }\n}\n\n\n// call this to Disable\n// Note: disables scrolling in modals as well.\nexport function disableScroll() {\n    document.addEventListener('DOMMouseScroll', preventDefault, false); // older FF\n    document.addEventListener('wheel', preventDefault, { passive: false }); // modern desktop\n    document.addEventListener('touchmove', preventDefault, { passive: false }); // mobile\n    document.addEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\n// call this to Enable\nfunction enableScroll() {\n    document.removeEventListener('DOMMouseScroll', preventDefault, false);\n    document.removeEventListener('wheel', preventDefault);\n    document.removeEventListener('touchmove', preventDefault);\n    document.removeEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\n\nconst useDisableScrolling = (shouldDisable: boolean) => {\n    useEffect(() => {\n        if (shouldDisable) {\n            const [body] = document.getElementsByTagName('body')\n            const [html] = document.getElementsByTagName('html')\n            body.className = 'no-scroll'\n            html.className = 'no-scroll'\n            // disableScroll()\n        }\n        return () => {\n            const [body] = document.getElementsByTagName('body')\n            const [html] = document.getElementsByTagName('html')\n            body.className = ''\n            html.className = ''\n            enableScroll()\n        }\n    }, [shouldDisable])\n}\n\nexport const Modal: React.FC = () => {\n    const dispatch = useDispatch()\n    const ModalComponent = useModalComponent()\n    const modalProps = useModalProps()\n\n    useDisableScrolling(!!ModalComponent)\n\n    if (!ModalComponent) {\n        return null\n    }\n\n    const closeModal = () => {\n        if (modalProps?.closeModal) {\n            modalProps.closeModal()\n        }\n        dispatch(closeModalAction())\n    }\n\n    return (\n        <div className={`global-modal ${modalProps?.className || ''}`}>\n            <div\n                className='global-background-mask'\n                onClick={closeModal}\n            />\n            <div className='global-modal-content' style={{}}>\n                <button className={`modal-close-button`} onClick={closeModal}>\n                    &times;\n                </button>\n                {/* @ts-ignore */}\n                <ModalComponent\n                    closeModal={closeModal}\n                    {...modalProps}\n                />\n            </div>\n        </div>\n    )\n}\n","import React, {useState} from 'react'\nimport './cookie-consent.css'\nimport {\n    getHasExplicitlyAcceptedTracking,\n    getIsTrackingDisabled,\n    setHasExplicitlyAcceptedTracking,\n} from \"../../data/local-storage/local-storage.mjs\";\nimport {disableTracking} from \"../../analytics/analytics.mjs\";\n\nexport const CookieConsent: React.FC = () => {\n    console.log('getIsTrackingDisabled', getIsTrackingDisabled())\n    console.log('getHasExplicitlyAcceptedTracking', getHasExplicitlyAcceptedTracking())\n    const [isOpen, setIsOpen] = useState(!getIsTrackingDisabled() && !getHasExplicitlyAcceptedTracking())\n    if (!isOpen) {\n        return null\n    }\n    return (\n        <div className={'cookie-consent'}>\n            <div className={'text-container'}>\n                <span className={'text'}>\n                    This website uses cookies to enhance your user experience and ensure you get the most relevant advertising. We may also share information about your use of our site with our social media, advertising, and analytics partners. You can opt out by clicking \"Decline.\"\n                </span>\n                <a\n                    className={'privacy-policy-link'}\n                    href={'https://www.arccosgolf.com/pages/privacy-policy'}\n                    target={'_blank'}\n                >\n                    Privacy Policy\n                </a>\n            </div>\n            <div className={'button-container'}>\n                <button\n                    type={'button'}\n                    className={'button accept'}\n                    onClick={() => {\n                        setHasExplicitlyAcceptedTracking(true);\n                        setIsOpen(false);\n                    }}\n                >\n                    Accept\n                </button>\n                <button\n                    type={'button'}\n                    className={'button decline'}\n                    onClick={() => {\n                        disableTracking()\n                        window.location.reload()\n                        setIsOpen(false);\n                    }}\n                >\n                    Decline\n                </button>\n            </div>\n        </div>\n    )\n}\n","import React, { useRef, useEffect } from 'react'\nimport './header.css'\nimport {getDynamicContentHeaderPartnerLogo} from \"../../../data/initial-state/intial-state-accessors.mjs\";\nimport {getPartnerFromWindowLocation, getShouldOfferSkillest} from \"../../../util/partner-selectors.mjs\";\nimport { isOnPage, Page } from '../../../util/navigation.mts';\n\nexport const useSubheader = () => {\n    const shouldOfferSkillest = getShouldOfferSkillest()\n    if (shouldOfferSkillest) {\n        return `Get a Free Lesson Based on Your Swing & Data. Learn More`\n    }\n\n    return undefined\n}\n\nconst scrollToSkillestGiveaway = () => {\n    const element = document.querySelector('.skillest-giveaway-section')\n    if (element) {\n        const headerHeight = getComputedStyle(document.documentElement).getPropertyValue('--header-height')\n        const offset = parseFloat(headerHeight) * window.innerHeight / 100 // Convert vh to pixels\n        const elementPosition = element.offsetTop - offset\n        \n        window.scrollTo({\n            top: elementPosition,\n            behavior: 'smooth'\n        })\n    }\n}\n\nconst PreOrderButton: React.FC = () => {\n    const loopingVideoSectionRef = useRef<HTMLElement>(null)\n    const partner = getPartnerFromWindowLocation()\n    const isSmartLaser = partner === 'smart-laser'\n\n    useEffect(() => {\n        if (isSmartLaser) {\n            // Connect ref to existing DOM element\n            loopingVideoSectionRef.current = document.getElementById('looping-video-section') as HTMLElement\n        }\n    }, [isSmartLaser])\n\n    const handlePreOrderClick = () => {\n        if (loopingVideoSectionRef.current) {\n            loopingVideoSectionRef.current.scrollIntoView({ behavior: 'smooth' })\n        }\n    }\n\n    if (!isSmartLaser) {\n        return null\n    }\n\n    return (\n        <button \n            className={`header-cta-button ${isOnPage(Page.SUCCESS) ? 'hidden' : ''}`} \n            onClick={handlePreOrderClick}\n        >\n            Pre-Order Today\n        </button>\n    )\n}\n\nexport const Subheader: React.FC = () => {\n    const subheader = useSubheader()\n    if (!subheader) {\n        return null\n    }\n\n    return (\n        <button\n            type={'button'}\n            className={'subheader'}\n            onClick={scrollToSkillestGiveaway}\n        >\n            <span>{subheader}</span>\n        </button>\n    )\n}\n\nexport const PartnerHeader: React.FC = () => {\n    const partner = getPartnerFromWindowLocation()\n    if (partner === 'titleist') {\n        return <TitleistHeader/>\n    }\n\n    return (\n        <div className={'arccos-header'}>\n            <div className={'header-logo-wrapper'}>\n                <a className={'header-logo-section'} href=\"https://www.arccosgolf.com\" target=\"_blank\" rel=\"noopener noreferrer\">\n                    <ArccosLogo/>\n                    <PlusIcon/>\n                    <img src={getDynamicContentHeaderPartnerLogo()} alt={''} className={`partner-logo ${partner}`}/>\n                </a>\n                <PreOrderButton />\n            </div>\n            <Subheader/>\n        </div>\n    )\n}\n\nexport const TitleistHeader: React.FC = () => {\n    return (\n        <div className={'arccos-header white'}>\n            <div className={'header-logo-wrapper'}>\n                <img src={getDynamicContentHeaderPartnerLogo()} alt={''} className={`partner-logo`}/>\n            </div>\n            <Subheader/>\n        </div>\n    )\n}\n\nexport const ArccosLogo: React.FC<{textColor?: string}> = ({textColor = 'white'}) => {\n    return (\n        <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 22\" fill=\"none\" className={'arccos-logo'}>\n            <path\n                d=\"M60.783 12.1047C61.797 11.6823 62.3969 10.7739 62.3969 9.62896C62.3969 8.26854 61.421 6.89545 59.2409 6.89545H53.8331V15.0622H55.4639V12.3836H59.0466L60.7788 15.0622H62.68L60.783 12.1047ZM55.4639 8.41641H59.0888C60.1197 8.41641 60.6436 8.822 60.6436 9.62896C60.6436 10.2035 60.4662 10.8626 59.0888 10.8626H55.4639V8.41641Z\"\n                fill={textColor}/>\n            <path\n                d=\"M68.7914 10.9925C68.7914 12.6782 70.3419 13.7302 72.8304 13.7302C74.1781 13.7302 75.5977 13.4218 76.4385 12.9486L76.73 12.7838V14.3682L76.6201 14.4231C75.5639 14.9427 74.2331 15.2174 72.767 15.2174C69.2266 15.2174 67.0254 13.5992 67.0254 10.9925C67.0254 8.3857 69.2266 6.77179 72.767 6.77179C74.195 6.77179 75.4879 7.04641 76.6201 7.59564L76.73 7.64634V9.29828L76.4385 9.13351C75.4752 8.57582 74.1486 8.25895 72.8008 8.25895C70.3293 8.25895 68.7914 9.30673 68.7914 10.9925Z\"\n                fill={textColor}/>\n            <path\n                d=\"M83.0674 10.9925C83.0674 12.6782 84.6137 13.7302 87.1021 13.7302C88.4541 13.7302 89.8694 13.4218 90.7102 12.9486L91.0017 12.7838V14.3682L90.8919 14.4231C89.8399 14.9427 88.5048 15.2174 87.043 15.2174C83.4983 15.2174 81.2971 13.5992 81.2971 10.9925C81.2971 8.3857 83.4983 6.77179 87.043 6.77179C88.4668 6.77179 89.7638 7.04641 90.8919 7.59564L91.0017 7.64634V9.29828L90.7102 9.13351C89.7469 8.57582 88.4203 8.25895 87.0726 8.25895C84.601 8.25895 83.0674 9.30673 83.0674 10.9925Z\"\n                fill={textColor}/>\n            <path\n                d=\"M101.018 6.77179C97.6717 6.77179 95.3353 8.50822 95.3353 10.9925C95.3353 13.4767 97.6717 15.2174 101.018 15.2174C104.364 15.2174 106.696 13.4809 106.696 10.9925C106.696 8.504 104.364 6.77179 101.018 6.77179ZM101.018 13.7302C98.6772 13.7302 97.1056 12.6275 97.1056 10.9925C97.1056 9.35743 98.6772 8.27585 101.018 8.27585C103.358 8.27585 104.93 9.36588 104.93 10.9925C104.93 12.6191 103.358 13.7302 101.018 13.7302Z\"\n                fill={textColor}/>\n            <path\n                d=\"M119.088 14.1664C118.475 14.855 117.275 15.2141 115.628 15.2141C114.474 15.2141 112.784 15.0071 111.504 14.4199L111.39 14.3692V12.8059L111.66 12.9242C112.886 13.4439 114.293 13.7439 115.623 13.727C116.697 13.7227 117.487 13.5242 117.795 13.1735C117.909 13.0468 117.951 12.9116 117.934 12.751C117.867 12.1933 116.718 11.9821 115.602 11.7793L114.935 11.6525C113.186 11.3188 111.204 10.9385 111.132 9.2697C111.107 8.72047 111.28 8.2515 111.644 7.86704C112.548 6.92911 114.386 6.78546 115.404 6.78546C116.633 6.78546 117.757 7.0643 118.492 7.27555L118.636 7.31357V8.84721L118.378 8.75849C117.711 8.5388 116.566 8.27685 115.522 8.27685C113.815 8.27685 112.839 8.59372 112.839 9.14296C112.839 9.76824 114.043 9.97104 115.214 10.1654L115.805 10.2626C117.309 10.5245 119.371 10.8794 119.557 12.5144C119.633 13.1777 119.477 13.7312 119.088 14.1664Z\"\n                fill={textColor}/>\n            <path\n                d=\"M44.4254 6.65015L39.0471 15.0619H40.9103L41.7088 13.8198H47.142L47.9363 15.0619H49.7995L44.4254 6.65015ZM42.6721 12.3115L44.4254 9.56533L46.1788 12.3115H42.6721Z\"\n                fill={textColor}/>\n            <path\n                d=\"M30.8418 3.94993C30.208 3.34155 29.3757 3.03313 28.497 3.08383C26.8873 3.16833 25.6029 4.44425 25.5015 6.04971C25.4593 6.75527 25.6536 7.4566 26.0507 8.03541L20.8837 14.2545L17.3263 6.01168C18.4586 5.44977 19.1599 4.2499 19.0839 2.98243C18.9909 1.37274 17.7066 0.0925978 16.0926 0.00387484C15.2139 -0.0383742 14.3773 0.265819 13.7394 0.86998C13.1014 1.47414 12.7508 2.29377 12.7508 3.17255C12.7508 4.3513 13.4141 5.4371 14.4534 5.98211L10.9383 14.2502L5.79234 8.03119C6.18526 7.45238 6.3796 6.75104 6.33735 6.04548C6.23595 4.44002 4.95158 3.16833 3.3419 3.08383C2.46312 3.03313 1.63081 3.34155 0.992852 3.94993C0.354892 4.55409 0 5.3695 0 6.24828C0 7.99739 1.42379 9.41695 3.1729 9.41695H3.24895L7.86254 20.3594C8.05689 20.82 8.49205 21.1073 8.99059 21.1115C9.48913 21.1115 9.92007 20.8242 10.1186 20.3637L11.3903 17.3724L14.7703 21.4579C15.0491 21.7917 15.4589 21.986 15.8941 21.986H15.8983C16.3335 21.986 16.7433 21.7959 17.0221 21.4579L20.4316 17.3598L21.7287 20.3763C21.9272 20.8326 22.3582 21.1115 22.8609 21.1157C23.3595 21.1157 23.7904 20.8284 23.9848 20.3679L28.6026 9.41695H28.6617C30.4108 9.41695 31.8346 7.99739 31.8346 6.24828C31.8346 5.3695 31.484 4.55409 30.8418 3.94993ZM3.1729 7.83262C2.29835 7.83262 1.58856 7.12283 1.58856 6.24828C1.58856 5.37372 2.29835 4.66394 3.1729 4.66394C4.04746 4.66394 4.75724 5.37372 4.75724 6.24828C4.75724 7.12283 4.04746 7.83262 3.1729 7.83262ZM8.99481 18.8174L5.26 9.96619L10.2158 15.9529L8.99481 18.8174ZM14.3351 3.17255C14.3351 2.298 15.0449 1.58821 15.9194 1.58821C16.794 1.58821 17.5038 2.298 17.5038 3.17255C17.5038 4.0471 16.794 4.75266 15.9194 4.75266C15.0449 4.75266 14.3351 4.04288 14.3351 3.17255ZM15.9617 20.1778C15.9406 20.1989 15.9025 20.2074 15.9025 20.2031C15.8899 20.2031 15.8645 20.2031 15.8434 20.1778L12.117 15.674L15.8856 6.81019L19.7049 15.6698L15.9617 20.1778ZM28.666 7.83262C27.7956 7.83262 27.0816 7.12283 27.0816 6.24828C27.0816 5.37372 27.7956 4.66394 28.666 4.66394C29.5363 4.66394 30.2503 5.37372 30.2503 6.24828C30.2503 7.12283 29.5405 7.83262 28.666 7.83262ZM22.8567 18.83L21.6104 15.9444L26.6084 9.93239L22.8567 18.83Z\"\n                fill=\"#56C271\"/>\n        </svg>\n    )\n}\n\nconst PlusIcon: React.FC = () => {\n    return (\n        <svg viewBox=\"0 0 7 7\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" className={'plus-icon'}>\n            <path\n                d=\"M3.25104 6.23876V3.94775H0.935909V2.59725H3.25104V0.306239H4.62565V2.59725H6.94078V3.94775H4.62565V6.23876H3.25104Z\"\n                fill=\"white\"/>\n        </svg>\n\n    )\n}\n","import React, { useRef, useEffect } from \"react\";\nimport \"./header.css\";\nimport { ArccosLogo } from \"./partner-header.tsx\";\nimport { getPartnerFromWindowLocation } from \"../../../util/partner-selectors.mts\";\nimport { isOnPage, Page } from \"../../../util/navigation.mts\";\n\nconst PreOrderButton: React.FC = () => {\n  const loopingVideoSectionRef = useRef<HTMLElement>(null);\n  const partner = getPartnerFromWindowLocation();\n  const isSmartLaser = partner === \"smart-laser\";\n\n  useEffect(() => {\n    if (isSmartLaser) {\n      // Connect ref to existing DOM element\n      loopingVideoSectionRef.current = document.getElementById(\n        \"looping-video-section\",\n      ) as HTMLElement;\n    }\n  }, [isSmartLaser]);\n\n  const handlePreOrderClick = () => {\n    if (loopingVideoSectionRef.current) {\n      loopingVideoSectionRef.current.scrollIntoView({ behavior: \"smooth\" });\n    }\n  };\n\n  if (!isSmartLaser) {\n    return null;\n  }\n\n  return (\n    <button\n      className={`header-cta-button ${isOnPage(Page.SUCCESS) ? \"hidden\" : \"\"}`}\n      onClick={handlePreOrderClick}\n    >\n      Pre-Order Today\n    </button>\n  );\n};\n\nexport const Header: React.FC<{ lightmode?: boolean }> = ({\n  lightmode = false,\n}) => {\n  return (\n    <div className={`arccos-header${lightmode ? \" white\" : \"\"}`}>\n      <div className={\"header-logo-wrapper\"}>\n        <a\n          className={\"header-logo-section\"}\n          href=\"https://www.arccosgolf.com\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          <ArccosLogo textColor={lightmode ? \"black\" : undefined} />\n        </a>\n        <PreOrderButton />\n      </div>\n    </div>\n  );\n};\n\nexport const ArccosPGALogo: React.FC<{ className: string }> = ({\n  className,\n}) => {\n  return (\n    <svg\n      viewBox=\"0 0 174 38\"\n      fill=\"none\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      className={className}\n    >\n      <path\n        fillRule=\"evenodd\"\n        clipRule=\"evenodd\"\n        d=\"M134.942 2.92188V35.3739H134.098V2.92188H134.942Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M64.1863 20.2667C65.208 19.8445 65.816 18.9241 65.816 17.7672C65.816 16.3992 64.828 15.0059 62.6325 15.0059H57.1774V23.2392H58.824V20.537H62.4383L64.1863 23.2392H66.1031L64.1863 20.2583V20.2667ZM58.824 16.5427H62.4805C63.5191 16.5427 64.0511 16.9481 64.0511 17.7672C64.0511 18.3499 63.8738 19.0085 62.4805 19.0085H58.824V16.5427Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M72.2591 19.1437C72.2591 20.841 73.8213 21.905 76.3293 21.905C77.6889 21.905 79.1244 21.5926 79.9688 21.1197L80.2644 20.9508V22.5468L80.1546 22.6059C79.0906 23.1295 77.748 23.4081 76.2702 23.4081C72.6982 23.4081 70.4773 21.7784 70.4773 19.1437C70.4773 16.509 72.6982 14.8877 76.2702 14.8877C77.7142 14.8877 79.0146 15.1664 80.1546 15.7153L80.2644 15.7659V17.4295L79.9688 17.2606C78.9977 16.6948 77.6551 16.3824 76.304 16.3824C73.8129 16.3824 72.2591 17.4379 72.2591 19.1437Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M86.6569 19.1437C86.6569 20.841 88.2191 21.905 90.7271 21.905C92.0867 21.905 93.5138 21.5926 94.3667 21.1197L94.6622 20.9508V22.5468L94.5525 22.6059C93.4885 23.1295 92.1458 23.4081 90.668 23.4081C87.096 23.4081 84.8751 21.7784 84.8751 19.1437C84.8751 16.509 87.096 14.8877 90.668 14.8877C92.1036 14.8877 93.4125 15.1664 94.5525 15.7153L94.6622 15.7659V17.4295L94.3667 17.2606C93.3956 16.6948 92.0529 16.3824 90.6933 16.3824C88.2022 16.3824 86.6569 17.4379 86.6569 19.1437Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M104.762 14.8877C101.384 14.8877 99.028 16.6357 99.028 19.1437C99.028 21.6517 101.384 23.4081 104.762 23.4081C108.14 23.4081 110.487 21.6601 110.487 19.1437C110.487 16.6273 108.131 14.8877 104.762 14.8877ZM104.762 21.905C102.397 21.905 100.818 20.7904 100.818 19.1437C100.818 17.497 102.406 16.4077 104.762 16.4077C107.118 16.4077 108.705 17.5055 108.705 19.1437C108.705 20.7819 107.118 21.905 104.762 21.905Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M122.993 22.344C122.377 23.0364 121.169 23.3996 119.506 23.3996C118.34 23.3996 116.635 23.1884 115.343 22.5973L115.224 22.5467V20.9676L115.495 21.0858C116.728 21.6093 118.146 21.9133 119.489 21.8964C120.57 21.8964 121.372 21.6938 121.676 21.3391C121.794 21.2124 121.836 21.0773 121.82 20.9169C121.752 20.3511 120.595 20.14 119.464 19.9373L118.788 19.8107C117.023 19.4729 115.022 19.0929 114.954 17.404C114.929 16.8467 115.106 16.3738 115.469 15.9853C116.381 15.0396 118.231 14.896 119.261 14.896C120.502 14.896 121.634 15.1747 122.377 15.3942L122.52 15.4364V16.9818L122.259 16.8889C121.583 16.6693 120.426 16.3991 119.379 16.3991C117.656 16.3991 116.677 16.72 116.677 17.2689C116.677 17.9022 117.893 18.1049 119.075 18.2991L119.675 18.4004C121.195 18.6622 123.272 19.0253 123.458 20.672C123.534 21.3391 123.373 21.8964 122.985 22.3356L122.993 22.344Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M47.6857 14.7607L42.2644 23.2474H44.1475L44.9497 21.9976H50.4302L51.2324 23.2474H53.1155L47.6942 14.7607H47.6857ZM45.9209 20.4692L47.6857 17.6994L49.4506 20.4692H45.9124H45.9209Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M33.9889 12.0502C33.3471 11.4338 32.5027 11.1298 31.616 11.1804C29.9947 11.2649 28.6942 12.5484 28.5929 14.1698C28.5507 14.8791 28.7449 15.5884 29.1502 16.1711L23.94 22.4453L20.3511 14.1275C21.4911 13.5618 22.2004 12.3542 22.1244 11.0706C22.0316 9.44931 20.7311 8.15731 19.1098 8.06442C18.2231 8.0222 17.3787 8.3262 16.7369 8.9342C16.0951 9.5422 15.7404 10.3698 15.7404 11.2564C15.7404 12.4471 16.4076 13.5364 17.4547 14.0938L13.908 22.4369L8.71467 16.1626C9.11156 15.58 9.30578 14.8706 9.26356 14.1613C9.16223 12.54 7.86178 11.2564 6.24045 11.172C5.35378 11.1213 4.51778 11.4338 3.86756 12.0418C3.22578 12.6498 2.86267 13.4773 2.86267 14.364C2.86267 16.1289 4.29823 17.556 6.06311 17.556H6.13912L10.792 28.5929C10.9862 29.0573 11.4253 29.3444 11.932 29.3529C12.4387 29.3529 12.8693 29.0658 13.072 28.6013L14.3556 25.5866L17.7671 29.7075C18.0458 30.0453 18.468 30.2395 18.9071 30.2395C19.3462 30.2395 19.76 30.0453 20.0387 29.7075L23.4756 25.5782L24.7844 28.6182C24.9871 29.0826 25.4178 29.3613 25.9244 29.3613C26.4311 29.3613 26.8618 29.0742 27.056 28.6098L31.7173 17.5644H31.7764C33.5413 17.5644 34.9769 16.1289 34.9769 14.3724C34.9769 13.4858 34.6391 12.6666 33.9889 12.0502ZM6.07156 15.9684C5.19334 15.9684 4.47556 15.2506 4.47556 14.3724C4.47556 13.4942 5.19334 12.7764 6.07156 12.7764C6.94978 12.7764 7.66756 13.4942 7.66756 14.3724C7.66756 15.2506 6.94978 15.9684 6.07156 15.9684ZM11.9404 27.0475L8.17423 18.1218L13.1733 24.1595L11.9404 27.0475ZM17.328 11.2649C17.328 10.3866 18.0458 9.66886 18.924 9.66886C19.8022 9.66886 20.52 10.3866 20.52 11.2649C20.52 12.1431 19.8022 12.8609 18.924 12.8609C18.0458 12.8609 17.328 12.1431 17.328 11.2649ZM18.9662 28.4155C18.9662 28.4155 18.9071 28.4493 18.9071 28.4409C18.8902 28.4409 18.8649 28.4409 18.848 28.4155L15.0902 23.8724L18.8902 14.9298L22.7409 23.864L18.9662 28.4071V28.4155ZM31.7764 15.96C30.8982 15.96 30.1804 15.2422 30.1804 14.364C30.1804 13.4858 30.8982 12.768 31.7764 12.768C32.6547 12.768 33.3724 13.4858 33.3724 14.364C33.3724 15.2422 32.6547 15.96 31.7764 15.96ZM25.916 27.056L24.6578 24.1426L29.6991 18.0795L25.916 27.056Z\"\n        fill=\"#56C271\"\n      />\n      <path\n        d=\"M145.582 31.329C145.582 33.5667 147.398 35.3823 149.635 35.3823H165.207C167.445 35.3823 169.26 33.5667 169.26 31.329V6.90764C169.26 4.66986 167.445 2.8543 165.207 2.90497H149.635C147.398 2.84586 145.582 4.66141 145.582 6.90764V31.329Z\"\n        fill=\"#003A70\"\n      />\n      <path\n        d=\"M149.644 3.77466C147.913 3.77466 146.511 5.17644 146.511 6.90755V31.3289C146.511 33.06 147.913 34.4618 149.644 34.4618H165.216C166.947 34.4618 168.348 33.06 168.348 31.3289V6.90755C168.348 5.17644 166.947 3.77466 165.216 3.77466H149.644Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M149.619 4.2561C148.149 4.2561 146.967 5.44677 146.967 6.90766V31.329C146.967 32.7983 148.158 33.9805 149.619 33.9805H165.19C166.66 33.9805 167.842 32.7899 167.842 31.329V6.90766C167.842 5.43833 166.651 4.2561 165.19 4.2561H149.619Z\"\n        fill=\"#003A70\"\n      />\n      <path\n        d=\"M169.269 34.5209C169.269 34.048 169.657 33.668 170.13 33.668C170.603 33.668 170.983 34.0564 170.983 34.5209C170.983 34.9853 170.603 35.3822 170.13 35.3822C169.657 35.3822 169.269 34.9937 169.269 34.5209ZM170.848 34.5209C170.848 34.1071 170.544 33.7777 170.13 33.7777C169.716 33.7777 169.404 34.1071 169.404 34.5209C169.404 34.9346 169.708 35.2724 170.13 35.2724C170.552 35.2724 170.848 34.9431 170.848 34.5209ZM170.552 35.0022H170.409L170.139 34.5631H169.928V35.0022H169.809V34.0395H170.232C170.485 34.0395 170.569 34.1324 170.569 34.2929C170.569 34.4786 170.434 34.5546 170.265 34.5546L170.552 34.9937V35.0022ZM170.105 34.4702C170.24 34.4702 170.443 34.4955 170.443 34.3013C170.443 34.1493 170.316 34.1324 170.206 34.1324H169.936V34.4702H170.113H170.105Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M150.353 8.45301H150.784C151.02 8.45301 151.215 8.60501 151.215 8.8499C151.215 9.09479 151.012 9.23835 150.716 9.23835H150.353V8.45301ZM149.56 10.2095C149.56 10.3108 149.5 10.3699 149.391 10.3699H149.129V10.7161H150.801V10.3699H150.514C150.404 10.3699 150.345 10.3108 150.345 10.2095V9.59301H150.809C151.586 9.59301 152 9.39035 152 8.8499C152 8.30946 151.586 8.11523 150.894 8.11523H149.12V8.46146H149.382C149.492 8.46146 149.551 8.52057 149.551 8.6219V10.2179L149.56 10.2095Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M155.386 9.67733H155.192C155.082 9.67733 155.023 9.73644 155.023 9.83777V10.7413H154.651L154.559 10.5471C154.314 10.7244 154.001 10.7836 153.723 10.7836C152.836 10.7836 152.219 10.3191 152.219 9.44088C152.219 8.56266 152.819 8.02222 153.723 8.02222C153.967 8.02222 154.271 8.09822 154.483 8.28399L154.567 8.06444H154.947V8.97644H154.55C154.533 8.58799 154.288 8.38533 153.858 8.38533C153.368 8.38533 153.131 8.72311 153.131 9.39866C153.131 10.0742 153.368 10.4035 153.858 10.4035C154.018 10.4035 154.212 10.3444 154.212 10.1587V9.82933C154.212 9.72799 154.153 9.66888 154.043 9.66888H153.824V9.32266H155.369V9.66888L155.386 9.67733Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M158.62 10.4119C158.333 10.3613 158.325 10.3022 158.224 10.0657L157.388 8.14038H156.746L155.944 9.92216C155.817 10.1839 155.741 10.3866 155.378 10.4204V10.7244H156.653V10.4204H156.611C156.509 10.4035 156.29 10.4035 156.29 10.2768C156.29 10.2262 156.315 10.1586 156.34 10.1079L156.391 9.98127H157.396L157.455 10.1079C157.472 10.1586 157.514 10.2515 157.514 10.3022C157.514 10.4119 157.261 10.4119 157.168 10.4204V10.7244H158.671V10.4204H158.629L158.62 10.4119ZM156.509 9.66882L156.898 8.79905L157.252 9.66882H156.509Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M165.933 11.7633C166.339 11.3579 166.347 10.3699 166.347 10.3699C165.942 9.63528 165.097 9.41572 165.097 9.41572C164.912 9.28061 164.76 9.40728 164.692 9.47483L157.877 5.32017C157.379 5.06683 156.695 5.94506 156.526 6.26595C156.459 6.38417 156.678 6.55306 156.83 6.64594C157.447 7.05128 157.742 6.01261 157.97 5.64106L164.557 9.79572C164.557 9.79572 164.582 10.1419 164.599 10.1504C164.599 10.6908 165.03 11.1384 164.768 11.9237C164.701 13.0215 163.51 13.2411 162.86 13.9251C162.26 14.5077 161.095 14.4317 160.597 14.9131L160.58 14.9299V14.9131C160.157 13.8068 159.904 13.7393 159.777 13.3002C159.254 13.1059 158.646 13.0553 158.148 13.3255C157.675 13.6379 157.43 14.2291 157.514 14.7442C157.523 15.2762 158.274 15.8504 158.671 16.0868C158.418 16.4499 158.3 16.8975 158.291 17.0833C158.232 17.8686 158.849 18.6202 159.026 18.9326C159.761 20.0219 160.183 20.8917 160.343 21.2042C160.369 21.2633 160.411 21.3139 160.369 21.3899C160.36 21.4153 159.735 22.5131 160.765 24.0837C161.188 24.8944 161.796 26.7015 161.796 26.7099C162.041 26.9633 161.466 26.8113 161.407 27.4024C161.002 27.5628 157.92 29.9188 157.227 30.5437C156.949 30.6282 156.594 30.6113 156.476 30.9575C156.459 30.9828 156.349 31.2868 156.281 31.3628C155.986 31.7006 155.64 32.3086 155.572 32.9082C155.505 33.2122 155.581 33.8033 155.935 33.9637C156.096 34.0313 156.163 33.9806 156.205 33.9637C156.256 33.9384 156.45 33.3979 156.476 33.3388C156.721 32.7393 157.084 32.5873 157.911 31.7597C158.325 31.8779 158.511 32.1228 158.933 32.2242C160.09 31.1517 161.247 30.1722 162.387 29.0659C162.209 30.7717 162.049 32.5197 162.057 32.9842C161.981 33.2797 161.973 33.7948 162.184 34.0482C162.184 34.0482 164.067 34.1579 164.43 34.1326C164.608 34.1157 164.625 34.0144 164.625 34.0144C164.625 34.0144 164.793 33.7611 164.337 33.4233C164.202 33.3219 163.89 32.9335 163.637 32.7646C163.966 32.6886 164.304 32.6379 164.38 32.6379C164.295 31.7428 164.27 29.8091 164.211 27.2757C163.932 24.6579 163.907 23.7713 162.598 18.4006C163.518 17.3535 163.485 16.6948 164.371 15.6139C164.853 14.6851 165.587 12.7851 165.908 11.7802L165.933 11.7633ZM161.99 16.6104C161.965 16.5344 161.821 16.1628 161.753 15.9686C161.745 15.9433 162.936 15.1664 162.936 15.1664C162.936 15.1664 162.953 15.2255 162.961 15.3099C162.961 15.3099 162.159 16.5091 161.99 16.6188V16.6104Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M154.567 30.797C154.567 30.797 154.373 30.7801 154.373 30.6112V30.4339C154.373 30.1552 154.356 29.8681 154.221 29.6148C154.187 29.5557 154.153 29.4966 154.111 29.4459C154.128 29.4374 154.145 29.429 154.153 29.4206V29.4121C154.457 29.1503 154.609 28.8126 154.609 28.3903C154.609 28.1032 154.542 27.8077 154.407 27.5543V27.529C154.221 27.2166 153.951 27.0055 153.588 26.8957C154.077 26.6086 154.331 26.1103 154.331 25.4095V23.1548H154.922V21.677H154.44H153.528C154.331 21.2295 154.795 20.3934 154.795 19.2872C154.795 18.0712 154.272 17.3197 153.562 16.9143H154.094V15.5379H153.056V13.0806C153.284 13.089 153.444 13.3254 153.461 13.697L153.478 14.153H154.913V11.6028H149.095V14.1615H150.531L150.548 13.7054C150.564 13.3423 150.725 13.1059 150.953 13.089V15.5463H149.914V16.9228H150.362C149.644 17.3281 149.12 18.0797 149.12 19.2957C149.12 20.4019 149.585 21.2379 150.387 21.6855H149.129V23.1632H149.72V25.5615C149.72 26.0175 149.931 26.4819 150.438 26.8028H149.112V28.2552C149.112 28.2552 149.551 28.2552 149.678 28.2552C149.678 28.2721 149.779 28.2552 149.762 28.3566C149.762 28.7619 149.762 30.2312 149.762 30.6788C149.762 30.797 149.678 30.7632 149.678 30.7886C149.56 30.7886 149.12 30.7886 149.12 30.7886V32.2326H152.65V31.8103C152.92 32.1143 153.317 32.2663 153.824 32.2663H155.04V30.8055H154.576L154.567 30.797ZM151.865 23.1548H152.726C152.726 23.1548 152.802 23.1548 152.802 23.2223C152.802 23.2899 152.802 25.1561 152.802 25.4517C152.802 25.6121 152.667 25.7388 152.312 25.7388C151.958 25.7388 151.789 25.6121 151.789 25.4517V23.2223C151.789 23.1632 151.873 23.1548 151.873 23.1548H151.865ZM152.557 19.2872C152.557 20.1655 152.363 20.613 151.983 20.613C151.797 20.613 151.409 20.613 151.409 19.2872C151.409 17.9615 151.814 17.9615 151.983 17.9615C152.228 17.9615 152.557 17.9615 152.557 19.2872ZM151.865 30.7886C151.764 30.7886 151.764 30.6957 151.764 30.6957V30.1299H152.135C152.253 30.1299 152.304 30.1468 152.304 30.2734C152.304 30.3072 152.304 30.5437 152.304 30.5437C152.304 30.6197 152.304 30.7041 152.304 30.7801H151.865V30.7886ZM151.772 28.745V28.137H152.346C152.507 28.137 152.625 28.2637 152.625 28.4326C152.625 28.6268 152.481 28.745 152.346 28.745H151.764H151.772Z\"\n        fill=\"white\"\n      />\n      <path\n        d=\"M154.44 11.9743H149.484V13.7645H150.159V13.6716C150.184 12.9876 150.581 12.6836 150.961 12.6836C151.206 12.6836 151.333 12.7343 151.333 12.8356V15.5969C151.333 15.7489 151.232 15.9094 151.096 15.9094H150.294V16.5174H153.706V15.9094H152.904C152.768 15.9094 152.667 15.7405 152.667 15.5969V12.8356C152.667 12.7343 152.785 12.6836 153.039 12.6836C153.419 12.6836 153.816 12.9876 153.841 13.6716V13.756H154.525V11.9658H154.432L154.44 11.9743Z\"\n        fill=\"#E8000B\"\n      />\n      <path\n        d=\"M154.533 22.0569H152.498V22.7662H152.878C153.005 22.7662 153.089 22.7916 153.132 22.8338C153.174 22.8844 153.182 22.952 153.174 23.0618V23.1209V25.5698C153.157 25.688 153.047 26.1102 152.304 26.1102C151.73 26.1102 151.392 25.8907 151.392 25.5276V23.0702C151.392 22.7831 151.527 22.7662 151.645 22.7662H152.101V22.0569H149.509V22.7662H149.804C149.931 22.7662 150.016 22.7916 150.058 22.8338C150.108 22.8844 150.108 22.9689 150.1 23.0618V23.1209V25.5529C150.1 26.1693 150.649 26.8196 152.177 26.8196C153.706 26.8196 153.942 26.068 153.942 25.4093V23.0787C153.942 22.7916 154.077 22.7747 154.196 22.7747H154.525V22.0653L154.533 22.0569Z\"\n        fill=\"#E8000B\"\n      />\n      <path\n        d=\"M151.958 16.8975C150.767 16.8975 149.5 17.497 149.5 19.2788C149.5 20.7903 150.421 21.6601 151.958 21.6601C153.495 21.6601 154.415 20.7903 154.415 19.2788C154.415 17.497 153.148 16.8975 151.958 16.8975ZM151.983 20.993C151.569 20.993 151.02 20.8495 151.02 19.2788C151.02 18.105 151.333 17.5646 151.983 17.5646C152.667 17.5646 152.946 18.0375 152.946 19.2788C152.946 20.4188 152.616 20.993 151.983 20.993Z\"\n        fill=\"#E8000B\"\n      />\n      <path\n        d=\"M154.584 31.16C154.415 31.16 154.018 31.1515 154.018 30.6111V30.4337C154.018 30.2226 154.018 29.9777 153.908 29.7835C153.807 29.5724 153.562 29.4542 153.427 29.3866C153.596 29.336 153.79 29.2346 153.951 29.108C154.153 28.9306 154.272 28.6942 154.272 28.3817C154.272 28.1537 154.212 27.9173 154.111 27.7231C153.892 27.3515 153.52 27.1826 152.929 27.1826H149.517V27.8751C149.517 27.8751 149.762 27.8751 149.956 27.8751C150.151 27.8751 150.168 28.0693 150.168 28.0693C150.168 28.0693 150.168 30.2311 150.168 30.932C150.168 31.0417 150.066 31.1684 149.956 31.1684H149.5V31.8608H152.321V31.1684H151.62C151.519 31.1684 151.4 31.0333 151.4 30.9151C151.4 30.9151 151.4 30.0537 151.4 29.7666C151.434 29.7666 152.236 29.7666 152.236 29.7666C152.329 29.7666 152.692 29.8088 152.684 30.248V30.5435C152.684 30.8053 152.65 31.0164 152.768 31.312C152.954 31.7004 153.3 31.8862 153.824 31.8862H154.652V31.1684H154.559L154.584 31.16ZM151.4 27.7484C151.544 27.7484 152.034 27.7484 152.388 27.7484C152.709 27.7484 152.937 27.892 153.005 28.1368C153.047 28.2888 153.047 28.5337 152.98 28.7195C152.887 28.9813 152.676 29.108 152.388 29.108C152.388 29.108 151.62 29.108 151.409 29.108V27.74L151.4 27.7484Z\"\n        fill=\"#E8000B\"\n      />\n    </svg>\n  );\n};\n","import React from \"react\";\n\nexport function CrownLockup({\n  className,\n  ...props\n}: React.SVGProps<SVGSVGElement>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width=\"190\"\n      height=\"35\"\n      fill=\"none\"\n      viewBox=\"0 0 190 35\"\n      className={className}\n      {...props}\n    >\n      <path\n        fill=\"#fffffe\"\n        fillRule=\"evenodd\"\n        d=\"M87.976 13.005v4.463h5.934c2.265 0 2.723-1.122 2.723-2.244 0-1-.458-2.22-2.723-2.22zM96.7 23.467l-2.69-4.219h-6.037v4.22h-1.935V11.224h8.11c3.109 0 4.603 1.927 4.603 4 0 1.69-.873 3.148-2.664 3.738l2.854 4.504zM121.516 22.872c-1.703.843-3.777 1.24-5.999 1.24-5.308 0-8.839-2.33-8.839-6.444 0-4.089 3.506-6.443 8.839-6.443 2.345 0 4.32.47 5.999 1.289v1.908c-1.456-.843-3.604-1.438-5.95-1.438-4.049 0-6.69 1.735-6.69 4.684 0 2.95 2.641 4.684 6.74 4.684 2.271 0 4.542-.52 5.9-1.289zM144.096 22.872c-1.704.843-3.778 1.24-5.999 1.24-5.308 0-8.839-2.33-8.839-6.444 0-4.089 3.506-6.443 8.839-6.443 2.345 0 4.32.47 5.999 1.289v1.908c-1.457-.843-3.605-1.438-5.95-1.438-4.049 0-6.691 1.735-6.691 4.684 0 2.95 2.642 4.684 6.74 4.684 2.272 0 4.543-.52 5.901-1.289z\"\n        clipRule=\"evenodd\"\n      />\n      <path\n        fill=\"#252628\"\n        d=\"M96.583 19.211c1.61-.67 2.564-2.112 2.564-3.929 0-2.159-1.55-4.338-5.015-4.338H85.54v12.96h2.59v-4.25h5.694l2.752 4.25h3.021zm-8.452-5.853h5.76c1.638 0 2.47.644 2.47 1.924 0 .912-.282 1.958-2.47 1.958h-5.76zM109.306 17.441c0 2.675 2.463 4.345 6.417 4.345 2.142 0 4.398-.49 5.734-1.24l.463-.262v2.514l-.175.088c-1.678.824-3.793 1.26-6.122 1.26-5.626 0-9.123-2.568-9.123-6.705s3.497-6.698 9.123-6.698c2.269 0 4.323.436 6.122 1.308l.175.08v2.622l-.463-.262c-1.531-.885-3.639-1.388-5.781-1.388-3.927 0-6.37 1.663-6.37 4.338M131.986 17.441c0 2.675 2.457 4.345 6.412 4.345 2.148 0 4.397-.49 5.733-1.24l.463-.262v2.514l-.175.088c-1.671.824-3.793 1.26-6.115 1.26-5.633 0-9.13-2.568-9.13-6.705s3.497-6.698 9.13-6.698c2.262 0 4.323.436 6.115 1.308l.175.08v2.622l-.463-.262c-1.531-.885-3.639-1.388-5.78-1.388-3.928 0-6.365 1.663-6.365 4.338M160.51 10.743c-5.317 0-9.029 2.756-9.029 6.698s3.712 6.705 9.029 6.705 9.023-2.756 9.023-6.705-3.706-6.698-9.023-6.698m0 11.043c-3.719 0-6.216-1.75-6.216-4.345s2.497-4.31 6.216-4.31 6.216 1.729 6.216 4.31c0 2.582-2.497 4.345-6.216 4.345M189.225 22.48c-.973 1.093-2.88 1.663-5.498 1.663-1.833 0-4.518-.328-6.552-1.26l-.181-.08V20.32l.429.188c1.947.825 4.183 1.3 6.297 1.274 1.705-.007 2.961-.322 3.451-.878a.82.82 0 0 0 .221-.67c-.107-.886-1.933-1.221-3.705-1.543l-1.061-.201c-2.779-.53-5.928-1.133-6.042-3.781-.04-.872.235-1.616.812-2.227 1.437-1.488 4.357-1.716 5.975-1.716 1.954 0 3.739.443 4.908.778l.228.06v2.434l-.41-.14c-1.06-.35-2.88-.765-4.538-.765-2.712 0-4.263.503-4.263 1.374 0 .993 1.914 1.315 3.773 1.623l.94.154c2.39.416 5.666.979 5.961 3.574.121 1.052-.127 1.93-.745 2.621M70.588 10.556l-8.545 13.35h2.96l1.269-1.972h8.633l1.262 1.971h2.96zm-2.786 8.985 2.786-4.359 2.786 4.359z\"\n      />\n      <path\n        fill=\"#56c271\"\n        d=\"M49.006 6.268a4.92 4.92 0 0 0-3.725-1.374 5.03 5.03 0 0 0-4.76 4.707 5.04 5.04 0 0 0 .873 3.151l-8.21 9.87L27.53 9.54a5.05 5.05 0 0 0 2.793-4.807A5.026 5.026 0 0 0 25.57.006a5.04 5.04 0 0 0-3.74 1.375 4.99 4.99 0 0 0-1.57 3.654 5.05 5.05 0 0 0 2.705 4.458L17.38 22.615l-8.177-9.87a5.08 5.08 0 0 0 .866-3.151 5.023 5.023 0 0 0-4.76-4.7 4.94 4.94 0 0 0-3.732 1.374A4.98 4.98 0 0 0 0 9.916c0 2.776 2.262 5.028 5.042 5.028h.12l7.331 17.366c.31.73 1 1.187 1.793 1.193a1.93 1.93 0 0 0 1.792-1.186l2.02-4.747 5.371 6.483c.443.53 1.095.838 1.786.838h.007c.691 0 1.342-.301 1.785-.838l5.418-6.503 2.061 4.787c.316.724 1 1.166 1.8 1.173.791 0 1.476-.456 1.785-1.187l7.337-17.379h.094c2.78 0 5.042-2.252 5.042-5.028a4.95 4.95 0 0 0-1.578-3.648M5.042 12.43a2.517 2.517 0 0 1-2.518-2.514 2.517 2.517 0 0 1 5.035 0 2.517 2.517 0 0 1-2.517 2.514m9.25 17.433L8.358 15.816l7.875 9.5zm8.486-24.828a2.517 2.517 0 0 1 5.035 0 2.51 2.51 0 0 1-2.518 2.507 2.515 2.515 0 0 1-2.517-2.507m2.585 26.987c-.034.033-.095.047-.095.04-.02 0-.06 0-.094-.04l-5.92-7.148 5.988-14.066 6.068 14.06zM45.549 12.43a2.52 2.52 0 0 1-2.517-2.514 2.52 2.52 0 0 1 2.517-2.514 2.52 2.52 0 0 1 2.517 2.514 2.517 2.517 0 0 1-2.517 2.514m-9.23 17.453-1.981-4.58 7.942-9.54z\"\n      />\n    </svg>\n  );\n}\n","import React from \"react\";\nimport { getPartnerFromWindowLocation } from \"../../../../../util/partner-selectors.mjs\";\n\nconst PingLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"24\" fill=\"none\" viewBox=\"0 0 96 24\" className={className}><g fill=\"#292929\" clip-path=\"url(#a)\"><path d=\"M70.706 0h19.682c.779.353 1.411.836 1.723 1.663a2.88 2.88 0 0 1-.08 2.147c-.295.645-.847 1.196-1.519 1.441-.774.282-5.097.152-6.278.152-4.105 0-8.226-.08-12.329.01l.01 13.194 16.328-.003c-.048-1.229.002-2.59-.013-3.832h-6.974q-1.312-.002-2.625 0c-.893.002-1.53-.158-2.175-.807a2.73 2.73 0 0 1-.809-1.955 2.75 2.75 0 0 1 .836-1.985c.36-.361.818-.608 1.317-.712.681-.14 2.904-.083 3.688-.08l6.266.008c1.763.016 3.18.376 4.46 1.677 1.531 1.557 1.615 3.142 1.573 5.185-.052 2.562.373 4.476-1.674 6.479A5.54 5.54 0 0 1 89.645 24h-19.15c-.49-.165-.879-.307-1.33-.565a5.55 5.55 0 0 1-2.622-3.396c-.276-1.02-.173-2.93-.172-4.044v-9.15c0-1.551-.115-2.774.716-4.178.862-1.46 2-2.233 3.62-2.667M1.82 0h20.007c1.486.352 2.772 1.212 3.582 2.523a5 5 0 0 1 .65 1.58c.244 1.171.28 5.414.005 6.572a5.53 5.53 0 0 1-2.506 3.445 5.1 5.1 0 0 1-2.056.728c-.671.089-1.517.065-2.21.064l-3.018-.001-10.736-.01v4.462c.002 1.896.315 3.769-1.826 4.637H1.796q-.132-.066-.263-.137C.615 23.365.283 22.777 0 21.822V2.219l.055-.197C.381.915.844.532 1.82 0m3.722 9.359c1.115-.04 2.344-.017 3.467-.017l5.978.001 3.722-.002c.483 0 1.5-.026 1.95.02q.013-1.974-.002-3.95L9.925 5.4l-2.987.007c-.265 0-1.177.02-1.403-.013.001 1.3-.02 2.67.007 3.964M39.184 0h1.965c1.294.362 1.879 1.108 2.799 2.025q1.177 1.186 2.376 2.35c4.084 3.903 8.098 7.985 12.172 11.923V6.623l-.002-2.615C58.494 2.05 58.385.988 60.356 0h1.766c.704.273 1.585.95 1.756 1.66.274 1.14.162 3.213.162 4.366l-.001 6.47.003 5.286c0 .931.015 1.865-.013 2.795-.045 1.546-1.047 2.751-2.428 3.348a4 4 0 0 1-.187.075H59.09c-1.442-.621-2.107-1.508-3.194-2.596l-3.32-3.323L41.92 7.441c-.025 1.096 0 2.307 0 3.414l.001 6.74c0 1 .113 4.18-.203 4.878A2.87 2.87 0 0 1 40.083 24h-1.919c-1.148-.665-1.755-1.297-1.783-2.71-.02-1.061-.01-2.127-.01-3.19l.004-5.878V6.638c0-2.896-.485-5.442 2.81-6.638M30.397 0h1.77c.7.305 1.634 1 1.78 1.742.234 1.188.142 3.29.142 4.498l.001 6.65v5.557c-.001 1.021.011 2.04-.018 3.06-.035 1.2-.722 1.983-1.752 2.493h-2.026c-1.05-.696-1.69-1.084-1.743-2.557-.04-1.067-.018-2.14-.018-3.208l-.001-5.95V5.936c0-.91.015-1.875.002-2.781C28.511 1.524 28.941.75 30.397 0M93.799 1.813V.66h.564q.11 0 .2.045.092.045.145.131a.37.37 0 0 1 .055.207q0 .12-.056.207a.37.37 0 0 1-.15.132.5.5 0 0 1-.208.044h-.386v-.218h.323a.16.16 0 0 0 .113-.042q.048-.042.048-.125 0-.086-.048-.122a.17.17 0 0 0-.111-.037h-.19v.931zm.736-.533.263.533h-.329l-.245-.533zM94.25 2.5a1.22 1.22 0 0 1-.884-.365A1.223 1.223 0 0 1 93 1.25a1.22 1.22 0 0 1 .366-.884q.171-.172.398-.27Q93.991 0 94.25 0a1.22 1.22 0 0 1 .885.366q.172.171.269.398t.097.486a1.22 1.22 0 0 1-.366.885 1.224 1.224 0 0 1-.885.366m0-.329q.257 0 .465-.123a.94.94 0 0 0 .333-.333.9.9 0 0 0 .123-.465.927.927 0 0 0-.92-.92.927.927 0 0 0-.796.458.9.9 0 0 0-.124.462q0 .255.124.465.123.208.333.333.21.123.462.123\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h96v24H0z\"/></clipPath></defs></svg>\n);\n\nconst CobraLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"151\" height=\"19\" fill=\"none\" viewBox=\"0 0 151 19\" className={className}><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M126.791 13.145c0-.215.216-.43.432-.43h16.186c.216 0 .432.215.432.43v1.616c0 .216-.216.431-.432.431h-16.186c-.216 0-.432-.215-.432-.43zm-5.072 1.078c0-1.293.216-3.34.971-4.095.109-.107.324-.323.972-.323h20.286V8.62s0-.539-.539-.539h-20.071q-.324 0-.324-.323V5.28q0-.324.324-.324h25.251c1.079 0 1.51.54 1.51 1.401v11.314c0 .538-.431.861-.755.861h-25.682c-.432 0-.863-.215-.972-.323-.755-.646-.971-2.693-.971-3.986M62.478 0h4.316c.216 0 .216.108.216.323v4.633h23.74c.755 0 1.295.54 1.295 1.293v10.99c0 .755-.54 1.293-1.295 1.293h-27.3c-.756 0-1.296-.538-1.296-1.293V.323c.108-.107.108-.323.324-.323m4.64 8.943c0-.431.324-.754.755-.754h18.668c.432 0 .756.323.756.754v5.495c0 .431-.324.754-.756.754H67.873a.737.737 0 0 1-.755-.754zM31.293 6.249c0-.754.539-1.293 1.294-1.293H58.81c.755 0 1.295.54 1.295 1.293v10.99c0 .755-.54 1.293-1.295 1.293H32.587c-.755 0-1.295-.538-1.295-1.293zm4.424 2.694c0-.431.323-.754.755-.754h18.56c.432 0 .756.323.756.754v5.495c0 .431-.324.754-.756.754h-18.56a.737.737 0 0 1-.755-.754zm63.126 9.59h-4.317c-.215 0-.323-.108-.323-.431V6.249c0-.754.54-1.293 1.295-1.293h23.74c.755 0 1.294.54 1.294 1.293v3.556c0 .323-.107.431-.431.431h-3.561q-.324 0-.324-.323V9.05a.737.737 0 0 0-.755-.754H99.922a.737.737 0 0 0-.755.754v9.266c-.108.108-.108.215-.324.215M28.38 8.188H7.014a.737.737 0 0 0-.755.755v5.495c0 .43.323.754.755.754h21.474c.323 0 .431.216.431.323v2.479c0 .323-.108.43-.431.43H1.295C.54 18.425 0 17.886 0 17.132V6.25c0-.754.54-1.293 1.295-1.293h27.193c.323 0 .323.108.323.323v2.586c0 .216-.107.323-.431.323\" clip-rule=\"evenodd\"/></svg>\n);\n\nconst TaylorMadeLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"103\" height=\"24\" fill=\"none\" viewBox=\"0 0 3323 776\" className={className}><path fill=\"#000\" d=\"M296.769 95.37c-11.104 3.15-31.668 8.664-45.239 12.208-44.005 11.814-111.041 45.288-141.474 70.492-22.209 18.51-37.014 35.05-33.724 38.2 1.645 1.575 14.394.394 27.555-2.757 39.07-9.057 120.911-18.115 208.098-23.234 89.244-4.726 224.961.393 294.053 11.026 19.741 3.151 46.884 5.907 60.044 5.907 27.555 0 31.256-4.332 23.854-27.96-3.702-11.815-9.871-18.509-26.321-29.142-11.516-7.483-23.442-13.784-25.91-13.784s-14.805-4.332-27.554-9.845c-22.209-9.845-39.07-14.965-101.582-29.93-39.481-9.451-178.488-10.239-211.8-1.181m1013.761 98.059c-2.47 5.907-6.17 18.903-8.22 28.748-2.47 10.239-7 29.93-10.29 44.107-8.63 38.2-18.5 81.913-24.67 106.329-2.88 11.815-8.23 35.837-12.34 53.165-3.7 17.328-9.46 41.744-12.75 53.952-3.29 12.602-5.76 27.173-5.76 32.687 0 9.845.41 9.845 32.49 9.845 18.1 0 34.96.788 38.25 1.969 13.98 5.12 16.45-1.575 52.64-157.525 14.4-61.828 21.8-92.939 30.85-129.17 3.29-13.39 6.58-30.717 6.99-38.2l1.23-13.783-42.36-1.182c-41.95-1.181-41.95-1.181-46.06 9.058m1637.24-3.15c-4.12 7.876-16.04 59.071-20.98 90.182-5.34 33.474-15.63 45.289-24.67 29.142-2.47-4.331-7-7.876-9.87-7.876-3.29 0-7.82-2.363-10.29-5.119-7.4-8.664-46.88-15.753-74.43-13.39-50.18 4.332-89.66 34.656-109.4 83.488-11.1 28.355-11.1 93.334 0 110.268 25.5 37.805 49.76 50.801 93.36 50.407 32.9-.393 50.58-5.907 70.32-23.628 11.93-11.027 20.15-9.452 16.86 2.756-4.11 14.965 3.71 17.722 42.36 15.753 41.54-2.363 37.02 2.757 48.94-53.165 7.41-32.686 13.58-60.647 24.27-104.36 3.29-14.177 11.93-50.408 18.92-80.731 6.58-30.324 14.39-62.616 16.45-72.068 7.4-29.536 8.63-28.354-37.02-28.354-34.54 0-41.53 1.181-44.82 6.695m-77.32 158.312c12.34 4.726 23.44 26.385 23.44 45.682 0 35.443-34.55 72.855-67.86 72.855-13.57 0-19.33-2.363-30.02-12.996-22.62-22.447-21.8-49.226 2.47-83.094 16.45-22.841 45.65-31.899 71.97-22.447m-878.87-136.653c-1.23 5.12-14.39 59.466-39.89 164.614-6.99 29.142-17.27 70.492-22.62 91.758-14.81 57.89-16.86 53.952 29.2 53.952 44 0 42.77.788 51.41-35.443 2.88-11.815 7.81-33.08 11.1-47.258 3.29-14.177 8.64-36.23 11.52-49.226 2.87-12.996 8.22-36.231 11.92-51.196 3.29-15.358 7.41-33.474 8.64-40.562 1.64-6.695 4.11-12.602 6.17-12.602 6.99 0 16.45 99.24 16.45 170.127 0 25.203 1.64 50.407 3.7 55.921 3.7 9.057 6.17 9.845 39.89 11.027 20.15.787 39.89-.788 44.42-2.757 7.81-3.938 17.27-20.478 91.71-160.282 45.24-85.457 57.17-96.484 41.54-40.562-4.53 17.327-9.87 38.593-11.52 47.257-1.64 8.664-4.93 22.841-7.4 31.505s-7.4 27.961-11.1 43.319c-3.71 14.965-9.46 37.806-13.16 50.802-3.29 12.602-4.53 24.417-2.47 26.386 4.11 3.938 76.49 5.513 83.07 1.969 4.53-2.757 5.76-7.483 18.51-61.435 13.98-59.466 18.51-77.187 24.26-102.391 3.29-14.177 9.46-39.775 13.58-57.103 3.7-17.328 9.45-40.169 12.74-50.802 2.88-10.632 5.35-24.416 5.35-30.717v-11.027h-147.23l-52.64 100.422c-28.79 55.528-54.29 100.029-56.76 99.241-2.88-.788-5.75-35.049-7.81-95.696-1.65-51.59-4.11-96.484-4.94-99.241-1.23-3.544-20.15-4.726-74.02-4.726-54.29 0-72.39 1.182-73.62 4.726M766.842 287.55c-26.321 5.907-32.901 13.39-35.369 39.381-2.056 24.81 1.645 27.173 24.264 15.753 7.814-3.545 25.087-6.301 46.884-6.695 29.2-.394 36.192.394 46.062 7.482 10.693 7.877 18.507 28.749 10.693 29.536-1.645.394-22.62.788-46.473 1.575-98.703 1.969-155.046 40.169-145.176 98.453 6.581 38.2 30.023 53.559 83.898 54.346 29.611.394 38.659-1.181 56.343-9.057 11.926-5.514 21.385-11.027 21.385-12.602 0-7.876 11.927-1.969 13.983 6.695 2.468 9.845 3.291 10.239 36.192 9.057l33.723-1.181 5.346-19.691c2.879-11.026 6.992-28.748 9.048-39.381 2.057-11.027 7.814-34.655 12.749-53.165 18.507-70.098 2.468-101.997-61.278-121.687-17.684-5.514-86.776-4.726-112.274 1.181m83.075 139.803c0 3.938-5.758 13.784-12.338 22.448-26.321 31.111-82.253 33.867-82.253 3.938 0-14.965 2.879-19.297 18.507-27.173 8.225-4.332 23.031-6.301 44.416-6.695 28.377 0 31.668.787 31.668 7.482M1495.6 287.55c-10.28 2.757-23.85 7.089-30.02 9.451-6.58 2.757-12.75 4.726-14.4 4.726-1.64 0-12.34 7.876-23.44 17.328-38.25 31.899-57.58 83.488-47.29 125.232 2.87 11.421 9.45 27.173 14.39 34.656 10.28 15.358 35.37 35.443 44 35.443 3.29 0 7.41 1.575 9.87 3.938 2.06 1.969 18.1 5.513 34.96 7.876 33.31 4.332 100.35-.394 108.16-7.876 2.06-1.969 7.41-3.938 11.52-3.938s16.04-5.908 26.73-13.39c31.67-21.66 46.06-44.107 54.7-83.882 8.22-38.987-1.23-73.249-28.38-100.816-27.96-28.748-105.69-42.531-160.8-28.748m71.56 56.315c35.78 16.146 35.78 74.431.41 110.661-10.69 11.027-16.45 13.39-36.19 15.359-26.73 2.757-39.48-3.151-52.23-23.629-9.87-15.358-10.28-32.686-1.24-54.74 10.29-24.81 21.8-38.199 40.31-46.469 20.56-9.452 30.84-9.846 48.94-1.182m289.12-50.014c-10.29 6.301-21.39 14.965-24.27 19.691-8.64 12.995-15.22 9.451-16.45-9.058l-1.23-16.54-33.73-1.182c-31.25-1.181-34.13-.393-39.89 7.877-3.29 5.119-6.99 16.934-8.64 26.779-1.23 9.845-5.34 27.567-8.22 39.381-9.46 36.231-30.43 127.201-32.9 142.56-1.24 9.058-.41 15.359 2.47 17.328 7.81 4.332 75.26 1.575 80.19-3.545 2.47-2.756 7.82-18.903 11.93-36.23 22.21-94.121 25.5-101.998 49.76-120.507 15.22-11.42 17.69-12.208 46.89-10.633l30.84 1.182 9.87-28.355c12.34-35.837 9.46-40.562-23.85-40.562-18.92 0-27.15 2.363-42.77 11.814m626.76-6.301c-25.5 5.12-31.26 11.421-34.96 38.594-2.47 21.265.41 24.81 16.86 18.509 20.16-7.483 62.1-11.815 79.79-7.877 20.15 4.332 37.42 18.51 35.78 29.93-1.23 7.483-4.11 7.876-46.47 8.27-69.1.394-108.17 13.39-135.31 44.107-13.57 15.753-14.8 19.691-14.8 40.957 0 46.863 26.32 67.341 86.36 67.341 28.38 0 38.66-1.575 53.46-9.057 10.29-4.726 19.74-10.633 20.98-12.996 4.52-6.301 16.04 0 16.04 8.664 0 6.695 3.7 7.876 30.02 9.058 16.04.787 31.67.787 34.14 0 2.87-.788 7.81-14.178 11.51-29.536 3.7-15.753 9.46-38.2 12.34-50.014 12.75-47.652 14.8-60.254 14.8-81.913-.41-39.775-18.91-61.041-62.92-73.643-24.26-7.089-84.72-7.089-117.62-.394m84.31 136.653c4.11 6.695-19.74 36.23-35.37 43.713-18.51 8.664-38.66 8.664-51.41.787-16.45-10.239-11.92-31.504 9.46-42.531 13.16-7.089 72.79-8.664 77.32-1.969m554.79-137.047c-45.65 14.177-81.43 42.138-97.06 76.4-12.33 26.779-15.21 70.886-5.75 94.908 10.28 26.78 34.95 49.621 65.39 60.254 39.89 14.571 127.9 11.42 151.75-5.12 4.53-3.151 8.23-12.996 9.87-26.385l2.47-21.266-16.04 2.363c-34.54 5.119-79.37 7.482-93.36 5.119-21.38-3.938-40.71-20.478-39.07-33.474l1.24-10.239 90.48-1.969 90.06-1.969 5.35-9.845c6.99-13.39 6.58-46.47-.82-67.342-16.04-43.319-50.18-63.404-111.04-65.373-21.39-.394-44.01 1.181-53.47 3.938m81.84 62.223c11.93 13.389 13.99 29.142 4.12 32.686-10.7 3.938-95.42 2.757-98.3-1.575-4.93-7.483 8.23-25.204 24.68-34.262 11.1-5.907 23.44-9.058 37.84-9.058 18.5 0 22.2 1.576 31.66 12.209\"/><path fill=\"#000\" d=\"M972.473 288.732c-9.048 1.969-9.048 7.876-1.645 36.23 3.29 12.208 9.048 34.262 12.749 49.62 6.169 25.204 8.636 36.231 22.213 88.608 2.46 9.845 6.58 27.961 9.04 40.563 4.53 21.659 4.12 23.235-6.58 38.593-12.746 17.328-20.972 20.479-59.219 20.872l-26.732.394-7.403 23.235c-9.459 29.536-7.403 31.899 31.667 36.625 32.49 3.938 69.097-1.182 91.297-12.209 17.28-8.663 43.19-37.018 64.57-70.492 9.05-14.965 19.74-31.111 23.03-36.231 3.29-5.119 14.4-22.053 24.68-37.806 10.28-15.358 21.8-32.686 25.5-38.593 4.11-5.513 9.04-13.784 11.51-18.115 7.4-12.996 13.98-24.023 25.09-39.775 22.21-32.293 34.54-51.196 41.13-63.798 6.58-12.208 6.58-12.996-.42-16.54-9.87-5.12-68.27-5.12-78.14 0-4.11 1.969-16.86 19.297-28.78 38.2-11.52 19.296-22.62 37.412-25.09 40.562-2.06 3.151-5.76 9.452-7.82 13.784-13.16 24.81-27.55 46.076-30.84 46.076-4.52-.394-11.1-28.355-20.15-86.639-9.05-57.103-8.23-55.921-48.94-55.527-18.509.393-37.016 1.181-40.717 2.363m-747.675 48.832c-21.386 3.938-49.352 9.058-61.69 11.421-41.126 7.088-124.612 33.474-131.603 41.35-8.226 9.451 18.506 63.797 50.174 102.785 6.58 8.27 88.832 87.032 102.404 98.453 19.74 15.752 37.013 25.991 41.949 24.022 6.58-2.362 54.286-77.974 72.793-114.993 7.403-15.358 16.039-32.292 18.918-37.806 8.637-16.146 30.434-83.094 30.434-93.333 0-14.177-12.338-31.505-25.91-36.231-17.684-5.907-52.642-4.332-97.469 4.332m353.274-.787c-15.217 4.725-32.489 15.752-46.472 29.535-11.516 11.421-47.707 59.466-47.707 63.404 0 .788-5.346 9.452-12.338 18.903-6.58 9.845-12.338 18.903-12.338 20.478s-10.692 19.691-23.853 40.563c-13.572 21.266-25.498 40.956-27.143 44.107-1.234 3.15-6.169 11.027-10.693 17.721-4.524 6.301-10.693 16.934-13.983 23.629-3.701 6.301-13.16 23.235-21.386 37.412-26.32 44.107-30.433 52.377-27.965 55.922 9.87 14.964 88.421 20.478 121.733 8.663 56.343-19.69 71.56-29.142 88.833-54.346 16.45-24.022 62.512-115.387 62.512-124.05 0-1.969 5.346-17.722 11.515-34.656 6.58-16.934 15.217-41.35 19.33-54.346s9.87-30.717 12.749-39.381c3.29-8.664 6.169-24.81 6.991-35.443l.823-19.691-34.958-.787c-19.329-.394-39.892.787-45.65 2.363\"/></svg>\n);\n\nconst CallawayLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2500\" height=\"1443\" fill=\"none\" viewBox=\"0 0 2500 1443\" className={className}><path fill=\"#000\" d=\"M584.998 484.528c-13.54.107-13.103 20.57-13.103 20.57 1.642 78.074 62.19 97.423 62.19 97.423 22.881 13.928 27.353-5.264 27.353-5.264l18.606-35.654-33.665-79.699zm93.908-150.355 90.508 206.728c10.149 22.558 23.442 7.211 23.442 7.211 14.283-8.449 19.761-3.721 19.761-3.721 9.225 6.601.817 16.073.817 16.073l-34.911 67.85c-9.571 25.579-35.208 2.492-35.208 2.492-9.175-4.587-36.074-26.948-36.074-26.948-9.069-14.985-19.853-.223-19.853-.223l-39.218 70.548c-12.6 28.962-48.922 10.397-48.922 10.397-126.541-42.189-53.732-206.282-53.732-206.282 7.385-28.648 24.382-24.259 24.382-24.259l64.69-2.285c-2.302-19.663-27.633-62.569-27.633-62.569-6.659-15.719-17.41-12.6-17.41-12.6l-108.604 6.832c-9.612 1.254-8.762-6.444-8.762-6.444-2.212-6.89 9.059-12.113 9.059-12.113 21.338-8.128 40.093-41.801 40.093-41.801 13.739-18.673 30.035-14.349 30.035-14.349l65.234-2.838c48.246-2.369 62.306 28.301 62.306 28.301M2344.16 530.768l-63 11.246s-10.85 1.634-9.41 7.955c0 0 .27 6.378 7.34 8.16l7.26 4.86s16.28 7.699 1.63 28.054l-80.57 132.805s-39.67 61.867-24.48 111.111c6.39 20.966-15.39 52.519-15.99 51.876 0 0-2.97-22.031-58.26-47 0 0-17.71-11.477-34.49 4.382l-22.46 18.681s-11.09 10.751 1.13 12.872c0 0 29.05 9.86 60.49 49.136 0 0 12.23 20.092 39.11 17.955 0 0 50.78-2.987 85.56-68.94 7.35-4.274 38.97 38.484 130.95-25.719 73.7-51.488 130.06-114.742 128.78-213.881 0 0 2.25-28.838-23.22-22.196l-39.65 3.945s-21.81-1.84-19.01 24.316c0 0 8.63 135.568-137.68 163.788 0 0-27.94 8.729-16.7-16.09 0 0 56.85-100.03 94.83-148.168 0 0 45.7-48.873 17.19-96.02l-6.11-8.755s-3.48-8.829-23.24-4.373M1250.5 337.903c-12.51-4.992-19.78 14.233-19.78 14.233-27.72 73.09 21.38 113.563 21.38 113.563 16.04 21.412 27.27 5.388 27.27 5.388l30.61-26.14-1.48-86.457zm145.09-96.639 5.01 217.751c.99 24.737 19.15 15.265 19.15 15.265 16.38-2.368 19.62 4.142 19.62 4.142 6.17 9.431-5.31 15.059-5.31 15.059l-57.63 50.035c-18.35 20.084-33.54-10.842-33.54-10.842-6.85-7.756-23.31-38.443-23.31-38.443-2.93-17.187-18.44-7.715-18.44-7.715l-62.86 51.01c-22.38 22.072-49.11-8.705-49.11-8.705-101.77-86.259 27.1-211.521 27.1-211.521 17.57-23.665 31.67-13.433 31.67-13.433l60.78 22.187c5.26-19.209-2.31-68.576-2.31-68.576-.28-16.956-11.25-18.095-11.25-18.095l-103.55-34.07c-9.19-2.442-5.64-9.34-5.64-9.34.51-7.212 12.91-7.723 12.91-7.723 22.88.388 52.89-23.954 52.89-23.954 19.67-12.079 33.16-2.12 33.16-2.12l61.67 21.866c48.6 15.677 48.99 57.222 48.99 57.222m379.09 68.238-18.57 71.91-5.23 20.999-19.26 73.503c-10.94 33.285-.57 34.671-.57 34.671l44.76 31.949c9.64 7.055 11.55-9.612 11.55-9.612l60.18-183.764c8.97-32.684-1.26-42.296-1.26-42.296l-5.12-8.969c-12.14-15.967 0-18.458 0-18.458l48.73-19.35c18.58-9.596 24.31 5.859 24.31 5.859 37.71 48.03 16.64 102.406 16.64 102.406l-69.79 205.547c-5.8 22.526-22.53 14.754-22.53 14.754-46.7-3.837-85.15 17.946-85.15 17.946-19.79 14.737-33.24-5.702-33.24-5.702-3.17-3.894-54.46-39.812-54.46-39.812-23.66-19.201-42.93-5.116-42.93-5.116l-22.39 10.975c-19.91 16.007-30.06-3.218-30.06-3.218-23.16-38.451-92.91-62.85-92.91-62.85-8.94 0-10.34-7.608-10.34-7.608-1.86-6.378 7.09-10.842 7.09-10.842l10.22-9.027c10.85-9.572 10.3-19.853 10.3-19.853l29.09-225.87c8.68-60.011-5.2-62.016-5.2-62.016-10.37-4.58-6.15-12.088-6.15-12.088 2.39-4.835 8.69-2.591 8.69-2.591 90.71 13.565 91.83 61.34 91.83 61.34l-36.28 237.43c-4.5 30.15 9.65 30.678 9.65 30.678l33.2 21.189c21.81 16.693 25.12-18.606 25.12-18.606l43.46-170.405 1.11-4.489c4.08-33.055-12.7-43.657-12.7-43.657-14.8-12.237 1.93-19.35 1.93-19.35l38.35-22.311c18.05-9.58 23.76.66 23.76.66 44.77 42.626 34.17 86.044 34.17 86.044m-1014.021-82.71 76.885 254.097s16.891 44.656.57 64.855c0 0-7.781 3.259-4.967 10.867 0 0 .841 5.726 12.459 6.106 0 0 68.032.883 89.155 18.829 0 0 17.864 17.188 27.46-2.995 0 0-13.351-48.369-25.455-82.529L823.905 138.759s-11.205-27.823 7.344-58.394c0 0 9.53-10.33 1.708-16.85 0 0-6.931-5.833-18.838 2.905 0 0-22.254 14.605-45.58 52.247 0 0-24.399 49.739-7.88 108.125m208.419-58.758 42.202 271.921s10.52 46.561-8.53 64.277c0 0-8.176 2.228-6.443 10.083 0 0-.074 5.768 11.343 7.641 0 0 70.04 8.226 88.5 28.796 0 0 15.31 19.721 27.5 1.114 0 0-9.04-47.502-16.26-83.065l-61.45-369.574s-7.24-29.119 15.49-56.628c0 0 10.98-9.01 4.07-16.602 0 0-6.07-6.716-19.03.248 0 0-24.06 11.337-52.531 45.415 0 0-33.005 36.272-24.861 96.374\"/><path fill=\"#000\" d=\"M241.259 745.416c5.685 23.104-10.851 26.586-10.851 26.586-9.934 4.992-20.381-1.114-20.381-1.114-11.271-5.108-19.472-11.61-19.472-11.61-21.429-13.589-45.58-41.281-59.385-70.49-41.273-86.671-4.29-166.098 13.433-186.429 0 0 6.502-9.984 12.064-12.724 0 0 10.107-10.322 17.269.496 0 0 4.662 8.746 3.92 21.082 0 0-.066 8.449-.933 13.589-1.279 12.484-9.035 30.588-8.366 44.145.8 16.23 7.756 34.44 13.606 45.398 15.413 28.69 47.585 93.281 53.072 109.882 4.448 11.865 6.024 21.189 6.024 21.189m298.926-26.049c16.75-27.559 3.185-40.53-7.368-44.144-37.849-13.202-53.213 86.036-129.908 116.871-85.549 34.267-108.752 11.956-116.236-.652-15.561-26.668 29.573-82.719-2.351-153.738-36.933-82.207-79.41-133.34-59.145-170.38 19.984-36.239 78.568-30.398 105.962-30.752 55.366-.743 63.84-71.242 56.134-88.289-3.656-8.251-12.707-9.629-20.777-5.982-27.543 12.212-34.078 18.07-58.188 21.833-24.275 3.713-39.581 5.487-94.105 16.824C169.803 390.167 0 515.577 80.12 732.594c66.092 178.483 258.908 169.58 328.689 140.428 77.042-32.287 113.85-124.957 131.376-153.655m1504.135-201.05c-8.89-10.1-24.01 3.713-24.01 3.713-57.79 52.659-32.29 111.029-32.29 111.029 4.63 26.313 21.91 16.964 21.91 16.964l39.14-9.34 37.76-77.842zm173.17-20.686-94 196.545c-10.31 22.551 10.15 22.303 10.15 22.303 15.71 5.273 15.64 12.476 15.64 12.476 1.25 11.345-11.54 11.098-11.54 11.098l-73.98 18.607c-25.49 9.588-25.04-24.82-25.04-24.82-2.63-10.001-3.43-44.92-3.43-44.92 5.25-16.676-12.97-15.1-12.97-15.1l-79.07 16.965c-29.95 9.489-39.88-30.027-39.88-30.027-51.73-123.026 119.76-176.23 119.76-176.23 26.41-13.367 34.34 2.211 34.34 2.211l44.23 47.28c13.36-14.811 28.93-62.256 28.93-62.256 7.4-15.1-1.94-21.123-1.94-21.123l-76.88-77.174c-7.09-6.354-.74-10.875-.74-10.875 3.71-6.329 14.9-1.106 14.9-1.106 20.25 10.727 57.99 2.5 57.99 2.5 23.11-1.856 30.58 13.07 30.58 13.07l45.14 47.429c36.2 36.033 17.82 73.147 17.82 73.147m-937.55 926.009c19.96.08 39.73-15.81 60.39-48.25 0 0 285.76-446.787 304.14-473.934 26.45-39.128-22.69-95.121-66.12-46.644 0 0-221.38 238.528-249.35 270.558-17.95 20.53-31.8 31.27-49.06 31.27-17.22 0-31.12-10.74-49.05-31.27-28.01-32.03-249.347-270.558-249.347-270.558-43.451-48.477-92.562 7.508-66.1 46.644 18.317 27.147 304.127 473.934 304.127 473.934 20.65 32.44 40.45 48.32 60.37 48.25\"/></svg>\n);\n\nconst ClevelandLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2500\" height=\"483\" fill=\"none\" viewBox=\"0 0 2500 483\" className={className}><path fill=\"#000\" d=\"M292.831 245.264c27.622 9.647 46.774-15.34 53.644-36.703 4.894-19.811 29.881-128.652-28.234-155.286-59.526-29.222-162.485 29.599-256.926 158.109-93.783 127.334-68.75 231.752 0 259.75 69.455 30.822 172.413-2.964 231.516-104.465 18.822-23.528-12.046-75.007-47.997-45.174-37.598 28.987-67.008 62.82-84.701 76.231-17.599 16-42.586 17.458-62.115 2.824-21.645-14.729-27.527-47.103 45.174-160.932 74.349-115.57 118.676-125.546 135.522-115.758 10.87 7.529 4.988 44.279-2.823 56.467-7.294 14.964-23.058 52.515 16.94 64.937m406.565-76.231c-37.786-14.116-89.218 3.53-127.051 50.821-38.634 46.821-85.69 120.37-101.642 141.169-16.422 20.375-25.222 24.751-39.527 16.94-15.105-6.87-16.611-37.786 0-64.938 18.681-25.786 109.876-168.414 121.405-234.34 9.035-66.396-43.903-64.937-59.291-47.997-19.905 28.61-122.816 194.813-158.108 335.981-11.765 41.175-16.188 70.585 14.116 90.348 31.481 21.411 52.044 47.903 144.039-39.527 16.846 37.41 58.021 63.855 95.995 62.114 38.492-1.176 109.076-35.01 115.758-115.758.706-10.446-11.058-7.482-14.117 0-2.87 7.2-52.844 48.374-81.878 47.997-26.822.424-54.773-52.514-5.646-56.467 39.103-1.929 105.264-23.999 132.698-79.054 25.458-53.739-.988-94.913-36.751-107.289m-95.994 124.229c-3.53-14.823 37.645-58.962 53.644-64.938 13.411-8.752 28.139-7.246 33.927 2.824 8.894 11.999 5.976 31.104-11.293 47.997-32.751 31.669-71.008 27.245-76.278 14.117m632.438-129.875c-46.31-14.352-124.23 12.093-172.23 93.171-12.33 18.917-46.11 46.868-53.69 16.94 10.49-25.975 25.17-81.831 2.87-98.865-24.704-18.305-67.384-3.576-67.761 28.281-2.541 32.845-27.527 125.499-47.997 149.638-20.705 25.881-36.892 24.423-48.044 22.587-9.458-4.046-15.341-21.692-2.824-50.82 13.929-29.693 38.916-82.631 50.821-112.935 14.588-31.481-23.669-72.655-56.467-45.174-30.399 32.798-84.843 126.911-84.701 239.987 1.317 36.939 20.469 54.585 47.997 62.114 28.375 10.117 62.161 11.576 121.405-53.644 58.397-67.149 48.091-53.927 56.467-70.585 1.929-8.329 22.544-11.246 33.884-5.646 9.22 3.199 20.98 7.623 19.76 31.057 2.73 17.74 5.65 35.386 5.65 50.82 0 13.976 16.18 50.774 79.05 50.821 63.57 2.918 109.17-44.139 115.76-98.818 3.72-10.07-6.59-14.493-14.12-5.647-7.15 8.847-46.87 39.716-79.05 42.351-32.52.282-38.4-35.01-25.41-50.821 10.54-13.599 31.1-15.058 48-14.117 15.48-.988 63.99-2.447 95.99-62.114 25.93-48.232 22.45-103.523-25.36-118.581m-104.52 129.875c-.65-50.115 56.71-76.608 73.46-73.455 16.94 2.918 21.08 30.022 0 53.691-21.13 27.01-65.27 31.434-73.46 19.764m1183.04-39.527c13.32-23.811 86.87-167.944 79.06-225.87 1.93-22.916-39.25-44.986-53.65-5.647-15.01 40.045-28.23 73.878-39.52 90.348-9.27 18.823-21.04 30.587-45.18 33.88-25.88 2.589-95 17.27-132.65 45.174-35.85 25.034-65.27 86.819-76.23 121.405-8.14 16.846-30.21 49.221-53.69 62.114-23.58 10.635-25.03-12.893-16.89-31.057 9.5-20.093 53.64-89.218 47.99-138.345-6.11-47.903-34.06-53.785-59.29-36.704-27.71 15.294-36.51 21.176-47.99 28.281-12.05 7.623-22.36 9.082-33.88-11.293-12-20.752-59.06-57.55-76.24 0-15.15 57.173-32.79 113.029-76.23 163.755-22.77 28.704-83.05 46.351-56.46 0 29.26-44.844 46.91-72.749 45.17-98.818-4.14-26.869-42.35-75.431-67.76-84.701-49.6-18.634-109.88-3.953-149.64 56.468a3011 3011 0 0 1-87.52 127.051c-18.31 24.281-30.07 34.586-39.53 33.881-8.19-2.259-5.22-27.246 2.82-53.691 9.6-26.493 71.34-180.931 115.76-239.987 14.4-27.716 5.6-67.431-5.65-79.054-12.33-8.94-40.23-8.94-53.69 8.47-17.46 16.422-57.17 75.243-79.05 146.815-22.26 69.596-44.28 113.688-56.47 160.932-14.3 46.868-17.22 145.404 33.88 146.815 51.81 1.506 68-20.563 96-53.644 14.68 27.246 48.46 55.15 70.58 53.644 22.02-1.411 33.79-13.175 50.82-22.587 18.26-11.152 28.52-11.152 42.35-5.646 12.66 6.211 62.63 31.245 135.52-5.647 15.34 23.622 38.87 42.727 53.65 39.527 17.6-2.682 32.32-21.787 39.57-59.291 4.52-38.962 4.52-56.608 25.41-84.701 23.25-27.763 29.13-33.645 36.71-42.303 7.1-8.941 42.39-14.823 28.28 25.41-15.25 39.151-41.74 102.394-14.12 132.651 28.28 31.481 32.7 35.904 50.82 28.281 17.18-7.058 59.81-29.128 87.52-64.937 1.7 26.963 47.3 56.373 70.59 53.644 20.8-3.106 51.71-6.071 87.52-50.821 9.74 25.646 40.61 47.715 62.07 45.174 22.63-3.341 102.06-26.869 124.28-141.169 8.7-32.751-28.1-43.056-36.71-16.94-7.9 23.528-13.36 57.926-45.17 64.938-17.74 4.282-15.3-8.753-14.12-14.164 2.78-35.528 16.75-78.631 30.96-101.641m-697.37 62.114c-31.9 62.584-71.57 87.571-87.52 81.877-13.46-3.105-13.46-51.667 14.11-95.994 28.28-46.821 68-74.772 87.53-62.114 14.26 18.258-.43 49.126-14.12 76.231m598.56-2.824c-15.02 26.446-62.82 88.184-84.71 79.055-22.25-7.012-1.64-69.549 16.95-98.818 18.16-31.01 59.33-69.973 81.83-59.291 16.47 9.929 1.74 52.562-14.07 79.054\"/></svg>\n);\n\nconst DunlopSportsLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2500\" height=\"416\" fill=\"none\" viewBox=\"0 0 2500 416\" className={className}><g fill=\"#000\" clip-path=\"url(#a)\"><path d=\"M689.941 92.444H474.237L460.371 124.8h36.977L438.8 254.222h-36.978l-15.407 33.897h243.437c60.089 0 89.363-40.06 112.474-93.986 23.111-47.763 40.059-101.689-52.385-101.689m-46.222 101.689c-12.326 29.274-24.652 60.089-53.926 60.089H542.03L599.037 124.8h33.897c38.518 4.622 20.029 46.222 10.785 69.333m167.94-101.689h174.104L970.356 124.8h-36.978l-41.6 97.067c-15.407 41.6 72.415 53.926 95.526 0L1028.9 124.8h-33.892l15.412-32.356h110.93l-15.41 32.356h-33.9l-43.14 97.067c-32.352 63.17-57.003 66.251-150.989 67.792-107.851 1.541-101.689-26.192-84.74-67.792l43.14-97.067h-38.518zM1147.54 124.8h36.98l-55.47 129.422h-38.52l-13.86 33.897h112.47l16.95-33.897h-36.98l41.6-92.444 66.25 126.341h81.66l72.42-163.319h33.89l13.87-32.356h-112.47l-13.87 32.356h36.98l-43.14 95.526-66.26-127.882h-117.09zm360.53 0h36.98l-55.46 129.422h-36.98l-13.87 33.897h257.3l38.52-90.904h-29.27l-52.39 57.007h-63.17L1645.2 124.8h33.9l12.32-32.356h-169.48zm454.52-33.896c-134.04 0-155.61 16.948-187.97 92.444-36.98 81.659-38.52 107.852 109.4 107.852 134.04 0 158.69-43.141 184.88-107.852 35.44-81.659 18.49-92.444-106.31-92.444m16.95 73.955-27.73 64.711c-10.79 23.111-33.9 29.274-46.22 29.274h-20.03c-12.33 0-44.69-3.081-29.28-43.14l27.74-63.171c13.86-24.652 33.89-29.274 46.22-29.274h23.11c12.32 0 40.06 10.785 26.19 41.6M2394 92.444h-246.52l-15.41 35.437h36.98l-55.46 126.341h-35.44l-13.87 33.897h166.4l15.41-33.897h-32.36l18.49-44.681h92.45c80.12 0 81.66-21.571 101.69-60.089 7.7-26.193 32.35-57.008-32.36-57.008m-69.33 60.089c-6.17 12.326-6.17 23.111-33.9 23.111h-43.14l20.03-47.763h40.06c30.81 0 18.49 18.489 16.95 24.652M135.274 83.2 27.422 0l340.504 191.052L27.422 391.348l114.015-92.444c-6.163 1.54-13.866 1.54-20.029 1.54-66.252 0-118.637-49.303-118.637-109.392S56.696 81.659 121.408 81.659c3.081 1.541 9.244 1.541 13.866 1.541m-1.541 215.704c61.63 0 110.934-47.763 110.934-106.311S195.363 86.282 133.733 86.282 22.8 134.044 22.8 192.593c1.54 58.548 50.845 106.311 110.933 106.311\"/><path d=\"m47.452 232.652 6.163-13.867h20.03l24.651-50.844H75.185l6.163-13.867h101.689c36.978 0 49.304 21.57 46.222 41.6-1.541 15.407-10.785 36.978-58.548 36.978zm97.066-13.867c18.489 0 30.815-12.326 35.437-24.652 3.082-9.244 3.082-26.192-16.948-27.733h-13.866l-24.652 52.385z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h2500v416H0z\"/></clipPath></defs></svg>\n);\n\nconst EASportsLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1686\" height=\"879\" fill=\"none\" viewBox=\"0 0 1686 879\" className={className}><g fill=\"#000\" clip-path=\"url(#a)\"><path d=\"M343.536 40 232.145 211.767H924.91L1026.24 40z\"/><path d=\"M141.599 354.798 40.276 512.935h166.722L30.22 818.395h869.542l101.318-151.664-71.136-153.796h157.376l105.65-139.447 278.1 460.706h192.6L1197.99 45.023 985.993 354.798H687.767l126.47 306.911H323.411l96.3-148.774h151.63l100.616-158.137z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h1686v879H0z\"/></clipPath></defs></svg>\n);\n\nconst ClubChampLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"576\" height=\"125\" fill=\"none\" viewBox=\"0 0 576 125\" className={className}><g clip-path=\"url(#a)\"><path fill=\"#000\" d=\"M75.351 52.324a.624.624 0 0 1-.509.604c-1.918.35-4.208 1.389-6.922 2.788-2.948 1.516-6.138 1.431-9.51 2.353-1.685.467-3.53.509-4.96.435-1.432-.074-2.438-.265-2.438-.265s2.184-3.615 3.53-5.555c1.346-1.93 2.353-1.844 3.784-3.445s2.862-2.439 4.717-4.887c1.855-2.439 1.77-2.439 3.276-3.361 1.516-.933 2.28-1.855 2.28-2.523.837 1.007 3.116.838 3.116.838s.838.752 1.675 2.353c.848 1.6.933 4.124 1.516 6.647a17 17 0 0 1 .445 4.018m-27.838-.944a13 13 0 0 0-.742-2.523l5.46-3.01a15 15 0 0 0-1.305 1.96c-1.176 2.1-3.413 3.573-3.413 3.573m-2.629 16.018c-2.046 2.492-2.449 4.961-2.449 4.961s-.774-2.46 2.035-6.307c1.707-2.343 2.206-3.615 2.545-4.505.19-.488 0-1.018-.414-1.326-2.173-1.59-2.226-3.466-2.226-3.636 2.035 2.767 5.47 3.149 5.47 3.149-.604 1.897-2.608 4.802-4.961 7.664M33.753 49.811c-3.35-.72-4.24-1.272-5.333-.307 0 0 .297-1.58 2.577-1.431 1.685.117 4.95 1.537 8.216.933 0 0-.732 1.823-5.46.805m49.061 2.703c-.583-2.353-1.844-6.816-3.87-10.092-2.013-3.286-2.523-5.47-2.523-5.47s.425-.307-.084-1.155c-.435-.732-.752-1.05-1.548-1.686l1.802-.943a.485.485 0 0 0 .255-.498c-.042-.382-.222-.966-.816-1.251a.55.55 0 0 0-.499.01l-2.554 1.357c-.764-.498-1.548-.806-2.079-.466-.9.561-1.24.339-1.855.678-.614.328-1.007.668-1.622.668-.625 0-1.515 0-1.908.615-.392.625-1.632.625-2.13 1.124-.51.508-1.58.784-1.633 1.515a3.7 3.7 0 0 0 .159 1.336s-3.244 1.845-5.64 3.657c-.582.435-1.123.891-1.633 1.347l-8.332 4.622c-1.102-1.993-3.063-3.88-6.614-4.325-5.725-.721-7.697 3.445-7.697 3.445-5.597-.795-5.767 4.972-3.753 6.148 2.025 1.178 4.675.796 4.675.796s.085.636.35 1.155l-15.594 8.64c-.318.18-.7.222-1.05.138-3.434-.86-4.865.042-5.087 2.682-.245 2.862 1.462 3.922 2.162 4.007.551.064 1.59.276 2.491-1.516.467-.933.88-2.322 1.155-3.35.138-.498.467-.922.923-1.177L33.87 55.95c.106.191.222.424.265.647.084.466.752 2.406 2.65 3.752 0 0-.922 1.304-2.057 2.693-1.473 1.792-1.23 4.961.329 8.036s3.752 3.826 5.343 6.18c0 0 4.039 4.972 5.64 10.611 1.6 5.63 3.37 7.909 3.2 11.778s-.423 3.954.086 7.909c.095.763.18 1.632.243 2.565 8.545-2.756 17.344-7.294 25.56-13.336-.34-1.283-.817-2.576-1.485-4.209-1.43-3.53-3.784-8.162-4.706-12.625-.796-3.827-1.474-7.782-2.12-9.775 0 0-1.23-3.784-3.584-6.572 0 0 3.053.944 4.961 3.976.796-.785 1.114-.986 2.174-1.93a103 103 0 0 1 3.18-2.725.57.57 0 0 0 .201-.561l-.032-.191a.61.61 0 0 1 .266-.615c1.155-.732 5.046-3.223 6.901-4.58 2.184-1.6 2.523-2.098 1.93-4.463\"/><path fill=\"#000\" d=\"M119.65 22.343C105.446 2.113 68.585 5.64 37.317 30.22q-.794.625-1.572 1.26c31.624-18.506 59.25-23.812 71.473-6.404 12.444 17.724-.05 49.845-27.906 71.743s-60.526 25.282-72.97 7.557c-4.264-6.073-5.6-13.837-4.392-22.3-3.704 10.734-1.927 21.523 3.599 29.393 14.203 20.23 51.934 16.59 83.203-7.99 31.267-24.58 45.101-60.906 30.898-81.136\"/><path fill=\"#000\" d=\"M6.103 60.347C12.47 49.822 20.977 39.825 31.75 30.774c33.253-27.938 73.512-32.913 89.922-11.112 3.532 4.693 5.668 10.245 6.519 16.346 1.311-8.668-1.685-16.92-6.456-23.259-15.832-21.034-55.58-15.473-88.778 12.42C20.98 35.23 11.24 48.572 6.103 60.346M170.735 60.317c-.071 3.465-.144 4.456-.408 5.574-.714 2.857-2.251 4.245-4.696 4.245-1.895 0-3.527-1.056-4.152-2.681-.547-1.507-.742-3.28-.742-6.777V45.085c0-3.777.207-5.048 1.066-6.504.689-1.316 2.049-2.04 3.828-2.04 3.293 0 4.962 2.567 4.962 7.63v1.5h8.266v-1.92c0-9.427-4.946-15.054-13.228-15.054-4.52 0-8.186 1.622-10.319 4.563-2.256 3.059-2.84 5.792-2.84 13.3v13.135c0 7.089.499 9.848 2.323 12.839 2.121 3.511 5.996 5.445 10.906 5.445 8.746 0 13.368-5.546 13.368-16.037v-2.13h-8.325zM197.748 29.399h-8.266v47.878h22.664v-7.703h-14.398zM237.52 62.855c0 6.043-1.844 7.28-4.612 7.28-2.891 0-4.681-1.217-4.681-7.28V29.399h-8.266V61.66c0 6.008.726 9.121 2.771 11.897 2.121 2.85 5.735 4.421 10.176 4.421 4.397 0 7.987-1.57 10.108-4.424 2.045-2.775 2.769-5.887 2.769-11.894V29.4h-8.265zM265.213 48.503h-2.082V37.102h2.224c2.58 0 3.954.365 5.054 1.335 1.028.964 1.594 2.377 1.594 3.979 0 3.698-2.666 6.087-6.79 6.087m-2.082 7.704h2.082c4.722 0 7.772 2.858 7.772 7.28 0 3.925-2.385 6.087-6.718 6.087h-3.136zm10.644-3.981c4.517-1.84 6.634-5.194 6.634-10.441 0-7.872-5.181-12.386-14.212-12.386h-11.332v47.878h12.244c9.031 0 14.423-5.154 14.423-13.79 0-5.939-2.271-9.292-7.757-11.261M326.642 60.317c-.071 3.465-.143 4.456-.407 5.574-.715 2.857-2.251 4.245-4.697 4.245-1.895 0-3.527-1.056-4.152-2.681-.547-1.507-.742-3.28-.742-6.777V45.085c0-3.777.207-5.048 1.066-6.504.689-1.316 2.049-2.04 3.828-2.04 3.293 0 4.962 2.567 4.962 7.63v1.5h8.266v-1.92c0-9.427-4.946-15.054-13.228-15.054-4.52 0-8.186 1.622-10.319 4.563-2.256 3.059-2.84 5.792-2.84 13.3v13.135c0 7.089.5 9.848 2.323 12.839 2.122 3.511 5.996 5.445 10.906 5.445 8.746 0 13.368-5.546 13.368-16.037v-2.13h-8.325zM363.019 48.925h-9.294V29.399h-8.265v47.878h8.265v-20.65h9.294v20.65h8.265V29.399h-8.265zM397.96 59.39h-6.42l3.18-17.61zm-8.585-29.991-9.189 47.878h8.146l1.896-10.184h9.12l1.966 10.184h8.501l-9.691-47.878zM435.802 56.952l-6.052-27.553h-11.534v47.878h7.914v-30.54l7.152 30.54h4.891l7.224-30.577v30.577h7.913V29.399h-11.393zM470.305 37.102h2.644c5.539 0 7.142 1.507 7.142 6.719 0 5.266-1.603 6.79-7.142 6.79h-2.644zm4.26-7.703H462.04v47.878h8.265V58.313h4.26c4.851 0 7.899-.946 10.187-3.16 2.651-2.503 3.884-6.103 3.884-11.332 0-5.11-1.271-8.794-3.88-11.257-2.292-2.218-5.34-3.165-10.191-3.165M497.224 77.277h8.265V29.399h-8.265zM523.116 44.945c0-3.771.225-4.893.851-6.145.76-1.393 2.361-2.26 4.182-2.26 1.82 0 3.423.867 4.179 2.252.711 1.356.855 2.391.855 6.153v16.786c0 3.762-.144 4.797-.851 6.145-.76 1.393-2.363 2.26-4.183 2.26s-3.422-.867-4.174-2.245c-.634-1.268-.859-2.39-.859-6.16zm5.033-16.248c-4.69 0-8.333 1.63-10.534 4.712-1.963 2.762-2.764 6.064-2.764 11.395v17.068c0 5.33.801 8.632 2.765 11.395 2.2 3.083 5.843 4.712 10.533 4.712s8.334-1.63 10.534-4.713c1.964-2.762 2.765-6.063 2.765-11.394V44.804c0-5.331-.801-8.633-2.765-11.396-2.2-3.082-5.844-4.711-10.534-4.711M568.086 29.399v27.015L557.15 29.4h-8.168v47.878h7.914V48.219l11.78 29.058H576V29.399z\"/><path fill=\"#505153\" d=\"M203.588 108.032V103.8h-4.703v4.232zm-.248-6.708v-4.132h-4.455v4.132zm.595 9.331h-8.044V94.569h8.044c1.757 0 2.376.94 2.376 2.722v3.416c0 .817-.248 1.41-.744 1.732.718.321 1.016.989 1.016 2.053v3.515c0 1.362-.792 2.648-2.648 2.648M211.775 94.569h9.38v2.673h-6.385v4.058h4.529v2.624h-4.529v4.058h6.385v2.673h-9.38zM229.812 97.291h-4.009V94.57h11.038v2.722h-4.009v13.364h-3.02zM245.053 97.291h-4.011V94.57h11.04v2.722h-4.01v13.364h-3.019zM257.027 94.569h9.38v2.673h-6.385v4.058h4.529v2.624h-4.529v4.058h6.385v2.673h-9.38zM279.172 103.033v-5.717h-4.676v5.717zm-7.672 7.622V94.569h8.391c1.608 0 2.226.89 2.226 2.722v5.84c0 1.436-.469 2.228-1.608 2.426l1.732 5.098h-2.994l-1.634-4.999h-3.117v4.999zM296.737 94.569h9.578v2.722h-6.583v4.801h4.825v2.673h-4.825v5.89h-2.995zM311.358 94.569h2.995v16.086h-2.995zM323.36 97.291h-4.009V94.57h11.038v2.722h-4.009v13.364h-3.02zM336.373 110.655h-3.019v-2.698h3.019zM350.476 94.569h2.995v13.339h6.533v2.747h-9.528zM373.141 107.908V97.316h-5.073v10.592zm-8.018-.025V97.117c0-1.732.89-2.548 2.4-2.548h6.138c1.831 0 2.451 1.064 2.451 2.97v10.196c0 1.683-.916 2.92-2.699 2.92h-5.692c-1.46 0-2.598-.866-2.598-2.772M380.858 94.569h3.07l1.881 13.091h.148l2.128-13.091h3.663l2.277 13.091h.148l1.856-13.091h3.02l-2.847 16.086h-4.082l-2.104-12.324h-.15l-2.029 12.324h-4.083zM403.819 94.569h9.381v2.673h-6.385v4.058h4.528v2.624h-4.528v4.058h6.385v2.673h-9.381zM425.989 103.033v-5.717h-4.676v5.717zm-7.672 7.622V94.569h8.391c1.608 0 2.227.89 2.227 2.722v5.84c0 1.436-.47 2.228-1.608 2.426l1.732 5.098h-2.995l-1.633-4.999h-3.118v4.999zM454.023 107.735c0 1.782-.891 2.92-2.648 2.92h-5.371c-1.485 0-2.623-.866-2.623-2.796v-2.623h2.97v2.746h4.728v-3.093l-6.288-2.549c-1.064-.471-1.41-1.064-1.41-2.352v-2.994c0-1.733.891-2.425 2.499-2.425h5.593c1.956 0 2.55.99 2.55 2.97v2.202h-2.944v-2.5h-4.728v2.699l6.336 2.549c1.04.469 1.336 1.039 1.336 2.375zM469.932 104.517v3.267c0 1.585-.668 2.871-2.674 2.871h-5.345c-1.659 0-2.697-.916-2.697-2.846V97.291c0-1.956.89-2.722 2.524-2.722h5.569c2.004 0 2.623.99 2.623 2.97v2.276h-2.97v-2.499h-4.802v10.592h4.802v-3.391zM483.193 107.908V97.316h-5.074v10.592zm-8.02-.025V97.117c0-1.732.892-2.548 2.402-2.548h6.137c1.832 0 2.451 1.064 2.451 2.97v10.196c0 1.683-.916 2.92-2.698 2.92h-5.693c-1.46 0-2.599-.866-2.599-2.772M499.002 103.033v-5.717h-4.677v5.717zm-7.673 7.622V94.569h8.391c1.608 0 2.228.89 2.228 2.722v5.84c0 1.436-.471 2.228-1.61 2.426l1.732 5.098h-2.993l-1.635-4.999h-3.117v4.999zM507.412 94.569h9.38v2.673h-6.385v4.058h4.529v2.624h-4.529v4.058h6.385v2.673h-9.38zM532.576 107.735c0 1.782-.889 2.92-2.648 2.92h-5.369c-1.486 0-2.624-.866-2.624-2.796v-2.623h2.969v2.746h4.728v-3.093l-6.287-2.549c-1.064-.471-1.41-1.064-1.41-2.352v-2.994c0-1.733.89-2.425 2.5-2.425h5.593c1.955 0 2.548.99 2.548 2.97v2.202h-2.944v-2.5h-4.728v2.699l6.336 2.549c1.04.469 1.336 1.039 1.336 2.375zM540.912 110.655h-3.018v-2.698h3.018z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h576v124.56H0z\"/></clipPath></defs></svg>\n)\n\nconst GolfweekLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"767\" height=\"148\" fill=\"none\" viewBox=\"0 0 767 148\" className={className}><g clip-path=\"url(#a)\"><path fill=\"#000\" d=\"m104.3 142.3-.6-13.7c-3.3 5.8-8.6 10.3-16 13.6-7.3 3.2-15.8 4.9-25.3 4.9s-18.2-2-25.8-6.1a62.2 62.2 0 0 1-19.7-16.4c-5.5-6.8-9.6-14.7-12.6-23.6C1.5 92 0 82.8 0 73.2c0-10.1 1.5-19.6 4.4-28.5a67 67 0 0 1 12.9-23.3C23 14.8 30 9.5 38.5 5.7 46.8 1.9 56.6 0 67.8 0c8.2 0 15.8 1.2 23 3.5 7.1 2.4 13.3 5.6 18.7 9.7 5.3 4.1 9.6 9.1 12.9 14.8a45.3 45.3 0 0 1 5.7 19H98.9q-.6-4.8-3.3-9c-1.8-2.8-4.1-5.3-6.9-7.4s-6-3.7-9.7-5a36.2 36.2 0 0 0-11.3-1.9c-11.6 0-21 4.3-28 13-7 8.6-10.5 21.2-10.5 37.6 0 5.7.7 11.4 2.2 17.1s3.7 10.9 6.9 15.6c3.1 4.6 7.1 8.4 12 11.3s10.6 4.4 17.3 4.4c4.7 0 9.1-.8 13.2-2.5s7.7-3.9 10.7-6.8 5.4-6.3 7.2-10.1c1.7-3.8 2.6-7.8 2.6-12.1H70.7v-23h57.5v74.1zm79.5 2.7q-12.45 0-22.2-3.9c-6.5-2.6-12-6.3-16.5-11s-7.9-10.4-10.2-17c-2.3-6.7-3.5-13.9-3.5-21.8 0-8 1.2-15.4 3.6-22a46.05 46.05 0 0 1 27-27.9c6.4-2.6 13.7-3.8 21.8-3.8 8 0 15.2 1.3 21.5 3.8 6.3 2.6 11.8 6.2 16.3 10.8s7.9 10.3 10.4 16.9q3.6 10.05 3.6 22.2c0 8.2-1.2 15.6-3.6 22.1-2.4 6.6-5.9 12.2-10.4 16.9s-9.9 8.4-16.4 10.9c-6.4 2.5-13.5 3.8-21.4 3.8m.1-22.6c16.5 0 24.7-10.4 24.7-31.1 0-20.6-8.2-30.9-24.7-30.9s-24.7 10.3-24.7 30.9c0 20.7 8.2 31.1 24.7 31.1M239.1 2.9h27v139.4h-27zm46.1 139.4v-83H270V40.2h15.1c0-24.9 14.5-37.3 43.6-37.3v21.8c-3.5 0-6.3.2-8.4.7s-3.8 1.3-5.1 2.6c-1.2 1.2-2.1 2.9-2.6 4.9s-.7 4.5-.7 7.4h17.4v19.1H312v83h-26.8zm135.6 0L404.7 83l-16.2 59.3h-27.6l-29-102.1h28.4l16.6 65.6L391 40.2h27.4l15.9 65.6 15.6-65.6h27.8l-29.3 102.1zm77.3-44c.4 7.7 2.7 13.9 6.7 18.5 4.1 4.6 9.4 6.8 16.1 6.8q6.6 0 11.7-3c3.4-2 5.6-4.8 6.5-8.4h27.8c-3.2 10.5-8.7 18.6-16.6 24.3S533 145 522.1 145c-34 0-51-18.5-51-55.6 0-7.9 1.1-15 3.3-21.4s5.4-11.8 9.6-16.4a41 41 0 0 1 15.5-10.5q9.15-3.6 21-3.6c15.8 0 27.7 5.1 35.8 15.1 8.1 10.1 12.1 25.3 12.1 45.6h-70.3zm42.5-17c-.1-3.7-.8-7-2-9.9-1.2-2.8-2.7-5.2-4.7-7.1-1.9-1.9-4.1-3.2-6.6-4.1s-5.1-1.3-7.7-1.3c-5.4 0-10.1 2-14 5.9s-6.2 9.4-6.7 16.5zm57.9 17c.4 7.7 2.7 13.9 6.7 18.5 4.1 4.6 9.4 6.8 16.1 6.8q6.6 0 11.7-3c3.4-2 5.6-4.8 6.5-8.4h27.8c-3.2 10.5-8.7 18.6-16.6 24.3s-17.3 8.5-28.2 8.5c-34 0-51-18.5-51-55.6 0-7.9 1.1-15 3.3-21.4s5.4-11.8 9.6-16.4a41 41 0 0 1 15.5-10.5q9.15-3.6 21-3.6c15.8 0 27.7 5.1 35.8 15.1 8.1 10.1 12.1 25.3 12.1 45.6h-70.3zm42.5-17c-.1-3.7-.8-7-2-9.9-1.2-2.8-2.7-5.2-4.7-7.1-1.9-1.9-4.1-3.2-6.6-4.1s-5.1-1.3-7.7-1.3c-5.4 0-10.1 2-14 5.9s-6.2 9.4-6.7 16.5zm31.9-78.4v139.4h27v-32.4L713 96.5l22.4 45.8h30.2l-33.3-64.5 34.2-37.6h-33L699.9 79V2.9zm33.7 4.3h.9l1.4 2.1h.7l-1.4-2.1c.6-.1 1.2-.5 1.2-1.3 0-.9-.4-1.3-1.5-1.3H706v4.7h.6zm0-2.1h1.1c.5 0 1.1.2 1.1.8 0 .8-.7.8-1.4.8h-.8zM703.4 7c0 2.3 1.8 4.1 4.1 4.1s4.1-1.8 4.1-4.1-1.8-4.1-4.1-4.1-4.1 1.8-4.1 4.1m.6 0c0-1.9 1.6-3.5 3.5-3.5S711 5.1 711 7s-1.6 3.5-3.5 3.5c-2 0-3.5-1.6-3.5-3.5\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h766.5v147.1H0z\"/></clipPath></defs></svg>\n)\n\nconst MMGLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"500\" height=\"465\" fill=\"none\" viewBox=\"0 0 500 465\" className={className}><g clip-path=\"url(#a)\"><mask id=\"b\" width=\"500\" height=\"465\" x=\"0\" y=\"0\" maskUnits=\"userSpaceOnUse\"><path fill=\"#fff\" d=\"M0 0h500v465H0z\"/></mask><g fill=\"#000\" mask=\"url(#b)\"><path d=\"M435.59 226.67h49.02S471.32 1.22 185.09 0c0 0 221.42 20.38 250.5 226.67\"/><path d=\"M379.18 226.67h35.17S404.81 64.88 199.41 64c0 0 158.9 14.63 179.77 162.67\"/><path d=\"M333.78 219.92h22.39s-6.07-102.99-136.83-103.55c0 0 101.15 9.31 114.44 103.55M62.65 237.71H13.64s13.29 225.44 299.52 226.66c0 0-221.43-20.38-250.51-226.66\"/><path d=\"M119.07 237.71H83.89s9.53 161.78 214.94 162.66c0 0-158.9-14.63-179.76-162.66\"/><path d=\"M164.46 244.46h-22.39s6.07 103 136.84 103.55c0 0-101.16-9.32-114.45-103.55M36.31 189.44l-15.82 23.03-15.82-23.03-.04.02H0v28.86h4.67v-19.38l13.3 19.37v.01H23v-.01l13.3-19.37v19.38h4.67v-28.86h-4.63zM272.91 189.44l-15.81 23.03-15.82-23.03-.04.02h-4.63v28.86h4.67v-19.38l13.3 19.37v.01h5.03v-.01l13.3-19.37v19.38h4.67v-28.86h-4.63zM46.5 189.34v28.86h28.86v-4.67H51.17v-7.43h24.19v-4.67H51.17V194h24.19v-4.67H46.5z\"/><path fill-rule=\"evenodd\" d=\"m112.6 190.41 19.88 28.88h-6.57l-6.52-9.5h-18.61l-6.52 9.5h-6.57l19.87-28.87v-.01zm3.59 14.72-6.1-8.88-6.1 8.88z\" clip-rule=\"evenodd\"/><path d=\"M325.2 189.24h-6.68l-14.61 13.25-14.55-13.2-.06-.05h-6.67l18.82 17.03.09.09.04-.02v11.85h4.67v-11.85l.04.02zM166.96 211.23l-26.56-21.87h-4.67v28.86h4.67v-21.89l26.56 21.87h4.67v-28.86h-4.67z\"/><path fill-rule=\"evenodd\" d=\"M203.68 189.59c.95.01 1.89.19 2.77.56.88.36 1.68.9 2.35 1.57s1.2 1.47 1.57 2.35c.36.88.55 1.82.55 2.77v13.62c0 .96-.19 1.9-.55 2.78-.37.88-.9 1.67-1.57 2.35a7.3 7.3 0 0 1-2.35 1.57c-.88.36-1.82.55-2.77.55h-27.1v-28.12zm2.57 7.25a2.55 2.55 0 0 0-1.59-2.38c-.31-.13-.65-.19-.98-.2h-22.43v18.78h22.43a2.63 2.63 0 0 0 1.82-.76c.24-.24.43-.52.56-.83s.19-.65.19-.99z\" clip-rule=\"evenodd\"/><path d=\"M253.03 264.78h-10.4v8.33h10.4c.18 0 .35.03.51.1.16.06.3.16.42.28.13.12.22.27.29.43s.1.33.1.5v14.15c0 .17-.03.34-.1.5s-.16.31-.29.43c-.12.12-.26.22-.42.29-.16.06-.33.1-.51.1h-54.67a1 1 0 0 1-.42-.09c-.13-.05-.25-.13-.35-.23q-.15-.15-.24-.36a1.1 1.1 0 0 1-.08-.41v-41.18c0-.14.03-.28.08-.42.05-.13.14-.25.24-.35s.22-.18.35-.24c.13-.05.27-.08.42-.08h63.48v-8.33h-63.48a9.5 9.5 0 0 0-3.6.73 9.3 9.3 0 0 0-3.06 2.04c-.87.87-1.56 1.91-2.04 3.05a9.5 9.5 0 0 0-.72 3.6v41.18c0 1.23.25 2.46.72 3.6a9.5 9.5 0 0 0 2.04 3.05c.88.87 1.91 1.57 3.06 2.04 1.14.48 2.36.72 3.6.72h54.67c1.27 0 2.52-.25 3.69-.74a9.5 9.5 0 0 0 3.13-2.09c.89-.89 1.6-1.95 2.09-3.12.48-1.17.73-2.43.73-3.69l.01-14.15a10 10 0 0 0-.74-3.69 9.8 9.8 0 0 0-2.09-3.12c-.9-.9-1.96-1.61-3.13-2.09a9.5 9.5 0 0 0-3.69-.74\"/><path fill-rule=\"evenodd\" d=\"M338.86 237.38c1.3 0 2.6.25 3.8.75 1.21.51 2.31 1.24 3.23 2.16a9.95 9.95 0 0 1 2.92 7.03v40.94a9.96 9.96 0 0 1-2.92 7.04 9.9 9.9 0 0 1-3.23 2.15c-1.2.5-2.5.76-3.8.76H283.6a9.56 9.56 0 0 1-6.745-2.795 9.564 9.564 0 0 1-2.795-6.745v-41.75c0-1.25.25-2.49.73-3.65a9.5 9.5 0 0 1 2.07-3.1c.88-.88 1.93-1.59 3.09-2.07a9.5 9.5 0 0 1 3.65-.72zm1.51 9.94c0-.19-.04-.39-.12-.57-.07-.19-.18-.35-.32-.49s-.31-.26-.49-.33a1.5 1.5 0 0 0-.58-.12H283.6c-.14 0-.29.03-.42.09a.94.94 0 0 0-.36.24q-.15.15-.24.36c-.05.13-.08.27-.08.42v41.75c0 .14.03.29.08.42q.09.21.24.36c.1.1.23.19.36.24.13.06.28.09.42.08l55.26.01c.2-.01.39-.04.58-.12.18-.08.35-.19.49-.33s.25-.31.32-.49c.08-.18.12-.38.12-.58z\" clip-rule=\"evenodd\"/><path d=\"M500 245.69v-8.32h-64.18v60.84h8.33v-25.05h52.52v-8.33h-52.52v-19.14zM430.08 298.21H365.9v-60.84h8.32v52.52h55.85z\"/></g></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h500v465H0z\"/></clipPath></defs></svg>\n)\n\nconst SkillestLogo: React.FC<{ className?: string }> = ({ className }) => (\n    <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"397\" height=\"184\" fill=\"none\" viewBox=\"0 0 397 184\" className={className}><path fill=\"#000\" fill-rule=\"evenodd\" d=\"M45.057 93.541c-7.683 0-14.614 2.171-20.237 6.493-5.191 4.115-9.084 10.272-9.084 18.164 0 9.624 7.13 16.978 15.789 19.029l16.244 3.893c4.113.971 7.354 4.003 7.354 8.544 0 7.779-8.332 11.137-15.04 11.137-5.956 0-10.715-1.081-14.185-5.622-1.944-2.593-3.028-5.735-3.028-8.976H8.482v1.729c0 6.167 2.918 12.433 7.576 16.868 6.276 5.951 14.279 8.218 23.373 8.218 8.55 0 16.993-2.593 22.726-7.892 4.436-4.109 7.257-9.734 7.257-16.868 0-10.918-7.91-18.275-17.213-20.436l-15.905-3.789c-2.602-.642-6.17-2.916-6.17-7.56 0-3.574 2.054-6.277 4.756-8.112 2.815-1.841 5.853-2.699 9.204-2.699 7.473 0 14.607 3.996 14.607 12.214H73.09v-.758c0-5.948-2.496-11.569-6.821-15.894-5.191-5.193-12.012-7.68-21.213-7.68M139.261 115.386h-18.295l-24.353 22.383 7.789-44.228H90.77l-13.749 78.074h13.636l2.598-14.484 11.147-10.17 11.587 24.654h15.146l-16.447-33.846zm-.3 56.229h13.856l9.849-56.229H148.81zm134.698-33.736h-25.761c1.078-3.783 2.815-7.138 5.74-9.621 2.053-1.735 5.404-3.358 8.868-3.358 3.793 0 6.495 1.297 8.335 3.248 2.06 2.268 2.925 5.296 2.925 8.222 0 .535-.107.97-.107 1.509m-10.068-23.896c-8.013 0-14.931 3.461-19.153 7.46-5.524 5.189-8.884 12.001-10.172 19.468a41 41 0 0 0-.652 7.237c0 6.167 2.372 13.521 6.921 18.058 4.116 4.113 9.962 6.815 16.886 6.815 7.574 0 13.743-2.599 17.969-6.599 3.36-3.134 5.407-6.599 6.711-10.811h-12.99c-1.837 4.435-6.173 6.483-11.037 6.483-3.577 0-7.254-1.513-9.417-4.648-2.056-3.025-2.17-6.269-2.17-9.727h38.965c.113-.648.326-1.19.432-1.951.433-2.374.656-4.648.656-6.915 0-4.973-.549-8.005-2.815-12.975-3.251-6.922-10.721-11.895-20.134-11.895m56.629 0c-5.73 0-10.92 1.403-14.93 4.109-4.868 3.351-8.116 8.431-8.116 14.594 0 4.329 1.411 7.141 3.9 9.737 2.596 2.7 6.272 4 9.849 4.861l11.686 2.816c2.922.644 4.542 2.593 4.542 5.186 0 5.295-5.194 7.244-10.172 7.244-3.893 0-8.119-.971-10.172-3.568-1.297-1.619-2.276-3.457-2.276-6.05H291.98v.429c0 4.328 1.627 8.218 3.571 11.027 4.442 6.276 12.77 8.65 20.347 8.65 6.272 0 12.335-1.19 16.774-4.431 4.974-3.674 7.253-8.544 7.253-14.488 0-4.112-1.623-7.676-4.325-10.276-1.95-1.838-5.085-3.783-8.342-4.541l-11.573-2.809c-2.602-.652-5.524-1.945-5.524-5.186 0-1.955.872-3.571 2.273-4.764 1.73-1.513 4.658-2.271 6.928-2.271 4.222 0 7.031 1.087 8.984 3.464 1.081 1.29 1.62 2.919 1.62 5.186v.113h12.665v-.758c0-3.354-1.411-6.918-3.351-9.734-4.116-5.944-11.48-8.543-19.06-8.543zm52.963 12.54h14.075l2.05-11.137H375.13l3.138-18.271-14.285 4.219-2.492 14.052h-10.063l-1.953 11.137h10.076l-4.446 25.521c-.323 2.055-.536 4-.536 5.725 0 4.548 1.295 8.112 4.22 10.924 2.595 2.49 6.385 3.677 10.824 3.677 4.003 0 7.786-.865 11.573-2.487l2.063-11.785c-2.383.977-5.524 1.948-8.662 1.948-4.222 0-6.275-1.842-6.275-5.086 0-.539 0-1.084.11-1.619l4.758-26.818zM178.391 31.95h-14.61l-2.496 13.949h14.617zm31.471-10.781h-14.328l-26.922 150.446h21.638l2.486-13.946h-7.38zm34.513-13.075h-14.328l-29.488 163.521h22.154l2.492-13.946h-7.886z\" clip-rule=\"evenodd\"/></svg>\n)\n\nconst GBCLogo: React.FC<{ className?: string }> = ({ className }) => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"2042\" height=\"322\" fill=\"none\" viewBox=\"0 0 2042 322\" className={className}><g fill=\"#000\" clip-path=\"url(#a)\"><path d=\"M182.45 78.497v162.366c0 55.912-43.974 81.228-89.04 81.228-36.508 0-65.824-14.024-80.846-41.616l37.51-21.491c7.192 13.295 18.39 23.859 44.702 23.859 27.586 0 44.702-15.026 44.702-41.98v-18.395c-11.927 16.027-30.318 25.953-54.535 25.953C36.508 248.33 0 209.081 0 161c0-47.717 36.508-87.33 84.943-87.33 24.217 0 42.608 9.926 54.535 25.953V78.497zM139.478 161c0-26.955-20.121-46.351-47.707-46.351S44.065 134.136 44.065 161c0 27.319 20.12 46.716 47.706 46.716s47.707-19.397 47.707-46.716M208.397 163.732c0-50.813 39.877-90.062 90.041-90.062 50.165 0 90.406 39.249 90.406 90.062s-40.241 90.062-90.406 90.062c-50.164 0-90.041-39.249-90.041-90.062m136.382 0c0-27.592-20.12-47.08-46.341-47.08-25.947 0-46.067 19.488-46.067 47.08s20.12 47.08 46.067 47.08c26.221 0 46.341-19.488 46.341-47.08M412.97 0h43.974v248.967H412.97V0M551.083 76.766v1.73h36.144v42.254h-36.144v128.217h-43.974V120.75h-24.582V78.497h24.582v-1.73c0-47.08 25.947-74.673 80.118-71.303v42.253c-22.852-1.639-36.144 5.828-36.144 29.05M801.723 163.732c0 50.813-37.509 90.062-83.213 90.062-24.855 0-42.972-9.198-55.263-24.861v20.125h-43.974V10.199h43.974v88.332c12.291-15.663 30.317-24.86 55.263-24.86 45.704 0 83.213 39.248 83.213 90.061m-43.973 0c0-28.685-20.121-48.082-47.434-48.082-26.948 0-47.069 19.488-47.069 48.082 0 28.685 20.121 48.081 47.069 48.081 27.313 0 47.434-19.396 47.434-48.081M1004.66 78.497v170.561h-43.976v-20.125c-12.291 15.39-30.681 24.861-55.627 24.861-45.339 0-82.849-39.249-82.849-90.062s37.51-90.062 82.849-90.062c24.855 0 43.336 9.562 55.627 24.86V78.498zm-43.976 85.235c0-28.685-20.12-48.082-47.433-48.082-26.949 0-47.069 19.488-47.069 48.082 0 28.685 20.12 48.081 47.069 48.081 27.313 0 47.433-19.396 47.433-48.081M1086.78 0h-43.98v248.967h43.98zM1172.72 0h-43.97v248.967h43.97zM1337.15 199.247c0 36.88-32.05 54.547-68.56 54.547-34.14 0-59.36-14.297-71.65-40.615l38.24-21.491c4.73 14.024 16.39 22.129 33.41 22.129 14.02 0 23.49-4.736 23.49-14.661 0-24.861-87.95-11.292-87.95-71.303 0-34.786 29.68-54.274 64.83-54.274 27.58 0 51.53 12.658 64.82 36.152l-37.51 20.49c-5.1-10.928-14.66-17.393-27.31-17.393-10.93 0-19.76 4.735-19.76 14.023 0 25.316 87.95 9.562 87.95 72.396M1357.9 237.038c0-8.56 6.47-15.39 15.39-15.39 8.56 0 15.39 6.83 15.39 15.39s-6.83 15.39-15.39 15.39c-8.83 0-15.39-6.83-15.39-15.39M1400.24 163.732c0-50.449 38.24-89.06 89.68-89.06 33.41 0 62.09 17.029 74.38 43.619l-14.02 8.196c-9.93-21.491-33.05-35.515-60.36-35.515-41.25 0-72.29 32.055-72.29 72.669s31.04 72.668 72.29 72.668c27.58 0 50.16-14.297 61.36-35.514l14.29 8.56c-13.65 26.226-42.24 43.346-75.74 43.346-51.44.091-89.59-38.52-89.59-88.969M1584.69 163.732c0-50.449 39.88-89.06 89.68-89.06 49.44 0 89.31 38.52 89.31 89.06 0 50.449-39.87 89.06-89.31 89.06-49.71 0-89.68-38.611-89.68-89.06m161.69 0c0-40.614-31.41-72.669-71.92-72.669-40.6 0-72.29 32.055-72.29 72.669s31.69 72.668 72.29 72.668c40.51 0 71.92-32.054 71.92-72.668M2042 140.875v108.092h-17.02V140.875c0-32.418-18.76-49.812-45.34-49.812-28.68 0-51.17 19.124-51.17 62.743v95.161h-17.03V140.875c0-32.418-17.38-49.812-43.6-49.812-27.95 0-52.9 19.124-52.9 62.743v95.161h-17.03V78.497h17.03v29.322c12.65-23.494 33.05-33.056 54.9-33.056 24.85 0 44.34 12.294 53.17 34.786 12.29-23.858 34.05-34.786 56.9-34.786 36.23-.091 62.09 23.494 62.09 66.112\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"M0 0h2042v322H0z\"/></clipPath></defs></svg>\n)\n\n\n\n// Map of partner IDs to their logo components\nconst PARTNER_LOGOS: Record<string, React.FC<{ className?: string }>> = {\n  ping: PingLogo,\n  cobra: CobraLogo,\n  taylormade: TaylorMadeLogo,\n  callaway: CallawayLogo,\n  cleveland: ClevelandLogo,\n  dunlopsports: ClevelandLogo,\n  easports: EASportsLogo,\n  'clubchampion-instore': ClubChampLogo,\n  clubchampion: ClubChampLogo,\n  golfweek: GolfweekLogo,\n  mmg: MMGLogo,\n  skillest: SkillestLogo,\n  gbc: GBCLogo,\n};\n\nexport interface PartnerLogoProps {\n  className?: string;\n}\n\nexport const PartnerLogo: React.FC<PartnerLogoProps> = ({ className }) => {\n  const partner = getPartnerFromWindowLocation();\n\n  if (!partner) {\n    return null;\n  }\n\n  const LogoComponent = PARTNER_LOGOS[partner.toLowerCase()];\n\n  if (!LogoComponent) {\n    return null;\n  }\n\n  return <LogoComponent className={className} />;\n};\n\n// Hook to check if current partner has a logo\nexport const useHasPartnerLogo = (): boolean => {\n  const partner = getPartnerFromWindowLocation();\n  return !!partner && !!PARTNER_LOGOS[partner.toLowerCase()];\n};\n\nexport default PartnerLogo;\n","\"use client\";\nimport React from 'react'\nimport { useEffect, useState } from \"react\";\nimport styles from \"./header.module.css\";\nimport { CrownLockup } from \"./crown-lockup\";\nimport { PartnerLogo, useHasPartnerLogo } from \"./partner-logo\";\n\nexport default function AlpsNextHeader() {\n  const [isScrolled, setIsScrolled] = useState(false);\n  const hasPartnerLogo = useHasPartnerLogo();\n\n  useEffect(() => {\n    const handleScroll = () => {\n      setIsScrolled(window.scrollY > 0);\n    };\n\n    window.addEventListener(\"scroll\", handleScroll, { passive: true });\n    return () => window.removeEventListener(\"scroll\", handleScroll);\n  }, []);\n\n  return (\n    <header\n      className={`${styles.header}${hasPartnerLogo ? ` ${styles.hasPartner}` : \"\"}${isScrolled ? ` ${styles.scrolled}` : \"\"}`}\n    >\n      <CrownLockup className={styles.arccosLogo} />\n      {hasPartnerLogo && (\n        <>\n          <div className={styles.partnerDivider}></div>\n          <PartnerLogo className={styles.partnerLogo} />\n        </>\n      )}\n    </header>\n  );\n}\n","import React from \"react\";\nimport { getDynamicContentHeaderPartnerLogo } from \"../../data/initial-state/intial-state-accessors.mjs\";\nimport { PartnerHeader } from \"../common-components/header/partner-header\";\nimport { Header } from \"../common-components/header/header\";\nimport { isOnPageWithLocation, Page } from \"../../util/navigation.mts\";\nimport { useTransitionContext } from \"./transition-context\";\nimport {\n  useShouldUseAlpsExperiment,\n  getIsAlpsNext,\n  getIsCk14Experience,\n  getIsVintageExperience,\n} from \"../../util/alps-experiment.mts\";\nimport AlpsNextHeader from \"../pages/alps-next/components/header/header\";\n\nexport const ConditionalHeaderManager: React.FC = () => {\n  const isAlpsExperiment = useShouldUseAlpsExperiment();\n  const isAlpsNext = getIsAlpsNext();\n  const isVintage = getIsVintageExperience();\n  const { displayLocation } = useTransitionContext();\n\n  const isOnPaymentPage = isOnPageWithLocation(\n    Page.PAYMENT,\n    displayLocation.pathname,\n  );\n\n  const isCK14 = getIsCk14Experience();\n\n  // Vintage uses the legacy <Header /> (dark #242424 background by default),\n  // matching the UCAP design's dark header band. This branch must run before\n  // the CK14/alps-next branch since vintage triggers isCK14=true.\n  if (isVintage) {\n    if (isOnPaymentPage) return null;\n    return <Header />;\n  }\n\n  if (isCK14 || isAlpsNext) {\n    if (isOnPaymentPage) return null;\n    return <AlpsNextHeader />;\n  }\n\n  return (\n    <>\n      {!isOnPaymentPage &&\n        (!!getDynamicContentHeaderPartnerLogo() ? (\n          <PartnerHeader />\n        ) : (\n          <Header lightmode={isAlpsExperiment} />\n        ))}\n    </>\n  );\n};\n","import React from 'react'\nimport {useEventBusReduxListener} from \"../../data/redux/slices/event-bus/event-bus-utils.mjs\";\nimport {useAuthEventBusListener} from \"../../data/redux/slices/auth/auth-utils.mjs\";\nimport {Routes} from './routes/routes.js';\nimport {useLocation} from \"react-router\";\nimport {useCallback, useEffect, useState} from \"react\";\nimport { TransitionProvider } from './transition-context';\nimport {Mask} from \"../mask/mask.js\";\nimport {useIdentifyUser} from \"../../analytics/shared-analytics.mjs\";\nimport {\n    getStatsigConfig,\n    getStatsigUser,\n} from \"../../data/initial-state/intial-state-accessors.mjs\";\nimport {StatsigClient, StatsigProvider, useClientBootstrapInit} from '@statsig/react-bindings'\nimport { ConditionalFooterManager } from \"./conditional-footer-manager\";\nimport {Modal} from \"../common-components/modal/modal.tsx\";\nimport {analytics, useIsTrackingDisabled} from \"../../analytics/analytics.mjs\";\nimport {CookieConsent} from \"../cookie-consent/cookie-consent.tsx\";\nimport { getPartnerFromWindowLocation } from '../../util/partner-selectors.mts';\nimport { isOnPage, Page } from '../../util/navigation.mts';\nimport { ConditionalHeaderManager } from './conditional-header-manager';\nimport { useOfferKey, useSelectedLineItems, useSelectedLinkGen2LineItem } from '../../data/api/query/offers.mts';\nimport { useCurrency } from '../../data/redux/slices/offers/offers-slice.mts';\nimport { statsigClientRef } from '../../data/statsig/statsig-client-ref.mts';\n// this whole component needs to be wrapped in a ClientOnly component due to the use of browser-side dependencies and\n// the StatsigProvider.\nexport const Main: React.FC = () => {\n    useAuthEventBusListener()\n    useEventBusReduxListener()\n    useIdentifyUser()\n    const isTrackingDisabled = useIsTrackingDisabled()\n    const isSmartLaserPreorder = window.location.pathname.includes('smart-laser')\n    console.debug('setting up statsig with user', getStatsigUser())\n    console.debug('setting up statsig with config', getStatsigConfig())\n    console.debug('setting up statsig with sdkKey', import.meta.env.CLIENT_STATSIG_API_KEY)\n    const partner = getPartnerFromWindowLocation()\n\n    const location = useLocation()\n    const [displayLocation, setDisplayLocation] = useState(location)\n    const [transitionStage, setTransitionStage] = useState(\"fadeIn\")\n\n    const disableAnimations = false\n    const currency = useCurrency()\n\n    useEffect(() => {\n        if (location.pathname !== displayLocation.pathname) {\n            setTransitionStage(\"fadeOut\")\n        }\n    }, [location.pathname, displayLocation.pathname])\n\n    const handleAnimationEnd = useCallback(() => {\n        if (transitionStage === \"fadeOut\" && displayLocation.pathname !== location.pathname) {\n            window.scrollTo({\n                top: 0,\n                behavior: 'instant',\n            });\n            setTransitionStage(\"fadeIn\");\n            setDisplayLocation(location);\n        }\n    }, [transitionStage, location.pathname])\n\n    useEffect(() => {\n        if (disableAnimations) {\n            handleAnimationEnd()\n        }\n    }, [disableAnimations, handleAnimationEnd])\n\n    useEffect(() => {\n        if (isSmartLaserPreorder) {\n            document.title = 'Preorder the New Arccos Smart Laser Rangefinder Today'\n        }\n     }, [])\n\n    statsigClientRef.current = useClientBootstrapInit(\n        import.meta.env.CLIENT_STATSIG_API_KEY,\n        getStatsigUser(),\n        JSON.stringify(getStatsigConfig()),\n        {\n            environment: {tier: import.meta.env.CLIENT_STATSIG_ENVIRONMENT},\n            loggingIntervalMs: 1000,\n            disableStorage: isTrackingDisabled,\n            disableLogging: isTrackingDisabled,\n        }\n    )\n\n    useEffect(() => {\n        if (statsigClientRef.current) {\n            statsigClientRef.current.updateUserSync({\n                ...getStatsigUser(),\n                custom: {\n                    ...getStatsigUser()?.custom,\n                    ...Object.fromEntries(new URLSearchParams(window.location.search)),\n                },\n            })\n        }\n    }, [])\n\n    return (\n        <StatsigProvider\n            client={statsigClientRef.current}\n        >\n            <TransitionProvider displayLocation={displayLocation}>\n                <ConditionalHeaderManager />\n                <Modal/>\n                <Routes\n                    location={disableAnimations ? location : displayLocation}\n                    transitionStage={transitionStage}\n                    onAnimationEnd={handleAnimationEnd}\n                />\n                {!isOnPage(Page.PAYMENT) && (\n                    <ConditionalFooterManager />\n                )}\n                <CookieConsent/>\n                <Mask/>\n            </TransitionProvider>\n        </StatsigProvider>\n    )\n}\n","'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n  didCatch: false,\n  error: null\n};\nclass ErrorBoundary extends Component {\n  constructor(props) {\n    super(props);\n    this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n    this.state = initialState;\n  }\n  static getDerivedStateFromError(error) {\n    return {\n      didCatch: true,\n      error\n    };\n  }\n  resetErrorBoundary() {\n    const {\n      error\n    } = this.state;\n    if (error !== null) {\n      var _this$props$onReset, _this$props;\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n        args,\n        reason: \"imperative-api\"\n      });\n      this.setState(initialState);\n    }\n  }\n  componentDidCatch(error, info) {\n    var _this$props$onError, _this$props2;\n    (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n  }\n  componentDidUpdate(prevProps, prevState) {\n    const {\n      didCatch\n    } = this.state;\n    const {\n      resetKeys\n    } = this.props;\n\n    // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n    // we'd end up resetting the error boundary immediately.\n    // This would likely trigger a second error to be thrown.\n    // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n    if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n      var _this$props$onReset2, _this$props3;\n      (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n        next: resetKeys,\n        prev: prevProps.resetKeys,\n        reason: \"keys\"\n      });\n      this.setState(initialState);\n    }\n  }\n  render() {\n    const {\n      children,\n      fallbackRender,\n      FallbackComponent,\n      fallback\n    } = this.props;\n    const {\n      didCatch,\n      error\n    } = this.state;\n    let childToRender = children;\n    if (didCatch) {\n      const props = {\n        error,\n        resetErrorBoundary: this.resetErrorBoundary\n      };\n      if (typeof fallbackRender === \"function\") {\n        childToRender = fallbackRender(props);\n      } else if (FallbackComponent) {\n        childToRender = createElement(FallbackComponent, props);\n      } else if (fallback !== undefined) {\n        childToRender = fallback;\n      } else {\n        {\n          console.error(\"react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop\");\n        }\n        throw error;\n      }\n    }\n    return createElement(ErrorBoundaryContext.Provider, {\n      value: {\n        didCatch,\n        error,\n        resetErrorBoundary: this.resetErrorBoundary\n      }\n    }, childToRender);\n  }\n}\nfunction hasArrayChanged() {\n  let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n  if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n    throw new Error(\"ErrorBoundaryContext not found\");\n  }\n}\n\nfunction useErrorBoundary() {\n  const context = useContext(ErrorBoundaryContext);\n  assertErrorBoundaryContext(context);\n  const [state, setState] = useState({\n    error: null,\n    hasError: false\n  });\n  const memoized = useMemo(() => ({\n    resetBoundary: () => {\n      context.resetErrorBoundary();\n      setState({\n        error: null,\n        hasError: false\n      });\n    },\n    showBoundary: error => setState({\n      error,\n      hasError: true\n    })\n  }), [context.resetErrorBoundary]);\n  if (state.hasError) {\n    throw state.error;\n  }\n  return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n  const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n    ...props,\n    ref\n  })));\n\n  // Format for display in DevTools\n  const name = component.displayName || component.name || \"Unknown\";\n  Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n  return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import React from \"react\";\nimport {useQueryErrorResetBoundary} from \"@tanstack/react-query\";\nimport {ErrorBoundary as ReactErrorBoundary} from \"react-error-boundary\";\nimport {ArccosError} from \"../../util/arccos-error.mjs\";\nimport {ErrorDisplay} from \"./error-display.js\";\n\ntype BoundaryProps = {\n    children?: React.ReactNode\n}\nexport const ErrorBoundary: React.FC<BoundaryProps> = ({children}) => {\n    const resetBoundary = useQueryErrorResetBoundary()\n    return (\n        <ReactErrorBoundary\n            onReset={resetBoundary.reset}\n            fallbackRender={({error, resetErrorBoundary}) => {\n                if (!error) {\n                    console.error('ErrorBoundary rendering without error')\n                    return null\n                }\n                if (error instanceof ArccosError) {\n                    return (\n                        <ErrorDisplay\n                            title={error.title}\n                            body={error.message}\n                            onDismiss={resetErrorBoundary}\n                        />\n                    )\n                }\n                console.error('ErrorBoundary rendering unknown error', error)\n                console.debug(error.message)\n                console.debug(error.stack)\n                return (\n                    <ErrorDisplay\n                        title={'Unknown error'}\n                        body={'We are sorry, something went wrong. If this issue persists, please contact starter@arccosgolf.com.'}\n                    />\n                )\n            }}\n        >\n            {children}\n        </ReactErrorBoundary>\n    )\n}\n","// src/utils.ts\nfunction noop() {\n}\nexport {\n  noop\n};\n//# sourceMappingURL=utils.js.map","// src/index.ts\nimport { timeoutManager } from \"@tanstack/query-core\";\nimport { noop } from \"./utils.js\";\nfunction createSyncStoragePersister({\n  storage,\n  key = `REACT_QUERY_OFFLINE_CACHE`,\n  throttleTime = 1e3,\n  serialize = JSON.stringify,\n  deserialize = JSON.parse,\n  retry\n}) {\n  if (storage) {\n    const trySave = (persistedClient) => {\n      try {\n        storage.setItem(key, serialize(persistedClient));\n        return;\n      } catch (error) {\n        return error;\n      }\n    };\n    return {\n      persistClient: throttle((persistedClient) => {\n        let client = persistedClient;\n        let error = trySave(client);\n        let errorCount = 0;\n        while (error && client) {\n          errorCount++;\n          client = retry?.({\n            persistedClient: client,\n            error,\n            errorCount\n          });\n          if (client) {\n            error = trySave(client);\n          }\n        }\n      }, throttleTime),\n      restoreClient: () => {\n        const cacheString = storage.getItem(key);\n        if (!cacheString) {\n          return;\n        }\n        return deserialize(cacheString);\n      },\n      removeClient: () => {\n        storage.removeItem(key);\n      }\n    };\n  }\n  return {\n    persistClient: noop,\n    restoreClient: noop,\n    removeClient: noop\n  };\n}\nfunction throttle(func, wait = 100) {\n  let timer = null;\n  let params;\n  return function(...args) {\n    params = args;\n    if (timer === null) {\n      timer = timeoutManager.setTimeout(() => {\n        func(...params);\n        timer = null;\n      }, wait);\n    }\n  };\n}\nexport {\n  createSyncStoragePersister\n};\n//# sourceMappingURL=index.js.map","// src/persist.ts\nimport { dehydrate, hydrate } from \"@tanstack/query-core\";\nvar cacheEventTypes = [\"added\", \"removed\", \"updated\"];\nfunction isCacheEventType(eventType) {\n  return cacheEventTypes.includes(eventType);\n}\nasync function persistQueryClientRestore({\n  queryClient,\n  persister,\n  maxAge = 1e3 * 60 * 60 * 24,\n  buster = \"\",\n  hydrateOptions\n}) {\n  try {\n    const persistedClient = await persister.restoreClient();\n    if (persistedClient) {\n      if (persistedClient.timestamp) {\n        const expired = Date.now() - persistedClient.timestamp > maxAge;\n        const busted = persistedClient.buster !== buster;\n        if (expired || busted) {\n          return persister.removeClient();\n        } else {\n          hydrate(queryClient, persistedClient.clientState, hydrateOptions);\n        }\n      } else {\n        return persister.removeClient();\n      }\n    }\n  } catch (err) {\n    if (process.env.NODE_ENV !== \"production\") {\n      console.error(err);\n      console.warn(\n        \"Encountered an error attempting to restore client cache from persisted location. As a precaution, the persisted cache will be discarded.\"\n      );\n    }\n    await persister.removeClient();\n    throw err;\n  }\n}\nasync function persistQueryClientSave({\n  queryClient,\n  persister,\n  buster = \"\",\n  dehydrateOptions\n}) {\n  const persistClient = {\n    buster,\n    timestamp: Date.now(),\n    clientState: dehydrate(queryClient, dehydrateOptions)\n  };\n  await persister.persistClient(persistClient);\n}\nfunction persistQueryClientSubscribe(props) {\n  const unsubscribeQueryCache = props.queryClient.getQueryCache().subscribe((event) => {\n    if (isCacheEventType(event.type)) {\n      persistQueryClientSave(props);\n    }\n  });\n  const unsubscribeMutationCache = props.queryClient.getMutationCache().subscribe((event) => {\n    if (isCacheEventType(event.type)) {\n      persistQueryClientSave(props);\n    }\n  });\n  return () => {\n    unsubscribeQueryCache();\n    unsubscribeMutationCache();\n  };\n}\nfunction persistQueryClient(props) {\n  let hasUnsubscribed = false;\n  let persistQueryClientUnsubscribe;\n  const unsubscribe = () => {\n    hasUnsubscribed = true;\n    persistQueryClientUnsubscribe?.();\n  };\n  const restorePromise = persistQueryClientRestore(props).then(() => {\n    if (!hasUnsubscribed) {\n      persistQueryClientUnsubscribe = persistQueryClientSubscribe(props);\n    }\n  });\n  return [unsubscribe, restorePromise];\n}\nexport {\n  persistQueryClient,\n  persistQueryClientRestore,\n  persistQueryClientSave,\n  persistQueryClientSubscribe\n};\n//# sourceMappingURL=persist.js.map","import React, {Suspense, useEffect} from 'react'\nimport './app.css'\nimport {createStore} from '../data/redux/createStore.mjs'\nimport {Provider} from 'react-redux'\nimport {Main} from \"./main/main\";\nimport {getInitialState} from \"../data/initial-state/intial-state-accessors.mjs\";\nimport {QueryClient, QueryClientConfig, QueryClientProvider,} from '@tanstack/react-query'\nimport {Loading} from \"./common-components/loading/loading\";\nimport {ClientOnly} from \"./common-components/client-only/client-only\";\nimport {ErrorBoundary} from \"./error/error-boundary\";\nimport {createSyncStoragePersister} from \"@tanstack/query-sync-storage-persister\";\nimport {persistQueryClient} from \"@tanstack/react-query-persist-client\";\nimport { ReactQueryDevtools } from '@tanstack/react-query-devtools'\n\nconst queryClientConfig: QueryClientConfig = {\n    defaultOptions: {\n        queries: {\n            staleTime: 1000 * 60,\n        }\n    }\n}\n\nconst queryClient = new QueryClient(queryClientConfig)\n\nif (typeof window !== 'undefined') {\n    const localStoragePersister = createSyncStoragePersister({\n        storage: window.localStorage,\n    })\n\n    persistQueryClient({\n        // TODO: for some reason the root node_modules and the package level node_modules are both being used here,\n        //  but since queryClient has private fields, it's not being recognized as safe to use here\n        // @ts-ignore\n        queryClient,\n        persister: localStoragePersister,\n        dehydrateOptions: {\n            shouldDehydrateQuery: query => {\n                if (query.queryKey.includes('paymentFieldsToken')) {\n                    return false\n                }\n                return query.state.status === 'success'\n            }\n        }\n    })\n\n    if (import.meta.env.CLIENT_SHOULD_SET_QUERY_CLIENT_TO_WINDOW) {\n        // @ts-ignore\n        window.__queryClient = queryClient\n    }\n}\n\nexport const App: React.FC = () => {\n    console.debug('initialState ', JSON.stringify(getInitialState(), null, 2))\n    useEffect(() => {\n        console.log('App mounted')\n        setTimeout(() => queryClient.refetchQueries(), 0)\n        return () => {\n            console.log('App unmounted')\n        }\n    })\n\n    return (\n        <QueryClientProvider client={queryClient}>\n            <Provider store={createStore()}>\n                <ErrorBoundary>\n                    <ClientOnly>\n                        <Suspense fallback={<Loading className={'app-loader'}/>}>\n                            <Main/>\n                        </Suspense>\n                    </ClientOnly>\n                </ErrorBoundary>\n            </Provider>\n            {import.meta.env.CLIENT_SHOULD_HIDE_REACT_QUERY_DEBUGGER !== 'true' && <ReactQueryDevtools initialIsOpen={false} />}\n        </QueryClientProvider>\n    )\n}\n\n","type MessageType<T = any> = {\n    type: 'DISMISS' | 'SUCCESS' | 'ERROR';\n    payload: T\n}\n\ndeclare global {\n    interface Window {\n        arccos?: {\n            postMessage: (event: EventType) => void\n            listen: (cb: (event: EventType) => void, replayEvents?: boolean) => void\n        }\n        webkit?: {\n            messageHandlers: {\n                ArccosMobile: {\n                    postMessage: (message: MessageType) => void\n                }\n            }\n        }\n    }\n\n    class ArccosMobile {\n        static onFinished: (message: string) => void;\n        static postAppsFlyerData?: (message: string) => void;\n        static postMessage?: (message: any) => void;\n    }\n}\n\nexport type AuthEvent = {\n    action: 'POST_AUTH_DATA'\n    payload: {\n        auth: {\n            authToken: string\n            accessKey?: string\n            userEmail: string\n        }\n    }\n}\n\nexport type EventType = {\n    timestamp: string\n} & (AuthEvent)\n\nconst _events: EventType[] = []\nconst _listeners: ((event: EventType) => void)[] = []\n\nexport const addEventBusToWindow = () => {\n    if (typeof window !== 'undefined' && !window.arccos) {\n        window.arccos = {\n            postMessage: (event: EventType) => {\n                console.log('event received: ', event)\n                _events.push(event)\n                _listeners.forEach(listener => listener(event))\n            },\n            listen: (cb: (event: EventType) => void, replayEvents?: boolean) => {\n                _listeners.push(cb)\n                console.debug('listener added')\n                if (replayEvents) {\n                    console.debug('replaying events: ', _events)\n                    _events.forEach(event => cb(event))\n                }\n            },\n        }\n    } else {\n        console.error('addEventBusToWindow called more than once or in a non-browser environment')\n    }\n}\n\nexport const getWebviewPlatform = (): 'ios' | 'android' | undefined => {\n    if (typeof window !== 'undefined' && window.webkit?.messageHandlers?.ArccosMobile) {\n        return 'ios'\n    } else if (typeof ArccosMobile !== 'undefined') {\n        return 'android'\n    }\n    return undefined\n}\n\nexport const sendDismissMessageToApp = <T, >(message: MessageType<T>) => {\n    console.log('sending message: ', message)\n\n    if (window?.webkit?.messageHandlers?.ArccosMobile) {\n        window.webkit.messageHandlers.ArccosMobile.postMessage(message)\n    } else if (typeof ArccosMobile !== 'undefined') {\n        ArccosMobile?.onFinished(JSON.stringify(message))\n    }\n}\n","import React from 'react'\nimport {hydrateRoot} from 'react-dom/client'\nimport {App} from './app/app.js'\nimport {BrowserRouter} from 'react-router-dom'\nimport {addEventBusToWindow} from \"./io/client/arccos-event-bus.mjs\";\nimport {initializeLocalStorage} from \"./data/local-storage/local-storage.mjs\";\n\ninitializeLocalStorage()\naddEventBusToWindow()\n\nconst doHydrateRoot = () => {\n    hydrateRoot(\n        document.getElementById('app'),\n        <BrowserRouter>\n            <App/>\n        </BrowserRouter>,\n    )\n}\n\ndoHydrateRoot()\n\nconst updateVisibility = () => document.body.style.visibility = 'visible'\n\ndocument.readyState === 'interactive' || document.readyState === 'complete' ?\n    updateVisibility() :\n    window.addEventListener('DOMContentLoaded', () => updateVisibility())\n\n"],"names":["ReactVersion","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactCurrentDispatcher","ReactCurrentBatchConfig","ReactCurrentActQueue","ReactCurrentOwner","ReactDebugCurrentFrame","currentExtraStackFrame","setExtraStackFrame","stack","impl","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","ReactSharedInternals","warn","format","_len","args","_key","printWarning","error","_len2","_key2","level","argsWithFormat","item","didWarnStateUpdateForUnmountedComponent","warnNoop","publicInstance","callerName","_constructor","componentName","warningKey","ReactNoopUpdateQueue","callback","completeState","partialState","assign","emptyObject","Component","props","context","updater","deprecatedAPIs","defineDeprecationWarning","methodName","info","fnName","ComponentDummy","PureComponent","pureComponentPrototype","createRef","refObject","isArrayImpl","isArray","a","typeName","value","hasToStringTag","type","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","provider","outerName","lazyComponent","payload","init","hasOwnProperty","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","hasValidRef","config","getter","hasValidKey","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","warnIfStringRefCannotBeAutoConverted","ReactElement","key","ref","self","source","owner","element","createElement","children","propName","childrenLength","childArray","i","defaultProps","cloneAndReplaceKey","oldElement","newKey","newElement","cloneElement","isValidElement","object","SEPARATOR","SUBSEPARATOR","escape","escapeRegex","escaperLookup","escapedString","match","didWarnAboutMaps","userProvidedKeyEscapeRegex","escapeUserProvidedKey","text","getElementKey","index","mapIntoArray","array","escapedPrefix","nameSoFar","invokeCallback","_child","mappedChild","childKey","escapedChildKey","c","child","nextName","subtreeCount","nextNamePrefix","iteratorFn","iterableChildren","iterator","step","ii","childrenString","mapChildren","func","result","count","countChildren","n","forEachChildren","forEachFunc","forEachContext","toArray","onlyChild","createContext","defaultValue","hasWarnedAboutUsingNestedContextConsumers","hasWarnedAboutUsingConsumerProvider","hasWarnedAboutDisplayNameOnConsumer","Consumer","_Provider","_currentValue","_currentValue2","_threadCount","Uninitialized","Pending","Resolved","Rejected","lazyInitializer","ctor","thenable","moduleObject","resolved","rejected","pending","lazy","lazyType","propTypes","newDefaultProps","newPropTypes","forwardRef","render","elementType","ownName","name","REACT_MODULE_REFERENCE","isValidElementType","memo","compare","resolveDispatcher","dispatcher","useContext","Context","realContext","useState","initialState","useReducer","reducer","initialArg","useRef","initialValue","useEffect","create","deps","useInsertionEffect","useLayoutEffect","useCallback","useMemo","useImperativeHandle","useDebugValue","formatterFn","useTransition","useDeferredValue","useId","useSyncExternalStore","subscribe","getSnapshot","getServerSnapshot","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","reenableLogs","ReactCurrentDispatcher$1","prefix","describeBuiltInComponentFrame","ownerFn","x","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","prototype","describeUnknownElementTypeFrameInDEV","loggedTypeFailures","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement","checkPropTypes","typeSpecs","values","location","has","typeSpecName","error$1","err","ex","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","fileName","lineNumber","getSourceInfoErrorAddendumForProps","elementProps","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","validatePropTypes","_name","validateFragmentProps","fragment","keys","createElementWithValidation","validType","sourceInfo","typeString","didWarnAboutDeprecatedCreateFactory","createFactoryWithValidation","validatedFactory","cloneElementWithValidation","startTransition","scope","options","prevTransition","currentTransition","updatedFibersCount","didWarnAboutMessageChannel","enqueueTaskImpl","enqueueTask","task","requireString","nodeRequire","module","channel","actScopeDepth","didWarnNoAwaitAct","act","prevActScopeDepth","prevIsBatchingLegacy","queue","flushActQueue","popActScope","thenableResult","wasAwaited","resolve","reject","returnValue","recursivelyFlushAsyncActWork","_queue","_thenable","_thenable2","isFlushing","createElement$1","cloneElement$1","createFactory","Children","exports","reactModule","require$$0","enableProfiling","frameYieldMs","push","heap","siftUp","peek","pop","first","last","siftDown","parentIndex","parent","length","halfLength","leftIndex","left","rightIndex","right","b","diff","ImmediatePriority","UserBlockingPriority","NormalPriority","LowPriority","IdlePriority","markTaskErrored","ms","hasPerformanceNow","localPerformance","localDate","initialTime","maxSigned31BitInt","IMMEDIATE_PRIORITY_TIMEOUT","USER_BLOCKING_PRIORITY_TIMEOUT","NORMAL_PRIORITY_TIMEOUT","LOW_PRIORITY_TIMEOUT","IDLE_PRIORITY_TIMEOUT","taskQueue","timerQueue","taskIdCounter","currentTask","currentPriorityLevel","isPerformingWork","isHostCallbackScheduled","isHostTimeoutScheduled","localSetTimeout","localClearTimeout","localSetImmediate","advanceTimers","currentTime","timer","handleTimeout","requestHostCallback","flushWork","firstTimer","requestHostTimeout","hasTimeRemaining","cancelHostTimeout","previousPriorityLevel","workLoop","shouldYieldToHost","didUserCallbackTimeout","continuationCallback","unstable_runWithPriority","priorityLevel","eventHandler","unstable_next","unstable_wrapCallback","parentPriorityLevel","unstable_scheduleCallback","startTime","delay","timeout","expirationTime","newTask","unstable_pauseExecution","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_cancelCallback","unstable_getCurrentPriorityLevel","isMessageLoopRunning","scheduledHostCallback","taskTimeoutID","frameInterval","timeElapsed","requestPaint","forceFrameRate","fps","performWorkUntilDeadline","hasMoreWork","schedulePerformWorkUntilDeadline","port","unstable_requestPaint","unstable_Profiling","schedulerModule","React","Scheduler","require$$1","suppressWarning","setSuppressWarning","newSuppressWarning","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","ScopeComponent","OffscreenComponent","LegacyHiddenComponent","CacheComponent","TracingMarkerComponent","enableClientRenderFallbackOnTextMismatch","enableNewReconciler","enableLazyContextPropagation","enableCustomElementPropertySupport","warnAboutStringRefs","enableSchedulingProfiler","enableProfilerTimer","enableProfilerCommitHooks","allNativeEvents","registrationNameDependencies","possibleRegistrationNames","registerTwoPhaseEvent","registrationName","dependencies","registerDirectEvent","lowerCasedName","canUseDOM","checkAttributeStringCoercion","attributeName","checkPropStringCoercion","checkCSSPropertyStringCoercion","checkHtmlStringCoercion","checkFormFieldValueStringCoercion","RESERVED","STRING","BOOLEANISH_STRING","BOOLEAN","OVERLOADED_BOOLEAN","NUMERIC","POSITIVE_NUMERIC","ATTRIBUTE_NAME_START_CHAR","ATTRIBUTE_NAME_CHAR","VALID_ATTRIBUTE_NAME_REGEX","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","shouldIgnoreAttribute","propertyInfo","isCustomComponentTag","shouldRemoveAttributeWithWarning","shouldRemoveAttribute","getPropertyInfo","properties","PropertyInfoRecord","mustUseProperty","attributeNamespace","sanitizeURL","removeEmptyString","reservedProps","_ref","CAMELIZE","capitalize","token","xlinkHref","isJavaScriptProtocol","didWarn","url","getValueForProperty","expected","propertyName","stringValue","getValueForAttribute","setValueForProperty","_attributeName","_type","attributeValue","REACT_SCOPE_TYPE","REACT_DEBUG_TRACING_MODE_TYPE","REACT_LEGACY_HIDDEN_TYPE","REACT_CACHE_TYPE","REACT_TRACING_MARKER_TYPE","describeClassComponentFrame","describeFiber","fiber","getStackByFiberInDevAndProd","workInProgress","getWrappedName$1","getContextName$1","getComponentNameFromFiber","tag","current","isRendering","getCurrentFiberOwnerNameInDevOrNull","getCurrentFiberStackInDev","resetCurrentFiber","setCurrentFiber","getCurrentFiber","setIsRendering","rendering","toString","getToStringValue","hasReadOnlyValue","checkControlledValueProps","tagName","isCheckable","elem","nodeName","getTracker","detachTracker","getValueFromNode","trackValueOnNode","valueField","descriptor","currentValue","get","set","tracker","track","updateValueIfChanged","lastValue","nextValue","getActiveElement","doc","didWarnValueDefaultValue","didWarnCheckedDefaultChecked","didWarnControlledToUncontrolled","didWarnUncontrolledToControlled","isControlled","usesChecked","getHostProps","checked","hostProps","initWrapperState","updateChecked","updateWrapper","controlled","setDefaultValue","postMountWrapper","isHydrating","isButton","restoreControlledState","updateNamedCousins","rootNode","queryRoot","group","otherNode","otherProps","getFiberCurrentPropsFromNode","didWarnSelectedSetOnOption","didWarnInvalidChild","didWarnInvalidInnerHTML","validateProps","postMountWrapper$1","didWarnValueDefaultValue$1","ownerName","valuePropNames","checkSelectPropTypes","propNameIsArray","updateOptions","multiple","propValue","setDefaultSelected","selectedValues","selectedValue","_i","selected","_selectedValue","defaultSelected","_i2","getHostProps$1","initWrapperState$1","postMountWrapper$2","postUpdateWrapper","wasMultiple","restoreControlledState$1","didWarnValDefaultVal","getHostProps$2","initWrapperState$2","updateWrapper$1","newValue","postMountWrapper$3","textContent","restoreControlledState$2","HTML_NAMESPACE","MATH_NAMESPACE","SVG_NAMESPACE","getIntrinsicNamespace","getChildNamespace","parentNamespace","createMicrosoftUnsafeLocalFunction","arg0","arg1","arg2","arg3","reusableSVGContainer","setInnerHTML","html","svgNode","ELEMENT_NODE","TEXT_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","setTextContent","firstChild","shorthandToLonghand","isUnitlessNumber","prefixKey","prefixes","prop","dangerousStyleValue","isCustomProperty","isEmpty","uppercasePattern","msPattern","hyphenateStyleName","warnValidStyle","badVendoredStyleNamePattern","msPattern$1","hyphenPattern","badStyleValueWithSemicolonPattern","warnedStyleNames","warnedStyleValues","warnedForNaNValue","warnedForInfinityValue","camelize","string","_","character","warnHyphenatedStyleName","warnBadVendoredStyleName","warnStyleValueWithSemicolon","warnStyleValueIsNaN","warnStyleValueIsInfinity","warnValidStyle$1","createDangerousStringForStyles","styles","serialized","delimiter","styleName","styleValue","setValueForStyles","style","isValueEmpty","expandShorthandMap","expanded","longhands","validateShorthandPropertyCollisionInDev","styleUpdates","nextStyles","expandedUpdates","expandedStyles","warnedAbout","originalKey","correctOriginalKey","omittedCloseTags","voidElementTags","HTML","assertValidProps","isCustomComponent","possibleStandardNames","ariaProperties","warnedProperties","rARIA","rARIACamel","validateProperty","ariaName","correctName","standardName","warnInvalidARIAProps","invalidProps","isValid","unknownPropString","validateProperties","didWarnValueNull","validateProperties$1","validateProperty$1","warnedProperties$1","EVENT_NAME_REGEX","INVALID_EVENT_NAME_REGEX","rARIA$1","rARIACamel$1","eventRegistry","isReserved","warnUnknownProperties","unknownProps","validateProperties$2","IS_EVENT_HANDLE_NON_MANAGED_NODE","IS_NON_DELEGATED","IS_CAPTURE_PHASE","SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS","currentReplayingEvent","setReplayingEvent","event","resetReplayingEvent","isReplayingEvent","getEventTarget","nativeEvent","target","restoreImpl","restoreTarget","restoreQueue","restoreStateOfTarget","internalInstance","getInstanceFromNode","stateNode","_props","setRestoreImplementation","enqueueStateRestore","needsStateRestore","restoreStateIfNeeded","queuedTargets","batchedUpdatesImpl","bookkeeping","flushSyncImpl","isInsideEventHandler","finishEventHandler","controlledComponentsHavePendingUpdates","batchedUpdates","setBatchingImplementation","_batchedUpdatesImpl","_discreteUpdatesImpl","_flushSyncImpl","isInteractive","shouldPreventMouseEvent","getListener","inst","listener","passiveBrowserEventsSupported","invokeGuardedCallbackProd","d","e","f","funcArgs","invokeGuardedCallbackImpl","fakeNode","evt","didCall","didError","windowEvent","windowEventDescriptor","restoreAfterDispatch","evtType","callCallback","didSetError","isCrossOriginError","handleWindowError","invokeGuardedCallbackImpl$1","hasError","caughtError","hasRethrowError","rethrowError","reporter","invokeGuardedCallback","invokeGuardedCallbackAndCatchFirstError","clearCaughtError","rethrowCaughtError","hasCaughtError","NoFlags","PerformedWork","Placement","Update","ChildDeletion","ContentReset","Callback","DidCapture","ForceClientRender","Ref","Snapshot","Passive","Hydrating","Visibility","StoreConsistency","HostEffectMask","Incomplete","ShouldCapture","ForceUpdateForLegacySuspense","Forked","RefStatic","LayoutStatic","PassiveStatic","MountLayoutDev","MountPassiveDev","BeforeMutationMask","MutationMask","LayoutMask","PassiveMask","StaticMask","getNearestMountedFiber","nearestMounted","nextNode","getSuspenseInstanceFromFiber","suspenseState","getContainerFromFiber","isFiberMounted","isMounted","component","ownerFiber","instance","assertIsMounted","findCurrentFiberUsingSlowPath","alternate","parentA","parentB","nextParent","didFindChild","findCurrentHostFiber","currentParent","findCurrentHostFiberImpl","findCurrentHostFiberWithNoPortals","findCurrentHostFiberWithNoPortalsImpl","scheduleCallback","cancelCallback","shouldYield","now","getCurrentPriorityLevel","unstable_yieldValue","unstable_setDisableYieldValue","rendererID","injectedHook","injectedProfilingHooks","hasLoggedError","isDevToolsPresent","injectInternals","internals","hook","getLaneLabelMap","injectProfilingHooks","onScheduleRoot","root","onCommitRoot","eventPriority","schedulerPriority","DiscreteEventPriority","ContinuousEventPriority","DefaultEventPriority","IdleEventPriority","onPostCommitRoot","onCommitUnmount","setIsStrictModeForDevtools","newIsStrictMode","profilingHooks","map","lane","TotalLanes","label","getLabelForLane","markCommitStarted","lanes","markCommitStopped","markComponentRenderStarted","markComponentRenderStopped","markComponentPassiveEffectMountStarted","markComponentPassiveEffectMountStopped","markComponentPassiveEffectUnmountStarted","markComponentPassiveEffectUnmountStopped","markComponentLayoutEffectMountStarted","markComponentLayoutEffectMountStopped","markComponentLayoutEffectUnmountStarted","markComponentLayoutEffectUnmountStopped","markComponentErrored","thrownValue","markComponentSuspended","wakeable","markLayoutEffectsStarted","markLayoutEffectsStopped","markPassiveEffectsStarted","markPassiveEffectsStopped","markRenderStarted","markRenderYielded","markRenderStopped","markRenderScheduled","markForceUpdateScheduled","markStateUpdateScheduled","NoMode","ConcurrentMode","ProfileMode","StrictLegacyMode","StrictEffectsMode","clz32","clz32Fallback","log","LN2","asUint","NoLanes","NoLane","SyncLane","InputContinuousHydrationLane","InputContinuousLane","DefaultHydrationLane","DefaultLane","TransitionHydrationLane","TransitionLanes","TransitionLane1","TransitionLane2","TransitionLane3","TransitionLane4","TransitionLane5","TransitionLane6","TransitionLane7","TransitionLane8","TransitionLane9","TransitionLane10","TransitionLane11","TransitionLane12","TransitionLane13","TransitionLane14","TransitionLane15","TransitionLane16","RetryLanes","RetryLane1","RetryLane2","RetryLane3","RetryLane4","RetryLane5","SomeRetryLane","SelectiveHydrationLane","NonIdleLanes","IdleHydrationLane","IdleLane","OffscreenLane","NoTimestamp","nextTransitionLane","nextRetryLane","getHighestPriorityLanes","getHighestPriorityLane","getNextLanes","wipLanes","pendingLanes","nextLanes","suspendedLanes","pingedLanes","nonIdlePendingLanes","nonIdleUnblockedLanes","nonIdlePingedLanes","unblockedLanes","nextLane","wipLane","entangledLanes","entanglements","pickArbitraryLaneIndex","getMostRecentEventTime","eventTimes","mostRecentEventTime","eventTime","computeExpirationTime","markStarvedLanesAsExpired","expirationTimes","getHighestPriorityPendingLanes","getLanesToRetrySynchronouslyOnError","everythingButOffscreen","includesSyncLane","includesNonIdleWork","includesOnlyRetries","includesOnlyNonUrgentLanes","UrgentLanes","includesOnlyTransitions","includesBlockingLane","SyncDefaultLanes","includesExpiredLane","isTransitionLane","claimNextTransitionLane","claimNextRetryLane","pickArbitraryLane","laneToIndex","includesSomeLane","isSubsetOfLanes","subset","mergeLanes","removeLanes","intersectLanes","laneToLanes","higherPriorityLane","createLaneMap","initial","laneMap","markRootUpdated","updateLane","markRootSuspended","markRootPinged","markRootFinished","remainingLanes","noLongerPendingLanes","markRootEntangled","rootEntangledLanes","getBumpedLaneForHydration","renderLanes","renderLane","addFiberToLanesMap","pendingUpdatersLaneMap","updaters","movePendingFibersToMemoized","memoizedUpdaters","getTransitionsForLanes","currentUpdatePriority","getCurrentUpdatePriority","setCurrentUpdatePriority","newPriority","runWithPriority","priority","previousPriority","higherEventPriority","lowerEventPriority","isHigherEventPriority","lanesToEventPriority","isRootDehydrated","currentState","_attemptSynchronousHydration","setAttemptSynchronousHydration","attemptSynchronousHydration","attemptContinuousHydration","setAttemptContinuousHydration","attemptHydrationAtCurrentPriority","setAttemptHydrationAtCurrentPriority","getCurrentUpdatePriority$1","setGetCurrentUpdatePriority","attemptHydrationAtPriority","setAttemptHydrationAtPriority","hasScheduledReplayAttempt","queuedDiscreteEvents","queuedFocus","queuedDrag","queuedMouse","queuedPointers","queuedPointerCaptures","queuedExplicitHydrationTargets","discreteReplayableEvents","isDiscreteEventThatRequiresHydration","eventType","createQueuedReplayableEvent","blockedOn","domEventName","eventSystemFlags","targetContainer","clearIfContinuousEvent","pointerId","_pointerId","accumulateOrCreateContinuousQueuedReplayableEvent","existingQueuedEvent","queuedEvent","_fiber2","targetContainers","queueIfContinuousEvent","focusEvent","dragEvent","mouseEvent","pointerEvent","_pointerEvent","_pointerId2","attemptExplicitHydrationTarget","queuedTarget","targetInst","getClosestInstanceFromNode","queueExplicitHydrationTarget","updatePriority","attemptReplayContinuousQueuedEvent","nextBlockedOn","findInstanceBlockingEvent","nativeEventClone","_fiber3","attemptReplayContinuousQueuedEventInMap","replayUnblockedEvents","scheduleCallbackIfUnblocked","unblocked","retryIfBlockedOn","unblock","nextExplicitTarget","_enabled","setEnabled","enabled","isEnabled","createEventListenerWrapperWithPriority","getEventPriority","listenerWrapper","dispatchDiscreteEvent","dispatchContinuousEvent","dispatchEvent","container","dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay","dispatchEventForPluginEventSystem","return_targetInst","nativeEventTarget","addEventBubbleListener","addEventCaptureListener","addEventCaptureListenerWithPassiveFlag","passive","addEventBubbleListenerWithPassiveFlag","startText","fallbackText","initialize","getText","reset","getData","start","startValue","startLength","end","endValue","endLength","minEnd","sliceTail","getEventCharCode","charCode","keyCode","functionThatReturnsTrue","functionThatReturnsFalse","createSyntheticEvent","Interface","SyntheticBaseEvent","reactName","reactEventType","_propName","normalize","defaultPrevented","EventInterface","SyntheticEvent","UIEventInterface","SyntheticUIEvent","lastMovementX","lastMovementY","lastMouseEvent","updateMouseMovementPolyfillState","MouseEventInterface","getEventModifierState","SyntheticMouseEvent","DragEventInterface","SyntheticDragEvent","FocusEventInterface","SyntheticFocusEvent","AnimationEventInterface","SyntheticAnimationEvent","ClipboardEventInterface","SyntheticClipboardEvent","CompositionEventInterface","SyntheticCompositionEvent","SyntheticInputEvent","normalizeKey","translateToKey","getEventKey","modifierKeyToProp","modifierStateGetter","keyArg","syntheticEvent","keyProp","KeyboardEventInterface","SyntheticKeyboardEvent","PointerEventInterface","SyntheticPointerEvent","TouchEventInterface","SyntheticTouchEvent","TransitionEventInterface","SyntheticTransitionEvent","WheelEventInterface","SyntheticWheelEvent","END_KEYCODES","START_KEYCODE","canUseCompositionEvent","documentMode","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CODE","SPACEBAR_CHAR","registerEvents","hasSpaceKeypress","isKeypressCommand","getCompositionEventType","isFallbackCompositionStart","isFallbackCompositionEnd","getDataFromCustomEvent","detail","isUsingKoreanIME","isComposing","extractCompositionEvent","dispatchQueue","fallbackData","listeners","accumulateTwoPhaseListeners","customData","getNativeBeforeInputChars","which","chars","getFallbackBeforeInputChars","extractBeforeInputEvent","extractEvents","supportedInputTypes","isTextInputElement","isEventSupported","eventNameSuffix","eventName","isSupported","registerEvents$1","createAndAccumulateChangeEvent","activeElement","activeElementInst","shouldUseChangeEvent","manualDispatchChangeEvent","runEventInBatch","processDispatchQueue","getInstIfValueChanged","targetNode","getNodeFromInstance","getTargetInstForChangeEvent","isInputEventSupported","startWatchingForValueChange","handlePropertyChange","stopWatchingForValueChange","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","shouldUseClickEvent","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","handleControlledInputBlur","state","extractEvents$1","getTargetInstFunc","handleEventFunc","registerEvents$2","extractEvents$2","isOverEvent","isOutEvent","related","isContainerMarkedAsRoot","win","from","to","_related","SyntheticEventCtor","leaveEventType","enterEventType","eventTypePrefix","fromNode","toNode","leave","enter","nativeTargetInst","enterEvent","accumulateEnterLeaveTwoPhaseListeners","is","y","objectIs","shallowEqual","objA","objB","keysA","keysB","currentKey","getLeafNode","getSiblingNode","getNodeForCharacterOffset","offset","nodeStart","nodeEnd","getOffsets","outerNode","ownerDocument","selection","anchorNode","anchorOffset","focusNode","focusOffset","getModernOffsetsFromPoints","indexWithinAnchor","indexWithinFocus","parentNode","outer","next","setOffsets","offsets","temp","startMarker","endMarker","range","isTextNode","containsNode","innerNode","isInDocument","isSameOriginFrame","iframe","getActiveElementDeep","hasSelectionCapabilities","getSelectionInformation","focusedElem","getSelection","restoreSelection","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","setSelection","ancestors","ancestor","input","skipSelectionChangeEvent","registerEvents$3","activeElement$1","activeElementInst$1","lastSelection","mouseDown","getSelection$1","getEventTargetDocument","eventTarget","constructSelectEvent","currentSelection","extractEvents$3","makePrefixMap","styleProp","vendorPrefixes","prefixedEventNames","getVendorPrefixedEventName","prefixMap","ANIMATION_END","ANIMATION_ITERATION","ANIMATION_START","TRANSITION_END","topLevelEventsToReactNames","simpleEventPluginEvents","registerSimpleEvent","registerSimpleEvents","capitalizedEvent","extractEvents$4","inCapturePhase","accumulateTargetOnly","_listeners","accumulateSinglePhaseListeners","_event","extractEvents$5","shouldProcessPolyfillPlugins","mediaEventTypes","nonDelegatedEvents","executeDispatch","currentTarget","processDispatchQueueItemsInOrder","dispatchListeners","previousInstance","_dispatchListeners$i","_dispatchListeners$_i","_instance","_currentTarget","_listener","_dispatchQueue$i","dispatchEventsForPlugins","listenToNonDelegatedEvent","targetElement","isCapturePhaseListener","listenerSet","getEventListenerSet","listenerSetKey","getListenerSetKey","addTrappedEventListener","listenToNativeEvent","listeningMarker","listenToAllSupportedEvents","rootContainerElement","isDeferredListenerForLegacyFBSupport","isPassiveListener","isMatchingRootContainer","grandContainer","ancestorInst","targetContainerNode","mainLoop","nodeTag","grandNode","grandTag","parentTag","createDispatchListener","targetFiber","nativeEventType","captureName","reactEventName","lastHostComponent","_instance2","_instance3","captureListener","bubbleListener","getParent","getLowestCommonAncestor","instA","instB","nodeA","nodeB","depthA","tempA","depthB","tempB","depth","accumulateEnterLeaveListenersForEvent","common","_instance4","leaveEvent","capture","didWarnInvalidHydration","DANGEROUSLY_SET_INNER_HTML","SUPPRESS_CONTENT_EDITABLE_WARNING","SUPPRESS_HYDRATION_WARNING","AUTOFOCUS","CHILDREN","STYLE","HTML$1","warnedUnknownTags","validatePropertiesInDevelopment","warnForPropDifference","warnForExtraAttributes","warnForInvalidEventListener","canDiffStyleForHydrationWarning","normalizeHTML","serverValue","clientValue","normalizedClientValue","normalizeMarkupForTextOrAttribute","normalizedServerValue","attributeNames","names","testElement","NORMALIZE_NEWLINES_REGEX","NORMALIZE_NULL_AND_REPLACEMENT_REGEX","markup","markupString","checkForUnmatchedText","serverText","clientText","isConcurrentMode","shouldWarnDev","normalizedClientText","normalizedServerText","getOwnerDocumentFromRootContainer","noop","trapClickOnNonInteractiveElement","setInitialDOMProperties","domElement","nextProps","propKey","nextProp","nextHtml","canSetTextContent","updateDOMProperties","updatePayload","wasCustomComponentTag","namespaceURI","div","createTextNode","setInitialProperties","rawProps","diffProperties","lastRawProps","nextRawProps","lastProps","lastStyle","lastProp","lastHtml","updateProperties","getPossibleStandardName","diffHydratedProperties","extraAttributeNames","attributes","serverHTML","expectedHTML","expectedStyle","isMismatchDueToBadCasing","ownNamespace","dontWarnCustomElement","diffHydratedText","textNode","isDifferent","warnForDeletedHydratableElement","warnForDeletedHydratableText","warnForInsertedHydratedElement","warnForInsertedHydratedText","restoreControlledState$3","validateDOMNesting","updatedAncestorInfo","specialTags","inScopeTags","buttonScopeTags","impliedEndTags","emptyAncestorInfo","oldInfo","ancestorInfo","isTagValidWithParent","findInvalidAncestorForTag","didWarn$1","childTag","childText","parentInfo","invalidParent","invalidAncestor","invalidParentOrAncestor","ancestorTag","warnKey","tagDisplayName","whitespaceInfo","SUPPRESS_HYDRATION_WARNING$1","SUSPENSE_START_DATA","SUSPENSE_END_DATA","SUSPENSE_PENDING_START_DATA","SUSPENSE_FALLBACK_START_DATA","STYLE$1","eventsEnabled","selectionInformation","getRootHostContext","rootContainerInstance","namespace","nodeType","validatedTag","getChildHostContext","parentHostContext","parentHostContextDev","getPublicInstance","prepareForCommit","containerInfo","activeInstance","resetAfterCommit","createInstance","hostContext","internalInstanceHandle","hostContextDev","ownAncestorInfo","precacheFiberNode","updateFiberProps","appendInitialChild","parentInstance","finalizeInitialChildren","prepareUpdate","oldProps","newProps","shouldSetTextContent","createTextInstance","getCurrentEventPriority","currentEvent","scheduleTimeout","cancelTimeout","noTimeout","localPromise","scheduleMicrotask","handleErrorInNextTick","commitMount","commitUpdate","resetTextContent","commitTextUpdate","textInstance","oldText","newText","appendChild","appendChildToContainer","reactRootContainer","insertBefore","beforeChild","insertInContainerBefore","removeChild","removeChildFromContainer","clearSuspenseBoundary","suspenseInstance","data","clearSuspenseBoundaryFromContainer","hideInstance","hideTextInstance","unhideInstance","display","unhideTextInstance","clearContainer","canHydrateInstance","canHydrateTextInstance","canHydrateSuspenseInstance","isSuspenseInstancePending","isSuspenseInstanceFallback","getSuspenseInstanceFallbackErrorDetails","dataset","digest","message","registerSuspenseInstanceRetry","getNextHydratable","nodeData","getNextHydratableSibling","getFirstHydratableChild","getFirstHydratableChildWithinContainer","parentContainer","getFirstHydratableChildWithinSuspenseInstance","hydrateInstance","hydrateTextInstance","hydrateSuspenseInstance","getNextHydratableInstanceAfterSuspenseInstance","getParentSuspenseInstance","targetInstance","commitHydratedContainer","commitHydratedSuspenseInstance","shouldDeleteUnhydratedTailInstances","didNotMatchHydratedContainerTextInstance","didNotMatchHydratedTextInstance","parentProps","didNotHydrateInstanceWithinContainer","didNotHydrateInstanceWithinSuspenseInstance","didNotHydrateInstance","didNotFindHydratableInstanceWithinContainer","didNotFindHydratableTextInstanceWithinContainer","didNotFindHydratableInstanceWithinSuspenseInstance","didNotFindHydratableTextInstanceWithinSuspenseInstance","didNotFindHydratableInstance","didNotFindHydratableTextInstance","errorHydratingContainer","preparePortalMount","portalInstance","randomKey","internalInstanceKey","internalPropsKey","internalContainerInstanceKey","internalEventHandlersKey","internalEventHandlerListenersKey","internalEventHandlesSetKey","detachDeletedInstance","hostInst","markContainerAsRoot","hostRoot","unmarkContainerAsRoot","targetSuspenseInst","elementListenerSet","valueStack","fiberStack","createCursor","cursor","warnedAboutMissingGetChildContext","emptyContextObject","contextStackCursor","didPerformWorkStackCursor","previousContext","getUnmaskedContext","didPushOwnContextIfProvider","isContextProvider","cacheContext","unmaskedContext","maskedContext","getMaskedContext","contextTypes","hasContextChanged","childContextTypes","popContext","popTopLevelContextObject","pushTopLevelContextObject","didChange","processChildContext","parentContext","childContext","contextKey","pushContextProvider","memoizedMergedChildContext","invalidateContextProvider","mergedContext","findCurrentUnmaskedContext","LegacyRoot","ConcurrentRoot","syncQueue","includesLegacySyncCallbacks","isFlushingSyncQueue","scheduleSyncCallback","scheduleLegacySyncCallback","flushSyncCallbacksOnlyInLegacyMode","flushSyncCallbacks","previousUpdatePriority","isSync","forkStack","forkStackIndex","treeForkProvider","treeForkCount","idStack","idStackIndex","treeContextProvider","treeContextId","treeContextOverflow","isForkedChild","warnIfNotHydrating","getForksAtLevel","getTreeId","overflow","idWithLeadingBit","id","getLeadingBit","pushTreeFork","totalChildren","pushTreeId","baseIdWithLeadingBit","baseOverflow","baseLength","getBitLength","baseId","slot","numberOfOverflowBits","newOverflowBits","newOverflow","restOfBaseId","restOfBaseLength","restOfLength","restOfNewBits","newBits","_id","_overflow","pushMaterializedTreeId","returnFiber","numberOfForks","slotIndex","number","popTreeContext","getSuspendedTreeContext","restoreSuspendedTreeContext","suspendedContext","getIsHydrating","hydrationParentFiber","nextHydratableInstance","didSuspendOrErrorDEV","hydrationErrors","warnIfHydrating","markDidThrowWhileHydratingDEV","didSuspendOrErrorWhileHydratingDEV","enterHydrationState","reenterHydrationStateFromDehydratedSuspenseInstance","treeContext","warnUnhydratedInstance","deleteHydratableInstance","childToDelete","createFiberFromHostInstanceForDeletion","deletions","warnNonhydratedInstance","_text","_isConcurrentMode","_parentInstance","_type2","_text2","insertNonHydratedInstance","tryHydrate","nextInstance","dehydratedFragment","createFiberFromDehydratedFragment","shouldClientRenderOnMismatch","throwOnHydrationMismatch","tryToClaimNextHydratableInstance","firstAttemptedInstance","prevHydrationParentFiber","prepareToHydrateHostInstance","shouldWarnIfMismatchDev","prepareToHydrateHostTextInstance","shouldUpdate","_isConcurrentMode2","prepareToHydrateHostSuspenseInstance","skipPastDehydratedSuspenseInstance","popToNextHostParent","popHydrationState","warnIfUnhydratedTailNodes","hasUnhydratedTailNodes","resetHydrationState","upgradeHydrationErrorsToRecoverable","queueRecoverableErrors","queueHydrationError","ReactCurrentBatchConfig$1","NoTransition","requestCurrentTransition","ReactStrictModeWarnings","findStrictRoot","maybeStrictRoot","setToSortedString","pendingComponentWillMountWarnings","pendingUNSAFE_ComponentWillMountWarnings","pendingComponentWillReceivePropsWarnings","pendingUNSAFE_ComponentWillReceivePropsWarnings","pendingComponentWillUpdateWarnings","pendingUNSAFE_ComponentWillUpdateWarnings","didWarnAboutUnsafeLifecycles","componentWillMountUniqueNames","UNSAFE_componentWillMountUniqueNames","componentWillReceivePropsUniqueNames","UNSAFE_componentWillReceivePropsUniqueNames","componentWillUpdateUniqueNames","UNSAFE_componentWillUpdateUniqueNames","sortedNames","_sortedNames","_sortedNames2","_sortedNames3","_sortedNames4","_sortedNames5","pendingLegacyContextWarning","didWarnAboutLegacyContext","strictRoot","warningsForRoot","fiberArray","firstFiber","uniqueNames","didWarnAboutGenerators","ownerHasFunctionTypeWarning","warnForMissingKey","isReactClass","coerceRef","mixedRef","resolvedInst","stringRef","refs","throwOnInvalidObjectType","newChild","childString","warnOnFunctionType","resolveLazy","ChildReconciler","shouldTrackSideEffects","deleteChild","deleteRemainingChildren","currentFirstChild","mapRemainingChildren","existingChildren","existingChild","useFiber","pendingProps","clone","createWorkInProgress","placeChild","newFiber","lastPlacedIndex","newIndex","oldIndex","placeSingleChild","updateTextNode","created","createFiberFromText","existing","updateElement","updateFragment","isCompatibleFamilyForHotReloading","createFiberFromElement","updatePortal","portal","createFiberFromPortal","createFiberFromFragment","createChild","_created","_created2","_created3","updateSlot","oldFiber","updateFromMap","newIdx","matchedFiber","_matchedFiber","_matchedFiber2","_matchedFiber3","warnOnInvalidKey","knownKeys","reconcileChildrenArray","newChildren","resultingFirstChild","previousNewFiber","nextOldFiber","_newFiber","_numberOfForks","_newFiber2","_numberOfForks2","reconcileChildrenIterator","newChildrenIterable","_newChildren","_step","_newFiber3","_numberOfForks3","_newFiber4","_numberOfForks4","reconcileSingleTextNode","reconcileSingleElement","_existing","_created4","reconcileSinglePortal","reconcileChildFibers","isUnkeyedTopLevelFragment","mountChildFibers","cloneChildFibers","currentChild","resetChildFibers","resetWorkInProgress","valueCursor","rendererSigil","currentlyRenderingFiber","lastContextDependency","lastFullyObservedContext","isDisallowedContextReadInDEV","resetContextDependencies","enterDisallowedContextReadInDEV","exitDisallowedContextReadInDEV","pushProvider","providerFiber","popProvider","scheduleContextWorkOnParentPath","propagationRoot","propagateContextChange","propagateContextChange_eager","nextFiber","list","dependency","update","createUpdate","ForceUpdate","updateQueue","sharedQueue","parentSuspense","_alternate","sibling","prepareToReadContext","firstContext","markWorkInProgressReceivedUpdate","readContext","contextItem","concurrentQueues","pushConcurrentUpdateQueue","finishQueueingConcurrentUpdates","lastInterleavedUpdate","firstInterleavedUpdate","lastPendingUpdate","firstPendingUpdate","enqueueConcurrentHookUpdate","interleaved","markUpdateLaneFromFiberToRoot","enqueueConcurrentHookUpdateAndEagerlyBailout","enqueueConcurrentClassUpdate","enqueueConcurrentRenderForLane","unsafe_markUpdateLaneFromFiberToRoot","sourceFiber","warnAboutUpdateOnNotYetMountedFiberInDEV","UpdateState","ReplaceState","CaptureUpdate","hasForceUpdate","didWarnUpdateInsideUpdate","currentlyProcessingQueue","initializeUpdateQueue","cloneUpdateQueue","currentQueue","enqueueUpdate","isUnsafeClassRenderPhaseUpdate","entangleTransitions","queueLanes","newQueueLanes","enqueueCapturedUpdate","capturedUpdate","newFirst","newLast","firstBaseUpdate","lastBaseUpdate","getStateFromUpdate","prevState","nextState","_payload","processUpdateQueue","pendingQueue","currentLastBaseUpdate","newState","newLanes","newBaseState","newFirstBaseUpdate","newLastBaseUpdate","updateEventTime","_clone","effects","_lastPendingUpdate","_firstPendingUpdate","lastInterleaved","markSkippedUpdateLanes","resetHasForceUpdateBeforeProcessing","checkHasForceUpdateAfterProcessing","commitUpdateQueue","finishedWork","finishedQueue","effect","NO_CONTEXT","contextStackCursor$1","contextFiberStackCursor","rootInstanceStackCursor","requiredContext","getRootHostContainer","rootInstance","pushHostContainer","nextRootInstance","nextRootContext","popHostContainer","getHostContext","pushHostContext","nextContext","popHostContext","DefaultSuspenseContext","SubtreeSuspenseContextMask","InvisibleParentSuspenseContext","ForceSuspenseFallback","suspenseStackCursor","hasSuspenseContext","flag","setDefaultShallowSuspenseContext","setShallowSuspenseContext","shallowContext","addSubtreeSuspenseContext","subtreeContext","pushSuspenseContext","newContext","popSuspenseContext","shouldCaptureSuspense","hasInvisibleParent","findFirstSuspended","row","dehydrated","didSuspend","NoFlags$1","HasEffect","Insertion","Layout","Passive$1","workInProgressSources","resetWorkInProgressVersions","mutableSource","registerMutableSourceForHydration","getVersion","version","ReactCurrentBatchConfig$2","didWarnAboutMismatchedHooksForComponent","didWarnUncachedGetSnapshot","currentlyRenderingFiber$1","currentHook","workInProgressHook","didScheduleRenderPhaseUpdate","didScheduleRenderPhaseUpdateDuringThisPass","localIdCounter","globalClientIdCounter","RE_RENDER_LIMIT","currentHookNameInDev","hookTypesDev","hookTypesUpdateIndexDev","ignorePreviousDependencies","mountHookTypesDev","hookName","updateHookTypesDev","warnOnHookMismatchInDev","checkDepsAreArrayDev","currentHookName","table","secondColumnStart","oldHookName","newHookName","throwInvalidHookError","areHookInputsEqual","nextDeps","prevDeps","renderWithHooks","secondArg","nextRenderLanes","HooksDispatcherOnUpdateInDEV","HooksDispatcherOnMountWithHookTypesInDEV","HooksDispatcherOnMountInDEV","numberOfReRenders","HooksDispatcherOnRerenderInDEV","ContextOnlyDispatcher","didRenderTooFewHooks","checkDidRenderIdHook","didRenderIdHook","bailoutHooks","resetHooksAfterThrow","isUpdatingOpaqueValueInRenderPhase","mountWorkInProgressHook","updateWorkInProgressHook","nextCurrentHook","nextWorkInProgressHook","newHook","createFunctionComponentUpdateQueue","basicStateReducer","action","mountReducer","dispatch","dispatchReducerAction","updateReducer","baseQueue","baseFirst","pendingFirst","newBaseQueueFirst","newBaseQueueLast","interleavedLane","rerenderReducer","lastRenderPhaseUpdate","firstRenderPhaseUpdate","mountMutableSource","updateMutableSource","mountSyncExternalStore","nextSnapshot","cachedSnapshot","getWorkInProgressRoot","pushStoreConsistencyCheck","mountEffect","subscribeToStore","pushEffect","updateStoreInstance","updateSyncExternalStore","prevSnapshot","snapshotChanged","updateEffect","renderedSnapshot","check","componentUpdateQueue","stores","checkIfSnapshotChanged","forceStoreRerender","handleStoreChange","latestGetSnapshot","prevValue","scheduleUpdateOnFiber","mountState","dispatchSetState","updateState","rerenderState","destroy","lastEffect","firstEffect","mountRef","_ref2","updateRef","mountEffectImpl","fiberFlags","hookFlags","updateEffectImpl","prevEffect","mountInsertionEffect","updateInsertionEffect","mountLayoutEffect","updateLayoutEffect","imperativeHandleEffect","refCallback","_inst","_inst2","mountImperativeHandle","effectDeps","updateImperativeHandle","mountDebugValue","updateDebugValue","mountCallback","updateCallback","mountMemo","nextCreate","updateMemo","mountDeferredValue","updateDeferredValue","resolvedCurrentHook","updateDeferredValueImpl","rerenderDeferredValue","shouldDeferValue","deferredLane","setPending","mountTransition","_mountState","isPending","updateTransition","_updateState","rerenderTransition","_rerenderState","getIsUpdatingOpaqueValueInRenderPhaseInDEV","mountId","identifierPrefix","treeId","localId","globalClientId","updateId","requestUpdateLane","isRenderPhaseUpdate","enqueueRenderPhaseUpdate","requestEventTime","entangleTransitionUpdate","markUpdateInDevTools","lastRenderedReducer","prevDispatcher","InvalidNestedHooksDispatcherOnUpdateInDEV","eagerState","InvalidNestedHooksDispatcherOnMountInDEV","InvalidNestedHooksDispatcherOnRerenderInDEV","warnInvalidContextAccess","warnInvalidHookAccess","now$1","commitTime","layoutEffectStartTime","profilerStartTime","passiveEffectStartTime","currentUpdateIsNested","nestedUpdateScheduled","isCurrentUpdateNested","markNestedUpdateScheduled","resetNestedUpdateFlag","syncNestedUpdateFlag","getCommitTime","recordCommitTime","startProfilerTimer","stopProfilerTimerIfRunning","stopProfilerTimerIfRunningAndRecordDelta","overrideBaseTime","elapsedTime","recordLayoutEffectDuration","parentFiber","parentStateNode","recordPassiveEffectDuration","startLayoutEffectTimer","startPassiveEffectTimer","transferActualDuration","resolveDefaultProps","baseProps","fakeInternalInstance","didWarnAboutStateAssignmentForComponent","didWarnAboutUninitializedState","didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate","didWarnAboutLegacyLifecyclesAndDerivedState","didWarnAboutUndefinedDerivedState","warnOnUndefinedDerivedState","warnOnInvalidCallback","didWarnAboutDirectlyAssigningPropsToState","didWarnAboutContextTypeAndContextTypes","didWarnAboutInvalidateContextType","didWarnAboutLegacyContext$1","didWarnOnInvalidCallback","applyDerivedStateFromProps","getDerivedStateFromProps","memoizedState","classComponentUpdater","checkShouldComponentUpdate","oldState","checkClassInstance","renderPresent","hasMutatedProps","_state","adoptClassInstance","constructClassInstance","isLegacyContextConsumer","contextType","addendum","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","_componentName","newApiName","callComponentWillMount","callComponentWillReceiveProps","mountClassInstance","resumeMountClassInstance","oldContext","nextLegacyUnmaskedContext","hasNewLifecycles","_fiberFlags","_fiberFlags2","updateClassInstance","unresolvedOldProps","unresolvedNewProps","nextUnmaskedContext","createCapturedValueAtFiber","createCapturedValue","showErrorDialog","boundary","errorInfo","logCapturedError","logError","componentStack","componentNameMessage","errorBoundaryMessage","errorBoundaryName","combinedMessage","PossiblyWeakMap$1","createRootErrorUpdate","onUncaughtError","createClassErrorUpdate","getDerivedStateFromError","markFailedErrorBoundaryForHotReloading","markLegacyErrorBoundaryAsFailed","attachPingListener","pingCache","threadIDs","ping","pingSuspendedRoot","restorePendingUpdaters","attachRetryListener","suspenseBoundary","wakeables","resetSuspendedComponent","rootRenderLanes","currentSource","getNearestSuspenseBoundaryToCapture","markSuspenseBoundaryShouldCapture","currentSourceFiber","throwException","renderDidSuspendDelayIfPossible","uncaughtSuspenseError","_suspenseBoundary","renderDidError","_errorInfo","isAlreadyFailedLegacyErrorBoundary","_lane","_update","getSuspendedCache","ReactCurrentOwner$1","didReceiveUpdate","didWarnAboutBadClass","didWarnAboutModulePatternComponent","didWarnAboutContextTypeOnFunctionComponent","didWarnAboutGetDerivedStateOnFunctionComponent","didWarnAboutFunctionRefs","didWarnAboutReassigningProps","didWarnAboutRevealOrder","didWarnAboutTailOptions","didWarnAboutDefaultPropsOnFunctionComponent","reconcileChildren","nextChildren","forceUnmountCurrentAndReconcile","updateForwardRef","innerPropTypes","hasId","bailoutOnAlreadyFinishedWork","updateMemoComponent","isSimpleFunctionComponent","resolvedType","resolveFunctionForHotReloading","validateFunctionComponentInDev","updateSimpleMemoComponent","createFiberFromTypeAndProps","_innerPropTypes","hasScheduledUpdateOrContext","checkScheduledUpdateOrContext","prevProps","outerMemoType","outerPropTypes","updateFunctionComponent","updateOffscreenComponent","pushRenderLanes","_nextState2","subtreeRenderLanes","spawnedCachePool","nextBaseLanes","prevBaseLanes","_nextState","_subtreeRenderLanes","updateMode","updateProfiler","markRef","updateClassComponent","shouldError","tempInstance","hasContext","resetSuspendedCurrentOnMountInLegacyMode","nextUnitOfWork","finishClassComponent","didCaptureError","pushHostRootContext","updateHostRoot","prevChildren","overrideState","recoverableError","mountHostRootWithoutHydrating","_recoverableError","updateHostComponent","isDirectTextChild","updateHostText","mountLazyComponent","_current","resolvedTag","resolveLazyComponentTag","resolvedProps","resolveClassForHotReloading","resolveForwardRefForHotReloading","hint","mountIncompleteClassComponent","mountIndeterminateComponent","_componentName2","debugSource","_componentName3","_componentName4","SUSPENDED_MARKER","mountSuspenseOffscreenState","updateSuspenseOffscreenState","prevOffscreenState","cachePool","shouldRemainOnFallback","suspenseContext","getRemainingWorkInPrimaryTree","updateSuspenseComponent","shouldSuspend","showFallback","mountDehydratedSuspenseComponent","nextPrimaryChildren","nextFallbackChildren","fallbackFragment","mountSuspenseFallbackChildren","primaryChildFragment","mountSuspensePrimaryChildren","_dehydrated","updateDehydratedSuspenseComponent","_nextFallbackChildren","_nextPrimaryChildren","fallbackChildFragment","updateSuspenseFallbackChildren","_primaryChildFragment2","_nextPrimaryChildren2","_primaryChildFragment3","updateSuspensePrimaryChildren","primaryChildren","mode","primaryChildProps","mountWorkInProgressOffscreenFiber","fallbackChildren","progressedPrimaryFragment","offscreenProps","createFiberFromOffscreen","updateWorkInProgressOffscreenFiber","currentPrimaryChildFragment","currentFallbackChildFragment","retrySuspenseComponentWithoutHydrating","mountSuspenseFallbackAfterRetryWithoutHydrating","fiberMode","_capturedValue2","_primaryChildFragment4","_getSuspenseInstanceF","capturedValue","attemptHydrationAtLane","_capturedValue","retry","retryDehydratedSuspenseBoundary","scheduleSuspenseWorkOnFiber","propagateSuspenseContextChange","findLastContentRow","lastContentRow","currentRow","validateRevealOrder","revealOrder","validateTailOptions","tailMode","validateSuspenseListNestedChild","childSlot","isAnArray","isIterable","validateSuspenseListChildren","childrenIterator","initSuspenseListRenderState","isBackwards","tail","renderState","updateSuspenseListComponent","shouldForceFallback","didSuspendBefore","_tail","nextRow","updatePortalComponent","hasWarnedAboutUsingNoValuePropOnContextProvider","updateContextProvider","providerType","providerPropTypes","oldValue","hasWarnedAboutUsingContextAsConsumer","updateContextConsumer","remountFiber","oldWorkInProgress","newWorkInProgress","prevSibling","updateLanes","attemptEarlyBailoutIfNoScheduledUpdate","hasChildWork","primaryChildLanes","_hasChildWork","beginWork","unresolvedProps","_Component","_unresolvedProps","_resolvedProps","_unresolvedProps2","_resolvedProps2","_unresolvedProps3","_resolvedProps3","_Component2","_unresolvedProps4","_resolvedProps4","markUpdate","markRef$1","appendAllChildren","updateHostContainer","updateHostComponent$1","updateHostText$1","needsVisibilityToggle","isHidden","currentHostContext","cutOffTailIfNeeded","hasRenderedATailFallback","tailNode","lastTailNode","_tailNode","_lastTailNode","bubbleProperties","completedWork","didBailout","newChildLanes","subtreeFlags","_treeBaseDuration","_child2","_child3","actualDuration","treeBaseDuration","completeDehydratedSuspenseBoundary","wasHydrated","isTimedOutSuspense","_isTimedOutSuspense","_primaryChildFragment","completeWork","fiberRoot","_wasHydrated","_rootContainerInstance","_currentHostContext","_wasHydrated2","fallthroughToNormalSuspensePath","nextDidTimeout","prevDidTimeout","_offscreenFiber2","hasInvisibleChildContext","renderDidSuspend","didSuspendAlready","renderedTail","cannotBeSuspended","renderHasNotSuspendedYet","suspended","newThenables","getRenderTargetTime","_suspended","_newThenables","previousSibling","popRenderLanes","nextIsHidden","_prevState","prevIsHidden","unwindWork","flags","_flags","_flags2","unwindInterruptedWork","interruptedWork","didWarnAboutUndefinedSnapshotBeforeUpdate","offscreenSubtreeIsHidden","offscreenSubtreeWasHidden","PossiblyWeakSet","nextEffect","inProgressLanes","inProgressRoot","reportUncaughtErrorInDEV","callComponentWillUnmountWithTimer","safelyCallCommitHookLayoutEffectListMount","nearestMountedAncestor","commitHookEffectListMount","captureCommitPhaseError","safelyCallComponentWillUnmount","safelyCallComponentDidMount","safelyAttachRef","commitAttachRef","safelyDetachRef","retVal","safelyCallDestroy","shouldFireAfterActiveInstanceBlur","commitBeforeMutationEffects","commitBeforeMutationEffects_begin","shouldFire","commitBeforeMutationEffects_complete","commitBeforeMutationEffectsOnFiber","snapshot","didWarnSet","commitHookEffectListUnmount","setIsRunningInsertionEffect","commitPassiveEffectDurations","finishedRoot","passiveEffectDuration","_finishedWork$memoize","onPostCommit","phase","commitLayoutEffectOnFiber","committedLanes","_updateQueue","_finishedWork$memoize2","onCommit","onRender","effectDuration","enqueuePendingPassiveProfilerEffect","commitSuspenseHydrationCallbacks","reappearLayoutEffectsOnFiber","hideOrUnhideAllChildren","hostSubtreeRoot","instanceToUse","detachFiberMutation","detachFiberAfterEffects","hostInstance","getHostParentFiber","isHostParent","getHostSibling","siblings","commitPlacement","before","insertOrAppendPlacementNode","_parent","_before","insertOrAppendPlacementNodeIntoContainer","isHost","hostParent","hostParentIsContainer","commitDeletionEffects","deletedFiber","findParent","commitDeletionEffectsOnFiber","recursivelyTraverseDeletionEffects","prevHostParent","prevHostParentIsContainer","_prevHostParent","_prevHostParentIsContainer","_effect","prevOffscreenSubtreeWasHidden","commitSuspenseCallback","attachSuspenseRetryListeners","retryCache","resolveRetryWakeable","commitMutationEffects","commitMutationEffectsOnFiber","recursivelyTraverseMutationEffects","prevDebugFiber","commitReconciliationEffects","prevRootState","offscreenFiber","offscreenInstance","wasHidden","markCommitTimeOfFallback","_wasHidden","_offscreenInstance","_newState","_isHidden","offscreenBoundary","offscreenChild","disappearLayoutEffects_begin","commitLayoutEffects","commitLayoutEffects_begin","subtreeRoot","isModernRoot","newOffscreenSubtreeIsHidden","commitLayoutMountEffects_complete","newOffscreenSubtreeWasHidden","prevOffscreenSubtreeIsHidden","reappearLayoutEffects_begin","disappearLayoutEffects_complete","reappearLayoutEffects_complete","commitPassiveMountEffects","committedTransitions","commitPassiveMountEffects_begin","commitPassiveMountEffects_complete","commitPassiveMountOnFiber","commitPassiveUnmountEffects","commitPassiveUnmountEffects_begin","fiberToDelete","commitPassiveUnmountEffectsInsideOfDeletedTree_begin","previousFiber","detachedChild","detachedSibling","commitPassiveUnmountEffects_complete","commitPassiveUnmountOnFiber","deletedSubtreeRoot","commitPassiveUnmountInsideDeletedTreeOnFiber","commitPassiveUnmountEffectsInsideOfDeletedTree_complete","invokeLayoutEffectMountInDEV","invokePassiveEffectMountInDEV","invokeLayoutEffectUnmountInDEV","invokePassiveEffectUnmountInDEV","symbolFor","commitHooks","onCommitRoot$1","commitHook","isLegacyActEnvironment","isReactActEnvironmentGlobal","jestIsDefined","isConcurrentActEnvironment","ceil","ReactCurrentDispatcher$2","ReactCurrentOwner$2","ReactCurrentBatchConfig$3","ReactCurrentActQueue$1","NoContext","BatchedContext","RenderContext","CommitContext","RootInProgress","RootFatalErrored","RootErrored","RootSuspended","RootSuspendedWithDelay","RootCompleted","RootDidNotComplete","executionContext","workInProgressRoot","workInProgressRootRenderLanes","subtreeRenderLanesCursor","workInProgressRootExitStatus","workInProgressRootFatalError","workInProgressRootSkippedLanes","workInProgressRootInterleavedUpdatedLanes","workInProgressRootPingedLanes","workInProgressRootConcurrentErrors","workInProgressRootRecoverableErrors","globalMostRecentFallbackTime","FALLBACK_THROTTLE_MS","workInProgressRootRenderTargetTime","RENDER_TIMEOUT_MS","workInProgressTransitions","resetRenderTimer","hasUncaughtError","firstUncaughtError","legacyErrorBoundariesThatAlreadyFailed","rootDoesHavePassiveEffects","rootWithPendingPassiveEffects","pendingPassiveEffectsLanes","pendingPassiveProfilerEffects","pendingPassiveTransitions","NESTED_UPDATE_LIMIT","nestedUpdateCount","rootWithNestedUpdates","isFlushingPassiveEffects","didScheduleUpdateDuringPassiveEffects","NESTED_PASSIVE_UPDATE_LIMIT","nestedPassiveUpdateCount","rootWithPassiveNestedUpdates","currentEventTime","currentEventTransitionLane","isRunningInsertionEffect","isTransition","transition","eventLane","requestRetryLane","checkForNestedUpdates","warnAboutRenderPhaseUpdatesInDEV","warnIfUpdatesNotWrappedWithActDEV","markRootSuspended$1","ensureRootIsScheduled","scheduleInitialHydrationOnRoot","existingCallbackNode","cancelCallback$1","newCallbackPriority","existingCallbackPriority","fakeActCallbackNode","newCallbackNode","performSyncWorkOnRoot","schedulerPriorityLevel","scheduleCallback$1","performConcurrentWorkOnRoot","didTimeout","originalCallbackNode","didFlushPassiveEffects","flushPassiveEffects","shouldTimeSlice","exitStatus","renderRootConcurrent","renderRootSync","errorRetryLanes","recoverFromConcurrentError","fatalError","prepareFreshStack","renderWasConcurrent","isRenderConsistentWithExternalStores","_errorRetryLanes","_fatalError","finishConcurrentRender","errorsFromFirstAttempt","rootWorkInProgress","errorsFromSecondAttempt","errors","commitRoot","shouldForceFlushFallbacksInDEV","msUntilTimeout","eventTimeMs","timeElapsedMs","_msUntilTimeout","jnd","checks","renderedValue","flushRoot","batchedUpdates$1","prevExecutionContext","discreteUpdates","flushSync","isAlreadyRendering","timeoutHandle","handleError","erroredWork","completeUnitOfWork","yetAnotherThrownValue","pushDispatcher","popDispatcher","workLoopSync","performUnitOfWork","workLoopConcurrent","unitOfWork","beginWork$1","_next","siblingFiber","recoverableErrors","transitions","previousUpdateLanePriority","commitRootImpl","renderPriorityLevel","flushRenderPhaseStrictModeWarningsInDEV","subtreeHasEffects","rootHasEffect","rootDidHavePassiveEffects","commitDoubleInvokeEffectsInDEV","onRecoverableError","renderPriority","flushPassiveEffectsImpl","profilerEffects","_fiber","prepareToThrowUncaughtError","captureCommitPhaseErrorOnRoot","rootFiber","warnIfSuspenseResolutionNotWrappedWithActDEV","retryTimedOutBoundary","boundaryFiber","retryLane","hasPassiveEffects","invokeEffectsInDev","invokeEffectFn","primarySubtreeFlag","didWarnStateUpdateForNotYetMountedComponent","dummyFiber","originalWorkInProgressCopy","assignFiberPropertiesInDEV","originalError","replayError","didWarnAboutUpdateInRender","didWarnAboutUpdateInRenderForAnotherComponent","renderingComponentName","dedupeKey","setStateComponentName","schedulingFiber","actQueue","callbackNode","isRunning","resolveFamily","failedBoundaries","setRefreshHandler","handler","family","currentRender","syntheticType","prevType","nextType","needsCompareFamilies","$$typeofNextType","prevFamily","scheduleRefresh","staleFamilies","updatedFamilies","scheduleFibersWithFamiliesRecursively","scheduleRoot","updateContainer","candidateType","needsRender","needsRemount","_root","findHostInstancesForRefresh","families","hostInstances","types","findHostInstancesForMatchingFibersRecursively","didMatch","findHostInstancesForFiberShallowly","foundHostInstances","findChildHostInstancesForFiberShallowly","hasBadMapPolyfill","nonExtensibleObject","FiberNode","createFiber","shouldConstruct$1","$$typeof","currentDependencies","createHostRootFiber","isStrictMode","concurrentUpdatesByDefaultOverride","fiberTag","getTag","createFiberFromProfiler","createFiberFromSuspense","createFiberFromSuspenseList","elements","primaryChildInstance","content","dehydratedNode","FiberRootNode","hydrate","createFiberRoot","initialChildren","hydrationCallbacks","transitionCallbacks","uninitializedFiber","_initialState","createPortal","implementation","didWarnAboutNestedUpdates","didWarnAboutFindNodeInStrictMode","getContextForSubtree","parentComponent","findHostInstanceWithWarning","hostFiber","createContainer","createHydrationContainer","current$1","getPublicRootInstance","containerFiber","attemptSynchronousHydration$1","markRetryLaneIfNotHydrated","markRetryLaneImpl","attemptContinuousHydration$1","attemptHydrationAtCurrentPriority$1","findHostInstanceWithNoPortals","shouldErrorImpl","shouldSuspendImpl","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","scheduleUpdate","setErrorHandler","setSuspenseHandler","copyWithDeleteImpl","obj","path","updated","copyWithDelete","copyWithRenameImpl","oldPath","newPath","oldKey","copyWithRename","copyWithSetImpl","copyWithSet","findHook","newShouldErrorImpl","newShouldSuspendImpl","findHostInstanceByFiber","emptyFindFiberByHostInstance","getCurrentFiberForDevTools","injectIntoDevTools","devToolsConfig","findFiberByHostInstance","defaultOnRecoverableError","ReactDOMRoot","internalRoot","ReactDOMHydrationRoot","isValidContainer","createRoot","warnIfReactDOMContainerInDEV","scheduleHydration","hydrateRoot","mutableSources","isValidContainerLegacy","ReactCurrentOwner$3","topLevelUpdateWarnings","isRootRenderedBySomeReact","rootEl","getReactRootElementInContainer","hasNonRootReactChild","noopOnRecoverableError","legacyCreateRootFromDOMContainer","isHydrationContainer","originalCallback","rootSibling","_originalCallback","_rootContainerElement","warnOnInvalidCallback$1","legacyRenderSubtreeIntoContainer","forceHydrate","maybeRoot","didWarnAboutFindDOMNode","findDOMNode","componentOrElement","warnedAboutRefsInRender","unstable_renderSubtreeIntoContainer","containerNode","didWarnAboutUnmountComponentAtNode","unmountComponentAtNode","renderedByDifferentReact","_rootEl","isContainerReactRoot","createPortal$1","renderSubtreeIntoContainer","Internals","createRoot$1","hydrateRoot$1","flushSync$1","foundDevTools","protocol","reactDom_development","reactDomModule","m","h","o","$$observable","symbol_observable_default","randomString","ActionTypes","actionTypes_default","isPlainObject","proto","miniKindOf","val","isDate","isError","constructorName","ctorName","kindOf","typeOfVal","createStore","preloadedState","enhancer","currentReducer","currentListeners","nextListeners","listenerIdCounter","isDispatching","ensureCanMutateNextListeners","getState","isSubscribed","listenerId","replaceReducer","nextReducer","observable","outerSubscribe","observer","observeState","observerAsObserver","warning","getUnexpectedStateShapeWarningMessage","inputState","reducers","unexpectedKeyCache","reducerKeys","argumentName","unexpectedKeys","assertReducerShape","combineReducers","finalReducers","finalReducerKeys","shapeAssertionError","warningMessage","hasChanged","previousStateForKey","nextStateForKey","actionType","compose","funcs","arg","applyMiddleware","middlewares","createStore2","store","middlewareAPI","chain","middleware","isAction","NOTHING","DRAFTABLE","DRAFT_STATE","plugin","thing","die","msg","getPrototypeOf","isDraft","isDraftable","_a","isMap","isSet","objectCtorString","Ctor","each","iter","getArchtype","entry","propOrOldValue","t","latest","shallowCopy","base","strict","isPlain","descriptors","desc","freeze","deep","isFrozen","dontMutateFrozenCollections","plugins","getPlugin","pluginKey","currentScope","getCurrentScope","createScope","parent_","immer_","usePatchesInScope","patchListener","revokeScope","leaveScope","revokeDraft","enterScope","immer2","draft","processResult","baseDraft","finalize","maybeFreeze","rootScope","childValue","finalizeProperty","resultEach","isSet2","parentState","targetObject","rootPath","targetIsSet","res","createProxyProxy","traps","objectTraps","arrayTraps","revoke","proxy","readPropFromProto","prepareCopy","createProxy","getDescriptorFromProto","current2","markChanged","Immer2","recipe","defaultBase","base2","p","ip","patches","inversePatches","patch","applyPatchesImpl","currentImpl","copy","immer","produce","createThunkMiddleware","extraArgument","thunk","withExtraArgument","composeWithDevTools","hasMatchFunction","v","createAction","prepareAction","actionCreator","prepared","isActionCreator","getMessage","splitType","actionName","createActionCreatorInvariantMiddleware","isActionCreator2","getTimeMeasureUtils","maxDelay","elapsed","started","finished","Tuple","_Tuple","items","arr","freezeDraftable","createNextState","getOrInsertComputed","compute","isImmutableDefault","trackForMutations","isImmutable","ignorePaths","trackedProperties","trackProperties","detectMutations","checkedObjects","tracked","childPath","ignoredPaths","trackedProperty","sameParentRef","prevObj","sameRef","keysToDetect","hasIgnoredPaths","nestedPath","ignored","createImmutableStateInvariantMiddleware","stringify2","serializer","indent","decycler","getSerialize2","thisPos","warnAfter","measureUtils","dispatchedAction","findNonSerializableValue","isSerializable","getEntries","cache","foundNestedSerializable","entries","nestedValue","isNestedFrozen","createSerializableStateInvariantMiddleware","ignoredActions","ignoredActionPaths","ignoreState","ignoreActions","disableCache","storeAPI","isAction2","foundActionNonSerializableValue","keyPath","foundStateNonSerializableValue","isBoolean","buildGetDefaultMiddleware","immutableCheck","serializableCheck","actionCreatorCheck","middlewareArray","thunkMiddleware","immutableOptions","serializableOptions","actionCreatorOptions","SHOULD_AUTOBATCH","createQueueWithTimer","notify","autoBatchEnhancer","notifying","shouldNotifyAtEndOfTick","notificationQueued","queueCallback","notifyListeners","l","listener2","wrappedListener","unsubscribe","buildGetDefaultEnhancers","middlewareEnhancer","autoBatch","enhancerArray","configureStore","getDefaultMiddleware","devTools","duplicateMiddlewareCheck","enhancers","rootReducer","isPlainObject2","finalMiddleware","middlewareReferences","middleware2","finalCompose","compose2","getDefaultEnhancers","storeEnhancers","composedEnhancer","executeReducerBuilderCallback","builderCallback","actionsMap","actionMatchers","defaultCaseReducer","builder","typeOrActionCreator","asyncThunk","matcher","isStateFunction","createReducer","mapOrBuilderCallback","finalActionMatchers","finalDefaultCaseReducer","getInitialState","frozenInitialState","caseReducers","reducer2","cr","previousState","caseReducer","isDraft2","isDraftable2","createNextState2","asyncThunkSymbol","getType","slice","actionKey","buildCreateSlice","creators","cAT","reducerPath","buildReducerCreators","reducerNames","contextMethods","name2","reducerName","reducerDefinition","reducerDetails","isAsyncThunkSliceReducerDefinition","handleThunkCaseReducerDefinition","handleNormalReducerDefinition","buildReducer","extraReducers","finalCaseReducers","sM","selectSelf","injectedSelectorCache","injectedStateCache","_reducer","makeSelectorProps","reducerPath2","injected","selectSlice","sliceState","getSelectors","selectState","selectorCache","selector","wrapSelector","injectable","pathOpt","newReducerPath","wrapper","rootState","createSlice","payloadCreator","prepare","createNotation","maybeReducerWithPrepare","prepareCallback","isCaseReducerWithPrepareDefinition","fulfilled","settled","InvalidTokenError","b64DecodeUnicode","str","code","base64UrlDecode","output","jwtDecode","pos","part","decoded","hookCallback","hooks","setHookCallback","isObject","hasOwnProp","isObjectEmpty","k","isUndefined","isNumber","arrLen","extend","createUTC","locale","createLocalOrUTC","defaultParsingFlags","getParsingFlags","some","fun","len","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","momentPropertiesLen","Moment","isMoment","deprecate","firstTime","argLen","deprecations","deprecateSimple","isFunction","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","calendar","mom","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","removeFormattingTokens","makeFormatFunction","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","isFuture","pastFuture","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","getPrioritizedUnits","unitsObj","u","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","match1to2NoLeadingZero","match1to2HasZero","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","absFloor","toInt","argumentForCoercion","coercedNumber","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","isLeapYear","year","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","getSetYear","makeGetSet","getIsLeapYear","unit","keepTime","set$1","isUTC","month","date","stringGet","stringSet","prioritized","prioritizedLen","mod","indexOf","daysInMonth","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","llc","localeMonthsParse","setMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","shortP","longP","createDate","M","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","j","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","getSetGlobalLocale","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","w","weekYear","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","prototypeMin","other","prototypeMax","pickBy","moments","min","max","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","offsetFromString","chunkOffset","matches","chunk","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","createAdder","direction","period","dur","tmp","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","property","propertyLen","arrayTest","dataTypeTest","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","time","formats","sod","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toISOString","keepOffset","utc","inspect","zone","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","erasName","erasAbbr","erasNarrow","addWeekYearFormatToken","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","createUnix","createInZone","preParsePostFormat","proto$1","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","humanize","argWithSuffix","argThresholds","withSuffix","th","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","USER_ID_COOKIE_NAME","ACCESS_TOKEN_COOKIE_NAME","REFRESH_TOKEN_COOKIE_NAME","CUSTOMER_ID_COOKIE_NAME","SECONDS_TO_EXPIRATION","setAccessToken","accessToken","setCookie","getAccessToken","getCookie","setRefreshToken","refreshToken","getRefreshToken","setUserId","userId","getUserId","setCustomerId","customerId","getCustomerId","cookieName","cookieValue","moment","cookie","clearCookie","clearAllCookies","authCookieClearTokens","authSlice","authCookieSetAccessToken","authCookieSetRefreshToken","authCookieSetUserId","authCookieSetCustomerId","clearTokens","authReducer","useSyncExternalStoreWithSelector_development","isEqual","instRef","memoizedSelector","hasMemo","memoizedSnapshot","memoizedSelection","nextSelection","maybeGetServerSnapshot","withSelectorModule","defaultNoopBatch","createListenerCollection","nullListeners","createSubscription","parentSub","subscriptionsAmount","selfSubscribed","addNestedSub","trySubscribe","cleanupListener","removed","tryUnsubscribe","notifyNestedSubs","handleChangeWrapper","subscription","trySubscribeSelf","tryUnsubscribeSelf","isDOM","isRunningInReactNative","isReactNative","getUseIsomorphicLayoutEffect","React.useLayoutEffect","React.useEffect","useIsomorphicLayoutEffect","ContextKey","gT","getContext","React.createContext","contextMap","ReactReduxContext","Provider","providerProps","serverState","contextValue","React.useMemo","baseContextValue","identityFunctionCheck","stabilityCheck","React.createElement","Provider_default","createReduxContextHook","React.useContext","useReduxContext","createStoreHook","useReduxContext2","useStore2","useStore","createDispatchHook","useDispatch2","useDispatch","refEquality","createSelectorHook","useSelector2","equalityFnOrOptions","equalityFn","reduxContext","getServerState","firstRun","React.useRef","wrappedSelector","React.useCallback","devModeChecks","finalIdentityFunctionCheck","finalStabilityCheck","toCompare","selectedState","useSyncExternalStoreWithSelector","React.useDebugValue","useSelector","eventBusSlice","addEvent","eventBusReducer","undefined","VERSION","LARGE_ARRAY_SIZE","CORE_ERROR_TEXT","FUNC_ERROR_TEXT","INVALID_TEMPL_VAR_ERROR_TEXT","HASH_UNDEFINED","MAX_MEMOIZE_SIZE","PLACEHOLDER","CLONE_DEEP_FLAG","CLONE_FLAT_FLAG","CLONE_SYMBOLS_FLAG","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","WRAP_BIND_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_BOUND_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_ARY_FLAG","WRAP_REARG_FLAG","WRAP_FLIP_FLAG","DEFAULT_TRUNC_LENGTH","DEFAULT_TRUNC_OMISSION","HOT_COUNT","HOT_SPAN","LAZY_FILTER_FLAG","LAZY_MAP_FLAG","LAZY_WHILE_FLAG","INFINITY","MAX_SAFE_INTEGER","MAX_INTEGER","NAN","MAX_ARRAY_LENGTH","MAX_ARRAY_INDEX","HALF_MAX_ARRAY_LENGTH","wrapFlags","argsTag","arrayTag","asyncTag","boolTag","dateTag","domExcTag","errorTag","funcTag","genTag","mapTag","numberTag","nullTag","objectTag","promiseTag","proxyTag","regexpTag","setTag","stringTag","symbolTag","undefinedTag","weakMapTag","weakSetTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reEmptyStringLeading","reEmptyStringMiddle","reEmptyStringTrailing","reEscapedHtml","reUnescapedHtml","reHasEscapedHtml","reHasUnescapedHtml","reEscape","reEvaluate","reInterpolate","reIsDeepProp","reIsPlainProp","rePropName","reRegExpChar","reHasRegExpChar","reTrimStart","reWhitespace","reWrapComment","reWrapDetails","reSplitDetails","reAsciiWord","reForbiddenIdentifierChars","reEscapeChar","reEsTemplate","reFlags","reIsBadHex","reIsBinary","reIsHostCtor","reIsOctal","reIsUint","reLatin","reNoMatch","reUnescapedString","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsDingbatRange","rsLowerRange","rsMathOpRange","rsNonCharRange","rsPunctuationRange","rsSpaceRange","rsUpperRange","rsVarRange","rsBreakRange","rsApos","rsAstral","rsBreak","rsCombo","rsDigits","rsDingbat","rsLower","rsMisc","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsUpper","rsZWJ","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","reOptMod","rsOptVar","rsOptJoin","rsOrdLower","rsOrdUpper","rsSeq","rsEmoji","rsSymbol","reApos","reComboMark","reUnicode","reUnicodeWord","reHasUnicode","reHasUnicodeWord","contextProps","templateCounter","typedArrayTags","cloneableTags","deburredLetters","htmlEscapes","htmlUnescapes","stringEscapes","freeParseFloat","freeParseInt","freeGlobal","global","freeSelf","freeExports","freeModule","moduleExports","freeProcess","nodeUtil","nodeIsArrayBuffer","nodeIsDate","nodeIsMap","nodeIsRegExp","nodeIsSet","nodeIsTypedArray","apply","thisArg","arrayAggregator","iteratee","accumulator","arrayEach","arrayEachRight","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","arrayPush","arrayReduce","initAccum","arrayReduceRight","arraySome","asciiSize","baseProperty","asciiToArray","asciiWords","baseFindKey","collection","eachFunc","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseIndexOfWith","baseMean","baseSum","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseToPairs","baseTrim","trimmedEndIndex","baseUnary","baseValues","cacheHas","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","deburrLetter","escapeHtmlChar","escapeStringChar","chr","getValue","hasUnicode","hasUnicodeWord","iteratorToArray","mapToArray","overArg","transform","replaceHolders","setToArray","setToPairs","strictLastIndexOf","stringSize","unicodeSize","stringToArray","unicodeToArray","unescapeHtmlChar","unicodeWords","runInContext","Array","Date","Error","Function","Math","Object","RegExp","String","TypeError","arrayProto","funcProto","objectProto","coreJsData","funcToString","idCounter","maskSrcKey","uid","nativeObjectToString","oldDash","reIsNative","Buffer","Symbol","Uint8Array","allocUnsafe","getPrototype","objectCreate","propertyIsEnumerable","splice","spreadableSymbol","symIterator","symToStringTag","defineProperty","getNative","ctxClearTimeout","ctxNow","ctxSetTimeout","nativeCeil","nativeFloor","nativeGetSymbols","nativeIsBuffer","nativeIsFinite","nativeJoin","nativeKeys","nativeMax","nativeMin","nativeNow","nativeParseInt","nativeRandom","nativeReverse","DataView","Map","Promise","Set","WeakMap","nativeCreate","metaMap","realNames","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","symbolToString","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseCreate","baseLodash","chainAll","lazyClone","copyArray","lazyReverse","lazyValue","isArr","isRight","arrLength","view","getView","iteratees","iterLength","takeCount","baseWrapperValue","iterIndex","computed","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","size","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","arraySample","baseRandom","arraySampleSize","shuffleSelf","baseClamp","arrayShuffle","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","paths","skip","lower","upper","baseClone","bitmask","customizer","isDeep","isFlat","isFull","initCloneArray","isFunc","cloneBuffer","initCloneObject","copySymbolsIn","copySymbols","initCloneByTag","stacked","subValue","keysFunc","getAllKeysIn","getAllKeys","baseConforms","baseConformsTo","baseDelay","wait","setTimeout","baseDifference","includes","isCommon","valuesLength","valuesIndex","createBaseEach","baseForOwn","baseEachRight","baseForOwnRight","baseEvery","baseExtremum","isSymbol","baseFill","toInteger","toLength","baseFilter","baseFlatten","isFlattenable","baseFor","createBaseFor","baseForRight","baseFunctions","baseGet","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","getRawTag","objectToString","baseGt","baseHas","baseHasIn","baseInRange","baseIntersection","arrays","othLength","othIndex","caches","maxLength","seen","baseInverter","baseInvoke","baseIsArguments","baseIsArrayBuffer","baseIsDate","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","baseIsMatch","matchData","noCustomizer","srcValue","baseIsNative","isMasked","pattern","baseIsRegExp","baseIsSet","baseIsTypedArray","isLength","baseIteratee","identity","baseMatchesProperty","baseMatches","baseKeys","isPrototype","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","safeGet","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","toPlainObject","baseNth","baseOrderBy","orders","getIteratee","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","basePullAll","basePullAt","indexes","previous","baseUnset","baseRange","baseRepeat","baseRest","setToString","overRest","baseSample","baseSampleSize","nested","baseSetData","baseSetToString","constant","baseShuffle","baseSlice","baseSome","baseSortedIndex","retHighest","low","high","mid","baseSortedIndexBy","valIsNaN","valIsNull","valIsSymbol","valIsUndefined","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","setLow","baseSortedUniq","baseToNumber","baseToString","baseUniq","createSet","seenIndex","baseUpdate","baseWhile","isDrop","actions","baseXor","baseZipObject","assignFunc","valsLength","castArrayLikeObject","castFunction","stringToPath","castRest","castSlice","clearTimeout","buffer","cloneArrayBuffer","arrayBuffer","cloneDataView","dataView","cloneRegExp","regexp","cloneSymbol","symbol","typedArray","compareAscending","valIsDefined","valIsReflexive","objCriteria","othCriteria","ordersLength","order","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","iterable","createBind","isBind","createCtor","createCaseFirst","trailing","createCompounder","words","deburr","thisBinding","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","createFlow","flatRest","prereq","getFuncName","funcName","isLaziable","partialsRight","holdersRight","argPos","ary","isAry","isBindKey","isFlip","holdersCount","newHolders","reorder","createInverter","toIteratee","createMathOperation","operator","createOver","arrayFunc","createPadding","charsLength","createPartial","createRange","toFinite","createRelationalOperation","toNumber","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","newData","setData","setWrapToString","createRound","precision","pair","createToPairs","createWrap","mergeData","customDefaultsAssignIn","customDefaultsMerge","customOmitClone","isPartial","arrStacked","othStacked","arrValue","othValue","compared","convert","objProps","objLength","othProps","objStacked","skipCtor","objCtor","othCtor","flatten","otherFunc","isKeyable","isOwn","unmasked","stubArray","ctorString","transforms","getWrapDetails","hasPath","hasFunc","insertWrapDetails","details","isMaskable","stubFalse","memoizeCapped","memoize","srcBitmask","newBitmask","isCombo","otherArgs","oldArray","shortOut","reference","updateWrapDetails","lastCalled","stamp","remaining","rand","quote","subString","compact","concat","difference","differenceBy","differenceWith","drop","dropRight","dropRightWhile","dropWhile","fill","findIndex","findLastIndex","flattenDeep","flattenDepth","fromPairs","head","intersection","mapped","intersectionBy","intersectionWith","join","lastIndexOf","nth","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","sortedIndex","sortedIndexBy","sortedIndexOf","sortedLastIndex","sortedLastIndexBy","sortedLastIndexOf","sortedUniq","sortedUniqBy","take","takeRight","takeRightWhile","takeWhile","union","unionBy","unionWith","uniq","uniqBy","uniqWith","unzip","unzipWith","without","xor","xorBy","xorWith","zip","zipObject","zipObjectDeep","zipWith","tap","interceptor","thru","wrapperAt","wrapperChain","wrapperCommit","wrapperNext","done","wrapperToIterator","wrapperPlant","wrapperReverse","wrapped","wrapperValue","countBy","every","filter","find","findLast","flatMap","flatMapDeep","flatMapDepth","forEach","forEachRight","groupBy","invokeMap","keyBy","orderBy","partition","reduce","reduceRight","negate","sampleSize","shuffle","sortBy","after","bind","bindKey","curry","curryRight","debounce","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","invokeFunc","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","defer","flip","resolver","memoized","once","overArgs","funcsLength","partial","partialRight","rearg","rest","spread","throttle","unary","wrap","castArray","cloneWith","cloneDeep","cloneDeepWith","conformsTo","gt","gte","isArrayBuffer","isElement","isEqualWith","isFinite","isInteger","isMatch","isMatchWith","isNaN","isNative","isNull","isNil","isRegExp","isSafeInteger","isWeakMap","isWeakSet","lt","lte","remainder","isBinary","toSafeInteger","assignIn","assignInWith","assignWith","at","propsIndex","propsLength","defaultsDeep","mergeWith","findKey","findLastKey","forIn","forInRight","forOwn","forOwnRight","functions","functionsIn","invert","invertBy","invoke","mapKeys","mapValues","merge","omit","omitBy","pick","setWith","toPairs","toPairsIn","isArrLike","unset","updateWith","valuesIn","clamp","inRange","random","floating","camelCase","word","upperFirst","endsWith","position","escapeRegExp","kebabCase","lowerCase","lowerFirst","pad","strLength","padEnd","padStart","parseInt","radix","repeat","replace","snakeCase","startCase","startsWith","template","settings","imports","importsKeys","importsValues","isEscaping","isEvaluating","interpolate","reDelimiters","sourceURL","escapeValue","interpolateValue","esTemplateValue","evaluateValue","variable","attempt","toLower","toUpper","trim","trimEnd","trimStart","truncate","omission","substring","newEnd","unescape","upperCase","bindAll","methodNames","cond","conforms","defaultTo","flow","flowRight","matchesProperty","method","methodOf","mixin","noConflict","nthArg","over","overEvery","overSome","propertyOf","rangeRight","stubObject","stubString","stubTrue","times","toPath","uniqueId","augend","addend","divide","floor","maxBy","mean","meanBy","minBy","multiply","multiplier","multiplicand","minuend","subtrahend","sum","sumBy","isFilter","takeName","dropName","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","this","getStatsig","getStatsigUser","getStatsigUserCountry","getIsUsOrCa","getStatsigUserStableID","_b","getStatsigConfig","getDynamicContent","getServerSideOffers","getServerSideOfferSelections","getIsAlpsNextFromInitialState","getMatchingConfigs","configUrl","getUrl","getDynamicContentForUrl","acc","getDynamicContentHeader","getDynamicContentHeaderPartnerLogo","getDynamicContentEmailPlaceholder","getDynamicContentPayment","getDynamicContentPaymentTitle","getDynamicContentPaymentLabel","getDynamicContentPaymentSubtitle","getDynamicContentPaymentProducts","getDynamicContentPaymentLinkCallout","getDynamicContentPaymentLinkCalloutTitle","getDynamicContentPaymentLinkCalloutImage","getDynamicContentPaymentLinkCalloutBenefits","getDynamicContentPaymentDisclaimer","getDynamicContentPaymentDisclaimerText","getDynamicContentPaymentDisclaimerLicenseAgreement","getDynamicContentPaymentDisclaimerPrivacyPolicy","getDynamicSuccessContent","getDynamicContentSuccessHeader","getDynamicContentSuccessSubheader","getDynamicContentSuccessBackgroundImage","getDynamicContentSuccessDesktopBackgroundImage","getDynamicContentSensorlessPopup","getDynamicContentSensorlessPopupContent","getDynamicContentOptionalSensorsCallout","getDynamicContentOptionalSensorsCalloutTitle","getDynamicContentOptionalSensorsCalloutSensorImage","getDynamicContentOptionalSensorsCalloutBodyText","getDynamicContentOptionalSensorsCalloutShippingDisclaimer","getDynamicContentOptionalSensorsCalloutButtonText","getDynamicContentLinkProPopup","getDynamicContentNucapLandingPage","getIsIOS","getIsAndroid","getInitialOfferSelections","serverSideOfferSelections","offerSelectionsState","setUserCurrency","setShouldIncludeLink","setShouldIncludeSensors","offerSelectionsReducer","useOfferSelectionsState","useCurrency","currencyToSymbol","useFormatPrice","currency","price","preferredFractionDigits","useShouldIncludeLink","useShouldIncludeSensors","addressSlice","setAddress1","setAddress2","setCity","setCountry","setEmail","setFirstName","setLastName","setState","setZip","addressReducer","modalSlice","openModalAction","closeModalAction","modalReducer","ReduxUseSelector","useEventBusReduxListener","useEventBusEvents","useAuthEventBusListener","authActions","lastAuthActionAccessToken","_c","lastAuthActionRefreshToken","_f","_e","_d","_extends","Action","PopStateEventType","createBrowserHistory","createBrowserLocation","window","globalHistory","pathname","search","hash","createLocation","createBrowserHref","createPath","getUrlBasedHistory","invariant","createKey","getHistoryState","parsePath","parsedPath","hashIndex","searchIndex","getLocation","createHref","validateLocation","v5Compat","getIndex","handlePop","nextIndex","delta","history","historyState","createURL","href","ResultType","matchRoutes","routes","locationArg","basename","matchRoutesImpl","allowPartial","stripBasename","branches","flattenRoutes","rankRouteBranches","decodePath","matchRouteBranch","parentsMeta","parentPath","flattenRoute","route","relativePath","meta","joinPaths","routesMeta","computeScore","_route$path","exploded","explodeOptionalSegments","segments","isOptional","required","restExploded","subpath","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","initialScore","score","segment","branch","matchedParams","matchedPathname","remainingPathname","matchPath","normalizePathname","compiledParams","compilePath","pathnameBase","captureGroups","paramName","splatValue","caseSensitive","params","regexpSource","startIndex","nextChar","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","getInvalidPathError","char","dest","getPathContributingMatches","getResolveToMatches","v7_relativeSplatPath","pathMatches","idx","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","isRouteErrorResponse","validMutationMethodsArr","validRequestMethodsArr","DataRouterContext","DataRouterStateContext","AwaitContext","NavigationContext","LocationContext","RouteContext","RouteErrorContext","useHref","_temp","relative","useInRouterContext","UNSAFE_invariant","navigator","useResolvedPath","joinedPathname","useLocation","navigateEffectWarning","cb","useNavigate","isDataRoute","useNavigateStable","useNavigateUnstable","dataRouterContext","future","routePathnamesJson","UNSAFE_getResolveToMatches","activeRef","UNSAFE_warning","_temp2","useRoutes","useRoutesImpl","dataRouterState","parentMatches","routeMatch","parentParams","parentPathname","parentPathnameBase","parentRoute","warningOnce","locationFromContext","_parsedLocationArg$pa","parsedLocationArg","parentSegments","renderedMatches","_renderMatches","DefaultErrorComponent","useRouteError","lightgrey","preStyles","codeStyles","devInfo","React.Fragment","defaultErrorElement","RenderErrorBoundary","React.Component","RenderedRoute","routeContext","_dataRouterState","_future","errorIndex","renderFallback","fallbackIndex","loaderData","needsToRunLoader","outlet","shouldRenderHydrateFallback","errorElement","hydrateFallbackElement","getChildren","DataRouterHook","DataRouterStateHook","getDataRouterConsoleError","useDataRouterContext","ctx","useDataRouterState","useRouteContext","useCurrentRouteId","thisRoute","useRouteId","_state$errors","routeId","router","alreadyWarned$1","alreadyWarned","warnOnce","logDeprecation","link","logV6DeprecationWarnings","renderFuture","routerFuture","Navigate","_ref4","isStatic","navigate","jsonPath","Route","Router","_ref5","basenameProp","locationProp","navigationType","staticProp","navigationContext","locationContext","trailingPathname","Routes","_ref6","createRoutesFromChildren","React.Children","React.isValidElement","treePath","RELEASE_TRAIN","runtimeVersionToUrlVersion","ORIGIN","STRIPE_JS_URL","V3_URL_REGEX","STRIPE_JS_URL_REGEX","isStripeJSURL","findScript","scripts","script","injectScript","queryString","headOrBody","registerWrapper","stripe","stripePromise$1","onErrorListener","onLoadListener","onError","cause","onLoad","loadScript","_script$parentNode","initStripe","maybeStripe","pk","isTestKey","expectedVersion","stripePromise","loadCalled","getStripePromise","loadStripe","i$6","r","O","S","A","E","P","$","U","H","J","Y","yn","R","V","W","q","I","Q","nn","rn","on","un","hn","Sn","$n","Tn","_n","N","T","L","C","D","B","X","F","G","K","g","Z","ee","se","de","fe","ie","ue","re","ne","te","ce","ae","oe","le","pe","me","ge","ve","he","ye","be","Ie","we","Ee","Pe","Se","Ne","Oe","Ae","ke","xe","je","Te","ze","Me","qe","Ue","Ve","Le","Ce","Re","$e","De","z","Be","Xe","_defineProperty","ownKeys","enumerableOnly","symbols","sym","_objectSpread2","analyticsLib","opts","defaultSettings","storage","Analytics","_objectSpread","config$1","googleTagManager$1","pluginConfig","containerId","scriptLoaded","dl","_ref3","anonymousId","category","formattedPayload","hasDataLayer","src","extendStatics","__extends","__","__assign","__rest","__decorate","decorators","__param","paramIndex","decorator","__esDecorate","descriptorIn","contextIn","initializers","extraInitializers","accept","kind","__runInitializers","useValue","__propKey","__setFunctionName","__metadata","metadataKey","metadataValue","__awaiter","_arguments","generator","adopt","__generator","body","verb","op","__createBinding","k2","__exportStar","__values","__read","ar","__spread","__spreadArrays","il","jl","__spreadArray","pack","__await","__asyncGenerator","awaitReturn","resume","settle","fulfill","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","raw","__setModuleDefault","__importStar","__importDefault","__classPrivateFieldGet","receiver","__classPrivateFieldSet","__classPrivateFieldIn","__addDisposableResource","env","async","dispose","inner","_SuppressedError","suppressed","__disposeResources","fail","__rewriteRelativeImportExtension","preserveJsx","tsx","ext","cm","tslib_es6","getRandomValues","rnds8","rngBrowserModule","rnds","byteToHex","bytesToUuid","buf","bth","bytesToUuid_1","rng","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v1","clockseq","seedBytes","msecs","nsecs","dt","tl","tmh","v1_1","v4","v4_1","uuid","uuid_1","version$1","base64urldecode","padding","b64Data","base64decode","base64urlencode","enc","base64encode","b64","o1","o2","o3","h1","h2","h3","h4","bits","ac","tmp_arr","encodedData","decodeUTF8string","dec","tmpArr","payloadBuilder","dict","allJson","jsonForProcessing","contextEntitiesForProcessing","processor","addDict","addJson","keyIfEncoded","keyIfNotEncoded","json","isNonEmptyJson","jsonWithKeys","addContextEntity","entity","jsonProcessor","payloadJsonProcessor","encodeBase64","getContextFromPayload","combineContexts","originalContext","jsonForProcessing_1","isJson","LOG_LEVEL","LOG","logger","logLevel","setLogLevel","extraParams","logMsg","debug","globalContexts","globalPrimitives","conditionalProviders","assembleAllContexts","eventSchema","getUsefulSchema","getEventType","contexts","generatedPrimitives","generatePrimitives","generatedConditionals","generateConditionals","acceptedConditionalContexts","acceptedContextPrimitives","contexts_1","isConditionalContextProvider","isContextPrimitive","_loop_1","compareProvider","contexts_2","pluginContexts","additionalContexts","combinedContexts","resolveDynamicContext","dynamicOrStaticContexts","getSchemaParts","validateVendorParts","asterisk","validateVendor","getRuleParts","isValidRule","ruleParts","vendor","isStringArray","isValidRuleSetArg","isSelfDescribingJson","sdj","isRuleSet","ruleSet","ruleCount","isContextCallbackFunction","isFilterProvider","isRuleSetProvider","matchSchemaAgainstRuleSet","schema","rejectCount","acceptCount","acceptRules","rule","matchSchemaAgainstRule","rejectRules","schemaParts","matchVendor","matchPart","vendorParts","sb","eventJson","eventJson_1","buildGenerator","contextGeneratorResult","normalizeToArray","contextPrimitives","normalizedInputs","partialEvaluate","primitive","evaluatePrimitive","generatedContexts","contextPrimitive","generatorOutput","evaluateProvider","filterResult","compareProviderPart","ruleA","primitivesA","ruleB","primitivesB_1","providers","getTimestamp","timestamp","trackerCore","configuration","newCore","base64","corePlugins","pluginContextsHelper","globalContextsHelper","payloadPairs","completeContexts","attachGlobalContexts","pb","applicableContexts","returnedContexts","tstamp","allContexts","wrappedContexts","finalPayload","addPayloadPair","core","encode","appId","width","height","timezone","useragent","partialCore","buildSelfDescribingEvent","ueJson","buildPageView","pageUrl","pageTitle","referrer","buildPagePing","minXOffset","maxXOffset","minYOffset","maxYOffset","buildStructEvent","buildLinkClick","targetUrl","elementId","elementClasses","elementTarget","elementContent","removeEmptyProperties","buildAdImpression","impressionId","costModel","cost","bannerId","zoneId","advertiserId","campaignId","buildAdClick","clickId","buildAdConversion","conversionId","buildSocialInteraction","network","buildAddToCart","sku","quantity","unitPrice","buildRemoveFromCart","buildFormFocusOrChange","event_schema","formId","event_data","buildFormSubmission","formClasses","buildSiteSearch","terms","filters","totalResults","pageResults","buildConsentWithdrawn","all","description","documentJson","buildConsentGranted","expiry","exemptFields","base64map","crypt","bytes","hex","triplet","imod4","cryptModule","charenc","charenc_1","utf8","bin","sha1","H0","H1","H2","H3","H4","api","digestbytes","sha1Module","attemptGetLocalStorage","localStorageAlias","exp","attemptWriteLocalStorage","ttl","attemptDeleteLocalStorage","attemptGetSessionStorage","attemptWriteSessionStorage","DEFAULT_CROSS_DOMAIN_LINKER_PARAMS","createCrossDomainParameterValue","isExtendedFormat","attributeConfiguration","attributeValues","crossDomainParameterValue","domainUserId","sessionId","sourceId","sourcePlatform","reason","urlSafeBase64Encode","attribute","int","fixupTitle","title","getHostName","fixupDomain","domain","getReferrer","oldLocation","windowAlias","fromQs","fromQuerystring","addEventListener","decorateQuerystring","initialQsParams","hashSplit","qsSplit","beforeQuerystring","querystring","initialDecoration","qsFields","findRootDomain","sameSite","secure","windowLocationHostnameAlias","cookiePrefix","locationParts","currentDomain","deleteCookie","cookieNames","getCookiesWithPrefix","domainName","cookies","samesite","parseAndValidateInt","parseAndValidateFloat","getFilterByClass","criterion","inclusive","specifiedClassesSet","getSpecifiedClassesSet","getFilter","elt","checkClass","getFilterByName","getCssClasses","classList","classes","classes_1","className","fallbackFilter","specifiedClasses","hasLocalStorage","localStorageAccessible","ls","WEB_PAGE_SCHEMA","BROWSER_CONTEXT_SCHEMA","CLIENT_SESSION_SCHEMA","PAYLOAD_DATA_SCHEMA","OutQueueManager","sharedSate","useLocalStorage","eventMethod","postPath","bufferSize","maxPostBytes","maxGetBytes","useStm","maxLocalStorageQueueSize","connectionTimeout","anonymousTracking","customHeaders","withCredentials","retryStatusCodes","dontRetryStatusCodes","idService","retryFailedRequests","onRequestSuccess","onRequestFailure","executingQueue","configCollectorUrl","outQueue","idServiceCalled","isBeaconRequested","isBeaconAvailable","hasWebKitBeaconBug","useBeacon","isGetRequested","useXhr","usePost","queueName","localStorageQueue","sync","executeQueue","getQuerystring","request","lowPriorityKeys","firstPair","getBody","cleanedRequest","getUTF8Length","postable","sendPostRequestWithoutQueueing","xhr","initializeXMLHttpRequest","batch","attachStmToEvent","isSuccessfulRequest","encloseInPayloadDataEnvelope","removeEventsFromQueue","numberToSend","deleteCount","setXhrCallbacks","xhrTimeout","willRetry","shouldRetryForStatusCode","enqueueRequest","eventTooBigWarning","maxBytes","requestUrl","createGetUrl","postUrl","savedToLocalStorage","xhr_1","chooseHowManyToSend","byteCount","beaconStatus","eventBatch","blob","batch_1","image","loading_1","statusCode","post","header","events","stm","nextRequest","localStorage","anonymous","newBufferSize","isIosVersionLessThanOrEqualTo","isMacosxVersionLessThanOrEqualTo","isSafari","major","minor","isChromiumBased","getParameter","fixupUrl","hostName","cookieDisabledIndex","domainUserIdIndex","createTsIndex","visitCountIndex","nowTsIndex","lastVisitTsIndex","sessionIdIndex","previousSessionIdIndex","firstEventIdIndex","firstEventTsInMsIndex","eventIndexIndex","emptyIdCookie","idCookie","parseIdCookie","memorizedSessionId","memorizedVisitCount","nowTs","tmpContainer","parseIntOr","parsed","parseIntOrUndefined","initializeDomainUserId","configAnonymousTracking","startNewIdCookieSession","cookiesEnabledInIdCookie","updateNowTsInIdCookie","updateFirstEventInIdCookie","ts","incrementEventIndexInIdCookie","serializeIdCookie","anonymizedIdCookie","clientSessionFromIdCookie","configStateStorageStrategy","firstEventTsInMs","clientSession","sessionIdFromIdCookie","domainUserIdFromIdCookie","visitCountFromIdCookie","eventIndexFromIdCookie","useResizeObserver","resizeObserverInitialized","initializeResizeObserver","resizeObserver","entries_1","cachedProperties","readBrowserProperties","DIMENSION_SEPARATOR","getBrowserProperties","floorDimensionFields","detectViewport","detectDocumentSize","detectScreenResolution","bodyHeight","dimension","Tracker","trackerId","endpoint","sharedState","trackerConfiguration","browserPlugins","newTracker","_g","_h","_j","_k","_l","_m","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_z","_0","_1","_2","_3","_4","getStateStorageStrategy","getAnonymousSessionTracking","getAnonymousServerTracking","getAnonymousTracking","isBrowserContextAvailable","isWebPageContextAvailable","getExtendedCrossDomainTrackingConfiguration","crossDomainTrackingConfig","getBrowserDataPlugin","getWebPagePlugin","getBrowserContextPlugin","sendRequest","documentCharset","locationArray","domainAlias","locationHrefAlias","configReferrerUrl","customReferrer","configPlatform","asCollectorUrl","configPostPath","configTrackerSiteId","configCustomUrl","lastDocumentTitle","lastConfigTitle","lastConfigTitleFromTrackPageView","resetActivityTrackingOnPageView","configDiscardHashTag","configDiscardBrace","configCookieNamePrefix","configCookieDomain","configCookiePath","configCookieSameSite","configCookieSecure","dnt","configDoNotTrack","configOptOutCookie","configVisitorCookieTimeout","configSessionCookieTimeout","configAnonymousSessionTracking","configAnonymousServerTracking","lastActivityTime","lastEventTime","domainHash","businessUserId","preservePageViewId","preservePageViewIdForUrl","lastSentPageViewId","activityTrackingConfig","configSessionContext","toOptoutByCookie","onSessionUpdateCallback","manualSessionUpdateCalled","_5","useExtendedCrossDomainLinker","collectCrossDomainAttributes","_6","browserLanguage","resolution","colorDepth","cookiesEnabled","updateDomainHash","initializeIdsAndCookies","decorateLinks","refreshUrl","addLinkDecorationHandler","extended","CROSS_DOMAIN_PARAMETER_NAME","crossDomainLinker","crossDomainLinkHandler","purify","targetPattern","getProtocolScheme","resolveRelativeReference","baseUrl","getSnowplowCookieName","baseName","getSnowplowCookieValue","fullName","activityHandler","scrollHandler","updateMaxScrolls","getPageOffsets","documentElement","resetMaxScrolls","cleanOffset","setSessionCookie","persistValue","setDomainUserIdCookie","clearUserDataAndCookies","idname","sesname","toggleAnonymousTracking","sesCookieSet","loadDomainUserIdCookie","collectorUrl","resetPageView","getPageViewId","shouldGenerateNewPageViewId","currentUrl","previousUrl","getTabId","SESSION_STORAGE_TAB_ID","tabId","anonymizeOr","anonymizeSessionOr","existingSession","isFirstEventInSession","viewport","documentSize","addSessionContextToPayload","sessionIdentifierPersisted","sessionContext","newSession","finalizeContexts","staticContexts","contextCallback","logPageView","installingActivityTracking","detectPassiveEvents_1","passive_1","wheelEvent","documentHandlers","windowHandlers","ev","scheduleActivityInterval","executePagePing","heartbeat","configureActivityTracking","minimumVisitLength","heartbeatDelay","logPagePing","newDocumentTitle","disableActivityTrackingAction","callbackConfiguration","apiMethods","enableFilter","crossDomainLinkerCriterion","querystringField","preserve","partialTracker","namedTrackers","dispatchToTrackers","trackers","getTrackers","allTrackerNames","dispatchToTrackersInCollection","trackerCollection","getTrackersFromCollection","addTracker","trackerIds","trackerIds_1","SharedState","createSharedState","documentAlias","visibilityChangeHandler","flusher","flushBuffers","loadHandler","addReadyListener","ready","setReferrerUrl","setCustomUrl","enableActivityTracking","trackPageView","trackStructEvent","trackSelfDescribingEvent","addGlobalContexts","removeGlobalContexts","clearGlobalContexts","disableAnonymousTracking","enableAnonymousTracking","clearUserData","addPlugin","_trackers","AdTrackingPlugin","trackAdImpression","trackAdClick","trackAdConversion","uaClientHints","forceArray","getBrands","brands","brand","validClientHints","hints","ClientHintsPlugin","includeHighEntropy","populateClientHints","navigatorAlias","uaData","candidateHints_1","gdprBasis","_context","ConsentPlugin","enableGdprContext","basisForProcessing","documentId","documentVersion","documentDescription","basis","trackConsentGranted","builtEvent","trackConsentWithdrawn","ecommerceTransactionTemplate","_transactions","EcommercePlugin","trackAddToCart","trackRemoveFromCart","EnhancedEcommercePlugin","addEnhancedEcommerceActionContext","affiliation","revenue","tax","shipping","coupon","option","addEnhancedEcommerceImpressionContext","variant","addEnhancedEcommerceProductContext","addEnhancedEcommercePromoContext","creative","truncateString","truncatedString","ErrorTrackingPlugin","trackError","filename","lineno","colno","truncatedMessage","enableErrorTracking","contextAdder","captureError","errorEvent","sendError","commonContext","FormTrackingEvent","defaultFormTrackingEvents","innerElementTags","defaultTransformFn","addFormListeners","trackingMarker","getConfigurationForOptions","forms","form","tagname","innerElement","getFormChangeListener","getFormSubmissionListener","isCollectionOfHTMLFormElements","formFilter","getTransform","getElementIdentifier","properties_1","getParentFormIdentifier","getInnerFormElements","innerElements","trackedChildren","elementJson","event_type","eltData","elementsData","FormTrackingPlugin","enableFormTracking","UNIVERSAL_ANALYTICS_COOKIES_SCHEMA","GOOGLE_ANALYTICS_4_COOKIES_SCHEMA","defaultPluginOptions","GaCookiesPlugin","pluginOptions","ga4","ga4MeasurementId","ua","GA_USER_COOKIE","GA4_MEASUREMENT_ID_PREFIX","GA4_COOKIE_PREFIX","uaCookiesContext_1","cookieType","cookiePrefixes","userCookie","sessionCookies","measurementIdentifiers","cookieIdentifier","sessionCookieValue","ga4CookiesContext","geolocation","geolocationContextAdded","GeolocationPlugin","enableAtLoad","enableGeolocationContext","coords","_configuration","LinkClickTrackingPlugin","enableLinkClickTracking","configureLinkClickTracking","addClickListeners","refreshLinkClickTracking","trackLinkClick","processClick","sourceElement","parentElement","anchorElement","originalSourceHostName","sourceHostName","sourceHref","scriptProtocol","getClickHandler","button","addClickListener","pseudoClicks","trackContent","linkElements","OptimizelyXPlugin","getOptimizelyXData","windowOptimizelyAlias","getOptimizelyXSummary","experiment_ids","variationMap","visitor","activeExperiment","variation","variationName","variationId","visitorId","getOptimizelyXSummaryContexts","experiment","PerformanceTimingPlugin","getPerformanceTimingContext","performanceAlias","performanceTimingAlias","performanceTiming","SiteTrackingPlugin","trackSocialInteraction","trackSiteSearch","trackTiming","timing","TimezonePlugin","determine","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","minLen","_arrayLikeToArray","defaultConfig","snowplowPlugin","_loaded","trackerSettings","_track","formTrackingConfig","stateStorageStrategy","anonymousTrackingArgs","_objectWithoutPropertiesLoose","excluded","sourceKeys","defaultMethod","defaultEncType","isHtmlElement","isButtonElement","isFormElement","isInputElement","isModifiedEvent","shouldProcessLinkClick","_formDataSupportsSubmitter","isFormDataSubmitterSupported","supportedFormEncTypes","getFormEncType","encType","getFormSubmissionInfo","formData","attr","_excluded","_excluded2","_excluded3","REACT_ROUTER_VERSION","ViewTransitionContext","FetchersContext","START_TRANSITION","startTransitionImpl","BrowserRouter","historyRef","setStateImpl","React.useState","v7_startTransition","UNSAFE_logV6DeprecationWarnings","isBrowser","ABSOLUTE_URL_REGEX","Link","React.forwardRef","_ref7","onClick","reloadDocument","preventScrollReset","viewTransition","UNSAFE_NavigationContext","absoluteHref","isExternal","internalOnClick","useLinkClickHandler","handleClick","NavLink","_ref8","ariaCurrentProp","classNameProp","routerState","UNSAFE_DataRouterStateContext","isTransitioning","useViewTransitionState","nextLocationPathname","endSlashPosition","isActive","renderProps","ariaCurrent","Form","_ref9","forwardedRef","fetcherKey","onSubmit","submit","useSubmit","formAction","useFormAction","formMethod","submitHandler","submitter","submitMethod","UNSAFE_DataRouterContext","replaceProp","validateClientSideSubmission","fetcherId","getUniqueFetcherId","currentRouteId","UNSAFE_useRouteId","UNSAFE_RouteContext","indexValues","qs","vtContext","currentPath","nextPath","getRawQueryParams","getRawQueryParamsFromUrl","queryParams","setQueryParam","queryParamKeys","getEmail","email","PARTNERS","isValidPartner","TAYLORMADE_DOMAINS","PING_DOMAINS","CLUB_CHAMPION_INSTORE_DOMAINS","SENSORLESS_DOMAINS","CLUB_CHAMPION_DOMAINS","COBRA_DOMAINS","DUNLOP_SPORTS_DOMAINS","MMG_DOMAINS","EA_SPORTS_DOMAINS","REFERRALS_DOMAINS","SKILLEST_DOMAINS","TITLEIST_DOMAINS","TEAM_TITLEIST_DOMAINS","AFFILIATE_DOMAINS","getPartnerFromDomainFromUrl","host","getPathPartnerFromWindowLocation","getPathPartnerFromUrl","pathPartner","getPartnerFromUrl","domainPartner","queryParamPartner","getPartnerFromWindowLocation","isSensorlessDomain","isSensorlessDomainFromHost","ONSITE_EVENT_PARTNERS","isOnsiteEventPartner","partner","ONSITE_VISUAL_PARENT","getStatsigPartner","partnersWithSkillest","getShouldOfferSkillest","Page","getUrlWithAdditionalParams","realUseNavigate","isOnPage","page","isOnPageWithLocation","getPageNameFromUrl","dist","initialized","pixelId","advancedMatching","fbq","trackType","trackCustom","ButtonClickTrackingPlugin","PERFORMANCE_NAVIGATION_TIMING_SCHEMA","getPerformanceNavigationTimingContext","performanceNavigationTiming","constructNavigationTimingContext","performanceNavigationTimingInstance","performanceNavigationKeys","performanceContextData","accum","performanceValue","navigationTimingEntry","PerformanceNavigationTimingPlugin","perfObserver","observedEntries","observedNavigationTiming","WEB_VITALS_SCHEMA","attachWebVitalsPageListeners","supportedEntryTypes","isLatestVisibilityChangeSupported","onVisibilityChange_1","createWebVitalsScript","webVitalsSource","webVitalsScript","webVitalsListener","webVitalsObject","addWebVitalsMeasurement","metricSchemaName","webVitals","WEB_VITALS_SOURCE","listenersAttached","WebVitalsPlugin","sendWebVitals","DEBUG_BUILD","SDK_VERSION","GLOBAL_OBJ","getGlobalSingleton","creator","gbl","__SENTRY__","versionedCarrier","PREFIX","CONSOLE_LEVELS","originalConsoleMethods","consoleSandbox","console","wrappedFuncs","wrappedLevels","originalConsoleMethod","makeLogger","STACKTRACE_FRAME_LIMIT","UNKNOWN_FUNCTION","WEBPACK_ERROR_REGEXP","STRIP_FRAME_REGEXP","createStackParser","parsers","sortedParsers","skipFirstLines","framesToPop","frames","lines","line","cleanedLine","parser","stripSentryFramesAndReverse","stackParserFromStackParserOptions","stackParser","localStack","getLastStackFrame","defaultFunctionName","getFunctionName","getFramesFromEvent","exception","handlers","instrumented","addHandler","maybeInstrument","instrumentFn","triggerHandlers","typeHandlers","_oldOnErrorHandler","addGlobalErrorInstrumentationHandler","instrumentError","column","_oldOnUnhandledRejectionHandler","addGlobalUnhandledRejectionInstrumentationHandler","instrumentUnhandledRejection","getMainCarrier","getSentryCarrier","carrier","wat","isInstanceOf","isBuiltin","isErrorEvent","isDOMError","isDOMException","isParameterizedString","isPrimitive","isEvent","isThenable","isSyntheticEvent","isVueViewModel","WINDOW","DEFAULT_MAX_STRING_LENGTH","htmlTreeAsString","currentElem","MAX_TRAVERSE_HEIGHT","sepLength","nextStr","keyAttrs","maxStringLength","_htmlElementAsString","el","keyAttrPairs","keyAttr","keyAttrPair","allowedAttrs","getLocationHref","getDomElement","getComponentName","snipLine","newLine","lineLength","safeJoin","isMatchingPattern","requireExactStringMatch","stringMatchesSomePattern","testString","patterns","replacementFactory","original","markFunctionWrapped","addNonEnumerableProperty","getOriginalFunction","convertToPlainObject","getOwnProperties","newObj","serializeEventTarget","extractedProps","extractExceptionKeysForMessage","firstKey","includedKeys","dropUndefinedKeys","inputValue","_dropUndefinedKeys","memoizationMap","isPojo","memoVal","ONE_SECOND_IN_MS","dateTimestampInSeconds","createUnixTimestampInSecondsFunc","performance","approxStartingTimeOrigin","timeOrigin","timestampInSeconds","browserPerformanceTimeOrigin","performanceNow","dateNow","timeOriginDelta","timeOriginIsReliable","navigationStart","navigationStartDelta","navigationStartIsReliable","uuid4","crypto","getRandomByte","getFirstException","getEventDescription","eventId","firstException","addExceptionTypeValue","addExceptionMechanism","newMechanism","defaultMechanism","currentMechanism","mergedData","addContextToFrame","linesOfContext","maxLines","sourceLine","lineIndex","checkOrSetAlreadyCaught","isAlreadyCaptured","States","RESOLVED","REJECTED","resolvedSyncPromise","SyncPromise","rejectedSyncPromise","executor","onfulfilled","onrejected","onfinally","isRejected","cachedHandlers","makeSession","startingTime","session","sessionToJSON","updateSession","closeSession","status","generateTraceId","generateSpanId","initialObj","mergeObj","levels","SCOPE_SPAN_FIELD","_setSpanForScope","span","_getSpanForScope","DEFAULT_MAX_BREADCRUMBS","ScopeClass","newScope","client","lastEventId","user","requestSession","tags","extras","extra","fingerprint","captureContext","scopeToMerge","scopeInstance","Scope","propagationContext","breadcrumb","maxBreadcrumbs","maxCrumbs","mergedBreadcrumb","attachment","syntheticException","getDefaultCurrentScope","getDefaultIsolationScope","AsyncContextStack","isolationScope","assignedScope","assignedIsolationScope","maybePromiseResult","getAsyncContextStack","registry","sentry","withScope","withSetScope","withIsolationScope","getStackAsyncContextStrategy","_isolationScope","getAsyncContextStrategy","getIsolationScope","getGlobalScope","acs","getClient","getTraceContextFromScope","traceId","spanId","parentSpanId","METRICS_SPAN_FIELD","getMetricSummaryJsonForSpan","exportKey","summary","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE","SEMANTIC_ATTRIBUTE_SENTRY_OP","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT","SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE","SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME","SEMANTIC_ATTRIBUTE_PROFILE_ID","SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME","SPAN_STATUS_UNSET","SPAN_STATUS_OK","SPAN_STATUS_ERROR","getSpanStatusFromHttpCode","httpStatus","setHttpStatus","spanStatus","SENTRY_BAGGAGE_KEY_PREFIX","SENTRY_BAGGAGE_KEY_PREFIX_REGEX","MAX_BAGGAGE_STRING_LENGTH","baggageHeaderToDynamicSamplingContext","baggageHeader","baggageObject","parseBaggageHeader","dynamicSamplingContext","nonPrefixedKey","dynamicSamplingContextToSentryBaggageHeader","sentryPrefixedDSC","dscKey","dscValue","objectToBaggageHeader","curr","currBaggageObject","baggageHeaderToObject","baggageEntry","keyOrValue","objectKey","objectValue","currentIndex","newBaggageHeader","TRACEPARENT_REGEXP","extractTraceparentData","traceparent","parentSampled","propagationContextFromHeaders","sentryTrace","baggage","traceparentData","virtualSpanId","generateSentryTraceHeader","sampled","sampledString","TRACE_FLAG_NONE","TRACE_FLAG_SAMPLED","hasShownSpanDropWarning","spanToTransactionTraceContext","span_id","trace_id","parent_span_id","origin","spanToJSON","spanToTraceContext","isRemote","spanToTraceHeader","spanIsSampled","spanTimeInputToSeconds","ensureTimestampInSeconds","spanIsSentrySpan","spanIsOpenTelemetrySdkTraceBaseSpan","endTime","getStatusMessage","castSpan","traceFlags","CHILD_SPANS_FIELD","ROOT_SPAN_FIELD","addChildSpanToSpan","childSpan","rootSpan","removeChildSpanFromSpan","getSpanDescendants","resultSet","addSpanChildren","childSpans","getRootSpan","getActiveSpan","showSpanDropWarning","errorsInstrumented","registerSpanErrorInstrumentation","errorCallback","activeSpan","SCOPE_ON_START_SPAN_FIELD","ISOLATION_SCOPE_ON_START_SPAN_FIELD","setCapturedScopesOnSpan","getCapturedScopesOnSpan","hasTracingEnabled","maybeOptions","SentryNonRecordingSpan","spanContext","_timestamp","_value","_values","_status","_attributesOrStartTime","_startTime","_link","_links","_exception","_time","DEFAULT_ENVIRONMENT","FROZEN_DSC_FIELD","freezeDscOnSpan","dsc","getDynamicSamplingContextFromClient","public_key","getDynamicSamplingContextFromScope","getDynamicSamplingContextFromSpan","frozenDsc","traceState","traceStateDsc","dscOnTraceState","jsonSpan","maybeSampleRate","logSpanStart","isRootSpan","infoParts","logSpanEnd","parseSampleRate","sampleRate","rate","sampleSpan","samplingContext","normalizedRequest","enhancedSamplingContext","parsedSampleRate","DSN_REGEX","isValidProtocol","dsnToString","dsn","withPassword","pass","projectId","publicKey","dsnFromString","lastPath","projectMatch","dsnFromComponents","components","validateDsn","makeDsn","memoBuilder","hasWeakSet","unmemoize","maxProperties","visit","normalizeToSize","maxSize","normalized","jsonSize","stringified","stringifyValue","remainingDepth","valueWithToJSON","jsonValue","numAdded","visitable","visitKey","visitValue","objName","getConstructorName","utf8Length","createEnvelope","headers","addItemToEnvelope","envelope","newItem","forEachEnvelopeItem","envelopeItems","envelopeItem","envelopeItemType","encodeUTF8","serializeEnvelope","envHeaders","append","itemHeaders","stringifiedPayload","concatBuffers","buffers","totalLength","merged","createSpanEnvelopeItem","spanJson","createAttachmentEnvelopeItem","ITEM_TYPE_TO_DATA_CATEGORY_MAP","envelopeItemTypeToDataCategory","getSdkMetadataForEnvelopeHeader","metadataOrEvent","createEventEnvelopeHeaders","sdkInfo","tunnel","enhanceEventWithSdkInfo","createSessionEnvelope","metadata","envelopeHeaders","createEventEnvelope","createSpanEnvelope","spans","dscHasRequiredProps","beforeSendSpan","convertToSpanJSON","setMeasurement","timedEventsToMeasurements","measurements","MAX_SPAN_COUNT","SentrySpan","timeInput","endTimestamp","attributesOrStartTime","isSpanTimeInput","sendSpanEnvelope","transactionEvent","isFullFinishedSpan","capturedSpanScope","capturedSpanIsolationScope","isStandaloneSpan","transaction","spanItems","SUPPRESS_TRACING_KEY","startInactiveSpan","getAcs","spanArguments","parseSentrySpanArguments","forceTransaction","customParentSpan","withActiveSpan","parentSpan","getParentSpan","createChildOrRootSpan","_startChildSpan","_startRootSpan","initialCtx","TRACING_DEFAULTS","FINISH_REASON_HEARTBEAT_FAILED","FINISH_REASON_IDLE_TIMEOUT","FINISH_REASON_FINAL_TIMEOUT","FINISH_REASON_EXTERNAL_FINISH","startIdleSpan","startSpanOptions","activities","_finished","_idleTimeoutID","_finishReason","_autoFinishAllowed","_cleanupHooks","idleTimeout","finalTimeout","childSpanTimeout","beforeSpanEnd","previousActiveSpan","_startIdleSpan","definedEndTimestamp","spanEndTimestamp","onIdleSpanEnded","childEndTimestamps","latestSpanEndTimestamp","spanStartTimestamp","_cancelIdleTimeout","_restartIdleTimeout","_restartChildSpanTimeout","_pushActivity","_popActivity","cleanup","spanJSON","startTimestamp","discardedSpans","childSpanJSON","childEndTimestamp","childStartTimestamp","spanStartedBeforeIdleSpanEnd","timeoutWithMarginOfError","spanEndedBeforeFinalTimeout","stringifiedSpan","startedSpan","endedSpan","spanToAllowAutoFinish","notifyEventProcessors","processors","final","parsedStackResults","lastKeysCount","cachedFilenameDebugIds","getFilenameToDebugIdMap","debugIdMap","debugIdKeys","stackKey","parsedStack","stackFrame","debugId","applyScopeDataToEvent","breadcrumbs","sdkProcessingMetadata","applyDataToEvent","applySpanToEvent","applyFingerprintToEvent","applyBreadcrumbsToEvent","applySdkMetadataToEvent","mergeScopeData","eventProcessors","attachments","transactionName","mergeAndOverwriteScopeData","mergeVal","cleanedExtra","cleanedTags","cleanedUser","cleanedContexts","mergedBreadcrumbs","prepareEvent","normalizeDepth","normalizeMaxBreadth","integrations","applyClientOptions","applyIntegrationsMetadata","applyDebugIds","finalScope","getFinalScope","clientEventProcessors","isolationData","finalScopeData","applyDebugMeta","normalizeEvent","environment","release","maxValueLength","filenameDebugIdMap","images","debug_id","integrationNames","maxBreadth","parseEventHintOrCaptureContext","hintIsScopeOrFunction","hintIsScopeContext","captureContextKeys","captureException","captureMessage","captureEvent","setContext","addEventProcessor","startSession","userAgent","currentSession","endSession","_sendSessionUpdate","captureSession","SENTRY_API_VERSION","getBaseApiEndpoint","_getIngestEndpoint","_encodedAuth","getEnvelopeEndpointWithUrlEncodedAuth","installedIntegrations","filterDuplicates","integrationsByName","currentInstance","existingInstance","getIntegrationsToSetup","defaultIntegrations","userIntegrations","integration","resolvedUserIntegrations","finalIntegrations","debugIndex","debugInstance","setupIntegrations","integrationIndex","setupIntegration","afterSetupIntegrations","createClientReportEnvelope","discarded_events","clientReportItem","SentryError","ALREADY_SEEN_ERROR","BaseClient","undefinedOption","hintWithEventId","eventMessage","promisedEvent","transport","clientFinished","transportFlushed","eventProcessor","integrationName","isAlreadyInstalled","promise","sendResponse","eventOrCount","cbIndex","callbacks","crashed","errored","exceptions","mechanism","sessionNonTerminal","ticked","tick","interval","finalEvent","isTransaction","isTransactionEvent","beforeSendLabel","dataCategory","processBeforeSend","_validateBeforeSendResult","processedEvent","spanCount","spanCountBefore","spanCountAfter","droppedSpanCount","transactionInfo","outcomes","beforeSendResult","invalidValueError","beforeSend","beforeSendTransaction","processedSpans","processedSpan","initAndBind","clientClass","setCurrentClient","makePromiseBuffer","isReady","taskProducer","drain","counter","capturedSetTimeout","DEFAULT_RETRY_AFTER","parseRetryAfterHeader","headerDelay","headerDate","disabledUntil","limits","isRateLimited","updateRateLimits","updatedRateLimits","rateLimitHeader","retryAfterHeader","retryAfter","categories","namespaces","DEFAULT_TRANSPORT_BUFFER_SIZE","createTransport","makeRequest","rateLimits","send","filteredEnvelopeItems","getEventForEnvelopeItem","filteredEnvelope","recordEnvelopeLoss","requestTask","response","isSentryRequestUrl","checkDsn","checkTunnel","removeTrailingSlash","applySdkMetadata","getTraceData","scopeToTraceHeader","DEFAULT_BREADCRUMBS","addBreadcrumb","beforeBreadcrumb","finalBreadcrumb","originalFunctionToString","INTEGRATION_NAME","SETUP_CLIENTS","_functionToStringIntegration","originalFunction","functionToStringIntegration","DEFAULT_IGNORE_ERRORS","_inboundFiltersIntegration","_hint","clientOptions","mergedOptions","_mergeOptions","_shouldDropEvent","inboundFiltersIntegration","internalOptions","_isSentryError","_isIgnoredError","_isUselessError","_isIgnoredTransaction","_isDeniedUrl","_getEventFilterUrl","_isAllowedUrl","ignoreErrors","_getPossibleEventMessages","ignoreTransactions","denyUrls","allowUrls","possibleMessages","lastException","_getLastValidUrl","applyAggregateErrorsToEvent","exceptionFromErrorImplementation","maxValueLimit","originalException","truncateAggregateExceptions","aggregateExceptionsFromError","prevExceptions","exceptionId","newExceptions","applyExceptionGroupFieldsForParentException","newException","newExceptionId","applyExceptionGroupFieldsForChildException","childError","parentId","parseUrl","query","stripUrlQueryAndFragment","urlPath","addConsoleInstrumentationHandler","instrumentConsole","severityLevelFromString","_dedupeIntegration","previousEvent","dedupeIntegration","_isSameMessageEvent","_isSameExceptionEvent","currentMessage","previousMessage","_isSameFingerprint","_isSameStacktrace","previousException","_getExceptionFromEvent","currentException","currentFrames","previousFrames","frameA","frameB","currentFingerprint","previousFingerprint","_extraErrorDataIntegration","captureErrorCause","_enhanceEventWithErrorData","extraErrorDataIntegration","exceptionName","errorData","_extractErrorData","normalizedErrorData","extraErrorInfo","serializedError","oO","_sessionTimingIntegration","sessionTimingIntegration","instrumentFetchRequest","handlerData","shouldCreateSpan","shouldAttachHeaders","spanOrigin","shouldCreateSpanResult","endSpan","fullUrl","getFullURL","hasParent","_addTracingHeadersToFetchRequest","fetchOptionsObj","traceHeaders","isRequest","isHeaders","newHeaders","prevBaggageHeader","prevHeaderStrippedFromSentryBaggage","stripBaggageHeaderOfSentryBaggageValues","headerName","headerValue","existingBaggageHeader","newBaggageHeaders","headerItem","contentLength","contentLengthNum","getBreadcrumbLogLevelFromHttpStatusCode","supportsFetch","isNativeFunction","supportsNativeFetch","sandbox","addFetchInstrumentationHandler","skipNativeFetchCheck","instrumentFetch","addFetchEndInstrumentationHandler","streamHandler","onFetchResolved","originalFetch","virtualError","parseFetchArgs","resolveResponse","onFinishedResolving","responseReader","maxFetchDurationTimeout","readingActive","chunkTimeout","clonedResponseForResolving","hasProp","getUrlFromResource","resource","fetchArgs","isBrowserBundle","getSDKSource","isNodeEnv","isElectronNodeRenderer","process","supportsHistory","chromeVar","isChromePackagedApp","hasHistoryApi","_nullishCoalesce","lhs","rhsFn","_optionalChain","ops","lastAccessLHS","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","sentryWrapped","wrappedArguments","exceptionFromError","parseStackFrames","extractType","extractMessage","eventFromPlainObject","isUnhandledRejection","errorFromProp","getErrorPropertyFromObject","getNonErrorObjectExceptionValue","eventFromError","stacktrace","skipLines","getSkipFirstStackStringLines","getPopFirstTopFrames","reactMinifiedRegexp","isWebAssemblyException","eventFromException","attachStacktrace","eventFromUnknownInput","eventFromMessage","eventFromString","domException","__sentry_template_string__","__sentry_template_values__","captureType","getObjectClassName","createUserFeedbackEnvelope","feedback","createUserFeedbackEnvelopeItem","BrowserClient","sdkSource","getRating","bindReporter","metric","reportAllChanges","forceReport","generateUniqueID","getNavigationEntry","checkResponseStart","navigationEntry","getActivationStart","navEntry","initMetric","observe","po","onHidden","onHiddenOrPageHide","runOnce","called","firstHiddenTime","initHiddenTime","onVisibilityUpdate","removeChangeListeners","addChangeListeners","getVisibilityWatcher","whenActivated","FCPThresholds","onFCP","onReport","visibilityWatcher","report","CLSThresholds","onCLS","sessionValue","sessionEntries","handleEntries","firstSessionEntry","lastSessionEntry","FIDThresholds","onFID","handleEntry","interactionCountEstimate","minKnownInteractionId","maxKnownInteractionId","updateEstimate","getInteractionCount","initInteractionCountPolyfill","longestInteractionList","longestInteractionMap","DEFAULT_DURATION_THRESHOLD","prevInteractionCount","getInteractionCountForNavigation","estimateP98LongestInteraction","candidateInteractionIndex","MAX_INTERACTIONS_TO_CONSIDER","entryPreProcessingCallbacks","processInteractionEntry","minLongestInteraction","existingInteraction","interaction","whenIdle","rIC","handle","INPThresholds","onINP","LCPThresholds","reportedMetricIDs","onLCP","stopListening","TTFBThresholds","whenReady","onTTFB","_previousCls","_previousFid","_previousLcp","_previousTtfb","_previousInp","addClsInstrumentationHandler","stopOnCallback","addMetricObserver","instrumentCls","addLcpInstrumentationHandler","instrumentLcp","addFidInstrumentationHandler","instrumentFid","addTtfbInstrumentationHandler","instrumentTtfb","addInpInstrumentationHandler","instrumentInp","addPerformanceInstrumentationHandler","instrumentPerformanceObserver","getCleanupCallback","previousValue","isPerformanceEventTiming","isMeasurementValue","startAndEndSpan","startTimeInSeconds","parentStartTime","startStandaloneWebVitalSpan","passedAttributes","replay","replayId","userDisplay","profileId","getBrowserPerformanceAPI","msToSec","extractNetworkProtocol","nextHopProtocol","trackClsAsStandaloneSpan","standaloneCLsValue","standaloneClsEntry","pageloadSpanId","supportsLayoutShift","sentSpan","_collectClsOnce","sendStandaloneClsSpan","cleanupClsHandler","unsubscribeStartNavigation","clsValue","routeName","MAX_INT_AS_BYTES","_performanceCursor","_measurements","_lcpEntry","_clsEntry","startTrackingWebVitals","recordClsStandaloneSpans","fidCleanupCallback","_trackFID","lcpCleanupCallback","_trackLCP","ttfbCleanupCallback","_trackTtfb","clsCleanupCallback","_trackCLS","startTrackingLongTasks","parentOp","parentStartTimestamp","startTrackingLongAnimationFrames","initialScript","invoker","invokerType","sourceFunctionName","sourceCharPosition","startTrackingInteractions","spanOptions","addPerformanceEntries","performanceEntries","transactionStartTime","_addNavigationSpans","_addMeasureSpans","firstHidden","shouldRecord","_addResourceSpans","_trackNavigator","_addTtfbRequestTimeToMeasurements","fidMark","measurementName","measurement","_setWebVitalAttributes","requestTime","measureStartTimestamp","startTimeStamp","measureEndTimestamp","_addPerformanceNavigationTiming","_addRequest","eventEnd","_getEndPropertyNameForNavigationTiming","requestStartTimestamp","responseEndTimestamp","responseStartTimestamp","resourceUrl","parsedUrl","setResourceEntrySizeData","deliveryType","renderBlockingStatus","connection","dataKey","entryVal","responseStart","requestStart","DEBOUNCE_DURATION","debounceTimerID","lastCapturedEventType","lastCapturedEventTargetId","addClickKeypressInstrumentationHandler","instrumentDOM","triggerDOMHandler","globalDOMEventHandler","makeDOMEventHandler","targetObj","originalAddEventListener","handlerForType","originalRemoveEventListener","isSimilarToLastCapturedEvent","shouldSkipDOMEvent","globalListener","lastHref","addHistoryInstrumentationHandler","instrumentHistory","oldOnPopState","historyReplacementFunction","originalHistoryFunction","cachedImplementations","getNativeImplementation","cached","document","contentWindow","clearCachedImplementation","SENTRY_XHR_DATA_KEY","addXhrInstrumentationHandler","instrumentXHR","xhrproto","originalOpen","xhrOpenThisArg","xhrOpenArgArray","onreadystatechangeHandler","xhrInfo","originalOnreadystatechange","onreadystatechangeThisArg","onreadystatechangeArgArray","originalSetRequestHeader","setRequestHeaderThisArg","setRequestHeaderArgArray","originalSend","sendThisArg","sendArgArray","sentryXhrData","LAST_INTERACTIONS","INTERACTIONS_SPAN_MAP","startTrackingINP","inpCallback","_trackINP","INP_ENTRY_MAP","interactionId","interactionType","spanToUse","registerInpInteractionListener","_latestRoute","activeRootSpan","makeFetchTransport","nativeFetch","pendingBodySize","pendingCount","requestSize","requestOptions","CHROME_PRIORITY","GECKO_PRIORITY","createFrame","chromeRegexNoFnName","chromeRegex","chromeEvalRegex","chromeStackParserFn","noFnParts","col","subMatch","extractSafariExtensionDetails","chromeStackLineParser","geckoREgex","geckoEvalRegex","gecko","geckoStackLineParser","defaultStackLineParsers","defaultStackParser","isSafariExtension","isSafariWebExtension","MAX_ALLOWED_STRING_LENGTH","_breadcrumbsIntegration","_options","_getConsoleBreadcrumbHandler","_getDomBreadcrumbHandler","_getXhrBreadcrumbHandler","_getFetchBreadcrumbHandler","_getHistoryBreadcrumbHandler","_getSentryBreadcrumbHandler","breadcrumbsIntegration","dom","_isEvent","status_code","parsedLoc","parsedFrom","parsedTo","DEFAULT_EVENT_TARGET","_browserApiErrorsIntegration","_wrapTimeFunction","_wrapRAF","_wrapXHR","eventTargetOption","_wrapEventTarget","browserApiErrorsIntegration","wrapOptions","isEventListenerObject","originalEventHandler","browserSessionIntegration","_globalHandlersIntegration","_installGlobalOnErrorHandler","globalHandlerLog","_installGlobalOnUnhandledRejectionHandler","globalHandlersIntegration","getOptions","_enhanceEventWithInitialFrame","_getUnhandledRejectionError","_eventFromRejectionWithPrimitive","ev0","ev0s","ev0sf","httpContextIntegration","DEFAULT_KEY","DEFAULT_LIMIT","_linkedErrorsIntegration","linkedErrorsIntegration","getDefaultIntegrations","applyDefaultOptions","optionsArg","defaultOptions","shouldShowBrowserExtensionError","windowWithMaybeExtension","extensionKey","extensionObject","runtimeId","extensionProtocols","isDedicatedExtensionPage","isNWjs","browserOptions","DEFAULT_LINES_OF_CONTEXT","_contextLinesIntegration","contextLines","addSourceContext","contextLinesIntegration","htmlFilename","htmlLines","applySourceContextToFrame","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","_nullishCoalesce$1","_optionalChain$5","NodeType$3","NodeType","isElement$1","isShadowRoot","isNativeShadowDom","shadowRoot","fixBrowserCompatibilityIssuesInCSS","cssText","escapeImportStatement","statement","stringifyStylesheet","rules","stringifyRule","fixAllCssProperty","styleDeclaration","isImportant","importStringified","isCSSImportRule","isCSSStyleRule","needsSafariColonFix","needsAllFix","fixSafariColons","cssStringified","Mirror","childNode","oldNode","createMirror","shouldMaskInput","maskInputOptions","maskInputValue","maskInputFn","toLowerCase","toUpperCase","ORIGINAL_ATTRIBUTE_NAME","is2DCanvasBlank","canvas","chunkSize","getImageData","originalGetImageData","pixel","getInputType","getInputValue","extractFileExtension","baseURL","cachedImplementations$1","getImplementation$1","setTimeout$2","clearTimeout$2","getIframeContentDocument","tagNameRegex","IGNORED_NODE","genId","getValidTagName","processedTagName","extractOrigin","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","collectCharacters","regEx","absoluteToDoc","descriptorsStr","inParens","cachedDocument","getHref","isSVGElement","customHref","transformAttribute","maskAttributeFn","ignoreAttribute","_isBlockedElement","blockClass","blockSelector","unblockSelector","eIndex","elementClassMatchesRegex","distanceToMatch","matchPredicate","distance","createMatchPredicate","needMaskingText","maskTextClass","maskTextSelector","unmaskTextClass","unmaskTextSelector","maskAllText","autocomplete","maskDistance","unmaskDistance","onceIframeLoaded","iframeEl","iframeLoadTimeout","fired","readyState","blankUrl","onceStylesheetLoaded","styleSheetLoadTimeout","styleSheetLoaded","serializeNode","mirror","inlineStylesheet","maskTextFn","dataURLOptions","inlineImages","recordCanvas","keepIframeSrcFn","newlyAddedElement","rootId","getRootId","serializeElementNode","serializeTextNode","docId","parentTagName","isStyle","isScript","isTextarea","_7","_8","_9","forceMask","isInputMasked","needBlock","stylesheet","canvasDataURL","blankCanvas","blankCanvasDataURL","imageSrc","priorCrossOrigin","recordInlineImage","isCustomElement","lowerIfExists","maybeAttr","slimDOMExcluded","sn","slimDOMOptions","serializeNodeWithId","skipChild","onSerialize","onIframeLoad","onStylesheetLoad","stylesheetLoadTimeout","preserveWhiteSpace","_serializedNode","serializedNode","recordChild","bypassOptions","childN","serializedChildNode","iframeDoc","serializedIframeNode","serializedLinkNode","maskAllInputs","slimDOM","_optionalChain$4","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","throttle$1","clearTimeout$1","setTimeout$1","hookSetter","isRevoked","replacement","nowTimestamp","getWindowScroll","_10","_11","_12","_13","_14","getWindowHeight","getWindowWidth","closestElementOfNode","isBlocked","checkAncestors","blockedPredicate","isUnblocked","blockDistance","unblockDistance","isSerialized","isIgnored","isAncestorRemoved","legacy_isTouchEvent","polyfill","isSerializedIframe","isSerializedStylesheet","hasShadowRoot","_18","StyleSheetMirror","newId","getShadowHost","shadowHost","_19","_20","_21","getRootShadowHost","rootShadowHost","shadowHostInDom","inDom","getImplementation","onRequestAnimationFrame","EventType","EventType2","IncrementalSource","IncrementalSource2","MouseInteractions","MouseInteractions2","PointerTypes","PointerTypes2","NodeType$1","NodeType$2","getIFrameContentDocument","getIFrameContentWindow","_optionalChain$3","isNodeInLinkedList","DoubleLinkedList","moveKey","MutationBuffer","mutations","adds","addedIds","addList","getNextId","ns","nextId","pushAdd","currentN","childSn","isParentRemoved","isAncestorInSet","candidate","_node","unhandledNode","diffAsStr","unchangedAsStr","old","pname","nodeId","deepDelete","targetId","addsSet","removes","_isParentRemoved","_isAncestorInSet","errorHandler","registerErrorHandler","unregisterErrorHandler","callbackWrapper","_optionalChain$2","mutationBuffers","initMutationObserver","mutationBuffer","mutationObserverCtor","angularZoneSymbol","initMoveObserver","mousemoveCb","sampling","callbackThreshold","positions","timeBaseline","wrappedCb","totalOffset","updatePosition","clientX","clientY","initMouseInteractionObserver","mouseInteractionCb","disableMap","currentPointerType","getHandler","eventKey","pointerType","thisEventKey","initScrollObserver","scrollCb","scrollLeftTop","initViewportResizeObserver","viewportResizeCb","lastH","lastW","updateDimension","INPUT_TAGS","lastInputValueMap","initInputObserver","inputCb","ignoreClass","ignoreSelector","userTriggeredOnInput","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","_15","_16","initStyleDeclarationObserver","styleDeclarationCb","ignoreCSSAttributes","setProperty","_17","removeProperty","initMediaInteractionObserver","mediaInteractionCb","volume","muted","playbackRate","initFontObserver","fontCb","fontMap","originalFontFace","fontFace","restoreHandler","initSelectionObserver","param","selectionCb","collapsed","updateSelection","ranges","startContainer","startOffset","endContainer","endOffset","initCustomElementObserver","customElementCb","constructor","initObservers","_hooks","mutationObserver","mousemoveHandler","mouseInteractionHandler","viewportResizeHandler","inputHandler","mediaInteractionHandler","styleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","fontObserver","selectionObserver","customElementObserver","pluginHandlers","_22","_23","CrossOriginIframeMirror","generateIdFn","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","remoteIdToIdMap","ids","_optionalChain$1","IframeManagerNoop","IframeManager","crossOriginMessageEvent","transformedEvent","iframeMirror","ShadowDomManagerNoop","ShadowDomManager","iframeElement","iframeWindow","manager","CanvasManagerNoop","StylesheetManager","linkEl","adoptedStyleSheetData","ProcessedNodeManager","thisBuffer","wrappedEmit","_takeFullSnapshot","cleanFrame","record","emit","checkoutEveryNms","checkoutEveryNth","_maskInputOptions","_slimDOMOptions","maxCanvasSize","packFn","mousemoveWait","recordDOM","recordCrossOriginIframes","recordAfter","collectFonts","onMutation","getCanvasManager","inEmittingFrame","passEmitsToParent","lastFullSnapshotEvent","incrementalSnapshotCount","isCheckout","exceedCount","exceedTime","takeFullSnapshot","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","wrappedAdoptedStyleSheetEmit","iframeManager","processedNodeManager","canvasManager","_getCanvasManager","shadowDomManager","getCanvasManagerFn","ReplayEventTypeIncrementalSnapshot","ReplayEventTypeCustom","timestampToMs","timestampToS","addBreadcrumbEvent","INTERACTIVE_SELECTOR","getClosestInteractive","getClickTargetNode","getTargetNode","isEventWithTarget","onWindowOpen","monkeyPatchWindowOpen","originalWindowOpen","IncrementalMutationSources","clickDetector","clickBreadcrumb","ClickDetector","slowClickConfig","_addBreadcrumbEvent","cleanupWindowOpen","nowInSeconds","ignoreElement","isClickBreadcrumb","newClick","click","timedOutClicks","hadScroll","hadMutation","isSlowClick","clickCount","timeAfterClickMs","endReason","setTimeout$3","SLOW_CLICK_TAGS","updateClickDetectorForRecordingEvent","isIncrementalEvent","isIncrementalMouseInteraction","createBreadcrumb","ATTRIBUTES_TO_RECORD","getAttributesToRecord","normalizedKey","handleDomListener","handleDom","isClick","getBaseDomBreadcrumb","getDomTarget","handleKeyboardEvent","getKeyboardBreadcrumb","metaKey","shiftKey","ctrlKey","altKey","hasModifierKey","isCharacterKey","baseBreadcrumb","ENTRY_TYPES","createResourceEntry","createPaintEntry","createNavigationEntry","webVitalHandler","createPerformanceEntries","createPerformanceEntry","entryType","getAbsoluteTime","decodedBodySize","domComplete","encodedBodySize","domContentLoadedEventStart","domContentLoadedEventEnd","domInteractive","loadEventStart","loadEventEnd","redirectCount","transferSize","initiatorType","responseEnd","responseStatus","getLargestContentfulPaint","lastEntry","getWebVital","isLayoutShift","getCumulativeLayoutShift","layoutShifts","nodes","nodeIds","getFirstInputDelay","getInteractionToNextPaint","attributions","rating","setupPerformanceObserver","addPerformanceEntry","onEntries","clearCallbacks","clearCallback","_addBreadcrumb","makeReplayLogger","_capture","_trace","_logger","logger$1","EventBufferSizeExceededError","EventBufferArray","eventSize","eventsRet","WorkerHandler","worker","EventBufferCompressionWorker","EventBufferProxy","hasCheckout","waitForCheckout","addEventPromises","createEventBuffer","useCompression","customWorkerUrl","_loadWorker","workerUrl","_getWorkerUrl","hasSessionStorage","clearSession","deleteSession","isSampled","lastActivity","segmentId","previousSessionId","saveSession","getSessionSampleType","sessionSampleRate","allowBuffering","createSession","stickySession","fetchSession","sessionStringFromStorage","sessionObj","isExpired","targetTime","isSessionExpired","maxReplayDuration","sessionIdleExpire","shouldRefreshSession","loadOrCreateSession","sessionOptions","isCustomEvent","addEventSync","shouldAddEvent","_addEvent","eventBuffer","isBufferMode","replayOptions","eventAfterPossibleCallback","maybeApplyCallback","isExceeded","timestampInMs","isReplayEvent","isFeedbackEvent","handleAfterSendEvent","handleTransactionEvent","handleErrorEvent","replayContext","beforeErrorSampling","handleBeforeSendEvent","handleHydrationError","exceptionValue","handleBreadcrumbs","beforeAddBreadcrumb","isBreadcrumbWithCategory","normalizeBreadcrumb","normalizeConsoleBreadcrumb","isTruncated","normalizedArgs","normalizedArg","isRrwebError","resetReplayIdOnDynamicSamplingContext","addFeedbackBreadcrumb","shouldSampleForBufferEvent","handleGlobalEventListener","createPerformanceSpans","handleHistory","handleHistorySpanListener","shouldFilterRequest","addNetworkBreadcrumb","getBodySize","textEncoder","formDataStr","_serializeFormData","parseContentLengthHeader","getBodyString","mergeWarning","newMeta","existingWarnings","makeNetworkReplayBreadcrumb","buildSkippedNetworkRequestOrResponse","bodySize","buildNetworkRequestOrResponse","normalizedBody","warnings","normalizeNetworkBody","getAllowedHeaders","allowedHeaders","filteredHeaders","exceedsSizeLimit","isProbablyJson","_strIsProbablyJson","truncatedBody","urlMatches","urls","getFullUrl","baseURI","fixedUrl","captureFetchBreadcrumbToReplay","_prepareFetchData","enrichFetchBreadcrumb","_getFetchRequestArgBody","reqSize","resSize","requestBodySize","responseBodySize","captureDetails","_getRequestInfo","_getResponseInfo","networkCaptureBodies","networkRequestHeaders","getRequestHeaders","requestBody","bodyStr","networkResponseHeaders","getAllHeaders","bodyText","_parseFetchResponseBody","getResponseData","_tryCloneResponse","_tryGetResponseText","allHeaders","getHeadersFromOptions","_getResponseText","txt","captureXhrBreadcrumbToReplay","_prepareXhrData","enrichXhrBreadcrumb","_getBodySize","getResponseHeaders","requestWarning","responseBody","responseWarning","_getXhrResponseBody","_parseXhrResponse","responseType","handleNetworkBreadcrumbs","networkDetailAllowUrls","networkDetailDenyUrls","beforeAddNetworkBreadcrumb","_isXhrBreadcrumb","_isXhrHint","_isFetchBreadcrumb","_isFetchHint","addGlobalListeners","feedbackEvent","addMemoryEntry","createMemoryEntry","memoryEntry","jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize","callbackReturnValue","maxTimerId","cancelTimers","NAVIGATOR","getRecordingSamplingOptions","getHandleRecordingEmit","hadFirstEvent","_isCheckout","addSettingsEvent","earliestEvent","createOptionsEvent","createReplayEnvelope","replayEvent","recordingData","prepareRecordingData","payloadWithSequence","replayHeaders","sequence","prepareReplayEvent","event_id","eventHint","preparedEvent","sendReplayRequest","segment_id","eventContext","preparedRecordingData","errorIds","traceIds","initialTimestamp","baseEvent","TransportStatusCodeError","RateLimitError","sendReplay","replayData","retryConfig","THROTTLED","SKIPPED","maxCount","durationSeconds","_cleanup","_getTotalCount","isThrottled","wasThrottled","ReplayContainer","recordingOptions","slowClickTimeout","slowClickIgnoreSelectors","experiments","errorSampleRate","requiresManualStart","canvasOptions","forceFlush","continueRecording","activityTime","hasStoppedRecording","cbResult","lastActiveSpan","lastRootSpan","_lastActivity","initialTimestampInSeconds","dropReason","force","tooShort","tooLong","_flushInProgress","mutationLimit","mutationBreadcrumbLimit","overMutationLimit","getOption","selectors","defaultSelectors","getPrivacyOptions","mask","unmask","block","ignore","defaultBlockedElements","maskSelector","unmaskSelector","maskAttribute","maskAttributes","privacyOptions","MEDIA_SELECTORS","DEFAULT_NETWORK_HEADERS","_initialized","replayIntegration","Replay","flushMinDelay","flushMaxDelay","minReplayDuration","_experiments","blockAllMedia","maskFn","beforeAddRecordingEvent","_getMergedNetworkHeaders","finalOptions","loadReplayOptionsFromClient","canvasIntegration","initialOptions","opt","replaysSessionSampleRate","replaysOnErrorSampleRate","responseToSpanId","spanIdToEndTimestamp","defaultRequestInstrumentationOptions","instrumentOutgoingRequests","traceFetch","traceXHR","trackFetchStreamPerformance","shouldCreateSpanForRequest","enableHTTPTimings","tracePropagationTargets","shouldAttachHeadersWithTargets","updatedTimestamp","createdSpan","addHTTPTimings","xhrCallback","isPerformanceResourceTiming","resourceTimingEntryToSpanData","resourceTiming","timingSpanData","resolvedUrl","currentOrigin","isSameOriginRequest","isRelativeSameOriginRequest","addTracingHeadersToXhrRequest","setHeaderOnXhr","sentryTraceHeader","sentryBaggageHeader","registerBackgroundTabDetection","cancelledStatus","BROWSER_TRACING_INTEGRATION_ID","DEFAULT_BROWSER_TRACING_OPTIONS","browserTracingIntegration","enableInp","enableLongTask","enableLongAnimationFrame","enableInteractions","enableStandaloneClsSpans","beforeStartSpan","markBackgroundSpan","instrumentPageLoad","instrumentNavigation","_collectWebVitals","latestRoute","_createRouteSpan","isPageloadTransaction","finalStartSpanOptions","idleSpan","emitFinish","startingUrl","maybeEndActiveSpan","traceOptions","getMetaContent","oldPropagationContext","startBrowserTracingPageLoadSpan","startBrowserTracingNavigationSpan","registerInteractionListener","metaName","metaTag","inflightInteractionSpan","registerInteractionTransaction","currentRootSpanOp","init$1","unstringifiableValues","unstringifiablePrefix","setItem","getItem","getIsTrackingDisabled","setIsTrackingDisabled","isDisabled","getHasExplicitlyAcceptedTracking","setHasExplicitlyAcceptedTracking","hasExplicitlyAcceptedTracking","initializeLocalStorage","getUserIdFromQueryParams","queryParamSetUserId","createMemo","createReducerContext","defaultInitialState","providerFactory","ReducerProvider","useReducerContext","useFirstMountState","isFirst","useUpdateEffect","isFirstMount","composeMiddleware","composedMiddleware","dispatchRef","createStateContext","defaultInitialValue","StateProvider","useStateContext","useMountedState","mountedRef","useAsyncFn","lastCallId","callId","useAsync","useAsyncRetry","setAttempt","stateLoading","currentAttempt","useSetState","parseTimeRanges","createHTMLMediaHook","elOrProps","wrapEvent","userEvent","proxyEvent","onPlay","onPlaying","onWaiting","onPause","onVolumeChange","onDurationChange","buffered","onTimeUpdate","onProgress","React.cloneElement","lockPlay","controls","isPromise","resetLock","useAudio","off","isNavigator","react","equal","nav","isBatteryApiSupported","useBatteryMock","useBattery","battery","handleChange","isDeepEqual","bat","useBattery$1","useBeforeUnload","finalEnabled","toggleReducer","useToggle","defaultEvents","useClickAway","onClickAway","savedCallback","events_1","events_2","factory","registeredInModuleLoader","OldCookies","decode","converter","stringifiedAttributes","jar","useCookie","Cookies","setValue","updateCookie","toggleSelection","active","deselectCurrent","clipboardToIE11Formatting","defaultMessage","copyKey","reselectPrevious","mark","success","successful","copyToClipboard","useCopyToClipboard","noUserInteraction","normalizedValue","writeText","num","useUpdate","resolveHookState","useGetSet","useCounter","setInternal","rState","rDelta","rValue","KEBAB_REGEX","renderer","rawCssRule","decls","atrule","postponed","pkgName","warnOnMissingDependencies","addon","missing","prelude","rawCss","selectorRule","removeRule","maxIndex","sh","removeRule_1","kebab","VRule","newDecl","oldDecl","VSheet","newTree","oldTree","oldRules","newRules","cssToTree","tree","css","declarations","hasDeclarations","hasCurrentSymbol","selectorParts","cssToTree_2","nano","addonCSSOM","addonVCSSOM","useCss","useCustomCompareEffect","depsEqual","useTimeoutFn","clear","useDebounce","useDeepCompareEffect","useDefault","createProcess","dataTransfer","uri","useDrop","onFiles","onText","onUri","setOverRaw","setOver","onDragOver","onDragEnter","onDragLeave","onDragExit","onDrop","onPaste","mounted","createBond","useDropArea","bond","useEffectOnce","useEnsuredForwardedRef","ensuredRef","ensuredForwardRef","defaultTarget","isListenerType1","isListenerType2","useEvent","useError","setError","dispatchError","useFavicon","isCommonjs","fnMap","eventNameMap","screenfull","onFullScreenEntered","returnPromise","onFullScreenExit","useFullscreen","video","onClose","isFullscreen","setIsFullscreen","onWebkitEndFullscreen","onChange","isScreenfullFullscreen","useGeolocation","watchId","onEvent","onEventError","useGetSetState","buckets","setHarmonicInterval","didThrow","lastError","clearHarmonicInterval","bucket","hasListeners","useHarmonicIntervalFn","latestCallback","interval_1","useHover","onMouseEnter","originalOnMouseEnter","onMouseLeave","originalOnMouseLeave","useHoverDirty","onMouseOver","onMouseOut","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","arguments_","exec","oneMinute","useIdle","localState","onVisibility","useIntersection","intersectionObserverEntry","setIntersectionObserverEntry","observer_1","useInterval","createKeyPredicate","keyFilter","useKey","useMemoHandler","handlerEvent","createBreakpoint","breakpoints","screen","setScreen","setSideScreen","sortedBreakpoints","useKeyPress","useKeyPressEvent","keydown","keyup","useKeyPressDefault","pressed","useLatest","useLifecycles","mount","unmount","useList","initialList","newList","compareFn","callbackFn","deserializer","localStorageValue","valOrFunc","patchHistoryMethod","useLocationServer","buildState","trigger","hostname","useLocationBrowser","onPopstate","onPushstate","onReplacestate","hasEventConstructor","getClosestBody","document_1","preventDefault","rawEvent","isIosDevice","bodies","documentListenerAdded","useLockBodyScroll","locked","elementRef","bodyRef","lock","bodyInfo","unlock","_locked","_elementRef","useLogger","isTouchEvent","useLongPress","isPreventDefault","useMap","initialMap","stableActions","prevMap","newMap","utils","defaultState","useMedia","mql","useMediaDevices","devices","deviceId","groupId","useMediaDevicesMock","useMediaDevices$1","useMediatedState","mediator","mediatorFn","setMediatedState","useMethods","createMethods","reducerState","wrappedMethods","actionTypes","useMotion","acceleration","accelerationIncludingGravity","rotationRate","useMount","useUnmount","fnRef","useRafState","setRafState","useMouse","moveHandler","top_1","elW","elH","posX","posY","elX","elY","nullRef","useMouseHovered","whenHovered","bound","isHovered","useMouseWheel","mouseWheelScrolled","setMouseWheelScrolled","updateScroll","conn","getConnectionState","online","previousOnline","useNetworkState","handleStateChange","useObservable","observable$","useOrientation","orientation_1","angle","usePageLeave","onPageLeave","usePermission","permissionDesc","permissionStatus","usePrevious","strictEquals","prev","usePreviousDistinct","prevRef","curRef","usePromise","onValue","useQueue","useRaf","raf","timerStop","onFrame","loop","onStart","timerDelay","useRafLoop","initiallyActive","rafActivity","rafCallback","useSearchParam","useSearchParamServer","useSearchParam$1","render_1","tslib_1","react_1","isReact16Plus","isFn","more","children_1","comp","wrapInStatefulComponent_1","wrapInStatefulComponent","Comp","Decorated","_super","class_1","addClassDecoratorSupport_1","addClassDecoratorSupport","isSFC","createEnhancer_1","require$$2","noWrap","createEnhancer","Facc","faccProps","isClassDecoratorMethodCall","Klass","Enhanced","hookToRenderProp_1","defaultMapPropsToArgs","hookToRenderProp","mapPropsToArgs","lib","require$$3","useScratch","disabled","paramsRef","refState","refScratching","refAnimationFrame","setEl","onMoveEvent","docX","docY","top","onMouseMove","onTouchMove","onMouseUp","onTouchEnd","stopScratching","startScratching","onMouseDown","onTouchStart","useScroll","useScrolling","scrolling","setScrolling","scrollingTimeout_1","handleScrollEnd_1","handleScroll_1","useSessionStorage","sessionStorageValue","serializedState","keyList","shallowEqualDepsList","dep","isShallowEqual","useShallowCompareEffect","DRAF","useSize","setSize","onWindow","windowToListenOn","onLoad_1","sized","useSlider","isSliding","valueRef","reverse_1","startScrubbing_1","bindEvents_1","stopScrubbing_1","unbindEvents_1","onMouseDown_1","onMouseMove_1","onScrub_1","onTouchStart_1","onTouchMove_1","clientXY","rect","length_1","Status","useSpeech","handlePlay","preState","handlePause","handleEnd","utterance","isFocusedElementEditable","isTypedCharGood","useStartTyping","onStartTyping","useStateWithHistory","capacity","initialHistory","innerSetState","historyPosition","amount","useStateList","stateSet","useThrottle","hasNextValue","timeoutCallback_1","useThrottleFn","nextArgs","useTimeout","DEFAULT_USE_TITLE_OPTIONS","useTitle","prevTitleRef","useTitle$1","_title","easing","useTween","easingName","useUnmountPromise","refUnmounted","race","newPromise","useUpsert","listActions","isVibrationApiSupported","useVibrate","useVibrate$1","useVideo","useStateValidator","validator","validatorInner","stateInner","validity","setValidity","validate","useScrollbarWidth","scrollbarWidth","sbw","setSbw","useMultiStateValidator","states","initialValidity","statesInner","useWindowScroll","pageXOffset","pageYOffset","useWindowSize","initialWidth","initialHeight","handler_1","useMeasure","setRect","bottom","useMeasure$1","ZoomState","usePinchZoom","cacheRef","zoomingState","setZoomingState","pointermove_handler","curDiff","pointerdown_handler","pointerup_handler","remove_event","useRendersCount","useSet","initialSet","setSet","prevSet","toggle","createGlobalState","globalState","stateSetter","useHash","setHash","onHashChange","_setHash","newHash","statsigClientRef","reactUse","addBingToPage","isAlpsNext","googleTagManager","pageParams","fbq.init","isCustom","eventID","trackMethod","fbq.trackCustom","fbq.track","Sentry.init","Sentry.browserTracingIntegration","Sentry.contextLinesIntegration","Sentry.extraErrorDataIntegration","Sentry.sessionTimingIntegration","Sentry.replayIntegration","analytics","Sentry.captureMessage","disableTracking","useIsTrackingDisabled","isTrackingDisabled","useAccessToken","useRefreshToken","useUserId","useCustomerId","isLocalized","localize","ArccosError","actionUrl","actionText","__publicField","useAuthFetch","useFetchFromArccos","useFetchAccessKeys","fetchFromArccos","useFetchTokens","useUpdateAccessToken","reduxRefreshToken","reduxUserId","fetchTokens","overrides","accessKey","useUpdateRefreshToken","fetchAccessKeys","password","Subscribable","defaultTimeoutProvider","timeoutId","intervalId","TimeoutManager","__privateAdd","_provider","_providerCalled","__privateGet","__privateSet","timeoutManager","systemSetTimeoutZero","isServer","functionalUpdate","isValidTimeout","timeUntilStale","updatedAt","staleTime","resolveStaleTime","resolveEnabled","matchQuery","exact","fetchStatus","queryKey","stale","hashQueryKeyByOptions","partialMatchKey","matchMutation","mutation","mutationKey","hashKey","hasOwn","replaceEqualDeep","isPlainArray","aSize","bItems","bSize","equalItems","aItem","bItem","shallowEqualObjects","hasObjectPrototype","prot","sleep","replaceData","prevData","addToEnd","newItems","addToStart","skipToken","ensureQueryFn","fetchOptions","shouldThrowError","throwOnError","FocusManager","_focused","_setup","onFocus","setup","focused","isFocused","focusManager","pendingThenable","_resolve","_reject","tryResolveSync","defaultTransformerFn","dehydrateMutation","dehydrateQuery","serializeData","shouldRedactErrors","defaultShouldDehydrateMutation","defaultShouldDehydrateQuery","defaultShouldRedactErrors","dehydrate","filterMutation","filterQuery","queries","dehydratedState","mutationCache","queryCache","deserializeData","mutationOptions","queryHash","dehydratedAt","syncData","rawData","existingQueryIsPending","existingQueryIsFetching","hasNewerSyncData","_ignored","defaultScheduler","createNotifyManager","transactions","notifyFn","batchNotifyFn","scheduleFn","schedule","originalQueue","notifyManager","OnlineManager","_online","onOnline","onlineListener","offlineListener","onlineManager","defaultRetryDelay","failureCount","canFetch","networkMode","CancelledError","createRetryer","isRetryCancelled","continueFn","isResolved","cancelOptions","cancelRetry","continueRetry","canContinue","canStart","pause","continueResolve","run","promiseOrValue","initialPromise","retryDelay","shouldRetry","Removable","_gcTimeout","newGcTime","Query","_Query_instances","_revertState","_cache","_client","_retryer","_defaultOptions","_abortSignalConsumed","getDefaultState","__privateMethod","dispatch_fn","setStateOptions","abortController","addSignalProperty","fetchFn","queryFn","queryFnContext","queryFnContext2","context2","fetchState","hasData","initialDataUpdatedAt","QueryObserver","_QueryObserver_instances","_currentQuery","_currentQueryInitialState","_currentResult","_currentResultState","_currentResultOptions","_currentThenable","_selectError","_selectFn","_selectResult","_lastQueryWithDefinedData","_staleTimeoutId","_refetchIntervalId","_currentRefetchInterval","_trackedProps","shouldFetchOnMount","executeFetch_fn","updateTimers_fn","shouldFetchOn","clearStaleTimeout_fn","clearRefetchInterval_fn","prevOptions","prevQuery","updateQuery_fn","shouldFetchOptionally","updateStaleTimeout_fn","nextRefetchInterval","computeRefetchInterval_fn","updateRefetchInterval_fn","shouldAssignObserverCurrentProperties","onPropTracked","defaultedOptions","prevResult","prevResultState","prevResultOptions","queryInitialState","isPlaceholderData","fetchOnMount","fetchOptionally","errorUpdatedAt","skipSelect","placeholderData","selectError","isFetching","isLoading","nextResult","isStale","finalizeThenableIfPossible","recreateThenable","prevThenable","shouldNotifyListeners","notifyOnChangeProps","notifyOnChangePropsValue","includedProps","typedKey","notify_fn","nextInterval","notifyOptions","shouldLoadOnMount","optimisticResult","infiniteQueryBehavior","pages","oldPages","oldPageParams","currentPage","fetchPage","maxPages","addTo","pageParamFn","getPreviousPageParam","getNextPageParam","oldData","remainingPages","Mutation","_Mutation_instances","_observers","_mutationCache","variables","onContinue","mutationFnContext","restored","isPaused","MutationCache","_mutations","_scopes","_mutationId","__privateWrapper","scopeFor","scopedMutations","mutationsWithSameScope","firstPendingMutation","foundMutation","defaultedFilters","pausedMutations","QueryCache","_queries","queryInMap","QueryClient","_queryCache","_queryDefaults","_mutationDefaults","_mountCount","_unsubscribeFocus","_unsubscribeOnline","cachedData","defaultedCancelOptions","promises","queryDefault","jsxDEV","maybeKey","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","QueryClientContext","useQueryClient","queryClient","QueryClientProvider","IsRestoringContext","useIsRestoring","createValue","isReset","QueryErrorResetBoundaryContext","useQueryErrorResetBoundary","ensurePreventErrorBoundaryRetry","errorResetBoundary","useClearResetErrorBoundary","getHasError","suspense","ensureSuspenseTimers","originalStaleTime","willFetch","isRestoring","fetchOptimistic","useBaseQuery","Observer","isNewCacheEntry","shouldSubscribe","React.useSyncExternalStore","onStoreChange","useQuery","ArccosNetworkError","isArccosError","retries","shouldReauthenticate","customErrorHandler","updateAccessToken","defaultHeaders","restInit","newAccessToken","causeMessage","useExtendedFetchFromArccos","extendedFetch","useApiDataFetcher","useValidateOffer","useInsertUser","unsafeStringify","randomUUID","native","useAlpsExperimentOfferKey","useShouldUseAlpsExperiment","getIsAlpsNext","alpsExperience","country","gateValue","getIsVintageExperience","getIsCk14Experience","DEBUG","_INFO","_WARN","ERROR","addTag","Log","Log_1","_getStatsigGlobal","statsigGlobal","_getStatsigGlobalFlag","_getInstance","sdkKey","GLOBAL_KEY","_window","_global","_globalThis","MARKER_MAP","ACT_START","ACT_END","DIAGNOSTICS_EVENT","_addMarker","_createMarker","evaluationDetails","_safeGetField","sdk","markers","overallInitDuration","_makeDiagnosticsEvent","marker","TypingUtils","_typeOf","_isTypeMatch","typeOf","TypingUtils_1","_DJB2","_DJB2Object","maxLevels","_getSortedObject","maxDepth","sortedObject","CacheKey","Hashing_1","_getUserStorageKey","customKeyGenerator","cids","leftKey","rightKey","_getStorageKey","_getWindowSafe","_getDocumentSafe","_isServerEnv","isNode","_addWindowEventListenerSafe","_addDocumentEventListenerSafe","_getCurrentPageUrlSafe","_getUnloadEvent","StatsigEvent","CONFIG_EXPOSURE_NAME","GATE_EXPOSURE_NAME","LAYER_EXPOSURE_NAME","_createExposure","secondaryExposures","_addEvaluationDetailsToMetadata","_isExposureEvent","_createGateExposure","gate","exposureMapping","_mapExposures","exposures","exposure","_createConfigExposure","_createLayerParameterExposure","layer","parameterName","evaluation","isExplicit","allocatedExperiment","parameterRuleIDs","StatsigOptionsCommon","SafeJs_1","inMemoryStore","_inMemoryProvider","_localStorageProvider","_main","_inMemoryBreaker","newProvider","_getObjectFromStorage","_setObjectInStorage","UrlConfiguration_1","NetworkConfig_1","ENDPOINT_DNS_KEY_MAP","UrlConfiguration","customUrl","customApi","fallbackUrls","defaultApi","fallbacks","FOREGROUND","BACKGROUND","LISTENERS","isUnloading","_isCurrentlyVisible","_isUnloading","_subscribeToVisiblityChanged","_notifyVisibilityChanged","visibility","EventLogger_1","CacheKey_1","require$$4","StatsigEvent_1","require$$5","StatsigOptionsCommon_1","require$$6","StorageProvider_1","require$$7","require$$8","VisibilityObserving_1","require$$9","DEFAULT_QUEUE_SIZE","DEFAULT_FLUSH_INTERVAL_MS","MAX_DEDUPER_KEYS","DEDUPER_WINDOW_DURATION_MS","MAX_FAILED_LOGS","QUICK_FLUSH_WINDOW_MS","EVENT_LOGGER_MAP","RetryFailedLogsTrigger","EventLogger","_sdkKey","_emitter","_network","loggingEnabled","storageKey","isServerEnv","userKey","shouldUseBeacon","savedEvents","retrieved","flushInterval","additions","ClientInterfaces","UUID","getUUID","d2","StableID","UUID_1","PROMISE_MAP","COOKIE_ENABLED_MAP","DISABLED_MAP","stableID","_loadFromCookie","_persistToStorage","_loadFromStorage","_persistToCookie","override","_getStableIDStorageKey","getCookieName","expiryDate","StatsigUser","_normalizeUser","fallbackEnvironment","_getFullUserHash","TypedJsonParse","_typedJsonParse","DataAdapterCore_1","StableID_1","StatsigUser_1","TypedJsonParse_1","CACHE_LIMIT","MAX_CACHE_WRITE_ATTEMPTS","DataAdapterCore","_adapterName","_cacheSuffix","InMemoryCache","cacheKey","inMem","_makeDataAdapterResult","cachedResult","isCacheValidFor204","resultString","cacheLimit","lastModifiedTimeMap","evictableKeys","_getEvictableKeys","evictable","provided","keyA","keyB","valueA","valueB","DownloadConfigSpecsResponse","SDKType","SDK_CLIENT","binding","SDKType_1","StatsigMetadata_1","UNKNOWN_ERROR","ErrorBoundary","_lastSeenError","namePrefix","_getAllInstanceMethodNames","tempError","_resolveError","unwrapped","resolvedError","sdkType","statsigMetadata","_getDescription","_getStatsigOptionLoggingCopy","loggingCopy","EvaluationOptions","EvaluationTypes","InitializeResponse","MemoKey","EXIST_KEYS","DO_NOT_MEMO_KEYS","createMemoKey","DnsTxtQuery","FEATURE_ASSETS_DNS_QUERY","DNS_QUERY_ENDPOINT","DOMAIN_CHARS","MAX_START_LOOKUP","_fetchTxtRecords","networkFunc","_parseDnsResponse","byte","NetworkFallbackResolver_1","DnsTxtQuery_1","DEFAULT_TTL_MS","COOLDOWN_TIME_MS","NetworkFallbackResolver","errorBoundary","urlConfig","_tryWriteFallbackInfoToCache","_readFallbackInfoFromCache","errorMessage","timedOut","_isDomainFailure","newUrl","newFallbackInfo","previousInfo","cooldown","records","_extractPathFromUrl","currentFallbackInfo","previouslyUsed","currentFallbackUrl","found","loopUrl","errorMsg","lowerErrorMsg","_getFallbackInfoStorageKey","urlString","SDKFlags","FLAGMAP","flagKey","__StatsigGlobal_1","MAX_SESSION_IDLE_TIME","MAX_SESSION_AGE","_loadSession","_bumpSession","_overrideSessionId","_isIdle","_hasRunTooLong","lifetime","_createSessionTimeout","lastUpdate","_getSessionIDStorageKey","StatsigClientEventEmitter","NetworkCore_1","Diagnostics_1","SDKFlags_1","SessionID_1","StatsigClientEventEmitter_1","require$$10","require$$11","require$$12","require$$13","DEFAULT_TIMEOUT_MS","BACKOFF_BASE_MS","BACKOFF_MAX_MS","RATE_LIMIT_WINDOW_MS","RATE_LIMIT_MAX_REQ_COUNT","LEAK_RATE","RETRYABLE_CODES","NetworkCore","tempUrl","_ensureValidSdkKey","argsInternal","reqTimedOut","populatedUrl","keepalive","_tryMarkInitStart","_tryMarkInitEnd","_getErrorMessage","_didTimeout","formattedErrorMsg","_exponentialBackoff","compressionMode","leakedRequests","_allowCompression","stream","writer","reader","chunks","combined","fallbackUrl","_populateRequestBody","sessionID","isProxy","flagEnabled","abortedByTimeout","OverrideAdapter","ParamStoreTypes","CURLY_AND_SQUARE_BRACKET_SIZE","APPROX_ADDITIONAL_SIZE","_fastApproxSizeOf","StatsigClientBase_1","ErrorBoundary_1","MemoKey_1","MAX_MEMO_CACHE_SIZE","StatsigClientBase","adapter","emitter","_assignGlobalInstance","barrier","newStatus","memoKey","instances","StatsigDataAdapter","StatsigPlugin","StatsigTypeFactories","_makeEvaluation","_makeFeatureGate","_makeDynamicConfig","_makeTypedGet","_makeExperiment","_makeLayer","exposeFunc","_mergeOverride","overridden","fallback","StatsigTypes","StatsigUpdateDetails","createUpdateDetails","initDuration","sourceUrl","require$$14","require$$15","require$$16","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","require$$33","require$$34","require$$35","require$$36","require$$37","require$$38","require$$39","require$$40","NoopEvaluationsClient","client_core_1","noopInitializeDetails","_noop","_noopWithInitializeDetails","_noopAsync","_noopAsyncWithInitializeDetails","NOOP_DETAILS","_defaultEvaluation","_noopDataAdapter","isNoopClient","StatsigContext","NoopEvaluationsClient_1","V1InitializeContainer_1","V1InitializeContainer","lookup","V2InitializeContainer_1","V2InitializeContainer","evalV2","EvaluationStore_1","EvaluationStore","bootstrapMetadata","bootstrapUser","userForComparison","sourceDetails","isUnrecognized","EvaluationResponseDeltas","MAX_DELTAS_SORT_DEPTH","_resolveDeltasResponse","deltasString","deltas","_mergeDeltasIntoCache","_handleDeletedEntries","actualChecksum","_deleteEntriesInRecord","Network","EvaluationResponseDeltas_1","StatsigNetwork","hasHashChanged","ParamStoreGetterFactory","NO_EXPOSURE_OPT","_shouldLogExposure","_shouldReturnFallback","_getMappedStaticValue","_getMappedGateValue","_getMappedDynamicConfigValue","_getMappedExperimentValue","_getMappedLayerValue","_makeParamStoreGetter","StatsigEvaluationsDataAdapter_1","Network_1","StatsigEvaluationsDataAdapter","StatsigClient_1","ParamStoreGetterFactory_1","StatsigClient","disable","initiator","isUsingNetworkValues","eventOrName","originalUser","stableIdOverride","readyPromise","paramStore","__STATSIG__","useStatsigInternalClientFactoryAsync_1","useStatsigInternalClientFactoryAsync","setIsLoading","useClientAsyncInit_1","js_client_1","useClientAsyncInit","initialUser","statsigOptions","StatsigProvider_1","jsx_runtime_1","StatsigContext_1","StatsigProvider","ClientBasedStatsigProvider","ConfigBasedStatsigProvider","renderVersion","setRenderVersion","_isReady","useStatsigClientSetup","onValuesUpdated","useStatsigInternalClientFactoryBootstrap_1","useStatsigInternalClientFactoryBootstrap","clientRef","useClientBootstrapInit_1","useClientBootstrapInit","initialValues","useLegacyFormat","useDynamicConfig","default_1","configName","useExperiment","experimentName","useFeatureGate","gateName","useGateValue","useLayer","layerName","useParameterStore","storeName","useStatsigClient_1","useStatsigClient","anyClient","checkGate","getFeatureGate","getDynamicConfig","getExperiment","getLayer","getParameterStore","logEvent","useStatsigUser_1","getClientUser","useStatsigUser","useDynamicConfig_1","useExperiment_1","useFeatureGate_1","useGateValue_1","useLayer_1","useParameterStore_1","hasTrackedFeatureGate","useIsPaymentModeEnabled","stableId","getRedemptionCodeFromUrl","urlParams","getTestClockIdFromUrl","sharedClientSecretCache","sharedInflightRequests","useWrappedFetchClientSecret","isLinkAddOnActivated","isSensorAddonActivated","rawLineItems","useSelectedLineItems","isStripeEnabled","isLinkRequired","useSelectedLinkGen2LineItem","isPaymentModeEnabled","isCKOptional","useIsCKOptional","offerKey","useOfferKey","fetchData","lineItems","forceUpdate","prevCustomerIdRef","optionalItemKeys","generateCacheKey","currentCartConfig","includedOptionalItems","itemKey","generateAllConfigurations","optionalItems","configurations","totalCombinations","cartConfigurations","fetchClientSecretForConfig","simulatedIsLinkAddOnActivated","simulatedIsSensorAddonActivated","products","lineItem","product","doesOfferRequireShipping","baseReturnUrl","returnUrlSeparator","returnUrl","windowPartner","redemptionCode","testClockId","clientTags","hasRecurringItems","paymentIntentData","shouldIncludePaymentIntentData","finalClientTags","customerIdChanged","hasActualCustomerId","configsToPreload","isCurrentlyFetching","fetchPromise","clientSecret","Sentry.captureException","wrappedFetchClientSecret","inflightRequest","extractSessionId","secretIndex","useUpdateCheckoutSessionMetadata","useUpdateCheckoutSessionsMetadata","updateSessionMetadata","updatePromises","readFbclidFromUrl","fire","fireLead","fireInitiateCheckout","fireAddPaymentInfo","LEAD_PREFIX","IC_PREFIX","CONVERSION_PREFIX","getOrCreate","fresh","getOrCreateLeadEventId","trimmed","getOrCreateICEventId","generateAddPaymentInfoEventId","getOrCreateConversionEventId","stripeSessionId","getShouldOfferLinkProTrial","usePartnerKey","shouldUseAlpsExperiment","shouldUseAlpsNext","alpsExperimentOfferKey","isUsOrCa","getPartnerKey","default_offer_key","getOfferKeyForPartner","useOffersResponse","serverSideOffers","redemptionOptions","usersCountryCode","desiredCurrency","getCurrencyByCountryCode","newCurrency","useUserState","useUserSubscriptionState","useOffers","useOffer","offers","useRedemptionOptions","useAcceptableUserStates","useSelectedRedemptionOption","useSubscriptionOptions","selectedRedemptionOption","useSelectedSubscriptionLineItem","useSelectedShippingAndHandlingLineItem","useSelectedCompletionKitLineItem","useTrialPeriodDays","useValidateOfferAndCreateUser","uuidV4","updateRefreshToken","insertUser","acceptableUserStates","validateOffer","updateCheckoutSessionsMetadata","isReferral","validationResult","userState","queryParamSetEmail","accessKeysResponse","leadEventId","__webpack_modules__","__unused_webpack_module","__webpack_require__","_interopRequireDefault","_registerConsole","_default","registerConsole","_typeof2","_enhanceFunc","_exceptions","unsubFunctions","methods","consoleOptions","unsubFunction","_scrubException","_TraceKit","_stackTraceFromError","messageArgs","isConsole","preppedTrace","exceptionType","trace","addEventOptions","_typeof","_registerExceptions","Capture","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","hasPropertyDescriptor","_classCallCheck2","_createClass2","objectPrototype","what","hasKey","orig","Handler","builtin","_this","wrappedBuiltIns","wrapTimeFn","wrapEventTarget","evtName","wrappedFn","eventTargets","registerCore","_raven","raven","errorReport","rejectionHandler","stackTraceFromError","makeNotNull","_toConsumableArray2","_registerXHR","interceptors","makeInterceptor","fetch","fetchId","reversedInterceptors","requestError","_err","responseError","attach","isPolyfill","didAttach","registerNetwork","_defineProperty2","_registerFetch","_registerIonic","_registerNetworkInformation","_mapValues","shouldAugmentNPS","shouldParseXHRBlob","ignoredNetwork","beginning","addRequest","reqId","_ref$isEnabled","_ref$requestSanitizer","requestSanitizer","sanitized","addResponse","_ref2$isEnabled","_ref2$responseSanitiz","responseSanitizer","unsubFetch","unsubXHR","unsubIonic","unsubNetworkInformation","registerFetch","_fetchIntercept","makeObjectFromHeaders","stringifyHeaders","pluckFetchFields","LOGROCKET_FETCH_LABEL","fetchMethodMap","unregister","clonedText","req","_response","responseClone","responseTextPromise","responseHash","utf8Decoder","bodyContents","readResponseBody","mergeHeaders","serializeQueryParams","appendQueryParamsString","processData","registerIonic","_protectFunc","_createForOfIteratorHelper","allowArrayLike","it","normalCompletion","didErr","_e2","VALID_HTTP_METHODS","VALID_SERIALIZERS","UNSUPPORTED_SERIALIZERS","LOGROCKET_IONIC_LABEL","UNSUPPORTED_PLATFORMS","FORM_DATA","EMPTY_SET","STRING_SET","STRING_ARRAY_SET","ALLOWED_DATA_TYPES","checkForValidStringValue","fieldName","checkKeyValuePairObject","allowedChildren","onInvalidValueMessage","_Object$keys","getMatchingHostHeaders","ionicHttp","_URL","getMergedHeaders","requestHeaders","globalHeaders","hostHeaders","serializeValue","serializeIdentifier","parentKey","serializeArray","_iterator","serializeObject","identifier","_URL2","getAllowedDataTypes","dataSerializer","getAllowedInstanceTypes","currentDataType","allowedDataTypes","allowedInstanceTypes","isCorrectInstanceType","handleMissingOptions","ionicIdCounter","_cordova","_cordova$plugin","_window$ionic","ionicMap","unsubscribedFromIonic","platforms","originalSendRequest","handleResponse","isSuccess","ionicReqId","_responseHash","failure","currentId","ourSuccessHandler","ourFailureHandler","modifiedOptions","modifiedUrl","mergedHeaders","requestHash","_requestHash","registerNetworkInformation","EFFECTIVE_TYPE_VALS","lastStatus","sendNetworkInformation","setActive","registerXHR","_startsWith","_nps","_statusCodes","shouldBeActive","currentXHRId","_ref$shouldAugmentNPS","_ref$shouldParseXHRBl","_XHR","xhrMap","unsubscribedFromXhr","LOGROCKET_XHR_LABEL","mozAnon","mozSystem","xhrObject","openOriginal","openShim","logrocketSessionURL","urlObj","responseText","sendOriginal","sendShim","currentXHR","recordingURL","dataString","captureResponse","_window$navigator","blobReader","headerValues","xhrListeners","headerString","headerParts","loadTime","_now","storeIdCounter","_ref$stateSanitizer","stateSanitizer","_ref$actionSanitizer","actionSanitizer","originalDispatch","storeId","sanitizedState","sanitizedAction","createMiddleware","_createEnhancer","_createMiddleware","TraceKit","_slice","ERROR_TYPES_RE","lastExceptionStack","installGlobalHandler","unsubscribeAll","uninstallGlobalHandler","notifyHandlers","isWindowError","_oldOnerrorHandler","_onErrorHandlerInstalled","traceKitWindowOnError","lineNo","colNo","processLastException","groups","_lastExceptionStack","_lastArgs","rethrow","computeStackTraceFromStackProp","chrome","winjs","augmentStackTraceWithInitialElement","stackInfo","computeStackTraceByWalkingCallerChain","recursion","computeStackTrace","WOOTRIC_RESPONSES_REGEX","DELIGHTED_RESPONSES_REGEX","DELIGHTED_FEEDBACK_PREFIX","getStatusText","_XHR_CUSTOM_FAILURE_S","STATUS_CODES","XHR_CUSTOM_STATUS_CODES","XHR_CUSTOM_FAILURE_STATUSES","createUnsubListener","enhanceFunc","_createUnsubListener","NO_OP_UNREGISTER","shim","_h$get","canBind","protectFunc","_sendTelemetryData","_logError","onFail","scrubException","isScalar","optionalScalars","optionalMaps","_iterator2","_step2","_field","dirty","scrubbed","sendTelemetry","sendErrorTelemetry","SCRIPT_VERSION","_sendToSentry","_window$__SDKCONFIG__","XHR","rejectReason","stringPayload","_objectWithoutProperties2","_console","_redux","MAX_QUEUE_SIZE","considerIngestServerOption","ingestServer","LogRocket","appID","_opts$network","_opts$shouldAugmentNP","_opts$shouldParseXHRB","_opts$shouldDetectExc","shouldDetectExceptions","customEventName","eventProperties","makeLogRocket","_LogRocket","REACT_NATIVE_NOTICE","makeNoopPolyfill","getLogger","getNoopPolyfill","getInstance","getDomainsAndEnv","setupBaseSDKCONFIG","_makeLogRocket","CDN_SERVER_MAP","envFromHostname","sdkVersion","scriptTag","scriptHostname","enterpriseServer","_ref$sdkVersion","_getDomainsAndEnv","scriptEnv","scriptOrigin","scriptIngest","sdkServer","__unused_webpack_exports","arrayLikeToArray","_classCallCheck","Constructor","toPropertyKey","_defineProperties","_createClass","protoProps","staticProps","objectWithoutPropertiesLoose","_objectWithoutProperties","sourceSymbolKeys","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","_toPrimitive","prim","toPrimitive","_toPropertyKey","__webpack_module_cache__","moduleId","cachedModule","__webpack_exports__","LOGROCKET_SAMPLE_RATE","useLogRocket","CircledExclamation","ErrorDisplay","buttonText","onDismiss","restProps","hasContent","NoOffersAvailable","offersResponse","useBody","support_email","validateEmail","Loading","color","svgClassName","restSvgProps","pathLength","setPathLength","setSVGPathLength","SVGPathLength","NucapMainSection","dynamicContentData","isEmailValid","validateOfferAndCreateUser","trialPeriodDays","affiliate","getIsButtonDisabled","dynamicContent","doesHaveBackgroundImage","shouldOfferLinkProTrial","backgroundImageCaption","backgroundImageSubcaption","limitedTimeOffer","LinkProSection","DeviceCardBack","PlaysLikeDistanceCardBack","SmarterDataCardBack","CheckIcon","CrownIcon","TournamentModeCardBack","ToggleOffIcon","ToggleOnIcon","activeOpacity","inactiveOpacity","DotContainer","activeIndex","TestimonialCard","testimonial","desktopImage","CardCarousel","scrollContainerRef","setActiveIndex","scrollToIndex","getVisibleIndex","scrollContainer","scrollLeft","clientWidth","testimonials","card","mmgContent","golfDigestAchievement","appStoreAchievement","playStoreAchievement","billionShotsAchievement","officialGameTracker","ReviewSection","shouldShowAchievements","AppAchievements","AppAchievementsCondensed","BillionShotsSection","GreenShadow","scrollToTop","_listCacheClear","eq_1","_assocIndexOf","_listCacheDelete","_listCacheGet","_listCacheHas","_listCacheSet","_ListCache","_stackClear","_stackDelete","_stackGet","_stackHas","_freeGlobal","_Symbol","_getRawTag","_objectToString","_baseGetTag","isObject_1","isFunction_1","_coreJsData","_isMasked","_toSource","_baseIsNative","_getValue","_getNative","_Map","_nativeCreate","_hashClear","_hashDelete","_hashGet","_hashHas","_hashSet","_Hash","_mapCacheClear","_isKeyable","_getMapData","_mapCacheDelete","_mapCacheGet","_mapCacheHas","_mapCacheSet","_MapCache","_stackSet","_setCacheAdd","_setCacheHas","isObjectLike_1","_baseIsArguments","stubFalse_1","_DataView","_Promise","_Set","_WeakMap","STEPS","useIsDesktopView","aspectRatio","AnimationCarousel","animation_slides","slide","TextScroller","isActiveStep","AnimationSection","middleSectionRef","stepsOrder","setStepsOrder","stepForward","stepBackward","setCurrentIndex","scrollLock","setScrollLock","makeActiveStep","activeStep","handleScroll","scrollTop","clientHeight","stepHeight","nextStep","animation_images","isDesktop","stepIter","ProgressBarSvg","phoneScreenImage","phoneScreenImageTitleist","phoneScreenImageLinkProTrial","phoneScreenImageVintage","PhoneScreenSection","isVintage","getShouldShowCondensedAchievements","imageToUse","useSkillestValue","SkillestGiveawaySection","bodyClassName","titleClassName","buttonClassName","shouldOfferSkillest","skillestValue","formatPrice","NucapLandingPage","defaultFeatures","defaultFlippableCards","InfoButton","rotate","FeaturesSection","subtitle","flippableCards","features","hasGetStartedButton","flippedCard","setFlippedCard","handleCardClick","feature","AudioManagerContext","AudioManagerProvider","currentlyPlaying","setCurrentlyPlaying","activeElementRef","startPlaying","handleEnded","stopPlaying","stopAllOthers","useAudioManager","InlineVideoSection","videoUrl","videoId","posterUrl","overlayTitle","overlaySubtitle","shouldShowOverlay","isPlaying","setIsPlaying","videoRef","handlePlayClick","ComparisonColumn","productImage","theme","smartSensorsFeatures","linkProFeatures","SensorLinkComparisonSection","handleGetStartedClick","audioRef","audio","defaultTestimonials","TestimonialsSection","WrapUpSection","cta","AlpsCardBack","infoButton","text2","AlpsLandingPage","HeroSection","AlpsLandingPageGeneric","isPingOrCobra","PrimaryButton","combinedClassName","heroImage","heroImageMobile","onEmailChange","isButtonDisabled","externalRef","isCK14","internalRef","inputRef","___$insertStyle","_interopDefaultLegacy","React__default","Marquee","autoFill","play","pauseOnHover","pauseOnClick","speed","gradient","gradientColor","gradientWidth","onFinish","onCycleComplete","onMount","containerWidth","setContainerWidth","marqueeWidth","setMarqueeWidth","setMultiplier","setIsMounted","rootRef","containerRef","marqueeRef","calculateWidth","containerRect","marqueeRect","containerStyle","gradientStyle","marqueeStyle","childStyle","multiplyChildren","MarqueeSection","CaptionCard","caption","captionMaxWidth","imagePosition","imageSize","getCaptions","getCk14Captions","showGreenMaps","CaptionsSection","isAltBg","captions","captionData","PreFooter","FloatingPrimaryCTA","heroSelector","isVisible","setIsVisible","hero","heroRect","heroHeight","percentVisible","getTestimonials","getCk14Testimonials","ProsSection","customPlayButton","MemberSpotlight","media","memberName","memberTitle","anchorName","altBackground","isVideoChild","renderMedia","AIR_TITLE","CK14_SPOTLIGHT_CONFIG","SPOTLIGHT_CONFIGS","getSpotlightConfig","FAQS","CK14_INTL_FAQS","CK14_FAQS","FaqSection","faqs","openIndex","setOpenIndex","faq","isOpen","paragraph","AlpsNextLandingPage","titlePrefix","heroInputRef","rawPartner","primarySpotlight","handleFloatingCtaClick","PreFooterSection","APP_STORE_URL","PLAY_STORE_URL","QR_CODE_URL","AppstoreLinks","isIOS","isAndroid","ckLineItem","shouldIncludeSensors","sensorsOnTheWayCopy","storeUrl","IMPACT_COOKIE_NAME","impactConversionFired","sendImpactConversion","fireServerAnalyticsSuccess","AlpsNextSuccess","subscriptionPrice","subtotal","metaEventId","alpsNextProperties","ClientOnly","setMounted","VideoModal","useIframe","videoData","defaultVolume","shouldCloseModalOnVideoEnd","isFullScreen","setIsFullScreen","prevFullScreen","pgaCallout","vintagePgaLockup","CreateAccountForm","shouldShowPGALogo","isDesktopView","videoButtonUrl","shouldShowWatchVideoButton","getHeaderFontSize","backgroundPictureUrl","desktopBackgroundPictureUrl","NucapLandingPageV2","_CountryCodes","countryName","valueIndex","countryCode","CountryCodes","_USStateCodes","USStateCodes","getDefaultCountryForCurrency","icons","CheckoutIcon","icon","LinkOffer","buttonAction","linkLineItem","doesOfferIncludeLink","linkDiscountDisplay","useLinkDiscountDisplay","linkProduct","benefits","isLinkProTrial","shippingLineItem","shippingCost","benefit","discountPercent","formattedDiscount","discountDollarAmount","formattedDiscountDollarAmount","SensorAddon","hasSymbol","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","$$typeofType","AsyncMode","Element","Lazy","Memo","Portal","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","isContextConsumer","isForwardRef","isFragment","isMemo","isPortal","isProfiler","isSuspense","reactIs_development","reactIsModule","getOwnPropertySymbols","propIsEnumerable","shouldUseNative","test1","test2","order2","test3","letter","objectAssign","ReactPropTypesSecret","ReactPropTypesSecret_1","getStack","checkPropTypes_1","ReactIs","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","throwOnDirectAccess","ITERATOR_SYMBOL","ANONYMOUS","ReactPropTypes","createPrimitiveTypeChecker","createAnyTypeChecker","createArrayOfTypeChecker","createElementTypeChecker","createElementTypeTypeChecker","createInstanceTypeChecker","createNodeChecker","createObjectOfTypeChecker","createEnumTypeChecker","createUnionTypeChecker","createShapeTypeChecker","createStrictShapeTypeChecker","PropTypeError","createChainableTypeChecker","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","propFullName","secret","chainedCheckType","expectedType","propType","getPropType","preciseType","getPreciseType","typeChecker","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","expectedTypesMessage","invalidValidatorError","shapeTypes","allKeys","propTypesModule","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_nonIterableRest","_arr","useAttachEvent","cbDefined","cbRef","decoratedCb","isUnknownObject","isStripe","PLAIN_OBJECT_STR","leftArray","rightArray","leftPlainObject","rightPlainObject","leftKeys","rightKeys","keySet","pred","extractAllowedOptionsUpdates","immutableKeys","newOptions","isUpdated","INVALID_STRIPE_ERROR$2","validateStripe","parseStripeProp","registerWithStripeJs","ElementsContext","parseElementsContext","useCase","PropTypes","_excluded$1","CheckoutSdkContext","parseCheckoutSdkContext","CheckoutContext","extractCheckoutContextValue","checkoutSdk","sessionState","INVALID_STRIPE_ERROR$1","CheckoutProvider","rawStripeProp","_React$useState","_React$useState2","setSession","_React$useState3","_React$useState4","safeSetContext","initCheckoutCalledRef","prevStripe","prevCheckoutSdk","_prevOptions$elements","_options$elementsOpti","_prevOptions$elements2","_options$elementsOpti2","hasSdkLoaded","previousAppearance","currentAppearance","hasAppearanceChanged","previousFonts","currentFonts","hasFontsChanged","checkoutContextValue","useCheckoutSdkContextWithUseCase","useCaseString","useElementsOrCheckoutSdkContextWithUseCase","checkoutSdkContext","elementsContext","useCheckout","capitalized","createElementComponent","ClientElement","_ref$options","onBlur","onReady","onEscape","onLoadError","onLoaderStart","onNetworksChange","onConfirm","onCancel","onShippingAddressChange","onShippingRateChange","onSavedPaymentMethodRemove","onSavedPaymentMethodUpdate","setElement","domNode","readyCallback","restOptions","updates","ServerElement","EmbeddedCheckoutContext","PaymentElement","ExpressCheckoutElement","AddressElement","newBannerImg","SensorlessPopup","CloseSymbol","LinkProPopup","isProductDetailsOpen","setIsProductDetailsOpen","isKeyFeaturesOpen","setIsKeyFeaturesOpen","CaratDown","getLinkProPrice","scheduledLineItem","scheduledPrice","getLinkProPriceFromSingleItem","LinkProTrialPopup","linkProLineItem","PaymentPageModals","shouldShowSensorlessPopup","shouldShowLinkProPopup","setShouldShowSensorlessPopup","setShouldShowLinkProPopup","CircledArccosCrown","LineItem","isExpanded","setIsExpanded","doesOfferHaveFreeTrial","isSmartLaserPreorder","selectedSmartLaserSubscriptionKey","isProductLink","isLinkProTrialLineItem","CaratIcon","bulletPoint","SkillestLineItem","useTotalDueAtCheckout","ProductDetails","titleContent","labelContent","bodyContent","totalDueAtCheckout","isAlpsExperiment","isLinkProPartner","dynamicContentPaymentProducts","alpsOfferPaymentPageDynamicContent","linkProOfferPaymentPageDynamicContent","imgGen4Sensors","imgLinkPro","PlusCircleIcon","Ck14LinkProSpecialOffer","onAdd","onTermsClick","LinkProContent","shippingPrice","showDiscount","Ck14ProductDetails","isLinkIncluded","formatWithCommas","linkProPrice","LicenseAgreementLink","PrivacyPolicyLink","Disclaimer","subscriptionLineItem","selectedSmartLaserSubscription","shouldShowDefaultDisclaimer","isNotSubscription","AgeDisclaimer","includeSubscriptionCondition","ageDisclaimerContent","TitleistPrivacyNoticeLink","titleistPrivacyNotice","CreditCardMark","AddressValidationErrors","handleValidationErrors","offerValidationResponse","setIsSubmitting","isExpressCheckout","unhandledValidationErrors","Stripe","fetchClientSecret","checkoutKey","setCheckoutKey","hasRecurringLineItem","StripeCheckoutForm","checkout","isAddressReady","setIsAddressReady","isPaymentReady","setIsPaymentReady","isExpressCheckoutReady","setIsExpressCheckoutReady","hasExpressCheckoutOptions","setHasExpressCheckoutOptions","isAddressComplete","setIsAddressComplete","isPaymentComplete","setIsPaymentComplete","visiblePaymentElementType","setVisiblePaymentElementType","selectedPaymentMethod","setSelectedPaymentMethod","address","setAddress","isSubmitting","handleSubmit","apiEventId","confirmResult","retryErr","stripeMessage","handleExpressCheckoutElementConfirm","clientEmail","billingEmail","updateError","handleAddressElementChange","handlePaymentElementChange","availablePaymentMethods","AlpsNextLineItem","alpsNextPaymentProducts","AlpsNextProductDetails","offerLineItemKeys","visibleProducts","getIsDeviceCutlassEligible","Payment","defaultCountry","icSubtotal","hasFiredIC","icEventId","shouldIncludeLink","previousShouldIncludeLink","prevShouldShowLinkProPopup","appStoreButton","googlePlayButton","getConversionEventId","getAlpsTestSuccessDynamicContent","isAffiliate","linkProTrialSuccessDynamicContent","useSuccessDynamicContent","isAlpsTest","Success","conversionEventId","subheader","background_image","desktop_background_image","headerText","subheaderText","mobileBackgroundImage","desktopBackgroundImage","useLandingPageComponent","getShouldShowHeroImage","displayLocation","transitionStage","onAnimationEnd","isPaymentPage","routePrefixes","LandingPageComponent","RouterRoutes","Wrapper","doesRequireOffer","doesRequireRefreshToken","TransitionContext","TransitionProvider","useTransitionContext","Mask","useIdentifyUser","Carat","rotationAmount","getMailToLink","Footer","AlpsNextFooter","ConditionalFooterManager","isSuccessPage","useModalComponent","useModalProps","preventDefaultForScrollKeys","enableScroll","useDisableScrolling","shouldDisable","Modal","ModalComponent","modalProps","closeModal","CookieConsent","setIsOpen","useSubheader","scrollToSkillestGiveaway","headerHeight","elementPosition","PreOrderButton","loopingVideoSectionRef","isSmartLaser","handlePreOrderClick","Subheader","PartnerHeader","TitleistHeader","ArccosLogo","PlusIcon","textColor","Header","lightmode","CrownLockup","PingLogo","CobraLogo","TaylorMadeLogo","CallawayLogo","ClevelandLogo","EASportsLogo","ClubChampLogo","GolfweekLogo","MMGLogo","SkillestLogo","GBCLogo","PARTNER_LOGOS","PartnerLogo","LogoComponent","useHasPartnerLogo","AlpsNextHeader","isScrolled","setIsScrolled","hasPartnerLogo","ConditionalHeaderManager","isOnPaymentPage","Main","setDisplayLocation","setTransitionStage","disableAnimations","handleAnimationEnd","ErrorBoundaryContext","_this$props$onReset","_this$props","_this$props$onError","_this$props2","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","fallbackRender","FallbackComponent","childToRender","resetBoundary","ReactErrorBoundary","resetErrorBoundary","createSyncStoragePersister","throttleTime","serialize","deserialize","trySave","persistedClient","errorCount","cacheString","cacheEventTypes","isCacheEventType","persistQueryClientRestore","persister","maxAge","buster","hydrateOptions","expired","busted","persistQueryClientSave","dehydrateOptions","persistClient","persistQueryClientSubscribe","unsubscribeQueryCache","unsubscribeMutationCache","persistQueryClient","hasUnsubscribed","persistQueryClientUnsubscribe","restorePromise","queryClientConfig","localStoragePersister","App","_events","addEventBusToWindow","replayEvents","doHydrateRoot","updateVisibility"],"mappings":"g3FAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaG,UAAW,CAMZ,OAAO,+BAAmC,KAC1C,OAAO,+BAA+B,6BACpC,YAEF,+BAA+B,4BAA4B,IAAI,KAAO,EAE9D,IAAIA,EAAe,SAMzBC,EAAqB,OAAO,IAAI,eAAe,EAC/CC,EAAoB,OAAO,IAAI,cAAc,EAC7CC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAqB,OAAO,IAAI,eAAe,EAC/CC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAA2B,OAAO,IAAI,qBAAqB,EAC3DC,EAAkB,OAAO,IAAI,YAAY,EACzCC,EAAkB,OAAO,IAAI,YAAY,EACzCC,EAAuB,OAAO,IAAI,iBAAiB,EACnDC,EAAwB,OAAO,SAC/BC,EAAuB,aAC3B,SAASC,EAAcC,EAAe,CACpC,GAAIA,IAAkB,MAAQ,OAAOA,GAAkB,SACrD,OAAO,KAGT,IAAIC,EAAgBJ,GAAyBG,EAAcH,CAAqB,GAAKG,EAAcF,CAAoB,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G,UACH,GAAG,aACH,GAAG,WACH,GAAG,UACH,GAAG,UACH,GAAG,SACH,GAAG,QACH,GAAG,UACH,GAAG,SACH,GAAG,kCACH,GAAG,mCACH,GAAG,yBACH,GAAG,WACH,GAAG,gBACH,GAAG,SACH,GAAG,iCACH,GAAG,oBACH,GAAG,WACH,GAAG,eACH,GAAG,UACH,GAAG,WACH,GAAG,WACH,GAAG,SACH,GAAG,aACH,GAAG,iBACH,GAAG,2BACH,GAAG,OACH,GAAG,QACH,GAAG,QACH,GAAG,mBACH,GAAG,0BACH,GAAG,WACH,GAAG,UACH,GAAG,QACH,GAAG,wCACH,GAAG,eACH,GAAG,aACH,GAAG,gBACH,GAAG,UACH,GAAG,OACH,GAAG,UACH,GAAG,SACH,GAAG,iBACH,GAAG,UACH,GAAG,WACH,GAAG,WACH,GAAG,qBACH,GAAG,UACH,GAAG,QACH,GAAG,cACH,GAAG,oBACH,GAAG,UACH,GAAG,UACH,GAAG,WACH,GAAG,8BACH,GAAG,gBACH,GAAG,OACH,GAAG,UACH,GAAG,SACH,GAAG,gBACH,GAAG,mBACH,GAAG,8BACH,GAAG,QACH,GAAG,SACH,GAAG,UACH,GAAG,UACH,GAAG,QACH,GAAG,YACH,GAAG,SACH,GAAG,YACH,GAAG,UACH,GAAG,aACH,GAAG,OACH,GAAG,YACH,GAAG,WACH,GAAG,SACH,GAAG,gBACH,GAAG,SACH,GAAG,QACH,GAAG,oCACH,GAAG,gCACH,GAAG,WACH,GAAG,YACH,GAAG,UACH,GAAG,UACH,GAAG,QACH,GAAG,YACH,GAAG,4BACH,GAAG,OACH,GAAG,UACH,GAAG,cACH,GAAG,SACH,GAAG,QACH,GAAG,UACH,GAAG,QACH,GAAG,SACH,GAAG,SACH,GAAG,aACH,GAAG,QACH,GAAG,WACH,GAAG,qBACH,GAAG,SACH,GAAG,aACH,GAAG,mCACH,GAAG,SACH,GAAG,UACH,GAAG,UACH,GAAG,UACH,GAAG,QACH,GAAG,gBACH,GAAG,YACH,GAAG,aACH,GAAG,QACH,GAAG,6CACH,GAAG,aACH,GAAG,SACH,GAAG,WACH,GAAG,WACH,GAAG,OACH,GAAG,QACH,GAAG,mBACH,GAAG,aACH,GAAG,aACH,GAAG,YACH,GAAG,UACH,GAAG,SACH,GAAG,kCACH,GAAG,uBACH,GAAG,SACH,GAAG,WACH,GAAG,aACH,GAAG,aACH,GAAG,UACH,GAAG,aACH,GAAG,UACH,GAAG,UACH,GAAG,QACH,GAAG,QACH,GAAG,cACH,GAAG,gBACH,GAAG,cACH,GAAG,YACH,GAAG,QACH,GAAG,UACH,GAAG,OACH,GAAG,iBACH,GAAG,2BACH,GAAG,SACH,GAAG,OACH,GAAG,WACH,GAAG,QACH,GAAG,kCACH,GAAG,SACH,GAAG,mBACH,GAAG,WACH,GAAG,OACH,GAAG,cACH,GAAG,WACH,GAAG,SACH,GAAG,WACH,GAAG,QACH,GAAG,UACH,GAAG,UACH,GAAG,qBACH,GAAG,SACH,GAAG,mBACH,GAAG,+CACH,GAAG,wBACH,GAAG,cACH,GAAG,6BACH,GAAG,4BACH,GAAG,mCACH,GAAG,QACH,GAAG,aACH,GAAG,wBACH,GAAG,eACH,GAAG,UACH,GAAG,SACH,GAAG,aACH,GAAG,eACH,GAAG,YACH,GAAG,4BACH,GAAG,WACH,GAAG,WACH,GAAG,kBACH,GAAG,UACH,GAAG,eACH,GAAG,+CACH,GAAG,cACH,GAAG,QACH,GAAG,YACH,GAAG,QACH,GAAG,WACH,GAAG,yBACH,GAAG,YACH,GAAG,SACH,GAAG,cACH,GAAG,uBACH,GAAG,4BACH,GAAG,aACH,GAAG,+BACH,GAAG,WACH,GAAG,cACH,GAAG,OACH,GAAG,UACH,GAAG,QACH,GAAG,sBACH,GAAG,UACH,GAAG,SACH,GAAG,eACH,GAAG,2BACH,GAAG,SACH,GAAG,SACH,GAAG,UACH,GAAG,uBACH,GAAG,iBACH,GAAG,gBACH,GAAG,uCACH,GAAG,UACH,GAAG,aACH,GAAG,UACH,GAAG,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AASlC,CAAK,CAAC,CAClD,EACA,OAAQ,CAAC+gJ,EAAgCqlM,IAA2B,CAChE/+T,GAAW,KAAK05H,CAAE,EAEdqlM,GAEAF,GAAQ,QAAQlmV,GAAS+gJ,EAAG/gJ,CAAK,CAAC,CAE1C,CAAA,EAGJ,QAAQ,MAAM,2EAA2E,CAEjG,EC1DAw5P,IAAA,EACA2sF,IAAA,EAEA,MAAME,IAAgB,IAAM,CACxB35Q,GACI,SAAS,eAAe,KAAK,EAC7BpgF,EAAA,cAACggM,IAAA,KACGhgM,EAAA,cAAC25V,IAAA,IAAG,CACR,CAAA,CAER,EAEAI,IAAA,EAEA,MAAMC,GAAmB,IAAM,SAAS,KAAK,MAAM,WAAa,UAEhE,SAAS,aAAe,eAAiB,SAAS,aAAe,WAC7DA,GAAA,EACA,OAAO,iBAAiB,mBAAoB,IAAMA,GAAA,CAAkB","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,19,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,476,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,572,602,603,604,605,606,607,608,609,610,611,612,613,652,654,655,656]}