{"version":3,"sources":["/Users/elliotsutton/Documents/Skyleen/npm-package/bprogress/packages/react/dist/index.cjs","../src/index.tsx","../src/providers/progress-provider.tsx","../src/hooks/use-anchor-progress.tsx","../src/components/progress.tsx","../src/utils/classnames.ts","../src/components/bar.tsx","../src/components/peg.tsx","../src/components/spinner.tsx","../src/components/spinner-icon.tsx","../src/components/indeterminate.tsx","../src/utils/with-suspense.tsx","../src/utils/with-memo.tsx"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","index_exports","Bar","Indeterminate","Peg","Progress","ProgressProvider","Spinner","SpinnerIcon","useAnchorProgress","useProgress","withMemo","withSuspense","module","exports","import_core","require","import_react","ProgressContext","createContext","context","useContext","Error","children","color","height","options","spinnerPosition","style","disableStyle","nonce","shallowRouting","disableSameURL","startPosition","delay","stopDelay","timer","useRef","isAutoStopDisabled","disableAutoStop","useCallback","current","enableAutoStop","start","autoStopDisabled","setTimeout","BProgress","set","stop","forcedStopDelay","clearTimeout","isStarted","done","inc","amount","dec","n","pause","resume","getOptions","settings","setOptions","newOptions","currentOptions","updates","nextOptions","configure","styles","useMemo","React","createElement","css","Provider","targetPreprocessor","disableAnchorClick","startOnLoad","deps","elementsWithAttachedHandlers","import_react2","timerRef","useEffect","handleAnchorClick","event","defaultPrevented","anchorElement","currentTarget","hasAttribute","preventProgress","getAttribute","element","tagName","toLowerCase","parentElement","anchorTarget","import_core2","getAnchorProperty","metaKey","ctrlKey","shiftKey","altKey","targetHref","targetUrl","URL","currentUrl","location","href","isSameURLWithoutSearch","isSameURL","handleMutation","anchorElements","Array","document","querySelectorAll","validAnchorElements","filter","anchor","isBProgressDisabled","isNotTelOrMailto","startsWith","forEach","addEventListener","mutationObserver","MutationObserver","observe","childList","subtree","originalWindowHistoryPushState","window","history","pushState","Proxy","apply","thisArg","argArray","disconnect","removeEventListener","classNames","classes","Boolean","join","BarInner","ref","as","className","classSelector","rest","Component","import_react3","forwardRef","PegInner","import_react4","SpinnerInner","import_react5","SpinnerIconInner","import_react6","ProgressInner","import_react7","display","Fragment","IndeterminateInner","import_react8","WithSuspenseComponent","props","import_react9","Suspense","shallowCompareProps","prevProps","nextProps","ignoreKeys","prevKeys","keys","includes","nextKeys","length","import_react10","memo","shouldCompareComplexProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCpB,UAAUkB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOnB,iBAAiBiB,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWZ,kBAAkBe,0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A;IACAC,eAAAA;IACAC,KAAAA;IACAC,UAAAA;IACAC,kBAAAA;IACAC,SAAAA;IACAC,aAAAA;IACAC,mBAAAA;IACAC,aAAAA;IACAC,UAAAA;IACAC,cAAAA;AACF,CAAA","sourcesContent":["var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.tsx\nvar index_exports = {};\n__export(index_exports, {\n  Bar: () => Bar,\n  Indeterminate: () => Indeterminate,\n  Peg: () => Peg,\n  Progress: () => Progress,\n  ProgressProvider: () => ProgressProvider,\n  Spinner: () => Spinner,\n  SpinnerIcon: () => SpinnerIcon,\n  useAnchorProgress: () => useAnchorProgress,\n  useProgress: () => useProgress,\n  withMemo: () => withMemo,\n  withSuspense: () => withSuspense\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/providers/progress-provider.tsx\nvar import_core = require(\"@bprogress/core\");\nvar import_react = __toESM(require(\"react\"), 1);\nvar ProgressContext = (0, import_react.createContext)(\n  void 0\n);\nvar useProgress = () => {\n  const context = (0, import_react.useContext)(ProgressContext);\n  if (!context) {\n    throw new Error(\"useProgress must be used within a ProgressProvider\");\n  }\n  return context;\n};\nvar ProgressProvider = ({\n  children,\n  color = \"#0A2FFF\",\n  height = \"2px\",\n  options,\n  spinnerPosition = \"top-right\",\n  style,\n  disableStyle = false,\n  nonce,\n  shallowRouting = false,\n  disableSameURL = true,\n  startPosition = 0,\n  delay = 0,\n  stopDelay = 0\n}) => {\n  const timer = (0, import_react.useRef)(null);\n  const isAutoStopDisabled = (0, import_react.useRef)(false);\n  const disableAutoStop = (0, import_react.useCallback)(\n    () => isAutoStopDisabled.current = true,\n    []\n  );\n  const enableAutoStop = (0, import_react.useCallback)(\n    () => isAutoStopDisabled.current = false,\n    []\n  );\n  const start = (0, import_react.useCallback)(\n    (startPosition2 = 0, delay2 = 0, autoStopDisabled = false) => {\n      if (autoStopDisabled) disableAutoStop();\n      timer.current = setTimeout(() => {\n        if (startPosition2 > 0) import_core.BProgress.set(startPosition2);\n        import_core.BProgress.start();\n      }, delay2);\n    },\n    [disableAutoStop]\n  );\n  const stop = (0, import_react.useCallback)(\n    (stopDelay2 = 0, forcedStopDelay = 0) => {\n      setTimeout(() => {\n        if (timer.current) clearTimeout(timer.current);\n        timer.current = setTimeout(() => {\n          if (!import_core.BProgress.isStarted()) return;\n          import_core.BProgress.done();\n          if (isAutoStopDisabled.current) enableAutoStop();\n        }, stopDelay2);\n      }, forcedStopDelay);\n    },\n    [enableAutoStop]\n  );\n  const inc = (0, import_react.useCallback)((amount) => import_core.BProgress.inc(amount), []);\n  const dec = (0, import_react.useCallback)((amount) => import_core.BProgress.dec(amount), []);\n  const set = (0, import_react.useCallback)((n) => import_core.BProgress.set(n), []);\n  const pause = (0, import_react.useCallback)(() => import_core.BProgress.pause(), []);\n  const resume = (0, import_react.useCallback)(() => import_core.BProgress.resume(), []);\n  const getOptions = (0, import_react.useCallback)(() => import_core.BProgress.settings, []);\n  const setOptions = (0, import_react.useCallback)(\n    (newOptions) => {\n      const currentOptions = getOptions();\n      const updates = typeof newOptions === \"function\" ? newOptions(currentOptions) : newOptions;\n      const nextOptions = { ...currentOptions, ...updates };\n      import_core.BProgress.configure(nextOptions);\n    },\n    [getOptions]\n  );\n  const styles = (0, import_react.useMemo)(\n    () => /* @__PURE__ */ import_react.default.createElement(\"style\", { nonce }, style || (0, import_core.css)({\n      color,\n      height,\n      spinnerPosition\n    })),\n    [color, height, nonce, spinnerPosition, style]\n  );\n  import_core.BProgress.configure(options || {});\n  return /* @__PURE__ */ import_react.default.createElement(\n    ProgressContext.Provider,\n    {\n      value: {\n        start,\n        stop,\n        inc,\n        dec,\n        set,\n        pause,\n        resume,\n        setOptions,\n        getOptions,\n        isAutoStopDisabled,\n        disableAutoStop,\n        enableAutoStop,\n        shallowRouting,\n        disableSameURL,\n        startPosition,\n        delay,\n        stopDelay\n      }\n    },\n    !disableStyle ? styles : null,\n    children\n  );\n};\n\n// src/hooks/use-anchor-progress.tsx\nvar import_react2 = require(\"react\");\nvar import_core2 = require(\"@bprogress/core\");\nfunction useAnchorProgress({\n  shallowRouting = false,\n  disableSameURL = true,\n  startPosition = 0,\n  delay = 0,\n  stopDelay = 0,\n  targetPreprocessor,\n  disableAnchorClick = false,\n  startOnLoad = false,\n  forcedStopDelay = 0\n}, deps = []) {\n  const elementsWithAttachedHandlers = (0, import_react2.useRef)([]);\n  const timerRef = (0, import_react2.useRef)(null);\n  const { start, stop, isAutoStopDisabled } = useProgress();\n  (0, import_react2.useEffect)(() => {\n    if (startOnLoad) start(startPosition, delay);\n  }, []);\n  (0, import_react2.useEffect)(() => {\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => {\n      if (!isAutoStopDisabled.current) stop();\n    }, stopDelay);\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, deps);\n  (0, import_react2.useEffect)(() => {\n    if (disableAnchorClick) return;\n    const handleAnchorClick = (event) => {\n      if (event.defaultPrevented) return;\n      const anchorElement = event.currentTarget;\n      if (anchorElement.hasAttribute(\"download\")) return;\n      const target = event.target;\n      let preventProgress = target?.getAttribute(\"data-prevent-progress\") === \"true\" || anchorElement?.getAttribute(\"data-prevent-progress\") === \"true\";\n      if (!preventProgress) {\n        let element = target;\n        while (element && element.tagName.toLowerCase() !== \"a\") {\n          if (element.parentElement?.getAttribute(\"data-prevent-progress\") === \"true\") {\n            preventProgress = true;\n            break;\n          }\n          element = element.parentElement;\n        }\n      }\n      if (preventProgress) return;\n      const anchorTarget = (0, import_core2.getAnchorProperty)(anchorElement, \"target\");\n      if (anchorTarget === \"_blank\") return;\n      if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n        return;\n      const targetHref = (0, import_core2.getAnchorProperty)(anchorElement, \"href\");\n      const targetUrl = targetPreprocessor ? targetPreprocessor(new URL(targetHref)) : new URL(targetHref);\n      const currentUrl = new URL(location.href);\n      if (shallowRouting && (0, import_core2.isSameURLWithoutSearch)(targetUrl, currentUrl) && disableSameURL)\n        return;\n      if ((0, import_core2.isSameURL)(targetUrl, currentUrl) && disableSameURL) return;\n      start(startPosition, delay);\n    };\n    const handleMutation = () => {\n      const anchorElements = Array.from(document.querySelectorAll(\"a\"));\n      const validAnchorElements = anchorElements.filter((anchor) => {\n        const href = (0, import_core2.getAnchorProperty)(anchor, \"href\");\n        const isBProgressDisabled = anchor.getAttribute(\"data-disable-progress\") === \"true\";\n        const isNotTelOrMailto = href && !href.startsWith(\"tel:\") && !href.startsWith(\"mailto:\") && !href.startsWith(\"blob:\") && !href.startsWith(\"javascript:\");\n        return !isBProgressDisabled && isNotTelOrMailto && (0, import_core2.getAnchorProperty)(anchor, \"target\") !== \"_blank\";\n      });\n      validAnchorElements.forEach((anchor) => {\n        anchor.addEventListener(\"click\", handleAnchorClick, true);\n      });\n      elementsWithAttachedHandlers.current = validAnchorElements;\n    };\n    const mutationObserver = new MutationObserver(handleMutation);\n    mutationObserver.observe(document, { childList: true, subtree: true });\n    const originalWindowHistoryPushState = window.history.pushState;\n    window.history.pushState = new Proxy(window.history.pushState, {\n      apply: (target, thisArg, argArray) => {\n        if (!isAutoStopDisabled.current) stop(stopDelay, forcedStopDelay);\n        return target.apply(thisArg, argArray);\n      }\n    });\n    return () => {\n      mutationObserver.disconnect();\n      elementsWithAttachedHandlers.current.forEach((anchor) => {\n        anchor.removeEventListener(\"click\", handleAnchorClick, true);\n      });\n      elementsWithAttachedHandlers.current = [];\n      window.history.pushState = originalWindowHistoryPushState;\n    };\n  }, [\n    disableAnchorClick,\n    targetPreprocessor,\n    shallowRouting,\n    disableSameURL,\n    delay,\n    stopDelay,\n    startPosition,\n    start,\n    stop,\n    forcedStopDelay,\n    isAutoStopDisabled\n  ]);\n}\n\n// src/components/progress.tsx\nvar import_react7 = __toESM(require(\"react\"), 1);\n\n// src/utils/classnames.ts\nfunction classNames(...classes) {\n  return classes.filter(Boolean).join(\" \");\n}\n\n// src/components/bar.tsx\nvar import_react3 = __toESM(require(\"react\"), 1);\nfunction BarInner({ as, children, className, classSelector = \"bar\", ...rest }, ref) {\n  const Component = as ?? \"div\";\n  return import_react3.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...rest\n    },\n    children\n  );\n}\nvar Bar = import_react3.default.forwardRef(BarInner);\n\n// src/components/peg.tsx\nvar import_react4 = __toESM(require(\"react\"), 1);\nfunction PegInner({ as, children, className, classSelector = \"peg\", ...rest }, ref) {\n  const Component = as ?? \"div\";\n  return import_react4.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...rest\n    },\n    children\n  );\n}\nvar Peg = import_react4.default.forwardRef(PegInner);\n\n// src/components/spinner.tsx\nvar import_react5 = __toESM(require(\"react\"), 1);\nfunction SpinnerInner({\n  as,\n  children,\n  className,\n  classSelector = \"spinner\",\n  ...rest\n}, ref) {\n  const Component = as ?? \"div\";\n  return import_react5.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...rest\n    },\n    children\n  );\n}\nvar Spinner = import_react5.default.forwardRef(SpinnerInner);\n\n// src/components/spinner-icon.tsx\nvar import_react6 = __toESM(require(\"react\"), 1);\nfunction SpinnerIconInner({\n  as,\n  children,\n  className,\n  classSelector = \"spinner-icon\",\n  ...rest\n}, ref) {\n  const Component = as ?? \"div\";\n  return import_react6.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...rest\n    },\n    children\n  );\n}\nvar SpinnerIcon = import_react6.default.forwardRef(SpinnerIconInner);\n\n// src/components/progress.tsx\nfunction ProgressInner({ as, children, className, style, ...rest }, ref) {\n  const Component = as ?? \"div\";\n  return import_react7.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(\"bprogress\", className),\n      style: { ...style, display: \"none\" },\n      ...rest\n    },\n    children || /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(Bar, null, /* @__PURE__ */ import_react7.default.createElement(Peg, null)), /* @__PURE__ */ import_react7.default.createElement(Spinner, null, /* @__PURE__ */ import_react7.default.createElement(SpinnerIcon, null)))\n  );\n}\nvar Progress = import_react7.default.forwardRef(ProgressInner);\n\n// src/components/indeterminate.tsx\nvar import_react8 = __toESM(require(\"react\"), 1);\nfunction IndeterminateInner({\n  as,\n  className,\n  classSelector = \"indeterminate\",\n  ...rest\n}, ref) {\n  const Component = as ?? \"div\";\n  return import_react8.default.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...rest\n    },\n    import_react8.default.createElement(\"div\", { className: \"inc\" }),\n    import_react8.default.createElement(\"div\", { className: \"dec\" })\n  );\n}\nvar Indeterminate = import_react8.default.forwardRef(IndeterminateInner);\n\n// src/utils/with-suspense.tsx\nvar import_react9 = __toESM(require(\"react\"), 1);\nfunction withSuspense(Component) {\n  return function WithSuspenseComponent(props) {\n    return /* @__PURE__ */ import_react9.default.createElement(import_react9.Suspense, null, /* @__PURE__ */ import_react9.default.createElement(Component, { ...props }));\n  };\n}\n\n// src/utils/with-memo.tsx\nvar import_react10 = require(\"react\");\nfunction shallowCompareProps(prevProps, nextProps, ignoreKeys = []) {\n  const prevKeys = Object.keys(prevProps).filter(\n    (key) => !ignoreKeys.includes(key)\n  );\n  const nextKeys = Object.keys(nextProps).filter(\n    (key) => !ignoreKeys.includes(key)\n  );\n  if (prevKeys.length !== nextKeys.length) {\n    return false;\n  }\n  for (const key of prevKeys) {\n    if (prevProps[key] !== nextProps[key]) {\n      return false;\n    }\n  }\n  return true;\n}\nfunction withMemo(Component, ignoreKeys = [\"memo\", \"shouldCompareComplexProps\"]) {\n  return (0, import_react10.memo)(Component, (prevProps, nextProps) => {\n    if (nextProps.memo === false) return false;\n    if (!nextProps.shouldCompareComplexProps) return true;\n    return shallowCompareProps(prevProps, nextProps, ignoreKeys);\n  });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  Bar,\n  Indeterminate,\n  Peg,\n  Progress,\n  ProgressProvider,\n  Spinner,\n  SpinnerIcon,\n  useAnchorProgress,\n  useProgress,\n  withMemo,\n  withSuspense\n});\n","export * from './providers/progress-provider';\nexport * from './hooks/use-anchor-progress';\nexport * from './components';\nexport * from './utils';\nexport type * from './types';\nexport type { BProgressOptions, SpinnerPosition } from '@bprogress/core';\n","import { BProgress, css, type BProgressOptions } from '@bprogress/core';\nimport React, {\n  createContext,\n  useCallback,\n  useContext,\n  useMemo,\n  useRef,\n} from 'react';\nimport type { ProgressProviderProps, ProgressContextValue } from '../types';\n\nconst ProgressContext = createContext<ProgressContextValue | undefined>(\n  undefined,\n);\n\nexport const useProgress = (): ProgressContextValue => {\n  const context = useContext(ProgressContext);\n  if (!context) {\n    throw new Error('useProgress must be used within a ProgressProvider');\n  }\n  return context;\n};\n\nexport const ProgressProvider = ({\n  children,\n  color = '#0A2FFF',\n  height = '2px',\n  options,\n  spinnerPosition = 'top-right',\n  style,\n  disableStyle = false,\n  nonce,\n  shallowRouting = false,\n  disableSameURL = true,\n  startPosition = 0,\n  delay = 0,\n  stopDelay = 0,\n}: ProgressProviderProps) => {\n  const timer = useRef<NodeJS.Timeout | null>(null);\n  const isAutoStopDisabled = useRef(false);\n\n  const disableAutoStop = useCallback(\n    () => (isAutoStopDisabled.current = true),\n    [],\n  );\n  const enableAutoStop = useCallback(\n    () => (isAutoStopDisabled.current = false),\n    [],\n  );\n  const start = useCallback(\n    (startPosition = 0, delay = 0, autoStopDisabled = false) => {\n      if (autoStopDisabled) disableAutoStop();\n      timer.current = setTimeout(() => {\n        if (startPosition > 0) BProgress.set(startPosition);\n        BProgress.start();\n      }, delay);\n    },\n    [disableAutoStop],\n  );\n\n  const stop = useCallback(\n    (stopDelay = 0, forcedStopDelay = 0) => {\n      setTimeout(() => {\n        if (timer.current) clearTimeout(timer.current);\n        timer.current = setTimeout(() => {\n          if (!BProgress.isStarted()) return;\n          BProgress.done();\n          if (isAutoStopDisabled.current) enableAutoStop();\n        }, stopDelay);\n      }, forcedStopDelay);\n    },\n    [enableAutoStop],\n  );\n\n  const inc = useCallback((amount?: number) => BProgress.inc(amount), []);\n\n  const dec = useCallback((amount?: number) => BProgress.dec(amount), []);\n\n  const set = useCallback((n: number) => BProgress.set(n), []);\n\n  const pause = useCallback(() => BProgress.pause(), []);\n\n  const resume = useCallback(() => BProgress.resume(), []);\n\n  const getOptions = useCallback(() => BProgress.settings, []);\n\n  const setOptions = useCallback(\n    (\n      newOptions:\n        | Partial<BProgressOptions>\n        | ((prevOptions: BProgressOptions) => Partial<BProgressOptions>),\n    ) => {\n      const currentOptions = getOptions();\n      const updates =\n        typeof newOptions === 'function'\n          ? newOptions(currentOptions)\n          : newOptions;\n      const nextOptions = { ...currentOptions, ...updates };\n      BProgress.configure(nextOptions);\n    },\n    [getOptions],\n  );\n\n  const styles = useMemo(\n    () => (\n      <style nonce={nonce}>\n        {style ||\n          css({\n            color,\n            height,\n            spinnerPosition,\n          })}\n      </style>\n    ),\n    [color, height, nonce, spinnerPosition, style],\n  );\n\n  BProgress.configure(options || {});\n\n  return (\n    <ProgressContext.Provider\n      value={{\n        start,\n        stop,\n        inc,\n        dec,\n        set,\n        pause,\n        resume,\n        setOptions,\n        getOptions,\n        isAutoStopDisabled,\n        disableAutoStop,\n        enableAutoStop,\n        shallowRouting,\n        disableSameURL,\n        startPosition,\n        delay,\n        stopDelay,\n      }}\n    >\n      {!disableStyle ? styles : null}\n      {children}\n    </ProgressContext.Provider>\n  );\n};\n","import { useEffect, useRef } from 'react';\nimport {\n  isSameURL,\n  isSameURLWithoutSearch,\n  getAnchorProperty,\n} from '@bprogress/core';\nimport { useProgress } from '../providers/progress-provider';\nimport type { UseAnchorProgressOptions } from '../types';\n\ntype PushStateInput = [\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  data: any,\n  unused: string,\n  url?: string | URL | null | undefined,\n];\n\nexport function useAnchorProgress(\n  {\n    shallowRouting = false,\n    disableSameURL = true,\n    startPosition = 0,\n    delay = 0,\n    stopDelay = 0,\n    targetPreprocessor,\n    disableAnchorClick = false,\n    startOnLoad = false,\n    forcedStopDelay = 0,\n  }: UseAnchorProgressOptions,\n  deps: unknown[] = [],\n) {\n  const elementsWithAttachedHandlers = useRef<\n    (HTMLAnchorElement | SVGAElement)[]\n  >([]);\n  const timerRef = useRef<NodeJS.Timeout | null>(null);\n\n  const { start, stop, isAutoStopDisabled } = useProgress();\n\n  useEffect(() => {\n    if (startOnLoad) start(startPosition, delay);\n    // We want to start the progress bar on load only once\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n\n  useEffect(() => {\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => {\n      if (!isAutoStopDisabled.current) stop();\n    }, stopDelay);\n\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, deps);\n\n  useEffect(() => {\n    if (disableAnchorClick) return;\n\n    const handleAnchorClick = (event: MouseEvent) => {\n      // Skip preventDefault\n      if (event.defaultPrevented) return;\n\n      const anchorElement = event.currentTarget as\n        | HTMLAnchorElement\n        | SVGAElement;\n\n      if (anchorElement.hasAttribute('download')) return;\n\n      const target = event.target as HTMLElement | Element;\n      let preventProgress =\n        target?.getAttribute('data-prevent-progress') === 'true' ||\n        anchorElement?.getAttribute('data-prevent-progress') === 'true';\n\n      if (!preventProgress) {\n        let element: HTMLElement | Element | null = target;\n\n        while (element && element.tagName.toLowerCase() !== 'a') {\n          if (\n            element.parentElement?.getAttribute('data-prevent-progress') ===\n            'true'\n          ) {\n            preventProgress = true;\n            break;\n          }\n          element = element.parentElement;\n        }\n      }\n\n      if (preventProgress) return;\n\n      const anchorTarget = getAnchorProperty(anchorElement, 'target');\n      // Skip anchors with target=\"_blank\"\n      if (anchorTarget === '_blank') return;\n\n      // Skip control/command/option/alt+click\n      if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)\n        return;\n\n      const targetHref = getAnchorProperty(anchorElement, 'href');\n      const targetUrl = targetPreprocessor\n        ? targetPreprocessor(new URL(targetHref))\n        : new URL(targetHref);\n      const currentUrl = new URL(location.href);\n\n      if (\n        shallowRouting &&\n        isSameURLWithoutSearch(targetUrl, currentUrl) &&\n        disableSameURL\n      )\n        return;\n      if (isSameURL(targetUrl, currentUrl) && disableSameURL) return;\n\n      start(startPosition, delay);\n    };\n\n    const handleMutation: MutationCallback = () => {\n      const anchorElements = Array.from(document.querySelectorAll('a')) as (\n        | HTMLAnchorElement\n        | SVGAElement\n      )[];\n\n      const validAnchorElements = anchorElements.filter((anchor) => {\n        const href = getAnchorProperty(anchor, 'href');\n        const isBProgressDisabled =\n          anchor.getAttribute('data-disable-progress') === 'true';\n        const isNotTelOrMailto =\n          href &&\n          !href.startsWith('tel:') &&\n          !href.startsWith('mailto:') &&\n          !href.startsWith('blob:') &&\n          !href.startsWith('javascript:');\n\n        return (\n          !isBProgressDisabled &&\n          isNotTelOrMailto &&\n          getAnchorProperty(anchor, 'target') !== '_blank'\n        );\n      });\n\n      validAnchorElements.forEach((anchor) => {\n        anchor.addEventListener('click', handleAnchorClick, true);\n      });\n      elementsWithAttachedHandlers.current = validAnchorElements;\n    };\n\n    const mutationObserver = new MutationObserver(handleMutation);\n    mutationObserver.observe(document, { childList: true, subtree: true });\n\n    const originalWindowHistoryPushState = window.history.pushState;\n    window.history.pushState = new Proxy(window.history.pushState, {\n      apply: (target, thisArg, argArray: PushStateInput) => {\n        if (!isAutoStopDisabled.current) stop(stopDelay, forcedStopDelay);\n        return target.apply(thisArg, argArray);\n      },\n    });\n\n    return () => {\n      mutationObserver.disconnect();\n      elementsWithAttachedHandlers.current.forEach((anchor) => {\n        anchor.removeEventListener('click', handleAnchorClick, true);\n      });\n      elementsWithAttachedHandlers.current = [];\n      window.history.pushState = originalWindowHistoryPushState;\n    };\n  }, [\n    disableAnchorClick,\n    targetPreprocessor,\n    shallowRouting,\n    disableSameURL,\n    delay,\n    stopDelay,\n    startPosition,\n    start,\n    stop,\n    forcedStopDelay,\n    isAutoStopDisabled,\n  ]);\n}\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\nimport { Bar } from './bar';\nimport { Peg } from './peg';\nimport { Spinner } from './spinner';\nimport { SpinnerIcon } from './spinner-icon';\n\nexport type ProgressProps<T extends React.ElementType = 'div'> = Omit<\n  ProgressComponentProps<T>,\n  'classSelector'\n>;\n\nfunction ProgressInner<T extends React.ElementType = 'div'>(\n  { as, children, className, style, ...rest }: ProgressProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames('bprogress', className),\n      style: { ...style, display: 'none' } as React.CSSProperties,\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    children || (\n      <>\n        <Bar>\n          <Peg />\n        </Bar>\n        <Spinner>\n          <SpinnerIcon />\n        </Spinner>\n      </>\n    ),\n  );\n}\n\nexport const Progress = React.forwardRef(ProgressInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: ProgressProps<T> & { ref?: React.ForwardedRef<React.ComponentRef<T>> },\n) => ReturnType<typeof ProgressInner>;\n","export function classNames(\n  ...classes: (string | undefined | null | false)[]\n): string {\n  return classes.filter(Boolean).join(' ');\n}\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\n\nexport type BarProps<T extends React.ElementType = 'div'> =\n  ProgressComponentProps<T>;\n\nfunction BarInner<T extends React.ElementType = 'div'>(\n  { as, children, className, classSelector = 'bar', ...rest }: BarProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    children,\n  );\n}\n\nexport const Bar = React.forwardRef(BarInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: BarProps<T> & { ref?: React.ForwardedRef<React.ComponentRef<T>> },\n) => ReturnType<typeof BarInner>;\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\n\nexport type PegProps<T extends React.ElementType = 'div'> = Omit<\n  ProgressComponentProps<T>,\n  'classSelector'\n> & {\n  classSelector?: string;\n};\n\nfunction PegInner<T extends React.ElementType = 'div'>(\n  { as, children, className, classSelector = 'peg', ...rest }: PegProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    children,\n  );\n}\n\nexport const Peg = React.forwardRef(PegInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: PegProps<T> & { ref?: React.ForwardedRef<React.ComponentRef<T>> },\n) => ReturnType<typeof PegInner>;\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\n\nexport type SpinnerProps<T extends React.ElementType = 'div'> =\n  ProgressComponentProps<T>;\n\nfunction SpinnerInner<T extends React.ElementType = 'div'>(\n  {\n    as,\n    children,\n    className,\n    classSelector = 'spinner',\n    ...rest\n  }: SpinnerProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    children,\n  );\n}\n\nexport const Spinner = React.forwardRef(SpinnerInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: SpinnerProps<T> & { ref?: React.ForwardedRef<React.ComponentRef<T>> },\n) => ReturnType<typeof SpinnerInner>;\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\n\nexport type SpinnerIconProps<T extends React.ElementType = 'div'> = Omit<\n  ProgressComponentProps<T>,\n  'classSelector'\n> & {\n  classSelector?: string;\n};\n\nfunction SpinnerIconInner<T extends React.ElementType = 'div'>(\n  {\n    as,\n    children,\n    className,\n    classSelector = 'spinner-icon',\n    ...rest\n  }: SpinnerIconProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    children,\n  );\n}\n\nexport const SpinnerIcon = React.forwardRef(SpinnerIconInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: SpinnerIconProps<T> & {\n    ref?: React.ForwardedRef<React.ComponentRef<T>>;\n  },\n) => ReturnType<typeof SpinnerIconInner>;\n","import React from 'react';\nimport type { ProgressComponentProps } from '../types';\nimport { classNames } from '../utils/classnames';\n\nexport type IndeterminateProps<T extends React.ElementType = 'div'> =\n  ProgressComponentProps<T> & { children?: never };\n\nfunction IndeterminateInner<T extends React.ElementType = 'div'>(\n  {\n    as,\n    className,\n    classSelector = 'indeterminate',\n    ...rest\n  }: IndeterminateProps<T>,\n  ref: React.ForwardedRef<React.ComponentRef<T>>,\n) {\n  const Component = as ?? ('div' as T);\n  return React.createElement(\n    Component,\n    {\n      ref,\n      className: classNames(classSelector, className),\n      ...(rest as React.ComponentPropsWithoutRef<T>),\n    },\n    React.createElement('div', { className: 'inc' }),\n    React.createElement('div', { className: 'dec' }),\n  );\n}\n\nexport const Indeterminate = React.forwardRef(IndeterminateInner) as <\n  T extends React.ElementType = 'div',\n>(\n  props: IndeterminateProps<T> & {\n    ref?: React.ForwardedRef<React.ComponentRef<T>>;\n  },\n) => ReturnType<typeof IndeterminateInner>;\n","import React, { ComponentType, Suspense } from 'react';\n\nexport function withSuspense<P extends object>(Component: ComponentType<P>) {\n  return function WithSuspenseComponent(props: P) {\n    return (\n      <Suspense>\n        <Component {...props} />\n      </Suspense>\n    );\n  };\n}\n","import React, { memo } from 'react';\n\nexport function shallowCompareProps<T extends object>(\n  prevProps: T,\n  nextProps: T,\n  ignoreKeys: string[] = [],\n): boolean {\n  const prevKeys = Object.keys(prevProps).filter(\n    (key) => !ignoreKeys.includes(key),\n  );\n  const nextKeys = Object.keys(nextProps).filter(\n    (key) => !ignoreKeys.includes(key),\n  );\n\n  if (prevKeys.length !== nextKeys.length) {\n    return false;\n  }\n\n  for (const key of prevKeys) {\n    if (prevProps[key as keyof T] !== nextProps[key as keyof T]) {\n      return false;\n    }\n  }\n  return true;\n}\n\nexport function withMemo<\n  P extends { memo?: boolean; shouldCompareComplexProps?: boolean },\n>(\n  Component: React.ComponentType<P>,\n  ignoreKeys: string[] = ['memo', 'shouldCompareComplexProps'],\n) {\n  return memo(Component, (prevProps, nextProps) => {\n    if (nextProps.memo === false) return false;\n    if (!nextProps.shouldCompareComplexProps) return true;\n    return shallowCompareProps(prevProps, nextProps, ignoreKeys);\n  });\n}\n"]}