mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Carousel from './Carousel';\nimport CarouselItem from './CarouselItem';\nimport CarouselControl from './CarouselControl';\nimport CarouselIndicators from './CarouselIndicators';\nimport CarouselCaption from './CarouselCaption';\nvar propTypes = {\n items: PropTypes.array.isRequired,\n indicators: PropTypes.bool,\n controls: PropTypes.bool,\n autoPlay: PropTypes.bool,\n defaultActiveIndex: PropTypes.number,\n activeIndex: PropTypes.number,\n next: PropTypes.func,\n previous: PropTypes.func,\n goToIndex: PropTypes.func\n};\n\nvar UncontrolledCarousel = /*#__PURE__*/function (_Component) {\n _inheritsLoose(UncontrolledCarousel, _Component);\n\n function UncontrolledCarousel(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.animating = false;\n _this.state = {\n activeIndex: props.defaultActiveIndex || 0\n };\n _this.next = _this.next.bind(_assertThisInitialized(_this));\n _this.previous = _this.previous.bind(_assertThisInitialized(_this));\n _this.goToIndex = _this.goToIndex.bind(_assertThisInitialized(_this));\n _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));\n _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = UncontrolledCarousel.prototype;\n\n _proto.onExiting = function onExiting() {\n this.animating = true;\n };\n\n _proto.onExited = function onExited() {\n this.animating = false;\n };\n\n _proto.next = function next() {\n if (this.animating) return;\n var nextIndex = this.state.activeIndex === this.props.items.length - 1 ? 0 : this.state.activeIndex + 1;\n this.setState({\n activeIndex: nextIndex\n });\n };\n\n _proto.previous = function previous() {\n if (this.animating) return;\n var nextIndex = this.state.activeIndex === 0 ? this.props.items.length - 1 : this.state.activeIndex - 1;\n this.setState({\n activeIndex: nextIndex\n });\n };\n\n _proto.goToIndex = function goToIndex(newIndex) {\n if (this.animating) return;\n this.setState({\n activeIndex: newIndex\n });\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n defaultActiveIndex = _this$props.defaultActiveIndex,\n autoPlay = _this$props.autoPlay,\n indicators = _this$props.indicators,\n controls = _this$props.controls,\n items = _this$props.items,\n goToIndex = _this$props.goToIndex,\n props = _objectWithoutPropertiesLoose(_this$props, [\"defaultActiveIndex\", \"autoPlay\", \"indicators\", \"controls\", \"items\", \"goToIndex\"]);\n\n var activeIndex = this.state.activeIndex;\n var slides = items.map(function (item) {\n var key = item.key || item.src;\n return /*#__PURE__*/React.createElement(CarouselItem, {\n onExiting: _this2.onExiting,\n onExited: _this2.onExited,\n key: key\n }, /*#__PURE__*/React.createElement(\"img\", {\n className: \"d-block w-100\",\n src: item.src,\n alt: item.altText\n }), /*#__PURE__*/React.createElement(CarouselCaption, {\n captionText: item.caption,\n captionHeader: item.header || item.caption\n }));\n });\n return /*#__PURE__*/React.createElement(Carousel, _extends({\n activeIndex: activeIndex,\n next: this.next,\n previous: this.previous,\n ride: autoPlay ? 'carousel' : undefined\n }, props), indicators && /*#__PURE__*/React.createElement(CarouselIndicators, {\n items: items,\n activeIndex: props.activeIndex || activeIndex,\n onClickHandler: goToIndex || this.goToIndex\n }), slides, controls && /*#__PURE__*/React.createElement(CarouselControl, {\n direction: \"prev\",\n directionText: \"Previous\",\n onClickHandler: props.previous || this.previous\n }), controls && /*#__PURE__*/React.createElement(CarouselControl, {\n direction: \"next\",\n directionText: \"Next\",\n onClickHandler: props.next || this.next\n }));\n };\n\n return UncontrolledCarousel;\n}(Component);\n\nUncontrolledCarousel.propTypes = propTypes;\nUncontrolledCarousel.defaultProps = {\n controls: true,\n indicators: true,\n autoPlay: true\n};\nexport default UncontrolledCarousel;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/UncontrolledCarousel.js"],"names":["_extends","_objectWithoutPropertiesLoose","_assertThisInitialized","_inheritsLoose","React","Component","PropTypes","Carousel","CarouselItem","CarouselControl","CarouselIndicators","CarouselCaption","propTypes","items","array","isRequired","indicators","bool","controls","autoPlay","defaultActiveIndex","number","activeIndex","next","func","previous","goToIndex","UncontrolledCarousel","_Component","props","_this","call","animating","state","bind","onExiting","onExited","_proto","prototype","nextIndex","length","setState","newIndex","render","_this2","_this$props","slides","map","item","key","src","createElement","className","alt","altText","captionText","caption","captionHeader","header","ride","undefined","onClickHandler","direction","directionText","defaultProps"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,sBAAP,MAAmC,kDAAnC;AACA,OAAOC,cAAP,MAA2B,0CAA3B;AACA,OAAOC,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,YAAP,MAAyB,gBAAzB;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,OAAOC,kBAAP,MAA+B,sBAA/B;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,IAAIC,SAAS,GAAG;AACdC,EAAAA,KAAK,EAAEP,SAAS,CAACQ,KAAV,CAAgBC,UADT;AAEdC,EAAAA,UAAU,EAAEV,SAAS,CAACW,IAFR;AAGdC,EAAAA,QAAQ,EAAEZ,SAAS,CAACW,IAHN;AAIdE,EAAAA,QAAQ,EAAEb,SAAS,CAACW,IAJN;AAKdG,EAAAA,kBAAkB,EAAEd,SAAS,CAACe,MALhB;AAMdC,EAAAA,WAAW,EAAEhB,SAAS,CAACe,MANT;AAOdE,EAAAA,IAAI,EAAEjB,SAAS,CAACkB,IAPF;AAQdC,EAAAA,QAAQ,EAAEnB,SAAS,CAAC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esContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Carousel from './Carousel';\nimport CarouselItem from './CarouselItem';\nimport CarouselControl from './CarouselControl';\nimport CarouselIndicators from './CarouselIndicators';\nimport CarouselCaption from './CarouselCaption';\nvar propTypes = {\n items: PropTypes.array.isRequired,\n indicators: PropTypes.bool,\n controls: PropTypes.bool,\n autoPlay: PropTypes.bool,\n defaultActiveIndex: PropTypes.number,\n activeIndex: PropTypes.number,\n next: PropTypes.func,\n previous: PropTypes.func,\n goToIndex: PropTypes.func\n};\n\nvar UncontrolledCarousel = /*#__PURE__*/function (_Component) {\n _inheritsLoose(UncontrolledCarousel, _Component);\n\n function UncontrolledCarousel(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.animating = false;\n _this.state = {\n activeIndex: props.defaultActiveIndex || 0\n };\n _this.next = _this.next.bind(_assertThisInitialized(_this));\n _this.previous = _this.previous.bind(_assertThisInitialized(_this));\n _this.goToIndex = _this.goToIndex.bind(_assertThisInitialized(_this));\n _this.onExiting = _this.onExiting.bind(_assertThisInitialized(_this));\n _this.onExited = _this.onExited.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = UncontrolledCarousel.prototype;\n\n _proto.onExiting = function onExiting() {\n this.animating = true;\n };\n\n _proto.onExited = function onExited() {\n this.animating = false;\n };\n\n _proto.next = function next() {\n if (this.animating) return;\n var nextIndex = this.state.activeIndex === this.props.items.length - 1 ? 0 : this.state.activeIndex + 1;\n this.setState({\n activeIndex: nextIndex\n });\n };\n\n _proto.previous = function previous() {\n if (this.animating) return;\n var nextIndex = this.state.activeIndex === 0 ? this.props.items.length - 1 : this.state.activeIndex - 1;\n this.setState({\n activeIndex: nextIndex\n });\n };\n\n _proto.goToIndex = function goToIndex(newIndex) {\n if (this.animating) return;\n this.setState({\n activeIndex: newIndex\n });\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n defaultActiveIndex = _this$props.defaultActiveIndex,\n autoPlay = _this$props.autoPlay,\n indicators = _this$props.indicators,\n controls = _this$props.controls,\n items = _this$props.items,\n goToIndex = _this$props.goToIndex,\n props = _objectWithoutPropertiesLoose(_this$props, [\"defaultActiveIndex\", \"autoPlay\", \"indicators\", \"controls\", \"items\", \"goToIndex\"]);\n\n var activeIndex = this.state.activeIndex;\n var slides = items.map(function (item) {\n var key = item.key || item.src;\n return /*#__PURE__*/React.createElement(CarouselItem, {\n onExiting: _this2.onExiting,\n onExited: _this2.onExited,\n key: key\n }, /*#__PURE__*/React.createElement(\"img\", {\n className: \"d-block w-100\",\n src: item.src,\n alt: item.altText\n }), /*#__PURE__*/React.createElement(CarouselCaption, {\n captionText: item.caption,\n captionHeader: item.header || item.caption\n }));\n });\n return /*#__PURE__*/React.createElement(Carousel, _extends({\n activeIndex: activeIndex,\n next: this.next,\n previous: this.previous,\n ride: autoPlay ? 'carousel' : undefined\n }, props), indicators && /*#__PURE__*/React.createElement(CarouselIndicators, {\n items: items,\n activeIndex: props.activeIndex || activeIndex,\n onClickHandler: goToIndex || this.goToIndex\n }), slides, controls && /*#__PURE__*/React.createElement(CarouselControl, {\n direction: \"prev\",\n directionText: \"Previous\",\n onClickHandler: props.previous || this.previous\n }), controls && /*#__PURE__*/React.createElement(CarouselControl, {\n direction: \"next\",\n directionText: \"Next\",\n onClickHandler: props.next || this.next\n }));\n };\n\n return UncontrolledCarousel;\n}(Component);\n\nUncontrolledCarousel.propTypes = propTypes;\nUncontrolledCarousel.defaultProps = {\n controls: true,\n indicators: true,\n autoPlay: true\n};\nexport default UncontrolledCarousel;"]},"metadata":{},"sourceType":"module"} |