PromoCursed/node_modules/.cache/babel-loader/81e3d0f9faa52108e4920c89960435d5a69dd3c512f805672844beafd9846eae.json

1 line
9.1 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { cloneElement } from '../_util/reactNode';\nimport { ConfigContext } from '../config-provider';\nimport SingleNumber from './SingleNumber';\nconst ScrollNumber = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n count,\n className,\n motionClassName,\n style,\n title,\n show,\n component: Component = 'sup',\n children\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n // ============================ Render ============================\n const newProps = Object.assign(Object.assign({}, restProps), {\n 'data-show': show,\n style,\n className: classNames(prefixCls, className, motionClassName),\n title: title\n });\n // Only integer need motion\n let numberNodes = count;\n if (count && Number(count) % 1 === 0) {\n const numberList = String(count).split('');\n numberNodes = /*#__PURE__*/React.createElement(\"bdi\", null, numberList.map((num, i) => ( /*#__PURE__*/React.createElement(SingleNumber, {\n prefixCls: prefixCls,\n count: Number(count),\n value: num,\n // eslint-disable-next-line react/no-array-index-key\n key: numberList.length - i\n }))));\n }\n // allow specify the border\n // mock border-color by box-shadow for compatible with old usage:\n // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />\n if (style === null || style === void 0 ? void 0 : style.borderColor) {\n newProps.style = Object.assign(Object.assign({}, style), {\n boxShadow: `0 0 0 1px ${style.borderColor} inset`\n });\n }\n if (children) {\n return cloneElement(children, oriProps => ({\n className: classNames(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n }));\n }\n return /*#__PURE__*/React.createElement(Component, Object.assign({}, newProps, {\n ref: ref\n }), numberNodes);\n});\nexport default ScrollNumber;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","cloneElement","ConfigContext","SingleNumber","ScrollNumber","forwardRef","props","ref","prefixCls","customizePrefixCls","count","className","motionClassName","style","title","show","component","Component","children","restProps","getPrefixCls","useContext","newProps","assign","numberNodes","Number","numberList","String","split","createElement","map","num","value","key","borderColor","boxShadow","oriProps"],"sources":["C:/Users/Аришина)/source/repos/PromoCursed/node_modules/antd/es/badge/ScrollNumber.js"],"sourcesContent":["\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\n