29 lines
883 KiB
JavaScript
29 lines
883 KiB
JavaScript
|
|
"use strict";var e=["data","rowHeight","renderRow","overscanCount"],t=["childFactory","transitionLeave","transitionName","transitionAppear","transitionEnter","transitionLeaveTimeout","transitionEnterTimeout","transitionAppearTimeout","component"];function n(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function r(e){var t="function"==typeof Map?new Map:void 0;return(r=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return i(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)})(e)}function i(e,t,n){return(i=o()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&g(i,n.prototype),i}).apply(null,arguments)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){s(o,r,i,a,l,"next",e)}function l(e){s(o,r,i,a,l,"throw",e)}a(void 0)}))}}function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,g(e,t)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Uppywithpolyfills=e()}}((function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){t.exports=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Mat
|
||
|
|
/*!
|
||
|
|
Copyright (c) 2018 Jed Watson.
|
||
|
|
Licensed under the MIT License (MIT), see
|
||
|
|
http://jedwatson.github.io/classnames
|
||
|
|
*/
|
||
|
|
!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)t.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&t.push(a)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var s in i)e.call(i,s)&&i[s]&&t.push(s);else t.push(i.toString())}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):window.classNames=n}()},{}],8:[function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}void 0!==t&&(t.exports=r),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],9:[function(e,t,n){e("../modules/es.symbol"),e("../modules/es.symbol.description"),e("../modules/es.symbol.async-iterator"),e("../modules/es.symbol.has-instance"),e("../modules/es.symbol.is-concat-spreadable"),e("../modules/es.symbol.iterator"),e("../modules/es.symbol.match"),e("../modules/es.symbol.match-all"),e("../modules/es.symbol.replace"),e("../modules/es.symbol.search"),e("../modules/es.symbol.species"),e("../modules/es.symbol.split"),e("../modules/es.symbol.to-primitive"),e("../modules/es.symbol.to-string-tag"),e("../modules/es.symbol.unscopables"),e("../modules/es.aggregate-error"),e("../modules/es.array.concat"),e("../modules/es.array.copy-within"),e("../modules/es.array.every"),e("../modules/es.array.fill"),e("../modules/es.array.filter"),e("../modules/es.array.find"),e("../modules/es.array.find-index"),e("../modules/es.array.flat"),e("../modules/es.array.flat-map"),e("../modules/es.array.for-each"),e("../modules/es.array.from"),e("../modules/es.array.includes"),e("../modules/es.array.index-of"),e("../modules/es.array.is-array"),e("../modules/es.array.iterator"),e("../modules/es.array.join"),e("../modules/es.array.last-index-of"),e("../modules/es.array.map"),e("../modules/es.array.of"),e("../modules/es.array.reduce"),e("../modules/es.array.reduce-right"),e("../modules/es.array.reverse"),e("../modules/es.array.slice"),e("../modules/es.array.some"),e("../modules/es.array.sort"),e("../modules/es.array.species"),e("../modules/es.array.splice"),e("../modules/es.array.unscopables.flat"),e("../modules/es.array.unscopables.flat-map"),e("../modules/es.array-buffer.constructor"),e("../modules/es.array-buffer.is-view"),e("../modules/es.array-buffer.slice"),e("../modules/es.data-view"),e("../modules/es.date.get-year"),e("../modules/es.date.now"),e("../modules/es.date.set-year"),e("../modules/es.date.to-gmt-string"),e("../modules/es.date.to-iso-string"),e("../modules/es.date.to-json"),e("../modules/es.date.to-primitive"),e("../modules/es.date.to-string"),e("../modules/es.escape"),e("../modules/es.function.bind"),e("../modules/es.function.has-instance"),e("../modules/es.function.name"),e("../modules/es.global-this"),e("../modules/es.json.stringify"),e("../modules/es.json.to-string-tag"),e("../modules/es.map"),e("../modules/es.math.acosh"),e("../modules/es.math.asinh
|
||
|
|
/*!
|
||
|
|
* Cropper.js v1.5.7
|
||
|
|
* https://fengyuanchen.github.io/cropperjs
|
||
|
|
*
|
||
|
|
* Copyright 2015-present Chen Fengyuan
|
||
|
|
* Released under the MIT license
|
||
|
|
*
|
||
|
|
* Date: 2020-05-23T05:23:00.081Z
|
||
|
|
*/
|
||
|
|
!function(e,r){"object"==typeof n&&void 0!==t?t.exports=r():(e=e||self).Cropper=r()}(this,(function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l="undefined"!=typeof window&&void 0!==window.document,u=l?window:{},c=!(!l||!u.document.documentElement)&&"ontouchstart"in u.document.documentElement,p=!!l&&"PointerEvent"in u,d="cropper",f="all",h="crop",g="move",m="zoom",y="e",v="w",b="s",w="n",x="ne",S="nw",k="se",E="sw",j="".concat(d,"-crop"),P="".concat(d,"-disabled"),O="".concat(d,"-hidden"),A="".concat(d,"-hide"),T="".concat(d,"-invisible"),R="".concat(d,"-modal"),_="".concat(d,"-move"),C="".concat(d,"Action"),F="".concat(d,"Preview"),I="crop",U="move",D="none",M="crop",N="cropend",B="cropmove",L="cropstart",z="dblclick",q=p?"pointerdown":c?"touchstart":"mousedown",H=p?"pointermove":c?"touchmove":"mousemove",V=p?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",W="ready",G="resize",X="wheel",Y="zoom",K="image/jpeg",$=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,J=/^data:/,Q=/^data:image\/jpeg;base64,/,Z=/^img|canvas$/i,ee={viewMode:0,dragMode:I,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},te=Number.isNaN||u.isNaN;function ne(e){return"number"==typeof e&&!te(e)}var re=function(e){return e>0&&e<1/0};function ie(e){return void 0===e}function oe(t){return"object"===e(t)&&null!==t}var ae=Object.prototype.hasOwnProperty;function se(e){if(!oe(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ae.call(n,"isPrototypeOf")}catch(e){return!1}}function le(e){return"function"==typeof e}var ue=Array.prototype.slice;function ce(e){return Array.from?Array.from(e):ue.call(e)}function pe(e,t){return e&&le(t)&&(Array.isArray(e)||ne(e.length)?ce(e).forEach((f
|
||
|
|
/**
|
||
|
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
||
|
|
* and replaces it with values from options `{smart_count: 5}`
|
||
|
|
*
|
||
|
|
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
|
||
|
|
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
|
||
|
|
*
|
||
|
|
* @param {string} phrase that needs interpolation, with placeholders
|
||
|
|
* @param {object} options with values that will be used to replace placeholders
|
||
|
|
* @returns {any[]} interpolated
|
||
|
|
*/function u(e,t){var n=/\$/g,r=[e];if(null==t)return r;for(var i=0,o=Object.keys(t);i<o.length;i++){var a=o[i];if("_"!==a){var s=t[a];"string"==typeof s&&(s=n[Symbol.replace](s,"$$$$")),r=l(r,new RegExp("%\\{"+a+"\\}","g"),s)}}return r}function c(e){if(null!=e&&e.strings){var t=this.locale;this.locale=Object.assign({},t,{strings:Object.assign({},t.strings,e.strings)}),this.locale.pluralize=e.pluralize||t.pluralize}}t.exports=(r=a("apply"),function(){function e(e){Object.defineProperty(this,r,{value:c}),this.locale={strings:{},pluralize:function(e){return 1===e?0:1}},Array.isArray(e)?e.forEach(i(this,r)[r],this):i(this,r)[r](e)}var t=e.prototype;return t.translate=function(e,t){return this.translateArray(e,t).join("")},t.translateArray=function(e,t){if(!s(this.locale.strings,e))throw new Error("missing string: "+e);var n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count)return u(n[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return u(n,t)},e}())},{"./hasProperty":773}],752:[function(e,t,n){t.exports=function(e,t,n){return new Promise((function(r){e.toBlob(r,t,n)}))}},{}],753:[function(e,t,n){var r=/^data:([^/]+\/[^,;]+(?:[^,]*?))(;base64)?,([\s\S]*)$/;t.exports=function(e,t,n){var i,o,a,s=r.exec(e),l=null!=(i=null!=(o=t.mimeType)?o:null==s?void 0:s[1])?i:"plain/text";if(null!=s[2]){for(var u=atob(decodeURIComponent(s[3])),c=new Uint8Array(u.length),p=0;p<u.length;p++)c[p]=u.charCodeAt(p);a=[c]}else a=[decodeURIComponent(s[3])];return n?new File(a,t.name||"",{type:l}):new Blob(a,{type:l})}},{}],754:[function(e,t,n){var r=e("./AbortController").createAbortError;t.exports=function(e,t){return new Promise((function(n,i){var o,a;if(null!=t&&null!=(o=t.signal)&&o.aborted)return i(r());var s=setTimeout((function(){u(),n()}),e);function l(){clearTimeout(s),u(),i(r())}function u(){var e;null==t||null==(e=t.signal)||e.removeEventListener("abort",l)}null==t||null==(a=t.signal)||a.addEventListener("abort",l)}))}},{"./AbortController":745}],755:[function(e,t,n){var r=e("lodash.throttle");t.exports=r((function(e,t,n){var r=t.progress,i=t.bytesUploaded,o=t.bytesTotal;r&&(e.uppy.log("Upload progress: "+r),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:i,bytesTotal:o}))}),300,{leading:!0,trailing:!0})},{"lodash.throttle":587}],756:[function(e,t,n){var r=e("./NetworkError");t.exports=function(){return fetch.apply(void 0,arguments).catch((function(e){throw"AbortError"===e.name?e:new r(e)}))}},{"./NetworkError":748}],757:[function(e,t,n){var r=e("./isDOMElement");t.exports=function(e){if("string"==typeof e){var t=document.querySelectorAll(e);return 0===t.length?null:Array.from(t)}return"object"==typeof e&&r(e)?[e]:null}},{"./isDOMElement":774}],758:[function(e,t,n){var r=e("./isDOMElement");t.exports=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):r(e)?e:null}},{"./isDOMElement":774}],759:[function(e,t,n){function r(e){var t="";return e.replace(/[^A-Z0-9]/gi,(function(e){return t+="-"+function(e){return e.charCodeAt(0).toString(32)}(e),"/"}))+t}t.exports=function(e){var t="uppy";return"string"==typeof e.name&&(t+="-"+r(e.name.toLowerCase())),void 0!==e.type&&(t+="-"+e.type),e.meta&&"string"==typeof e.meta.relativePath&&(t+="-"+r(e.meta.relativePath.toLowerCase())),void 0!==e.data.size&&(t+="-"+e.data.size),void 0!==e.data.lastModified&&(t+="-"+e.data.lastModified),t}},{}],760:[function(e,t,n){t.exports=function(e){return e.bytesTotal-e.bytesUploaded}},{}],761:[function(e,t,n){var r=e("./utils/webkitGetAsEntryApi/index"),i=e("./utils/fallbackApi");t.exports=function(e,t){var n,o=(void 0===t?{}:t).logDropError,a=void 0===o?function(){}:o;return null!=(n=e.items)&&n[0]&&"webkitGetAsEntry"in e.items[0]?r(e,a):i(e)}},{"./utils/fallbackApi":762,"./utils/webkitGetAsEntryApi/index":765}],762:[function(e,t,n){var r=e("../../toArray");t.exports=function(e){var t=r(e.files);return Promise.resolve(t)}},{"../../toArray":784}],763:[function(e,t,n){t.exports=function e(t,n,r,i
|
||
|
|
//# sourceMappingURL=./packages/uppy/dist/uppy.legacy.min.js.map
|