PromoCursed/node_modules/.cache/babel-loader/951518db145ad81600bb509a463728a49b31e9f72aa6f3e7b10618af4a66c7ed.json

1 line
4.3 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import * as React from 'react';\nimport SliderContext from \"../context\";\nimport Dot from \"./Dot\";\nvar Steps = function Steps(props) {\n var prefixCls = props.prefixCls,\n marks = props.marks,\n dots = props.dots,\n style = props.style,\n activeStyle = props.activeStyle;\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n step = _React$useContext.step;\n var stepDots = React.useMemo(function () {\n var dotSet = new Set();\n\n // Add marks\n marks.forEach(function (mark) {\n dotSet.add(mark.value);\n });\n\n // Fill dots\n if (dots && step !== null) {\n var current = min;\n while (current <= max) {\n dotSet.add(current);\n current += step;\n }\n }\n return Array.from(dotSet);\n }, [min, max, step, dots, marks]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-step\")\n }, stepDots.map(function (dotValue) {\n return /*#__PURE__*/React.createElement(Dot, {\n prefixCls: prefixCls,\n key: dotValue,\n value: dotValue,\n style: style,\n activeStyle: activeStyle\n });\n }));\n};\nexport default Steps;","map":{"version":3,"names":["React","SliderContext","Dot","Steps","props","prefixCls","marks","dots","style","activeStyle","_React$useContext","useContext","min","max","step","stepDots","useMemo","dotSet","Set","forEach","mark","add","value","current","Array","from","createElement","className","concat","map","dotValue","key"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/rc-slider/es/Steps/index.js"],"sourcesContent":["import * as React from 'react';\nimport SliderContext from \"../context\";\nimport Dot from \"./Dot\";\nvar Steps = function Steps(props) {\n var prefixCls = props.prefixCls,\n marks = props.marks,\n dots = props.dots,\n style = props.style,\n activeStyle = props.activeStyle;\n var _React$useContext = React.useContext(SliderContext),\n min = _React$useContext.min,\n max = _React$useContext.max,\n step = _React$useContext.step;\n var stepDots = React.useMemo(function () {\n var dotSet = new Set();\n\n // Add marks\n marks.forEach(function (mark) {\n dotSet.add(mark.value);\n });\n\n // Fill dots\n if (dots && step !== null) {\n var current = min;\n while (current <= max) {\n dotSet.add(current);\n current += step;\n }\n }\n return Array.from(dotSet);\n }, [min, max, step, dots, marks]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-step\")\n }, stepDots.map(function (dotValue) {\n return /*#__PURE__*/React.createElement(Dot, {\n prefixCls: prefixCls,\n key: dotValue,\n value: dotValue,\n style: style,\n activeStyle: activeStyle\n });\n }));\n};\nexport default Steps;"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,YAAY;AACtC,OAAOC,GAAG,MAAM,OAAO;AACvB,IAAIC,KAAK,GAAG,SAASA,KAAKA,CAACC,KAAK,EAAE;EAChC,IAAIC,SAAS,GAAGD,KAAK,CAACC,SAAS;IAC7BC,KAAK,GAAGF,KAAK,CAACE,KAAK;IACnBC,IAAI,GAAGH,KAAK,CAACG,IAAI;IACjBC,KAAK,GAAGJ,KAAK,CAACI,KAAK;IACnBC,WAAW,GAAGL,KAAK,CAACK,WAAW;EACjC,IAAIC,iBAAiB,GAAGV,KAAK,CAACW,UAAU,CAACV,aAAa,CAAC;IACrDW,GAAG,GAAGF,iBAAiB,CAACE,GAAG;IAC3BC,GAAG,GAAGH,iBAAiB,CAACG,GAAG;IAC3BC,IAAI,GAAGJ,iBAAiB,CAACI,IAAI;EAC/B,IAAIC,QAAQ,GAAGf,KAAK,CAACgB,OAAO,CAAC,YAAY;IACvC,IAAIC,MAAM,GAAG,IAAIC,GAAG,CAAC,CAAC;;IAEtB;IACAZ,KAAK,CAACa,OAAO,CAAC,UAAUC,IAAI,EAAE;MAC5BH,MAAM,CAACI,GAAG,CAACD,IAAI,CAACE,KAAK,CAAC;IACxB,CAAC,CAAC;;IAEF;IACA,IAAIf,IAAI,IAAIO,IAAI,KAAK,IAAI,EAAE;MACzB,IAAIS,OAAO,GAAGX,GAA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