{"version":3,"file":"js/vendors-_yarn___virtual___reach-utils-virtual-74f68e3a54_0_cache_reach-utils-npm-0_12_1-e1f5f-6f7acd.js?_t=7176a067129f4aaa2ca2","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACxpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://@mlssoccer/netcore/./.yarn/__virtual__/@reach-utils-virtual-74f68e3a54/0/cache/@reach-utils-npm-0.12.1-e1f5f6bcbb-2103c76ad5.zip/node_modules/@reach/utils/dist/utils.esm.js","webpack://@mlssoccer/netcore/./.yarn/cache/warning-npm-4.0.3-291e921d6d-e7842aff03.zip/node_modules/warning/warning.js"],"sourcesContent":["import * as React from 'react';\nimport { useLayoutEffect, useEffect, isValidElement, cloneElement, createContext, forwardRef, memo, useRef, useState, useCallback, useMemo } from 'react';\nimport fbWarning from 'warning';\n\n/* eslint-disable no-restricted-globals, eqeqeq  */\n/**\r\n * React currently throws a warning when using useLayoutEffect on the server.\r\n * To get around it, we can conditionally useEffect on the server (no-op) and\r\n * useLayoutEffect in the browser. We occasionally need useLayoutEffect to\r\n * ensure we don't get a render flash for certain operations, but we may also\r\n * need affected components to render on the server. One example is when setting\r\n * a component's descendants to retrieve their index values.\r\n *\r\n * Important to note that using this hook as an escape hatch will break the\r\n * eslint dependency warnings unless you rename the import to `useLayoutEffect`.\r\n * Use sparingly only when the effect won't effect the rendered HTML to avoid\r\n * any server/client mismatch.\r\n *\r\n * If a useLayoutEffect is needed and the result would create a mismatch, it's\r\n * likely that the component in question shouldn't be rendered on the server at\r\n * all, so a better approach would be to lazily render those in a parent\r\n * component after client-side hydration.\r\n *\r\n * TODO: We are calling useLayoutEffect in a couple of places that will likely\r\n * cause some issues for SSR users, whether the warning shows or not. Audit and\r\n * fix these.\r\n *\r\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\r\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\r\n *\r\n * @param effect\r\n * @param deps\r\n */\n\nvar useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM() ? useLayoutEffect : useEffect;\nvar checkedPkgs = {};\n/**\r\n * Copy of Facebook's warning package.\r\n *\r\n * Similar to invariant but only logs a warning if the condition is not met.\r\n * This can be used to log issues in development environments in critical paths.\r\n * Removing the logging code for production environments will keep the same\r\n * logic and follow the same code paths.\r\n *\r\n * @see https://github.com/BerkeleyTrue/warning/blob/master/warning.js\r\n */\n\nvar warning = fbWarning;\n/**\r\n * When in dev mode, checks that styles for a given @reach package are loaded.\r\n *\r\n * @param packageName Name of the package to check.\r\n * @example checkStyles(\"dialog\") will check for styles for @reach/dialog\r\n */\n\nvar checkStyles = noop;\n\nif (process.env.NODE_ENV !== \"production\") {\n  // In CJS files, process.env.NODE_ENV is stripped from our build, but we need\n  // it to prevent style checks from clogging up user logs while testing.\n  // This is a workaround until we can tweak the build a bit to accommodate.\n  var _ref = typeof process !== \"undefined\" ? process : {\n    env: {\n      NODE_ENV: \"development\"\n    }\n  },\n      env = _ref.env;\n\n  checkStyles = function checkStyles(packageName) {\n    // only check once per package\n    if (checkedPkgs[packageName]) return;\n    checkedPkgs[packageName] = true;\n\n    if (env.NODE_ENV !== \"test\" && parseInt(window.getComputedStyle(document.body).getPropertyValue(\"--reach-\" + packageName), 10) !== 1) {\n      console.warn(\"@reach/\" + packageName + \" styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\\n\\n    import \\\"@reach/\" + packageName + \"/styles.css\\\";\\n\\n  Otherwise you'll need to include them some other way:\\n\\n    <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"node_modules/@reach/\" + packageName + \"/styles.css\\\" />\\n\\n  For more information visit https://ui.reach.tech/styling.\\n  \");\n    }\n  };\n}\n/**\r\n * Ponyfill for the global object in some environments.\r\n *\r\n * @link https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\r\n */\n\nvar ponyfillGlobal = typeof window != \"undefined\" && window.Math == Math ? window : typeof self != \"undefined\" && self.Math == Math ? self :\n/*#__PURE__*/\n// eslint-disable-next-line no-new-func\nFunction(\"return this\")();\n/**\r\n * Passes or assigns an arbitrary value to a ref function or object.\r\n *\r\n * @param ref\r\n * @param value\r\n */\n\nfunction assignRef(ref, value) {\n  if (ref == null) return;\n\n  if (isFunction(ref)) {\n    ref(value);\n  } else {\n    try {\n      ref.current = value;\n    } catch (error) {\n      throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n    }\n  }\n}\n/**\r\n * Checks true|\"true\" vs false|\"false\"\r\n *\r\n * @param value\r\n */\n\nfunction boolOrBoolString(value) {\n  return value === \"true\" ? true : isBoolean(value) ? value : false;\n}\nfunction canUseDOM() {\n  return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n/**\r\n * Type-safe clone element\r\n *\r\n * @param element\r\n * @param props\r\n * @param children\r\n */\n\nfunction cloneValidElement(element, props) {\n  for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n    children[_key - 2] = arguments[_key];\n  }\n\n  return isValidElement(element) ? cloneElement.apply(React, [element, props].concat(children)) : element;\n}\nfunction createNamedContext(name, defaultValue) {\n  var Ctx = createContext(defaultValue);\n  Ctx.displayName = name;\n  return Ctx;\n}\n/**\r\n * This is a hack for sure. The thing is, getting a component to intelligently\r\n * infer props based on a component or JSX string passed into an `as` prop is\r\n * kind of a huge pain. Getting it to work and satisfy the constraints of\r\n * `forwardRef` seems dang near impossible. To avoid needing to do this awkward\r\n * type song-and-dance every time we want to forward a ref into a component\r\n * that accepts an `as` prop, we abstract all of that mess to this function for\r\n * the time time being.\r\n */\n\nfunction forwardRefWithAs(render) {\n  return forwardRef(render);\n}\nfunction memoWithAs(Component, propsAreEqual) {\n  return memo(Component, propsAreEqual);\n}\n/**\r\n * Get the size of the working document minus the scrollbar offset.\r\n *\r\n * @param element\r\n */\n\nfunction getDocumentDimensions(element) {\n  var _ownerDocument$docume, _ownerDocument$docume2;\n\n  var ownerDocument = getOwnerDocument(element);\n  var ownerWindow = ownerDocument.defaultView || window;\n\n  if (!ownerDocument) {\n    return {\n      width: 0,\n      height: 0\n    };\n  }\n\n  return {\n    width: (_ownerDocument$docume = ownerDocument.documentElement.clientWidth) !== null && _ownerDocument$docume !== void 0 ? _ownerDocument$docume : ownerWindow.innerWidth,\n    height: (_ownerDocument$docume2 = ownerDocument.documentElement.clientHeight) !== null && _ownerDocument$docume2 !== void 0 ? _ownerDocument$docume2 : ownerWindow.innerHeight\n  };\n}\n/**\r\n * Get the scoll position of the global window object relative to a given node.\r\n *\r\n * @param element\r\n */\n\nfunction getScrollPosition(element) {\n  var ownerDocument = getOwnerDocument(element);\n  var ownerWindow = ownerDocument.defaultView || window;\n\n  if (!ownerDocument) {\n    return {\n      scrollX: 0,\n      scrollY: 0\n    };\n  }\n\n  return {\n    scrollX: ownerWindow.scrollX,\n    scrollY: ownerWindow.scrollY\n  };\n}\n/**\r\n * Get a computed style value by property.\r\n *\r\n * @param element\r\n * @param styleProp\r\n */\n\nfunction getElementComputedStyle(element, styleProp) {\n  var ownerDocument = getOwnerDocument(element);\n  var ownerWindow = (ownerDocument === null || ownerDocument === void 0 ? void 0 : ownerDocument.defaultView) || window;\n\n  if (ownerWindow) {\n    return ownerWindow.getComputedStyle(element, null).getPropertyValue(styleProp);\n  }\n\n  return null;\n}\n/**\r\n * Get an element's owner document. Useful when components are used in iframes\r\n * or other environments like dev tools.\r\n *\r\n * @param element\r\n */\n\nfunction getOwnerDocument(element) {\n  return canUseDOM() ? element ? element.ownerDocument : document : null;\n}\n/**\r\n * TODO: Remove in 1.0\r\n */\n\nfunction getOwnerWindow(element) {\n  var ownerDocument = getOwnerDocument(element);\n  return ownerDocument ? ownerDocument.defaultView || window : null;\n}\n/**\r\n * Get the scrollbar offset distance.\r\n *\r\n * TODO: Remove in 1.0 (we used this in public examples)\r\n */\n\nfunction getScrollbarOffset() {\n  try {\n    if (window.innerWidth > document.documentElement.clientWidth) {\n      return window.innerWidth - document.documentElement.clientWidth;\n    }\n  } catch (err) {}\n\n  return 0;\n}\n/**\r\n * Checks whether or not a value is a boolean.\r\n *\r\n * @param value\r\n */\n\nfunction isBoolean(value) {\n  return typeof value === \"boolean\";\n}\n/**\r\n * Checks whether or not a value is a function.\r\n *\r\n * @param value\r\n */\n\nfunction isFunction(value) {\n  return !!(value && {}.toString.call(value) == \"[object Function]\");\n}\n/**\r\n * Checks whether or not a value is a number.\r\n *\r\n * @param value\r\n */\n\nfunction isNumber(value) {\n  return typeof value === \"number\" && !isNaN(value);\n}\n/**\r\n * Detects right clicks\r\n *\r\n * @param nativeEvent\r\n */\n\nfunction isRightClick(nativeEvent) {\n  return \"which\" in nativeEvent ? nativeEvent.which === 3 : \"button\" in nativeEvent ? nativeEvent.button === 2 : false;\n}\n/**\r\n * Checks whether or not a value is a string.\r\n *\r\n * @param value\r\n */\n\nfunction isString(value) {\n  return typeof value === \"string\";\n}\n/**\r\n * Joins strings to format IDs for compound components.\r\n *\r\n * @param args\r\n */\n\nfunction makeId() {\n  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    args[_key2] = arguments[_key2];\n  }\n\n  return args.filter(function (val) {\n    return val != null;\n  }).join(\"--\");\n}\n/**\r\n * No-op function.\r\n */\n\nfunction noop() {}\n/**\r\n * Convert our state strings for HTML data attributes.\r\n * No need for a fancy kebab-caser here, we know what our state strings are!\r\n *\r\n * @param state\r\n */\n\nfunction stateToAttributeString(state) {\n  return String(state).replace(/([\\s_]+)/g, \"-\").toLowerCase();\n}\n/**\r\n * Check if a component is controlled or uncontrolled and return the correct\r\n * state value and setter accordingly. If the component state is controlled by\r\n * the app, the setter is a noop.\r\n *\r\n * @param controlledValue\r\n * @param defaultValue\r\n */\n\nfunction useControlledState(controlledValue, defaultValue) {\n  var controlledRef = useRef(controlledValue != null);\n\n  var _React$useState = useState(defaultValue),\n      valueState = _React$useState[0],\n      setValue = _React$useState[1];\n\n  var set = useCallback(function (n) {\n    if (!controlledRef.current) {\n      setValue(n);\n    }\n  }, []);\n  return [controlledRef.current ? controlledValue : valueState, set];\n}\n/**\r\n * Logs a warning in dev mode when a component switches from controlled to\r\n * uncontrolled, or vice versa\r\n *\r\n * A single prop should typically be used to determine whether or not a\r\n * component is controlled or not.\r\n *\r\n * @param controlledValue\r\n * @param controlledPropName\r\n * @param componentName\r\n */\n\nvar useControlledSwitchWarning = noop;\n\nif (process.env.NODE_ENV !== \"production\") {\n  useControlledSwitchWarning = function useControlledSwitchWarning(controlledValue, controlledPropName, componentName) {\n    var controlledRef = useRef(controlledValue != null);\n    var nameCache = useRef({\n      componentName: componentName,\n      controlledPropName: controlledPropName\n    });\n    useEffect(function () {\n      nameCache.current = {\n        componentName: componentName,\n        controlledPropName: controlledPropName\n      };\n    }, [componentName, controlledPropName]);\n    useEffect(function () {\n      var wasControlled = controlledRef.current;\n      var _nameCache$current = nameCache.current,\n          componentName = _nameCache$current.componentName,\n          controlledPropName = _nameCache$current.controlledPropName;\n      var isControlled = controlledValue != null;\n\n      if (wasControlled !== isControlled) {\n        console.error(\"A component is changing an \" + (wasControlled ? \"\" : \"un\") + \"controlled `\" + controlledPropName + \"` state of \" + componentName + \" to be \" + (wasControlled ? \"un\" : \"\") + \"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 \" + componentName + \" element for the lifetime of the component.\\nMore info: https://fb.me/react-controlled-components\");\n      }\n    }, [controlledValue]);\n  };\n}\nvar useCheckStyles = noop;\n\nif (process.env.NODE_ENV !== \"production\") {\n  useCheckStyles = function useCheckStyles(pkg) {\n    var name = useRef(pkg);\n    useEffect(function () {\n      return void (name.current = pkg);\n    }, [pkg]);\n    useEffect(function () {\n      return checkStyles(name.current);\n    }, []);\n  };\n}\n/**\r\n * React hook for creating a value exactly once.\r\n * @see https://github.com/Andarist/use-constant\r\n */\n\nfunction useConstant(fn) {\n  var ref = useRef();\n\n  if (!ref.current) {\n    ref.current = {\n      v: fn()\n    };\n  }\n\n  return ref.current.v;\n}\n/**\r\n * @param callback\r\n */\n\nfunction useEventCallback(callback) {\n  var ref = useRef(callback);\n  useIsomorphicLayoutEffect(function () {\n    ref.current = callback;\n  });\n  return useCallback(function (event) {\n    for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n      args[_key3 - 1] = arguments[_key3];\n    }\n\n    return ref.current.apply(ref, [event].concat(args));\n  }, []);\n}\nfunction useLazyRef(fn) {\n  var ref = useRef({\n    __internalSet: true\n  });\n\n  if (ref.current && ref.current.__internalSet === true) {\n    ref.current = fn();\n  }\n\n  return ref;\n}\n/**\r\n * TODO: Remove in 1.0\r\n * @alias useStableCallback\r\n * @param callback\r\n */\n\nvar useCallbackProp = useStableCallback;\n/**\r\n * Adds a DOM event listener\r\n *\r\n * @param eventName\r\n * @param listener\r\n * @param element\r\n */\n\nfunction useEventListener(eventName, listener, element) {\n  if (element === void 0) {\n    element = window;\n  }\n\n  var savedHandler = useRef(listener);\n  useEffect(function () {\n    savedHandler.current = listener;\n  }, [listener]);\n  useEffect(function () {\n    var isSupported = element && element.addEventListener;\n\n    if (!isSupported) {\n      if (process.env.NODE_ENV !== \"production\") {\n        console.warn(\"Event listener not supported on the element provided\");\n      }\n\n      return;\n    }\n\n    function eventListener(event) {\n      savedHandler.current(event);\n    }\n\n    element.addEventListener(eventName, eventListener);\n    return function () {\n      element.removeEventListener(eventName, eventListener);\n    };\n  }, [eventName, element]);\n}\n/**\r\n * Detect when focus changes in our document.\r\n *\r\n * @param handleChange\r\n * @param when\r\n * @param ownerDocument\r\n */\n\nfunction useFocusChange(handleChange, when, ownerDocument) {\n  if (handleChange === void 0) {\n    handleChange = console.log;\n  }\n\n  if (when === void 0) {\n    when = \"focus\";\n  }\n\n  if (ownerDocument === void 0) {\n    ownerDocument = document;\n  }\n\n  var lastActiveElement = useRef(ownerDocument.activeElement);\n  useEffect(function () {\n    lastActiveElement.current = ownerDocument.activeElement;\n\n    function onChange(event) {\n      if (lastActiveElement.current !== ownerDocument.activeElement) {\n        handleChange(ownerDocument.activeElement, lastActiveElement.current, event);\n        lastActiveElement.current = ownerDocument.activeElement;\n      }\n    }\n\n    ownerDocument.addEventListener(when, onChange, true);\n    return function () {\n      ownerDocument.removeEventListener(when, onChange);\n    };\n  }, [when, handleChange, ownerDocument]);\n}\n/**\r\n * Forces a re-render, similar to `forceUpdate` in class components.\r\n */\n\nfunction useForceUpdate() {\n  var _React$useState2 = useState(Object.create(null)),\n      dispatch = _React$useState2[1];\n\n  return useCallback(function () {\n    dispatch(Object.create(null));\n  }, []);\n}\n/**\r\n * Passes or assigns a value to multiple refs (typically a DOM node). Useful for\r\n * dealing with components that need an explicit ref for DOM calculations but\r\n * also forwards refs assigned by an app.\r\n *\r\n * @param refs Refs to fork\r\n */\n\nfunction useForkedRef() {\n  for (var _len4 = arguments.length, refs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n    refs[_key4] = arguments[_key4];\n  }\n\n  return useMemo(function () {\n    if (refs.every(function (ref) {\n      return ref == null;\n    })) {\n      return null;\n    }\n\n    return function (node) {\n      refs.forEach(function (ref) {\n        assignRef(ref, node);\n      });\n    }; // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [].concat(refs));\n}\n/**\r\n * Returns the previous value of a reference after a component update.\r\n *\r\n * @param value\r\n */\n\nfunction usePrevious(value) {\n  var ref = useRef(null);\n  useEffect(function () {\n    ref.current = value;\n  }, [value]);\n  return ref.current;\n}\n/**\r\n * Converts a callback to a ref to avoid triggering re-renders when passed as a\r\n * prop and exposed as a stable function to avoid executing effects when\r\n * passed as a dependency.\r\n */\n\nfunction useStableCallback(callback) {\n  var callbackRef = useRef(callback);\n  useEffect(function () {\n    callbackRef.current = callback;\n  }); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  return useCallback(function () {\n    callbackRef.current && callbackRef.current.apply(callbackRef, arguments);\n  }, []);\n}\n/**\r\n * Call an effect after a component update, skipping the initial mount.\r\n *\r\n * @param effect Effect to call\r\n * @param deps Effect dependency list\r\n */\n\nfunction useUpdateEffect(effect, deps) {\n  var mounted = useRef(false);\n  useEffect(function () {\n    if (mounted.current) {\n      effect();\n    } else {\n      mounted.current = true;\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  }, deps);\n}\n/**\r\n * Just a lil state logger\r\n *\r\n * @param state\r\n * @param DEBUG\r\n */\n\nvar useStateLogger = noop;\n\nif (process.env.NODE_ENV !== \"production\") {\n  useStateLogger = function useStateLogger(state, DEBUG) {\n    if (DEBUG === void 0) {\n      DEBUG = false;\n    }\n\n    var debugRef = useRef(DEBUG);\n    useEffect(function () {\n      debugRef.current = DEBUG;\n    }, [DEBUG]);\n    useEffect(function () {\n      if (debugRef.current) {\n        console.group(\"State Updated\");\n        console.log(\"%c\" + state, \"font-weight: normal; font-size: 120%; font-style: italic;\");\n        console.groupEnd();\n      }\n    }, [state]);\n  };\n}\n/**\r\n * Wraps a lib-defined event handler and a user-defined event handler, returning\r\n * a single handler that allows a user to prevent lib-defined handlers from\r\n * firing.\r\n *\r\n * @param theirHandler User-supplied event handler\r\n * @param ourHandler Library-supplied event handler\r\n */\n\nfunction wrapEvent(theirHandler, ourHandler) {\n  return function (event) {\n    theirHandler && theirHandler(event);\n\n    if (!event.defaultPrevented) {\n      return ourHandler(event);\n    }\n  };\n}\n\nexport { assignRef, boolOrBoolString, canUseDOM, checkStyles, cloneValidElement, createNamedContext, forwardRefWithAs, getDocumentDimensions, getElementComputedStyle, getOwnerDocument, getOwnerWindow, getScrollPosition, getScrollbarOffset, isBoolean, isFunction, isNumber, isRightClick, isString, makeId, memoWithAs, noop, ponyfillGlobal, stateToAttributeString, useCallbackProp, useCheckStyles, useConstant, useControlledState, useControlledSwitchWarning, useEventCallback, useEventListener, useFocusChange, useForceUpdate, useForkedRef, useIsomorphicLayoutEffect, useLazyRef, usePrevious, useStableCallback, useStateLogger, useUpdateEffect, warning, wrapEvent };\n//# sourceMappingURL=utils.esm.js.map\n","/**\n * Copyright (c) 2014-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\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n  var printWarning = function printWarning(format, args) {\n    var len = arguments.length;\n    args = new Array(len > 1 ? len - 1 : 0);\n    for (var key = 1; key < len; key++) {\n      args[key - 1] = arguments[key];\n    }\n    var argIndex = 0;\n    var message = 'Warning: ' +\n      format.replace(/%s/g, function() {\n        return args[argIndex++];\n      });\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  warning = function(condition, format, args) {\n    var len = arguments.length;\n    args = new Array(len > 2 ? len - 2 : 0);\n    for (var key = 2; key < len; key++) {\n      args[key - 2] = arguments[key];\n    }\n    if (format === undefined) {\n      throw new Error(\n          '`warning(condition, format, ...args)` requires a warning ' +\n          'message argument'\n      );\n    }\n    if (!condition) {\n      printWarning.apply(null, [format].concat(args));\n    }\n  };\n}\n\nmodule.exports = warning;\n"],"names":[],"sourceRoot":""}