GoScrobble/web/node_modules/.cache/babel-loader/f96eba6cb82477ee41ae2bdf5f224c6d.json

1 line
14 KiB
JSON
Raw Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread(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\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType, toNumber } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n bar: PropTypes.bool,\n multi: PropTypes.bool,\n tag: tagPropType,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n min: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n max: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n animated: PropTypes.bool,\n striped: PropTypes.bool,\n color: PropTypes.string,\n className: PropTypes.string,\n barClassName: PropTypes.string,\n cssModule: PropTypes.object,\n style: PropTypes.object,\n barStyle: PropTypes.object,\n barAriaValueText: PropTypes.string,\n barAriaLabelledBy: PropTypes.string\n};\nvar defaultProps = {\n tag: 'div',\n value: 0,\n min: 0,\n max: 100,\n style: {},\n barStyle: {}\n};\n\nvar Progress = function Progress(props) {\n var children = props.children,\n className = props.className,\n barClassName = props.barClassName,\n cssModule = props.cssModule,\n value = props.value,\n min = props.min,\n max = props.max,\n animated = props.animated,\n striped = props.striped,\n color = props.color,\n bar = props.bar,\n multi = props.multi,\n Tag = props.tag,\n style = props.style,\n barStyle = props.barStyle,\n barAriaValueText = props.barAriaValueText,\n barAriaLabelledBy = props.barAriaLabelledBy,\n attributes = _objectWithoutPropertiesLoose(props, [\"children\", \"className\", \"barClassName\", \"cssModule\", \"value\", \"min\", \"max\", \"animated\", \"striped\", \"color\", \"bar\", \"multi\", \"tag\", \"style\", \"barStyle\", \"barAriaValueText\", \"barAriaLabelledBy\"]);\n\n var percent = toNumber(value) / toNumber(max) * 100;\n var progressClasses = mapToCssModules(classNames(className, 'progress'), cssModule);\n var progressBarClasses = mapToCssModules(classNames('progress-bar', bar ? className || barClassName : barClassName, animated ? 'progress-bar-animated' : null, color ? \"bg-\" + color : null, striped || animated ? 'progress-bar-striped' : null), cssModule);\n var progressBarProps = {\n className: progressBarClasses,\n style: _objectSpread(_objectSpread(_objectSpread({}, bar ? style : {}), barStyle), {}, {\n width: percent + \"%\"\n }),\n role: 'progressbar',\n 'aria-valuenow': value,\n 'aria-valuemin': min,\n 'aria-valuemax': max,\n 'aria-valuetext': barAriaValueText,\n 'aria-labelledby': barAriaLabelledBy,\n children: children\n };\n\n if (bar) {\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, progressBarProps));\n }\n\n return /*#__PURE__*/React.createElement(Tag, _exte