webpackJsonp([127],{ /***/ 1031: /***/ (function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(1123), baseMatchesProperty = __webpack_require__(1139), identity = __webpack_require__(948), isArray = __webpack_require__(865), property = __webpack_require__(1142); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /***/ 1032: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(872); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /***/ 1033: /***/ (function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ 1034: /***/ (function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ 1035: /***/ (function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ 1036: /***/ (function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(872), Map = __webpack_require__(876), MapCache = __webpack_require__(877); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /***/ 1037: /***/ (function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ 1038: /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(304), isLength = __webpack_require__(875), isObjectLike = __webpack_require__(302); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ 1039: /***/ (function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ 1040: /***/ (function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(877), setCacheAdd = __webpack_require__(1126), setCacheHas = __webpack_require__(1127); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /***/ 1041: /***/ (function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /***/ 1042: /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(866), root = __webpack_require__(170); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /***/ 1055: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _reactLifecyclesCompat = __webpack_require__(7); var _rcUpload = _interopRequireDefault(__webpack_require__(1152)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _uniqBy = _interopRequireDefault(__webpack_require__(1159)); var _findIndex = _interopRequireDefault(__webpack_require__(1168)); var _UploadList = _interopRequireDefault(__webpack_require__(1169)); var _utils = __webpack_require__(1058); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(73)); var _default2 = _interopRequireDefault(__webpack_require__(180)); var _configProvider = __webpack_require__(11); var _warning = _interopRequireDefault(__webpack_require__(43)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _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; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a 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); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Upload = /*#__PURE__*/ function (_React$Component) { _inherits(Upload, _React$Component); function Upload(props) { var _this; _classCallCheck(this, Upload); _this = _possibleConstructorReturn(this, _getPrototypeOf(Upload).call(this, props)); _this.saveUpload = function (node) { _this.upload = node; }; _this.onStart = function (file) { var fileList = _this.state.fileList; var targetItem = (0, _utils.fileToObject)(file); targetItem.status = 'uploading'; var nextFileList = fileList.concat(); var fileIndex = (0, _findIndex["default"])(nextFileList, function (_ref) { var uid = _ref.uid; return uid === targetItem.uid; }); if (fileIndex === -1) { nextFileList.push(targetItem); } else { nextFileList[fileIndex] = targetItem; } _this.onChange({ file: targetItem, fileList: nextFileList }); // fix ie progress if (!window.File || Object({"NODE_ENV":"production","PUBLIC_URL":"/react/build/."}).TEST_IE) { _this.autoUpdateProgress(0, targetItem); } }; _this.onSuccess = function (response, file, xhr) { _this.clearProgressTimer(); try { if (typeof response === 'string') { response = JSON.parse(response); } } catch (e) { /* do nothing */ } var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.status = 'done'; targetItem.response = response; targetItem.xhr = xhr; _this.onChange({ file: _extends({}, targetItem), fileList: fileList }); }; _this.onProgress = function (e, file) { var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.percent = e.percent; _this.onChange({ event: e, file: _extends({}, targetItem), fileList: fileList }); }; _this.onError = function (error, response, file) { _this.clearProgressTimer(); var fileList = _this.state.fileList; var targetItem = (0, _utils.getFileItem)(file, fileList); // removed if (!targetItem) { return; } targetItem.error = error; targetItem.response = response; targetItem.status = 'error'; _this.onChange({ file: _extends({}, targetItem), fileList: fileList }); }; _this.handleRemove = function (file) { var onRemove = _this.props.onRemove; var fileList = _this.state.fileList; Promise.resolve(typeof onRemove === 'function' ? onRemove(file) : onRemove).then(function (ret) { // Prevent removing file if (ret === false) { return; } var removedFileList = (0, _utils.removeFileItem)(file, fileList); if (removedFileList) { file.status = 'removed'; // eslint-disable-line if (_this.upload) { _this.upload.abort(file); } _this.onChange({ file: file, fileList: removedFileList }); } }); }; _this.onChange = function (info) { if (!('fileList' in _this.props)) { _this.setState({ fileList: info.fileList }); } var onChange = _this.props.onChange; if (onChange) { onChange(info); } }; _this.onFileDrop = function (e) { _this.setState({ dragState: e.type }); }; _this.beforeUpload = function (file, fileList) { var beforeUpload = _this.props.beforeUpload; var stateFileList = _this.state.fileList; if (!beforeUpload) { return true; } var result = beforeUpload(file, fileList); if (result === false) { _this.onChange({ file: file, fileList: (0, _uniqBy["default"])(stateFileList.concat(fileList.map(_utils.fileToObject)), function (item) { return item.uid; }) }); return false; } if (result && result.then) { return result; } return true; }; _this.renderUploadList = function (locale) { var _this$props = _this.props, showUploadList = _this$props.showUploadList, listType = _this$props.listType, onPreview = _this$props.onPreview, onDownload = _this$props.onDownload, previewFile = _this$props.previewFile, disabled = _this$props.disabled, propLocale = _this$props.locale; var showRemoveIcon = showUploadList.showRemoveIcon, showPreviewIcon = showUploadList.showPreviewIcon, showDownloadIcon = showUploadList.showDownloadIcon; var fileList = _this.state.fileList; return React.createElement(_UploadList["default"], { listType: listType, items: fileList, previewFile: previewFile, onPreview: onPreview, onDownload: onDownload, onRemove: _this.handleRemove, showRemoveIcon: !disabled && showRemoveIcon, showPreviewIcon: showPreviewIcon, showDownloadIcon: showDownloadIcon, locale: _extends(_extends({}, locale), propLocale) }); }; _this.renderUpload = function (_ref2) { var _classNames2; var getPrefixCls = _ref2.getPrefixCls; var _this$props2 = _this.props, customizePrefixCls = _this$props2.prefixCls, className = _this$props2.className, showUploadList = _this$props2.showUploadList, listType = _this$props2.listType, type = _this$props2.type, disabled = _this$props2.disabled, children = _this$props2.children, style = _this$props2.style; var _this$state = _this.state, fileList = _this$state.fileList, dragState = _this$state.dragState; var prefixCls = getPrefixCls('upload', customizePrefixCls); var rcUploadProps = _extends(_extends({ onStart: _this.onStart, onError: _this.onError, onProgress: _this.onProgress, onSuccess: _this.onSuccess }, _this.props), { prefixCls: prefixCls, beforeUpload: _this.beforeUpload }); delete rcUploadProps.className; delete rcUploadProps.style; var uploadList = showUploadList ? React.createElement(_LocaleReceiver["default"], { componentName: "Upload", defaultLocale: _default2["default"].Upload }, _this.renderUploadList) : null; if (type === 'drag') { var _classNames; var dragCls = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-drag"), true), _defineProperty(_classNames, "".concat(prefixCls, "-drag-uploading"), fileList.some(function (file) { return file.status === 'uploading'; })), _defineProperty(_classNames, "".concat(prefixCls, "-drag-hover"), dragState === 'dragover'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames), className); return React.createElement("span", null, React.createElement("div", { className: dragCls, onDrop: _this.onFileDrop, onDragOver: _this.onFileDrop, onDragLeave: _this.onFileDrop, style: style }, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, { ref: _this.saveUpload, className: "".concat(prefixCls, "-btn") }), React.createElement("div", { className: "".concat(prefixCls, "-drag-container") }, children))), uploadList); } var uploadButtonCls = (0, _classnames["default"])(prefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-select"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-select-").concat(listType), true), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2)); // Remove id to avoid open by label when trigger is hidden // https://github.com/ant-design/ant-design/issues/14298 // https://github.com/ant-design/ant-design/issues/16478 if (!children || disabled) { delete rcUploadProps.id; } var uploadButton = React.createElement("div", { className: uploadButtonCls, style: children ? undefined : { display: 'none' } }, React.createElement(_rcUpload["default"], _extends({}, rcUploadProps, { ref: _this.saveUpload }))); if (listType === 'picture-card') { return React.createElement("span", { className: (0, _classnames["default"])(className, "".concat(prefixCls, "-picture-card-wrapper")) }, uploadList, uploadButton); } return React.createElement("span", { className: className }, uploadButton, uploadList); }; _this.state = { fileList: props.fileList || props.defaultFileList || [], dragState: 'drop' }; (0, _warning["default"])('fileList' in props || !('value' in props), 'Upload', '`value` is not validate prop, do you mean `fileList`?'); return _this; } _createClass(Upload, [{ key: "componentWillUnmount", value: function componentWillUnmount() { this.clearProgressTimer(); } }, { key: "clearProgressTimer", value: function clearProgressTimer() { clearInterval(this.progressTimer); } }, { key: "autoUpdateProgress", value: function autoUpdateProgress(_, file) { var _this2 = this; var getPercent = (0, _utils.genPercentAdd)(); var curPercent = 0; this.clearProgressTimer(); this.progressTimer = setInterval(function () { curPercent = getPercent(curPercent); _this2.onProgress({ percent: curPercent * 100 }, file); }, 200); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderUpload); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('fileList' in nextProps) { return { fileList: nextProps.fileList || [] }; } return null; } }]); return Upload; }(React.Component); Upload.defaultProps = { type: 'select', multiple: false, action: '', data: {}, accept: '', beforeUpload: _utils.T, showUploadList: true, listType: 'text', className: '', disabled: false, supportServerRender: true }; (0, _reactLifecyclesCompat.polyfill)(Upload); var _default = Upload; exports["default"] = _default; //# sourceMappingURL=Upload.js.map /***/ }), /***/ 1056: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = uid; var now = +new Date(); var index = 0; function uid() { return "rc-upload-" + now + "-" + ++index; } /***/ }), /***/ 1057: /***/ (function(module, exports) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /***/ 1058: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.T = T; exports.fileToObject = fileToObject; exports.genPercentAdd = genPercentAdd; exports.getFileItem = getFileItem; exports.removeFileItem = removeFileItem; exports.previewImage = previewImage; exports.isImageUrl = void 0; function _extends() { _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; }; return _extends.apply(this, arguments); } function T() { return true; } // Fix IE file.status problem // via coping a new Object function fileToObject(file) { return _extends(_extends({}, file), { lastModified: file.lastModified, lastModifiedDate: file.lastModifiedDate, name: file.name, size: file.size, type: file.type, uid: file.uid, percent: 0, originFileObj: file }); } /** * 生成Progress percent: 0.1 -> 0.98 * - for ie */ function genPercentAdd() { var k = 0.1; var i = 0.01; var end = 0.98; return function (s) { var start = s; if (start >= end) { return start; } start += k; k -= i; if (k < 0.001) { k = 0.001; } return start; }; } function getFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; return fileList.filter(function (item) { return item[matchKey] === file[matchKey]; })[0]; } function removeFileItem(file, fileList) { var matchKey = file.uid !== undefined ? 'uid' : 'name'; var removed = fileList.filter(function (item) { return item[matchKey] !== file[matchKey]; }); if (removed.length === fileList.length) { return null; } return removed; } // ==================== Default Image Preview ==================== var extname = function extname() { var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var temp = url.split('/'); var filename = temp[temp.length - 1]; var filenameWithoutSuffix = filename.split(/#|\?/)[0]; return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0]; }; var isImageFileType = function isImageFileType(type) { return !!type && type.indexOf('image/') === 0; }; var isImageUrl = function isImageUrl(file) { if (isImageFileType(file.type)) { return true; } var url = file.thumbUrl || file.url; var extension = extname(url); if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(extension)) { return true; } if (/^data:/.test(url)) { // other file types of base64 return false; } if (extension) { // other file types which have extension return false; } return true; }; exports.isImageUrl = isImageUrl; var MEASURE_SIZE = 200; function previewImage(file) { return new Promise(function (resolve) { if (!isImageFileType(file.type)) { resolve(''); return; } var canvas = document.createElement('canvas'); canvas.width = MEASURE_SIZE; canvas.height = MEASURE_SIZE; canvas.style.cssText = "position: fixed; left: 0; top: 0; width: ".concat(MEASURE_SIZE, "px; height: ").concat(MEASURE_SIZE, "px; z-index: 9999; display: none;"); document.body.appendChild(canvas); var ctx = canvas.getContext('2d'); var img = new Image(); img.onload = function () { var width = img.width, height = img.height; var drawWidth = MEASURE_SIZE; var drawHeight = MEASURE_SIZE; var offsetX = 0; var offsetY = 0; if (width < height) { drawHeight = height * (MEASURE_SIZE / width); offsetY = -(drawHeight - drawWidth) / 2; } else { drawWidth = width * (MEASURE_SIZE / height); offsetX = -(drawWidth - drawHeight) / 2; } ctx.drawImage(img, offsetX, offsetY, drawWidth, drawHeight); var dataURL = canvas.toDataURL(); document.body.removeChild(canvas); resolve(dataURL); }; img.src = window.URL.createObjectURL(file); }); } //# sourceMappingURL=utils.js.map /***/ }), /***/ 1079: /***/ (function(module, exports, __webpack_require__) { var DataView = __webpack_require__(1135), Map = __webpack_require__(876), Promise = __webpack_require__(1136), Set = __webpack_require__(1042), WeakMap = __webpack_require__(1137), baseGetTag = __webpack_require__(304), toSource = __webpack_require__(889); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /***/ 1082: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(29); __webpack_require__(1150); __webpack_require__(1100); __webpack_require__(173); //# sourceMappingURL=css.js.map /***/ }), /***/ 1083: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Upload = _interopRequireDefault(__webpack_require__(1055)); var _Dragger = _interopRequireDefault(__webpack_require__(1170)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Upload["default"].Dragger = _Dragger["default"]; var _default = _Upload["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 1084: /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(1132), stubArray = __webpack_require__(1119); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /***/ 1100: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(29); __webpack_require__(1108); //# sourceMappingURL=css.js.map /***/ }), /***/ 1101: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _progress = _interopRequireDefault(__webpack_require__(1110)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _progress["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /***/ 1102: /***/ (function(module, exports) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /***/ 1108: /***/ (function(module, exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a \n ' + domainScript + '\n \n
\n \n \n