(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendor"],{

/***/ "./node_modules/dropzone/dist/dropzone.js":
/*!************************************************!*\
  !*** ./node_modules/dropzone/dist/dropzone.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(module) {\n\nfunction _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); }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _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); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n *\n * More info at [www.dropzonejs.com](http://www.dropzonejs.com)\n *\n * Copyright (c) 2012, Matias Meno\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n// The Emitter class provides the ability to call `.on()` on Dropzone to listen\n// to events.\n// It is strongly based on component's emitter class, and I removed the\n// functionality because of the dependency hell with different frameworks.\nvar Emitter =\n/*#__PURE__*/\nfunction () {\n  function Emitter() {\n    _classCallCheck(this, Emitter);\n  }\n\n  _createClass(Emitter, [{\n    key: \"on\",\n    // Add an event listener for given event\n    value: function on(event, fn) {\n      this._callbacks = this._callbacks || {}; // Create namespace for this event\n\n      if (!this._callbacks[event]) {\n        this._callbacks[event] = [];\n      }\n\n      this._callbacks[event].push(fn);\n\n      return this;\n    }\n  }, {\n    key: \"emit\",\n    value: function emit(event) {\n      this._callbacks = this._callbacks || {};\n      var callbacks = this._callbacks[event];\n\n      if (callbacks) {\n        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n          args[_key - 1] = arguments[_key];\n        }\n\n        var _iteratorNormalCompletion = true;\n        var _didIteratorError = false;\n        var _iteratorError = undefined;\n\n        try {\n          for (var _iterator = callbacks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n            var callback = _step.value;\n            callback.apply(this, args);\n          }\n        } catch (err) {\n          _didIteratorError = true;\n          _iteratorError = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion && _iterator[\"return\"] != null) {\n              _iterator[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError) {\n              throw _iteratorError;\n            }\n          }\n        }\n      }\n\n      return this;\n    } // Remove event listener for given event. If fn is not provided, all event\n    // listeners for that event will be removed. If neither is provided, all\n    // event listeners will be removed.\n\n  }, {\n    key: \"off\",\n    value: function off(event, fn) {\n      if (!this._callbacks || arguments.length === 0) {\n        this._callbacks = {};\n        return this;\n      } // specific event\n\n\n      var callbacks = this._callbacks[event];\n\n      if (!callbacks) {\n        return this;\n      } // remove all handlers\n\n\n      if (arguments.length === 1) {\n        delete this._callbacks[event];\n        return this;\n      } // remove specific handler\n\n\n      for (var i = 0; i < callbacks.length; i++) {\n        var callback = callbacks[i];\n\n        if (callback === fn) {\n          callbacks.splice(i, 1);\n          break;\n        }\n      }\n\n      return this;\n    }\n  }]);\n\n  return Emitter;\n}();\n\nvar Dropzone =\n/*#__PURE__*/\nfunction (_Emitter) {\n  _inherits(Dropzone, _Emitter);\n\n  _createClass(Dropzone, null, [{\n    key: \"initClass\",\n    value: function initClass() {\n      // Exposing the emitter class, mainly for tests\n      this.prototype.Emitter = Emitter;\n      /*\n       This is a list of all available events you can register on a dropzone object.\n        You can register an event handler like this:\n        dropzone.on(\"dragEnter\", function() { });\n        */\n\n      this.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\n      this.prototype.defaultOptions = {\n        /**\n         * Has to be specified on elements other than form (or when the form\n         * doesn't have an `action` attribute). You can also\n         * provide a function that will be called with `files` and\n         * must return the url (since `v3.12.0`)\n         */\n        url: null,\n\n        /**\n         * Can be changed to `\"put\"` if necessary. You can also provide a function\n         * that will be called with `files` and must return the method (since `v3.12.0`).\n         */\n        method: \"post\",\n\n        /**\n         * Will be set on the XHRequest.\n         */\n        withCredentials: false,\n\n        /**\n         * The timeout for the XHR requests in milliseconds (since `v4.4.0`).\n         */\n        timeout: 30000,\n\n        /**\n         * How many file uploads to process in parallel (See the\n         * Enqueuing file uploads documentation section for more info)\n         */\n        parallelUploads: 2,\n\n        /**\n         * Whether to send multiple files in one request. If\n         * this it set to true, then the fallback file input element will\n         * have the `multiple` attribute as well. This option will\n         * also trigger additional events (like `processingmultiple`). See the events\n         * documentation section for more information.\n         */\n        uploadMultiple: false,\n\n        /**\n         * Whether you want files to be uploaded in chunks to your server. This can't be\n         * used in combination with `uploadMultiple`.\n         *\n         * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.\n         */\n        chunking: false,\n\n        /**\n         * If `chunking` is enabled, this defines whether **every** file should be chunked,\n         * even if the file size is below chunkSize. This means, that the additional chunk\n         * form data will be submitted and the `chunksUploaded` callback will be invoked.\n         */\n        forceChunking: false,\n\n        /**\n         * If `chunking` is `true`, then this defines the chunk size in bytes.\n         */\n        chunkSize: 2000000,\n\n        /**\n         * If `true`, the individual chunks of a file are being uploaded simultaneously.\n         */\n        parallelChunkUploads: false,\n\n        /**\n         * Whether a chunk should be retried if it fails.\n         */\n        retryChunks: false,\n\n        /**\n         * If `retryChunks` is true, how many times should it be retried.\n         */\n        retryChunksLimit: 3,\n\n        /**\n         * If not `null` defines how many files this Dropzone handles. If it exceeds,\n         * the event `maxfilesexceeded` will be called. The dropzone element gets the\n         * class `dz-max-files-reached` accordingly so you can provide visual feedback.\n         */\n        maxFilesize: 256,\n\n        /**\n         * The name of the file param that gets transferred.\n         * **NOTE**: If you have the option  `uploadMultiple` set to `true`, then\n         * Dropzone will append `[]` to the name.\n         */\n        paramName: \"file\",\n\n        /**\n         * Whether thumbnails for images should be generated\n         */\n        createImageThumbnails: true,\n\n        /**\n         * In MB. When the filename exceeds this limit, the thumbnail will not be generated.\n         */\n        maxThumbnailFilesize: 10,\n\n        /**\n         * If `null`, the ratio of the image will be used to calculate it.\n         */\n        thumbnailWidth: 120,\n\n        /**\n         * The same as `thumbnailWidth`. If both are null, images will not be resized.\n         */\n        thumbnailHeight: 120,\n\n        /**\n         * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.\n         * Can be either `contain` or `crop`.\n         */\n        thumbnailMethod: 'crop',\n\n        /**\n         * If set, images will be resized to these dimensions before being **uploaded**.\n         * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect\n         * ratio of the file will be preserved.\n         *\n         * The `options.transformFile` function uses these options, so if the `transformFile` function\n         * is overridden, these options don't do anything.\n         */\n        resizeWidth: null,\n\n        /**\n         * See `resizeWidth`.\n         */\n        resizeHeight: null,\n\n        /**\n         * The mime type of the resized image (before it gets uploaded to the server).\n         * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.\n         * See `resizeWidth` for more information.\n         */\n        resizeMimeType: null,\n\n        /**\n         * The quality of the resized images. See `resizeWidth`.\n         */\n        resizeQuality: 0.8,\n\n        /**\n         * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.\n         * Can be either `contain` or `crop`.\n         */\n        resizeMethod: 'contain',\n\n        /**\n         * The base that is used to calculate the filesize. You can change this to\n         * 1024 if you would rather display kibibytes, mebibytes, etc...\n         * 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte` not `1 kilobyte`.\n         * You can change this to `1024` if you don't care about validity.\n         */\n        filesizeBase: 1000,\n\n        /**\n         * Can be used to limit the maximum number of files that will be handled by this Dropzone\n         */\n        maxFiles: null,\n\n        /**\n         * An optional object to send additional headers to the server. Eg:\n         * `{ \"My-Awesome-Header\": \"header value\" }`\n         */\n        headers: null,\n\n        /**\n         * If `true`, the dropzone element itself will be clickable, if `false`\n         * nothing will be clickable.\n         *\n         * You can also pass an HTML element, a CSS selector (for multiple elements)\n         * or an array of those. In that case, all of those elements will trigger an\n         * upload when clicked.\n         */\n        clickable: true,\n\n        /**\n         * Whether hidden files in directories should be ignored.\n         */\n        ignoreHiddenFiles: true,\n\n        /**\n         * The default implementation of `accept` checks the file's mime type or\n         * extension against this list. This is a comma separated list of mime\n         * types or file extensions.\n         *\n         * Eg.: `image/*,application/pdf,.psd`\n         *\n         * If the Dropzone is `clickable` this option will also be used as\n         * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n         * parameter on the hidden file input as well.\n         */\n        acceptedFiles: null,\n\n        /**\n         * **Deprecated!**\n         * Use acceptedFiles instead.\n         */\n        acceptedMimeTypes: null,\n\n        /**\n         * If false, files will be added to the queue but the queue will not be\n         * processed automatically.\n         * This can be useful if you need some additional user input before sending\n         * files (or if you want want all files sent at once).\n         * If you're ready to send the file simply call `myDropzone.processQueue()`.\n         *\n         * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation\n         * section for more information.\n         */\n        autoProcessQueue: true,\n\n        /**\n         * If false, files added to the dropzone will not be queued by default.\n         * You'll have to call `enqueueFile(file)` manually.\n         */\n        autoQueue: true,\n\n        /**\n         * If `true`, this will add a link to every file preview to remove or cancel (if\n         * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`\n         * and `dictRemoveFile` options are used for the wording.\n         */\n        addRemoveLinks: false,\n\n        /**\n         * Defines where to display the file previews – if `null` the\n         * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS\n         * selector. The element should have the `dropzone-previews` class so\n         * the previews are displayed properly.\n         */\n        previewsContainer: null,\n\n        /**\n         * This is the element the hidden input field (which is used when clicking on the\n         * dropzone to trigger file selection) will be appended to. This might\n         * be important in case you use frameworks to switch the content of your page.\n         *\n         * Can be a selector string, or an element directly.\n         */\n        hiddenInputContainer: \"body\",\n\n        /**\n         * If null, no capture type will be specified\n         * If camera, mobile devices will skip the file selection and choose camera\n         * If microphone, mobile devices will skip the file selection and choose the microphone\n         * If camcorder, mobile devices will skip the file selection and choose the camera in video mode\n         * On apple devices multiple must be set to false.  AcceptedFiles may need to\n         * be set to an appropriate mime type (e.g. \"image/*\", \"audio/*\", or \"video/*\").\n         */\n        capture: null,\n\n        /**\n         * **Deprecated**. Use `renameFile` instead.\n         */\n        renameFilename: null,\n\n        /**\n         * A function that is invoked before the file is uploaded to the server and renames the file.\n         * This function gets the `File` as argument and can use the `file.name`. The actual name of the\n         * file that gets used during the upload can be accessed through `file.upload.filename`.\n         */\n        renameFile: null,\n\n        /**\n         * If `true` the fallback will be forced. This is very useful to test your server\n         * implementations first and make sure that everything works as\n         * expected without dropzone if you experience problems, and to test\n         * how your fallbacks will look.\n         */\n        forceFallback: false,\n\n        /**\n         * The text used before any files are dropped.\n         */\n        dictDefaultMessage: \"Drop files here to upload\",\n\n        /**\n         * The text that replaces the default message text it the browser is not supported.\n         */\n        dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n\n        /**\n         * The text that will be added before the fallback form.\n         * If you provide a  fallback element yourself, or if this option is `null` this will\n         * be ignored.\n         */\n        dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n\n        /**\n         * If the filesize is too big.\n         * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.\n         */\n        dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n\n        /**\n         * If the file doesn't match the file type.\n         */\n        dictInvalidFileType: \"You can't upload files of this type.\",\n\n        /**\n         * If the server response was invalid.\n         * `{{statusCode}}` will be replaced with the servers status code.\n         */\n        dictResponseError: \"Server responded with {{statusCode}} code.\",\n\n        /**\n         * If `addRemoveLinks` is true, the text to be used for the cancel upload link.\n         */\n        dictCancelUpload: \"Cancel upload\",\n\n        /**\n         * The text that is displayed if an upload was manually canceled\n         */\n        dictUploadCanceled: \"Upload canceled.\",\n\n        /**\n         * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.\n         */\n        dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n\n        /**\n         * If `addRemoveLinks` is true, the text to be used to remove a file.\n         */\n        dictRemoveFile: \"Remove file\",\n\n        /**\n         * If this is not null, then the user will be prompted before removing a file.\n         */\n        dictRemoveFileConfirmation: null,\n\n        /**\n         * Displayed if `maxFiles` is st and exceeded.\n         * The string `{{maxFiles}}` will be replaced by the configuration value.\n         */\n        dictMaxFilesExceeded: \"You can not upload any more files.\",\n\n        /**\n         * Allows you to translate the different units. Starting with `tb` for terabytes and going down to\n         * `b` for bytes.\n         */\n        dictFileSizeUnits: {\n          tb: \"TB\",\n          gb: \"GB\",\n          mb: \"MB\",\n          kb: \"KB\",\n          b: \"b\"\n        },\n\n        /**\n         * Called when dropzone initialized\n         * You can add event listeners here\n         */\n        init: function init() {},\n\n        /**\n         * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`\n         * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case\n         * of a function, this needs to return a map.\n         *\n         * The default implementation does nothing for normal uploads, but adds relevant information for\n         * chunked uploads.\n         *\n         * This is the same as adding hidden input fields in the form element.\n         */\n        params: function params(files, xhr, chunk) {\n          if (chunk) {\n            return {\n              dzuuid: chunk.file.upload.uuid,\n              dzchunkindex: chunk.index,\n              dztotalfilesize: chunk.file.size,\n              dzchunksize: this.options.chunkSize,\n              dztotalchunkcount: chunk.file.upload.totalChunkCount,\n              dzchunkbyteoffset: chunk.index * this.options.chunkSize\n            };\n          }\n        },\n\n        /**\n         * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n         * and a `done` function as parameters.\n         *\n         * If the done function is invoked without arguments, the file is \"accepted\" and will\n         * be processed. If you pass an error message, the file is rejected, and the error\n         * message will be displayed.\n         * This function will not be called if the file is too big or doesn't match the mime types.\n         */\n        accept: function accept(file, done) {\n          return done();\n        },\n\n        /**\n         * The callback that will be invoked when all chunks have been uploaded for a file.\n         * It gets the file for which the chunks have been uploaded as the first parameter,\n         * and the `done` function as second. `done()` needs to be invoked when everything\n         * needed to finish the upload process is done.\n         */\n        chunksUploaded: function chunksUploaded(file, done) {\n          done();\n        },\n\n        /**\n         * Gets called when the browser is not supported.\n         * The default implementation shows the fallback input field and adds\n         * a text.\n         */\n        fallback: function fallback() {\n          // This code should pass in IE7... :(\n          var messageElement;\n          this.element.className = \"\".concat(this.element.className, \" dz-browser-not-supported\");\n          var _iteratorNormalCompletion2 = true;\n          var _didIteratorError2 = false;\n          var _iteratorError2 = undefined;\n\n          try {\n            for (var _iterator2 = this.element.getElementsByTagName(\"div\")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n              var child = _step2.value;\n\n              if (/(^| )dz-message($| )/.test(child.className)) {\n                messageElement = child;\n                child.className = \"dz-message\"; // Removes the 'dz-default' class\n\n                break;\n              }\n            }\n          } catch (err) {\n            _didIteratorError2 = true;\n            _iteratorError2 = err;\n          } finally {\n            try {\n              if (!_iteratorNormalCompletion2 && _iterator2[\"return\"] != null) {\n                _iterator2[\"return\"]();\n              }\n            } finally {\n              if (_didIteratorError2) {\n                throw _iteratorError2;\n              }\n            }\n          }\n\n          if (!messageElement) {\n            messageElement = Dropzone.createElement(\"<div class=\\\"dz-message\\\"><span></span></div>\");\n            this.element.appendChild(messageElement);\n          }\n\n          var span = messageElement.getElementsByTagName(\"span\")[0];\n\n          if (span) {\n            if (span.textContent != null) {\n              span.textContent = this.options.dictFallbackMessage;\n            } else if (span.innerText != null) {\n              span.innerText = this.options.dictFallbackMessage;\n            }\n          }\n\n          return this.element.appendChild(this.getFallbackForm());\n        },\n\n        /**\n         * Gets called to calculate the thumbnail dimensions.\n         *\n         * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:\n         *\n         *  - `srcWidth` & `srcHeight` (required)\n         *  - `trgWidth` & `trgHeight` (required)\n         *  - `srcX` & `srcY` (optional, default `0`)\n         *  - `trgX` & `trgY` (optional, default `0`)\n         *\n         * Those values are going to be used by `ctx.drawImage()`.\n         */\n        resize: function resize(file, width, height, resizeMethod) {\n          var info = {\n            srcX: 0,\n            srcY: 0,\n            srcWidth: file.width,\n            srcHeight: file.height\n          };\n          var srcRatio = file.width / file.height; // Automatically calculate dimensions if not specified\n\n          if (width == null && height == null) {\n            width = info.srcWidth;\n            height = info.srcHeight;\n          } else if (width == null) {\n            width = height * srcRatio;\n          } else if (height == null) {\n            height = width / srcRatio;\n          } // Make sure images aren't upscaled\n\n\n          width = Math.min(width, info.srcWidth);\n          height = Math.min(height, info.srcHeight);\n          var trgRatio = width / height;\n\n          if (info.srcWidth > width || info.srcHeight > height) {\n            // Image is bigger and needs rescaling\n            if (resizeMethod === 'crop') {\n              if (srcRatio > trgRatio) {\n                info.srcHeight = file.height;\n                info.srcWidth = info.srcHeight * trgRatio;\n              } else {\n                info.srcWidth = file.width;\n                info.srcHeight = info.srcWidth / trgRatio;\n              }\n            } else if (resizeMethod === 'contain') {\n              // Method 'contain'\n              if (srcRatio > trgRatio) {\n                height = width / srcRatio;\n              } else {\n                width = height * srcRatio;\n              }\n            } else {\n              throw new Error(\"Unknown resizeMethod '\".concat(resizeMethod, \"'\"));\n            }\n          }\n\n          info.srcX = (file.width - info.srcWidth) / 2;\n          info.srcY = (file.height - info.srcHeight) / 2;\n          info.trgWidth = width;\n          info.trgHeight = height;\n          return info;\n        },\n\n        /**\n         * Can be used to transform the file (for example, resize an image if necessary).\n         *\n         * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes\n         * images according to those dimensions.\n         *\n         * Gets the `file` as the first parameter, and a `done()` function as the second, that needs\n         * to be invoked with the file when the transformation is done.\n         */\n        transformFile: function transformFile(file, done) {\n          if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {\n            return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);\n          } else {\n            return done(file);\n          }\n        },\n\n        /**\n         * A string that contains the template used for each dropped\n         * file. Change it to fulfill your needs but make sure to properly\n         * provide all elements.\n         *\n         * If you want to use an actual HTML element instead of providing a String\n         * as a config option, you could create a div with the id `tpl`,\n         * put the template inside it and provide the element like this:\n         *\n         *     document\n         *       .querySelector('#tpl')\n         *       .innerHTML\n         *\n         */\n        previewTemplate: \"<div class=\\\"dz-preview dz-file-preview\\\">\\n  <div class=\\\"dz-image\\\"><img data-dz-thumbnail /></div>\\n  <div class=\\\"dz-details\\\">\\n    <div class=\\\"dz-size\\\"><span data-dz-size></span></div>\\n    <div class=\\\"dz-filename\\\"><span data-dz-name></span></div>\\n  </div>\\n  <div class=\\\"dz-progress\\\"><span class=\\\"dz-upload\\\" data-dz-uploadprogress></span></div>\\n  <div class=\\\"dz-error-message\\\"><span data-dz-errormessage></span></div>\\n  <div class=\\\"dz-success-mark\\\">\\n    <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\\n      <title>Check</title>\\n      <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n        <path d=\\\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\" stroke-opacity=\\\"0.198794158\\\" stroke=\\\"#747474\\\" fill-opacity=\\\"0.816519475\\\" fill=\\\"#FFFFFF\\\"></path>\\n      </g>\\n    </svg>\\n  </div>\\n  <div class=\\\"dz-error-mark\\\">\\n    <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\">\\n      <title>Error</title>\\n      <g stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\">\\n        <g stroke=\\\"#747474\\\" stroke-opacity=\\\"0.198794158\\\" fill=\\\"#FFFFFF\\\" fill-opacity=\\\"0.816519475\\\">\\n          <path d=\\\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\"></path>\\n        </g>\\n      </g>\\n    </svg>\\n  </div>\\n</div>\",\n        // END OPTIONS\n        // (Required by the dropzone documentation parser)\n\n        /*\n         Those functions register themselves to the events on init and handle all\n         the user interface specific stuff. Overwriting them won't break the upload\n         but can break the way it's displayed.\n         You can overwrite them if you don't like the default behavior. If you just\n         want to add an additional event handler, register it on the dropzone object\n         and don't overwrite those options.\n         */\n        // Those are self explanatory and simply concern the DragnDrop.\n        drop: function drop(e) {\n          return this.element.classList.remove(\"dz-drag-hover\");\n        },\n        dragstart: function dragstart(e) {},\n        dragend: function dragend(e) {\n          return this.element.classList.remove(\"dz-drag-hover\");\n        },\n        dragenter: function dragenter(e) {\n          return this.element.classList.add(\"dz-drag-hover\");\n        },\n        dragover: function dragover(e) {\n          return this.element.classList.add(\"dz-drag-hover\");\n        },\n        dragleave: function dragleave(e) {\n          return this.element.classList.remove(\"dz-drag-hover\");\n        },\n        paste: function paste(e) {},\n        // Called whenever there are no files left in the dropzone anymore, and the\n        // dropzone should be displayed as if in the initial state.\n        reset: function reset() {\n          return this.element.classList.remove(\"dz-started\");\n        },\n        // Called when a file is added to the queue\n        // Receives `file`\n        addedfile: function addedfile(file) {\n          var _this2 = this;\n\n          if (this.element === this.previewsContainer) {\n            this.element.classList.add(\"dz-started\");\n          }\n\n          if (this.previewsContainer) {\n            file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());\n            file.previewTemplate = file.previewElement; // Backwards compatibility\n\n            this.previewsContainer.appendChild(file.previewElement);\n            var _iteratorNormalCompletion3 = true;\n            var _didIteratorError3 = false;\n            var _iteratorError3 = undefined;\n\n            try {\n              for (var _iterator3 = file.previewElement.querySelectorAll(\"[data-dz-name]\")[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n                var node = _step3.value;\n                node.textContent = file.name;\n              }\n            } catch (err) {\n              _didIteratorError3 = true;\n              _iteratorError3 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion3 && _iterator3[\"return\"] != null) {\n                  _iterator3[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError3) {\n                  throw _iteratorError3;\n                }\n              }\n            }\n\n            var _iteratorNormalCompletion4 = true;\n            var _didIteratorError4 = false;\n            var _iteratorError4 = undefined;\n\n            try {\n              for (var _iterator4 = file.previewElement.querySelectorAll(\"[data-dz-size]\")[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n                node = _step4.value;\n                node.innerHTML = this.filesize(file.size);\n              }\n            } catch (err) {\n              _didIteratorError4 = true;\n              _iteratorError4 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion4 && _iterator4[\"return\"] != null) {\n                  _iterator4[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError4) {\n                  throw _iteratorError4;\n                }\n              }\n            }\n\n            if (this.options.addRemoveLinks) {\n              file._removeLink = Dropzone.createElement(\"<a class=\\\"dz-remove\\\" href=\\\"javascript:undefined;\\\" data-dz-remove>\".concat(this.options.dictRemoveFile, \"</a>\"));\n              file.previewElement.appendChild(file._removeLink);\n            }\n\n            var removeFileEvent = function removeFileEvent(e) {\n              e.preventDefault();\n              e.stopPropagation();\n\n              if (file.status === Dropzone.UPLOADING) {\n                return Dropzone.confirm(_this2.options.dictCancelUploadConfirmation, function () {\n                  return _this2.removeFile(file);\n                });\n              } else {\n                if (_this2.options.dictRemoveFileConfirmation) {\n                  return Dropzone.confirm(_this2.options.dictRemoveFileConfirmation, function () {\n                    return _this2.removeFile(file);\n                  });\n                } else {\n                  return _this2.removeFile(file);\n                }\n              }\n            };\n\n            var _iteratorNormalCompletion5 = true;\n            var _didIteratorError5 = false;\n            var _iteratorError5 = undefined;\n\n            try {\n              for (var _iterator5 = file.previewElement.querySelectorAll(\"[data-dz-remove]\")[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n                var removeLink = _step5.value;\n                removeLink.addEventListener(\"click\", removeFileEvent);\n              }\n            } catch (err) {\n              _didIteratorError5 = true;\n              _iteratorError5 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion5 && _iterator5[\"return\"] != null) {\n                  _iterator5[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError5) {\n                  throw _iteratorError5;\n                }\n              }\n            }\n          }\n        },\n        // Called whenever a file is removed.\n        removedfile: function removedfile(file) {\n          if (file.previewElement != null && file.previewElement.parentNode != null) {\n            file.previewElement.parentNode.removeChild(file.previewElement);\n          }\n\n          return this._updateMaxFilesReachedClass();\n        },\n        // Called when a thumbnail has been generated\n        // Receives `file` and `dataUrl`\n        thumbnail: function thumbnail(file, dataUrl) {\n          if (file.previewElement) {\n            file.previewElement.classList.remove(\"dz-file-preview\");\n            var _iteratorNormalCompletion6 = true;\n            var _didIteratorError6 = false;\n            var _iteratorError6 = undefined;\n\n            try {\n              for (var _iterator6 = file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\")[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n                var thumbnailElement = _step6.value;\n                thumbnailElement.alt = file.name;\n                thumbnailElement.src = dataUrl;\n              }\n            } catch (err) {\n              _didIteratorError6 = true;\n              _iteratorError6 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion6 && _iterator6[\"return\"] != null) {\n                  _iterator6[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError6) {\n                  throw _iteratorError6;\n                }\n              }\n            }\n\n            return setTimeout(function () {\n              return file.previewElement.classList.add(\"dz-image-preview\");\n            }, 1);\n          }\n        },\n        // Called whenever an error occurs\n        // Receives `file` and `message`\n        error: function error(file, message) {\n          if (file.previewElement) {\n            file.previewElement.classList.add(\"dz-error\");\n\n            if (typeof message !== \"String\" && message.error) {\n              message = message.error;\n            }\n\n            var _iteratorNormalCompletion7 = true;\n            var _didIteratorError7 = false;\n            var _iteratorError7 = undefined;\n\n            try {\n              for (var _iterator7 = file.previewElement.querySelectorAll(\"[data-dz-errormessage]\")[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n                var node = _step7.value;\n                node.textContent = message;\n              }\n            } catch (err) {\n              _didIteratorError7 = true;\n              _iteratorError7 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion7 && _iterator7[\"return\"] != null) {\n                  _iterator7[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError7) {\n                  throw _iteratorError7;\n                }\n              }\n            }\n          }\n        },\n        errormultiple: function errormultiple() {},\n        // Called when a file gets processed. Since there is a cue, not all added\n        // files are processed immediately.\n        // Receives `file`\n        processing: function processing(file) {\n          if (file.previewElement) {\n            file.previewElement.classList.add(\"dz-processing\");\n\n            if (file._removeLink) {\n              return file._removeLink.innerHTML = this.options.dictCancelUpload;\n            }\n          }\n        },\n        processingmultiple: function processingmultiple() {},\n        // Called whenever the upload progress gets updated.\n        // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.\n        // To get the total number of bytes of the file, use `file.size`\n        uploadprogress: function uploadprogress(file, progress, bytesSent) {\n          if (file.previewElement) {\n            var _iteratorNormalCompletion8 = true;\n            var _didIteratorError8 = false;\n            var _iteratorError8 = undefined;\n\n            try {\n              for (var _iterator8 = file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\")[Symbol.iterator](), _step8; !(_iteratorNormalCompletion8 = (_step8 = _iterator8.next()).done); _iteratorNormalCompletion8 = true) {\n                var node = _step8.value;\n                node.nodeName === 'PROGRESS' ? node.value = progress : node.style.width = \"\".concat(progress, \"%\");\n              }\n            } catch (err) {\n              _didIteratorError8 = true;\n              _iteratorError8 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion8 && _iterator8[\"return\"] != null) {\n                  _iterator8[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError8) {\n                  throw _iteratorError8;\n                }\n              }\n            }\n          }\n        },\n        // Called whenever the total upload progress gets updated.\n        // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent\n        totaluploadprogress: function totaluploadprogress() {},\n        // Called just before the file is sent. Gets the `xhr` object as second\n        // parameter, so you can modify it (for example to add a CSRF token) and a\n        // `formData` object to add additional information.\n        sending: function sending() {},\n        sendingmultiple: function sendingmultiple() {},\n        // When the complete upload is finished and successful\n        // Receives `file`\n        success: function success(file) {\n          if (file.previewElement) {\n            return file.previewElement.classList.add(\"dz-success\");\n          }\n        },\n        successmultiple: function successmultiple() {},\n        // When the upload is canceled.\n        canceled: function canceled(file) {\n          return this.emit(\"error\", file, this.options.dictUploadCanceled);\n        },\n        canceledmultiple: function canceledmultiple() {},\n        // When the upload is finished, either with success or an error.\n        // Receives `file`\n        complete: function complete(file) {\n          if (file._removeLink) {\n            file._removeLink.innerHTML = this.options.dictRemoveFile;\n          }\n\n          if (file.previewElement) {\n            return file.previewElement.classList.add(\"dz-complete\");\n          }\n        },\n        completemultiple: function completemultiple() {},\n        maxfilesexceeded: function maxfilesexceeded() {},\n        maxfilesreached: function maxfilesreached() {},\n        queuecomplete: function queuecomplete() {},\n        addedfiles: function addedfiles() {}\n      };\n      this.prototype._thumbnailQueue = [];\n      this.prototype._processingThumbnail = false;\n    } // global utility\n\n  }, {\n    key: \"extend\",\n    value: function extend(target) {\n      for (var _len2 = arguments.length, objects = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n        objects[_key2 - 1] = arguments[_key2];\n      }\n\n      for (var _i = 0, _objects = objects; _i < _objects.length; _i++) {\n        var object = _objects[_i];\n\n        for (var key in object) {\n          var val = object[key];\n          target[key] = val;\n        }\n      }\n\n      return target;\n    }\n  }]);\n\n  function Dropzone(el, options) {\n    var _this;\n\n    _classCallCheck(this, Dropzone);\n\n    _this = _possibleConstructorReturn(this, _getPrototypeOf(Dropzone).call(this));\n    var fallback, left;\n    _this.element = el; // For backwards compatibility since the version was in the prototype previously\n\n    _this.version = Dropzone.version;\n    _this.defaultOptions.previewTemplate = _this.defaultOptions.previewTemplate.replace(/\\n*/g, \"\");\n    _this.clickableElements = [];\n    _this.listeners = [];\n    _this.files = []; // All files\n\n    if (typeof _this.element === \"string\") {\n      _this.element = document.querySelector(_this.element);\n    } // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.\n\n\n    if (!_this.element || _this.element.nodeType == null) {\n      throw new Error(\"Invalid dropzone element.\");\n    }\n\n    if (_this.element.dropzone) {\n      throw new Error(\"Dropzone already attached.\");\n    } // Now add this dropzone to the instances.\n\n\n    Dropzone.instances.push(_assertThisInitialized(_this)); // Put the dropzone inside the element itself.\n\n    _this.element.dropzone = _assertThisInitialized(_this);\n    var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};\n    _this.options = Dropzone.extend({}, _this.defaultOptions, elementOptions, options != null ? options : {}); // If the browser failed, just call the fallback and leave\n\n    if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n      return _possibleConstructorReturn(_this, _this.options.fallback.call(_assertThisInitialized(_this)));\n    } // @options.url = @element.getAttribute \"action\" unless @options.url?\n\n\n    if (_this.options.url == null) {\n      _this.options.url = _this.element.getAttribute(\"action\");\n    }\n\n    if (!_this.options.url) {\n      throw new Error(\"No URL provided.\");\n    }\n\n    if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {\n      throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n    }\n\n    if (_this.options.uploadMultiple && _this.options.chunking) {\n      throw new Error('You cannot set both: uploadMultiple and chunking.');\n    } // Backwards compatibility\n\n\n    if (_this.options.acceptedMimeTypes) {\n      _this.options.acceptedFiles = _this.options.acceptedMimeTypes;\n      delete _this.options.acceptedMimeTypes;\n    } // Backwards compatibility\n\n\n    if (_this.options.renameFilename != null) {\n      _this.options.renameFile = function (file) {\n        return _this.options.renameFilename.call(_assertThisInitialized(_this), file.name, file);\n      };\n    }\n\n    _this.options.method = _this.options.method.toUpperCase();\n\n    if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {\n      // Remove the fallback\n      fallback.parentNode.removeChild(fallback);\n    } // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false\n\n\n    if (_this.options.previewsContainer !== false) {\n      if (_this.options.previewsContainer) {\n        _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, \"previewsContainer\");\n      } else {\n        _this.previewsContainer = _this.element;\n      }\n    }\n\n    if (_this.options.clickable) {\n      if (_this.options.clickable === true) {\n        _this.clickableElements = [_this.element];\n      } else {\n        _this.clickableElements = Dropzone.getElements(_this.options.clickable, \"clickable\");\n      }\n    }\n\n    _this.init();\n\n    return _this;\n  } // Returns all files that have been accepted\n\n\n  _createClass(Dropzone, [{\n    key: \"getAcceptedFiles\",\n    value: function getAcceptedFiles() {\n      return this.files.filter(function (file) {\n        return file.accepted;\n      }).map(function (file) {\n        return file;\n      });\n    } // Returns all files that have been rejected\n    // Not sure when that's going to be useful, but added for completeness.\n\n  }, {\n    key: \"getRejectedFiles\",\n    value: function getRejectedFiles() {\n      return this.files.filter(function (file) {\n        return !file.accepted;\n      }).map(function (file) {\n        return file;\n      });\n    }\n  }, {\n    key: \"getFilesWithStatus\",\n    value: function getFilesWithStatus(status) {\n      return this.files.filter(function (file) {\n        return file.status === status;\n      }).map(function (file) {\n        return file;\n      });\n    } // Returns all files that are in the queue\n\n  }, {\n    key: \"getQueuedFiles\",\n    value: function getQueuedFiles() {\n      return this.getFilesWithStatus(Dropzone.QUEUED);\n    }\n  }, {\n    key: \"getUploadingFiles\",\n    value: function getUploadingFiles() {\n      return this.getFilesWithStatus(Dropzone.UPLOADING);\n    }\n  }, {\n    key: \"getAddedFiles\",\n    value: function getAddedFiles() {\n      return this.getFilesWithStatus(Dropzone.ADDED);\n    } // Files that are either queued or uploading\n\n  }, {\n    key: \"getActiveFiles\",\n    value: function getActiveFiles() {\n      return this.files.filter(function (file) {\n        return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;\n      }).map(function (file) {\n        return file;\n      });\n    } // The function that gets called when Dropzone is initialized. You\n    // can (and should) setup event listeners inside this function.\n\n  }, {\n    key: \"init\",\n    value: function init() {\n      var _this3 = this;\n\n      // In case it isn't set already\n      if (this.element.tagName === \"form\") {\n        this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n      }\n\n      if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\n        this.element.appendChild(Dropzone.createElement(\"<div class=\\\"dz-default dz-message\\\"><button class=\\\"dz-button\\\" type=\\\"button\\\">\".concat(this.options.dictDefaultMessage, \"</button></div>\")));\n      }\n\n      if (this.clickableElements.length) {\n        var setupHiddenFileInput = function setupHiddenFileInput() {\n          if (_this3.hiddenFileInput) {\n            _this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);\n          }\n\n          _this3.hiddenFileInput = document.createElement(\"input\");\n\n          _this3.hiddenFileInput.setAttribute(\"type\", \"file\");\n\n          if (_this3.options.maxFiles === null || _this3.options.maxFiles > 1) {\n            _this3.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n          }\n\n          _this3.hiddenFileInput.className = \"dz-hidden-input\";\n\n          if (_this3.options.acceptedFiles !== null) {\n            _this3.hiddenFileInput.setAttribute(\"accept\", _this3.options.acceptedFiles);\n          }\n\n          if (_this3.options.capture !== null) {\n            _this3.hiddenFileInput.setAttribute(\"capture\", _this3.options.capture);\n          } // Not setting `display=\"none\"` because some browsers don't accept clicks\n          // on elements that aren't displayed.\n\n\n          _this3.hiddenFileInput.style.visibility = \"hidden\";\n          _this3.hiddenFileInput.style.position = \"absolute\";\n          _this3.hiddenFileInput.style.top = \"0\";\n          _this3.hiddenFileInput.style.left = \"0\";\n          _this3.hiddenFileInput.style.height = \"0\";\n          _this3.hiddenFileInput.style.width = \"0\";\n          Dropzone.getElement(_this3.options.hiddenInputContainer, 'hiddenInputContainer').appendChild(_this3.hiddenFileInput);\n          return _this3.hiddenFileInput.addEventListener(\"change\", function () {\n            var files = _this3.hiddenFileInput.files;\n\n            if (files.length) {\n              var _iteratorNormalCompletion9 = true;\n              var _didIteratorError9 = false;\n              var _iteratorError9 = undefined;\n\n              try {\n                for (var _iterator9 = files[Symbol.iterator](), _step9; !(_iteratorNormalCompletion9 = (_step9 = _iterator9.next()).done); _iteratorNormalCompletion9 = true) {\n                  var file = _step9.value;\n\n                  _this3.addFile(file);\n                }\n              } catch (err) {\n                _didIteratorError9 = true;\n                _iteratorError9 = err;\n              } finally {\n                try {\n                  if (!_iteratorNormalCompletion9 && _iterator9[\"return\"] != null) {\n                    _iterator9[\"return\"]();\n                  }\n                } finally {\n                  if (_didIteratorError9) {\n                    throw _iteratorError9;\n                  }\n                }\n              }\n            }\n\n            _this3.emit(\"addedfiles\", files);\n\n            return setupHiddenFileInput();\n          });\n        };\n\n        setupHiddenFileInput();\n      }\n\n      this.URL = window.URL !== null ? window.URL : window.webkitURL; // Setup all event listeners on the Dropzone object itself.\n      // They're not in @setupEventListeners() because they shouldn't be removed\n      // again when the dropzone gets disabled.\n\n      var _iteratorNormalCompletion10 = true;\n      var _didIteratorError10 = false;\n      var _iteratorError10 = undefined;\n\n      try {\n        for (var _iterator10 = this.events[Symbol.iterator](), _step10; !(_iteratorNormalCompletion10 = (_step10 = _iterator10.next()).done); _iteratorNormalCompletion10 = true) {\n          var eventName = _step10.value;\n          this.on(eventName, this.options[eventName]);\n        }\n      } catch (err) {\n        _didIteratorError10 = true;\n        _iteratorError10 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion10 && _iterator10[\"return\"] != null) {\n            _iterator10[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError10) {\n            throw _iteratorError10;\n          }\n        }\n      }\n\n      this.on(\"uploadprogress\", function () {\n        return _this3.updateTotalUploadProgress();\n      });\n      this.on(\"removedfile\", function () {\n        return _this3.updateTotalUploadProgress();\n      });\n      this.on(\"canceled\", function (file) {\n        return _this3.emit(\"complete\", file);\n      }); // Emit a `queuecomplete` event if all files finished uploading.\n\n      this.on(\"complete\", function (file) {\n        if (_this3.getAddedFiles().length === 0 && _this3.getUploadingFiles().length === 0 && _this3.getQueuedFiles().length === 0) {\n          // This needs to be deferred so that `queuecomplete` really triggers after `complete`\n          return setTimeout(function () {\n            return _this3.emit(\"queuecomplete\");\n          }, 0);\n        }\n      });\n\n      var containsFiles = function containsFiles(e) {\n        return e.dataTransfer.types && e.dataTransfer.types.some(function (type) {\n          return type == \"Files\";\n        });\n      };\n\n      var noPropagation = function noPropagation(e) {\n        // If there are no files, we don't want to stop\n        // propagation so we don't interfere with other\n        // drag and drop behaviour.\n        if (!containsFiles(e)) return;\n        e.stopPropagation();\n\n        if (e.preventDefault) {\n          return e.preventDefault();\n        } else {\n          return e.returnValue = false;\n        }\n      }; // Create the listeners\n\n\n      this.listeners = [{\n        element: this.element,\n        events: {\n          \"dragstart\": function dragstart(e) {\n            return _this3.emit(\"dragstart\", e);\n          },\n          \"dragenter\": function dragenter(e) {\n            noPropagation(e);\n            return _this3.emit(\"dragenter\", e);\n          },\n          \"dragover\": function dragover(e) {\n            // Makes it possible to drag files from chrome's download bar\n            // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar\n            // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)\n            var efct;\n\n            try {\n              efct = e.dataTransfer.effectAllowed;\n            } catch (error) {}\n\n            e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';\n            noPropagation(e);\n            return _this3.emit(\"dragover\", e);\n          },\n          \"dragleave\": function dragleave(e) {\n            return _this3.emit(\"dragleave\", e);\n          },\n          \"drop\": function drop(e) {\n            noPropagation(e);\n            return _this3.drop(e);\n          },\n          \"dragend\": function dragend(e) {\n            return _this3.emit(\"dragend\", e);\n          }\n        } // This is disabled right now, because the browsers don't implement it properly.\n        // \"paste\": (e) =>\n        //   noPropagation e\n        //   @paste e\n\n      }];\n      this.clickableElements.forEach(function (clickableElement) {\n        return _this3.listeners.push({\n          element: clickableElement,\n          events: {\n            \"click\": function click(evt) {\n              // Only the actual dropzone or the message element should trigger file selection\n              if (clickableElement !== _this3.element || evt.target === _this3.element || Dropzone.elementInside(evt.target, _this3.element.querySelector(\".dz-message\"))) {\n                _this3.hiddenFileInput.click(); // Forward the click\n\n              }\n\n              return true;\n            }\n          }\n        });\n      });\n      this.enable();\n      return this.options.init.call(this);\n    } // Not fully tested yet\n\n  }, {\n    key: \"destroy\",\n    value: function destroy() {\n      this.disable();\n      this.removeAllFiles(true);\n\n      if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {\n        this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n        this.hiddenFileInput = null;\n      }\n\n      delete this.element.dropzone;\n      return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\n    }\n  }, {\n    key: \"updateTotalUploadProgress\",\n    value: function updateTotalUploadProgress() {\n      var totalUploadProgress;\n      var totalBytesSent = 0;\n      var totalBytes = 0;\n      var activeFiles = this.getActiveFiles();\n\n      if (activeFiles.length) {\n        var _iteratorNormalCompletion11 = true;\n        var _didIteratorError11 = false;\n        var _iteratorError11 = undefined;\n\n        try {\n          for (var _iterator11 = this.getActiveFiles()[Symbol.iterator](), _step11; !(_iteratorNormalCompletion11 = (_step11 = _iterator11.next()).done); _iteratorNormalCompletion11 = true) {\n            var file = _step11.value;\n            totalBytesSent += file.upload.bytesSent;\n            totalBytes += file.upload.total;\n          }\n        } catch (err) {\n          _didIteratorError11 = true;\n          _iteratorError11 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion11 && _iterator11[\"return\"] != null) {\n              _iterator11[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError11) {\n              throw _iteratorError11;\n            }\n          }\n        }\n\n        totalUploadProgress = 100 * totalBytesSent / totalBytes;\n      } else {\n        totalUploadProgress = 100;\n      }\n\n      return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n    } // @options.paramName can be a function taking one parameter rather than a string.\n    // A parameter name for a file is obtained simply by calling this with an index number.\n\n  }, {\n    key: \"_getParamName\",\n    value: function _getParamName(n) {\n      if (typeof this.options.paramName === \"function\") {\n        return this.options.paramName(n);\n      } else {\n        return \"\".concat(this.options.paramName).concat(this.options.uploadMultiple ? \"[\".concat(n, \"]\") : \"\");\n      }\n    } // If @options.renameFile is a function,\n    // the function will be used to rename the file.name before appending it to the formData\n\n  }, {\n    key: \"_renameFile\",\n    value: function _renameFile(file) {\n      if (typeof this.options.renameFile !== \"function\") {\n        return file.name;\n      }\n\n      return this.options.renameFile(file);\n    } // Returns a form that can be used as fallback if the browser does not support DragnDrop\n    //\n    // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.\n    // This code has to pass in IE7 :(\n\n  }, {\n    key: \"getFallbackForm\",\n    value: function getFallbackForm() {\n      var existingFallback, form;\n\n      if (existingFallback = this.getExistingFallback()) {\n        return existingFallback;\n      }\n\n      var fieldsString = \"<div class=\\\"dz-fallback\\\">\";\n\n      if (this.options.dictFallbackText) {\n        fieldsString += \"<p>\".concat(this.options.dictFallbackText, \"</p>\");\n      }\n\n      fieldsString += \"<input type=\\\"file\\\" name=\\\"\".concat(this._getParamName(0), \"\\\" \").concat(this.options.uploadMultiple ? 'multiple=\"multiple\"' : undefined, \" /><input type=\\\"submit\\\" value=\\\"Upload!\\\"></div>\");\n      var fields = Dropzone.createElement(fieldsString);\n\n      if (this.element.tagName !== \"FORM\") {\n        form = Dropzone.createElement(\"<form action=\\\"\".concat(this.options.url, \"\\\" enctype=\\\"multipart/form-data\\\" method=\\\"\").concat(this.options.method, \"\\\"></form>\"));\n        form.appendChild(fields);\n      } else {\n        // Make sure that the enctype and method attributes are set properly\n        this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n        this.element.setAttribute(\"method\", this.options.method);\n      }\n\n      return form != null ? form : fields;\n    } // Returns the fallback elements if they exist already\n    //\n    // This code has to pass in IE7 :(\n\n  }, {\n    key: \"getExistingFallback\",\n    value: function getExistingFallback() {\n      var getFallback = function getFallback(elements) {\n        var _iteratorNormalCompletion12 = true;\n        var _didIteratorError12 = false;\n        var _iteratorError12 = undefined;\n\n        try {\n          for (var _iterator12 = elements[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {\n            var el = _step12.value;\n\n            if (/(^| )fallback($| )/.test(el.className)) {\n              return el;\n            }\n          }\n        } catch (err) {\n          _didIteratorError12 = true;\n          _iteratorError12 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion12 && _iterator12[\"return\"] != null) {\n              _iterator12[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError12) {\n              throw _iteratorError12;\n            }\n          }\n        }\n      };\n\n      for (var _i2 = 0, _arr = [\"div\", \"form\"]; _i2 < _arr.length; _i2++) {\n        var tagName = _arr[_i2];\n        var fallback;\n\n        if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\n          return fallback;\n        }\n      }\n    } // Activates all listeners stored in @listeners\n\n  }, {\n    key: \"setupEventListeners\",\n    value: function setupEventListeners() {\n      return this.listeners.map(function (elementListeners) {\n        return function () {\n          var result = [];\n\n          for (var event in elementListeners.events) {\n            var listener = elementListeners.events[event];\n            result.push(elementListeners.element.addEventListener(event, listener, false));\n          }\n\n          return result;\n        }();\n      });\n    } // Deactivates all listeners stored in @listeners\n\n  }, {\n    key: \"removeEventListeners\",\n    value: function removeEventListeners() {\n      return this.listeners.map(function (elementListeners) {\n        return function () {\n          var result = [];\n\n          for (var event in elementListeners.events) {\n            var listener = elementListeners.events[event];\n            result.push(elementListeners.element.removeEventListener(event, listener, false));\n          }\n\n          return result;\n        }();\n      });\n    } // Removes all event listeners and cancels all files in the queue or being processed.\n\n  }, {\n    key: \"disable\",\n    value: function disable() {\n      var _this4 = this;\n\n      this.clickableElements.forEach(function (element) {\n        return element.classList.remove(\"dz-clickable\");\n      });\n      this.removeEventListeners();\n      this.disabled = true;\n      return this.files.map(function (file) {\n        return _this4.cancelUpload(file);\n      });\n    }\n  }, {\n    key: \"enable\",\n    value: function enable() {\n      delete this.disabled;\n      this.clickableElements.forEach(function (element) {\n        return element.classList.add(\"dz-clickable\");\n      });\n      return this.setupEventListeners();\n    } // Returns a nicely formatted filesize\n\n  }, {\n    key: \"filesize\",\n    value: function filesize(size) {\n      var selectedSize = 0;\n      var selectedUnit = \"b\";\n\n      if (size > 0) {\n        var units = ['tb', 'gb', 'mb', 'kb', 'b'];\n\n        for (var i = 0; i < units.length; i++) {\n          var unit = units[i];\n          var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n          if (size >= cutoff) {\n            selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n            selectedUnit = unit;\n            break;\n          }\n        }\n\n        selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits\n      }\n\n      return \"<strong>\".concat(selectedSize, \"</strong> \").concat(this.options.dictFileSizeUnits[selectedUnit]);\n    } // Adds or removes the `dz-max-files-reached` class from the form.\n\n  }, {\n    key: \"_updateMaxFilesReachedClass\",\n    value: function _updateMaxFilesReachedClass() {\n      if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n        if (this.getAcceptedFiles().length === this.options.maxFiles) {\n          this.emit('maxfilesreached', this.files);\n        }\n\n        return this.element.classList.add(\"dz-max-files-reached\");\n      } else {\n        return this.element.classList.remove(\"dz-max-files-reached\");\n      }\n    }\n  }, {\n    key: \"drop\",\n    value: function drop(e) {\n      if (!e.dataTransfer) {\n        return;\n      }\n\n      this.emit(\"drop\", e); // Convert the FileList to an Array\n      // This is necessary for IE11\n\n      var files = [];\n\n      for (var i = 0; i < e.dataTransfer.files.length; i++) {\n        files[i] = e.dataTransfer.files[i];\n      } // Even if it's a folder, files.length will contain the folders.\n\n\n      if (files.length) {\n        var items = e.dataTransfer.items;\n\n        if (items && items.length && items[0].webkitGetAsEntry != null) {\n          // The browser supports dropping of folders, so handle items instead of files\n          this._addFilesFromItems(items);\n        } else {\n          this.handleFiles(files);\n        }\n      }\n\n      this.emit(\"addedfiles\", files);\n    }\n  }, {\n    key: \"paste\",\n    value: function paste(e) {\n      if (__guard__(e != null ? e.clipboardData : undefined, function (x) {\n        return x.items;\n      }) == null) {\n        return;\n      }\n\n      this.emit(\"paste\", e);\n      var items = e.clipboardData.items;\n\n      if (items.length) {\n        return this._addFilesFromItems(items);\n      }\n    }\n  }, {\n    key: \"handleFiles\",\n    value: function handleFiles(files) {\n      var _iteratorNormalCompletion13 = true;\n      var _didIteratorError13 = false;\n      var _iteratorError13 = undefined;\n\n      try {\n        for (var _iterator13 = files[Symbol.iterator](), _step13; !(_iteratorNormalCompletion13 = (_step13 = _iterator13.next()).done); _iteratorNormalCompletion13 = true) {\n          var file = _step13.value;\n          this.addFile(file);\n        }\n      } catch (err) {\n        _didIteratorError13 = true;\n        _iteratorError13 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion13 && _iterator13[\"return\"] != null) {\n            _iterator13[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError13) {\n            throw _iteratorError13;\n          }\n        }\n      }\n    } // When a folder is dropped (or files are pasted), items must be handled\n    // instead of files.\n\n  }, {\n    key: \"_addFilesFromItems\",\n    value: function _addFilesFromItems(items) {\n      var _this5 = this;\n\n      return function () {\n        var result = [];\n        var _iteratorNormalCompletion14 = true;\n        var _didIteratorError14 = false;\n        var _iteratorError14 = undefined;\n\n        try {\n          for (var _iterator14 = items[Symbol.iterator](), _step14; !(_iteratorNormalCompletion14 = (_step14 = _iterator14.next()).done); _iteratorNormalCompletion14 = true) {\n            var item = _step14.value;\n            var entry;\n\n            if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {\n              if (entry.isFile) {\n                result.push(_this5.addFile(item.getAsFile()));\n              } else if (entry.isDirectory) {\n                // Append all files from that directory to files\n                result.push(_this5._addFilesFromDirectory(entry, entry.name));\n              } else {\n                result.push(undefined);\n              }\n            } else if (item.getAsFile != null) {\n              if (item.kind == null || item.kind === \"file\") {\n                result.push(_this5.addFile(item.getAsFile()));\n              } else {\n                result.push(undefined);\n              }\n            } else {\n              result.push(undefined);\n            }\n          }\n        } catch (err) {\n          _didIteratorError14 = true;\n          _iteratorError14 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion14 && _iterator14[\"return\"] != null) {\n              _iterator14[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError14) {\n              throw _iteratorError14;\n            }\n          }\n        }\n\n        return result;\n      }();\n    } // Goes through the directory, and adds each file it finds recursively\n\n  }, {\n    key: \"_addFilesFromDirectory\",\n    value: function _addFilesFromDirectory(directory, path) {\n      var _this6 = this;\n\n      var dirReader = directory.createReader();\n\n      var errorHandler = function errorHandler(error) {\n        return __guardMethod__(console, 'log', function (o) {\n          return o.log(error);\n        });\n      };\n\n      var readEntries = function readEntries() {\n        return dirReader.readEntries(function (entries) {\n          if (entries.length > 0) {\n            var _iteratorNormalCompletion15 = true;\n            var _didIteratorError15 = false;\n            var _iteratorError15 = undefined;\n\n            try {\n              for (var _iterator15 = entries[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {\n                var entry = _step15.value;\n\n                if (entry.isFile) {\n                  entry.file(function (file) {\n                    if (_this6.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {\n                      return;\n                    }\n\n                    file.fullPath = \"\".concat(path, \"/\").concat(file.name);\n                    return _this6.addFile(file);\n                  });\n                } else if (entry.isDirectory) {\n                  _this6._addFilesFromDirectory(entry, \"\".concat(path, \"/\").concat(entry.name));\n                }\n              } // Recursively call readEntries() again, since browser only handle\n              // the first 100 entries.\n              // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries\n\n            } catch (err) {\n              _didIteratorError15 = true;\n              _iteratorError15 = err;\n            } finally {\n              try {\n                if (!_iteratorNormalCompletion15 && _iterator15[\"return\"] != null) {\n                  _iterator15[\"return\"]();\n                }\n              } finally {\n                if (_didIteratorError15) {\n                  throw _iteratorError15;\n                }\n              }\n            }\n\n            readEntries();\n          }\n\n          return null;\n        }, errorHandler);\n      };\n\n      return readEntries();\n    } // If `done()` is called without argument the file is accepted\n    // If you call it with an error message, the file is rejected\n    // (This allows for asynchronous validation)\n    //\n    // This function checks the filesize, and if the file.type passes the\n    // `acceptedFiles` check.\n\n  }, {\n    key: \"accept\",\n    value: function accept(file, done) {\n      if (this.options.maxFilesize && file.size > this.options.maxFilesize * 1024 * 1024) {\n        done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n      } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\n        done(this.options.dictInvalidFileType);\n      } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n        done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n        this.emit(\"maxfilesexceeded\", file);\n      } else {\n        this.options.accept.call(this, file, done);\n      }\n    }\n  }, {\n    key: \"addFile\",\n    value: function addFile(file) {\n      var _this7 = this;\n\n      file.upload = {\n        uuid: Dropzone.uuidv4(),\n        progress: 0,\n        // Setting the total upload size to file.size for the beginning\n        // It's actual different than the size to be transmitted.\n        total: file.size,\n        bytesSent: 0,\n        filename: this._renameFile(file) // Not setting chunking information here, because the acutal data — and\n        // thus the chunks — might change if `options.transformFile` is set\n        // and does something to the data.\n\n      };\n      this.files.push(file);\n      file.status = Dropzone.ADDED;\n      this.emit(\"addedfile\", file);\n\n      this._enqueueThumbnail(file);\n\n      this.accept(file, function (error) {\n        if (error) {\n          file.accepted = false;\n\n          _this7._errorProcessing([file], error); // Will set the file.status\n\n        } else {\n          file.accepted = true;\n\n          if (_this7.options.autoQueue) {\n            _this7.enqueueFile(file);\n          } // Will set .accepted = true\n\n        }\n\n        _this7._updateMaxFilesReachedClass();\n      });\n    } // Wrapper for enqueueFile\n\n  }, {\n    key: \"enqueueFiles\",\n    value: function enqueueFiles(files) {\n      var _iteratorNormalCompletion16 = true;\n      var _didIteratorError16 = false;\n      var _iteratorError16 = undefined;\n\n      try {\n        for (var _iterator16 = files[Symbol.iterator](), _step16; !(_iteratorNormalCompletion16 = (_step16 = _iterator16.next()).done); _iteratorNormalCompletion16 = true) {\n          var file = _step16.value;\n          this.enqueueFile(file);\n        }\n      } catch (err) {\n        _didIteratorError16 = true;\n        _iteratorError16 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion16 && _iterator16[\"return\"] != null) {\n            _iterator16[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError16) {\n            throw _iteratorError16;\n          }\n        }\n      }\n\n      return null;\n    }\n  }, {\n    key: \"enqueueFile\",\n    value: function enqueueFile(file) {\n      var _this8 = this;\n\n      if (file.status === Dropzone.ADDED && file.accepted === true) {\n        file.status = Dropzone.QUEUED;\n\n        if (this.options.autoProcessQueue) {\n          return setTimeout(function () {\n            return _this8.processQueue();\n          }, 0); // Deferring the call\n        }\n      } else {\n        throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n      }\n    }\n  }, {\n    key: \"_enqueueThumbnail\",\n    value: function _enqueueThumbnail(file) {\n      var _this9 = this;\n\n      if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\n        this._thumbnailQueue.push(file);\n\n        return setTimeout(function () {\n          return _this9._processThumbnailQueue();\n        }, 0); // Deferring the call\n      }\n    }\n  }, {\n    key: \"_processThumbnailQueue\",\n    value: function _processThumbnailQueue() {\n      var _this10 = this;\n\n      if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\n        return;\n      }\n\n      this._processingThumbnail = true;\n\n      var file = this._thumbnailQueue.shift();\n\n      return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {\n        _this10.emit(\"thumbnail\", file, dataUrl);\n\n        _this10._processingThumbnail = false;\n        return _this10._processThumbnailQueue();\n      });\n    } // Can be called by the user to remove a file\n\n  }, {\n    key: \"removeFile\",\n    value: function removeFile(file) {\n      if (file.status === Dropzone.UPLOADING) {\n        this.cancelUpload(file);\n      }\n\n      this.files = without(this.files, file);\n      this.emit(\"removedfile\", file);\n\n      if (this.files.length === 0) {\n        return this.emit(\"reset\");\n      }\n    } // Removes all files that aren't currently processed from the list\n\n  }, {\n    key: \"removeAllFiles\",\n    value: function removeAllFiles(cancelIfNecessary) {\n      // Create a copy of files since removeFile() changes the @files array.\n      if (cancelIfNecessary == null) {\n        cancelIfNecessary = false;\n      }\n\n      var _iteratorNormalCompletion17 = true;\n      var _didIteratorError17 = false;\n      var _iteratorError17 = undefined;\n\n      try {\n        for (var _iterator17 = this.files.slice()[Symbol.iterator](), _step17; !(_iteratorNormalCompletion17 = (_step17 = _iterator17.next()).done); _iteratorNormalCompletion17 = true) {\n          var file = _step17.value;\n\n          if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\n            this.removeFile(file);\n          }\n        }\n      } catch (err) {\n        _didIteratorError17 = true;\n        _iteratorError17 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion17 && _iterator17[\"return\"] != null) {\n            _iterator17[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError17) {\n            throw _iteratorError17;\n          }\n        }\n      }\n\n      return null;\n    } // Resizes an image before it gets sent to the server. This function is the default behavior of\n    // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with\n    // the resized blob.\n\n  }, {\n    key: \"resizeImage\",\n    value: function resizeImage(file, width, height, resizeMethod, callback) {\n      var _this11 = this;\n\n      return this.createThumbnail(file, width, height, resizeMethod, true, function (dataUrl, canvas) {\n        if (canvas == null) {\n          // The image has not been resized\n          return callback(file);\n        } else {\n          var resizeMimeType = _this11.options.resizeMimeType;\n\n          if (resizeMimeType == null) {\n            resizeMimeType = file.type;\n          }\n\n          var resizedDataURL = canvas.toDataURL(resizeMimeType, _this11.options.resizeQuality);\n\n          if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') {\n            // Now add the original EXIF information\n            resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);\n          }\n\n          return callback(Dropzone.dataURItoBlob(resizedDataURL));\n        }\n      });\n    }\n  }, {\n    key: \"createThumbnail\",\n    value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {\n      var _this12 = this;\n\n      var fileReader = new FileReader();\n\n      fileReader.onload = function () {\n        file.dataURL = fileReader.result; // Don't bother creating a thumbnail for SVG images since they're vector\n\n        if (file.type === \"image/svg+xml\") {\n          if (callback != null) {\n            callback(fileReader.result);\n          }\n\n          return;\n        }\n\n        _this12.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);\n      };\n\n      fileReader.readAsDataURL(file);\n    } // `mockFile` needs to have these attributes:\n    // \n    //     { name: 'name', size: 12345, imageUrl: '' }\n    //\n    // `callback` will be invoked when the image has been downloaded and displayed.\n    // `crossOrigin` will be added to the `img` tag when accessing the file.\n\n  }, {\n    key: \"displayExistingFile\",\n    value: function displayExistingFile(mockFile, imageUrl, callback, crossOrigin) {\n      var _this13 = this;\n\n      var resizeThumbnail = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n      this.emit(\"addedfile\", mockFile);\n      this.emit(\"complete\", mockFile);\n\n      if (!resizeThumbnail) {\n        this.emit(\"thumbnail\", mockFile, imageUrl);\n        if (callback) callback();\n      } else {\n        var onDone = function onDone(thumbnail) {\n          _this13.emit('thumbnail', mockFile, thumbnail);\n\n          if (callback) callback();\n        };\n\n        mockFile.dataURL = imageUrl;\n        this.createThumbnailFromUrl(mockFile, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.resizeMethod, this.options.fixOrientation, onDone, crossOrigin);\n      }\n    }\n  }, {\n    key: \"createThumbnailFromUrl\",\n    value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {\n      var _this14 = this;\n\n      // Not using `new Image` here because of a bug in latest Chrome versions.\n      // See https://github.com/enyo/dropzone/pull/226\n      var img = document.createElement(\"img\");\n\n      if (crossOrigin) {\n        img.crossOrigin = crossOrigin;\n      }\n\n      img.onload = function () {\n        var loadExif = function loadExif(callback) {\n          return callback(1);\n        };\n\n        if (typeof EXIF !== 'undefined' && EXIF !== null && fixOrientation) {\n          loadExif = function loadExif(callback) {\n            return EXIF.getData(img, function () {\n              return callback(EXIF.getTag(this, 'Orientation'));\n            });\n          };\n        }\n\n        return loadExif(function (orientation) {\n          file.width = img.width;\n          file.height = img.height;\n\n          var resizeInfo = _this14.options.resize.call(_this14, file, width, height, resizeMethod);\n\n          var canvas = document.createElement(\"canvas\");\n          var ctx = canvas.getContext(\"2d\");\n          canvas.width = resizeInfo.trgWidth;\n          canvas.height = resizeInfo.trgHeight;\n\n          if (orientation > 4) {\n            canvas.width = resizeInfo.trgHeight;\n            canvas.height = resizeInfo.trgWidth;\n          }\n\n          switch (orientation) {\n            case 2:\n              // horizontal flip\n              ctx.translate(canvas.width, 0);\n              ctx.scale(-1, 1);\n              break;\n\n            case 3:\n              // 180° rotate left\n              ctx.translate(canvas.width, canvas.height);\n              ctx.rotate(Math.PI);\n              break;\n\n            case 4:\n              // vertical flip\n              ctx.translate(0, canvas.height);\n              ctx.scale(1, -1);\n              break;\n\n            case 5:\n              // vertical flip + 90 rotate right\n              ctx.rotate(0.5 * Math.PI);\n              ctx.scale(1, -1);\n              break;\n\n            case 6:\n              // 90° rotate right\n              ctx.rotate(0.5 * Math.PI);\n              ctx.translate(0, -canvas.width);\n              break;\n\n            case 7:\n              // horizontal flip + 90 rotate right\n              ctx.rotate(0.5 * Math.PI);\n              ctx.translate(canvas.height, -canvas.width);\n              ctx.scale(-1, 1);\n              break;\n\n            case 8:\n              // 90° rotate left\n              ctx.rotate(-0.5 * Math.PI);\n              ctx.translate(-canvas.height, 0);\n              break;\n          } // This is a bugfix for iOS' scaling bug.\n\n\n          drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n          var thumbnail = canvas.toDataURL(\"image/png\");\n\n          if (callback != null) {\n            return callback(thumbnail, canvas);\n          }\n        });\n      };\n\n      if (callback != null) {\n        img.onerror = callback;\n      }\n\n      return img.src = file.dataURL;\n    } // Goes through the queue and processes files if there aren't too many already.\n\n  }, {\n    key: \"processQueue\",\n    value: function processQueue() {\n      var parallelUploads = this.options.parallelUploads;\n      var processingLength = this.getUploadingFiles().length;\n      var i = processingLength; // There are already at least as many files uploading than should be\n\n      if (processingLength >= parallelUploads) {\n        return;\n      }\n\n      var queuedFiles = this.getQueuedFiles();\n\n      if (!(queuedFiles.length > 0)) {\n        return;\n      }\n\n      if (this.options.uploadMultiple) {\n        // The files should be uploaded in one request\n        return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n      } else {\n        while (i < parallelUploads) {\n          if (!queuedFiles.length) {\n            return;\n          } // Nothing left to process\n\n\n          this.processFile(queuedFiles.shift());\n          i++;\n        }\n      }\n    } // Wrapper for `processFiles`\n\n  }, {\n    key: \"processFile\",\n    value: function processFile(file) {\n      return this.processFiles([file]);\n    } // Loads the file, then calls finishedLoading()\n\n  }, {\n    key: \"processFiles\",\n    value: function processFiles(files) {\n      var _iteratorNormalCompletion18 = true;\n      var _didIteratorError18 = false;\n      var _iteratorError18 = undefined;\n\n      try {\n        for (var _iterator18 = files[Symbol.iterator](), _step18; !(_iteratorNormalCompletion18 = (_step18 = _iterator18.next()).done); _iteratorNormalCompletion18 = true) {\n          var file = _step18.value;\n          file.processing = true; // Backwards compatibility\n\n          file.status = Dropzone.UPLOADING;\n          this.emit(\"processing\", file);\n        }\n      } catch (err) {\n        _didIteratorError18 = true;\n        _iteratorError18 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion18 && _iterator18[\"return\"] != null) {\n            _iterator18[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError18) {\n            throw _iteratorError18;\n          }\n        }\n      }\n\n      if (this.options.uploadMultiple) {\n        this.emit(\"processingmultiple\", files);\n      }\n\n      return this.uploadFiles(files);\n    }\n  }, {\n    key: \"_getFilesWithXhr\",\n    value: function _getFilesWithXhr(xhr) {\n      var files;\n      return files = this.files.filter(function (file) {\n        return file.xhr === xhr;\n      }).map(function (file) {\n        return file;\n      });\n    } // Cancels the file upload and sets the status to CANCELED\n    // **if** the file is actually being uploaded.\n    // If it's still in the queue, the file is being removed from it and the status\n    // set to CANCELED.\n\n  }, {\n    key: \"cancelUpload\",\n    value: function cancelUpload(file) {\n      if (file.status === Dropzone.UPLOADING) {\n        var groupedFiles = this._getFilesWithXhr(file.xhr);\n\n        var _iteratorNormalCompletion19 = true;\n        var _didIteratorError19 = false;\n        var _iteratorError19 = undefined;\n\n        try {\n          for (var _iterator19 = groupedFiles[Symbol.iterator](), _step19; !(_iteratorNormalCompletion19 = (_step19 = _iterator19.next()).done); _iteratorNormalCompletion19 = true) {\n            var groupedFile = _step19.value;\n            groupedFile.status = Dropzone.CANCELED;\n          }\n        } catch (err) {\n          _didIteratorError19 = true;\n          _iteratorError19 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion19 && _iterator19[\"return\"] != null) {\n              _iterator19[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError19) {\n              throw _iteratorError19;\n            }\n          }\n        }\n\n        if (typeof file.xhr !== 'undefined') {\n          file.xhr.abort();\n        }\n\n        var _iteratorNormalCompletion20 = true;\n        var _didIteratorError20 = false;\n        var _iteratorError20 = undefined;\n\n        try {\n          for (var _iterator20 = groupedFiles[Symbol.iterator](), _step20; !(_iteratorNormalCompletion20 = (_step20 = _iterator20.next()).done); _iteratorNormalCompletion20 = true) {\n            var _groupedFile = _step20.value;\n            this.emit(\"canceled\", _groupedFile);\n          }\n        } catch (err) {\n          _didIteratorError20 = true;\n          _iteratorError20 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion20 && _iterator20[\"return\"] != null) {\n              _iterator20[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError20) {\n              throw _iteratorError20;\n            }\n          }\n        }\n\n        if (this.options.uploadMultiple) {\n          this.emit(\"canceledmultiple\", groupedFiles);\n        }\n      } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {\n        file.status = Dropzone.CANCELED;\n        this.emit(\"canceled\", file);\n\n        if (this.options.uploadMultiple) {\n          this.emit(\"canceledmultiple\", [file]);\n        }\n      }\n\n      if (this.options.autoProcessQueue) {\n        return this.processQueue();\n      }\n    }\n  }, {\n    key: \"resolveOption\",\n    value: function resolveOption(option) {\n      if (typeof option === 'function') {\n        for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n          args[_key3 - 1] = arguments[_key3];\n        }\n\n        return option.apply(this, args);\n      }\n\n      return option;\n    }\n  }, {\n    key: \"uploadFile\",\n    value: function uploadFile(file) {\n      return this.uploadFiles([file]);\n    }\n  }, {\n    key: \"uploadFiles\",\n    value: function uploadFiles(files) {\n      var _this15 = this;\n\n      this._transformFiles(files, function (transformedFiles) {\n        if (_this15.options.chunking) {\n          // Chunking is not allowed to be used with `uploadMultiple` so we know\n          // that there is only __one__file.\n          var transformedFile = transformedFiles[0];\n          files[0].upload.chunked = _this15.options.chunking && (_this15.options.forceChunking || transformedFile.size > _this15.options.chunkSize);\n          files[0].upload.totalChunkCount = Math.ceil(transformedFile.size / _this15.options.chunkSize);\n        }\n\n        if (files[0].upload.chunked) {\n          // This file should be sent in chunks!\n          // If the chunking option is set, we **know** that there can only be **one** file, since\n          // uploadMultiple is not allowed with this option.\n          var file = files[0];\n          var _transformedFile = transformedFiles[0];\n          var startedChunkCount = 0;\n          file.upload.chunks = [];\n\n          var handleNextChunk = function handleNextChunk() {\n            var chunkIndex = 0; // Find the next item in file.upload.chunks that is not defined yet.\n\n            while (file.upload.chunks[chunkIndex] !== undefined) {\n              chunkIndex++;\n            } // This means, that all chunks have already been started.\n\n\n            if (chunkIndex >= file.upload.totalChunkCount) return;\n            startedChunkCount++;\n            var start = chunkIndex * _this15.options.chunkSize;\n            var end = Math.min(start + _this15.options.chunkSize, file.size);\n            var dataBlock = {\n              name: _this15._getParamName(0),\n              data: _transformedFile.webkitSlice ? _transformedFile.webkitSlice(start, end) : _transformedFile.slice(start, end),\n              filename: file.upload.filename,\n              chunkIndex: chunkIndex\n            };\n            file.upload.chunks[chunkIndex] = {\n              file: file,\n              index: chunkIndex,\n              dataBlock: dataBlock,\n              // In case we want to retry.\n              status: Dropzone.UPLOADING,\n              progress: 0,\n              retries: 0 // The number of times this block has been retried.\n\n            };\n\n            _this15._uploadData(files, [dataBlock]);\n          };\n\n          file.upload.finishedChunkUpload = function (chunk) {\n            var allFinished = true;\n            chunk.status = Dropzone.SUCCESS; // Clear the data from the chunk\n\n            chunk.dataBlock = null; // Leaving this reference to xhr intact here will cause memory leaks in some browsers\n\n            chunk.xhr = null;\n\n            for (var i = 0; i < file.upload.totalChunkCount; i++) {\n              if (file.upload.chunks[i] === undefined) {\n                return handleNextChunk();\n              }\n\n              if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {\n                allFinished = false;\n              }\n            }\n\n            if (allFinished) {\n              _this15.options.chunksUploaded(file, function () {\n                _this15._finished(files, '', null);\n              });\n            }\n          };\n\n          if (_this15.options.parallelChunkUploads) {\n            for (var i = 0; i < file.upload.totalChunkCount; i++) {\n              handleNextChunk();\n            }\n          } else {\n            handleNextChunk();\n          }\n        } else {\n          var dataBlocks = [];\n\n          for (var _i3 = 0; _i3 < files.length; _i3++) {\n            dataBlocks[_i3] = {\n              name: _this15._getParamName(_i3),\n              data: transformedFiles[_i3],\n              filename: files[_i3].upload.filename\n            };\n          }\n\n          _this15._uploadData(files, dataBlocks);\n        }\n      });\n    } /// Returns the right chunk for given file and xhr\n\n  }, {\n    key: \"_getChunk\",\n    value: function _getChunk(file, xhr) {\n      for (var i = 0; i < file.upload.totalChunkCount; i++) {\n        if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {\n          return file.upload.chunks[i];\n        }\n      }\n    } // This function actually uploads the file(s) to the server.\n    // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed\n    // files, or individual chunks for chunked upload).\n\n  }, {\n    key: \"_uploadData\",\n    value: function _uploadData(files, dataBlocks) {\n      var _this16 = this;\n\n      var xhr = new XMLHttpRequest(); // Put the xhr object in the file objects to be able to reference it later.\n\n      var _iteratorNormalCompletion21 = true;\n      var _didIteratorError21 = false;\n      var _iteratorError21 = undefined;\n\n      try {\n        for (var _iterator21 = files[Symbol.iterator](), _step21; !(_iteratorNormalCompletion21 = (_step21 = _iterator21.next()).done); _iteratorNormalCompletion21 = true) {\n          var file = _step21.value;\n          file.xhr = xhr;\n        }\n      } catch (err) {\n        _didIteratorError21 = true;\n        _iteratorError21 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion21 && _iterator21[\"return\"] != null) {\n            _iterator21[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError21) {\n            throw _iteratorError21;\n          }\n        }\n      }\n\n      if (files[0].upload.chunked) {\n        // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk\n        files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;\n      }\n\n      var method = this.resolveOption(this.options.method, files);\n      var url = this.resolveOption(this.options.url, files);\n      xhr.open(method, url, true); // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8\n\n      xhr.timeout = this.resolveOption(this.options.timeout, files); // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179\n\n      xhr.withCredentials = !!this.options.withCredentials;\n\n      xhr.onload = function (e) {\n        _this16._finishedUploading(files, xhr, e);\n      };\n\n      xhr.ontimeout = function () {\n        _this16._handleUploadError(files, xhr, \"Request timedout after \".concat(_this16.options.timeout, \" seconds\"));\n      };\n\n      xhr.onerror = function () {\n        _this16._handleUploadError(files, xhr);\n      }; // Some browsers do not have the .upload property\n\n\n      var progressObj = xhr.upload != null ? xhr.upload : xhr;\n\n      progressObj.onprogress = function (e) {\n        return _this16._updateFilesUploadProgress(files, xhr, e);\n      };\n\n      var headers = {\n        \"Accept\": \"application/json\",\n        \"Cache-Control\": \"no-cache\",\n        \"X-Requested-With\": \"XMLHttpRequest\"\n      };\n\n      if (this.options.headers) {\n        Dropzone.extend(headers, this.options.headers);\n      }\n\n      for (var headerName in headers) {\n        var headerValue = headers[headerName];\n\n        if (headerValue) {\n          xhr.setRequestHeader(headerName, headerValue);\n        }\n      }\n\n      var formData = new FormData(); // Adding all @options parameters\n\n      if (this.options.params) {\n        var additionalParams = this.options.params;\n\n        if (typeof additionalParams === 'function') {\n          additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);\n        }\n\n        for (var key in additionalParams) {\n          var value = additionalParams[key];\n          formData.append(key, value);\n        }\n      } // Let the user add additional data if necessary\n\n\n      var _iteratorNormalCompletion22 = true;\n      var _didIteratorError22 = false;\n      var _iteratorError22 = undefined;\n\n      try {\n        for (var _iterator22 = files[Symbol.iterator](), _step22; !(_iteratorNormalCompletion22 = (_step22 = _iterator22.next()).done); _iteratorNormalCompletion22 = true) {\n          var _file = _step22.value;\n          this.emit(\"sending\", _file, xhr, formData);\n        }\n      } catch (err) {\n        _didIteratorError22 = true;\n        _iteratorError22 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion22 && _iterator22[\"return\"] != null) {\n            _iterator22[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError22) {\n            throw _iteratorError22;\n          }\n        }\n      }\n\n      if (this.options.uploadMultiple) {\n        this.emit(\"sendingmultiple\", files, xhr, formData);\n      }\n\n      this._addFormElementData(formData); // Finally add the files\n      // Has to be last because some servers (eg: S3) expect the file to be the last parameter\n\n\n      for (var i = 0; i < dataBlocks.length; i++) {\n        var dataBlock = dataBlocks[i];\n        formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);\n      }\n\n      this.submitRequest(xhr, formData, files);\n    } // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.\n\n  }, {\n    key: \"_transformFiles\",\n    value: function _transformFiles(files, done) {\n      var _this17 = this;\n\n      var transformedFiles = []; // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.\n\n      var doneCounter = 0;\n\n      var _loop = function _loop(i) {\n        _this17.options.transformFile.call(_this17, files[i], function (transformedFile) {\n          transformedFiles[i] = transformedFile;\n\n          if (++doneCounter === files.length) {\n            done(transformedFiles);\n          }\n        });\n      };\n\n      for (var i = 0; i < files.length; i++) {\n        _loop(i);\n      }\n    } // Takes care of adding other input elements of the form to the AJAX request\n\n  }, {\n    key: \"_addFormElementData\",\n    value: function _addFormElementData(formData) {\n      // Take care of other input elements\n      if (this.element.tagName === \"FORM\") {\n        var _iteratorNormalCompletion23 = true;\n        var _didIteratorError23 = false;\n        var _iteratorError23 = undefined;\n\n        try {\n          for (var _iterator23 = this.element.querySelectorAll(\"input, textarea, select, button\")[Symbol.iterator](), _step23; !(_iteratorNormalCompletion23 = (_step23 = _iterator23.next()).done); _iteratorNormalCompletion23 = true) {\n            var input = _step23.value;\n            var inputName = input.getAttribute(\"name\");\n            var inputType = input.getAttribute(\"type\");\n            if (inputType) inputType = inputType.toLowerCase(); // If the input doesn't have a name, we can't use it.\n\n            if (typeof inputName === 'undefined' || inputName === null) continue;\n\n            if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n              // Possibly multiple values\n              var _iteratorNormalCompletion24 = true;\n              var _didIteratorError24 = false;\n              var _iteratorError24 = undefined;\n\n              try {\n                for (var _iterator24 = input.options[Symbol.iterator](), _step24; !(_iteratorNormalCompletion24 = (_step24 = _iterator24.next()).done); _iteratorNormalCompletion24 = true) {\n                  var option = _step24.value;\n\n                  if (option.selected) {\n                    formData.append(inputName, option.value);\n                  }\n                }\n              } catch (err) {\n                _didIteratorError24 = true;\n                _iteratorError24 = err;\n              } finally {\n                try {\n                  if (!_iteratorNormalCompletion24 && _iterator24[\"return\"] != null) {\n                    _iterator24[\"return\"]();\n                  }\n                } finally {\n                  if (_didIteratorError24) {\n                    throw _iteratorError24;\n                  }\n                }\n              }\n            } else if (!inputType || inputType !== \"checkbox\" && inputType !== \"radio\" || input.checked) {\n              formData.append(inputName, input.value);\n            }\n          }\n        } catch (err) {\n          _didIteratorError23 = true;\n          _iteratorError23 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion23 && _iterator23[\"return\"] != null) {\n              _iterator23[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError23) {\n              throw _iteratorError23;\n            }\n          }\n        }\n      }\n    } // Invoked when there is new progress information about given files.\n    // If e is not provided, it is assumed that the upload is finished.\n\n  }, {\n    key: \"_updateFilesUploadProgress\",\n    value: function _updateFilesUploadProgress(files, xhr, e) {\n      var progress;\n\n      if (typeof e !== 'undefined') {\n        progress = 100 * e.loaded / e.total;\n\n        if (files[0].upload.chunked) {\n          var file = files[0]; // Since this is a chunked upload, we need to update the appropriate chunk progress.\n\n          var chunk = this._getChunk(file, xhr);\n\n          chunk.progress = progress;\n          chunk.total = e.total;\n          chunk.bytesSent = e.loaded;\n          var fileProgress = 0,\n              fileTotal,\n              fileBytesSent;\n          file.upload.progress = 0;\n          file.upload.total = 0;\n          file.upload.bytesSent = 0;\n\n          for (var i = 0; i < file.upload.totalChunkCount; i++) {\n            if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].progress !== undefined) {\n              file.upload.progress += file.upload.chunks[i].progress;\n              file.upload.total += file.upload.chunks[i].total;\n              file.upload.bytesSent += file.upload.chunks[i].bytesSent;\n            }\n          }\n\n          file.upload.progress = file.upload.progress / file.upload.totalChunkCount;\n        } else {\n          var _iteratorNormalCompletion25 = true;\n          var _didIteratorError25 = false;\n          var _iteratorError25 = undefined;\n\n          try {\n            for (var _iterator25 = files[Symbol.iterator](), _step25; !(_iteratorNormalCompletion25 = (_step25 = _iterator25.next()).done); _iteratorNormalCompletion25 = true) {\n              var _file2 = _step25.value;\n              _file2.upload.progress = progress;\n              _file2.upload.total = e.total;\n              _file2.upload.bytesSent = e.loaded;\n            }\n          } catch (err) {\n            _didIteratorError25 = true;\n            _iteratorError25 = err;\n          } finally {\n            try {\n              if (!_iteratorNormalCompletion25 && _iterator25[\"return\"] != null) {\n                _iterator25[\"return\"]();\n              }\n            } finally {\n              if (_didIteratorError25) {\n                throw _iteratorError25;\n              }\n            }\n          }\n        }\n\n        var _iteratorNormalCompletion26 = true;\n        var _didIteratorError26 = false;\n        var _iteratorError26 = undefined;\n\n        try {\n          for (var _iterator26 = files[Symbol.iterator](), _step26; !(_iteratorNormalCompletion26 = (_step26 = _iterator26.next()).done); _iteratorNormalCompletion26 = true) {\n            var _file3 = _step26.value;\n            this.emit(\"uploadprogress\", _file3, _file3.upload.progress, _file3.upload.bytesSent);\n          }\n        } catch (err) {\n          _didIteratorError26 = true;\n          _iteratorError26 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion26 && _iterator26[\"return\"] != null) {\n              _iterator26[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError26) {\n              throw _iteratorError26;\n            }\n          }\n        }\n      } else {\n        // Called when the file finished uploading\n        var allFilesFinished = true;\n        progress = 100;\n        var _iteratorNormalCompletion27 = true;\n        var _didIteratorError27 = false;\n        var _iteratorError27 = undefined;\n\n        try {\n          for (var _iterator27 = files[Symbol.iterator](), _step27; !(_iteratorNormalCompletion27 = (_step27 = _iterator27.next()).done); _iteratorNormalCompletion27 = true) {\n            var _file4 = _step27.value;\n\n            if (_file4.upload.progress !== 100 || _file4.upload.bytesSent !== _file4.upload.total) {\n              allFilesFinished = false;\n            }\n\n            _file4.upload.progress = progress;\n            _file4.upload.bytesSent = _file4.upload.total;\n          } // Nothing to do, all files already at 100%\n\n        } catch (err) {\n          _didIteratorError27 = true;\n          _iteratorError27 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion27 && _iterator27[\"return\"] != null) {\n              _iterator27[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError27) {\n              throw _iteratorError27;\n            }\n          }\n        }\n\n        if (allFilesFinished) {\n          return;\n        }\n\n        var _iteratorNormalCompletion28 = true;\n        var _didIteratorError28 = false;\n        var _iteratorError28 = undefined;\n\n        try {\n          for (var _iterator28 = files[Symbol.iterator](), _step28; !(_iteratorNormalCompletion28 = (_step28 = _iterator28.next()).done); _iteratorNormalCompletion28 = true) {\n            var _file5 = _step28.value;\n            this.emit(\"uploadprogress\", _file5, progress, _file5.upload.bytesSent);\n          }\n        } catch (err) {\n          _didIteratorError28 = true;\n          _iteratorError28 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion28 && _iterator28[\"return\"] != null) {\n              _iterator28[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError28) {\n              throw _iteratorError28;\n            }\n          }\n        }\n      }\n    }\n  }, {\n    key: \"_finishedUploading\",\n    value: function _finishedUploading(files, xhr, e) {\n      var response;\n\n      if (files[0].status === Dropzone.CANCELED) {\n        return;\n      }\n\n      if (xhr.readyState !== 4) {\n        return;\n      }\n\n      if (xhr.responseType !== 'arraybuffer' && xhr.responseType !== 'blob') {\n        response = xhr.responseText;\n\n        if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\n          try {\n            response = JSON.parse(response);\n          } catch (error) {\n            e = error;\n            response = \"Invalid JSON response from server.\";\n          }\n        }\n      }\n\n      this._updateFilesUploadProgress(files);\n\n      if (!(200 <= xhr.status && xhr.status < 300)) {\n        this._handleUploadError(files, xhr, response);\n      } else {\n        if (files[0].upload.chunked) {\n          files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr));\n        } else {\n          this._finished(files, response, e);\n        }\n      }\n    }\n  }, {\n    key: \"_handleUploadError\",\n    value: function _handleUploadError(files, xhr, response) {\n      if (files[0].status === Dropzone.CANCELED) {\n        return;\n      }\n\n      if (files[0].upload.chunked && this.options.retryChunks) {\n        var chunk = this._getChunk(files[0], xhr);\n\n        if (chunk.retries++ < this.options.retryChunksLimit) {\n          this._uploadData(files, [chunk.dataBlock]);\n\n          return;\n        } else {\n          console.warn('Retried this chunk too often. Giving up.');\n        }\n      }\n\n      this._errorProcessing(files, response || this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr);\n    }\n  }, {\n    key: \"submitRequest\",\n    value: function submitRequest(xhr, formData, files) {\n      xhr.send(formData);\n    } // Called internally when processing is finished.\n    // Individual callbacks have to be called in the appropriate sections.\n\n  }, {\n    key: \"_finished\",\n    value: function _finished(files, responseText, e) {\n      var _iteratorNormalCompletion29 = true;\n      var _didIteratorError29 = false;\n      var _iteratorError29 = undefined;\n\n      try {\n        for (var _iterator29 = files[Symbol.iterator](), _step29; !(_iteratorNormalCompletion29 = (_step29 = _iterator29.next()).done); _iteratorNormalCompletion29 = true) {\n          var file = _step29.value;\n          file.status = Dropzone.SUCCESS;\n          this.emit(\"success\", file, responseText, e);\n          this.emit(\"complete\", file);\n        }\n      } catch (err) {\n        _didIteratorError29 = true;\n        _iteratorError29 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion29 && _iterator29[\"return\"] != null) {\n            _iterator29[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError29) {\n            throw _iteratorError29;\n          }\n        }\n      }\n\n      if (this.options.uploadMultiple) {\n        this.emit(\"successmultiple\", files, responseText, e);\n        this.emit(\"completemultiple\", files);\n      }\n\n      if (this.options.autoProcessQueue) {\n        return this.processQueue();\n      }\n    } // Called internally when processing is finished.\n    // Individual callbacks have to be called in the appropriate sections.\n\n  }, {\n    key: \"_errorProcessing\",\n    value: function _errorProcessing(files, message, xhr) {\n      var _iteratorNormalCompletion30 = true;\n      var _didIteratorError30 = false;\n      var _iteratorError30 = undefined;\n\n      try {\n        for (var _iterator30 = files[Symbol.iterator](), _step30; !(_iteratorNormalCompletion30 = (_step30 = _iterator30.next()).done); _iteratorNormalCompletion30 = true) {\n          var file = _step30.value;\n          file.status = Dropzone.ERROR;\n          this.emit(\"error\", file, message, xhr);\n          this.emit(\"complete\", file);\n        }\n      } catch (err) {\n        _didIteratorError30 = true;\n        _iteratorError30 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion30 && _iterator30[\"return\"] != null) {\n            _iterator30[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError30) {\n            throw _iteratorError30;\n          }\n        }\n      }\n\n      if (this.options.uploadMultiple) {\n        this.emit(\"errormultiple\", files, message, xhr);\n        this.emit(\"completemultiple\", files);\n      }\n\n      if (this.options.autoProcessQueue) {\n        return this.processQueue();\n      }\n    }\n  }], [{\n    key: \"uuidv4\",\n    value: function uuidv4() {\n      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n        var r = Math.random() * 16 | 0,\n            v = c === 'x' ? r : r & 0x3 | 0x8;\n        return v.toString(16);\n      });\n    }\n  }]);\n\n  return Dropzone;\n}(Emitter);\n\nDropzone.initClass();\nDropzone.version = \"5.7.0\"; // This is a map of options for your different dropzones. Add configurations\n// to this object for your different dropzone elemens.\n//\n// Example:\n//\n//     Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };\n//\n// To disable autoDiscover for a specific element, you can set `false` as an option:\n//\n//     Dropzone.options.myDisabledElementId = false;\n//\n// And in html:\n//\n//     <form action=\"/upload\" id=\"my-dropzone-element-id\" class=\"dropzone\"></form>\n\nDropzone.options = {}; // Returns the options for an element or undefined if none available.\n\nDropzone.optionsForElement = function (element) {\n  // Get the `Dropzone.options.elementId` for this element if it exists\n  if (element.getAttribute(\"id\")) {\n    return Dropzone.options[camelize(element.getAttribute(\"id\"))];\n  } else {\n    return undefined;\n  }\n}; // Holds a list of all dropzone instances\n\n\nDropzone.instances = []; // Returns the dropzone for given element if any\n\nDropzone.forElement = function (element) {\n  if (typeof element === \"string\") {\n    element = document.querySelector(element);\n  }\n\n  if ((element != null ? element.dropzone : undefined) == null) {\n    throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n  }\n\n  return element.dropzone;\n}; // Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.\n\n\nDropzone.autoDiscover = true; // Looks for all .dropzone elements and creates a dropzone for them\n\nDropzone.discover = function () {\n  var dropzones;\n\n  if (document.querySelectorAll) {\n    dropzones = document.querySelectorAll(\".dropzone\");\n  } else {\n    dropzones = []; // IE :(\n\n    var checkElements = function checkElements(elements) {\n      return function () {\n        var result = [];\n        var _iteratorNormalCompletion31 = true;\n        var _didIteratorError31 = false;\n        var _iteratorError31 = undefined;\n\n        try {\n          for (var _iterator31 = elements[Symbol.iterator](), _step31; !(_iteratorNormalCompletion31 = (_step31 = _iterator31.next()).done); _iteratorNormalCompletion31 = true) {\n            var el = _step31.value;\n\n            if (/(^| )dropzone($| )/.test(el.className)) {\n              result.push(dropzones.push(el));\n            } else {\n              result.push(undefined);\n            }\n          }\n        } catch (err) {\n          _didIteratorError31 = true;\n          _iteratorError31 = err;\n        } finally {\n          try {\n            if (!_iteratorNormalCompletion31 && _iterator31[\"return\"] != null) {\n              _iterator31[\"return\"]();\n            }\n          } finally {\n            if (_didIteratorError31) {\n              throw _iteratorError31;\n            }\n          }\n        }\n\n        return result;\n      }();\n    };\n\n    checkElements(document.getElementsByTagName(\"div\"));\n    checkElements(document.getElementsByTagName(\"form\"));\n  }\n\n  return function () {\n    var result = [];\n    var _iteratorNormalCompletion32 = true;\n    var _didIteratorError32 = false;\n    var _iteratorError32 = undefined;\n\n    try {\n      for (var _iterator32 = dropzones[Symbol.iterator](), _step32; !(_iteratorNormalCompletion32 = (_step32 = _iterator32.next()).done); _iteratorNormalCompletion32 = true) {\n        var dropzone = _step32.value;\n\n        // Create a dropzone unless auto discover has been disabled for specific element\n        if (Dropzone.optionsForElement(dropzone) !== false) {\n          result.push(new Dropzone(dropzone));\n        } else {\n          result.push(undefined);\n        }\n      }\n    } catch (err) {\n      _didIteratorError32 = true;\n      _iteratorError32 = err;\n    } finally {\n      try {\n        if (!_iteratorNormalCompletion32 && _iterator32[\"return\"] != null) {\n          _iterator32[\"return\"]();\n        }\n      } finally {\n        if (_didIteratorError32) {\n          throw _iteratorError32;\n        }\n      }\n    }\n\n    return result;\n  }();\n}; // Since the whole Drag'n'Drop API is pretty new, some browsers implement it,\n// but not correctly.\n// So I created a blacklist of userAgents. Yes, yes. Browser sniffing, I know.\n// But what to do when browsers *theoretically* support an API, but crash\n// when using it.\n//\n// This is a list of regular expressions tested against navigator.userAgent\n//\n// ** It should only be used on browser that *do* support the API, but\n// incorrectly **\n//\n\n\nDropzone.blacklistedBrowsers = [// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.\n/opera.*(Macintosh|Windows Phone).*version\\/12/i]; // Checks if the browser is supported\n\nDropzone.isBrowserSupported = function () {\n  var capableBrowser = true;\n\n  if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n    if (!(\"classList\" in document.createElement(\"a\"))) {\n      capableBrowser = false;\n    } else {\n      // The browser supports the API, but may be blacklisted.\n      var _iteratorNormalCompletion33 = true;\n      var _didIteratorError33 = false;\n      var _iteratorError33 = undefined;\n\n      try {\n        for (var _iterator33 = Dropzone.blacklistedBrowsers[Symbol.iterator](), _step33; !(_iteratorNormalCompletion33 = (_step33 = _iterator33.next()).done); _iteratorNormalCompletion33 = true) {\n          var regex = _step33.value;\n\n          if (regex.test(navigator.userAgent)) {\n            capableBrowser = false;\n            continue;\n          }\n        }\n      } catch (err) {\n        _didIteratorError33 = true;\n        _iteratorError33 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion33 && _iterator33[\"return\"] != null) {\n            _iterator33[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError33) {\n            throw _iteratorError33;\n          }\n        }\n      }\n    }\n  } else {\n    capableBrowser = false;\n  }\n\n  return capableBrowser;\n};\n\nDropzone.dataURItoBlob = function (dataURI) {\n  // convert base64 to raw binary data held in a string\n  // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n  var byteString = atob(dataURI.split(',')[1]); // separate out the mime component\n\n  var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // write the bytes of the string to an ArrayBuffer\n\n  var ab = new ArrayBuffer(byteString.length);\n  var ia = new Uint8Array(ab);\n\n  for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {\n    ia[i] = byteString.charCodeAt(i);\n  } // write the ArrayBuffer to a blob\n\n\n  return new Blob([ab], {\n    type: mimeString\n  });\n}; // Returns an array without the rejected item\n\n\nvar without = function without(list, rejectedItem) {\n  return list.filter(function (item) {\n    return item !== rejectedItem;\n  }).map(function (item) {\n    return item;\n  });\n}; // abc-def_ghi -> abcDefGhi\n\n\nvar camelize = function camelize(str) {\n  return str.replace(/[\\-_](\\w)/g, function (match) {\n    return match.charAt(1).toUpperCase();\n  });\n}; // Creates an element from string\n\n\nDropzone.createElement = function (string) {\n  var div = document.createElement(\"div\");\n  div.innerHTML = string;\n  return div.childNodes[0];\n}; // Tests if given element is inside (or simply is) the container\n\n\nDropzone.elementInside = function (element, container) {\n  if (element === container) {\n    return true;\n  } // Coffeescript doesn't support do/while loops\n\n\n  while (element = element.parentNode) {\n    if (element === container) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nDropzone.getElement = function (el, name) {\n  var element;\n\n  if (typeof el === \"string\") {\n    element = document.querySelector(el);\n  } else if (el.nodeType != null) {\n    element = el;\n  }\n\n  if (element == null) {\n    throw new Error(\"Invalid `\".concat(name, \"` option provided. Please provide a CSS selector or a plain HTML element.\"));\n  }\n\n  return element;\n};\n\nDropzone.getElements = function (els, name) {\n  var el, elements;\n\n  if (els instanceof Array) {\n    elements = [];\n\n    try {\n      var _iteratorNormalCompletion34 = true;\n      var _didIteratorError34 = false;\n      var _iteratorError34 = undefined;\n\n      try {\n        for (var _iterator34 = els[Symbol.iterator](), _step34; !(_iteratorNormalCompletion34 = (_step34 = _iterator34.next()).done); _iteratorNormalCompletion34 = true) {\n          el = _step34.value;\n          elements.push(this.getElement(el, name));\n        }\n      } catch (err) {\n        _didIteratorError34 = true;\n        _iteratorError34 = err;\n      } finally {\n        try {\n          if (!_iteratorNormalCompletion34 && _iterator34[\"return\"] != null) {\n            _iterator34[\"return\"]();\n          }\n        } finally {\n          if (_didIteratorError34) {\n            throw _iteratorError34;\n          }\n        }\n      }\n    } catch (e) {\n      elements = null;\n    }\n  } else if (typeof els === \"string\") {\n    elements = [];\n    var _iteratorNormalCompletion35 = true;\n    var _didIteratorError35 = false;\n    var _iteratorError35 = undefined;\n\n    try {\n      for (var _iterator35 = document.querySelectorAll(els)[Symbol.iterator](), _step35; !(_iteratorNormalCompletion35 = (_step35 = _iterator35.next()).done); _iteratorNormalCompletion35 = true) {\n        el = _step35.value;\n        elements.push(el);\n      }\n    } catch (err) {\n      _didIteratorError35 = true;\n      _iteratorError35 = err;\n    } finally {\n      try {\n        if (!_iteratorNormalCompletion35 && _iterator35[\"return\"] != null) {\n          _iterator35[\"return\"]();\n        }\n      } finally {\n        if (_didIteratorError35) {\n          throw _iteratorError35;\n        }\n      }\n    }\n  } else if (els.nodeType != null) {\n    elements = [els];\n  }\n\n  if (elements == null || !elements.length) {\n    throw new Error(\"Invalid `\".concat(name, \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\"));\n  }\n\n  return elements;\n}; // Asks the user the question and calls accepted or rejected accordingly\n//\n// The default implementation just uses `window.confirm` and then calls the\n// appropriate callback.\n\n\nDropzone.confirm = function (question, accepted, rejected) {\n  if (window.confirm(question)) {\n    return accepted();\n  } else if (rejected != null) {\n    return rejected();\n  }\n}; // Validates the mime type like this:\n//\n// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept\n\n\nDropzone.isValidFile = function (file, acceptedFiles) {\n  if (!acceptedFiles) {\n    return true;\n  } // If there are no accepted mime types, it's OK\n\n\n  acceptedFiles = acceptedFiles.split(\",\");\n  var mimeType = file.type;\n  var baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n  var _iteratorNormalCompletion36 = true;\n  var _didIteratorError36 = false;\n  var _iteratorError36 = undefined;\n\n  try {\n    for (var _iterator36 = acceptedFiles[Symbol.iterator](), _step36; !(_iteratorNormalCompletion36 = (_step36 = _iterator36.next()).done); _iteratorNormalCompletion36 = true) {\n      var validType = _step36.value;\n      validType = validType.trim();\n\n      if (validType.charAt(0) === \".\") {\n        if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\n          return true;\n        }\n      } else if (/\\/\\*$/.test(validType)) {\n        // This is something like a image/* mime type\n        if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\n          return true;\n        }\n      } else {\n        if (mimeType === validType) {\n          return true;\n        }\n      }\n    }\n  } catch (err) {\n    _didIteratorError36 = true;\n    _iteratorError36 = err;\n  } finally {\n    try {\n      if (!_iteratorNormalCompletion36 && _iterator36[\"return\"] != null) {\n        _iterator36[\"return\"]();\n      }\n    } finally {\n      if (_didIteratorError36) {\n        throw _iteratorError36;\n      }\n    }\n  }\n\n  return false;\n}; // Augment jQuery\n\n\nif (typeof jQuery !== 'undefined' && jQuery !== null) {\n  jQuery.fn.dropzone = function (options) {\n    return this.each(function () {\n      return new Dropzone(this, options);\n    });\n  };\n}\n\nif ( true && module !== null) {\n  module.exports = Dropzone;\n} else {\n  window.Dropzone = Dropzone;\n} // Dropzone file status codes\n\n\nDropzone.ADDED = \"added\";\nDropzone.QUEUED = \"queued\"; // For backwards compatibility. Now, if a file is accepted, it's either queued\n// or uploading.\n\nDropzone.ACCEPTED = Dropzone.QUEUED;\nDropzone.UPLOADING = \"uploading\";\nDropzone.PROCESSING = Dropzone.UPLOADING; // alias\n\nDropzone.CANCELED = \"canceled\";\nDropzone.ERROR = \"error\";\nDropzone.SUCCESS = \"success\";\n/*\n\n Bugfix for iOS 6 and 7\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\n\n */\n// Detecting vertical squash in loaded image.\n// Fixes a bug which squash image vertically while drawing into canvas for some images.\n// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel\n\nvar detectVerticalSquash = function detectVerticalSquash(img) {\n  var iw = img.naturalWidth;\n  var ih = img.naturalHeight;\n  var canvas = document.createElement(\"canvas\");\n  canvas.width = 1;\n  canvas.height = ih;\n  var ctx = canvas.getContext(\"2d\");\n  ctx.drawImage(img, 0, 0);\n\n  var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),\n      data = _ctx$getImageData.data; // search image edge pixel position in case it is squashed vertically.\n\n\n  var sy = 0;\n  var ey = ih;\n  var py = ih;\n\n  while (py > sy) {\n    var alpha = data[(py - 1) * 4 + 3];\n\n    if (alpha === 0) {\n      ey = py;\n    } else {\n      sy = py;\n    }\n\n    py = ey + sy >> 1;\n  }\n\n  var ratio = py / ih;\n\n  if (ratio === 0) {\n    return 1;\n  } else {\n    return ratio;\n  }\n}; // A replacement for context.drawImage\n// (args are for source and destination).\n\n\nvar drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n  var vertSquashRatio = detectVerticalSquash(img);\n  return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n}; // Based on MinifyJpeg\n// Source: http://www.perry.cz/files/ExifRestorer.js\n// http://elicon.blog57.fc2.com/blog-entry-206.html\n\n\nvar ExifRestore =\n/*#__PURE__*/\nfunction () {\n  function ExifRestore() {\n    _classCallCheck(this, ExifRestore);\n  }\n\n  _createClass(ExifRestore, null, [{\n    key: \"initClass\",\n    value: function initClass() {\n      this.KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n    }\n  }, {\n    key: \"encode64\",\n    value: function encode64(input) {\n      var output = '';\n      var chr1 = undefined;\n      var chr2 = undefined;\n      var chr3 = '';\n      var enc1 = undefined;\n      var enc2 = undefined;\n      var enc3 = undefined;\n      var enc4 = '';\n      var i = 0;\n\n      while (true) {\n        chr1 = input[i++];\n        chr2 = input[i++];\n        chr3 = input[i++];\n        enc1 = chr1 >> 2;\n        enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n        enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n        enc4 = chr3 & 63;\n\n        if (isNaN(chr2)) {\n          enc3 = enc4 = 64;\n        } else if (isNaN(chr3)) {\n          enc4 = 64;\n        }\n\n        output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);\n        chr1 = chr2 = chr3 = '';\n        enc1 = enc2 = enc3 = enc4 = '';\n\n        if (!(i < input.length)) {\n          break;\n        }\n      }\n\n      return output;\n    }\n  }, {\n    key: \"restore\",\n    value: function restore(origFileBase64, resizedFileBase64) {\n      if (!origFileBase64.match('data:image/jpeg;base64,')) {\n        return resizedFileBase64;\n      }\n\n      var rawImage = this.decode64(origFileBase64.replace('data:image/jpeg;base64,', ''));\n      var segments = this.slice2Segments(rawImage);\n      var image = this.exifManipulation(resizedFileBase64, segments);\n      return \"data:image/jpeg;base64,\".concat(this.encode64(image));\n    }\n  }, {\n    key: \"exifManipulation\",\n    value: function exifManipulation(resizedFileBase64, segments) {\n      var exifArray = this.getExifArray(segments);\n      var newImageArray = this.insertExif(resizedFileBase64, exifArray);\n      var aBuffer = new Uint8Array(newImageArray);\n      return aBuffer;\n    }\n  }, {\n    key: \"getExifArray\",\n    value: function getExifArray(segments) {\n      var seg = undefined;\n      var x = 0;\n\n      while (x < segments.length) {\n        seg = segments[x];\n\n        if (seg[0] === 255 & seg[1] === 225) {\n          return seg;\n        }\n\n        x++;\n      }\n\n      return [];\n    }\n  }, {\n    key: \"insertExif\",\n    value: function insertExif(resizedFileBase64, exifArray) {\n      var imageData = resizedFileBase64.replace('data:image/jpeg;base64,', '');\n      var buf = this.decode64(imageData);\n      var separatePoint = buf.indexOf(255, 3);\n      var mae = buf.slice(0, separatePoint);\n      var ato = buf.slice(separatePoint);\n      var array = mae;\n      array = array.concat(exifArray);\n      array = array.concat(ato);\n      return array;\n    }\n  }, {\n    key: \"slice2Segments\",\n    value: function slice2Segments(rawImageArray) {\n      var head = 0;\n      var segments = [];\n\n      while (true) {\n        var length;\n\n        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {\n          break;\n        }\n\n        if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {\n          head += 2;\n        } else {\n          length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];\n          var endPoint = head + length + 2;\n          var seg = rawImageArray.slice(head, endPoint);\n          segments.push(seg);\n          head = endPoint;\n        }\n\n        if (head > rawImageArray.length) {\n          break;\n        }\n      }\n\n      return segments;\n    }\n  }, {\n    key: \"decode64\",\n    value: function decode64(input) {\n      var output = '';\n      var chr1 = undefined;\n      var chr2 = undefined;\n      var chr3 = '';\n      var enc1 = undefined;\n      var enc2 = undefined;\n      var enc3 = undefined;\n      var enc4 = '';\n      var i = 0;\n      var buf = []; // remove all characters that are not A-Z, a-z, 0-9, +, /, or =\n\n      var base64test = /[^A-Za-z0-9\\+\\/\\=]/g;\n\n      if (base64test.exec(input)) {\n        console.warn('There were invalid base64 characters in the input text.\\nValid base64 characters are A-Z, a-z, 0-9, \\'+\\', \\'/\\',and \\'=\\'\\nExpect errors in decoding.');\n      }\n\n      input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n\n      while (true) {\n        enc1 = this.KEY_STR.indexOf(input.charAt(i++));\n        enc2 = this.KEY_STR.indexOf(input.charAt(i++));\n        enc3 = this.KEY_STR.indexOf(input.charAt(i++));\n        enc4 = this.KEY_STR.indexOf(input.charAt(i++));\n        chr1 = enc1 << 2 | enc2 >> 4;\n        chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n        chr3 = (enc3 & 3) << 6 | enc4;\n        buf.push(chr1);\n\n        if (enc3 !== 64) {\n          buf.push(chr2);\n        }\n\n        if (enc4 !== 64) {\n          buf.push(chr3);\n        }\n\n        chr1 = chr2 = chr3 = '';\n        enc1 = enc2 = enc3 = enc4 = '';\n\n        if (!(i < input.length)) {\n          break;\n        }\n      }\n\n      return buf;\n    }\n  }]);\n\n  return ExifRestore;\n}();\n\nExifRestore.initClass();\n/*\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n */\n// @win window reference\n// @fn function reference\n\nvar contentLoaded = function contentLoaded(win, fn) {\n  var done = false;\n  var top = true;\n  var doc = win.document;\n  var root = doc.documentElement;\n  var add = doc.addEventListener ? \"addEventListener\" : \"attachEvent\";\n  var rem = doc.addEventListener ? \"removeEventListener\" : \"detachEvent\";\n  var pre = doc.addEventListener ? \"\" : \"on\";\n\n  var init = function init(e) {\n    if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\n      return;\n    }\n\n    (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n\n    if (!done && (done = true)) {\n      return fn.call(win, e.type || e);\n    }\n  };\n\n  var poll = function poll() {\n    try {\n      root.doScroll(\"left\");\n    } catch (e) {\n      setTimeout(poll, 50);\n      return;\n    }\n\n    return init(\"poll\");\n  };\n\n  if (doc.readyState !== \"complete\") {\n    if (doc.createEventObject && root.doScroll) {\n      try {\n        top = !win.frameElement;\n      } catch (error) {}\n\n      if (top) {\n        poll();\n      }\n    }\n\n    doc[add](pre + \"DOMContentLoaded\", init, false);\n    doc[add](pre + \"readystatechange\", init, false);\n    return win[add](pre + \"load\", init, false);\n  }\n}; // As a single function to be able to write tests.\n\n\nDropzone._autoDiscoverFunction = function () {\n  if (Dropzone.autoDiscover) {\n    return Dropzone.discover();\n  }\n};\n\ncontentLoaded(window, Dropzone._autoDiscoverFunction);\n\nfunction __guard__(value, transform) {\n  return typeof value !== 'undefined' && value !== null ? transform(value) : undefined;\n}\n\nfunction __guardMethod__(obj, methodName, transform) {\n  if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {\n    return transform(obj, methodName);\n  } else {\n    return undefined;\n  }\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 214056 characters]\n//# sourceURL=webpack-internal:///./node_modules/dropzone/dist/dropzone.js\n");

/***/ }),

/***/ "./node_modules/exif-js/exif.js":
/*!**************************************!*\
  !*** ./node_modules/exif-js/exif.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function() {\n\n    var debug = false;\n\n    var root = this;\n\n    var EXIF = function(obj) {\n        if (obj instanceof EXIF) return obj;\n        if (!(this instanceof EXIF)) return new EXIF(obj);\n        this.EXIFwrapped = obj;\n    };\n\n    if (true) {\n        if ( true && module.exports) {\n            exports = module.exports = EXIF;\n        }\n        exports.EXIF = EXIF;\n    } else {}\n\n    var ExifTags = EXIF.Tags = {\n\n        // version tags\n        0x9000 : \"ExifVersion\",             // EXIF version\n        0xA000 : \"FlashpixVersion\",         // Flashpix format version\n\n        // colorspace tags\n        0xA001 : \"ColorSpace\",              // Color space information tag\n\n        // image configuration\n        0xA002 : \"PixelXDimension\",         // Valid width of meaningful image\n        0xA003 : \"PixelYDimension\",         // Valid height of meaningful image\n        0x9101 : \"ComponentsConfiguration\", // Information about channels\n        0x9102 : \"CompressedBitsPerPixel\",  // Compressed bits per pixel\n\n        // user information\n        0x927C : \"MakerNote\",               // Any desired information written by the manufacturer\n        0x9286 : \"UserComment\",             // Comments by user\n\n        // related file\n        0xA004 : \"RelatedSoundFile\",        // Name of related sound file\n\n        // date and time\n        0x9003 : \"DateTimeOriginal\",        // Date and time when the original image was generated\n        0x9004 : \"DateTimeDigitized\",       // Date and time when the image was stored digitally\n        0x9290 : \"SubsecTime\",              // Fractions of seconds for DateTime\n        0x9291 : \"SubsecTimeOriginal\",      // Fractions of seconds for DateTimeOriginal\n        0x9292 : \"SubsecTimeDigitized\",     // Fractions of seconds for DateTimeDigitized\n\n        // picture-taking conditions\n        0x829A : \"ExposureTime\",            // Exposure time (in seconds)\n        0x829D : \"FNumber\",                 // F number\n        0x8822 : \"ExposureProgram\",         // Exposure program\n        0x8824 : \"SpectralSensitivity\",     // Spectral sensitivity\n        0x8827 : \"ISOSpeedRatings\",         // ISO speed rating\n        0x8828 : \"OECF\",                    // Optoelectric conversion factor\n        0x9201 : \"ShutterSpeedValue\",       // Shutter speed\n        0x9202 : \"ApertureValue\",           // Lens aperture\n        0x9203 : \"BrightnessValue\",         // Value of brightness\n        0x9204 : \"ExposureBias\",            // Exposure bias\n        0x9205 : \"MaxApertureValue\",        // Smallest F number of lens\n        0x9206 : \"SubjectDistance\",         // Distance to subject in meters\n        0x9207 : \"MeteringMode\",            // Metering mode\n        0x9208 : \"LightSource\",             // Kind of light source\n        0x9209 : \"Flash\",                   // Flash status\n        0x9214 : \"SubjectArea\",             // Location and area of main subject\n        0x920A : \"FocalLength\",             // Focal length of the lens in mm\n        0xA20B : \"FlashEnergy\",             // Strobe energy in BCPS\n        0xA20C : \"SpatialFrequencyResponse\",    //\n        0xA20E : \"FocalPlaneXResolution\",   // Number of pixels in width direction per FocalPlaneResolutionUnit\n        0xA20F : \"FocalPlaneYResolution\",   // Number of pixels in height direction per FocalPlaneResolutionUnit\n        0xA210 : \"FocalPlaneResolutionUnit\",    // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution\n        0xA214 : \"SubjectLocation\",         // Location of subject in image\n        0xA215 : \"ExposureIndex\",           // Exposure index selected on camera\n        0xA217 : \"SensingMethod\",           // Image sensor type\n        0xA300 : \"FileSource\",              // Image source (3 == DSC)\n        0xA301 : \"SceneType\",               // Scene type (1 == directly photographed)\n        0xA302 : \"CFAPattern\",              // Color filter array geometric pattern\n        0xA401 : \"CustomRendered\",          // Special processing\n        0xA402 : \"ExposureMode\",            // Exposure mode\n        0xA403 : \"WhiteBalance\",            // 1 = auto white balance, 2 = manual\n        0xA404 : \"DigitalZoomRation\",       // Digital zoom ratio\n        0xA405 : \"FocalLengthIn35mmFilm\",   // Equivalent foacl length assuming 35mm film camera (in mm)\n        0xA406 : \"SceneCaptureType\",        // Type of scene\n        0xA407 : \"GainControl\",             // Degree of overall image gain adjustment\n        0xA408 : \"Contrast\",                // Direction of contrast processing applied by camera\n        0xA409 : \"Saturation\",              // Direction of saturation processing applied by camera\n        0xA40A : \"Sharpness\",               // Direction of sharpness processing applied by camera\n        0xA40B : \"DeviceSettingDescription\",    //\n        0xA40C : \"SubjectDistanceRange\",    // Distance to subject\n\n        // other tags\n        0xA005 : \"InteroperabilityIFDPointer\",\n        0xA420 : \"ImageUniqueID\"            // Identifier assigned uniquely to each image\n    };\n\n    var TiffTags = EXIF.TiffTags = {\n        0x0100 : \"ImageWidth\",\n        0x0101 : \"ImageHeight\",\n        0x8769 : \"ExifIFDPointer\",\n        0x8825 : \"GPSInfoIFDPointer\",\n        0xA005 : \"InteroperabilityIFDPointer\",\n        0x0102 : \"BitsPerSample\",\n        0x0103 : \"Compression\",\n        0x0106 : \"PhotometricInterpretation\",\n        0x0112 : \"Orientation\",\n        0x0115 : \"SamplesPerPixel\",\n        0x011C : \"PlanarConfiguration\",\n        0x0212 : \"YCbCrSubSampling\",\n        0x0213 : \"YCbCrPositioning\",\n        0x011A : \"XResolution\",\n        0x011B : \"YResolution\",\n        0x0128 : \"ResolutionUnit\",\n        0x0111 : \"StripOffsets\",\n        0x0116 : \"RowsPerStrip\",\n        0x0117 : \"StripByteCounts\",\n        0x0201 : \"JPEGInterchangeFormat\",\n        0x0202 : \"JPEGInterchangeFormatLength\",\n        0x012D : \"TransferFunction\",\n        0x013E : \"WhitePoint\",\n        0x013F : \"PrimaryChromaticities\",\n        0x0211 : \"YCbCrCoefficients\",\n        0x0214 : \"ReferenceBlackWhite\",\n        0x0132 : \"DateTime\",\n        0x010E : \"ImageDescription\",\n        0x010F : \"Make\",\n        0x0110 : \"Model\",\n        0x0131 : \"Software\",\n        0x013B : \"Artist\",\n        0x8298 : \"Copyright\"\n    };\n\n    var GPSTags = EXIF.GPSTags = {\n        0x0000 : \"GPSVersionID\",\n        0x0001 : \"GPSLatitudeRef\",\n        0x0002 : \"GPSLatitude\",\n        0x0003 : \"GPSLongitudeRef\",\n        0x0004 : \"GPSLongitude\",\n        0x0005 : \"GPSAltitudeRef\",\n        0x0006 : \"GPSAltitude\",\n        0x0007 : \"GPSTimeStamp\",\n        0x0008 : \"GPSSatellites\",\n        0x0009 : \"GPSStatus\",\n        0x000A : \"GPSMeasureMode\",\n        0x000B : \"GPSDOP\",\n        0x000C : \"GPSSpeedRef\",\n        0x000D : \"GPSSpeed\",\n        0x000E : \"GPSTrackRef\",\n        0x000F : \"GPSTrack\",\n        0x0010 : \"GPSImgDirectionRef\",\n        0x0011 : \"GPSImgDirection\",\n        0x0012 : \"GPSMapDatum\",\n        0x0013 : \"GPSDestLatitudeRef\",\n        0x0014 : \"GPSDestLatitude\",\n        0x0015 : \"GPSDestLongitudeRef\",\n        0x0016 : \"GPSDestLongitude\",\n        0x0017 : \"GPSDestBearingRef\",\n        0x0018 : \"GPSDestBearing\",\n        0x0019 : \"GPSDestDistanceRef\",\n        0x001A : \"GPSDestDistance\",\n        0x001B : \"GPSProcessingMethod\",\n        0x001C : \"GPSAreaInformation\",\n        0x001D : \"GPSDateStamp\",\n        0x001E : \"GPSDifferential\"\n    };\n\n     // EXIF 2.3 Spec\n    var IFD1Tags = EXIF.IFD1Tags = {\n        0x0100: \"ImageWidth\",\n        0x0101: \"ImageHeight\",\n        0x0102: \"BitsPerSample\",\n        0x0103: \"Compression\",\n        0x0106: \"PhotometricInterpretation\",\n        0x0111: \"StripOffsets\",\n        0x0112: \"Orientation\",\n        0x0115: \"SamplesPerPixel\",\n        0x0116: \"RowsPerStrip\",\n        0x0117: \"StripByteCounts\",\n        0x011A: \"XResolution\",\n        0x011B: \"YResolution\",\n        0x011C: \"PlanarConfiguration\",\n        0x0128: \"ResolutionUnit\",\n        0x0201: \"JpegIFOffset\",    // When image format is JPEG, this value show offset to JPEG data stored.(aka \"ThumbnailOffset\" or \"JPEGInterchangeFormat\")\n        0x0202: \"JpegIFByteCount\", // When image format is JPEG, this value shows data size of JPEG image (aka \"ThumbnailLength\" or \"JPEGInterchangeFormatLength\")\n        0x0211: \"YCbCrCoefficients\",\n        0x0212: \"YCbCrSubSampling\",\n        0x0213: \"YCbCrPositioning\",\n        0x0214: \"ReferenceBlackWhite\"\n    };\n\n    var StringValues = EXIF.StringValues = {\n        ExposureProgram : {\n            0 : \"Not defined\",\n            1 : \"Manual\",\n            2 : \"Normal program\",\n            3 : \"Aperture priority\",\n            4 : \"Shutter priority\",\n            5 : \"Creative program\",\n            6 : \"Action program\",\n            7 : \"Portrait mode\",\n            8 : \"Landscape mode\"\n        },\n        MeteringMode : {\n            0 : \"Unknown\",\n            1 : \"Average\",\n            2 : \"CenterWeightedAverage\",\n            3 : \"Spot\",\n            4 : \"MultiSpot\",\n            5 : \"Pattern\",\n            6 : \"Partial\",\n            255 : \"Other\"\n        },\n        LightSource : {\n            0 : \"Unknown\",\n            1 : \"Daylight\",\n            2 : \"Fluorescent\",\n            3 : \"Tungsten (incandescent light)\",\n            4 : \"Flash\",\n            9 : \"Fine weather\",\n            10 : \"Cloudy weather\",\n            11 : \"Shade\",\n            12 : \"Daylight fluorescent (D 5700 - 7100K)\",\n            13 : \"Day white fluorescent (N 4600 - 5400K)\",\n            14 : \"Cool white fluorescent (W 3900 - 4500K)\",\n            15 : \"White fluorescent (WW 3200 - 3700K)\",\n            17 : \"Standard light A\",\n            18 : \"Standard light B\",\n            19 : \"Standard light C\",\n            20 : \"D55\",\n            21 : \"D65\",\n            22 : \"D75\",\n            23 : \"D50\",\n            24 : \"ISO studio tungsten\",\n            255 : \"Other\"\n        },\n        Flash : {\n            0x0000 : \"Flash did not fire\",\n            0x0001 : \"Flash fired\",\n            0x0005 : \"Strobe return light not detected\",\n            0x0007 : \"Strobe return light detected\",\n            0x0009 : \"Flash fired, compulsory flash mode\",\n            0x000D : \"Flash fired, compulsory flash mode, return light not detected\",\n            0x000F : \"Flash fired, compulsory flash mode, return light detected\",\n            0x0010 : \"Flash did not fire, compulsory flash mode\",\n            0x0018 : \"Flash did not fire, auto mode\",\n            0x0019 : \"Flash fired, auto mode\",\n            0x001D : \"Flash fired, auto mode, return light not detected\",\n            0x001F : \"Flash fired, auto mode, return light detected\",\n            0x0020 : \"No flash function\",\n            0x0041 : \"Flash fired, red-eye reduction mode\",\n            0x0045 : \"Flash fired, red-eye reduction mode, return light not detected\",\n            0x0047 : \"Flash fired, red-eye reduction mode, return light detected\",\n            0x0049 : \"Flash fired, compulsory flash mode, red-eye reduction mode\",\n            0x004D : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",\n            0x004F : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",\n            0x0059 : \"Flash fired, auto mode, red-eye reduction mode\",\n            0x005D : \"Flash fired, auto mode, return light not detected, red-eye reduction mode\",\n            0x005F : \"Flash fired, auto mode, return light detected, red-eye reduction mode\"\n        },\n        SensingMethod : {\n            1 : \"Not defined\",\n            2 : \"One-chip color area sensor\",\n            3 : \"Two-chip color area sensor\",\n            4 : \"Three-chip color area sensor\",\n            5 : \"Color sequential area sensor\",\n            7 : \"Trilinear sensor\",\n            8 : \"Color sequential linear sensor\"\n        },\n        SceneCaptureType : {\n            0 : \"Standard\",\n            1 : \"Landscape\",\n            2 : \"Portrait\",\n            3 : \"Night scene\"\n        },\n        SceneType : {\n            1 : \"Directly photographed\"\n        },\n        CustomRendered : {\n            0 : \"Normal process\",\n            1 : \"Custom process\"\n        },\n        WhiteBalance : {\n            0 : \"Auto white balance\",\n            1 : \"Manual white balance\"\n        },\n        GainControl : {\n            0 : \"None\",\n            1 : \"Low gain up\",\n            2 : \"High gain up\",\n            3 : \"Low gain down\",\n            4 : \"High gain down\"\n        },\n        Contrast : {\n            0 : \"Normal\",\n            1 : \"Soft\",\n            2 : \"Hard\"\n        },\n        Saturation : {\n            0 : \"Normal\",\n            1 : \"Low saturation\",\n            2 : \"High saturation\"\n        },\n        Sharpness : {\n            0 : \"Normal\",\n            1 : \"Soft\",\n            2 : \"Hard\"\n        },\n        SubjectDistanceRange : {\n            0 : \"Unknown\",\n            1 : \"Macro\",\n            2 : \"Close view\",\n            3 : \"Distant view\"\n        },\n        FileSource : {\n            3 : \"DSC\"\n        },\n\n        Components : {\n            0 : \"\",\n            1 : \"Y\",\n            2 : \"Cb\",\n            3 : \"Cr\",\n            4 : \"R\",\n            5 : \"G\",\n            6 : \"B\"\n        }\n    };\n\n    function addEvent(element, event, handler) {\n        if (element.addEventListener) {\n            element.addEventListener(event, handler, false);\n        } else if (element.attachEvent) {\n            element.attachEvent(\"on\" + event, handler);\n        }\n    }\n\n    function imageHasData(img) {\n        return !!(img.exifdata);\n    }\n\n\n    function base64ToArrayBuffer(base64, contentType) {\n        contentType = contentType || base64.match(/^data\\:([^\\;]+)\\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'\n        base64 = base64.replace(/^data\\:([^\\;]+)\\;base64,/gmi, '');\n        var binary = atob(base64);\n        var len = binary.length;\n        var buffer = new ArrayBuffer(len);\n        var view = new Uint8Array(buffer);\n        for (var i = 0; i < len; i++) {\n            view[i] = binary.charCodeAt(i);\n        }\n        return buffer;\n    }\n\n    function objectURLToBlob(url, callback) {\n        var http = new XMLHttpRequest();\n        http.open(\"GET\", url, true);\n        http.responseType = \"blob\";\n        http.onload = function(e) {\n            if (this.status == 200 || this.status === 0) {\n                callback(this.response);\n            }\n        };\n        http.send();\n    }\n\n    function getImageData(img, callback) {\n        function handleBinaryFile(binFile) {\n            var data = findEXIFinJPEG(binFile);\n            img.exifdata = data || {};\n            var iptcdata = findIPTCinJPEG(binFile);\n            img.iptcdata = iptcdata || {};\n            if (EXIF.isXmpEnabled) {\n               var xmpdata= findXMPinJPEG(binFile);\n               img.xmpdata = xmpdata || {};               \n            }\n            if (callback) {\n                callback.call(img);\n            }\n        }\n\n        if (img.src) {\n            if (/^data\\:/i.test(img.src)) { // Data URI\n                var arrayBuffer = base64ToArrayBuffer(img.src);\n                handleBinaryFile(arrayBuffer);\n\n            } else if (/^blob\\:/i.test(img.src)) { // Object URL\n                var fileReader = new FileReader();\n                fileReader.onload = function(e) {\n                    handleBinaryFile(e.target.result);\n                };\n                objectURLToBlob(img.src, function (blob) {\n                    fileReader.readAsArrayBuffer(blob);\n                });\n            } else {\n                var http = new XMLHttpRequest();\n                http.onload = function() {\n                    if (this.status == 200 || this.status === 0) {\n                        handleBinaryFile(http.response);\n                    } else {\n                        throw \"Could not load image\";\n                    }\n                    http = null;\n                };\n                http.open(\"GET\", img.src, true);\n                http.responseType = \"arraybuffer\";\n                http.send(null);\n            }\n        } else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {\n            var fileReader = new FileReader();\n            fileReader.onload = function(e) {\n                if (debug) console.log(\"Got file of length \" + e.target.result.byteLength);\n                handleBinaryFile(e.target.result);\n            };\n\n            fileReader.readAsArrayBuffer(img);\n        }\n    }\n\n    function findEXIFinJPEG(file) {\n        var dataView = new DataView(file);\n\n        if (debug) console.log(\"Got file of length \" + file.byteLength);\n        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n            if (debug) console.log(\"Not a valid JPEG\");\n            return false; // not a valid jpeg\n        }\n\n        var offset = 2,\n            length = file.byteLength,\n            marker;\n\n        while (offset < length) {\n            if (dataView.getUint8(offset) != 0xFF) {\n                if (debug) console.log(\"Not a valid marker at offset \" + offset + \", found: \" + dataView.getUint8(offset));\n                return false; // not a valid marker, something is wrong\n            }\n\n            marker = dataView.getUint8(offset + 1);\n            if (debug) console.log(marker);\n\n            // we could implement handling for other markers here,\n            // but we're only looking for 0xFFE1 for EXIF data\n\n            if (marker == 225) {\n                if (debug) console.log(\"Found 0xFFE1 marker\");\n\n                return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);\n\n                // offset += 2 + file.getShortAt(offset+2, true);\n\n            } else {\n                offset += 2 + dataView.getUint16(offset+2);\n            }\n\n        }\n\n    }\n\n    function findIPTCinJPEG(file) {\n        var dataView = new DataView(file);\n\n        if (debug) console.log(\"Got file of length \" + file.byteLength);\n        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n            if (debug) console.log(\"Not a valid JPEG\");\n            return false; // not a valid jpeg\n        }\n\n        var offset = 2,\n            length = file.byteLength;\n\n\n        var isFieldSegmentStart = function(dataView, offset){\n            return (\n                dataView.getUint8(offset) === 0x38 &&\n                dataView.getUint8(offset+1) === 0x42 &&\n                dataView.getUint8(offset+2) === 0x49 &&\n                dataView.getUint8(offset+3) === 0x4D &&\n                dataView.getUint8(offset+4) === 0x04 &&\n                dataView.getUint8(offset+5) === 0x04\n            );\n        };\n\n        while (offset < length) {\n\n            if ( isFieldSegmentStart(dataView, offset )){\n\n                // Get the length of the name header (which is padded to an even number of bytes)\n                var nameHeaderLength = dataView.getUint8(offset+7);\n                if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;\n                // Check for pre photoshop 6 format\n                if(nameHeaderLength === 0) {\n                    // Always 4\n                    nameHeaderLength = 4;\n                }\n\n                var startOffset = offset + 8 + nameHeaderLength;\n                var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);\n\n                return readIPTCData(file, startOffset, sectionLength);\n\n                break;\n\n            }\n\n\n            // Not the marker, continue searching\n            offset++;\n\n        }\n\n    }\n    var IptcFieldMap = {\n        0x78 : 'caption',\n        0x6E : 'credit',\n        0x19 : 'keywords',\n        0x37 : 'dateCreated',\n        0x50 : 'byline',\n        0x55 : 'bylineTitle',\n        0x7A : 'captionWriter',\n        0x69 : 'headline',\n        0x74 : 'copyright',\n        0x0F : 'category'\n    };\n    function readIPTCData(file, startOffset, sectionLength){\n        var dataView = new DataView(file);\n        var data = {};\n        var fieldValue, fieldName, dataSize, segmentType, segmentSize;\n        var segmentStartPos = startOffset;\n        while(segmentStartPos < startOffset+sectionLength) {\n            if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){\n                segmentType = dataView.getUint8(segmentStartPos+2);\n                if(segmentType in IptcFieldMap) {\n                    dataSize = dataView.getInt16(segmentStartPos+3);\n                    segmentSize = dataSize + 5;\n                    fieldName = IptcFieldMap[segmentType];\n                    fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);\n                    // Check if we already stored a value with this name\n                    if(data.hasOwnProperty(fieldName)) {\n                        // Value already stored with this name, create multivalue field\n                        if(data[fieldName] instanceof Array) {\n                            data[fieldName].push(fieldValue);\n                        }\n                        else {\n                            data[fieldName] = [data[fieldName], fieldValue];\n                        }\n                    }\n                    else {\n                        data[fieldName] = fieldValue;\n                    }\n                }\n\n            }\n            segmentStartPos++;\n        }\n        return data;\n    }\n\n\n\n    function readTags(file, tiffStart, dirStart, strings, bigEnd) {\n        var entries = file.getUint16(dirStart, !bigEnd),\n            tags = {},\n            entryOffset, tag,\n            i;\n\n        for (i=0;i<entries;i++) {\n            entryOffset = dirStart + i*12 + 2;\n            tag = strings[file.getUint16(entryOffset, !bigEnd)];\n            if (!tag && debug) console.log(\"Unknown tag: \" + file.getUint16(entryOffset, !bigEnd));\n            tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);\n        }\n        return tags;\n    }\n\n\n    function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {\n        var type = file.getUint16(entryOffset+2, !bigEnd),\n            numValues = file.getUint32(entryOffset+4, !bigEnd),\n            valueOffset = file.getUint32(entryOffset+8, !bigEnd) + tiffStart,\n            offset,\n            vals, val, n,\n            numerator, denominator;\n\n        switch (type) {\n            case 1: // byte, 8-bit unsigned int\n            case 7: // undefined, 8-bit byte, value depending on field\n                if (numValues == 1) {\n                    return file.getUint8(entryOffset + 8, !bigEnd);\n                } else {\n                    offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        vals[n] = file.getUint8(offset + n);\n                    }\n                    return vals;\n                }\n\n            case 2: // ascii, 8-bit byte\n                offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n                return getStringFromDB(file, offset, numValues-1);\n\n            case 3: // short, 16 bit int\n                if (numValues == 1) {\n                    return file.getUint16(entryOffset + 8, !bigEnd);\n                } else {\n                    offset = numValues > 2 ? valueOffset : (entryOffset + 8);\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        vals[n] = file.getUint16(offset + 2*n, !bigEnd);\n                    }\n                    return vals;\n                }\n\n            case 4: // long, 32 bit int\n                if (numValues == 1) {\n                    return file.getUint32(entryOffset + 8, !bigEnd);\n                } else {\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        vals[n] = file.getUint32(valueOffset + 4*n, !bigEnd);\n                    }\n                    return vals;\n                }\n\n            case 5:    // rational = two long values, first is numerator, second is denominator\n                if (numValues == 1) {\n                    numerator = file.getUint32(valueOffset, !bigEnd);\n                    denominator = file.getUint32(valueOffset+4, !bigEnd);\n                    val = new Number(numerator / denominator);\n                    val.numerator = numerator;\n                    val.denominator = denominator;\n                    return val;\n                } else {\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        numerator = file.getUint32(valueOffset + 8*n, !bigEnd);\n                        denominator = file.getUint32(valueOffset+4 + 8*n, !bigEnd);\n                        vals[n] = new Number(numerator / denominator);\n                        vals[n].numerator = numerator;\n                        vals[n].denominator = denominator;\n                    }\n                    return vals;\n                }\n\n            case 9: // slong, 32 bit signed int\n                if (numValues == 1) {\n                    return file.getInt32(entryOffset + 8, !bigEnd);\n                } else {\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        vals[n] = file.getInt32(valueOffset + 4*n, !bigEnd);\n                    }\n                    return vals;\n                }\n\n            case 10: // signed rational, two slongs, first is numerator, second is denominator\n                if (numValues == 1) {\n                    return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset+4, !bigEnd);\n                } else {\n                    vals = [];\n                    for (n=0;n<numValues;n++) {\n                        vals[n] = file.getInt32(valueOffset + 8*n, !bigEnd) / file.getInt32(valueOffset+4 + 8*n, !bigEnd);\n                    }\n                    return vals;\n                }\n        }\n    }\n\n    /**\n    * Given an IFD (Image File Directory) start offset\n    * returns an offset to next IFD or 0 if it's the last IFD.\n    */\n    function getNextIFDOffset(dataView, dirStart, bigEnd){\n        //the first 2bytes means the number of directory entries contains in this IFD\n        var entries = dataView.getUint16(dirStart, !bigEnd);\n\n        // After last directory entry, there is a 4bytes of data,\n        // it means an offset to next IFD.\n        // If its value is '0x00000000', it means this is the last IFD and there is no linked IFD.\n\n        return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd); // each entry is 12 bytes long\n    }\n\n    function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd){\n        // get the IFD1 offset\n        var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart+firstIFDOffset, bigEnd);\n\n        if (!IFD1OffsetPointer) {\n            // console.log('******** IFD1Offset is empty, image thumb not found ********');\n            return {};\n        }\n        else if (IFD1OffsetPointer > dataView.byteLength) { // this should not happen\n            // console.log('******** IFD1Offset is outside the bounds of the DataView ********');\n            return {};\n        }\n        // console.log('*******  thumbnail IFD offset (IFD1) is: %s', IFD1OffsetPointer);\n\n        var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd)\n\n        // EXIF 2.3 specification for JPEG format thumbnail\n\n        // If the value of Compression(0x0103) Tag in IFD1 is '6', thumbnail image format is JPEG.\n        // Most of Exif image uses JPEG format for thumbnail. In that case, you can get offset of thumbnail\n        // by JpegIFOffset(0x0201) Tag in IFD1, size of thumbnail by JpegIFByteCount(0x0202) Tag.\n        // Data format is ordinary JPEG format, starts from 0xFFD8 and ends by 0xFFD9. It seems that\n        // JPEG format and 160x120pixels of size are recommended thumbnail format for Exif2.1 or later.\n\n        if (thumbTags['Compression']) {\n            // console.log('Thumbnail image found!');\n\n            switch (thumbTags['Compression']) {\n                case 6:\n                    // console.log('Thumbnail image format is JPEG');\n                    if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {\n                    // extract the thumbnail\n                        var tOffset = tiffStart + thumbTags.JpegIFOffset;\n                        var tLength = thumbTags.JpegIFByteCount;\n                        thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {\n                            type: 'image/jpeg'\n                        });\n                    }\n                break;\n\n            case 1:\n                console.log(\"Thumbnail image format is TIFF, which is not implemented.\");\n                break;\n            default:\n                console.log(\"Unknown thumbnail image format '%s'\", thumbTags['Compression']);\n            }\n        }\n        else if (thumbTags['PhotometricInterpretation'] == 2) {\n            console.log(\"Thumbnail image format is RGB, which is not implemented.\");\n        }\n        return thumbTags;\n    }\n\n    function getStringFromDB(buffer, start, length) {\n        var outstr = \"\";\n        for (n = start; n < start+length; n++) {\n            outstr += String.fromCharCode(buffer.getUint8(n));\n        }\n        return outstr;\n    }\n\n    function readEXIFData(file, start) {\n        if (getStringFromDB(file, start, 4) != \"Exif\") {\n            if (debug) console.log(\"Not valid EXIF data! \" + getStringFromDB(file, start, 4));\n            return false;\n        }\n\n        var bigEnd,\n            tags, tag,\n            exifData, gpsData,\n            tiffOffset = start + 6;\n\n        // test for TIFF validity and endianness\n        if (file.getUint16(tiffOffset) == 0x4949) {\n            bigEnd = false;\n        } else if (file.getUint16(tiffOffset) == 0x4D4D) {\n            bigEnd = true;\n        } else {\n            if (debug) console.log(\"Not valid TIFF data! (no 0x4949 or 0x4D4D)\");\n            return false;\n        }\n\n        if (file.getUint16(tiffOffset+2, !bigEnd) != 0x002A) {\n            if (debug) console.log(\"Not valid TIFF data! (no 0x002A)\");\n            return false;\n        }\n\n        var firstIFDOffset = file.getUint32(tiffOffset+4, !bigEnd);\n\n        if (firstIFDOffset < 0x00000008) {\n            if (debug) console.log(\"Not valid TIFF data! (First offset less than 8)\", file.getUint32(tiffOffset+4, !bigEnd));\n            return false;\n        }\n\n        tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);\n\n        if (tags.ExifIFDPointer) {\n            exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);\n            for (tag in exifData) {\n                switch (tag) {\n                    case \"LightSource\" :\n                    case \"Flash\" :\n                    case \"MeteringMode\" :\n                    case \"ExposureProgram\" :\n                    case \"SensingMethod\" :\n                    case \"SceneCaptureType\" :\n                    case \"SceneType\" :\n                    case \"CustomRendered\" :\n                    case \"WhiteBalance\" :\n                    case \"GainControl\" :\n                    case \"Contrast\" :\n                    case \"Saturation\" :\n                    case \"Sharpness\" :\n                    case \"SubjectDistanceRange\" :\n                    case \"FileSource\" :\n                        exifData[tag] = StringValues[tag][exifData[tag]];\n                        break;\n\n                    case \"ExifVersion\" :\n                    case \"FlashpixVersion\" :\n                        exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);\n                        break;\n\n                    case \"ComponentsConfiguration\" :\n                        exifData[tag] =\n                            StringValues.Components[exifData[tag][0]] +\n                            StringValues.Components[exifData[tag][1]] +\n                            StringValues.Components[exifData[tag][2]] +\n                            StringValues.Components[exifData[tag][3]];\n                        break;\n                }\n                tags[tag] = exifData[tag];\n            }\n        }\n\n        if (tags.GPSInfoIFDPointer) {\n            gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);\n            for (tag in gpsData) {\n                switch (tag) {\n                    case \"GPSVersionID\" :\n                        gpsData[tag] = gpsData[tag][0] +\n                            \".\" + gpsData[tag][1] +\n                            \".\" + gpsData[tag][2] +\n                            \".\" + gpsData[tag][3];\n                        break;\n                }\n                tags[tag] = gpsData[tag];\n            }\n        }\n\n        // extract thumbnail\n        tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);\n\n        return tags;\n    }\n\n   function findXMPinJPEG(file) {\n\n        if (!('DOMParser' in self)) {\n            // console.warn('XML parsing not supported without DOMParser');\n            return;\n        }\n        var dataView = new DataView(file);\n\n        if (debug) console.log(\"Got file of length \" + file.byteLength);\n        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n           if (debug) console.log(\"Not a valid JPEG\");\n           return false; // not a valid jpeg\n        }\n\n        var offset = 2,\n            length = file.byteLength,\n            dom = new DOMParser();\n\n        while (offset < (length-4)) {\n            if (getStringFromDB(dataView, offset, 4) == \"http\") {\n                var startOffset = offset - 1;\n                var sectionLength = dataView.getUint16(offset - 2) - 1;\n                var xmpString = getStringFromDB(dataView, startOffset, sectionLength)\n                var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;\n                xmpString = xmpString.substring( xmpString.indexOf( '<x:xmpmeta' ), xmpEndIndex );\n\n                var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10\n                //Many custom written programs embed xmp/xml without any namespace. Following are some of them.\n                //Without these namespaces, XML is thought to be invalid by parsers\n                xmpString = xmpString.slice(0, indexOfXmp)\n                            + 'xmlns:Iptc4xmpCore=\"http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/\" '\n                            + 'xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" '\n                            + 'xmlns:tiff=\"http://ns.adobe.com/tiff/1.0/\" '\n                            + 'xmlns:plus=\"http://schemas.android.com/apk/lib/com.google.android.gms.plus\" '\n                            + 'xmlns:ext=\"http://www.gettyimages.com/xsltExtension/1.0\" '\n                            + 'xmlns:exif=\"http://ns.adobe.com/exif/1.0/\" '\n                            + 'xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\" '\n                            + 'xmlns:stRef=\"http://ns.adobe.com/xap/1.0/sType/ResourceRef#\" '\n                            + 'xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\" '\n                            + 'xmlns:xapGImg=\"http://ns.adobe.com/xap/1.0/g/img/\" '\n                            + 'xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\" '\n                            + xmpString.slice(indexOfXmp)\n\n                var domDocument = dom.parseFromString( xmpString, 'text/xml' );\n                return xml2Object(domDocument);\n            } else{\n             offset++;\n            }\n        }\n    }\n\n    function xml2json(xml) {\n        var json = {};\n      \n        if (xml.nodeType == 1) { // element node\n          if (xml.attributes.length > 0) {\n            json['@attributes'] = {};\n            for (var j = 0; j < xml.attributes.length; j++) {\n              var attribute = xml.attributes.item(j);\n              json['@attributes'][attribute.nodeName] = attribute.nodeValue;\n            }\n          }\n        } else if (xml.nodeType == 3) { // text node\n          return xml.nodeValue;\n        }\n      \n        // deal with children\n        if (xml.hasChildNodes()) {\n          for(var i = 0; i < xml.childNodes.length; i++) {\n            var child = xml.childNodes.item(i);\n            var nodeName = child.nodeName;\n            if (json[nodeName] == null) {\n              json[nodeName] = xml2json(child);\n            } else {\n              if (json[nodeName].push == null) {\n                var old = json[nodeName];\n                json[nodeName] = [];\n                json[nodeName].push(old);\n              }\n              json[nodeName].push(xml2json(child));\n            }\n          }\n        }\n        \n        return json;\n    }\n\n    function xml2Object(xml) {\n        try {\n            var obj = {};\n            if (xml.children.length > 0) {\n              for (var i = 0; i < xml.children.length; i++) {\n                var item = xml.children.item(i);\n                var attributes = item.attributes;\n                for(var idx in attributes) {\n                    var itemAtt = attributes[idx];\n                    var dataKey = itemAtt.nodeName;\n                    var dataValue = itemAtt.nodeValue;\n\n                    if(dataKey !== undefined) {\n                        obj[dataKey] = dataValue;\n                    }\n                }\n                var nodeName = item.nodeName;\n\n                if (typeof (obj[nodeName]) == \"undefined\") {\n                  obj[nodeName] = xml2json(item);\n                } else {\n                  if (typeof (obj[nodeName].push) == \"undefined\") {\n                    var old = obj[nodeName];\n\n                    obj[nodeName] = [];\n                    obj[nodeName].push(old);\n                  }\n                  obj[nodeName].push(xml2json(item));\n                }\n              }\n            } else {\n              obj = xml.textContent;\n            }\n            return obj;\n          } catch (e) {\n              console.log(e.message);\n          }\n    }\n\n    EXIF.enableXmp = function() {\n        EXIF.isXmpEnabled = true;\n    }\n\n    EXIF.disableXmp = function() {\n        EXIF.isXmpEnabled = false;\n    }\n\n    EXIF.getData = function(img, callback) {\n        if (((self.Image && img instanceof self.Image)\n            || (self.HTMLImageElement && img instanceof self.HTMLImageElement))\n            && !img.complete)\n            return false;\n\n        if (!imageHasData(img)) {\n            getImageData(img, callback);\n        } else {\n            if (callback) {\n                callback.call(img);\n            }\n        }\n        return true;\n    }\n\n    EXIF.getTag = function(img, tag) {\n        if (!imageHasData(img)) return;\n        return img.exifdata[tag];\n    }\n    \n    EXIF.getIptcTag = function(img, tag) {\n        if (!imageHasData(img)) return;\n        return img.iptcdata[tag];\n    }\n\n    EXIF.getAllTags = function(img) {\n        if (!imageHasData(img)) return {};\n        var a,\n            data = img.exifdata,\n            tags = {};\n        for (a in data) {\n            if (data.hasOwnProperty(a)) {\n                tags[a] = data[a];\n            }\n        }\n        return tags;\n    }\n    \n    EXIF.getAllIptcTags = function(img) {\n        if (!imageHasData(img)) return {};\n        var a,\n            data = img.iptcdata,\n            tags = {};\n        for (a in data) {\n            if (data.hasOwnProperty(a)) {\n                tags[a] = data[a];\n            }\n        }\n        return tags;\n    }\n\n    EXIF.pretty = function(img) {\n        if (!imageHasData(img)) return \"\";\n        var a,\n            data = img.exifdata,\n            strPretty = \"\";\n        for (a in data) {\n            if (data.hasOwnProperty(a)) {\n                if (typeof data[a] == \"object\") {\n                    if (data[a] instanceof Number) {\n                        strPretty += a + \" : \" + data[a] + \" [\" + data[a].numerator + \"/\" + data[a].denominator + \"]\\r\\n\";\n                    } else {\n                        strPretty += a + \" : [\" + data[a].length + \" values]\\r\\n\";\n                    }\n                } else {\n                    strPretty += a + \" : \" + data[a] + \"\\r\\n\";\n                }\n            }\n        }\n        return strPretty;\n    }\n\n    EXIF.readFromBinaryFile = function(file) {\n        return findEXIFinJPEG(file);\n    }\n\n    if (true) {\n        !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n            return EXIF;\n        }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n    }\n}.call(this));\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 63700 characters]\n//# sourceURL=webpack-internal:///./node_modules/exif-js/exif.js\n");

/***/ }),

/***/ "./node_modules/sortablejs/modular/sortable.esm.js":
/*!*********************************************************!*\
  !*** ./node_modules/sortablejs/modular/sortable.esm.js ***!
  \*********************************************************/
/*! exports provided: default, MultiDrag, Sortable, Swap */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MultiDrag\", function() { return MultiDragPlugin; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sortable\", function() { return Sortable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Swap\", function() { return SwapPlugin; });\n/**!\n * Sortable 1.10.2\n * @author\tRubaXa   <trash@rubaxa.org>\n * @author\towenm    <owen23355@gmail.com>\n * @license MIT\n */\nfunction _typeof(obj) {\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function (obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function (obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    var ownKeys = Object.keys(source);\n\n    if (typeof Object.getOwnPropertySymbols === 'function') {\n      ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n        return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n      }));\n    }\n\n    ownKeys.forEach(function (key) {\n      _defineProperty(target, key, source[key]);\n    });\n  }\n\n  return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nfunction _toConsumableArray(arr) {\n  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n    return arr2;\n  }\n}\n\nfunction _iterableToArray(iter) {\n  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar version = \"1.10.2\";\n\nfunction userAgent(pattern) {\n  if (typeof window !== 'undefined' && window.navigator) {\n    return !!\n    /*@__PURE__*/\n    navigator.userAgent.match(pattern);\n  }\n}\n\nvar IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\\.|msie|iemobile|Windows Phone)/i);\nvar Edge = userAgent(/Edge/i);\nvar FireFox = userAgent(/firefox/i);\nvar Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);\nvar IOS = userAgent(/iP(ad|od|hone)/i);\nvar ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);\n\nvar captureMode = {\n  capture: false,\n  passive: false\n};\n\nfunction on(el, event, fn) {\n  el.addEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction off(el, event, fn) {\n  el.removeEventListener(event, fn, !IE11OrLess && captureMode);\n}\n\nfunction matches(\n/**HTMLElement*/\nel,\n/**String*/\nselector) {\n  if (!selector) return;\n  selector[0] === '>' && (selector = selector.substring(1));\n\n  if (el) {\n    try {\n      if (el.matches) {\n        return el.matches(selector);\n      } else if (el.msMatchesSelector) {\n        return el.msMatchesSelector(selector);\n      } else if (el.webkitMatchesSelector) {\n        return el.webkitMatchesSelector(selector);\n      }\n    } catch (_) {\n      return false;\n    }\n  }\n\n  return false;\n}\n\nfunction getParentOrHost(el) {\n  return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;\n}\n\nfunction closest(\n/**HTMLElement*/\nel,\n/**String*/\nselector,\n/**HTMLElement*/\nctx, includeCTX) {\n  if (el) {\n    ctx = ctx || document;\n\n    do {\n      if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {\n        return el;\n      }\n\n      if (el === ctx) break;\n      /* jshint boss:true */\n    } while (el = getParentOrHost(el));\n  }\n\n  return null;\n}\n\nvar R_SPACE = /\\s+/g;\n\nfunction toggleClass(el, name, state) {\n  if (el && name) {\n    if (el.classList) {\n      el.classList[state ? 'add' : 'remove'](name);\n    } else {\n      var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');\n      el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');\n    }\n  }\n}\n\nfunction css(el, prop, val) {\n  var style = el && el.style;\n\n  if (style) {\n    if (val === void 0) {\n      if (document.defaultView && document.defaultView.getComputedStyle) {\n        val = document.defaultView.getComputedStyle(el, '');\n      } else if (el.currentStyle) {\n        val = el.currentStyle;\n      }\n\n      return prop === void 0 ? val : val[prop];\n    } else {\n      if (!(prop in style) && prop.indexOf('webkit') === -1) {\n        prop = '-webkit-' + prop;\n      }\n\n      style[prop] = val + (typeof val === 'string' ? '' : 'px');\n    }\n  }\n}\n\nfunction matrix(el, selfOnly) {\n  var appliedTransforms = '';\n\n  if (typeof el === 'string') {\n    appliedTransforms = el;\n  } else {\n    do {\n      var transform = css(el, 'transform');\n\n      if (transform && transform !== 'none') {\n        appliedTransforms = transform + ' ' + appliedTransforms;\n      }\n      /* jshint boss:true */\n\n    } while (!selfOnly && (el = el.parentNode));\n  }\n\n  var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;\n  /*jshint -W056 */\n\n  return matrixFn && new matrixFn(appliedTransforms);\n}\n\nfunction find(ctx, tagName, iterator) {\n  if (ctx) {\n    var list = ctx.getElementsByTagName(tagName),\n        i = 0,\n        n = list.length;\n\n    if (iterator) {\n      for (; i < n; i++) {\n        iterator(list[i], i);\n      }\n    }\n\n    return list;\n  }\n\n  return [];\n}\n\nfunction getWindowScrollingElement() {\n  var scrollingElement = document.scrollingElement;\n\n  if (scrollingElement) {\n    return scrollingElement;\n  } else {\n    return document.documentElement;\n  }\n}\n/**\r\n * Returns the \"bounding client rect\" of given element\r\n * @param  {HTMLElement} el                       The element whose boundingClientRect is wanted\r\n * @param  {[Boolean]} relativeToContainingBlock  Whether the rect should be relative to the containing block of (including) the container\r\n * @param  {[Boolean]} relativeToNonStaticParent  Whether the rect should be relative to the relative parent of (including) the contaienr\r\n * @param  {[Boolean]} undoScale                  Whether the container's scale() should be undone\r\n * @param  {[HTMLElement]} container              The parent the element will be placed in\r\n * @return {Object}                               The boundingClientRect of el, with specified adjustments\r\n */\n\n\nfunction getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {\n  if (!el.getBoundingClientRect && el !== window) return;\n  var elRect, top, left, bottom, right, height, width;\n\n  if (el !== window && el !== getWindowScrollingElement()) {\n    elRect = el.getBoundingClientRect();\n    top = elRect.top;\n    left = elRect.left;\n    bottom = elRect.bottom;\n    right = elRect.right;\n    height = elRect.height;\n    width = elRect.width;\n  } else {\n    top = 0;\n    left = 0;\n    bottom = window.innerHeight;\n    right = window.innerWidth;\n    height = window.innerHeight;\n    width = window.innerWidth;\n  }\n\n  if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {\n    // Adjust for translate()\n    container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)\n    // Not needed on <= IE11\n\n    if (!IE11OrLess) {\n      do {\n        if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {\n          var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container\n\n          top -= containerRect.top + parseInt(css(container, 'border-top-width'));\n          left -= containerRect.left + parseInt(css(container, 'border-left-width'));\n          bottom = top + elRect.height;\n          right = left + elRect.width;\n          break;\n        }\n        /* jshint boss:true */\n\n      } while (container = container.parentNode);\n    }\n  }\n\n  if (undoScale && el !== window) {\n    // Adjust for scale()\n    var elMatrix = matrix(container || el),\n        scaleX = elMatrix && elMatrix.a,\n        scaleY = elMatrix && elMatrix.d;\n\n    if (elMatrix) {\n      top /= scaleY;\n      left /= scaleX;\n      width /= scaleX;\n      height /= scaleY;\n      bottom = top + height;\n      right = left + width;\n    }\n  }\n\n  return {\n    top: top,\n    left: left,\n    bottom: bottom,\n    right: right,\n    width: width,\n    height: height\n  };\n}\n/**\r\n * Checks if a side of an element is scrolled past a side of its parents\r\n * @param  {HTMLElement}  el           The element who's side being scrolled out of view is in question\r\n * @param  {String}       elSide       Side of the element in question ('top', 'left', 'right', 'bottom')\r\n * @param  {String}       parentSide   Side of the parent in question ('top', 'left', 'right', 'bottom')\r\n * @return {HTMLElement}               The parent scroll element that the el's side is scrolled past, or null if there is no such element\r\n */\n\n\nfunction isScrolledPast(el, elSide, parentSide) {\n  var parent = getParentAutoScrollElement(el, true),\n      elSideVal = getRect(el)[elSide];\n  /* jshint boss:true */\n\n  while (parent) {\n    var parentSideVal = getRect(parent)[parentSide],\n        visible = void 0;\n\n    if (parentSide === 'top' || parentSide === 'left') {\n      visible = elSideVal >= parentSideVal;\n    } else {\n      visible = elSideVal <= parentSideVal;\n    }\n\n    if (!visible) return parent;\n    if (parent === getWindowScrollingElement()) break;\n    parent = getParentAutoScrollElement(parent, false);\n  }\n\n  return false;\n}\n/**\r\n * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)\r\n * and non-draggable elements\r\n * @param  {HTMLElement} el       The parent element\r\n * @param  {Number} childNum      The index of the child\r\n * @param  {Object} options       Parent Sortable's options\r\n * @return {HTMLElement}          The child at index childNum, or null if not found\r\n */\n\n\nfunction getChild(el, childNum, options) {\n  var currentChild = 0,\n      i = 0,\n      children = el.children;\n\n  while (i < children.length) {\n    if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && children[i] !== Sortable.dragged && closest(children[i], options.draggable, el, false)) {\n      if (currentChild === childNum) {\n        return children[i];\n      }\n\n      currentChild++;\n    }\n\n    i++;\n  }\n\n  return null;\n}\n/**\r\n * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)\r\n * @param  {HTMLElement} el       Parent element\r\n * @param  {selector} selector    Any other elements that should be ignored\r\n * @return {HTMLElement}          The last child, ignoring ghostEl\r\n */\n\n\nfunction lastChild(el, selector) {\n  var last = el.lastElementChild;\n\n  while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {\n    last = last.previousElementSibling;\n  }\n\n  return last || null;\n}\n/**\r\n * Returns the index of an element within its parent for a selected set of\r\n * elements\r\n * @param  {HTMLElement} el\r\n * @param  {selector} selector\r\n * @return {number}\r\n */\n\n\nfunction index(el, selector) {\n  var index = 0;\n\n  if (!el || !el.parentNode) {\n    return -1;\n  }\n  /* jshint boss:true */\n\n\n  while (el = el.previousElementSibling) {\n    if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {\n      index++;\n    }\n  }\n\n  return index;\n}\n/**\r\n * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.\r\n * The value is returned in real pixels.\r\n * @param  {HTMLElement} el\r\n * @return {Array}             Offsets in the format of [left, top]\r\n */\n\n\nfunction getRelativeScrollOffset(el) {\n  var offsetLeft = 0,\n      offsetTop = 0,\n      winScroller = getWindowScrollingElement();\n\n  if (el) {\n    do {\n      var elMatrix = matrix(el),\n          scaleX = elMatrix.a,\n          scaleY = elMatrix.d;\n      offsetLeft += el.scrollLeft * scaleX;\n      offsetTop += el.scrollTop * scaleY;\n    } while (el !== winScroller && (el = el.parentNode));\n  }\n\n  return [offsetLeft, offsetTop];\n}\n/**\r\n * Returns the index of the object within the given array\r\n * @param  {Array} arr   Array that may or may not hold the object\r\n * @param  {Object} obj  An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find\r\n * @return {Number}      The index of the object in the array, or -1\r\n */\n\n\nfunction indexOfObject(arr, obj) {\n  for (var i in arr) {\n    if (!arr.hasOwnProperty(i)) continue;\n\n    for (var key in obj) {\n      if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);\n    }\n  }\n\n  return -1;\n}\n\nfunction getParentAutoScrollElement(el, includeSelf) {\n  // skip to window\n  if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();\n  var elem = el;\n  var gotSelf = false;\n\n  do {\n    // we don't need to get elem css if it isn't even overflowing in the first place (performance)\n    if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {\n      var elemCSS = css(elem);\n\n      if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {\n        if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();\n        if (gotSelf || includeSelf) return elem;\n        gotSelf = true;\n      }\n    }\n    /* jshint boss:true */\n\n  } while (elem = elem.parentNode);\n\n  return getWindowScrollingElement();\n}\n\nfunction extend(dst, src) {\n  if (dst && src) {\n    for (var key in src) {\n      if (src.hasOwnProperty(key)) {\n        dst[key] = src[key];\n      }\n    }\n  }\n\n  return dst;\n}\n\nfunction isRectEqual(rect1, rect2) {\n  return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);\n}\n\nvar _throttleTimeout;\n\nfunction throttle(callback, ms) {\n  return function () {\n    if (!_throttleTimeout) {\n      var args = arguments,\n          _this = this;\n\n      if (args.length === 1) {\n        callback.call(_this, args[0]);\n      } else {\n        callback.apply(_this, args);\n      }\n\n      _throttleTimeout = setTimeout(function () {\n        _throttleTimeout = void 0;\n      }, ms);\n    }\n  };\n}\n\nfunction cancelThrottle() {\n  clearTimeout(_throttleTimeout);\n  _throttleTimeout = void 0;\n}\n\nfunction scrollBy(el, x, y) {\n  el.scrollLeft += x;\n  el.scrollTop += y;\n}\n\nfunction clone(el) {\n  var Polymer = window.Polymer;\n  var $ = window.jQuery || window.Zepto;\n\n  if (Polymer && Polymer.dom) {\n    return Polymer.dom(el).cloneNode(true);\n  } else if ($) {\n    return $(el).clone(true)[0];\n  } else {\n    return el.cloneNode(true);\n  }\n}\n\nfunction setRect(el, rect) {\n  css(el, 'position', 'absolute');\n  css(el, 'top', rect.top);\n  css(el, 'left', rect.left);\n  css(el, 'width', rect.width);\n  css(el, 'height', rect.height);\n}\n\nfunction unsetRect(el) {\n  css(el, 'position', '');\n  css(el, 'top', '');\n  css(el, 'left', '');\n  css(el, 'width', '');\n  css(el, 'height', '');\n}\n\nvar expando = 'Sortable' + new Date().getTime();\n\nfunction AnimationStateManager() {\n  var animationStates = [],\n      animationCallbackId;\n  return {\n    captureAnimationState: function captureAnimationState() {\n      animationStates = [];\n      if (!this.options.animation) return;\n      var children = [].slice.call(this.el.children);\n      children.forEach(function (child) {\n        if (css(child, 'display') === 'none' || child === Sortable.ghost) return;\n        animationStates.push({\n          target: child,\n          rect: getRect(child)\n        });\n\n        var fromRect = _objectSpread({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation\n\n\n        if (child.thisAnimationDuration) {\n          var childMatrix = matrix(child, true);\n\n          if (childMatrix) {\n            fromRect.top -= childMatrix.f;\n            fromRect.left -= childMatrix.e;\n          }\n        }\n\n        child.fromRect = fromRect;\n      });\n    },\n    addAnimationState: function addAnimationState(state) {\n      animationStates.push(state);\n    },\n    removeAnimationState: function removeAnimationState(target) {\n      animationStates.splice(indexOfObject(animationStates, {\n        target: target\n      }), 1);\n    },\n    animateAll: function animateAll(callback) {\n      var _this = this;\n\n      if (!this.options.animation) {\n        clearTimeout(animationCallbackId);\n        if (typeof callback === 'function') callback();\n        return;\n      }\n\n      var animating = false,\n          animationTime = 0;\n      animationStates.forEach(function (state) {\n        var time = 0,\n            target = state.target,\n            fromRect = target.fromRect,\n            toRect = getRect(target),\n            prevFromRect = target.prevFromRect,\n            prevToRect = target.prevToRect,\n            animatingRect = state.rect,\n            targetMatrix = matrix(target, true);\n\n        if (targetMatrix) {\n          // Compensate for current animation\n          toRect.top -= targetMatrix.f;\n          toRect.left -= targetMatrix.e;\n        }\n\n        target.toRect = toRect;\n\n        if (target.thisAnimationDuration) {\n          // Could also check if animatingRect is between fromRect and toRect\n          if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect\n          (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {\n            // If returning to same place as started from animation and on same axis\n            time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);\n          }\n        } // if fromRect != toRect: animate\n\n\n        if (!isRectEqual(toRect, fromRect)) {\n          target.prevFromRect = fromRect;\n          target.prevToRect = toRect;\n\n          if (!time) {\n            time = _this.options.animation;\n          }\n\n          _this.animate(target, animatingRect, toRect, time);\n        }\n\n        if (time) {\n          animating = true;\n          animationTime = Math.max(animationTime, time);\n          clearTimeout(target.animationResetTimer);\n          target.animationResetTimer = setTimeout(function () {\n            target.animationTime = 0;\n            target.prevFromRect = null;\n            target.fromRect = null;\n            target.prevToRect = null;\n            target.thisAnimationDuration = null;\n          }, time);\n          target.thisAnimationDuration = time;\n        }\n      });\n      clearTimeout(animationCallbackId);\n\n      if (!animating) {\n        if (typeof callback === 'function') callback();\n      } else {\n        animationCallbackId = setTimeout(function () {\n          if (typeof callback === 'function') callback();\n        }, animationTime);\n      }\n\n      animationStates = [];\n    },\n    animate: function animate(target, currentRect, toRect, duration) {\n      if (duration) {\n        css(target, 'transition', '');\n        css(target, 'transform', '');\n        var elMatrix = matrix(this.el),\n            scaleX = elMatrix && elMatrix.a,\n            scaleY = elMatrix && elMatrix.d,\n            translateX = (currentRect.left - toRect.left) / (scaleX || 1),\n            translateY = (currentRect.top - toRect.top) / (scaleY || 1);\n        target.animatingX = !!translateX;\n        target.animatingY = !!translateY;\n        css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');\n        repaint(target); // repaint\n\n        css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));\n        css(target, 'transform', 'translate3d(0,0,0)');\n        typeof target.animated === 'number' && clearTimeout(target.animated);\n        target.animated = setTimeout(function () {\n          css(target, 'transition', '');\n          css(target, 'transform', '');\n          target.animated = false;\n          target.animatingX = false;\n          target.animatingY = false;\n        }, duration);\n      }\n    }\n  };\n}\n\nfunction repaint(target) {\n  return target.offsetWidth;\n}\n\nfunction calculateRealTime(animatingRect, fromRect, toRect, options) {\n  return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;\n}\n\nvar plugins = [];\nvar defaults = {\n  initializeByDefault: true\n};\nvar PluginManager = {\n  mount: function mount(plugin) {\n    // Set default static properties\n    for (var option in defaults) {\n      if (defaults.hasOwnProperty(option) && !(option in plugin)) {\n        plugin[option] = defaults[option];\n      }\n    }\n\n    plugins.push(plugin);\n  },\n  pluginEvent: function pluginEvent(eventName, sortable, evt) {\n    var _this = this;\n\n    this.eventCanceled = false;\n\n    evt.cancel = function () {\n      _this.eventCanceled = true;\n    };\n\n    var eventNameGlobal = eventName + 'Global';\n    plugins.forEach(function (plugin) {\n      if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable\n\n      if (sortable[plugin.pluginName][eventNameGlobal]) {\n        sortable[plugin.pluginName][eventNameGlobal](_objectSpread({\n          sortable: sortable\n        }, evt));\n      } // Only fire plugin event if plugin is enabled in this sortable,\n      // and plugin has event defined\n\n\n      if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {\n        sortable[plugin.pluginName][eventName](_objectSpread({\n          sortable: sortable\n        }, evt));\n      }\n    });\n  },\n  initializePlugins: function initializePlugins(sortable, el, defaults, options) {\n    plugins.forEach(function (plugin) {\n      var pluginName = plugin.pluginName;\n      if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;\n      var initialized = new plugin(sortable, el, sortable.options);\n      initialized.sortable = sortable;\n      initialized.options = sortable.options;\n      sortable[pluginName] = initialized; // Add default options from plugin\n\n      _extends(defaults, initialized.defaults);\n    });\n\n    for (var option in sortable.options) {\n      if (!sortable.options.hasOwnProperty(option)) continue;\n      var modified = this.modifyOption(sortable, option, sortable.options[option]);\n\n      if (typeof modified !== 'undefined') {\n        sortable.options[option] = modified;\n      }\n    }\n  },\n  getEventProperties: function getEventProperties(name, sortable) {\n    var eventProperties = {};\n    plugins.forEach(function (plugin) {\n      if (typeof plugin.eventProperties !== 'function') return;\n\n      _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));\n    });\n    return eventProperties;\n  },\n  modifyOption: function modifyOption(sortable, name, value) {\n    var modifiedValue;\n    plugins.forEach(function (plugin) {\n      // Plugin must exist on the Sortable\n      if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin\n\n      if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {\n        modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);\n      }\n    });\n    return modifiedValue;\n  }\n};\n\nfunction dispatchEvent(_ref) {\n  var sortable = _ref.sortable,\n      rootEl = _ref.rootEl,\n      name = _ref.name,\n      targetEl = _ref.targetEl,\n      cloneEl = _ref.cloneEl,\n      toEl = _ref.toEl,\n      fromEl = _ref.fromEl,\n      oldIndex = _ref.oldIndex,\n      newIndex = _ref.newIndex,\n      oldDraggableIndex = _ref.oldDraggableIndex,\n      newDraggableIndex = _ref.newDraggableIndex,\n      originalEvent = _ref.originalEvent,\n      putSortable = _ref.putSortable,\n      extraEventProperties = _ref.extraEventProperties;\n  sortable = sortable || rootEl && rootEl[expando];\n  if (!sortable) return;\n  var evt,\n      options = sortable.options,\n      onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature\n\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent(name, {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent(name, true, true);\n  }\n\n  evt.to = toEl || rootEl;\n  evt.from = fromEl || rootEl;\n  evt.item = targetEl || rootEl;\n  evt.clone = cloneEl;\n  evt.oldIndex = oldIndex;\n  evt.newIndex = newIndex;\n  evt.oldDraggableIndex = oldDraggableIndex;\n  evt.newDraggableIndex = newDraggableIndex;\n  evt.originalEvent = originalEvent;\n  evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;\n\n  var allEventProperties = _objectSpread({}, extraEventProperties, PluginManager.getEventProperties(name, sortable));\n\n  for (var option in allEventProperties) {\n    evt[option] = allEventProperties[option];\n  }\n\n  if (rootEl) {\n    rootEl.dispatchEvent(evt);\n  }\n\n  if (options[onName]) {\n    options[onName].call(sortable, evt);\n  }\n}\n\nvar pluginEvent = function pluginEvent(eventName, sortable) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n      originalEvent = _ref.evt,\n      data = _objectWithoutProperties(_ref, [\"evt\"]);\n\n  PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread({\n    dragEl: dragEl,\n    parentEl: parentEl,\n    ghostEl: ghostEl,\n    rootEl: rootEl,\n    nextEl: nextEl,\n    lastDownEl: lastDownEl,\n    cloneEl: cloneEl,\n    cloneHidden: cloneHidden,\n    dragStarted: moved,\n    putSortable: putSortable,\n    activeSortable: Sortable.active,\n    originalEvent: originalEvent,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex,\n    hideGhostForTarget: _hideGhostForTarget,\n    unhideGhostForTarget: _unhideGhostForTarget,\n    cloneNowHidden: function cloneNowHidden() {\n      cloneHidden = true;\n    },\n    cloneNowShown: function cloneNowShown() {\n      cloneHidden = false;\n    },\n    dispatchSortableEvent: function dispatchSortableEvent(name) {\n      _dispatchEvent({\n        sortable: sortable,\n        name: name,\n        originalEvent: originalEvent\n      });\n    }\n  }, data));\n};\n\nfunction _dispatchEvent(info) {\n  dispatchEvent(_objectSpread({\n    putSortable: putSortable,\n    cloneEl: cloneEl,\n    targetEl: dragEl,\n    rootEl: rootEl,\n    oldIndex: oldIndex,\n    oldDraggableIndex: oldDraggableIndex,\n    newIndex: newIndex,\n    newDraggableIndex: newDraggableIndex\n  }, info));\n}\n\nvar dragEl,\n    parentEl,\n    ghostEl,\n    rootEl,\n    nextEl,\n    lastDownEl,\n    cloneEl,\n    cloneHidden,\n    oldIndex,\n    newIndex,\n    oldDraggableIndex,\n    newDraggableIndex,\n    activeGroup,\n    putSortable,\n    awaitingDragStarted = false,\n    ignoreNextClick = false,\n    sortables = [],\n    tapEvt,\n    touchEvt,\n    lastDx,\n    lastDy,\n    tapDistanceLeft,\n    tapDistanceTop,\n    moved,\n    lastTarget,\n    lastDirection,\n    pastFirstInvertThresh = false,\n    isCircumstantialInvert = false,\n    targetMoveDistance,\n    // For positioning ghost absolutely\nghostRelativeParent,\n    ghostRelativeParentInitialScroll = [],\n    // (left, top)\n_silent = false,\n    savedInputChecked = [];\n/** @const */\n\nvar documentExists = typeof document !== 'undefined',\n    PositionGhostAbsolutely = IOS,\n    CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',\n    // This will not pass for IE9, because IE9 DnD only works on anchors\nsupportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),\n    supportCssPointerEvents = function () {\n  if (!documentExists) return; // false when <= IE11\n\n  if (IE11OrLess) {\n    return false;\n  }\n\n  var el = document.createElement('x');\n  el.style.cssText = 'pointer-events:auto';\n  return el.style.pointerEvents === 'auto';\n}(),\n    _detectDirection = function _detectDirection(el, options) {\n  var elCSS = css(el),\n      elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),\n      child1 = getChild(el, 0, options),\n      child2 = getChild(el, 1, options),\n      firstChildCSS = child1 && css(child1),\n      secondChildCSS = child2 && css(child2),\n      firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,\n      secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;\n\n  if (elCSS.display === 'flex') {\n    return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';\n  }\n\n  if (elCSS.display === 'grid') {\n    return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';\n  }\n\n  if (child1 && firstChildCSS[\"float\"] && firstChildCSS[\"float\"] !== 'none') {\n    var touchingSideChild2 = firstChildCSS[\"float\"] === 'left' ? 'left' : 'right';\n    return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';\n  }\n\n  return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';\n},\n    _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {\n  var dragElS1Opp = vertical ? dragRect.left : dragRect.top,\n      dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,\n      dragElOppLength = vertical ? dragRect.width : dragRect.height,\n      targetS1Opp = vertical ? targetRect.left : targetRect.top,\n      targetS2Opp = vertical ? targetRect.right : targetRect.bottom,\n      targetOppLength = vertical ? targetRect.width : targetRect.height;\n  return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;\n},\n\n/**\n * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.\n * @param  {Number} x      X position\n * @param  {Number} y      Y position\n * @return {HTMLElement}   Element of the first found nearest Sortable\n */\n_detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {\n  var ret;\n  sortables.some(function (sortable) {\n    if (lastChild(sortable)) return;\n    var rect = getRect(sortable),\n        threshold = sortable[expando].options.emptyInsertThreshold,\n        insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,\n        insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;\n\n    if (threshold && insideHorizontally && insideVertically) {\n      return ret = sortable;\n    }\n  });\n  return ret;\n},\n    _prepareGroup = function _prepareGroup(options) {\n  function toFn(value, pull) {\n    return function (to, from, dragEl, evt) {\n      var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;\n\n      if (value == null && (pull || sameGroup)) {\n        // Default pull value\n        // Default pull and put value if same group\n        return true;\n      } else if (value == null || value === false) {\n        return false;\n      } else if (pull && value === 'clone') {\n        return value;\n      } else if (typeof value === 'function') {\n        return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);\n      } else {\n        var otherGroup = (pull ? to : from).options.group.name;\n        return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;\n      }\n    };\n  }\n\n  var group = {};\n  var originalGroup = options.group;\n\n  if (!originalGroup || _typeof(originalGroup) != 'object') {\n    originalGroup = {\n      name: originalGroup\n    };\n  }\n\n  group.name = originalGroup.name;\n  group.checkPull = toFn(originalGroup.pull, true);\n  group.checkPut = toFn(originalGroup.put);\n  group.revertClone = originalGroup.revertClone;\n  options.group = group;\n},\n    _hideGhostForTarget = function _hideGhostForTarget() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, 'display', 'none');\n  }\n},\n    _unhideGhostForTarget = function _unhideGhostForTarget() {\n  if (!supportCssPointerEvents && ghostEl) {\n    css(ghostEl, 'display', '');\n  }\n}; // #1184 fix - Prevent click event on fallback if dragged but item not changed position\n\n\nif (documentExists) {\n  document.addEventListener('click', function (evt) {\n    if (ignoreNextClick) {\n      evt.preventDefault();\n      evt.stopPropagation && evt.stopPropagation();\n      evt.stopImmediatePropagation && evt.stopImmediatePropagation();\n      ignoreNextClick = false;\n      return false;\n    }\n  }, true);\n}\n\nvar nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {\n  if (dragEl) {\n    evt = evt.touches ? evt.touches[0] : evt;\n\n    var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);\n\n    if (nearest) {\n      // Create imitation event\n      var event = {};\n\n      for (var i in evt) {\n        if (evt.hasOwnProperty(i)) {\n          event[i] = evt[i];\n        }\n      }\n\n      event.target = event.rootEl = nearest;\n      event.preventDefault = void 0;\n      event.stopPropagation = void 0;\n\n      nearest[expando]._onDragOver(event);\n    }\n  }\n};\n\nvar _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {\n  if (dragEl) {\n    dragEl.parentNode[expando]._isOutsideThisEl(evt.target);\n  }\n};\n/**\n * @class  Sortable\n * @param  {HTMLElement}  el\n * @param  {Object}       [options]\n */\n\n\nfunction Sortable(el, options) {\n  if (!(el && el.nodeType && el.nodeType === 1)) {\n    throw \"Sortable: `el` must be an HTMLElement, not \".concat({}.toString.call(el));\n  }\n\n  this.el = el; // root element\n\n  this.options = options = _extends({}, options); // Export instance\n\n  el[expando] = this;\n  var defaults = {\n    group: null,\n    sort: true,\n    disabled: false,\n    store: null,\n    handle: null,\n    draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',\n    swapThreshold: 1,\n    // percentage; 0 <= x <= 1\n    invertSwap: false,\n    // invert always\n    invertedSwapThreshold: null,\n    // will be set to same as swapThreshold if default\n    removeCloneOnHide: true,\n    direction: function direction() {\n      return _detectDirection(el, this.options);\n    },\n    ghostClass: 'sortable-ghost',\n    chosenClass: 'sortable-chosen',\n    dragClass: 'sortable-drag',\n    ignore: 'a, img',\n    filter: null,\n    preventOnFilter: true,\n    animation: 0,\n    easing: null,\n    setData: function setData(dataTransfer, dragEl) {\n      dataTransfer.setData('Text', dragEl.textContent);\n    },\n    dropBubble: false,\n    dragoverBubble: false,\n    dataIdAttr: 'data-id',\n    delay: 0,\n    delayOnTouchOnly: false,\n    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,\n    forceFallback: false,\n    fallbackClass: 'sortable-fallback',\n    fallbackOnBody: false,\n    fallbackTolerance: 0,\n    fallbackOffset: {\n      x: 0,\n      y: 0\n    },\n    supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window,\n    emptyInsertThreshold: 5\n  };\n  PluginManager.initializePlugins(this, el, defaults); // Set default options\n\n  for (var name in defaults) {\n    !(name in options) && (options[name] = defaults[name]);\n  }\n\n  _prepareGroup(options); // Bind all private methods\n\n\n  for (var fn in this) {\n    if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n      this[fn] = this[fn].bind(this);\n    }\n  } // Setup drag mode\n\n\n  this.nativeDraggable = options.forceFallback ? false : supportDraggable;\n\n  if (this.nativeDraggable) {\n    // Touch start threshold cannot be greater than the native dragstart threshold\n    this.options.touchStartThreshold = 1;\n  } // Bind events\n\n\n  if (options.supportPointer) {\n    on(el, 'pointerdown', this._onTapStart);\n  } else {\n    on(el, 'mousedown', this._onTapStart);\n    on(el, 'touchstart', this._onTapStart);\n  }\n\n  if (this.nativeDraggable) {\n    on(el, 'dragover', this);\n    on(el, 'dragenter', this);\n  }\n\n  sortables.push(this.el); // Restore sorting\n\n  options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager\n\n  _extends(this, AnimationStateManager());\n}\n\nSortable.prototype =\n/** @lends Sortable.prototype */\n{\n  constructor: Sortable,\n  _isOutsideThisEl: function _isOutsideThisEl(target) {\n    if (!this.el.contains(target) && target !== this.el) {\n      lastTarget = null;\n    }\n  },\n  _getDirection: function _getDirection(evt, target) {\n    return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;\n  },\n  _onTapStart: function _onTapStart(\n  /** Event|TouchEvent */\n  evt) {\n    if (!evt.cancelable) return;\n\n    var _this = this,\n        el = this.el,\n        options = this.options,\n        preventOnFilter = options.preventOnFilter,\n        type = evt.type,\n        touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,\n        target = (touch || evt).target,\n        originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,\n        filter = options.filter;\n\n    _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.\n\n\n    if (dragEl) {\n      return;\n    }\n\n    if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {\n      return; // only left button and enabled\n    } // cancel dnd if original target is content editable\n\n\n    if (originalTarget.isContentEditable) {\n      return;\n    }\n\n    target = closest(target, options.draggable, el, false);\n\n    if (target && target.animated) {\n      return;\n    }\n\n    if (lastDownEl === target) {\n      // Ignoring duplicate `down`\n      return;\n    } // Get the index of the dragged element within its parent\n\n\n    oldIndex = index(target);\n    oldDraggableIndex = index(target, options.draggable); // Check filter\n\n    if (typeof filter === 'function') {\n      if (filter.call(this, evt, target, this)) {\n        _dispatchEvent({\n          sortable: _this,\n          rootEl: originalTarget,\n          name: 'filter',\n          targetEl: target,\n          toEl: el,\n          fromEl: el\n        });\n\n        pluginEvent('filter', _this, {\n          evt: evt\n        });\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    } else if (filter) {\n      filter = filter.split(',').some(function (criteria) {\n        criteria = closest(originalTarget, criteria.trim(), el, false);\n\n        if (criteria) {\n          _dispatchEvent({\n            sortable: _this,\n            rootEl: criteria,\n            name: 'filter',\n            targetEl: target,\n            fromEl: el,\n            toEl: el\n          });\n\n          pluginEvent('filter', _this, {\n            evt: evt\n          });\n          return true;\n        }\n      });\n\n      if (filter) {\n        preventOnFilter && evt.cancelable && evt.preventDefault();\n        return; // cancel dnd\n      }\n    }\n\n    if (options.handle && !closest(originalTarget, options.handle, el, false)) {\n      return;\n    } // Prepare `dragstart`\n\n\n    this._prepareDragStart(evt, touch, target);\n  },\n  _prepareDragStart: function _prepareDragStart(\n  /** Event */\n  evt,\n  /** Touch */\n  touch,\n  /** HTMLElement */\n  target) {\n    var _this = this,\n        el = _this.el,\n        options = _this.options,\n        ownerDocument = el.ownerDocument,\n        dragStartFn;\n\n    if (target && !dragEl && target.parentNode === el) {\n      var dragRect = getRect(target);\n      rootEl = el;\n      dragEl = target;\n      parentEl = dragEl.parentNode;\n      nextEl = dragEl.nextSibling;\n      lastDownEl = target;\n      activeGroup = options.group;\n      Sortable.dragged = dragEl;\n      tapEvt = {\n        target: dragEl,\n        clientX: (touch || evt).clientX,\n        clientY: (touch || evt).clientY\n      };\n      tapDistanceLeft = tapEvt.clientX - dragRect.left;\n      tapDistanceTop = tapEvt.clientY - dragRect.top;\n      this._lastX = (touch || evt).clientX;\n      this._lastY = (touch || evt).clientY;\n      dragEl.style['will-change'] = 'all';\n\n      dragStartFn = function dragStartFn() {\n        pluginEvent('delayEnded', _this, {\n          evt: evt\n        });\n\n        if (Sortable.eventCanceled) {\n          _this._onDrop();\n\n          return;\n        } // Delayed drag has been triggered\n        // we can re-enable the events: touchmove/mousemove\n\n\n        _this._disableDelayedDragEvents();\n\n        if (!FireFox && _this.nativeDraggable) {\n          dragEl.draggable = true;\n        } // Bind the events: dragstart/dragend\n\n\n        _this._triggerDragStart(evt, touch); // Drag start event\n\n\n        _dispatchEvent({\n          sortable: _this,\n          name: 'choose',\n          originalEvent: evt\n        }); // Chosen item\n\n\n        toggleClass(dragEl, options.chosenClass, true);\n      }; // Disable \"draggable\"\n\n\n      options.ignore.split(',').forEach(function (criteria) {\n        find(dragEl, criteria.trim(), _disableDraggable);\n      });\n      on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);\n      on(ownerDocument, 'mouseup', _this._onDrop);\n      on(ownerDocument, 'touchend', _this._onDrop);\n      on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)\n\n      if (FireFox && this.nativeDraggable) {\n        this.options.touchStartThreshold = 4;\n        dragEl.draggable = true;\n      }\n\n      pluginEvent('delayStart', this, {\n        evt: evt\n      }); // Delay is impossible for native DnD in Edge or IE\n\n      if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {\n        if (Sortable.eventCanceled) {\n          this._onDrop();\n\n          return;\n        } // If the user moves the pointer or let go the click or touch\n        // before the delay has been reached:\n        // disable the delayed drag\n\n\n        on(ownerDocument, 'mouseup', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchend', _this._disableDelayedDrag);\n        on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);\n        on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);\n        on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);\n        options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);\n        _this._dragStartTimer = setTimeout(dragStartFn, options.delay);\n      } else {\n        dragStartFn();\n      }\n    }\n  },\n  _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(\n  /** TouchEvent|PointerEvent **/\n  e) {\n    var touch = e.touches ? e.touches[0] : e;\n\n    if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {\n      this._disableDelayedDrag();\n    }\n  },\n  _disableDelayedDrag: function _disableDelayedDrag() {\n    dragEl && _disableDraggable(dragEl);\n    clearTimeout(this._dragStartTimer);\n\n    this._disableDelayedDragEvents();\n  },\n  _disableDelayedDragEvents: function _disableDelayedDragEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._disableDelayedDrag);\n    off(ownerDocument, 'touchend', this._disableDelayedDrag);\n    off(ownerDocument, 'touchcancel', this._disableDelayedDrag);\n    off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);\n    off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);\n  },\n  _triggerDragStart: function _triggerDragStart(\n  /** Event */\n  evt,\n  /** Touch */\n  touch) {\n    touch = touch || evt.pointerType == 'touch' && evt;\n\n    if (!this.nativeDraggable || touch) {\n      if (this.options.supportPointer) {\n        on(document, 'pointermove', this._onTouchMove);\n      } else if (touch) {\n        on(document, 'touchmove', this._onTouchMove);\n      } else {\n        on(document, 'mousemove', this._onTouchMove);\n      }\n    } else {\n      on(dragEl, 'dragend', this);\n      on(rootEl, 'dragstart', this._onDragStart);\n    }\n\n    try {\n      if (document.selection) {\n        // Timeout neccessary for IE9\n        _nextTick(function () {\n          document.selection.empty();\n        });\n      } else {\n        window.getSelection().removeAllRanges();\n      }\n    } catch (err) {}\n  },\n  _dragStarted: function _dragStarted(fallback, evt) {\n\n    awaitingDragStarted = false;\n\n    if (rootEl && dragEl) {\n      pluginEvent('dragStarted', this, {\n        evt: evt\n      });\n\n      if (this.nativeDraggable) {\n        on(document, 'dragover', _checkOutsideTargetEl);\n      }\n\n      var options = this.options; // Apply effect\n\n      !fallback && toggleClass(dragEl, options.dragClass, false);\n      toggleClass(dragEl, options.ghostClass, true);\n      Sortable.active = this;\n      fallback && this._appendGhost(); // Drag start event\n\n      _dispatchEvent({\n        sortable: this,\n        name: 'start',\n        originalEvent: evt\n      });\n    } else {\n      this._nulling();\n    }\n  },\n  _emulateDragOver: function _emulateDragOver() {\n    if (touchEvt) {\n      this._lastX = touchEvt.clientX;\n      this._lastY = touchEvt.clientY;\n\n      _hideGhostForTarget();\n\n      var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n      var parent = target;\n\n      while (target && target.shadowRoot) {\n        target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);\n        if (target === parent) break;\n        parent = target;\n      }\n\n      dragEl.parentNode[expando]._isOutsideThisEl(target);\n\n      if (parent) {\n        do {\n          if (parent[expando]) {\n            var inserted = void 0;\n            inserted = parent[expando]._onDragOver({\n              clientX: touchEvt.clientX,\n              clientY: touchEvt.clientY,\n              target: target,\n              rootEl: parent\n            });\n\n            if (inserted && !this.options.dragoverBubble) {\n              break;\n            }\n          }\n\n          target = parent; // store last element\n        }\n        /* jshint boss:true */\n        while (parent = parent.parentNode);\n      }\n\n      _unhideGhostForTarget();\n    }\n  },\n  _onTouchMove: function _onTouchMove(\n  /**TouchEvent*/\n  evt) {\n    if (tapEvt) {\n      var options = this.options,\n          fallbackTolerance = options.fallbackTolerance,\n          fallbackOffset = options.fallbackOffset,\n          touch = evt.touches ? evt.touches[0] : evt,\n          ghostMatrix = ghostEl && matrix(ghostEl, true),\n          scaleX = ghostEl && ghostMatrix && ghostMatrix.a,\n          scaleY = ghostEl && ghostMatrix && ghostMatrix.d,\n          relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),\n          dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),\n          dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging\n\n      if (!Sortable.active && !awaitingDragStarted) {\n        if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {\n          return;\n        }\n\n        this._onDragStart(evt, true);\n      }\n\n      if (ghostEl) {\n        if (ghostMatrix) {\n          ghostMatrix.e += dx - (lastDx || 0);\n          ghostMatrix.f += dy - (lastDy || 0);\n        } else {\n          ghostMatrix = {\n            a: 1,\n            b: 0,\n            c: 0,\n            d: 1,\n            e: dx,\n            f: dy\n          };\n        }\n\n        var cssMatrix = \"matrix(\".concat(ghostMatrix.a, \",\").concat(ghostMatrix.b, \",\").concat(ghostMatrix.c, \",\").concat(ghostMatrix.d, \",\").concat(ghostMatrix.e, \",\").concat(ghostMatrix.f, \")\");\n        css(ghostEl, 'webkitTransform', cssMatrix);\n        css(ghostEl, 'mozTransform', cssMatrix);\n        css(ghostEl, 'msTransform', cssMatrix);\n        css(ghostEl, 'transform', cssMatrix);\n        lastDx = dx;\n        lastDy = dy;\n        touchEvt = touch;\n      }\n\n      evt.cancelable && evt.preventDefault();\n    }\n  },\n  _appendGhost: function _appendGhost() {\n    // Bug if using scale(): https://stackoverflow.com/questions/2637058\n    // Not being adjusted for\n    if (!ghostEl) {\n      var container = this.options.fallbackOnBody ? document.body : rootEl,\n          rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),\n          options = this.options; // Position absolutely\n\n      if (PositionGhostAbsolutely) {\n        // Get relatively positioned parent\n        ghostRelativeParent = container;\n\n        while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {\n          ghostRelativeParent = ghostRelativeParent.parentNode;\n        }\n\n        if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {\n          if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();\n          rect.top += ghostRelativeParent.scrollTop;\n          rect.left += ghostRelativeParent.scrollLeft;\n        } else {\n          ghostRelativeParent = getWindowScrollingElement();\n        }\n\n        ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);\n      }\n\n      ghostEl = dragEl.cloneNode(true);\n      toggleClass(ghostEl, options.ghostClass, false);\n      toggleClass(ghostEl, options.fallbackClass, true);\n      toggleClass(ghostEl, options.dragClass, true);\n      css(ghostEl, 'transition', '');\n      css(ghostEl, 'transform', '');\n      css(ghostEl, 'box-sizing', 'border-box');\n      css(ghostEl, 'margin', 0);\n      css(ghostEl, 'top', rect.top);\n      css(ghostEl, 'left', rect.left);\n      css(ghostEl, 'width', rect.width);\n      css(ghostEl, 'height', rect.height);\n      css(ghostEl, 'opacity', '0.8');\n      css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');\n      css(ghostEl, 'zIndex', '100000');\n      css(ghostEl, 'pointerEvents', 'none');\n      Sortable.ghost = ghostEl;\n      container.appendChild(ghostEl); // Set transform-origin\n\n      css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');\n    }\n  },\n  _onDragStart: function _onDragStart(\n  /**Event*/\n  evt,\n  /**boolean*/\n  fallback) {\n    var _this = this;\n\n    var dataTransfer = evt.dataTransfer;\n    var options = _this.options;\n    pluginEvent('dragStart', this, {\n      evt: evt\n    });\n\n    if (Sortable.eventCanceled) {\n      this._onDrop();\n\n      return;\n    }\n\n    pluginEvent('setupClone', this);\n\n    if (!Sortable.eventCanceled) {\n      cloneEl = clone(dragEl);\n      cloneEl.draggable = false;\n      cloneEl.style['will-change'] = '';\n\n      this._hideClone();\n\n      toggleClass(cloneEl, this.options.chosenClass, false);\n      Sortable.clone = cloneEl;\n    } // #1143: IFrame support workaround\n\n\n    _this.cloneId = _nextTick(function () {\n      pluginEvent('clone', _this);\n      if (Sortable.eventCanceled) return;\n\n      if (!_this.options.removeCloneOnHide) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      }\n\n      _this._hideClone();\n\n      _dispatchEvent({\n        sortable: _this,\n        name: 'clone'\n      });\n    });\n    !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events\n\n    if (fallback) {\n      ignoreNextClick = true;\n      _this._loopId = setInterval(_this._emulateDragOver, 50);\n    } else {\n      // Undo what was set in _prepareDragStart before drag started\n      off(document, 'mouseup', _this._onDrop);\n      off(document, 'touchend', _this._onDrop);\n      off(document, 'touchcancel', _this._onDrop);\n\n      if (dataTransfer) {\n        dataTransfer.effectAllowed = 'move';\n        options.setData && options.setData.call(_this, dataTransfer, dragEl);\n      }\n\n      on(document, 'drop', _this); // #1276 fix:\n\n      css(dragEl, 'transform', 'translateZ(0)');\n    }\n\n    awaitingDragStarted = true;\n    _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));\n    on(document, 'selectstart', _this);\n    moved = true;\n\n    if (Safari) {\n      css(document.body, 'user-select', 'none');\n    }\n  },\n  // Returns true - if no further action is needed (either inserted or another condition)\n  _onDragOver: function _onDragOver(\n  /**Event*/\n  evt) {\n    var el = this.el,\n        target = evt.target,\n        dragRect,\n        targetRect,\n        revert,\n        options = this.options,\n        group = options.group,\n        activeSortable = Sortable.active,\n        isOwner = activeGroup === group,\n        canSort = options.sort,\n        fromSortable = putSortable || activeSortable,\n        vertical,\n        _this = this,\n        completedFired = false;\n\n    if (_silent) return;\n\n    function dragOverEvent(name, extra) {\n      pluginEvent(name, _this, _objectSpread({\n        evt: evt,\n        isOwner: isOwner,\n        axis: vertical ? 'vertical' : 'horizontal',\n        revert: revert,\n        dragRect: dragRect,\n        targetRect: targetRect,\n        canSort: canSort,\n        fromSortable: fromSortable,\n        target: target,\n        completed: completed,\n        onMove: function onMove(target, after) {\n          return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);\n        },\n        changed: changed\n      }, extra));\n    } // Capture animation state\n\n\n    function capture() {\n      dragOverEvent('dragOverAnimationCapture');\n\n      _this.captureAnimationState();\n\n      if (_this !== fromSortable) {\n        fromSortable.captureAnimationState();\n      }\n    } // Return invocation when dragEl is inserted (or completed)\n\n\n    function completed(insertion) {\n      dragOverEvent('dragOverCompleted', {\n        insertion: insertion\n      });\n\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        } else {\n          activeSortable._showClone(_this);\n        }\n\n        if (_this !== fromSortable) {\n          // Set ghost class to new sortable's ghost class\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);\n          toggleClass(dragEl, options.ghostClass, true);\n        }\n\n        if (putSortable !== _this && _this !== Sortable.active) {\n          putSortable = _this;\n        } else if (_this === Sortable.active && putSortable) {\n          putSortable = null;\n        } // Animation\n\n\n        if (fromSortable === _this) {\n          _this._ignoreWhileAnimating = target;\n        }\n\n        _this.animateAll(function () {\n          dragOverEvent('dragOverAnimationComplete');\n          _this._ignoreWhileAnimating = null;\n        });\n\n        if (_this !== fromSortable) {\n          fromSortable.animateAll();\n          fromSortable._ignoreWhileAnimating = null;\n        }\n      } // Null lastTarget if it is not inside a previously swapped element\n\n\n      if (target === dragEl && !dragEl.animated || target === el && !target.animated) {\n        lastTarget = null;\n      } // no bubbling and not fallback\n\n\n      if (!options.dragoverBubble && !evt.rootEl && target !== document) {\n        dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted\n\n\n        !insertion && nearestEmptyInsertDetectEvent(evt);\n      }\n\n      !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();\n      return completedFired = true;\n    } // Call when dragEl has been inserted\n\n\n    function changed() {\n      newIndex = index(dragEl);\n      newDraggableIndex = index(dragEl, options.draggable);\n\n      _dispatchEvent({\n        sortable: _this,\n        name: 'change',\n        toEl: el,\n        newIndex: newIndex,\n        newDraggableIndex: newDraggableIndex,\n        originalEvent: evt\n      });\n    }\n\n    if (evt.preventDefault !== void 0) {\n      evt.cancelable && evt.preventDefault();\n    }\n\n    target = closest(target, options.draggable, el, true);\n    dragOverEvent('dragOver');\n    if (Sortable.eventCanceled) return completedFired;\n\n    if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {\n      return completed(false);\n    }\n\n    ignoreNextClick = false;\n\n    if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list\n    : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {\n      vertical = this._getDirection(evt, target) === 'vertical';\n      dragRect = getRect(dragEl);\n      dragOverEvent('dragOverValid');\n      if (Sortable.eventCanceled) return completedFired;\n\n      if (revert) {\n        parentEl = rootEl; // actualization\n\n        capture();\n\n        this._hideClone();\n\n        dragOverEvent('revert');\n\n        if (!Sortable.eventCanceled) {\n          if (nextEl) {\n            rootEl.insertBefore(dragEl, nextEl);\n          } else {\n            rootEl.appendChild(dragEl);\n          }\n        }\n\n        return completed(true);\n      }\n\n      var elLastChild = lastChild(el, options.draggable);\n\n      if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {\n        // If already at end of list: Do not insert\n        if (elLastChild === dragEl) {\n          return completed(false);\n        } // assign target only if condition is true\n\n\n        if (elLastChild && el === evt.target) {\n          target = elLastChild;\n        }\n\n        if (target) {\n          targetRect = getRect(target);\n        }\n\n        if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {\n          capture();\n          el.appendChild(dragEl);\n          parentEl = el; // actualization\n\n          changed();\n          return completed(true);\n        }\n      } else if (target.parentNode === el) {\n        targetRect = getRect(target);\n        var direction = 0,\n            targetBeforeFirstSwap,\n            differentLevel = dragEl.parentNode !== el,\n            differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),\n            side1 = vertical ? 'top' : 'left',\n            scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),\n            scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;\n\n        if (lastTarget !== target) {\n          targetBeforeFirstSwap = targetRect[side1];\n          pastFirstInvertThresh = false;\n          isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;\n        }\n\n        direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);\n        var sibling;\n\n        if (direction !== 0) {\n          // Check if target is beside dragEl in respective direction (ignoring hidden elements)\n          var dragIndex = index(dragEl);\n\n          do {\n            dragIndex -= direction;\n            sibling = parentEl.children[dragIndex];\n          } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));\n        } // If dragEl is already beside target: Do not insert\n\n\n        if (direction === 0 || sibling === target) {\n          return completed(false);\n        }\n\n        lastTarget = target;\n        lastDirection = direction;\n        var nextSibling = target.nextElementSibling,\n            after = false;\n        after = direction === 1;\n\n        var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);\n\n        if (moveVector !== false) {\n          if (moveVector === 1 || moveVector === -1) {\n            after = moveVector === 1;\n          }\n\n          _silent = true;\n          setTimeout(_unsilent, 30);\n          capture();\n\n          if (after && !nextSibling) {\n            el.appendChild(dragEl);\n          } else {\n            target.parentNode.insertBefore(dragEl, after ? nextSibling : target);\n          } // Undo chrome's scroll adjustment (has no effect on other browsers)\n\n\n          if (scrolledPastTop) {\n            scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);\n          }\n\n          parentEl = dragEl.parentNode; // actualization\n          // must be done before animation\n\n          if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {\n            targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);\n          }\n\n          changed();\n          return completed(true);\n        }\n      }\n\n      if (el.contains(dragEl)) {\n        return completed(false);\n      }\n    }\n\n    return false;\n  },\n  _ignoreWhileAnimating: null,\n  _offMoveEvents: function _offMoveEvents() {\n    off(document, 'mousemove', this._onTouchMove);\n    off(document, 'touchmove', this._onTouchMove);\n    off(document, 'pointermove', this._onTouchMove);\n    off(document, 'dragover', nearestEmptyInsertDetectEvent);\n    off(document, 'mousemove', nearestEmptyInsertDetectEvent);\n    off(document, 'touchmove', nearestEmptyInsertDetectEvent);\n  },\n  _offUpEvents: function _offUpEvents() {\n    var ownerDocument = this.el.ownerDocument;\n    off(ownerDocument, 'mouseup', this._onDrop);\n    off(ownerDocument, 'touchend', this._onDrop);\n    off(ownerDocument, 'pointerup', this._onDrop);\n    off(ownerDocument, 'touchcancel', this._onDrop);\n    off(document, 'selectstart', this);\n  },\n  _onDrop: function _onDrop(\n  /**Event*/\n  evt) {\n    var el = this.el,\n        options = this.options; // Get the index of the dragged element within its parent\n\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n    pluginEvent('drop', this, {\n      evt: evt\n    });\n    parentEl = dragEl && dragEl.parentNode; // Get again after plugin event\n\n    newIndex = index(dragEl);\n    newDraggableIndex = index(dragEl, options.draggable);\n\n    if (Sortable.eventCanceled) {\n      this._nulling();\n\n      return;\n    }\n\n    awaitingDragStarted = false;\n    isCircumstantialInvert = false;\n    pastFirstInvertThresh = false;\n    clearInterval(this._loopId);\n    clearTimeout(this._dragStartTimer);\n\n    _cancelNextTick(this.cloneId);\n\n    _cancelNextTick(this._dragStartId); // Unbind events\n\n\n    if (this.nativeDraggable) {\n      off(document, 'drop', this);\n      off(el, 'dragstart', this._onDragStart);\n    }\n\n    this._offMoveEvents();\n\n    this._offUpEvents();\n\n    if (Safari) {\n      css(document.body, 'user-select', '');\n    }\n\n    css(dragEl, 'transform', '');\n\n    if (evt) {\n      if (moved) {\n        evt.cancelable && evt.preventDefault();\n        !options.dropBubble && evt.stopPropagation();\n      }\n\n      ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);\n\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        // Remove clone(s)\n        cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);\n      }\n\n      if (dragEl) {\n        if (this.nativeDraggable) {\n          off(dragEl, 'dragend', this);\n        }\n\n        _disableDraggable(dragEl);\n\n        dragEl.style['will-change'] = ''; // Remove classes\n        // ghostClass is added in dragStarted\n\n        if (moved && !awaitingDragStarted) {\n          toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);\n        }\n\n        toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event\n\n        _dispatchEvent({\n          sortable: this,\n          name: 'unchoose',\n          toEl: parentEl,\n          newIndex: null,\n          newDraggableIndex: null,\n          originalEvent: evt\n        });\n\n        if (rootEl !== parentEl) {\n          if (newIndex >= 0) {\n            // Add event\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'add',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            }); // Remove event\n\n\n            _dispatchEvent({\n              sortable: this,\n              name: 'remove',\n              toEl: parentEl,\n              originalEvent: evt\n            }); // drag from one list and drop into another\n\n\n            _dispatchEvent({\n              rootEl: parentEl,\n              name: 'sort',\n              toEl: parentEl,\n              fromEl: rootEl,\n              originalEvent: evt\n            });\n\n            _dispatchEvent({\n              sortable: this,\n              name: 'sort',\n              toEl: parentEl,\n              originalEvent: evt\n            });\n          }\n\n          putSortable && putSortable.save();\n        } else {\n          if (newIndex !== oldIndex) {\n            if (newIndex >= 0) {\n              // drag & drop within the same list\n              _dispatchEvent({\n                sortable: this,\n                name: 'update',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n\n              _dispatchEvent({\n                sortable: this,\n                name: 'sort',\n                toEl: parentEl,\n                originalEvent: evt\n              });\n            }\n          }\n        }\n\n        if (Sortable.active) {\n          /* jshint eqnull:true */\n          if (newIndex == null || newIndex === -1) {\n            newIndex = oldIndex;\n            newDraggableIndex = oldDraggableIndex;\n          }\n\n          _dispatchEvent({\n            sortable: this,\n            name: 'end',\n            toEl: parentEl,\n            originalEvent: evt\n          }); // Save sorting\n\n\n          this.save();\n        }\n      }\n    }\n\n    this._nulling();\n  },\n  _nulling: function _nulling() {\n    pluginEvent('nulling', this);\n    rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;\n    savedInputChecked.forEach(function (el) {\n      el.checked = true;\n    });\n    savedInputChecked.length = lastDx = lastDy = 0;\n  },\n  handleEvent: function handleEvent(\n  /**Event*/\n  evt) {\n    switch (evt.type) {\n      case 'drop':\n      case 'dragend':\n        this._onDrop(evt);\n\n        break;\n\n      case 'dragenter':\n      case 'dragover':\n        if (dragEl) {\n          this._onDragOver(evt);\n\n          _globalDragOver(evt);\n        }\n\n        break;\n\n      case 'selectstart':\n        evt.preventDefault();\n        break;\n    }\n  },\n\n  /**\n   * Serializes the item into an array of string.\n   * @returns {String[]}\n   */\n  toArray: function toArray() {\n    var order = [],\n        el,\n        children = this.el.children,\n        i = 0,\n        n = children.length,\n        options = this.options;\n\n    for (; i < n; i++) {\n      el = children[i];\n\n      if (closest(el, options.draggable, this.el, false)) {\n        order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));\n      }\n    }\n\n    return order;\n  },\n\n  /**\n   * Sorts the elements according to the array.\n   * @param  {String[]}  order  order of the items\n   */\n  sort: function sort(order) {\n    var items = {},\n        rootEl = this.el;\n    this.toArray().forEach(function (id, i) {\n      var el = rootEl.children[i];\n\n      if (closest(el, this.options.draggable, rootEl, false)) {\n        items[id] = el;\n      }\n    }, this);\n    order.forEach(function (id) {\n      if (items[id]) {\n        rootEl.removeChild(items[id]);\n        rootEl.appendChild(items[id]);\n      }\n    });\n  },\n\n  /**\n   * Save the current sorting\n   */\n  save: function save() {\n    var store = this.options.store;\n    store && store.set && store.set(this);\n  },\n\n  /**\n   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.\n   * @param   {HTMLElement}  el\n   * @param   {String}       [selector]  default: `options.draggable`\n   * @returns {HTMLElement|null}\n   */\n  closest: function closest$1(el, selector) {\n    return closest(el, selector || this.options.draggable, this.el, false);\n  },\n\n  /**\n   * Set/get option\n   * @param   {string} name\n   * @param   {*}      [value]\n   * @returns {*}\n   */\n  option: function option(name, value) {\n    var options = this.options;\n\n    if (value === void 0) {\n      return options[name];\n    } else {\n      var modifiedValue = PluginManager.modifyOption(this, name, value);\n\n      if (typeof modifiedValue !== 'undefined') {\n        options[name] = modifiedValue;\n      } else {\n        options[name] = value;\n      }\n\n      if (name === 'group') {\n        _prepareGroup(options);\n      }\n    }\n  },\n\n  /**\n   * Destroy\n   */\n  destroy: function destroy() {\n    pluginEvent('destroy', this);\n    var el = this.el;\n    el[expando] = null;\n    off(el, 'mousedown', this._onTapStart);\n    off(el, 'touchstart', this._onTapStart);\n    off(el, 'pointerdown', this._onTapStart);\n\n    if (this.nativeDraggable) {\n      off(el, 'dragover', this);\n      off(el, 'dragenter', this);\n    } // Remove draggable attributes\n\n\n    Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {\n      el.removeAttribute('draggable');\n    });\n\n    this._onDrop();\n\n    this._disableDelayedDragEvents();\n\n    sortables.splice(sortables.indexOf(this.el), 1);\n    this.el = el = null;\n  },\n  _hideClone: function _hideClone() {\n    if (!cloneHidden) {\n      pluginEvent('hideClone', this);\n      if (Sortable.eventCanceled) return;\n      css(cloneEl, 'display', 'none');\n\n      if (this.options.removeCloneOnHide && cloneEl.parentNode) {\n        cloneEl.parentNode.removeChild(cloneEl);\n      }\n\n      cloneHidden = true;\n    }\n  },\n  _showClone: function _showClone(putSortable) {\n    if (putSortable.lastPutMode !== 'clone') {\n      this._hideClone();\n\n      return;\n    }\n\n    if (cloneHidden) {\n      pluginEvent('showClone', this);\n      if (Sortable.eventCanceled) return; // show clone at dragEl or original position\n\n      if (rootEl.contains(dragEl) && !this.options.group.revertClone) {\n        rootEl.insertBefore(cloneEl, dragEl);\n      } else if (nextEl) {\n        rootEl.insertBefore(cloneEl, nextEl);\n      } else {\n        rootEl.appendChild(cloneEl);\n      }\n\n      if (this.options.group.revertClone) {\n        this.animate(dragEl, cloneEl);\n      }\n\n      css(cloneEl, 'display', '');\n      cloneHidden = false;\n    }\n  }\n};\n\nfunction _globalDragOver(\n/**Event*/\nevt) {\n  if (evt.dataTransfer) {\n    evt.dataTransfer.dropEffect = 'move';\n  }\n\n  evt.cancelable && evt.preventDefault();\n}\n\nfunction _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {\n  var evt,\n      sortable = fromEl[expando],\n      onMoveFn = sortable.options.onMove,\n      retVal; // Support for new CustomEvent feature\n\n  if (window.CustomEvent && !IE11OrLess && !Edge) {\n    evt = new CustomEvent('move', {\n      bubbles: true,\n      cancelable: true\n    });\n  } else {\n    evt = document.createEvent('Event');\n    evt.initEvent('move', true, true);\n  }\n\n  evt.to = toEl;\n  evt.from = fromEl;\n  evt.dragged = dragEl;\n  evt.draggedRect = dragRect;\n  evt.related = targetEl || toEl;\n  evt.relatedRect = targetRect || getRect(toEl);\n  evt.willInsertAfter = willInsertAfter;\n  evt.originalEvent = originalEvent;\n  fromEl.dispatchEvent(evt);\n\n  if (onMoveFn) {\n    retVal = onMoveFn.call(sortable, evt, originalEvent);\n  }\n\n  return retVal;\n}\n\nfunction _disableDraggable(el) {\n  el.draggable = false;\n}\n\nfunction _unsilent() {\n  _silent = false;\n}\n\nfunction _ghostIsLast(evt, vertical, sortable) {\n  var rect = getRect(lastChild(sortable.el, sortable.options.draggable));\n  var spacer = 10;\n  return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;\n}\n\nfunction _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {\n  var mouseOnAxis = vertical ? evt.clientY : evt.clientX,\n      targetLength = vertical ? targetRect.height : targetRect.width,\n      targetS1 = vertical ? targetRect.top : targetRect.left,\n      targetS2 = vertical ? targetRect.bottom : targetRect.right,\n      invert = false;\n\n  if (!invertSwap) {\n    // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold\n    if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {\n      // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2\n      // check if past first invert threshold on side opposite of lastDirection\n      if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {\n        // past first invert threshold, do not restrict inverted threshold to dragEl shadow\n        pastFirstInvertThresh = true;\n      }\n\n      if (!pastFirstInvertThresh) {\n        // dragEl shadow (target move distance shadow)\n        if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow\n        : mouseOnAxis > targetS2 - targetMoveDistance) {\n          return -lastDirection;\n        }\n      } else {\n        invert = true;\n      }\n    } else {\n      // Regular\n      if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {\n        return _getInsertDirection(target);\n      }\n    }\n  }\n\n  invert = invert || invertSwap;\n\n  if (invert) {\n    // Invert of regular\n    if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {\n      return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;\n    }\n  }\n\n  return 0;\n}\n/**\n * Gets the direction dragEl must be swapped relative to target in order to make it\n * seem that dragEl has been \"inserted\" into that element's position\n * @param  {HTMLElement} target       The target whose position dragEl is being inserted at\n * @return {Number}                   Direction dragEl must be swapped\n */\n\n\nfunction _getInsertDirection(target) {\n  if (index(dragEl) < index(target)) {\n    return 1;\n  } else {\n    return -1;\n  }\n}\n/**\n * Generate id\n * @param   {HTMLElement} el\n * @returns {String}\n * @private\n */\n\n\nfunction _generateId(el) {\n  var str = el.tagName + el.className + el.src + el.href + el.textContent,\n      i = str.length,\n      sum = 0;\n\n  while (i--) {\n    sum += str.charCodeAt(i);\n  }\n\n  return sum.toString(36);\n}\n\nfunction _saveInputCheckedState(root) {\n  savedInputChecked.length = 0;\n  var inputs = root.getElementsByTagName('input');\n  var idx = inputs.length;\n\n  while (idx--) {\n    var el = inputs[idx];\n    el.checked && savedInputChecked.push(el);\n  }\n}\n\nfunction _nextTick(fn) {\n  return setTimeout(fn, 0);\n}\n\nfunction _cancelNextTick(id) {\n  return clearTimeout(id);\n} // Fixed #973:\n\n\nif (documentExists) {\n  on(document, 'touchmove', function (evt) {\n    if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {\n      evt.preventDefault();\n    }\n  });\n} // Export utils\n\n\nSortable.utils = {\n  on: on,\n  off: off,\n  css: css,\n  find: find,\n  is: function is(el, selector) {\n    return !!closest(el, selector, el, false);\n  },\n  extend: extend,\n  throttle: throttle,\n  closest: closest,\n  toggleClass: toggleClass,\n  clone: clone,\n  index: index,\n  nextTick: _nextTick,\n  cancelNextTick: _cancelNextTick,\n  detectDirection: _detectDirection,\n  getChild: getChild\n};\n/**\n * Get the Sortable instance of an element\n * @param  {HTMLElement} element The element\n * @return {Sortable|undefined}         The instance of Sortable\n */\n\nSortable.get = function (element) {\n  return element[expando];\n};\n/**\n * Mount a plugin to Sortable\n * @param  {...SortablePlugin|SortablePlugin[]} plugins       Plugins being mounted\n */\n\n\nSortable.mount = function () {\n  for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n    plugins[_key] = arguments[_key];\n  }\n\n  if (plugins[0].constructor === Array) plugins = plugins[0];\n  plugins.forEach(function (plugin) {\n    if (!plugin.prototype || !plugin.prototype.constructor) {\n      throw \"Sortable: Mounted plugin must be a constructor function, not \".concat({}.toString.call(plugin));\n    }\n\n    if (plugin.utils) Sortable.utils = _objectSpread({}, Sortable.utils, plugin.utils);\n    PluginManager.mount(plugin);\n  });\n};\n/**\n * Create sortable instance\n * @param {HTMLElement}  el\n * @param {Object}      [options]\n */\n\n\nSortable.create = function (el, options) {\n  return new Sortable(el, options);\n}; // Export\n\n\nSortable.version = version;\n\nvar autoScrolls = [],\n    scrollEl,\n    scrollRootEl,\n    scrolling = false,\n    lastAutoScrollX,\n    lastAutoScrollY,\n    touchEvt$1,\n    pointerElemChangedInterval;\n\nfunction AutoScrollPlugin() {\n  function AutoScroll() {\n    this.defaults = {\n      scroll: true,\n      scrollSensitivity: 30,\n      scrollSpeed: 10,\n      bubbleScroll: true\n    }; // Bind all private methods\n\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n  }\n\n  AutoScroll.prototype = {\n    dragStarted: function dragStarted(_ref) {\n      var originalEvent = _ref.originalEvent;\n\n      if (this.sortable.nativeDraggable) {\n        on(document, 'dragover', this._handleAutoScroll);\n      } else {\n        if (this.options.supportPointer) {\n          on(document, 'pointermove', this._handleFallbackAutoScroll);\n        } else if (originalEvent.touches) {\n          on(document, 'touchmove', this._handleFallbackAutoScroll);\n        } else {\n          on(document, 'mousemove', this._handleFallbackAutoScroll);\n        }\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref2) {\n      var originalEvent = _ref2.originalEvent;\n\n      // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)\n      if (!this.options.dragOverBubble && !originalEvent.rootEl) {\n        this._handleAutoScroll(originalEvent);\n      }\n    },\n    drop: function drop() {\n      if (this.sortable.nativeDraggable) {\n        off(document, 'dragover', this._handleAutoScroll);\n      } else {\n        off(document, 'pointermove', this._handleFallbackAutoScroll);\n        off(document, 'touchmove', this._handleFallbackAutoScroll);\n        off(document, 'mousemove', this._handleFallbackAutoScroll);\n      }\n\n      clearPointerElemChangedInterval();\n      clearAutoScrolls();\n      cancelThrottle();\n    },\n    nulling: function nulling() {\n      touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;\n      autoScrolls.length = 0;\n    },\n    _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {\n      this._handleAutoScroll(evt, true);\n    },\n    _handleAutoScroll: function _handleAutoScroll(evt, fallback) {\n      var _this = this;\n\n      var x = (evt.touches ? evt.touches[0] : evt).clientX,\n          y = (evt.touches ? evt.touches[0] : evt).clientY,\n          elem = document.elementFromPoint(x, y);\n      touchEvt$1 = evt; // IE does not seem to have native autoscroll,\n      // Edge's autoscroll seems too conditional,\n      // MACOS Safari does not have autoscroll,\n      // Firefox and Chrome are good\n\n      if (fallback || Edge || IE11OrLess || Safari) {\n        autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change\n\n        var ogElemScroller = getParentAutoScrollElement(elem, true);\n\n        if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {\n          pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour\n\n          pointerElemChangedInterval = setInterval(function () {\n            var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);\n\n            if (newElem !== ogElemScroller) {\n              ogElemScroller = newElem;\n              clearAutoScrolls();\n            }\n\n            autoScroll(evt, _this.options, newElem, fallback);\n          }, 10);\n          lastAutoScrollX = x;\n          lastAutoScrollY = y;\n        }\n      } else {\n        // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll\n        if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {\n          clearAutoScrolls();\n          return;\n        }\n\n        autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);\n      }\n    }\n  };\n  return _extends(AutoScroll, {\n    pluginName: 'scroll',\n    initializeByDefault: true\n  });\n}\n\nfunction clearAutoScrolls() {\n  autoScrolls.forEach(function (autoScroll) {\n    clearInterval(autoScroll.pid);\n  });\n  autoScrolls = [];\n}\n\nfunction clearPointerElemChangedInterval() {\n  clearInterval(pointerElemChangedInterval);\n}\n\nvar autoScroll = throttle(function (evt, options, rootEl, isFallback) {\n  // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521\n  if (!options.scroll) return;\n  var x = (evt.touches ? evt.touches[0] : evt).clientX,\n      y = (evt.touches ? evt.touches[0] : evt).clientY,\n      sens = options.scrollSensitivity,\n      speed = options.scrollSpeed,\n      winScroller = getWindowScrollingElement();\n  var scrollThisInstance = false,\n      scrollCustomFn; // New scroll root, set scrollEl\n\n  if (scrollRootEl !== rootEl) {\n    scrollRootEl = rootEl;\n    clearAutoScrolls();\n    scrollEl = options.scroll;\n    scrollCustomFn = options.scrollFn;\n\n    if (scrollEl === true) {\n      scrollEl = getParentAutoScrollElement(rootEl, true);\n    }\n  }\n\n  var layersOut = 0;\n  var currentParent = scrollEl;\n\n  do {\n    var el = currentParent,\n        rect = getRect(el),\n        top = rect.top,\n        bottom = rect.bottom,\n        left = rect.left,\n        right = rect.right,\n        width = rect.width,\n        height = rect.height,\n        canScrollX = void 0,\n        canScrollY = void 0,\n        scrollWidth = el.scrollWidth,\n        scrollHeight = el.scrollHeight,\n        elCSS = css(el),\n        scrollPosX = el.scrollLeft,\n        scrollPosY = el.scrollTop;\n\n    if (el === winScroller) {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');\n    } else {\n      canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');\n      canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');\n    }\n\n    var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);\n    var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);\n\n    if (!autoScrolls[layersOut]) {\n      for (var i = 0; i <= layersOut; i++) {\n        if (!autoScrolls[i]) {\n          autoScrolls[i] = {};\n        }\n      }\n    }\n\n    if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {\n      autoScrolls[layersOut].el = el;\n      autoScrolls[layersOut].vx = vx;\n      autoScrolls[layersOut].vy = vy;\n      clearInterval(autoScrolls[layersOut].pid);\n\n      if (vx != 0 || vy != 0) {\n        scrollThisInstance = true;\n        /* jshint loopfunc:true */\n\n        autoScrolls[layersOut].pid = setInterval(function () {\n          // emulate drag over during autoscroll (fallback), emulating native DnD behaviour\n          if (isFallback && this.layer === 0) {\n            Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely\n\n          }\n\n          var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;\n          var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;\n\n          if (typeof scrollCustomFn === 'function') {\n            if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {\n              return;\n            }\n          }\n\n          scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);\n        }.bind({\n          layer: layersOut\n        }), 24);\n      }\n    }\n\n    layersOut++;\n  } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));\n\n  scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not\n}, 30);\n\nvar drop = function drop(_ref) {\n  var originalEvent = _ref.originalEvent,\n      putSortable = _ref.putSortable,\n      dragEl = _ref.dragEl,\n      activeSortable = _ref.activeSortable,\n      dispatchSortableEvent = _ref.dispatchSortableEvent,\n      hideGhostForTarget = _ref.hideGhostForTarget,\n      unhideGhostForTarget = _ref.unhideGhostForTarget;\n  if (!originalEvent) return;\n  var toSortable = putSortable || activeSortable;\n  hideGhostForTarget();\n  var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;\n  var target = document.elementFromPoint(touch.clientX, touch.clientY);\n  unhideGhostForTarget();\n\n  if (toSortable && !toSortable.el.contains(target)) {\n    dispatchSortableEvent('spill');\n    this.onSpill({\n      dragEl: dragEl,\n      putSortable: putSortable\n    });\n  }\n};\n\nfunction Revert() {}\n\nRevert.prototype = {\n  startIndex: null,\n  dragStart: function dragStart(_ref2) {\n    var oldDraggableIndex = _ref2.oldDraggableIndex;\n    this.startIndex = oldDraggableIndex;\n  },\n  onSpill: function onSpill(_ref3) {\n    var dragEl = _ref3.dragEl,\n        putSortable = _ref3.putSortable;\n    this.sortable.captureAnimationState();\n\n    if (putSortable) {\n      putSortable.captureAnimationState();\n    }\n\n    var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);\n\n    if (nextSibling) {\n      this.sortable.el.insertBefore(dragEl, nextSibling);\n    } else {\n      this.sortable.el.appendChild(dragEl);\n    }\n\n    this.sortable.animateAll();\n\n    if (putSortable) {\n      putSortable.animateAll();\n    }\n  },\n  drop: drop\n};\n\n_extends(Revert, {\n  pluginName: 'revertOnSpill'\n});\n\nfunction Remove() {}\n\nRemove.prototype = {\n  onSpill: function onSpill(_ref4) {\n    var dragEl = _ref4.dragEl,\n        putSortable = _ref4.putSortable;\n    var parentSortable = putSortable || this.sortable;\n    parentSortable.captureAnimationState();\n    dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);\n    parentSortable.animateAll();\n  },\n  drop: drop\n};\n\n_extends(Remove, {\n  pluginName: 'removeOnSpill'\n});\n\nvar lastSwapEl;\n\nfunction SwapPlugin() {\n  function Swap() {\n    this.defaults = {\n      swapClass: 'sortable-swap-highlight'\n    };\n  }\n\n  Swap.prototype = {\n    dragStart: function dragStart(_ref) {\n      var dragEl = _ref.dragEl;\n      lastSwapEl = dragEl;\n    },\n    dragOverValid: function dragOverValid(_ref2) {\n      var completed = _ref2.completed,\n          target = _ref2.target,\n          onMove = _ref2.onMove,\n          activeSortable = _ref2.activeSortable,\n          changed = _ref2.changed,\n          cancel = _ref2.cancel;\n      if (!activeSortable.options.swap) return;\n      var el = this.sortable.el,\n          options = this.options;\n\n      if (target && target !== el) {\n        var prevSwapEl = lastSwapEl;\n\n        if (onMove(target) !== false) {\n          toggleClass(target, options.swapClass, true);\n          lastSwapEl = target;\n        } else {\n          lastSwapEl = null;\n        }\n\n        if (prevSwapEl && prevSwapEl !== lastSwapEl) {\n          toggleClass(prevSwapEl, options.swapClass, false);\n        }\n      }\n\n      changed();\n      completed(true);\n      cancel();\n    },\n    drop: function drop(_ref3) {\n      var activeSortable = _ref3.activeSortable,\n          putSortable = _ref3.putSortable,\n          dragEl = _ref3.dragEl;\n      var toSortable = putSortable || this.sortable;\n      var options = this.options;\n      lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);\n\n      if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {\n        if (dragEl !== lastSwapEl) {\n          toSortable.captureAnimationState();\n          if (toSortable !== activeSortable) activeSortable.captureAnimationState();\n          swapNodes(dragEl, lastSwapEl);\n          toSortable.animateAll();\n          if (toSortable !== activeSortable) activeSortable.animateAll();\n        }\n      }\n    },\n    nulling: function nulling() {\n      lastSwapEl = null;\n    }\n  };\n  return _extends(Swap, {\n    pluginName: 'swap',\n    eventProperties: function eventProperties() {\n      return {\n        swapItem: lastSwapEl\n      };\n    }\n  });\n}\n\nfunction swapNodes(n1, n2) {\n  var p1 = n1.parentNode,\n      p2 = n2.parentNode,\n      i1,\n      i2;\n  if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;\n  i1 = index(n1);\n  i2 = index(n2);\n\n  if (p1.isEqualNode(p2) && i1 < i2) {\n    i2++;\n  }\n\n  p1.insertBefore(n2, p1.children[i1]);\n  p2.insertBefore(n1, p2.children[i2]);\n}\n\nvar multiDragElements = [],\n    multiDragClones = [],\n    lastMultiDragSelect,\n    // for selection with modifier key down (SHIFT)\nmultiDragSortable,\n    initialFolding = false,\n    // Initial multi-drag fold when drag started\nfolding = false,\n    // Folding any other time\ndragStarted = false,\n    dragEl$1,\n    clonesFromRect,\n    clonesHidden;\n\nfunction MultiDragPlugin() {\n  function MultiDrag(sortable) {\n    // Bind all private methods\n    for (var fn in this) {\n      if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {\n        this[fn] = this[fn].bind(this);\n      }\n    }\n\n    if (sortable.options.supportPointer) {\n      on(document, 'pointerup', this._deselectMultiDrag);\n    } else {\n      on(document, 'mouseup', this._deselectMultiDrag);\n      on(document, 'touchend', this._deselectMultiDrag);\n    }\n\n    on(document, 'keydown', this._checkKeyDown);\n    on(document, 'keyup', this._checkKeyUp);\n    this.defaults = {\n      selectedClass: 'sortable-selected',\n      multiDragKey: null,\n      setData: function setData(dataTransfer, dragEl) {\n        var data = '';\n\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          multiDragElements.forEach(function (multiDragElement, i) {\n            data += (!i ? '' : ', ') + multiDragElement.textContent;\n          });\n        } else {\n          data = dragEl.textContent;\n        }\n\n        dataTransfer.setData('Text', data);\n      }\n    };\n  }\n\n  MultiDrag.prototype = {\n    multiDragKeyDown: false,\n    isMultiDrag: false,\n    delayStartGlobal: function delayStartGlobal(_ref) {\n      var dragged = _ref.dragEl;\n      dragEl$1 = dragged;\n    },\n    delayEnded: function delayEnded() {\n      this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);\n    },\n    setupClone: function setupClone(_ref2) {\n      var sortable = _ref2.sortable,\n          cancel = _ref2.cancel;\n      if (!this.isMultiDrag) return;\n\n      for (var i = 0; i < multiDragElements.length; i++) {\n        multiDragClones.push(clone(multiDragElements[i]));\n        multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;\n        multiDragClones[i].draggable = false;\n        multiDragClones[i].style['will-change'] = '';\n        toggleClass(multiDragClones[i], this.options.selectedClass, false);\n        multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);\n      }\n\n      sortable._hideClone();\n\n      cancel();\n    },\n    clone: function clone(_ref3) {\n      var sortable = _ref3.sortable,\n          rootEl = _ref3.rootEl,\n          dispatchSortableEvent = _ref3.dispatchSortableEvent,\n          cancel = _ref3.cancel;\n      if (!this.isMultiDrag) return;\n\n      if (!this.options.removeCloneOnHide) {\n        if (multiDragElements.length && multiDragSortable === sortable) {\n          insertMultiDragClones(true, rootEl);\n          dispatchSortableEvent('clone');\n          cancel();\n        }\n      }\n    },\n    showClone: function showClone(_ref4) {\n      var cloneNowShown = _ref4.cloneNowShown,\n          rootEl = _ref4.rootEl,\n          cancel = _ref4.cancel;\n      if (!this.isMultiDrag) return;\n      insertMultiDragClones(false, rootEl);\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', '');\n      });\n      cloneNowShown();\n      clonesHidden = false;\n      cancel();\n    },\n    hideClone: function hideClone(_ref5) {\n      var _this = this;\n\n      var sortable = _ref5.sortable,\n          cloneNowHidden = _ref5.cloneNowHidden,\n          cancel = _ref5.cancel;\n      if (!this.isMultiDrag) return;\n      multiDragClones.forEach(function (clone) {\n        css(clone, 'display', 'none');\n\n        if (_this.options.removeCloneOnHide && clone.parentNode) {\n          clone.parentNode.removeChild(clone);\n        }\n      });\n      cloneNowHidden();\n      clonesHidden = true;\n      cancel();\n    },\n    dragStartGlobal: function dragStartGlobal(_ref6) {\n      var sortable = _ref6.sortable;\n\n      if (!this.isMultiDrag && multiDragSortable) {\n        multiDragSortable.multiDrag._deselectMultiDrag();\n      }\n\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.sortableIndex = index(multiDragElement);\n      }); // Sort multi-drag elements\n\n      multiDragElements = multiDragElements.sort(function (a, b) {\n        return a.sortableIndex - b.sortableIndex;\n      });\n      dragStarted = true;\n    },\n    dragStarted: function dragStarted(_ref7) {\n      var _this2 = this;\n\n      var sortable = _ref7.sortable;\n      if (!this.isMultiDrag) return;\n\n      if (this.options.sort) {\n        // Capture rects,\n        // hide multi drag elements (by positioning them absolute),\n        // set multi drag elements rects to dragRect,\n        // show multi drag elements,\n        // animate to rects,\n        // unset rects & remove from DOM\n        sortable.captureAnimationState();\n\n        if (this.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            css(multiDragElement, 'position', 'absolute');\n          });\n          var dragRect = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRect);\n          });\n          folding = true;\n          initialFolding = true;\n        }\n      }\n\n      sortable.animateAll(function () {\n        folding = false;\n        initialFolding = false;\n\n        if (_this2.options.animation) {\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n        } // Remove all auxiliary multidrag items from el, if sorting enabled\n\n\n        if (_this2.options.sort) {\n          removeMultiDragElements();\n        }\n      });\n    },\n    dragOver: function dragOver(_ref8) {\n      var target = _ref8.target,\n          completed = _ref8.completed,\n          cancel = _ref8.cancel;\n\n      if (folding && ~multiDragElements.indexOf(target)) {\n        completed(false);\n        cancel();\n      }\n    },\n    revert: function revert(_ref9) {\n      var fromSortable = _ref9.fromSortable,\n          rootEl = _ref9.rootEl,\n          sortable = _ref9.sortable,\n          dragRect = _ref9.dragRect;\n\n      if (multiDragElements.length > 1) {\n        // Setup unfold animation\n        multiDragElements.forEach(function (multiDragElement) {\n          sortable.addAnimationState({\n            target: multiDragElement,\n            rect: folding ? getRect(multiDragElement) : dragRect\n          });\n          unsetRect(multiDragElement);\n          multiDragElement.fromRect = dragRect;\n          fromSortable.removeAnimationState(multiDragElement);\n        });\n        folding = false;\n        insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);\n      }\n    },\n    dragOverCompleted: function dragOverCompleted(_ref10) {\n      var sortable = _ref10.sortable,\n          isOwner = _ref10.isOwner,\n          insertion = _ref10.insertion,\n          activeSortable = _ref10.activeSortable,\n          parentEl = _ref10.parentEl,\n          putSortable = _ref10.putSortable;\n      var options = this.options;\n\n      if (insertion) {\n        // Clones must be hidden before folding animation to capture dragRectAbsolute properly\n        if (isOwner) {\n          activeSortable._hideClone();\n        }\n\n        initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location\n\n        if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {\n          // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible\n          var dragRectAbsolute = getRect(dragEl$1, false, true, true);\n          multiDragElements.forEach(function (multiDragElement) {\n            if (multiDragElement === dragEl$1) return;\n            setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted\n            // while folding, and so that we can capture them again because old sortable will no longer be fromSortable\n\n            parentEl.appendChild(multiDragElement);\n          });\n          folding = true;\n        } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out\n\n\n        if (!isOwner) {\n          // Only remove if not folding (folding will remove them anyways)\n          if (!folding) {\n            removeMultiDragElements();\n          }\n\n          if (multiDragElements.length > 1) {\n            var clonesHiddenBefore = clonesHidden;\n\n            activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden\n\n\n            if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {\n              multiDragClones.forEach(function (clone) {\n                activeSortable.addAnimationState({\n                  target: clone,\n                  rect: clonesFromRect\n                });\n                clone.fromRect = clonesFromRect;\n                clone.thisAnimationDuration = null;\n              });\n            }\n          } else {\n            activeSortable._showClone(sortable);\n          }\n        }\n      }\n    },\n    dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {\n      var dragRect = _ref11.dragRect,\n          isOwner = _ref11.isOwner,\n          activeSortable = _ref11.activeSortable;\n      multiDragElements.forEach(function (multiDragElement) {\n        multiDragElement.thisAnimationDuration = null;\n      });\n\n      if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {\n        clonesFromRect = _extends({}, dragRect);\n        var dragMatrix = matrix(dragEl$1, true);\n        clonesFromRect.top -= dragMatrix.f;\n        clonesFromRect.left -= dragMatrix.e;\n      }\n    },\n    dragOverAnimationComplete: function dragOverAnimationComplete() {\n      if (folding) {\n        folding = false;\n        removeMultiDragElements();\n      }\n    },\n    drop: function drop(_ref12) {\n      var evt = _ref12.originalEvent,\n          rootEl = _ref12.rootEl,\n          parentEl = _ref12.parentEl,\n          sortable = _ref12.sortable,\n          dispatchSortableEvent = _ref12.dispatchSortableEvent,\n          oldIndex = _ref12.oldIndex,\n          putSortable = _ref12.putSortable;\n      var toSortable = putSortable || this.sortable;\n      if (!evt) return;\n      var options = this.options,\n          children = parentEl.children; // Multi-drag selection\n\n      if (!dragStarted) {\n        if (options.multiDragKey && !this.multiDragKeyDown) {\n          this._deselectMultiDrag();\n        }\n\n        toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));\n\n        if (!~multiDragElements.indexOf(dragEl$1)) {\n          multiDragElements.push(dragEl$1);\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'select',\n            targetEl: dragEl$1,\n            originalEvt: evt\n          }); // Modifier activated, select from last to dragEl\n\n          if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {\n            var lastIndex = index(lastMultiDragSelect),\n                currentIndex = index(dragEl$1);\n\n            if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {\n              // Must include lastMultiDragSelect (select it), in case modified selection from no selection\n              // (but previous selection existed)\n              var n, i;\n\n              if (currentIndex > lastIndex) {\n                i = lastIndex;\n                n = currentIndex;\n              } else {\n                i = currentIndex;\n                n = lastIndex + 1;\n              }\n\n              for (; i < n; i++) {\n                if (~multiDragElements.indexOf(children[i])) continue;\n                toggleClass(children[i], options.selectedClass, true);\n                multiDragElements.push(children[i]);\n                dispatchEvent({\n                  sortable: sortable,\n                  rootEl: rootEl,\n                  name: 'select',\n                  targetEl: children[i],\n                  originalEvt: evt\n                });\n              }\n            }\n          } else {\n            lastMultiDragSelect = dragEl$1;\n          }\n\n          multiDragSortable = toSortable;\n        } else {\n          multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);\n          lastMultiDragSelect = null;\n          dispatchEvent({\n            sortable: sortable,\n            rootEl: rootEl,\n            name: 'deselect',\n            targetEl: dragEl$1,\n            originalEvt: evt\n          });\n        }\n      } // Multi-drag drop\n\n\n      if (dragStarted && this.isMultiDrag) {\n        // Do not \"unfold\" after around dragEl if reverted\n        if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {\n          var dragRect = getRect(dragEl$1),\n              multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')');\n          if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;\n          toSortable.captureAnimationState();\n\n          if (!initialFolding) {\n            if (options.animation) {\n              dragEl$1.fromRect = dragRect;\n              multiDragElements.forEach(function (multiDragElement) {\n                multiDragElement.thisAnimationDuration = null;\n\n                if (multiDragElement !== dragEl$1) {\n                  var rect = folding ? getRect(multiDragElement) : dragRect;\n                  multiDragElement.fromRect = rect; // Prepare unfold animation\n\n                  toSortable.addAnimationState({\n                    target: multiDragElement,\n                    rect: rect\n                  });\n                }\n              });\n            } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert\n            // properly they must all be removed\n\n\n            removeMultiDragElements();\n            multiDragElements.forEach(function (multiDragElement) {\n              if (children[multiDragIndex]) {\n                parentEl.insertBefore(multiDragElement, children[multiDragIndex]);\n              } else {\n                parentEl.appendChild(multiDragElement);\n              }\n\n              multiDragIndex++;\n            }); // If initial folding is done, the elements may have changed position because they are now\n            // unfolding around dragEl, even though dragEl may not have his index changed, so update event\n            // must be fired here as Sortable will not.\n\n            if (oldIndex === index(dragEl$1)) {\n              var update = false;\n              multiDragElements.forEach(function (multiDragElement) {\n                if (multiDragElement.sortableIndex !== index(multiDragElement)) {\n                  update = true;\n                  return;\n                }\n              });\n\n              if (update) {\n                dispatchSortableEvent('update');\n              }\n            }\n          } // Must be done after capturing individual rects (scroll bar)\n\n\n          multiDragElements.forEach(function (multiDragElement) {\n            unsetRect(multiDragElement);\n          });\n          toSortable.animateAll();\n        }\n\n        multiDragSortable = toSortable;\n      } // Remove clones if necessary\n\n\n      if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {\n        multiDragClones.forEach(function (clone) {\n          clone.parentNode && clone.parentNode.removeChild(clone);\n        });\n      }\n    },\n    nullingGlobal: function nullingGlobal() {\n      this.isMultiDrag = dragStarted = false;\n      multiDragClones.length = 0;\n    },\n    destroyGlobal: function destroyGlobal() {\n      this._deselectMultiDrag();\n\n      off(document, 'pointerup', this._deselectMultiDrag);\n      off(document, 'mouseup', this._deselectMultiDrag);\n      off(document, 'touchend', this._deselectMultiDrag);\n      off(document, 'keydown', this._checkKeyDown);\n      off(document, 'keyup', this._checkKeyUp);\n    },\n    _deselectMultiDrag: function _deselectMultiDrag(evt) {\n      if (typeof dragStarted !== \"undefined\" && dragStarted) return; // Only deselect if selection is in this sortable\n\n      if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable\n\n      if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click\n\n      if (evt && evt.button !== 0) return;\n\n      while (multiDragElements.length) {\n        var el = multiDragElements[0];\n        toggleClass(el, this.options.selectedClass, false);\n        multiDragElements.shift();\n        dispatchEvent({\n          sortable: this.sortable,\n          rootEl: this.sortable.el,\n          name: 'deselect',\n          targetEl: el,\n          originalEvt: evt\n        });\n      }\n    },\n    _checkKeyDown: function _checkKeyDown(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = true;\n      }\n    },\n    _checkKeyUp: function _checkKeyUp(evt) {\n      if (evt.key === this.options.multiDragKey) {\n        this.multiDragKeyDown = false;\n      }\n    }\n  };\n  return _extends(MultiDrag, {\n    // Static methods & properties\n    pluginName: 'multiDrag',\n    utils: {\n      /**\r\n       * Selects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be selected\r\n       */\n      select: function select(el) {\n        var sortable = el.parentNode[expando];\n        if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;\n\n        if (multiDragSortable && multiDragSortable !== sortable) {\n          multiDragSortable.multiDrag._deselectMultiDrag();\n\n          multiDragSortable = sortable;\n        }\n\n        toggleClass(el, sortable.options.selectedClass, true);\n        multiDragElements.push(el);\n      },\n\n      /**\r\n       * Deselects the provided multi-drag item\r\n       * @param  {HTMLElement} el    The element to be deselected\r\n       */\n      deselect: function deselect(el) {\n        var sortable = el.parentNode[expando],\n            index = multiDragElements.indexOf(el);\n        if (!sortable || !sortable.options.multiDrag || !~index) return;\n        toggleClass(el, sortable.options.selectedClass, false);\n        multiDragElements.splice(index, 1);\n      }\n    },\n    eventProperties: function eventProperties() {\n      var _this3 = this;\n\n      var oldIndicies = [],\n          newIndicies = [];\n      multiDragElements.forEach(function (multiDragElement) {\n        oldIndicies.push({\n          multiDragElement: multiDragElement,\n          index: multiDragElement.sortableIndex\n        }); // multiDragElements will already be sorted if folding\n\n        var newIndex;\n\n        if (folding && multiDragElement !== dragEl$1) {\n          newIndex = -1;\n        } else if (folding) {\n          newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');\n        } else {\n          newIndex = index(multiDragElement);\n        }\n\n        newIndicies.push({\n          multiDragElement: multiDragElement,\n          index: newIndex\n        });\n      });\n      return {\n        items: _toConsumableArray(multiDragElements),\n        clones: [].concat(multiDragClones),\n        oldIndicies: oldIndicies,\n        newIndicies: newIndicies\n      };\n    },\n    optionListeners: {\n      multiDragKey: function multiDragKey(key) {\n        key = key.toLowerCase();\n\n        if (key === 'ctrl') {\n          key = 'Control';\n        } else if (key.length > 1) {\n          key = key.charAt(0).toUpperCase() + key.substr(1);\n        }\n\n        return key;\n      }\n    }\n  });\n}\n\nfunction insertMultiDragElements(clonesInserted, rootEl) {\n  multiDragElements.forEach(function (multiDragElement, i) {\n    var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];\n\n    if (target) {\n      rootEl.insertBefore(multiDragElement, target);\n    } else {\n      rootEl.appendChild(multiDragElement);\n    }\n  });\n}\n/**\r\n * Insert multi-drag clones\r\n * @param  {[Boolean]} elementsInserted  Whether the multi-drag elements are inserted\r\n * @param  {HTMLElement} rootEl\r\n */\n\n\nfunction insertMultiDragClones(elementsInserted, rootEl) {\n  multiDragClones.forEach(function (clone, i) {\n    var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];\n\n    if (target) {\n      rootEl.insertBefore(clone, target);\n    } else {\n      rootEl.appendChild(clone);\n    }\n  });\n}\n\nfunction removeMultiDragElements() {\n  multiDragElements.forEach(function (multiDragElement) {\n    if (multiDragElement === dragEl$1) return;\n    multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);\n  });\n}\n\nSortable.mount(new AutoScrollPlugin());\nSortable.mount(Remove, Revert);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Sortable);\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 182656 characters]\n//# sourceURL=webpack-internal:///./node_modules/sortablejs/modular/sortable.esm.js\n");

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vKHdlYnBhY2spL2J1aWxkaW4vZ2xvYmFsLmpzP2NkMDAiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsQ0FBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQSxDQUFDO0FBQ0Q7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSw0Q0FBNEM7O0FBRTVDIiwiZmlsZSI6Ii4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcblxuLy8gVGhpcyB3b3JrcyBpbiBub24tc3RyaWN0IG1vZGVcbmcgPSAoZnVuY3Rpb24oKSB7XG5cdHJldHVybiB0aGlzO1xufSkoKTtcblxudHJ5IHtcblx0Ly8gVGhpcyB3b3JrcyBpZiBldmFsIGlzIGFsbG93ZWQgKHNlZSBDU1ApXG5cdGcgPSBnIHx8IG5ldyBGdW5jdGlvbihcInJldHVybiB0aGlzXCIpKCk7XG59IGNhdGNoIChlKSB7XG5cdC8vIFRoaXMgd29ya3MgaWYgdGhlIHdpbmRvdyByZWZlcmVuY2UgaXMgYXZhaWxhYmxlXG5cdGlmICh0eXBlb2Ygd2luZG93ID09PSBcIm9iamVjdFwiKSBnID0gd2luZG93O1xufVxuXG4vLyBnIGNhbiBzdGlsbCBiZSB1bmRlZmluZWQsIGJ1dCBub3RoaW5nIHRvIGRvIGFib3V0IGl0Li4uXG4vLyBXZSByZXR1cm4gdW5kZWZpbmVkLCBpbnN0ZWFkIG9mIG5vdGhpbmcgaGVyZSwgc28gaXQnc1xuLy8gZWFzaWVyIHRvIGhhbmRsZSB0aGlzIGNhc2UuIGlmKCFnbG9iYWwpIHsgLi4ufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGc7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/webpack/buildin/global.js\n");

/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vKHdlYnBhY2spL2J1aWxkaW4vbW9kdWxlLmpzP2NlZDIiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9tb2R1bGUuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKG1vZHVsZSkge1xuXHRpZiAoIW1vZHVsZS53ZWJwYWNrUG9seWZpbGwpIHtcblx0XHRtb2R1bGUuZGVwcmVjYXRlID0gZnVuY3Rpb24oKSB7fTtcblx0XHRtb2R1bGUucGF0aHMgPSBbXTtcblx0XHQvLyBtb2R1bGUucGFyZW50ID0gdW5kZWZpbmVkIGJ5IGRlZmF1bHRcblx0XHRpZiAoIW1vZHVsZS5jaGlsZHJlbikgbW9kdWxlLmNoaWxkcmVuID0gW107XG5cdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KG1vZHVsZSwgXCJsb2FkZWRcIiwge1xuXHRcdFx0ZW51bWVyYWJsZTogdHJ1ZSxcblx0XHRcdGdldDogZnVuY3Rpb24oKSB7XG5cdFx0XHRcdHJldHVybiBtb2R1bGUubDtcblx0XHRcdH1cblx0XHR9KTtcblx0XHRPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kdWxlLCBcImlkXCIsIHtcblx0XHRcdGVudW1lcmFibGU6IHRydWUsXG5cdFx0XHRnZXQ6IGZ1bmN0aW9uKCkge1xuXHRcdFx0XHRyZXR1cm4gbW9kdWxlLmk7XG5cdFx0XHR9XG5cdFx0fSk7XG5cdFx0bW9kdWxlLndlYnBhY2tQb2x5ZmlsbCA9IDE7XG5cdH1cblx0cmV0dXJuIG1vZHVsZTtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/webpack/buildin/module.js\n");

/***/ })

}]);