mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
28 KiB
JSON
1 line
28 KiB
JSON
{"ast":null,"code":"import { Router, __RouterContext, matchPath } from 'react-router';\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport { createBrowserHistory, createHashHistory, createLocation } from 'history';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport invariant from 'tiny-invariant';\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createBrowserHistory(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \"<BrowserRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : void 0;\n };\n}\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\n\nvar HashRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(HashRouter, _React$Component);\n\n function HashRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createHashHistory(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \"<HashRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : void 0;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\n\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? createLocation(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nvar LinkAnchor = forwardRef(function (_ref, forwardedRef) {\n var innerRef = _ref.innerRef,\n navigate = _ref.navigate,\n _onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, [\"innerRef\", \"navigate\", \"onClick\"]);\n\n var target = rest.target;\n\n var props = _extends({}, rest, {\n onClick: function onClick(event) {\n try {\n if (_onClick) _onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && ( // ignore everything but left clicks\n !target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n\n\n return React.createElement(\"a\", props);\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n/**\n * The public API for rendering a history-aware <a>.\n */\n\n\nvar Link = forwardRef(function (_ref2, forwardedRef) {\n var _ref2$component = _ref2.component,\n component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,\n replace = _ref2.replace,\n to = _ref2.to,\n innerRef = _ref2.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref2, [\"component\", \"replace\", \"to\", \"innerRef\"]);\n\n return React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use <Link> outside a <Router>\") : invariant(false) : void 0;\n var history = context.history;\n var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);\n var href = location ? history.createHref(location) : \"\";\n\n var props = _extends({}, rest, {\n href: href,\n navigate: function navigate() {\n var location = resolveToLocation(to, context.location);\n var method = replace ? history.replace : history.push;\n method(location);\n }\n }); // React 15 compat\n\n\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(component, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func]);\n var refType = PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.shape({\n current: PropTypes.any\n })]);\n Link.displayName = \"Link\";\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nvar forwardRefShim$1 = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef$1 = React.forwardRef;\n\nif (typeof forwardRef$1 === \"undefined\") {\n forwardRef$1 = forwardRefShim$1;\n}\n\nfunction joinClassnames() {\n for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {\n classnames[_key] = arguments[_key];\n }\n\n return classnames.filter(function (i) {\n return i;\n }).join(\" \");\n}\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\n\n\nvar NavLink = forwardRef$1(function (_ref, forwardedRef) {\n var _ref$ariaCurrent = _ref[\"aria-current\"],\n ariaCurrent = _ref$ariaCurrent === void 0 ? \"page\" : _ref$ariaCurrent,\n _ref$activeClassName = _ref.activeClassName,\n activeClassName = _ref$activeClassName === void 0 ? \"active\" : _ref$activeClassName,\n activeStyle = _ref.activeStyle,\n classNameProp = _ref.className,\n exact = _ref.exact,\n isActiveProp = _ref.isActive,\n locationProp = _ref.location,\n sensitive = _ref.sensitive,\n strict = _ref.strict,\n styleProp = _ref.style,\n to = _ref.to,\n innerRef = _ref.innerRef,\n rest = _objectWithoutPropertiesLoose(_ref, [\"aria-current\", \"activeClassName\", \"activeStyle\", \"className\", \"exact\", \"isActive\", \"location\", \"sensitive\", \"strict\", \"style\", \"to\", \"innerRef\"]);\n\n return React.createElement(__RouterContext.Consumer, null, function (context) {\n !context ? process.env.NODE_ENV !== \"production\" ? invariant(false, \"You should not use <NavLink> outside a <Router>\") : invariant(false) : void 0;\n var currentLocation = locationProp || context.location;\n var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);\n var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n\n var escapedPath = path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n var match = escapedPath ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact: exact,\n sensitive: sensitive,\n strict: strict\n }) : null;\n var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);\n var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;\n var style = isActive ? _extends({}, styleProp, {}, activeStyle) : styleProp;\n\n var props = _extends({\n \"aria-current\": isActive && ariaCurrent || null,\n className: className,\n style: style,\n to: toLocation\n }, rest); // React 15 compat\n\n\n if (forwardRefShim$1 !== forwardRef$1) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(Link, props);\n });\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n NavLink.displayName = \"NavLink\";\n var ariaCurrentType = PropTypes.oneOf([\"page\", \"step\", \"location\", \"date\", \"time\", \"true\"]);\n NavLink.propTypes = _extends({}, Link.propTypes, {\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.string,\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.object\n });\n}\n\nexport { BrowserRouter, HashRouter, Link, NavLink };","map":{"version":3,"sources":["../modules/BrowserRouter.js","../modules/HashRouter.js","../modules/utils/locationUtils.js","../modules/Link.js","../modules/NavLink.js"],"names":["BrowserRouter","React","Component","history","createHistory","render","children","basename","PropTypes","forceRefresh","getUserConfirmation","keyLength","number","warning","HashRouter","hashType","resolveToLocation","to","normalizeToLocation","createLocation","forwardRefShim","forwardRef","event","LinkAnchor","innerRef","navigate","onClick","rest","target","props","isModifiedEvent","forwardedRef","Link","component","replace","RouterContext","context","location","href","method","toType","refType","current","any","isRequired","classnames","NavLink","ariaCurrent","activeClassName","activeStyle","className","classNameProp","exact","isActive","isActiveProp","locationProp","sensitive","strict","style","styleProp","currentLocation","toLocation","path","escapedPath","match","matchPath","joinClassnames","ariaCurrentType","object"],"mappings":";;;;;;;;;;AAMA;;;;IAGMA,aAAAA,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AAhBA,C;AASxBsC,EAAAA,OAAO,CAAPA,SAAAA,GAAAA,QAAAA,CAAAA,EAAAA,EACKd,IAAI,CADTc,SAAAA,EAAAA;oBAAAA,eAAAA;AAGEE,IAAAA,eAAe,EAAExC,SAAS,CAH5BsC,MAAAA;AAIEG,IAAAA,WAAW,EAAEzC,SAAS,CAJxBsC,MAAAA;AAKEI,IAAAA,SAAS,EAAE1C,SAAS,CALtBsC,MAAAA;AAMEM,IAAAA,KAAK,EAAE5C,SAAS,CANlBsC,IAAAA;AAOEO,IAAAA,QAAQ,EAAE7C,SAAS,CAPrBsC,IAAAA;AAQET,IAAAA,QAAQ,EAAE7B,SAAS,CARrBsC,MAAAA;AASEU,IAAAA,SAAS,EAAEhD,SAAS,CATtBsC,IAAAA;AAUEW,IAAAA,MAAM,EAAEjD,SAAS,CAVnBsC,IAAAA;AAWEY,IAAAA,KAAK,EAAElD,SAAS,CAAC4D;AAXnBtB,GAAAA,CAAAA","sourcesContent":["import React from \"react\";\nimport { Router } from \"react-router\";\nimport { createBrowserHistory as createHistory } from \"history\";\nimport PropTypes from \"prop-types\";\nimport warning from \"tiny-warning\";\n\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\nclass BrowserRouter extends React.Component {\n history = createHistory(this.props);\n\n render() {\n return <Router history={this.history} children={this.props.children} />;\n }\n}\n\nif (__DEV__) {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \"<BrowserRouter> ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\"\n );\n };\n}\n\nexport default BrowserRouter;\n","import React from \"react\";\nimport { Router } from \"react-router\";\nimport { createHashHistory as createHistory } from \"history\";\nimport PropTypes from \"prop-types\";\nimport warning from \"tiny-warning\";\n\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\nclass HashRouter extends React.Component {\n history = createHistory(this.props);\n\n render() {\n return <Router history={this.history} children={this.props.children} />;\n }\n}\n\nif (__DEV__) {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function() {\n warning(\n !this.props.history,\n \"<HashRouter> ignores the history prop. To use a custom history, \" +\n \"use `import { Router }` instead of `import { HashRouter as Router }`.\"\n );\n };\n}\n\nexport default HashRouter;\n","import { createLocation } from \"history\";\n\nexport const resolveToLocation = (to, currentLocation) =>\n typeof to === \"function\" ? to(currentLocation) : to;\n\nexport const normalizeToLocation = (to, currentLocation) => {\n return typeof to === \"string\"\n ? createLocation(to, null, null, currentLocation)\n : to;\n};\n","import React from \"react\";\nimport { __RouterContext as RouterContext } from \"react-router\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport {\n resolveToLocation,\n normalizeToLocation\n} from \"./utils/locationUtils.js\";\n\n// React 15 compat\nconst forwardRefShim = C => C;\nlet { forwardRef } = React;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nconst LinkAnchor = forwardRef(\n (\n {\n innerRef, // TODO: deprecate\n navigate,\n onClick,\n ...rest\n },\n forwardedRef\n ) => {\n const { target } = rest;\n\n let props = {\n ...rest,\n onClick: event => {\n try {\n if (onClick) onClick(event);\n } catch (ex) {\n event.preventDefault();\n throw ex;\n }\n\n if (\n !event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n (!target || target === \"_self\") && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n navigate();\n }\n }\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.ref = innerRef;\n }\n\n /* eslint-disable-next-line jsx-a11y/anchor-has-content */\n return <a {...props} />;\n }\n);\n\nif (__DEV__) {\n LinkAnchor.displayName = \"LinkAnchor\";\n}\n\n/**\n * The public API for rendering a history-aware <a>.\n */\nconst Link = forwardRef(\n (\n {\n component = LinkAnchor,\n replace,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n <RouterContext.Consumer>\n {context => {\n invariant(context, \"You should not use <Link> outside a <Router>\");\n\n const { history } = context;\n\n const location = normalizeToLocation(\n resolveToLocation(to, context.location),\n context.location\n );\n\n const href = location ? history.createHref(location) : \"\";\n const props = {\n ...rest,\n href,\n navigate() {\n const location = resolveToLocation(to, context.location);\n const method = replace ? history.replace : history.push;\n\n method(location);\n }\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return React.createElement(component, props);\n }}\n </RouterContext.Consumer>\n );\n }\n);\n\nif (__DEV__) {\n const toType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.object,\n PropTypes.func\n ]);\n const refType = PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.func,\n PropTypes.shape({ current: PropTypes.any })\n ]);\n\n Link.displayName = \"Link\";\n\n Link.propTypes = {\n innerRef: refType,\n onClick: PropTypes.func,\n replace: PropTypes.bool,\n target: PropTypes.string,\n to: toType.isRequired\n };\n}\n\nexport default Link;\n","import React from \"react\";\nimport { __RouterContext as RouterContext, matchPath } from \"react-router\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"tiny-invariant\";\nimport Link from \"./Link.js\";\nimport {\n resolveToLocation,\n normalizeToLocation\n} from \"./utils/locationUtils.js\";\n\n// React 15 compat\nconst forwardRefShim = C => C;\nlet { forwardRef } = React;\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction joinClassnames(...classnames) {\n return classnames.filter(i => i).join(\" \");\n}\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nconst NavLink = forwardRef(\n (\n {\n \"aria-current\": ariaCurrent = \"page\",\n activeClassName = \"active\",\n activeStyle,\n className: classNameProp,\n exact,\n isActive: isActiveProp,\n location: locationProp,\n sensitive,\n strict,\n style: styleProp,\n to,\n innerRef, // TODO: deprecate\n ...rest\n },\n forwardedRef\n ) => {\n return (\n <RouterContext.Consumer>\n {context => {\n invariant(context, \"You should not use <NavLink> outside a <Router>\");\n\n const currentLocation = locationProp || context.location;\n const toLocation = normalizeToLocation(\n resolveToLocation(to, currentLocation),\n currentLocation\n );\n const { pathname: path } = toLocation;\n // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202\n const escapedPath =\n path && path.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n\n const match = escapedPath\n ? matchPath(currentLocation.pathname, {\n path: escapedPath,\n exact,\n sensitive,\n strict\n })\n : null;\n const isActive = !!(isActiveProp\n ? isActiveProp(match, currentLocation)\n : match);\n\n const className = isActive\n ? joinClassnames(classNameProp, activeClassName)\n : classNameProp;\n const style = isActive ? { ...styleProp, ...activeStyle } : styleProp;\n\n const props = {\n \"aria-current\": (isActive && ariaCurrent) || null,\n className,\n style,\n to: toLocation,\n ...rest\n };\n\n // React 15 compat\n if (forwardRefShim !== forwardRef) {\n props.ref = forwardedRef || innerRef;\n } else {\n props.innerRef = innerRef;\n }\n\n return <Link {...props} />;\n }}\n </RouterContext.Consumer>\n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n\n const ariaCurrentType = PropTypes.oneOf([\n \"page\",\n \"step\",\n \"location\",\n \"date\",\n \"time\",\n \"true\"\n ]);\n\n NavLink.propTypes = {\n ...Link.propTypes,\n \"aria-current\": ariaCurrentType,\n activeClassName: PropTypes.string,\n activeStyle: PropTypes.object,\n className: PropTypes.string,\n exact: PropTypes.bool,\n isActive: PropTypes.func,\n location: PropTypes.object,\n sensitive: PropTypes.bool,\n strict: PropTypes.bool,\n style: PropTypes.object\n };\n}\n\nexport default NavLink;\n"]},"metadata":{},"sourceType":"module"} |