text: (window.webpackJsonp=window.webpackJsonp||[]).push([["admin_calendar_form"],{"2B1R":function(e,t,n){"use strict";var i=n("I+eb"),o=n("tycR").map,r=n("Hd5f"),a=n("rkAj"),l=r("map"),s=a("map");i({target:"Array",proto:!0,forced:!l||!s},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},Hd5f:function(e,t,n){var i=n("0Dky"),o=n("tiKp"),r=n("LQDL"),a=o("species");e.exports=function(e){return r>=51||!i((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},KwMv:function(e,t,n){"use strict";n.r(t);n("ma9I"),n("TeQF"),n("fbCW"),n("oVuX"),n("2B1R"),n("eoL8");var i=n("EVdn"),o=n.n(i),r=n("eeMe"),a=n.n(r),l=n("qkdH");n("e8E5");function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}a.a.autoDiscover=!1,o()(document).ready((function(){!function(e){var t=document.querySelector(".js-reference-dropzone");if(!t)return;new a.a(t,{paramName:"file_reference",init:function(){this.on("success",(function(t,n){e.addReference(n)})),this.on("error",(function(e,t){t.detail&&this.emit("error",e,t.detail)}))}})}(new u(o()(".js-reference-list")));var e=o()(".js-article-form-location"),t=o()(".js-specific-location-target");e.on("change",(function(n){o.a.ajax({url:e.data("specific-location-url"),data:{location:e.val()},success:function(e){if(!e)return t.find("select").remove(),void t.addClass("d-none");t.html(e).removeClass("d-none")}})}))}));var u=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$element=t,this.sortable=l.a.create(this.$element[0],{handle:".drag-handle",animation:150,onEnd:function(){o.a.ajax({url:n.$element.data("url")+"/reorder",method:"POST",data:JSON.stringify(n.sortable.toArray())})}}),this.references=[],this.render(),this.$element.on("click",".js-reference-delete",(function(e){n.handleReferenceDelete(e)})),this.$element.on("blur",".js-edit-filename",(function(e){n.handleReferenceEditFilename(e)})),o.a.ajax({url:this.$element.data("url")}).then((function(e){n.references=e,n.render()}))}var t,n,i;return t=e,(n=[{key:"addReference",value:function(e){this.references.push(e),this.render()}},{key:"handleReferenceDelete",value:function(e){var t=this,n=o()(e.currentTarget).closest(".list-group-item"),i=n.data("id");n.addClass("disabled"),o.a.ajax({url:"/admin/calendar/days_pdf/"+i,method:"DELETE"}).then((function(){t.references=t.references.filter((function(e){return e.id!==i})),t.render()}))}},{key:"handleReferenceEditFilename",value:function(e){var t=o()(e.currentTarget).closest(".list-group-item").data("id"),n=this.references.find((function(e){return e.id===t}));n.originalFilename=o()(e.currentTarget).val(),o.a.ajax({url:"/admin/calendar/days_pdf/"+t,method:"PUT",data:JSON.stringify(n)})}},{key:"render",value:function(){var e=this.references.map((function(e){return'\n<li class="list-group-item d-flex justify-content-between align-items-center" data-id="'.concat(e.id,'">\n    <span class="drag-handle fa fa-reorder"></span>\n    <input type="text" value="').concat(e.originalFilename,'" class="form-control js-edit-filename" style="width: auto;">\n    <span>\n        <a href="/admin/calendar/days_pdf/').concat(e.id,'/download" target="_blank" class="btn btn-link btn-sm"><span class="fa fa-download" style="vertical-align: middle"></span></a>\n        <button class="js-reference-delete btn btn-link btn-sm"><span class="fa fa-trash"></span></button>\n    </span>\n</li>\n')}));this.$element.html(e.join(""))}}])&&s(t.prototype,n),i&&s(t,i),e}()},LQDL:function(e,t,n){var i,o,r=n("2oRo"),a=n("NC/Y"),l=r.process,s=l&&l.versions,u=s&&s.v8;u?o=(i=u.split("."))[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=i[1]),e.exports=o&&+o},"NC/Y":function(e,t,n){var i=n("0GbY");e.exports=i("navigator","userAgent")||""},TeQF:function(e,t,n){"use strict";var i=n("I+eb"),o=n("tycR").filter,r=n("Hd5f"),a=n("rkAj"),l=r("filter"),s=a("filter");i({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},e8E5:function(e,t,n){},eeMe:function(e,t,n){"use strict";(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return r(this,n)}}function r(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw r}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}var f=function(){function e(){c(this,e)}return h(e,[{key:"on",value:function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}},{key:"emit",value:function(e){this._callbacks=this._callbacks||{};var t=this._callbacks[e];if(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var r,a=s(t);try{for(a.s();!(r=a.n()).done;){var l=r.value;l.apply(this,i)}}catch(e){a.e(e)}finally{a.f()}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var i=0;i<n.length;i++){var o=n[i];if(o===t){n.splice(i,1);break}}return this}}]),e}(),p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=o(n);function n(e,i){var o,l,s;if(c(this,n),(o=t.call(this)).element=e,o.version=n.version,o.defaultOptions.previewTemplate=o.defaultOptions.previewTemplate.replace(/\n*/g,""),o.clickableElements=[],o.listeners=[],o.files=[],"string"==typeof o.element&&(o.element=document.querySelector(o.element)),!o.element||null==o.element.nodeType)throw new Error("Invalid dropzone element.");if(o.element.dropzone)throw new Error("Dropzone already attached.");n.instances.push(a(o)),o.element.dropzone=a(o);var u=null!=(s=n.optionsForElement(o.element))?s:{};if(o.options=n.extend({},o.defaultOptions,u,null!=i?i:{}),o.options.forceFallback||!n.isBrowserSupported())return r(o,o.options.fallback.call(a(o)));if(null==o.options.url&&(o.options.url=o.element.getAttribute("action")),!o.options.url)throw new Error("No URL provided.");if(o.options.acceptedFiles&&o.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(o.options.uploadMultiple&&o.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return o.options.acceptedMimeTypes&&(o.options.acceptedFiles=o.options.acceptedMimeTypes,delete o.options.acceptedMimeTypes),null!=o.options.renameFilename&&(o.options.renameFile=function(e){return o.options.renameFilename.call(a(o),e.name,e)}),"string"==typeof o.options.method&&(o.options.method=o.options.method.toUpperCase()),(l=o.getExistingFallback())&&l.parentNode&&l.parentNode.removeChild(l),!1!==o.options.previewsContainer&&(o.options.previewsContainer?o.previewsContainer=n.getElement(o.options.previewsContainer,"previewsContainer"):o.previewsContainer=o.element),o.options.clickable&&(!0===o.options.clickable?o.clickableElements=[o.element]:o.clickableElements=n.getElements(o.options.clickable,"clickable")),o.init(),o}return h(n,null,[{key:"initClass",value:function(){this.prototype.Emitter=f,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"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(e,t,n){if(n)return{dzuuid:n.file.upload.uuid,dzchunkindex:n.index,dztotalfilesize:n.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:n.file.upload.totalChunkCount,dzchunkbyteoffset:n.index*this.options.chunkSize}},accept:function(e,t){return t()},chunksUploaded:function(e,t){t()},fallback:function(){var e;this.element.className="".concat(this.element.className," dz-browser-not-supported");var t,i=s(this.element.getElementsByTagName("div"));try{for(i.s();!(t=i.n()).done;){var o=t.value;if(/(^| )dz-message($| )/.test(o.className)){e=o,o.className="dz-message";break}}}catch(e){i.e(e)}finally{i.f()}e||(e=n.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(e));var r=e.getElementsByTagName("span")[0];return r&&(null!=r.textContent?r.textContent=this.options.dictFallbackMessage:null!=r.innerText&&(r.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,n,i){var o={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},r=e.width/e.height;null==t&&null==n?(t=o.srcWidth,n=o.srcHeight):null==t?t=n*r:null==n&&(n=t/r);var a=(t=Math.min(t,o.srcWidth))/(n=Math.min(n,o.srcHeight));if(o.srcWidth>t||o.srcHeight>n)if("crop"===i)r>a?(o.srcHeight=e.height,o.srcWidth=o.srcHeight*a):(o.srcWidth=e.width,o.srcHeight=o.srcWidth/a);else{if("contain"!==i)throw new Error("Unknown resizeMethod '".concat(i,"'"));r>a?n=t/r:t=n*r}return o.srcX=(e.width-o.srcWidth)/2,o.srcY=(e.height-o.srcHeight)/2,o.trgWidth=t,o.trgHeight=n,o},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},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>',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var t=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=n.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);var i,o=s(e.previewElement.querySelectorAll("[data-dz-name]"));try{for(o.s();!(i=o.n()).done;){var r=i.value;r.textContent=e.name}}catch(e){o.e(e)}finally{o.f()}var a,l=s(e.previewElement.querySelectorAll("[data-dz-size]"));try{for(l.s();!(a=l.n()).done;)(r=a.value).innerHTML=this.filesize(e.size)}catch(e){l.e(e)}finally{l.f()}this.options.addRemoveLinks&&(e._removeLink=n.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),e.previewElement.appendChild(e._removeLink));var u,c=function(i){return i.preventDefault(),i.stopPropagation(),e.status===n.UPLOADING?n.confirm(t.options.dictCancelUploadConfirmation,(function(){return t.removeFile(e)})):t.options.dictRemoveFileConfirmation?n.confirm(t.options.dictRemoveFileConfirmation,(function(){return t.removeFile(e)})):t.removeFile(e)},d=s(e.previewElement.querySelectorAll("[data-dz-remove]"));try{for(d.s();!(u=d.n()).done;){u.value.addEventListener("click",c)}}catch(e){d.e(e)}finally{d.f()}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");var n,i=s(e.previewElement.querySelectorAll("[data-dz-thumbnail]"));try{for(i.s();!(n=i.n()).done;){var o=n.value;o.alt=e.name,o.src=t}}catch(e){i.e(e)}finally{i.f()}return setTimeout((function(){return e.previewElement.classList.add("dz-image-preview")}),1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"string"!=typeof t&&t.error&&(t=t.error);var n,i=s(e.previewElement.querySelectorAll("[data-dz-errormessage]"));try{for(i.s();!(n=i.n()).done;){n.value.textContent=t}}catch(e){i.e(e)}finally{i.f()}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,n){if(e.previewElement){var i,o=s(e.previewElement.querySelectorAll("[data-dz-uploadprogress]"));try{for(o.s();!(i=o.n()).done;){var r=i.value;"PROGRESS"===r.nodeName?r.value=t:r.style.width="".concat(t,"%")}}catch(e){o.e(e)}finally{o.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.innerHTML=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];for(var o=0,r=n;o<r.length;o++){var a=r[o];for(var l in a){var s=a[l];e[l]=s}}return e}}]),h(n,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(e){return e.accepted})).map((function(e){return e}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(e){return!e.accepted})).map((function(e){return e}))}},{key:"getFilesWithStatus",value:function(e){return this.files.filter((function(t){return t.status===e})).map((function(e){return e}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(n.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(n.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(n.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(e){return e.status===n.UPLOADING||e.status===n.QUEUED})).map((function(e){return e}))}},{key:"init",value:function(){var e=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(n.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){!function t(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",n.getElement(e.options.hiddenInputContainer,"hiddenInputContainer").appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",(function(){var n=e.hiddenFileInput.files;if(n.length){var i,o=s(n);try{for(o.s();!(i=o.n()).done;){var r=i.value;e.addFile(r)}}catch(e){o.e(e)}finally{o.f()}}return e.emit("addedfiles",n),t()}))}()}this.URL=null!==window.URL?window.URL:window.webkitURL;var t,i=s(this.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;this.on(o,this.options[o])}}catch(e){i.e(e)}finally{i.f()}this.on("uploadprogress",(function(){return e.updateTotalUploadProgress()})),this.on("removedfile",(function(){return e.updateTotalUploadProgress()})),this.on("canceled",(function(t){return e.emit("complete",t)})),this.on("complete",(function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout((function(){return e.emit("queuecomplete")}),0)}));var r=function(e){if(function(e){if(e.dataTransfer.types)for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"===e.dataTransfer.types[t])return!0;return!1}(e))return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return r(t),e.emit("dragenter",t)},dragover:function(t){var n;try{n=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===n||"linkMove"===n?"move":"copy",r(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return r(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach((function(t){return e.listeners.push({element:t,events:{click:function(i){return(t!==e.element||i.target===e.element||n.elementInside(i.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,n.instances.splice(n.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e,t=0,n=0;if(this.getActiveFiles().length){var i,o=s(this.getActiveFiles());try{for(o.s();!(i=o.n()).done;){var r=i.value;t+=r.upload.bytesSent,n+=r.upload.total}}catch(e){o.e(e)}finally{o.f()}e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(e,"]"):"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,t;if(e=this.getExistingFallback())return e;var i='<div class="dz-fallback">';this.options.dictFallbackText&&(i+="<p>".concat(this.options.dictFallbackText,"</p>")),i+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var o=n.createElement(i);return"FORM"!==this.element.tagName?(t=n.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>'))).appendChild(o):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=t?t:o}},{key:"getExistingFallback",value:function(){for(var e=function(e){var t,n=s(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(/(^| )fallback($| )/.test(i.className))return i}}catch(e){n.e(e)}finally{n.f()}},t=0,n=["div","form"];t<n.length;t++){var i,o=n[t];if(i=e(this.element.getElementsByTagName(o)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var i=e.events[n];t.push(e.element.addEventListener(n,i,!1))}return t}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var n in e.events){var i=e.events[n];t.push(e.element.removeEventListener(n,i,!1))}return t}()}))}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach((function(e){return e.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(t){return e.cancelUpload(t)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(e){return e.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,n="b";if(e>0){for(var i=["tb","gb","mb","kb","b"],o=0;o<i.length;o++){var r=i[o];if(e>=Math.pow(this.options.filesizeBase,4-o)/10){t=e/Math.pow(this.options.filesizeBase,4-o),n=r;break}}t=Math.round(10*t)/10}return"<strong>".concat(t,"</strong> ").concat(this.options.dictFileSizeUnits[n])}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);for(var t=[],n=0;n<e.dataTransfer.files.length;n++)t[n]=e.dataTransfer.files[n];if(t.length){var i=e.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(t)}this.emit("addedfiles",t)}}},{key:"paste",value:function(e){if(null!=(t=null!=e?e.clipboardData:void 0,n=function(e){return e.items},null!=t?n(t):void 0)){var t,n;this.emit("paste",e);var i=e.clipboardData.items;return i.length?this._addFilesFromItems(i):void 0}}},{key:"handleFiles",value:function(e){var t,n=s(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.addFile(i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){var n,i=[],o=s(e);try{for(o.s();!(n=o.n()).done;){var r,a=n.value;null!=a.webkitGetAsEntry&&(r=a.webkitGetAsEntry())?r.isFile?i.push(t.addFile(a.getAsFile())):r.isDirectory?i.push(t._addFilesFromDirectory(r,r.name)):i.push(void 0):null!=a.getAsFile&&(null==a.kind||"file"===a.kind)?i.push(t.addFile(a.getAsFile())):i.push(void 0)}}catch(e){o.e(e)}finally{o.f()}return i}()}},{key:"_addFilesFromDirectory",value:function(e,t){var n=this,i=e.createReader(),o=function(e){return t=console,n="log",i=function(t){return t.log(e)},null!=t&&"function"==typeof t[n]?i(t,n):void 0;var t,n,i};return function e(){return i.readEntries((function(i){if(i.length>0){var o,r=s(i);try{for(r.s();!(o=r.n()).done;){var a=o.value;a.isFile?a.file((function(e){if(!n.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath="".concat(t,"/").concat(e.name),n.addFile(e)})):a.isDirectory&&n._addFilesFromDirectory(a,"".concat(t,"/").concat(a.name))}}catch(e){r.e(e)}finally{r.f()}e()}return null}),o)}()}},{key:"accept",value:function(e,t){this.options.maxFilesize&&e.size>1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var t=this;e.upload={uuid:n.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=n.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(function(n){n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(e){var t,n=s(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.enqueueFile(i)}}catch(e){n.e(e)}finally{n.f()}return null}},{key:"enqueueFile",value:function(e){var t=this;if(e.status!==n.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=n.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return t.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout((function(){return t._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(n){return e.emit("thumbnail",t,n),e._processingThumbnail=!1,e._processThumbnailQueue()}))}}},{key:"removeFile",value:function(e){if(e.status===n.UPLOADING&&this.cancelUpload(e),this.files=v(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);var t,i=s(this.files.slice());try{for(i.s();!(t=i.n()).done;){var o=t.value;(o.status!==n.UPLOADING||e)&&this.removeFile(o)}}catch(e){i.e(e)}finally{i.f()}return null}},{key:"resizeImage",value:function(e,t,i,o,r){var a=this;return this.createThumbnail(e,t,i,o,!0,(function(t,i){if(null==i)return r(e);var o=a.options.resizeMimeType;null==o&&(o=e.type);var l=i.toDataURL(o,a.options.resizeQuality);return"image/jpeg"!==o&&"image/jpg"!==o||(l=y.restore(e.dataURL,l)),r(n.dataURItoBlob(l))}))}},{key:"createThumbnail",value:function(e,t,n,i,o,r){var a=this,l=new FileReader;l.onload=function(){e.dataURL=l.result,"image/svg+xml"!==e.type?a.createThumbnailFromUrl(e,t,n,i,o,r):null!=r&&r(l.result)},l.readAsDataURL(e)}},{key:"displayExistingFile",value:function(e,t,n,i){var o=this,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(this.emit("addedfile",e),this.emit("complete",e),r){var a=function(t){o.emit("thumbnail",e,t),n&&n()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,a,i)}else this.emit("thumbnail",e,t),n&&n()}},{key:"createThumbnailFromUrl",value:function(e,t,n,i,o,r,a){var l=this,s=document.createElement("img");return a&&(s.crossOrigin=a),o="from-image"!=getComputedStyle(document.body).imageOrientation&&o,s.onload=function(){var a=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&o&&(a=function(e){return EXIF.getData(s,(function(){return e(EXIF.getTag(this,"Orientation"))}))}),a((function(o){e.width=s.width,e.height=s.height;var a=l.options.resize.call(l,e,t,n,i),u=document.createElement("canvas"),c=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,o>4&&(u.width=a.trgHeight,u.height=a.trgWidth),o){case 2:c.translate(u.width,0),c.scale(-1,1);break;case 3:c.translate(u.width,u.height),c.rotate(Math.PI);break;case 4:c.translate(0,u.height),c.scale(1,-1);break;case 5:c.rotate(.5*Math.PI),c.scale(1,-1);break;case 6:c.rotate(.5*Math.PI),c.translate(0,-u.width);break;case 7:c.rotate(.5*Math.PI),c.translate(u.height,-u.width),c.scale(-1,1);break;case 8:c.rotate(-.5*Math.PI),c.translate(-u.height,0)}g(c,s,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var d=u.toDataURL("image/png");if(null!=r)return r(d,u)}))},null!=r&&(s.onerror=r),s.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,n=t;if(!(t>=e)){var i=this.getQueuedFiles();if(i.length>0){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-t));for(;n<e;){if(!i.length)return;this.processFile(i.shift()),n++}}}}},{key:"processFile",value:function(e){return this.processFiles([e])}},{key:"processFiles",value:function(e){var t,i=s(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.processing=!0,o.status=n.UPLOADING,this.emit("processing",o)}}catch(e){i.e(e)}finally{i.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter((function(t){return t.xhr===e})).map((function(e){return e}))}},{key:"cancelUpload",value:function(e){if(e.status===n.UPLOADING){var t,i=this._getFilesWithXhr(e.xhr),o=s(i);try{for(o.s();!(t=o.n()).done;){t.value.status=n.CANCELED}}catch(e){o.e(e)}finally{o.f()}void 0!==e.xhr&&e.xhr.abort();var r,a=s(i);try{for(a.s();!(r=a.n()).done;){var l=r.value;this.emit("canceled",l)}}catch(e){a.e(e)}finally{a.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else e.status!==n.ADDED&&e.status!==n.QUEUED||(e.status=n.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.apply(this,n)}return e}},{key:"uploadFile",value:function(e){return this.uploadFiles([e])}},{key:"uploadFiles",value:function(e){var t=this;this._transformFiles(e,(function(i){if(t.options.chunking){var o=i[0];e[0].upload.chunked=t.options.chunking&&(t.options.forceChunking||o.size>t.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(o.size/t.options.chunkSize)}if(e[0].upload.chunked){var r=e[0],a=i[0];r.upload.chunks=[];var l=function(){for(var i=0;void 0!==r.upload.chunks[i];)i++;if(!(i>=r.upload.totalChunkCount)){0;var o=i*t.options.chunkSize,l=Math.min(o+t.options.chunkSize,a.size),s={name:t._getParamName(0),data:a.webkitSlice?a.webkitSlice(o,l):a.slice(o,l),filename:r.upload.filename,chunkIndex:i};r.upload.chunks[i]={file:r,index:i,dataBlock:s,status:n.UPLOADING,progress:0,retries:0},t._uploadData(e,[s])}};if(r.upload.finishedChunkUpload=function(i){var o=!0;i.status=n.SUCCESS,i.dataBlock=null,i.xhr=null;for(var a=0;a<r.upload.totalChunkCount;a++){if(void 0===r.upload.chunks[a])return l();r.upload.chunks[a].status!==n.SUCCESS&&(o=!1)}o&&t.options.chunksUploaded(r,(function(){t._finished(e,"",null)}))},t.options.parallelChunkUploads)for(var s=0;s<r.upload.totalChunkCount;s++)l();else l()}else{for(var u=[],c=0;c<e.length;c++)u[c]={name:t._getParamName(c),data:i[c],filename:e[c].upload.filename};t._uploadData(e,u)}}))}},{key:"_getChunk",value:function(e,t){for(var n=0;n<e.upload.totalChunkCount;n++)if(void 0!==e.upload.chunks[n]&&e.upload.chunks[n].xhr===t)return e.upload.chunks[n]}},{key:"_uploadData",value:function(e,t){var i,o=this,r=new XMLHttpRequest,a=s(e);try{for(a.s();!(i=a.n()).done;){i.value.xhr=r}}catch(e){a.e(e)}finally{a.f()}e[0].upload.chunked&&(e[0].upload.chunks[t[0].chunkIndex].xhr=r);var l=this.resolveOption(this.options.method,e),u=this.resolveOption(this.options.url,e);r.open(l,u,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){o._finishedUploading(e,r,t)},r.ontimeout=function(){o._handleUploadError(e,r,"Request timedout after ".concat(o.options.timeout/1e3," seconds"))},r.onerror=function(){o._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return o._updateFilesUploadProgress(e,r,t)};var c={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var d in this.options.headers&&n.extend(c,this.options.headers),c){var h=c[d];h&&r.setRequestHeader(d,h)}var f=new FormData;if(this.options.params){var p=this.options.params;for(var v in"function"==typeof p&&(p=p.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null)),p){var m=p[v];if(Array.isArray(m))for(var g=0;g<m.length;g++)f.append(v,m[g]);else f.append(v,m)}}var y,b=s(e);try{for(b.s();!(y=b.n()).done;){var w=y.value;this.emit("sending",w,r,f)}}catch(e){b.e(e)}finally{b.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,f),this._addFormElementData(f);for(var E=0;E<t.length;E++){var k=t[E];f.append(k.name,k.data,k.filename)}this.submitRequest(r,f,e)}},{key:"_transformFiles",value:function(e,t){for(var n=this,i=[],o=0,r=function(r){n.options.transformFile.call(n,e[r],(function(n){i[r]=n,++o===e.length&&t(i)}))},a=0;a<e.length;a++)r(a)}},{key:"_addFormElementData",value:function(e){if("FORM"===this.element.tagName){var t,n=s(this.element.querySelectorAll("input, textarea, select, button"));try{for(n.s();!(t=n.n()).done;){var i=t.value,o=i.getAttribute("name"),r=i.getAttribute("type");if(r&&(r=r.toLowerCase()),null!=o)if("SELECT"===i.tagName&&i.hasAttribute("multiple")){var a,l=s(i.options);try{for(l.s();!(a=l.n()).done;){var u=a.value;u.selected&&e.append(o,u.value)}}catch(e){l.e(e)}finally{l.f()}}else(!r||"checkbox"!==r&&"radio"!==r||i.checked)&&e.append(o,i.value)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"_updateFilesUploadProgress",value:function(e,t,n){var i;if(void 0!==n){if(i=100*n.loaded/n.total,e[0].upload.chunked){var o=e[0],r=this._getChunk(o,t);r.progress=i,r.total=n.total,r.bytesSent=n.loaded;o.upload.progress=0,o.upload.total=0,o.upload.bytesSent=0;for(var a=0;a<o.upload.totalChunkCount;a++)void 0!==o.upload.chunks[a]&&void 0!==o.upload.chunks[a].progress&&(o.upload.progress+=o.upload.chunks[a].progress,o.upload.total+=o.upload.chunks[a].total,o.upload.bytesSent+=o.upload.chunks[a].bytesSent);o.upload.progress=o.upload.progress/o.upload.totalChunkCount}else{var l,u=s(e);try{for(u.s();!(l=u.n()).done;){var c=l.value;c.upload.progress=i,c.upload.total=n.total,c.upload.bytesSent=n.loaded}}catch(e){u.e(e)}finally{u.f()}}var d,h=s(e);try{for(h.s();!(d=h.n()).done;){var f=d.value;this.emit("uploadprogress",f,f.upload.progress,f.upload.bytesSent)}}catch(e){h.e(e)}finally{h.f()}}else{var p=!0;i=100;var v,m=s(e);try{for(m.s();!(v=m.n()).done;){var g=v.value;100===g.upload.progress&&g.upload.bytesSent===g.upload.total||(p=!1),g.upload.progress=i,g.upload.bytesSent=g.upload.total}}catch(e){m.e(e)}finally{m.f()}if(p)return;var y,b=s(e);try{for(b.s();!(y=b.n()).done;){var w=y.value;this.emit("uploadprogress",w,i,w.upload.bytesSent)}}catch(e){b.e(e)}finally{b.f()}}}},{key:"_finishedUploading",value:function(e,t,i){var o;if(e[0].status!==n.CANCELED&&4===t.readyState){if("arraybuffer"!==t.responseType&&"blob"!==t.responseType&&(o=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{o=JSON.parse(o)}catch(e){i=e,o="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t)):this._finished(e,o,i):this._handleUploadError(e,t,o)}}},{key:"_handleUploadError",value:function(e,t,i){if(e[0].status!==n.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var o=this._getChunk(e[0],t);if(o.retries++<this.options.retryChunksLimit)return void this._uploadData(e,[o.dataBlock]);console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,i||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}},{key:"submitRequest",value:function(e,t,n){e.send(t)}},{key:"_finished",value:function(e,t,i){var o,r=s(e);try{for(r.s();!(o=r.n()).done;){var a=o.value;a.status=n.SUCCESS,this.emit("success",a,t,i),this.emit("complete",a)}}catch(e){r.e(e)}finally{r.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,t,i){var o,r=s(e);try{for(r.s();!(o=r.n()).done;){var a=o.value;a.status=n.ERROR,this.emit("error",a,t,i),this.emit("complete",a)}}catch(e){r.e(e)}finally{r.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,i),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}}]),n}(f);p.initClass(),p.version="5.7.2",p.options={},p.optionsForElement=function(e){return e.getAttribute("id")?p.options[m(e.getAttribute("id"))]:void 0},p.instances=[],p.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))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.");return e.dropzone},p.autoDiscover=!0,p.discover=function(){var e;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){var n,i=[],o=s(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;/(^| )dropzone($| )/.test(r.className)?i.push(e.push(r)):i.push(void 0)}}catch(e){o.e(e)}finally{o.f()}return i}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){var t,n=[],i=s(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;!1!==p.optionsForElement(o)?n.push(new p(o)):n.push(void 0)}}catch(e){i.e(e)}finally{i.f()}return n}()},p.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],p.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a")){var t,n=s(p.blacklistedBrowsers);try{for(n.s();!(t=n.n()).done;){t.value.test(navigator.userAgent)&&(e=!1)}}catch(e){n.e(e)}finally{n.f()}}else e=!1;else e=!1;return e},p.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],i=new ArrayBuffer(t.length),o=new Uint8Array(i),r=0,a=t.length,l=0<=a;l?r<=a:r>=a;l?r++:r--)o[r]=t.charCodeAt(r);return new Blob([i],{type:n})};var v=function(e,t){return e.filter((function(e){return e!==t})).map((function(e){return e}))},m=function(e){return e.replace(/[\-_](\w)/g,(function(e){return e.charAt(1).toUpperCase()}))};p.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},p.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},p.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector or a plain HTML element."));return n},p.getElements=function(e,t){var n,i;if(e instanceof Array){i=[];try{var o,r=s(e);try{for(r.s();!(o=r.n()).done;)n=o.value,i.push(this.getElement(n,t))}catch(e){r.e(e)}finally{r.f()}}catch(e){i=null}}else if("string"==typeof e){i=[];var a,l=s(document.querySelectorAll(e));try{for(l.s();!(a=l.n()).done;)n=a.value,i.push(n)}catch(e){l.e(e)}finally{l.f()}}else null!=e.nodeType&&(i=[e]);if(null==i||!i.length)throw new Error("Invalid `".concat(t,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return i},p.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},p.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");var n,i=e.type,o=i.replace(/\/.*$/,""),r=s(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if("."===(a=a.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(a.toLowerCase(),e.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(o===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}}catch(e){r.e(e)}finally{r.f()}return!1},null!=e&&(e.fn.dropzone=function(e){return this.each((function(){return new p(this,e)}))}),null!==t?t.exports=p:window.Dropzone=p,p.ADDED="added",p.QUEUED="queued",p.ACCEPTED=p.QUEUED,p.UPLOADING="uploading",p.PROCESSING=p.UPLOADING,p.CANCELED="canceled",p.ERROR="error",p.SUCCESS="success";var g=function(e,t,n,i,o,r,a,l,s,u){var c=function(e){e.naturalWidth;var t=e.naturalHeight,n=document.createElement("canvas");n.width=1,n.height=t;var i=n.getContext("2d");i.drawImage(e,0,0);for(var o=i.getImageData(1,0,1,t).data,r=0,a=t,l=t;l>r;){0===o[4*(l-1)+3]?a=l:r=l,l=a+r>>1}var s=l/t;return 0===s?1:s}(t);return e.drawImage(t,n,i,o,r,a,l,s,u/c)},y=function(){function e(){c(this,e)}return h(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",n=void 0,i=void 0,o="",r=void 0,a=void 0,l=void 0,s="",u=0;r=(n=e[u++])>>2,a=(3&n)<<4|(i=e[u++])>>4,l=(15&i)<<2|(o=e[u++])>>6,s=63&o,isNaN(i)?l=s=64:isNaN(o)&&(s=64),t=t+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(s),n=i=o="",r=a=l=s="",u<e.length;);return t}},{key:"restore",value:function(e,t){if(!e.match("data:image/jpeg;base64,"))return t;var n=this.decode64(e.replace("data:image/jpeg;base64,","")),i=this.slice2Segments(n),o=this.exifManipulation(t,i);return"data:image/jpeg;base64,".concat(this.encode64(o))}},{key:"exifManipulation",value:function(e,t){var n=this.getExifArray(t),i=this.insertExif(e,n);return new Uint8Array(i)}},{key:"getExifArray",value:function(e){for(var t=void 0,n=0;n<e.length;){if(255===(t=e[n])[0]&225===t[1])return t;n++}return[]}},{key:"insertExif",value:function(e,t){var n=e.replace("data:image/jpeg;base64,",""),i=this.decode64(n),o=i.indexOf(255,3),r=i.slice(0,o),a=i.slice(o),l=r;return l=(l=l.concat(t)).concat(a)}},{key:"slice2Segments",value:function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var i=t+(256*e[t+2]+e[t+3])+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.length)break}return n}},{key:"decode64",value:function(e){var t=void 0,n=void 0,i="",o=void 0,r=void 0,a="",l=0,s=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&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."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(l++))<<2|(o=this.KEY_STR.indexOf(e.charAt(l++)))>>4,n=(15&o)<<4|(r=this.KEY_STR.indexOf(e.charAt(l++)))>>2,i=(3&r)<<6|(a=this.KEY_STR.indexOf(e.charAt(l++))),s.push(t),64!==r&&s.push(n),64!==a&&s.push(i),t=n=i="",o=r=a="",l<e.length;);return s}}]),e}();y.initClass();p._autoDiscoverFunction=function(){if(p.autoDiscover)return p.discover()},function(e,t){var n=!1,i=!0,o=e.document,r=o.documentElement,a=o.addEventListener?"addEventListener":"attachEvent",l=o.addEventListener?"removeEventListener":"detachEvent",s=o.addEventListener?"":"on",u=function i(r){if("readystatechange"!==r.type||"complete"===o.readyState)return("load"===r.type?e:o)[l](s+r.type,i,!1),!n&&(n=!0)?t.call(e,r.type||r):void 0};if("complete"!==o.readyState){if(o.createEventObject&&r.doScroll){try{i=!e.frameElement}catch(e){}i&&function e(){try{r.doScroll("left")}catch(t){return void setTimeout(e,50)}return u("poll")}()}o[a](s+"DOMContentLoaded",u,!1),o[a](s+"readystatechange",u,!1),e[a](s+"load",u,!1)}}(window,p._autoDiscoverFunction)}).call(this,n("EVdn"),n("YuTi")(e))},eoL8:function(e,t,n){var i=n("I+eb"),o=n("g6v/");i({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n("m/L8").f})},hBjN:function(e,t,n){"use strict";var i=n("wE6v"),o=n("m/L8"),r=n("XGwC");e.exports=function(e,t,n){var a=i(t);a in e?o.f(e,a,r(0,n)):e[a]=n}},ma9I:function(e,t,n){"use strict";var i=n("I+eb"),o=n("0Dky"),r=n("6LWA"),a=n("hh1v"),l=n("ewvW"),s=n("UMSQ"),u=n("hBjN"),c=n("ZfDv"),d=n("Hd5f"),h=n("tiKp"),f=n("LQDL"),p=h("isConcatSpreadable"),v=f>=51||!o((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=d("concat"),g=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:r(e)};i({target:"Array",proto:!0,forced:!v||!m},{concat:function(e){var t,n,i,o,r,a=l(this),d=c(a,0),h=0;for(t=-1,i=arguments.length;t<i;t++)if(g(r=-1===t?a:arguments[t])){if(h+(o=s(r.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,h++)n in r&&u(d,h,r[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(d,h++,r)}return d.length=h,d}})},oVuX:function(e,t,n){"use strict";var i=n("I+eb"),o=n("RK3t"),r=n("/GqU"),a=n("pkCn"),l=[].join,s=o!=Object,u=a("join",",");i({target:"Array",proto:!0,forced:s||!u},{join:function(e){return l.call(r(this),void 0===e?",":e)}})},pkCn:function(e,t,n){"use strict";var i=n("0Dky");e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},qkdH:function(e,t,n){"use strict";(function(e){
  /**!
   * Sortable 1.10.2
   * @author	RubaXa   <trash@rubaxa.org>
   * @author	owenm    <owen23355@gmail.com>
   * @license MIT
   */
  function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){i(e,t,n[t])}))}return e}function a(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var s=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=l(/Edge/i),c=l(/firefox/i),d=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),h=l(/iP(ad|od|hone)/i),f=l(/chrome/i)&&l(/android/i),p={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!s&&p)}function m(e,t,n){e.removeEventListener(t,n,!s&&p)}function g(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function y(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function b(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&g(e,t):g(e,t))||i&&e===n)return e;if(e===n)break}while(e=y(e))}return null}var w,E=/\s+/g;function k(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(E," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(E," ")}}function C(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"==typeof n?"":"px")}}function F(e,t){var n="";if("string"==typeof e)n=e;else do{var i=C(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function x(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function S(){var e=document.scrollingElement;return e||document.documentElement}function _(e,t,n,i,o){if(e.getBoundingClientRect||e===window){var r,a,l,u,c,d,h;if(e!==window&&e!==S()?(a=(r=e.getBoundingClientRect()).top,l=r.left,u=r.bottom,c=r.right,d=r.height,h=r.width):(a=0,l=0,u=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!s))do{if(o&&o.getBoundingClientRect&&("none"!==C(o,"transform")||n&&"static"!==C(o,"position"))){var f=o.getBoundingClientRect();a-=f.top+parseInt(C(o,"border-top-width")),l-=f.left+parseInt(C(o,"border-left-width")),u=a+r.height,c=l+r.width;break}}while(o=o.parentNode);if(i&&e!==window){var p=F(o||e),v=p&&p.a,m=p&&p.d;p&&(u=(a/=m)+(d/=m),c=(l/=v)+(h/=v))}return{top:a,left:l,bottom:u,right:c,width:h,height:d}}}function T(e,t,n){for(var i=I(e,!0),o=_(e)[t];i;){var r=_(i)[n];if(!("top"===n||"left"===n?o>=r:o<=r))return i;if(i===S())break;i=I(i,!1)}return!1}function D(e,t,n){for(var i=0,o=0,r=e.children;o<r.length;){if("none"!==r[o].style.display&&r[o]!==Ne.ghost&&r[o]!==Ne.dragged&&b(r[o],n.draggable,e,!1)){if(i===t)return r[o];i++}o++}return null}function A(e,t){for(var n=e.lastElementChild;n&&(n===Ne.ghost||"none"===C(n,"display")||t&&!g(n,t));)n=n.previousElementSibling;return n||null}function z(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ne.clone||t&&!g(e,t)||n++;return n}function M(e){var t=0,n=0,i=S();if(e)do{var o=F(e),r=o.a,a=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[t,n]}function I(e,t){if(!e||!e.getBoundingClientRect)return S();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=C(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return S();if(i||t)return n;i=!0}}}while(n=n.parentNode);return S()}function L(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function O(e,t){return function(){if(!w){var n=arguments,i=this;1===n.length?e.call(i,n[0]):e.apply(i,n),w=setTimeout((function(){w=void 0}),t)}}}function N(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function R(t){var n=window.Polymer,i=e||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}var P="Sortable"+(new Date).getTime();function U(){var e,t=[];return{captureAnimationState:function(){(t=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(e){if("none"!==C(e,"display")&&e!==Ne.ghost){t.push({target:e,rect:_(e)});var n=r({},t[t.length-1].rect);if(e.thisAnimationDuration){var i=F(e,!0);i&&(n.top-=i.f,n.left-=i.e)}e.fromRect=n}}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var i=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var o=!1,r=0;t.forEach((function(e){var t=0,n=e.target,a=n.fromRect,l=_(n),s=n.prevFromRect,u=n.prevToRect,c=e.rect,d=F(n,!0);d&&(l.top-=d.f,l.left-=d.e),n.toRect=l,n.thisAnimationDuration&&L(s,l)&&!L(a,l)&&(c.top-l.top)/(c.left-l.left)==(a.top-l.top)/(a.left-l.left)&&(t=function(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}(c,s,u,i.options)),L(l,a)||(n.prevFromRect=a,n.prevToRect=l,t||(t=i.options.animation),i.animate(n,c,l,t)),t&&(o=!0,r=Math.max(r,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,i){if(i){C(e,"transition",""),C(e,"transform","");var o=F(this.el),r=o&&o.a,a=o&&o.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,C(e,"transform","translate3d("+l+"px,"+s+"px,0)"),function(e){e.offsetWidth}(e),C(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),C(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){C(e,"transition",""),C(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i)}}}}var j=[],B={initializeByDefault:!0},Y={mount:function(e){for(var t in B)B.hasOwnProperty(t)&&!(t in e)&&(e[t]=B[t]);j.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";j.forEach((function(i){t[i.pluginName]&&(t[i.pluginName][o]&&t[i.pluginName][o](r({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](r({sortable:t},n)))}))},initializePlugins:function(e,t,n,i){for(var r in j.forEach((function(i){var r=i.pluginName;if(e.options[r]||i.initializeByDefault){var a=new i(e,t,e.options);a.sortable=e,a.options=e.options,e[r]=a,o(n,a.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);void 0!==a&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return j.forEach((function(i){"function"==typeof i.eventProperties&&o(n,i.eventProperties.call(t[i.pluginName],e))})),n},modifyOption:function(e,t,n){var i;return j.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))})),i}};function H(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,a=e.cloneEl,l=e.toEl,c=e.fromEl,d=e.oldIndex,h=e.newIndex,f=e.oldDraggableIndex,p=e.newDraggableIndex,v=e.originalEvent,m=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[P]){var y,b=t.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||s||u?(y=document.createEvent("Event")).initEvent(i,!0,!0):y=new CustomEvent(i,{bubbles:!0,cancelable:!0}),y.to=l||n,y.from=c||n,y.item=o||n,y.clone=a,y.oldIndex=d,y.newIndex=h,y.oldDraggableIndex=f,y.newDraggableIndex=p,y.originalEvent=v,y.pullMode=m?m.lastPutMode:void 0;var E=r({},g,Y.getEventProperties(i,t));for(var k in E)y[k]=E[k];n&&n.dispatchEvent(y),b[w]&&b[w].call(t,y)}}var X=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=a(n,["evt"]);Y.pluginEvent.bind(Ne)(e,t,r({dragEl:q,parentEl:Q,ghostEl:G,rootEl:K,nextEl:$,lastDownEl:V,cloneEl:Z,cloneHidden:J,dragStarted:he,putSortable:re,activeSortable:Ne.active,originalEvent:i,oldIndex:ee,oldDraggableIndex:ne,newIndex:te,newDraggableIndex:ie,hideGhostForTarget:Me,unhideGhostForTarget:Ie,cloneNowHidden:function(){J=!0},cloneNowShown:function(){J=!1},dispatchSortableEvent:function(e){W({sortable:t,name:e,originalEvent:i})}},o))};function W(e){H(r({putSortable:re,cloneEl:Z,targetEl:q,rootEl:K,oldIndex:ee,oldDraggableIndex:ne,newIndex:te,newDraggableIndex:ie},e))}var q,Q,G,K,$,V,Z,J,ee,te,ne,ie,oe,re,ae,le,se,ue,ce,de,he,fe,pe,ve,me,ge=!1,ye=!1,be=[],we=!1,Ee=!1,ke=[],Ce=!1,Fe=[],xe="undefined"!=typeof document,Se=h,_e=u||s?"cssFloat":"float",Te=xe&&!f&&!h&&"draggable"in document.createElement("div"),De=function(){if(xe){if(s)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ae=function(e,t){var n=C(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=D(e,0,t),r=D(e,1,t),a=o&&C(o),l=r&&C(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+_(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+_(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==c?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=i&&"none"===n[_e]||r&&"none"===n[_e]&&s+u>i)?"vertical":"horizontal"},ze=function(e){function t(e,n){return function(i,o,r,a){var l=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(i,o,r,a),n)(i,o,r,a);var s=(n?i:o).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var i={},o=e.group;o&&"object"==n(o)||(o={name:o}),i.name=o.name,i.checkPull=t(o.pull,!0),i.checkPut=t(o.put),i.revertClone=o.revertClone,e.group=i},Me=function(){!De&&G&&C(G,"display","none")},Ie=function(){!De&&G&&C(G,"display","")};xe&&document.addEventListener("click",(function(e){if(ye)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ye=!1,!1}),!0);var Le=function(e){if(q){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,r=e.clientY,be.some((function(e){if(!A(e)){var t=_(e),n=e[P].options.emptyInsertThreshold,i=o>=t.left-n&&o<=t.right+n,l=r>=t.top-n&&r<=t.bottom+n;return n&&i&&l?a=e:void 0}})),a);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[P]._onDragOver(n)}}var o,r,a},Oe=function(e){q&&q.parentNode[P]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=o({},t),e[P]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ae(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in Y.initializePlugins(this,e,n),n)!(i in t)&&(t[i]=n[i]);for(var r in ze(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&Te,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),be.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),o(this,U())}function Re(e,t,n,i,o,r,a,l){var c,d,h=e[P],f=h.options.onMove;return!window.CustomEvent||s||u?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=t,c.from=e,c.dragged=n,c.draggedRect=i,c.related=o||t,c.relatedRect=r||_(t),c.willInsertAfter=l,c.originalEvent=a,e.dispatchEvent(c),f&&(d=f.call(h,c,a)),d}function Pe(e){e.draggable=!1}function Ue(){Ce=!1}function je(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function Be(e){return setTimeout(e,0)}function Ye(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,q):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=i.filter;if(function(e){Fe.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var i=t[n];i.checked&&Fe.push(i)}}(n),!q&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||i.disabled||s.isContentEditable||(l=b(l,i.draggable,n,!1))&&l.animated||V===l)){if(ee=z(l),ne=z(l,i.draggable),"function"==typeof u){if(u.call(this,e,l,this))return W({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),X("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(i){if(i=b(s,i.trim(),n,!1))return W({sortable:t,rootEl:i,name:"filter",targetEl:l,fromEl:n,toEl:n}),X("filter",t,{evt:e}),!0}))))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!b(s,i.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var i,o=this,r=o.el,a=o.options,l=r.ownerDocument;if(n&&!q&&n.parentNode===r){var d=_(n);if(K=r,Q=(q=n).parentNode,$=q.nextSibling,V=n,oe=a.group,Ne.dragged=q,ae={target:q,clientX:(t||e).clientX,clientY:(t||e).clientY},ce=ae.clientX-d.left,de=ae.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,q.style["will-change"]="all",i=function(){X("delayEnded",o,{evt:e}),Ne.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!c&&o.nativeDraggable&&(q.draggable=!0),o._triggerDragStart(e,t),W({sortable:o,name:"choose",originalEvent:e}),k(q,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){x(q,e.trim(),Pe)})),v(l,"dragover",Le),v(l,"mousemove",Le),v(l,"touchmove",Le),v(l,"mouseup",o._onDrop),v(l,"touchend",o._onDrop),v(l,"touchcancel",o._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q.draggable=!0),X("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(u||s))i();else{if(Ne.eventCanceled)return void this._onDrop();v(l,"mouseup",o._disableDelayedDrag),v(l,"touchend",o._disableDelayedDrag),v(l,"touchcancel",o._disableDelayedDrag),v(l,"mousemove",o._delayedDragTouchMoveHandler),v(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q&&Pe(q),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;m(e,"mouseup",this._disableDelayedDrag),m(e,"touchend",this._disableDelayedDrag),m(e,"touchcancel",this._disableDelayedDrag),m(e,"mousemove",this._delayedDragTouchMoveHandler),m(e,"touchmove",this._delayedDragTouchMoveHandler),m(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(q,"dragend",this),v(K,"dragstart",this._onDragStart));try{document.selection?Be((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ge=!1,K&&q){X("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",Oe);var n=this.options;!e&&k(q,n.dragClass,!1),k(q,n.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,Me();for(var e=document.elementFromPoint(le.clientX,le.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==t;)t=e;if(q.parentNode[P]._isOutsideThisEl(e),t)do{if(t[P]){if(t[P]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Ie()}},_onTouchMove:function(e){if(ae){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,r=G&&F(G,!0),a=G&&r&&r.a,l=G&&r&&r.d,s=Se&&me&&M(me),u=(o.clientX-ae.clientX+i.x)/(a||1)+(s?s[0]-ke[0]:0)/(a||1),c=(o.clientY-ae.clientY+i.y)/(l||1)+(s?s[1]-ke[1]:0)/(l||1);if(!Ne.active&&!ge){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(G){r?(r.e+=u-(se||0),r.f+=c-(ue||0)):r={a:1,b:0,c:0,d:1,e:u,f:c};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");C(G,"webkitTransform",d),C(G,"mozTransform",d),C(G,"msTransform",d),C(G,"transform",d),se=u,ue=c,le=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!G){var e=this.options.fallbackOnBody?document.body:K,t=_(q,!0,Se,!0,e),n=this.options;if(Se){for(me=e;"static"===C(me,"position")&&"none"===C(me,"transform")&&me!==document;)me=me.parentNode;me!==document.body&&me!==document.documentElement?(me===document&&(me=S()),t.top+=me.scrollTop,t.left+=me.scrollLeft):me=S(),ke=M(me)}k(G=q.cloneNode(!0),n.ghostClass,!1),k(G,n.fallbackClass,!0),k(G,n.dragClass,!0),C(G,"transition",""),C(G,"transform",""),C(G,"box-sizing","border-box"),C(G,"margin",0),C(G,"top",t.top),C(G,"left",t.left),C(G,"width",t.width),C(G,"height",t.height),C(G,"opacity","0.8"),C(G,"position",Se?"absolute":"fixed"),C(G,"zIndex","100000"),C(G,"pointerEvents","none"),Ne.ghost=G,e.appendChild(G),C(G,"transform-origin",ce/parseInt(G.style.width)*100+"% "+de/parseInt(G.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;X("dragStart",this,{evt:e}),Ne.eventCanceled?this._onDrop():(X("setupClone",this),Ne.eventCanceled||((Z=R(q)).draggable=!1,Z.style["will-change"]="",this._hideClone(),k(Z,this.options.chosenClass,!1),Ne.clone=Z),n.cloneId=Be((function(){X("clone",n),Ne.eventCanceled||(n.options.removeCloneOnHide||K.insertBefore(Z,q),n._hideClone(),W({sortable:n,name:"clone"}))})),!t&&k(q,o.dragClass,!0),t?(ye=!0,n._loopId=setInterval(n._emulateDragOver,50)):(m(document,"mouseup",n._onDrop),m(document,"touchend",n._onDrop),m(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,q)),v(document,"drop",n),C(q,"transform","translateZ(0)")),ge=!0,n._dragStartId=Be(n._dragStarted.bind(n,t,e)),v(document,"selectstart",n),he=!0,d&&C(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,i,o,a=this.el,l=e.target,s=this.options,u=s.group,c=Ne.active,d=oe===u,h=s.sort,f=re||c,p=this,v=!1;if(!Ce){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=b(l,s.draggable,a,!0),R("dragOver"),Ne.eventCanceled)return v;if(q.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||p._ignoreWhileAnimating===l)return j(!1);if(ye=!1,c&&!s.disabled&&(d?h||(i=!K.contains(q)):re===this||(this.lastPutMode=oe.checkPull(this,c,q,e))&&u.checkPut(this,c,q,e))){if(o="vertical"===this._getDirection(e,l),t=_(q),R("dragOverValid"),Ne.eventCanceled)return v;if(i)return Q=K,U(),this._hideClone(),R("revert"),Ne.eventCanceled||($?K.insertBefore(q,$):K.appendChild(q)),j(!0);var m=A(a,s.draggable);if(!m||function(e,t,n){var i=_(A(n.el,n.options.draggable));return t?e.clientX>i.right+10||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+10}(e,o,this)&&!m.animated){if(m===q)return j(!1);if(m&&a===e.target&&(l=m),l&&(n=_(l)),!1!==Re(K,a,q,t,l,n,e,!!l))return U(),a.appendChild(q),Q=a,B(),j(!0)}else if(l.parentNode===a){n=_(l);var g,y,w,E=q.parentNode!==a,F=!function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,r=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return i===a||o===l||i+r/2===a+s/2}(q.animated&&q.toRect||t,l.animated&&l.toRect||n,o),x=o?"top":"left",S=T(l,"top","top")||T(q,"top","top"),D=S?S.scrollTop:void 0;if(fe!==l&&(y=n[x],we=!1,Ee=!F&&s.invertSwap||E),0!==(g=function(e,t,n,i,o,r,a,l){var s=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!a)if(l&&ve<u*o){if(!we&&(1===pe?s>c+u*r/2:s<d-u*r/2)&&(we=!0),we)h=!0;else if(1===pe?s<c+ve:s>d-ve)return-pe}else if(s>c+u*(1-o)/2&&s<d-u*(1-o)/2)return function(e){return z(q)<z(e)?1:-1}(t);if((h=h||a)&&(s<c+u*r/2||s>d-u*r/2))return s>c+u/2?1:-1;return 0}(e,l,n,o,F?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Ee,fe===l))){var M=z(q);do{M-=g,w=Q.children[M]}while(w&&("none"===C(w,"display")||w===G))}if(0===g||w===l)return j(!1);fe=l,pe=g;var I=l.nextElementSibling,L=!1,O=Re(K,a,q,t,l,n,e,L=1===g);if(!1!==O)return 1!==O&&-1!==O||(L=1===O),Ce=!0,setTimeout(Ue,30),U(),L&&!I?a.appendChild(q):l.parentNode.insertBefore(q,L?I:l),S&&N(S,0,D-S.scrollTop),Q=q.parentNode,void 0===y||Ee||(ve=Math.abs(y-_(l)[x])),B(),j(!0)}if(a.contains(q))return j(!1)}return!1}function R(s,u){X(s,p,r({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:h,fromSortable:f,target:l,completed:j,onMove:function(n,i){return Re(K,a,q,t,n,_(n),e,i)},changed:B},u))}function U(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function j(t){return R("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(p),p!==f&&(k(q,re?re.options.ghostClass:c.options.ghostClass,!1),k(q,s.ghostClass,!0)),re!==p&&p!==Ne.active?re=p:p===Ne.active&&re&&(re=null),f===p&&(p._ignoreWhileAnimating=l),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(l===q&&!q.animated||l===a&&!l.animated)&&(fe=null),s.dragoverBubble||e.rootEl||l===document||(q.parentNode[P]._isOutsideThisEl(e.target),!t&&Le(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function B(){te=z(q),ie=z(q,s.draggable),W({sortable:p,name:"change",toEl:a,newIndex:te,newDraggableIndex:ie,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",Le),m(document,"mousemove",Le),m(document,"touchmove",Le)},_offUpEvents:function(){var e=this.el.ownerDocument;m(e,"mouseup",this._onDrop),m(e,"touchend",this._onDrop),m(e,"pointerup",this._onDrop),m(e,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;te=z(q),ie=z(q,n.draggable),X("drop",this,{evt:e}),Q=q&&q.parentNode,te=z(q),ie=z(q,n.draggable),Ne.eventCanceled||(ge=!1,Ee=!1,we=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ye(this.cloneId),Ye(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&C(document.body,"user-select",""),C(q,"transform",""),e&&(he&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),G&&G.parentNode&&G.parentNode.removeChild(G),(K===Q||re&&"clone"!==re.lastPutMode)&&Z&&Z.parentNode&&Z.parentNode.removeChild(Z),q&&(this.nativeDraggable&&m(q,"dragend",this),Pe(q),q.style["will-change"]="",he&&!ge&&k(q,re?re.options.ghostClass:this.options.ghostClass,!1),k(q,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),K!==Q?(te>=0&&(W({rootEl:Q,name:"add",toEl:Q,fromEl:K,originalEvent:e}),W({sortable:this,name:"remove",toEl:Q,originalEvent:e}),W({rootEl:Q,name:"sort",toEl:Q,fromEl:K,originalEvent:e}),W({sortable:this,name:"sort",toEl:Q,originalEvent:e})),re&&re.save()):te!==ee&&te>=0&&(W({sortable:this,name:"update",toEl:Q,originalEvent:e}),W({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Ne.active&&(null!=te&&-1!==te||(te=ee,ie=ne),W({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),K=q=Q=G=$=Z=V=J=ae=le=he=te=ie=ee=ne=fe=pe=re=oe=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Fe.forEach((function(e){e.checked=!0})),Fe.length=se=ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":q&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,r=this.options;i<o;i++)b(e=n[i],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||je(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,i){var o=n.children[i];b(o,this.options.draggable,n,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return b(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var i=Y.modifyOption(this,e,t);n[e]=void 0!==i?i:t,"group"===e&&ze(n)},destroy:function(){X("destroy",this);var e=this.el;e[P]=null,m(e,"mousedown",this._onTapStart),m(e,"touchstart",this._onTapStart),m(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(m(e,"dragover",this),m(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),be.splice(be.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!J){if(X("hideClone",this),Ne.eventCanceled)return;C(Z,"display","none"),this.options.removeCloneOnHide&&Z.parentNode&&Z.parentNode.removeChild(Z),J=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(J){if(X("showClone",this),Ne.eventCanceled)return;K.contains(q)&&!this.options.group.revertClone?K.insertBefore(Z,q):$?K.insertBefore(Z,$):K.appendChild(Z),this.options.group.revertClone&&this.animate(q,Z),C(Z,"display",""),J=!1}}else this._hideClone()}},xe&&v(document,"touchmove",(function(e){(Ne.active||ge)&&e.cancelable&&e.preventDefault()})),Ne.utils={on:v,off:m,css:C,find:x,is:function(e,t){return!!b(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:O,closest:b,toggleClass:k,clone:R,index:z,nextTick:Be,cancelNextTick:Ye,detectDirection:Ae,getChild:D},Ne.get=function(e){return e[P]},Ne.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ne.utils=r({},Ne.utils,e.utils)),Y.mount(e)}))},Ne.create=function(e,t){return new Ne(e,t)},Ne.version="1.10.2";var He,Xe,We,qe,Qe,Ge,Ke=[],$e=!1;function Ve(){Ke.forEach((function(e){clearInterval(e.pid)})),Ke=[]}function Ze(){clearInterval(Ge)}var Je=O((function(e,t,n,i){if(t.scroll){var o,r=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,u=S(),c=!1;Xe!==n&&(Xe=n,Ve(),He=t.scroll,o=t.scrollFn,!0===He&&(He=I(n,!0)));var d=0,h=He;do{var f=h,p=_(f),v=p.top,m=p.bottom,g=p.left,y=p.right,b=p.width,w=p.height,E=void 0,k=void 0,F=f.scrollWidth,x=f.scrollHeight,T=C(f),D=f.scrollLeft,A=f.scrollTop;f===u?(E=b<F&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),k=w<x&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(E=b<F&&("auto"===T.overflowX||"scroll"===T.overflowX),k=w<x&&("auto"===T.overflowY||"scroll"===T.overflowY));var z=E&&(Math.abs(y-r)<=l&&D+b<F)-(Math.abs(g-r)<=l&&!!D),M=k&&(Math.abs(m-a)<=l&&A+w<x)-(Math.abs(v-a)<=l&&!!A);if(!Ke[d])for(var L=0;L<=d;L++)Ke[L]||(Ke[L]={});Ke[d].vx==z&&Ke[d].vy==M&&Ke[d].el===f||(Ke[d].el=f,Ke[d].vx=z,Ke[d].vy=M,clearInterval(Ke[d].pid),0==z&&0==M||(c=!0,Ke[d].pid=setInterval(function(){i&&0===this.layer&&Ne.active._onTouchMove(Qe);var t=Ke[this.layer].vy?Ke[this.layer].vy*s:0,n=Ke[this.layer].vx?Ke[this.layer].vx*s:0;"function"==typeof o&&"continue"!==o.call(Ne.dragged.parentNode[P],n,t,e,Qe,Ke[this.layer].el)||N(Ke[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==u&&(h=I(h,!1)));$e=c}}),30),et=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,r=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||o;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);l(),s&&!s.el.contains(c)&&(r("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function tt(){}function nt(){}tt.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=D(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:et},o(tt,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:et},o(nt,{pluginName:"removeOnSpill"});Ne.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?m(document,"dragover",this._handleAutoScroll):(m(document,"pointermove",this._handleFallbackAutoScroll),m(document,"touchmove",this._handleFallbackAutoScroll),m(document,"mousemove",this._handleFallbackAutoScroll)),Ze(),Ve(),clearTimeout(w),w=void 0},nulling:function(){Qe=Xe=He=$e=Ge=We=qe=null,Ke.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(i,o);if(Qe=e,t||u||s||d){Je(e,this.options,r,t);var a=I(r,!0);!$e||Ge&&i===We&&o===qe||(Ge&&Ze(),Ge=setInterval((function(){var r=I(document.elementFromPoint(i,o),!0);r!==a&&(a=r,Ve()),Je(e,n.options,r,t)}),10),We=i,qe=o)}else{if(!this.options.bubbleScroll||I(r,!0)===S())return void Ve();Je(e,this.options,I(r,!1),!1)}}},o(e,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(nt,tt),t.a=Ne}).call(this,n("EVdn"))}},[["KwMv","runtime",0,1]]]);