honkoma/priv/static/packs/modals/mute_modal.js.map

1 line
46 KiB
Plaintext

{"version":3,"sources":["webpack:///modals/mute_modal.js","webpack:///./app/javascript/mastodon/features/ui/components/mute_modal.js","webpack:///./node_modules/react-toggle/dist/component/index.js","webpack:///./node_modules/react-toggle/dist/component/check.js","webpack:///./node_modules/react-toggle/dist/component/x.js","webpack:///./node_modules/react-toggle/dist/component/util.js"],"names":["webpackJsonp","850","module","__webpack_exports__","__webpack_require__","Object","defineProperty","value","d","MuteModal","_dec","_class","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__","__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default","n","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__","__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__","__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default","__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__","__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default","__WEBPACK_IMPORTED_MODULE_4_react__","__WEBPACK_IMPORTED_MODULE_4_react___default","__WEBPACK_IMPORTED_MODULE_5_react_redux__","__WEBPACK_IMPORTED_MODULE_6_react_intl__","__WEBPACK_IMPORTED_MODULE_7_react_toggle__","__WEBPACK_IMPORTED_MODULE_7_react_toggle___default","__WEBPACK_IMPORTED_MODULE_8__components_button__","__WEBPACK_IMPORTED_MODULE_9__actions_modal__","__WEBPACK_IMPORTED_MODULE_10__actions_accounts__","__WEBPACK_IMPORTED_MODULE_11__actions_mutes__","mapStateToProps","state","isSubmitting","getIn","account","notifications","mapDispatchToProps","dispatch","onConfirm","get","onClose","onToggleNotifications","_React$PureComponent","_temp","_this","_ret","this","_len","arguments","length","args","Array","_key","call","apply","concat","handleClick","props","handleCancel","setRef","c","button","toggleNotifications","prototype","componentDidMount","focus","render","_props","className","id","defaultMessage","values","name","htmlFor","a","checked","onChange","onClick","createElement","ref","PureComponent","882","exports","_interopRequireDefault","obj","__esModule","default","_objectWithoutProperties","keys","target","i","indexOf","hasOwnProperty","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","_extends","assign","source","key","_createClass","defineProperties","descriptor","protoProps","staticProps","_react","_react2","_classnames","_classnames2","_propTypes","_propTypes2","_check","_check2","_x","_x2","_util","Toggle","_PureComponent","getPrototypeOf","bind","handleTouchStart","handleTouchMove","handleTouchEnd","handleFocus","handleBlur","previouslyChecked","defaultChecked","hasFocus","nextProps","setState","event","checkbox","input","moved","preventDefault","click","startX","pointerCoord","x","activated","currentX","endX","onFocus","onBlur","type","icons","undefined","defaultProps","_this2","inputProps","classes","react-toggle--checked","react-toggle--focus","react-toggle--disabled","disabled","onTouchStart","onTouchMove","onTouchEnd","getIcon","_ref","displayName","unchecked","propTypes","bool","func","string","aria-labelledby","aria-label","oneOfType","shape","node","883","width","height","viewBox","fill","fillRule","884","885","changedTouches","touch","clientX","y","clientY","pageX","pageY"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAAqBC,GAE7C,YACAC,QAAOC,eAAeH,EAAqB,cAAgBI,OAAO,IACnCH,EAAoBI,EAAEL,EAAqB,UAAW,WAAa,MAAOM,IACpF,IAuBjBC,GAAMC,EAvBeC,EAA0DR,EAAoB,GAC9ES,EAAkET,EAAoBU,EAAEF,GACxFG,EAAqEX,EAAoB,GACzFY,EAA6EZ,EAAoBU,EAAEC,GACnGE,EAAgFb,EAAoB,GACpGc,EAAwFd,EAAoBU,EAAEG,GAC9GE,EAA+Df,EAAoB,GACnFgB,EAAuEhB,EAAoBU,EAAEK,GAC7FE,EAAsCjB,EAAoB,GAC1DkB,EAA8ClB,EAAoBU,EAAEO,GACpEE,EAA4CnB,EAAoB,GAChEoB,E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ACA,gBAEF0C,EAAQlC,QAAQR,cAAc,QAAUvE,EAAG,yEAA0EsL,KAAM,OAAQC,SAAU,eHma3IC,IACA,SAAU9L,EAAQiF,EAAS/E,GAEjC,YIzbAC,QAAOC,eAAe6E,EAAS,cAC7B5E,OAAO,GAGT,IAAIiH,GAASpH,EAAQ,GAEjBqH,EAEJ,SAAgCpC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,IAFlDmC,EAIrCrC,GAAQI,QAAU,WAChB,MAAOkC,GAAQlC,QAAQR,cACrB,OACE4G,MAAO,KAAMC,OAAQ,KAAMC,QAAS,aACtCpE,EAAQlC,QAAQR,cACd,QACA,KACA,YAEF0C,EAAQlC,QAAQR,cAAc,QAAUvE,EAAG,yHAA0HsL,KAAM,OAAQC,SAAU,eJ2b3LE,IACA,SAAU/L,EAAQiF,EAAS/E,GAEjC,YKzcA,SAASoJ,GAAaP,GAGpB,GAAIA,EAAO,CACT,GAAIiD,GAAiBjD,EAAMiD,cAC3B,IAAIA,GAAkBA,EAAehJ,OAAS,EAAG,CAC/C,GAAIiJ,GAAQD,EAAe,EAC3B,QAASzC,EAAG0C,EAAMC,QAASC,EAAGF,EAAMG,SAEtC,GAAIC,GAAQtD,EAAMsD,KAClB,QAActC,KAAVsC,EACF,OAAS9C,EAAG8C,EAAOF,EAAGpD,EAAMuD,OAGhC,OAAS/C,EAAG,EAAG4C,EAAG,GAtBpBhM,OAAOC,eAAe6E,EAAS,cAC7B5E,OAAO,IAET4E,EAAQqE,aAAeA","file":"modals/mute_modal.js","sourcesContent":["webpackJsonp([29],{\n\n/***/ 850:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return MuteModal; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_redux__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_intl__ = __webpack_require__(7);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_toggle__ = __webpack_require__(882);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_toggle___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_toggle__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__components_button__ = __webpack_require__(100);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__actions_modal__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__actions_accounts__ = __webpack_require__(22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__actions_mutes__ = __webpack_require__(89);\n\n\n\n\n\nvar _dec, _class;\n\n\n\n\n\n\n\n\n\n\n\nvar mapStateToProps = function mapStateToProps(state) {\n return {\n isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n account: state.getIn(['mutes', 'new', 'account']),\n notifications: state.getIn(['mutes', 'new', 'notifications'])\n };\n};\n\nvar mapDispatchToProps = function mapDispatchToProps(dispatch) {\n return {\n onConfirm: function onConfirm(account, notifications) {\n dispatch(Object(__WEBPACK_IMPORTED_MODULE_10__actions_accounts__[\"A\" /* muteAccount */])(account.get('id'), notifications));\n },\n onClose: function onClose() {\n dispatch(Object(__WEBPACK_IMPORTED_MODULE_9__actions_modal__[\"c\" /* closeModal */])());\n },\n onToggleNotifications: function onToggleNotifications() {\n dispatch(Object(__WEBPACK_IMPORTED_MODULE_11__actions_mutes__[\"h\" /* toggleHideNotifications */])());\n }\n };\n};\n\nvar MuteModal = (_dec = Object(__WEBPACK_IMPORTED_MODULE_5_react_redux__[\"connect\"])(mapStateToProps, mapDispatchToProps), _dec(_class = Object(__WEBPACK_IMPORTED_MODULE_6_react_intl__[\"g\" /* injectIntl */])(_class = function (_React$PureComponent) {\n __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(MuteModal, _React$PureComponent);\n\n function MuteModal() {\n var _temp, _this, _ret;\n\n __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, MuteModal);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args))), _this), _this.handleClick = function () {\n _this.props.onClose();\n _this.props.onConfirm(_this.props.account, _this.props.notifications);\n }, _this.handleCancel = function () {\n _this.props.onClose();\n }, _this.setRef = function (c) {\n _this.button = c;\n }, _this.toggleNotifications = function () {\n _this.props.onToggleNotifications();\n }, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);\n }\n\n MuteModal.prototype.componentDidMount = function componentDidMount() {\n this.button.focus();\n };\n\n MuteModal.prototype.render = function render() {\n var _props = this.props,\n account = _props.account,\n notifications = _props.notifications;\n\n\n return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('div', {\n className: 'modal-root__modal mute-modal'\n }, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('div', {\n className: 'mute-modal__container'\n }, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('p', {}, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_6_react_intl__[\"b\" /* FormattedMessage */], {\n id: 'confirmations.mute.message',\n defaultMessage: 'Are you sure you want to mute {name}?',\n values: { name: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('strong', {}, void 0, '@', account.get('acct')) }\n })), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('div', {}, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('label', {\n htmlFor: 'mute-modal__hide-notifications-checkbox'\n }, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_6_react_intl__[\"b\" /* FormattedMessage */], {\n id: 'mute_modal.hide_notifications',\n defaultMessage: 'Hide notifications from this user?'\n }), ' ', __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_7_react_toggle___default.a, {\n id: 'mute-modal__hide-notifications-checkbox',\n checked: notifications,\n onChange: this.toggleNotifications\n })))), __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()('div', {\n className: 'mute-modal__action-bar'\n }, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_8__components_button__[\"a\" /* default */], {\n onClick: this.handleCancel,\n className: 'mute-modal__cancel-button'\n }, void 0, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_6_react_intl__[\"b\" /* FormattedMessage */], {\n id: 'confirmation_modal.cancel',\n defaultMessage: 'Cancel'\n })), __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n __WEBPACK_IMPORTED_MODULE_8__components_button__[\"a\" /* default */],\n { onClick: this.handleClick, ref: this.setRef },\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_jsx___default()(__WEBPACK_IMPORTED_MODULE_6_react_intl__[\"b\" /* FormattedMessage */], {\n id: 'confirmations.mute.confirm',\n defaultMessage: 'Mute'\n })\n )));\n };\n\n return MuteModal;\n}(__WEBPACK_IMPORTED_MODULE_4_react___default.a.PureComponent)) || _class) || _class);\n\n\n/***/ }),\n\n/***/ 882:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if (\"value\" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);\n }\n }return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;\n };\n}();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _classnames = __webpack_require__(10);\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _propTypes = __webpack_require__(5);\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _check = __webpack_require__(883);\n\nvar _check2 = _interopRequireDefault(_check);\n\nvar _x = __webpack_require__(884);\n\nvar _x2 = _interopRequireDefault(_x);\n\nvar _util = __webpack_require__(885);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nfunction _objectWithoutProperties(obj, keys) {\n var target = {};for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;target[i] = obj[i];\n }return target;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar Toggle = function (_PureComponent) {\n _inherits(Toggle, _PureComponent);\n\n function Toggle(props) {\n _classCallCheck(this, Toggle);\n\n var _this = _possibleConstructorReturn(this, (Toggle.__proto__ || Object.getPrototypeOf(Toggle)).call(this, props));\n\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleTouchStart = _this.handleTouchStart.bind(_this);\n _this.handleTouchMove = _this.handleTouchMove.bind(_this);\n _this.handleTouchEnd = _this.handleTouchEnd.bind(_this);\n _this.handleFocus = _this.handleFocus.bind(_this);\n _this.handleBlur = _this.handleBlur.bind(_this);\n _this.previouslyChecked = !!(props.checked || props.defaultChecked);\n _this.state = {\n checked: !!(props.checked || props.defaultChecked),\n hasFocus: false\n };\n return _this;\n }\n\n _createClass(Toggle, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('checked' in nextProps) {\n this.setState({ checked: !!nextProps.checked });\n }\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n var checkbox = this.input;\n if (event.target !== checkbox && !this.moved) {\n this.previouslyChecked = checkbox.checked;\n event.preventDefault();\n checkbox.focus();\n checkbox.click();\n return;\n }\n\n var checked = this.props.hasOwnProperty('checked') ? this.props.checked : checkbox.checked;\n\n this.setState({ checked: checked });\n }\n }, {\n key: 'handleTouchStart',\n value: function handleTouchStart(event) {\n this.startX = (0, _util.pointerCoord)(event).x;\n this.activated = true;\n }\n }, {\n key: 'handleTouchMove',\n value: function handleTouchMove(event) {\n if (!this.activated) return;\n this.moved = true;\n\n if (this.startX) {\n var currentX = (0, _util.pointerCoord)(event).x;\n if (this.state.checked && currentX + 15 < this.startX) {\n this.setState({ checked: false });\n this.startX = currentX;\n this.activated = true;\n } else if (currentX - 15 > this.startX) {\n this.setState({ checked: true });\n this.startX = currentX;\n this.activated = currentX < this.startX + 5;\n }\n }\n }\n }, {\n key: 'handleTouchEnd',\n value: function handleTouchEnd(event) {\n if (!this.moved) return;\n var checkbox = this.input;\n event.preventDefault();\n\n if (this.startX) {\n var endX = (0, _util.pointerCoord)(event).x;\n if (this.previouslyChecked === true && this.startX + 4 > endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: false });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n } else if (this.startX - 4 < endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: true });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n }\n\n this.activated = false;\n this.startX = null;\n this.moved = false;\n }\n }\n }, {\n key: 'handleFocus',\n value: function handleFocus(event) {\n var onFocus = this.props.onFocus;\n\n if (onFocus) {\n onFocus(event);\n }\n\n this.setState({ hasFocus: true });\n }\n }, {\n key: 'handleBlur',\n value: function handleBlur(event) {\n var onBlur = this.props.onBlur;\n\n if (onBlur) {\n onBlur(event);\n }\n\n this.setState({ hasFocus: false });\n }\n }, {\n key: 'getIcon',\n value: function getIcon(type) {\n var icons = this.props.icons;\n\n if (!icons) {\n return null;\n }\n return icons[type] === undefined ? Toggle.defaultProps.icons[type] : icons[type];\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n className = _props.className,\n _icons = _props.icons,\n inputProps = _objectWithoutProperties(_props, ['className', 'icons']);\n\n var classes = (0, _classnames2.default)('react-toggle', {\n 'react-toggle--checked': this.state.checked,\n 'react-toggle--focus': this.state.hasFocus,\n 'react-toggle--disabled': this.props.disabled\n }, className);\n\n return _react2.default.createElement('div', { className: classes,\n onClick: this.handleClick,\n onTouchStart: this.handleTouchStart,\n onTouchMove: this.handleTouchMove,\n onTouchEnd: this.handleTouchEnd }, _react2.default.createElement('div', { className: 'react-toggle-track' }, _react2.default.createElement('div', { className: 'react-toggle-track-check' }, this.getIcon('checked')), _react2.default.createElement('div', { className: 'react-toggle-track-x' }, this.getIcon('unchecked'))), _react2.default.createElement('div', { className: 'react-toggle-thumb' }), _react2.default.createElement('input', _extends({}, inputProps, {\n ref: function ref(_ref) {\n _this2.input = _ref;\n },\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n className: 'react-toggle-screenreader-only',\n type: 'checkbox' })));\n }\n }]);\n\n return Toggle;\n}(_react.PureComponent);\n\nexports.default = Toggle;\n\nToggle.displayName = 'Toggle';\n\nToggle.defaultProps = {\n icons: {\n checked: _react2.default.createElement(_check2.default, null),\n unchecked: _react2.default.createElement(_x2.default, null)\n }\n};\n\nToggle.propTypes = {\n checked: _propTypes2.default.bool,\n disabled: _propTypes2.default.bool,\n defaultChecked: _propTypes2.default.bool,\n onChange: _propTypes2.default.func,\n onFocus: _propTypes2.default.func,\n onBlur: _propTypes2.default.func,\n className: _propTypes2.default.string,\n name: _propTypes2.default.string,\n value: _propTypes2.default.string,\n id: _propTypes2.default.string,\n 'aria-labelledby': _propTypes2.default.string,\n 'aria-label': _propTypes2.default.string,\n icons: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.shape({\n checked: _propTypes2.default.node,\n unchecked: _propTypes2.default.node\n })])\n};\n\n/***/ }),\n\n/***/ 883:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nexports.default = function () {\n return _react2.default.createElement('svg', { width: '14', height: '11', viewBox: '0 0 14 11' }, _react2.default.createElement('title', null, 'switch-check'), _react2.default.createElement('path', { d: 'M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0', fill: '#fff', fillRule: 'evenodd' }));\n};\n\n/***/ }),\n\n/***/ 884:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nexports.default = function () {\n return _react2.default.createElement('svg', { width: '10', height: '10', viewBox: '0 0 10 10' }, _react2.default.createElement('title', null, 'switch-x'), _react2.default.createElement('path', { d: 'M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12', fill: '#fff', fillRule: 'evenodd' }));\n};\n\n/***/ }),\n\n/***/ 885:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.pointerCoord = pointerCoord;\n// Copyright 2015-present Drifty Co.\n// http://drifty.com/\n// from: https://github.com/driftyco/ionic/blob/master/src/util/dom.ts\n\nfunction pointerCoord(event) {\n // get coordinates for either a mouse click\n // or a touch depending on the given event\n if (event) {\n var changedTouches = event.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n var touch = changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n var pageX = event.pageX;\n if (pageX !== undefined) {\n return { x: pageX, y: event.pageY };\n }\n }\n return { x: 0, y: 0 };\n}\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// modals/mute_modal.js","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { injectIntl, FormattedMessage } from 'react-intl';\nimport Toggle from 'react-toggle';\nimport Button from '../../../components/button';\nimport { closeModal } from '../../../actions/modal';\nimport { muteAccount } from '../../../actions/accounts';\nimport { toggleHideNotifications } from '../../../actions/mutes';\n\n\nconst mapStateToProps = state => {\n return {\n isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n account: state.getIn(['mutes', 'new', 'account']),\n notifications: state.getIn(['mutes', 'new', 'notifications']),\n };\n};\n\nconst mapDispatchToProps = dispatch => {\n return {\n onConfirm(account, notifications) {\n dispatch(muteAccount(account.get('id'), notifications));\n },\n\n onClose() {\n dispatch(closeModal());\n },\n\n onToggleNotifications() {\n dispatch(toggleHideNotifications());\n },\n };\n};\n\n@connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class MuteModal extends React.PureComponent {\n\n static propTypes = {\n isSubmitting: PropTypes.bool.isRequired,\n account: PropTypes.object.isRequired,\n notifications: PropTypes.bool.isRequired,\n onClose: PropTypes.func.isRequired,\n onConfirm: PropTypes.func.isRequired,\n onToggleNotifications: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n componentDidMount() {\n this.button.focus();\n }\n\n handleClick = () => {\n this.props.onClose();\n this.props.onConfirm(this.props.account, this.props.notifications);\n }\n\n handleCancel = () => {\n this.props.onClose();\n }\n\n setRef = (c) => {\n this.button = c;\n }\n\n toggleNotifications = () => {\n this.props.onToggleNotifications();\n }\n\n render () {\n const { account, notifications } = this.props;\n\n return (\n <div className='modal-root__modal mute-modal'>\n <div className='mute-modal__container'>\n <p>\n <FormattedMessage\n id='confirmations.mute.message'\n defaultMessage='Are you sure you want to mute {name}?'\n values={{ name: <strong>@{account.get('acct')}</strong> }}\n />\n </p>\n <div>\n <label htmlFor='mute-modal__hide-notifications-checkbox'>\n <FormattedMessage id='mute_modal.hide_notifications' defaultMessage='Hide notifications from this user?' />\n {' '}\n <Toggle id='mute-modal__hide-notifications-checkbox' checked={notifications} onChange={this.toggleNotifications} />\n </label>\n </div>\n </div>\n\n <div className='mute-modal__action-bar'>\n <Button onClick={this.handleCancel} className='mute-modal__cancel-button'>\n <FormattedMessage id='confirmation_modal.cancel' defaultMessage='Cancel' />\n </Button>\n <Button onClick={this.handleClick} ref={this.setRef}>\n <FormattedMessage id='confirmations.mute.confirm' defaultMessage='Mute' />\n </Button>\n </div>\n </div>\n );\n }\n\n}\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/mastodon/features/ui/components/mute_modal.js","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _classnames = require('classnames');\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _check = require('./check');\n\nvar _check2 = _interopRequireDefault(_check);\n\nvar _x = require('./x');\n\nvar _x2 = _interopRequireDefault(_x);\n\nvar _util = require('./util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Toggle = function (_PureComponent) {\n _inherits(Toggle, _PureComponent);\n\n function Toggle(props) {\n _classCallCheck(this, Toggle);\n\n var _this = _possibleConstructorReturn(this, (Toggle.__proto__ || Object.getPrototypeOf(Toggle)).call(this, props));\n\n _this.handleClick = _this.handleClick.bind(_this);\n _this.handleTouchStart = _this.handleTouchStart.bind(_this);\n _this.handleTouchMove = _this.handleTouchMove.bind(_this);\n _this.handleTouchEnd = _this.handleTouchEnd.bind(_this);\n _this.handleFocus = _this.handleFocus.bind(_this);\n _this.handleBlur = _this.handleBlur.bind(_this);\n _this.previouslyChecked = !!(props.checked || props.defaultChecked);\n _this.state = {\n checked: !!(props.checked || props.defaultChecked),\n hasFocus: false\n };\n return _this;\n }\n\n _createClass(Toggle, [{\n key: 'componentWillReceiveProps',\n value: function componentWillReceiveProps(nextProps) {\n if ('checked' in nextProps) {\n this.setState({ checked: !!nextProps.checked });\n }\n }\n }, {\n key: 'handleClick',\n value: function handleClick(event) {\n var checkbox = this.input;\n if (event.target !== checkbox && !this.moved) {\n this.previouslyChecked = checkbox.checked;\n event.preventDefault();\n checkbox.focus();\n checkbox.click();\n return;\n }\n\n var checked = this.props.hasOwnProperty('checked') ? this.props.checked : checkbox.checked;\n\n this.setState({ checked: checked });\n }\n }, {\n key: 'handleTouchStart',\n value: function handleTouchStart(event) {\n this.startX = (0, _util.pointerCoord)(event).x;\n this.activated = true;\n }\n }, {\n key: 'handleTouchMove',\n value: function handleTouchMove(event) {\n if (!this.activated) return;\n this.moved = true;\n\n if (this.startX) {\n var currentX = (0, _util.pointerCoord)(event).x;\n if (this.state.checked && currentX + 15 < this.startX) {\n this.setState({ checked: false });\n this.startX = currentX;\n this.activated = true;\n } else if (currentX - 15 > this.startX) {\n this.setState({ checked: true });\n this.startX = currentX;\n this.activated = currentX < this.startX + 5;\n }\n }\n }\n }, {\n key: 'handleTouchEnd',\n value: function handleTouchEnd(event) {\n if (!this.moved) return;\n var checkbox = this.input;\n event.preventDefault();\n\n if (this.startX) {\n var endX = (0, _util.pointerCoord)(event).x;\n if (this.previouslyChecked === true && this.startX + 4 > endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: false });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n } else if (this.startX - 4 < endX) {\n if (this.previouslyChecked !== this.state.checked) {\n this.setState({ checked: true });\n this.previouslyChecked = this.state.checked;\n checkbox.click();\n }\n }\n\n this.activated = false;\n this.startX = null;\n this.moved = false;\n }\n }\n }, {\n key: 'handleFocus',\n value: function handleFocus(event) {\n var onFocus = this.props.onFocus;\n\n\n if (onFocus) {\n onFocus(event);\n }\n\n this.setState({ hasFocus: true });\n }\n }, {\n key: 'handleBlur',\n value: function handleBlur(event) {\n var onBlur = this.props.onBlur;\n\n\n if (onBlur) {\n onBlur(event);\n }\n\n this.setState({ hasFocus: false });\n }\n }, {\n key: 'getIcon',\n value: function getIcon(type) {\n var icons = this.props.icons;\n\n if (!icons) {\n return null;\n }\n return icons[type] === undefined ? Toggle.defaultProps.icons[type] : icons[type];\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props = this.props,\n className = _props.className,\n _icons = _props.icons,\n inputProps = _objectWithoutProperties(_props, ['className', 'icons']);\n\n var classes = (0, _classnames2.default)('react-toggle', {\n 'react-toggle--checked': this.state.checked,\n 'react-toggle--focus': this.state.hasFocus,\n 'react-toggle--disabled': this.props.disabled\n }, className);\n\n return _react2.default.createElement(\n 'div',\n { className: classes,\n onClick: this.handleClick,\n onTouchStart: this.handleTouchStart,\n onTouchMove: this.handleTouchMove,\n onTouchEnd: this.handleTouchEnd },\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track' },\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track-check' },\n this.getIcon('checked')\n ),\n _react2.default.createElement(\n 'div',\n { className: 'react-toggle-track-x' },\n this.getIcon('unchecked')\n )\n ),\n _react2.default.createElement('div', { className: 'react-toggle-thumb' }),\n _react2.default.createElement('input', _extends({}, inputProps, {\n ref: function ref(_ref) {\n _this2.input = _ref;\n },\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n className: 'react-toggle-screenreader-only',\n type: 'checkbox' }))\n );\n }\n }]);\n\n return Toggle;\n}(_react.PureComponent);\n\nexports.default = Toggle;\n\n\nToggle.displayName = 'Toggle';\n\nToggle.defaultProps = {\n icons: {\n checked: _react2.default.createElement(_check2.default, null),\n unchecked: _react2.default.createElement(_x2.default, null)\n }\n};\n\nToggle.propTypes = {\n checked: _propTypes2.default.bool,\n disabled: _propTypes2.default.bool,\n defaultChecked: _propTypes2.default.bool,\n onChange: _propTypes2.default.func,\n onFocus: _propTypes2.default.func,\n onBlur: _propTypes2.default.func,\n className: _propTypes2.default.string,\n name: _propTypes2.default.string,\n value: _propTypes2.default.string,\n id: _propTypes2.default.string,\n 'aria-labelledby': _propTypes2.default.string,\n 'aria-label': _propTypes2.default.string,\n icons: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.shape({\n checked: _propTypes2.default.node,\n unchecked: _propTypes2.default.node\n })])\n};\n\n\n// WEBPACK FOOTER //\n// ./node_modules/react-toggle/dist/component/index.js","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n return _react2.default.createElement(\n 'svg',\n { width: '14', height: '11', viewBox: '0 0 14 11' },\n _react2.default.createElement(\n 'title',\n null,\n 'switch-check'\n ),\n _react2.default.createElement('path', { d: 'M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0', fill: '#fff', fillRule: 'evenodd' })\n );\n};\n\n\n// WEBPACK FOOTER //\n// ./node_modules/react-toggle/dist/component/check.js","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n return _react2.default.createElement(\n 'svg',\n { width: '10', height: '10', viewBox: '0 0 10 10' },\n _react2.default.createElement(\n 'title',\n null,\n 'switch-x'\n ),\n _react2.default.createElement('path', { d: 'M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12', fill: '#fff', fillRule: 'evenodd' })\n );\n};\n\n\n// WEBPACK FOOTER //\n// ./node_modules/react-toggle/dist/component/x.js","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.pointerCoord = pointerCoord;\n// Copyright 2015-present Drifty Co.\n// http://drifty.com/\n// from: https://github.com/driftyco/ionic/blob/master/src/util/dom.ts\n\nfunction pointerCoord(event) {\n // get coordinates for either a mouse click\n // or a touch depending on the given event\n if (event) {\n var changedTouches = event.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n var touch = changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n var pageX = event.pageX;\n if (pageX !== undefined) {\n return { x: pageX, y: event.pageY };\n }\n }\n return { x: 0, y: 0 };\n}\n\n\n// WEBPACK FOOTER //\n// ./node_modules/react-toggle/dist/component/util.js"],"sourceRoot":""}