716ce6939954ead9e3684b428a24d1d4.json
30.7 KB
{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _innerSlider = require(\"./inner-slider\");\n\nvar _json2mq = _interopRequireDefault(require(\"json2mq\"));\n\nvar _defaultProps = _interopRequireDefault(require(\"./default-props\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nvar Slider = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(Slider, _React$Component);\n\n var _super = (0, _createSuper2[\"default\"])(Slider);\n\n function Slider(props) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, Slider);\n _this = _super.call(this, props);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"innerSliderRefHandler\", function (ref) {\n return _this.innerSlider = ref;\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPrev\", function () {\n return _this.innerSlider.slickPrev();\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickNext\", function () {\n return _this.innerSlider.slickNext();\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return _this.innerSlider.slickGoTo(slide, dontAnimate);\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPause\", function () {\n return _this.innerSlider.pause(\"paused\");\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPlay\", function () {\n return _this.innerSlider.autoPlay(\"play\");\n });\n _this.state = {\n breakpoint: null\n };\n _this._responsiveMediaHandlers = [];\n return _this;\n }\n\n (0, _createClass2[\"default\"])(Slider, [{\n key: \"media\",\n value: function media(query, handler) {\n // javascript handler for css media query\n var mql = window.matchMedia(query);\n\n var listener = function listener(_ref) {\n var matches = _ref.matches;\n\n if (matches) {\n handler();\n }\n };\n\n mql.addListener(listener);\n listener(mql);\n\n this._responsiveMediaHandlers.push({\n mql: mql,\n query: query,\n listener: listener\n });\n } // handles responsive breakpoints\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this; // performance monitoring\n //if (process.env.NODE_ENV !== 'production') {\n //const { whyDidYouUpdate } = require('why-did-you-update')\n //whyDidYouUpdate(React)\n //}\n\n\n if (this.props.responsive) {\n var breakpoints = this.props.responsive.map(function (breakpt) {\n return breakpt.breakpoint;\n }); // sort them in increasing order of their numerical value\n\n breakpoints.sort(function (x, y) {\n return x - y;\n });\n breakpoints.forEach(function (breakpoint, index) {\n // media query for each breakpoint\n var bQuery;\n\n if (index === 0) {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: 0,\n maxWidth: breakpoint\n });\n } else {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: breakpoints[index - 1] + 1,\n maxWidth: breakpoint\n });\n } // when not using server side rendering\n\n\n (0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function () {\n _this2.setState({\n breakpoint: breakpoint\n });\n });\n }); // Register media query for full screen. Need to support resize from small to large\n // convert javascript object to media query string\n\n var query = (0, _json2mq[\"default\"])({\n minWidth: breakpoints.slice(-1)[0]\n });\n (0, _innerSliderUtils.canUseDOM)() && this.media(query, function () {\n _this2.setState({\n breakpoint: null\n });\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._responsiveMediaHandlers.forEach(function (obj) {\n obj.mql.removeListener(obj.listener);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var settings;\n var newProps;\n\n if (this.state.breakpoint) {\n newProps = this.props.responsive.filter(function (resp) {\n return resp.breakpoint === _this3.state.breakpoint;\n });\n settings = newProps[0].settings === \"unslick\" ? \"unslick\" : (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, _defaultProps[\"default\"]), this.props), newProps[0].settings);\n } else {\n settings = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, _defaultProps[\"default\"]), this.props);\n } // force scrolling by one if centerMode is on\n\n\n if (settings.centerMode) {\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 in centerMode, you are using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToScroll = 1;\n } // force showing one slide and scrolling by one if the fade mode is on\n\n\n if (settings.fade) {\n if (settings.slidesToShow > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToShow should be equal to 1 when fade is true, you're using \".concat(settings.slidesToShow));\n }\n\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 when fade is true, you're using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToShow = 1;\n settings.slidesToScroll = 1;\n } // makes sure that children is an array, even when there is only 1 child\n\n\n var children = _react[\"default\"].Children.toArray(this.props.children); // Children may contain false or null, so we should filter them\n // children may also contain string filled with spaces (in certain cases where we use jsx strings)\n\n\n children = children.filter(function (child) {\n if (typeof child === \"string\") {\n return !!child.trim();\n }\n\n return !!child;\n }); // rows and slidesPerRow logic is handled here\n\n if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {\n console.warn(\"variableWidth is not supported in case of rows > 1 or slidesPerRow > 1\");\n settings.variableWidth = false;\n }\n\n var newChildren = [];\n var currentWidth = null;\n\n for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {\n var newSlide = [];\n\n for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {\n var row = [];\n\n for (var k = j; k < j + settings.slidesPerRow; k += 1) {\n if (settings.variableWidth && children[k].props.style) {\n currentWidth = children[k].props.style.width;\n }\n\n if (k >= children.length) break;\n row.push( /*#__PURE__*/_react[\"default\"].cloneElement(children[k], {\n key: 100 * i + 10 * j + k,\n tabIndex: -1,\n style: {\n width: \"\".concat(100 / settings.slidesPerRow, \"%\"),\n display: \"inline-block\"\n }\n }));\n }\n\n newSlide.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: 10 * i + j\n }, row));\n }\n\n if (settings.variableWidth) {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i,\n style: {\n width: currentWidth\n }\n }, newSlide));\n } else {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i\n }, newSlide));\n }\n }\n\n if (settings === \"unslick\") {\n var className = \"regular slider \" + (this.props.className || \"\");\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: className\n }, children);\n } else if (newChildren.length <= settings.slidesToShow) {\n settings.unslick = true;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_innerSlider.InnerSlider, (0, _extends2[\"default\"])({\n style: this.props.style,\n ref: this.innerSliderRefHandler\n }, settings), newChildren);\n }\n }]);\n return Slider;\n}(_react[\"default\"].Component);\n\nexports[\"default\"] = Slider;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/react-slick/lib/slider.js"],"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","_extends2","_objectSpread2","_classCallCheck2","_createClass2","_assertThisInitialized2","_inherits2","_createSuper2","_defineProperty2","_react","_innerSlider","_json2mq","_defaultProps","_innerSliderUtils","Slider","_React$Component","_super","props","_this","call","ref","innerSlider","slickPrev","slickNext","slide","dontAnimate","arguments","length","undefined","slickGoTo","pause","autoPlay","state","breakpoint","_responsiveMediaHandlers","key","media","query","handler","mql","window","matchMedia","listener","_ref","matches","addListener","push","componentDidMount","_this2","responsive","breakpoints","map","breakpt","sort","x","y","forEach","index","bQuery","minWidth","maxWidth","canUseDOM","setState","slice","componentWillUnmount","obj","removeListener","render","_this3","settings","newProps","filter","resp","centerMode","slidesToScroll","process","env","NODE_ENV","console","warn","concat","fade","slidesToShow","children","Children","toArray","child","trim","variableWidth","rows","slidesPerRow","newChildren","currentWidth","i","newSlide","j","row","k","style","width","cloneElement","tabIndex","display","createElement","className","unslick","InnerSlider","innerSliderRefHandler","Component"],"mappings":"AAAA;;AAEA,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAAD,CAApC;;AAEAC,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAC3CC,EAAAA,KAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAAC,SAAD,CAAP,GAAqB,KAAK,CAA1B;;AAEA,IAAIE,SAAS,GAAGN,sBAAsB,CAACC,OAAO,CAAC,gCAAD,CAAR,CAAtC;;AAEA,IAAIM,cAAc,GAAGP,sBAAsB,CAACC,OAAO,CAAC,sCAAD,CAAR,CAA3C;;AAEA,IAAIO,gBAAgB,GAAGR,sBAAsB,CAACC,OAAO,CAAC,uCAAD,CAAR,CAA7C;;AAEA,IAAIQ,aAAa,GAAGT,sBAAsB,CAACC,OAAO,CAAC,oCAAD,CAAR,CAA1C;;AAEA,IAAIS,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E5BC,QAF4B,CAA/B;AAGD;AACF;;AAED,UAAIzB,QAAQ,KAAK,SAAjB,EAA4B;AAC1B,YAAImC,SAAS,GAAG,qBAAqB,KAAKvF,KAAL,CAAWuF,SAAX,IAAwB,EAA7C,CAAhB;AACA,eAAO,aAAa/F,MAAM,CAAC,SAAD,CAAN,CAAkB8F,aAAlB,CAAgC,KAAhC,EAAuC;AACzDC,UAAAA,SAAS,EAAEA;AAD8C,SAAvC,EAEjBrB,QAFiB,CAApB;AAGD,OALD,MAKO,IAAIQ,WAAW,CAAChE,MAAZ,IAAsB0C,QAAQ,CAACa,YAAnC,EAAiD;AACtDb,QAAAA,QAAQ,CAACoC,OAAT,GAAmB,IAAnB;AACD;;AAED,aAAO,aAAahG,MAAM,CAAC,SAAD,CAAN,CAAkB8F,aAAlB,CAAgC7F,YAAY,CAACgG,WAA7C,EAA0D,CAAC,GAAGzG,SAAS,CAAC,SAAD,CAAb,EAA0B;AACtGiG,QAAAA,KAAK,EAAE,KAAKjF,KAAL,CAAWiF,KADoF;AAEtG9E,QAAAA,GAAG,EAAE,KAAKuF;AAF4F,OAA1B,EAG3EtC,QAH2E,CAA1D,EAGNsB,WAHM,CAApB;AAID;AAnHA,GApFmC,CAAtC;AAyMA,SAAO7E,MAAP;AACD,CA9OyB,CA8OxBL,MAAM,CAAC,SAAD,CAAN,CAAkBmG,SA9OM,CAA1B;;AAgPA7G,OAAO,CAAC,SAAD,CAAP,GAAqBe,MAArB","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _innerSlider = require(\"./inner-slider\");\n\nvar _json2mq = _interopRequireDefault(require(\"json2mq\"));\n\nvar _defaultProps = _interopRequireDefault(require(\"./default-props\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nvar Slider = /*#__PURE__*/function (_React$Component) {\n (0, _inherits2[\"default\"])(Slider, _React$Component);\n\n var _super = (0, _createSuper2[\"default\"])(Slider);\n\n function Slider(props) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, Slider);\n _this = _super.call(this, props);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"innerSliderRefHandler\", function (ref) {\n return _this.innerSlider = ref;\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPrev\", function () {\n return _this.innerSlider.slickPrev();\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickNext\", function () {\n return _this.innerSlider.slickNext();\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return _this.innerSlider.slickGoTo(slide, dontAnimate);\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPause\", function () {\n return _this.innerSlider.pause(\"paused\");\n });\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"slickPlay\", function () {\n return _this.innerSlider.autoPlay(\"play\");\n });\n _this.state = {\n breakpoint: null\n };\n _this._responsiveMediaHandlers = [];\n return _this;\n }\n\n (0, _createClass2[\"default\"])(Slider, [{\n key: \"media\",\n value: function media(query, handler) {\n // javascript handler for css media query\n var mql = window.matchMedia(query);\n\n var listener = function listener(_ref) {\n var matches = _ref.matches;\n\n if (matches) {\n handler();\n }\n };\n\n mql.addListener(listener);\n listener(mql);\n\n this._responsiveMediaHandlers.push({\n mql: mql,\n query: query,\n listener: listener\n });\n } // handles responsive breakpoints\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n // performance monitoring\n //if (process.env.NODE_ENV !== 'production') {\n //const { whyDidYouUpdate } = require('why-did-you-update')\n //whyDidYouUpdate(React)\n //}\n if (this.props.responsive) {\n var breakpoints = this.props.responsive.map(function (breakpt) {\n return breakpt.breakpoint;\n }); // sort them in increasing order of their numerical value\n\n breakpoints.sort(function (x, y) {\n return x - y;\n });\n breakpoints.forEach(function (breakpoint, index) {\n // media query for each breakpoint\n var bQuery;\n\n if (index === 0) {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: 0,\n maxWidth: breakpoint\n });\n } else {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: breakpoints[index - 1] + 1,\n maxWidth: breakpoint\n });\n } // when not using server side rendering\n\n\n (0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function () {\n _this2.setState({\n breakpoint: breakpoint\n });\n });\n }); // Register media query for full screen. Need to support resize from small to large\n // convert javascript object to media query string\n\n var query = (0, _json2mq[\"default\"])({\n minWidth: breakpoints.slice(-1)[0]\n });\n (0, _innerSliderUtils.canUseDOM)() && this.media(query, function () {\n _this2.setState({\n breakpoint: null\n });\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._responsiveMediaHandlers.forEach(function (obj) {\n obj.mql.removeListener(obj.listener);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var settings;\n var newProps;\n\n if (this.state.breakpoint) {\n newProps = this.props.responsive.filter(function (resp) {\n return resp.breakpoint === _this3.state.breakpoint;\n });\n settings = newProps[0].settings === \"unslick\" ? \"unslick\" : (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, _defaultProps[\"default\"]), this.props), newProps[0].settings);\n } else {\n settings = (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, _defaultProps[\"default\"]), this.props);\n } // force scrolling by one if centerMode is on\n\n\n if (settings.centerMode) {\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 in centerMode, you are using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToScroll = 1;\n } // force showing one slide and scrolling by one if the fade mode is on\n\n\n if (settings.fade) {\n if (settings.slidesToShow > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToShow should be equal to 1 when fade is true, you're using \".concat(settings.slidesToShow));\n }\n\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 when fade is true, you're using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToShow = 1;\n settings.slidesToScroll = 1;\n } // makes sure that children is an array, even when there is only 1 child\n\n\n var children = _react[\"default\"].Children.toArray(this.props.children); // Children may contain false or null, so we should filter them\n // children may also contain string filled with spaces (in certain cases where we use jsx strings)\n\n\n children = children.filter(function (child) {\n if (typeof child === \"string\") {\n return !!child.trim();\n }\n\n return !!child;\n }); // rows and slidesPerRow logic is handled here\n\n if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {\n console.warn(\"variableWidth is not supported in case of rows > 1 or slidesPerRow > 1\");\n settings.variableWidth = false;\n }\n\n var newChildren = [];\n var currentWidth = null;\n\n for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {\n var newSlide = [];\n\n for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {\n var row = [];\n\n for (var k = j; k < j + settings.slidesPerRow; k += 1) {\n if (settings.variableWidth && children[k].props.style) {\n currentWidth = children[k].props.style.width;\n }\n\n if (k >= children.length) break;\n row.push( /*#__PURE__*/_react[\"default\"].cloneElement(children[k], {\n key: 100 * i + 10 * j + k,\n tabIndex: -1,\n style: {\n width: \"\".concat(100 / settings.slidesPerRow, \"%\"),\n display: \"inline-block\"\n }\n }));\n }\n\n newSlide.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: 10 * i + j\n }, row));\n }\n\n if (settings.variableWidth) {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i,\n style: {\n width: currentWidth\n }\n }, newSlide));\n } else {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i\n }, newSlide));\n }\n }\n\n if (settings === \"unslick\") {\n var className = \"regular slider \" + (this.props.className || \"\");\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: className\n }, children);\n } else if (newChildren.length <= settings.slidesToShow) {\n settings.unslick = true;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_innerSlider.InnerSlider, (0, _extends2[\"default\"])({\n style: this.props.style,\n ref: this.innerSliderRefHandler\n }, settings), newChildren);\n }\n }]);\n return Slider;\n}(_react[\"default\"].Component);\n\nexports[\"default\"] = Slider;"]},"metadata":{},"sourceType":"script"}