PromoCursed/node_modules/.cache/babel-loader/332f3734b127919dca664c0762d7f1be4eea5913f5b793fddd1ccfc3e221f507.json

1 line
11 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"\"use strict\";\n'use client';\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\nvar _slicedToArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\nvar _colors = require(\"@ant-design/colors\");\nvar _Context = _interopRequireDefault(require(\"./Context\"));\nvar _IconBase = _interopRequireDefault(require(\"./IconBase\"));\nvar _twoTonePrimaryColor = require(\"./twoTonePrimaryColor\");\nvar _utils = require(\"../utils\");\nvar _excluded = [\"className\", \"icon\", \"spin\", \"rotate\", \"tabIndex\", \"onClick\", \"twoToneColor\"];\n// Initial setting\n// should move it to antd main repo?\n(0, _twoTonePrimaryColor.setTwoToneColor)(_colors.blue.primary);\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-488848720\n\nvar Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var className = props.className,\n icon = props.icon,\n spin = props.spin,\n rotate = props.rotate,\n tabIndex = props.tabIndex,\n onClick = props.onClick,\n twoToneColor = props.twoToneColor,\n restProps = (0, _objectWithoutProperties2.default)(props, _excluded);\n var _React$useContext = React.useContext(_Context.default),\n _React$useContext$pre = _React$useContext.prefixCls,\n prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,\n rootClassName = _React$useContext.rootClassName;\n var classString = (0, _classnames.default)(rootClassName, prefixCls, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, \"\".concat(prefixCls, \"-\").concat(icon.name), !!icon.name), \"\".concat(prefixCls, \"-spin\"), !!spin || icon.name === 'loading'), className);\n var iconTabIndex = tabIndex;\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1;\n }\n var svgStyle = rotate ? {\n msTransform: \"rotate(\".concat(rotate, \"deg)\"),\n transform: \"rotate(\".concat(rotate, \"deg)\")\n } : undefined;\n var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor),\n _normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n return /*#__PURE__*/React.createElement(\"span\", (0, _extends2.default)({\n role: \"img\",\n \"aria-label\": icon.name\n }, restProps, {\n ref: ref,\n tabIndex: iconTabIndex,\n onClick: onClick,\n className: classString\n }), /*#__PURE__*/React.createElement(_IconBase.default, {\n icon: icon,\n primaryColor: primaryColor,\n secondaryColor: secondaryColor,\n style: svgStyle\n }));\n});\nIcon.displayName = 'AntdIcon';\nIcon.getTwoToneColor = _twoTonePrimaryColor.getTwoToneColor;\nIcon.setTwoToneColor = _twoTonePrimaryColor.setTwoToneColor;\nvar _default = exports.default = Icon;","map":{"version":3,"names":["_interopRequireDefault","require","default","_interopRequireWildcard","Object","defineProperty","exports","value","_extends2","_slicedToArray2","_defineProperty2","_objectWithoutProperties2","React","_classnames","_colors","_Context","_IconBase","_twoTonePrimaryColor","_utils","_excluded","setTwoToneColor","blue","primary","Icon","forwardRef","props","ref","className","icon","spin","rotate","tabIndex","onClick","twoToneColor","restProps","_React$useContext","useContext","_React$useContext$pre","prefixCls","rootClassName","classS