!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],e):"object"==typeof exports?e(require("jquery"),require("./vendor/jquery.ui.widget")):e(window.jQuery)}(function(m){"use strict";function e(i){var n="dragover"===i;return function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var t=e.dataTransfer;t&&-1!==m.inArray("Files",t.types)&&!1!==this._trigger(i,m.Event(i,{delegatedEvent:e}))&&(e.preventDefault(),n&&(t.dropEffect="copy"))}}var t;m.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||m('').prop("disabled")),m.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),m.support.xhrFormDataFileUpload=!!window.FormData,m.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),m.widget("blueimp.fileupload",{options:{dropZone:m(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(i,e){return i=this.messages[i]||i.toString(),e&&m.each(e,function(e,t){i=i.replace("{"+e+"}",t)}),i},formData:function(e){return e.serializeArray()},add:function(e,t){if(e.isDefaultPrevented())return!1;(t.autoUpload||!1!==t.autoUpload&&m(this).fileupload("option","autoUpload"))&&t.process().done(function(){t.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_promisePipe:(t=m.fn.jquery.split("."),1").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&t&&t!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(e){var t=m(e.fileInput),n=e.paramName;return n?m.isArray(n)||(n=[n]):(n=[],t.each(function(){for(var e=m(this),t=e.prop("name")||"files[]",i=(e.prop("files")||[1]).length;i;)n.push(t),--i}),n.length||(n=[t.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=m(e.fileInput.prop("form")),e.form.length||(e.form=m(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===m.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){e=m.extend({},this.options,e);return this._initFormSettings(e),this._initDataSettings(e),e},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(e,t,i){var n=m.Deferred(),r=n.promise();return t=t||this.options.context||r,!0===e?n.resolveWith(t,i):!1===e&&n.rejectWith(t,i),r.abort=n.promise,this._enhancePromise(r)},_addConvenienceMethods:function(e,i){function n(e){return m.Deferred().resolveWith(r,e).promise()}var r=this;i.process=function(e,t){return(e||t)&&(i._processQueue=this._processQueue=(this._processQueue||n([this]))[r._promisePipe](function(){return i.errorThrown?m.Deferred().rejectWith(r,[i]).promise():n(arguments)})[r._promisePipe](e,t)),this._processQueue||n([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==r._trigger("submit",m.Event("submit",{delegatedEvent:e}),this)&&r._onSend(e,this)),this.jqXHR||r._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",r._trigger("fail",null,this),r._getXHRPromise(!1))},i.state=function(){return this.jqXHR?r._getDeferredState(this.jqXHR):this._processQueue?r._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===r._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(e){e=e.getResponseHeader("Range"),e=e&&e.split("-"),e=e&&1s._sending)for(var n=s._slots.shift();n;){if("pending"===s._getDeferredState(n)){n.resolve();break}n=s._slots.shift()}0===s._active&&s._trigger("stop")})}var n,r,o,s=this,a=s._getAJAXSettings(t);return this._beforeSend(e,a),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?((t=1c||d&&d<=t+1-_)&&(s.push(p.slice(_,t+1)),(e=g.slice(_,t+1)).length||(e=g),o.push(e),_=t+1,h=0);else o=g;else for(s=[],o=[],t=0;t").append(n)[0].reset(),i.after(n).detach(),t&&n.trigger("focus"),m.cleanData(i.off("remove")),this.options.fileInput=this.options.fileInput.map(function(e,t){return t===i[0]?n[0]:t}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,i){function n(e){e&&!e.entry&&(e.entry=t),o.resolve([e])}var e,r=this,o=m.Deferred(),s=[],a=function(){e.readEntries(function(e){e.length?(s=s.concat(e),a()):(e=s,r._handleFileTreeEntries(e,i+t.name+"/").done(function(e){o.resolve(e)}).fail(n))},n)};return i=i||"",t.isFile?t._file?(t._file.relativePath=i,o.resolve(t._file)):t.file(function(e){e.relativePath=i,o.resolve(e)},n):t.isDirectory?(e=t.createReader(),a()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,t){var i=this;return m.when.apply(m,m.map(e,function(e){return i._handleFileTreeEntry(e,t)}))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var t=(e=e||{}).items;return t&&t.length&&(t[0].webkitGetAsEntry||t[0].getAsEntry)?this._handleFileTreeEntries(m.map(t,function(e){var t;return e.webkitGetAsEntry?((t=e.webkitGetAsEntry())&&(t._file=e.getAsFile()),t):e.getAsEntry()})):m.Deferred().resolve(m.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var t=(e=m(e)).prop("webkitEntries")||e.prop("entries");if(t&&t.length)return this._handleFileTreeEntries(t);if((t=m.makeArray(e.prop("files"))).length)void 0===t[0].name&&t[0].fileName&&m.each(t,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(!(e=e.prop("value")))return m.Deferred().resolve([]).promise();t=[{name:e.replace(/^.*\\/,"")}]}return m.Deferred().resolve(t).promise()},_getFileInputFiles:function(e){return e instanceof m&&1!==e.length?m.when.apply(m,m.map(e,this._getSingleFileInputFiles))[this._promisePipe](function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(t){var i=this,n={fileInput:m(t.target),form:m(t.target.form)};this._getFileInputFiles(n.fileInput).always(function(e){n.files=e,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",m.Event("change",{delegatedEvent:t}),n)&&i._onAdd(t,n)})},_onPaste:function(e){var t=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,i={files:[]};t&&t.length&&(m.each(t,function(e,t){t=t.getAsFile&&t.getAsFile();t&&i.files.push(t)}),!1!==this._trigger("paste",m.Event("paste",{delegatedEvent:e}),i)&&this._onAdd(e,i))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var i=this,e=t.dataTransfer,n={};e&&e.files&&e.files.length&&(t.preventDefault(),this._getDroppedFiles(e).always(function(e){n.files=e,!1!==i._trigger("drop",m.Event("drop",{delegatedEvent:t}),n)&&i._onAdd(t,n)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),m.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,t){var i=-1!==m.inArray(e,this._specialOptions);i&&this._destroyEventHandlers(),this._super(e,t),i&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof m||(e.fileInput=m(e.fileInput)),e.dropZone instanceof m||(e.dropZone=m(e.dropZone)),e.pasteZone instanceof m||(e.pasteZone=m(e.pasteZone))},_getRegExp:function(e){var t=e.split("/"),e=t.pop();return t.shift(),new RegExp(t.join("/"),e)},_isRegExpOption:function(e,t){return"url"!==e&&"string"===m.type(t)&&/^\/.*\/[igm]{0,3}$/.test(t)},_initDataAttributes:function(){var n=this,r=this.options,o=this.element.data();m.each(this.element[0].attributes,function(e,t){var i=t.name.toLowerCase();/^data-/.test(i)&&(i=i.slice(5).replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()}),t=o[i],n._isRegExpOption(i,t)&&(t=n._getRegExp(t)),r[i]=t)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var i=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,i._onAdd(null,t)}):(t.files=m.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var i,n,r=this,o=m.Deferred(),e=o.promise();return e.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),e)},this._getFileInputFiles(t.fileInput).always(function(e){n||(e.length?(t.files=e,(i=r._onSend(null,t)).then(function(e,t,i){o.resolve(e,t,i)},function(e,t,i){o.reject(e,t,i)})):o.reject())}),this._enhancePromise(e)}if(t.files=m.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})}),function(e){"use strict";function d(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function a(e,t,i,n,r,o){return d((o=d(d(t,e),d(n,o)))<<(r=r)|o>>>32-r,i)}function c(e,t,i,n,r,o,s){return a(t&i|~t&n,e,t,r,o,s)}function f(e,t,i,n,r,o,s){return a(t&n|i&~n,e,t,r,o,s)}function h(e,t,i,n,r,o,s){return a(t^i^n,e,t,r,o,s)}function g(e,t,i,n,r,o,s){return a(i^(t|~n),e,t,r,o,s)}function s(e,t){var i,n,r,o;e[t>>5]|=128<>>9<<4)]=t;for(var s=1732584193,a=-271733879,l=-1732584194,p=271733878,u=0;u>5]>>>n%32&255);return t}function p(e){var t=[];for(t[(e.length>>2)-1]=void 0,n=0;n>5]|=(255&e.charCodeAt(n/8))<>>4&15)+i.charAt(15&t);return n}function i(e){return unescape(encodeURIComponent(e))}function r(e){return l(s(p(e=i(e)),8*e.length))}function o(e,t){return function(e,t){var i,n=p(e),r=[],o=[];for(r[15]=o[15]=void 0,16