1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"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 SlickCarousel from '@ant-design/react-slick';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nconst dotsClass = 'slick-dots';\nconst ArrowButton = _a => {\n var {\n currentSlide,\n slideCount\n } = _a,\n rest = __rest(_a, [\"currentSlide\", \"slideCount\"]);\n return /*#__PURE__*/React.createElement(\"button\", Object.assign({\n type: \"button\"\n }, rest));\n};\nconst Carousel = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n dots = true,\n arrows = false,\n prevArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"prev\"\n }),\n nextArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"next\"\n }),\n draggable = false,\n waitForAnimate = false,\n dotPosition = 'bottom',\n vertical = dotPosition === 'left' || dotPosition === 'right',\n rootClassName,\n className: customClassName,\n style,\n id\n } = props,\n otherProps = __rest(props, [\"dots\", \"arrows\", \"prevArrow\", \"nextArrow\", \"draggable\", \"waitForAnimate\", \"dotPosition\", \"vertical\", \"rootClassName\", \"className\", \"style\", \"id\"]);\n const {\n getPrefixCls,\n direction,\n carousel\n } = React.useContext(ConfigContext);\n const slickRef = React.useRef();\n const goTo = function (slide) {\n let dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n slickRef.current.slickGoTo(slide, dontAnimate);\n };\n React.useImperativeHandle(ref, () => ({\n goTo,\n autoPlay: slickRef.current.innerSlider.autoPlay,\n innerSlider: slickRef.current.innerSlider,\n prev: slickRef.current.slickPrev,\n next: slickRef.current.slickNext\n }), [slickRef.current]);\n const prevCount = React.useRef(React.Children.count(props.children));\n React.useEffect(() => {\n if (prevCount.current !== React.Children.count(props.children)) {\n goTo(props.initialSlide || 0, false);\n prevCount.current = React.Children.count(props.children);\n }\n }, [props.children]);\n const newProps = Object.assign({\n vertical,\n className: classNames(customClassName, carousel === null || carousel === void 0 ? void 0 : carousel.className),\n style: Object.assign(Object.assign({}, carousel === null || carousel === void 0 ? void 0 : carousel.style), style)\n }, otherProps);\n if (newProps.effect === 'fade') {\n newProps.fade = true;\n }\n const prefixCls = getPrefixCls('carousel', newProps.prefixCls);\n const enableDots = !!dots;\n const dsClass = classNames(dotsClass, `${dotsClass}-${dotPosition}`, typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const className = classNames(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-vertical`]: newProps.vertical\n }, hashId, cssVarCls, rootClassName);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n id: id\n }, /*#__PURE__*/React.createElement(SlickCarousel, Object.assign({\n ref: slickRef\n }, newProps, {\n dots: enableDots,\n dotsClass: dsClass,\n arrows: arrows,\n prevArrow: prevArrow,\n nextArrow: nextArrow,\n draggable: draggable,\n verticalSwiping: vertical,\n waitForAnimate: waitForAnimate\n }))));\n});\nif (process.env.NODE_ENV !== 'production') {\n Carousel.displayName = 'Carousel';\n}\nexport default Carousel;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","SlickCarousel","classNames","ConfigContext","useStyle","dotsClass","ArrowButton","_a","currentSlide","slideCount","rest","createElement","assign","type","Carousel","forwardRef","props","ref","dots","arrows","prevArrow","nextArrow","draggable","waitForAnimate","dotPosition","vertical","rootClassName","className","customClassName","style","id","otherProps","getPrefixCls","direction","carousel","useContext","slickRef","useRef","goTo","slide","dontAnimate","arguments","undefined","current","slickGoTo","useImperativeHandle","autoPlay","innerSlider","prev","slickPrev","next","slickNext","prevCount","Children","count","children","useEffect","initialSlide","newProps","effect","fade","prefixCls","enableDots","dsClass","wrapCSSVar","hashId","cssVarCls","verticalSwiping","process","env","NODE_ENV","displayName"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/carousel/index.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 SlickCarousel from '@ant-design/react-slick';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nconst dotsClass = 'slick-dots';\nconst ArrowButton = _a => {\n var {\n currentSlide,\n slideCount\n } = _a,\n rest = __rest(_a, [\"currentSlide\", \"slideCount\"]);\n return /*#__PURE__*/React.createElement(\"button\", Object.assign({\n type: \"button\"\n }, rest));\n};\nconst Carousel = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n dots = true,\n arrows = false,\n prevArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"prev\"\n }),\n nextArrow = /*#__PURE__*/React.createElement(ArrowButton, {\n \"aria-label\": \"next\"\n }),\n draggable = false,\n waitForAnimate = false,\n dotPosition = 'bottom',\n vertical = dotPosition === 'left' || dotPosition === 'right',\n rootClassName,\n className: customClassName,\n style,\n id\n } = props,\n otherProps = __rest(props, [\"dots\", \"arrows\", \"prevArrow\", \"nextArrow\", \"draggable\", \"waitForAnimate\", \"dotPosition\", \"vertical\", \"rootClassName\", \"className\", \"style\", \"id\"]);\n const {\n getPrefixCls,\n direction,\n carousel\n } = React.useContext(ConfigContext);\n const slickRef = React.useRef();\n const goTo = function (slide) {\n let dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n slickRef.current.slickGoTo(slide, dontAnimate);\n };\n React.useImperativeHandle(ref, () => ({\n goTo,\n autoPlay: slickRef.current.innerSlider.autoPlay,\n innerSlider: slickRef.current.innerSlider,\n prev: slickRef.current.slickPrev,\n next: slickRef.current.slickNext\n }), [slickRef.current]);\n const prevCount = React.useRef(React.Children.count(props.children));\n React.useEffect(() => {\n if (prevCount.current !== React.Children.count(props.children)) {\n goTo(props.initialSlide || 0, false);\n prevCount.current = React.Children.count(props.children);\n }\n }, [props.children]);\n const newProps = Object.assign({\n vertical,\n className: classNames(customClassName, carousel === null || carousel === void 0 ? void 0 : carousel.className),\n style: Object.assign(Object.assign({}, carousel === null || carousel === void 0 ? void 0 : carousel.style), style)\n }, otherProps);\n if (newProps.effect === 'fade') {\n newProps.fade = true;\n }\n const prefixCls = getPrefixCls('carousel', newProps.prefixCls);\n const enableDots = !!dots;\n const dsClass = classNames(dotsClass, `${dotsClass}-${dotPosition}`, typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const className = classNames(prefixCls, {\n [`${prefixCls}-rtl`]: direction === 'rtl',\n [`${prefixCls}-vertical`]: newProps.vertical\n }, hashId, cssVarCls, rootClassName);\n return wrapCSSVar( /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n id: id\n }, /*#__PURE__*/React.createElement(SlickCarousel, Object.assign({\n ref: slickRef\n }, newProps, {\n dots: enableDots,\n dotsClass: dsClass,\n arrows: arrows,\n prevArrow: prevArrow,\n nextArrow: nextArrow,\n draggable: draggable,\n verticalSwiping: vertical,\n waitForAnimate: waitForAnimate\n }))));\n});\nif (process.env.NODE_ENV !== 'production') {\n Carousel.displayName = 'Carousel';\n}\nexport default Carousel;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,CAAC,CAAC;EACnG;EACA,OAAOR,CAAC;AACV,CAAC;AACD,OAAO,KAAKW,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,QAAQ,MAAM,SAAS;AAC9B,MAAMC,SAAS,GAAG,YAAY;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