iotgateway/IoTGateway/wwwroot/layuiadmin/ueditor/third-party/webuploader/webuploader.flashonly.min.js

3 lines
33 KiB
JavaScript
Raw Normal View History

2021-12-12 06:55:48 +00:00
/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
;!function(e,t){var i,n={},r=function(e,t){var i,n,r;if("string"==typeof e)return u(e);for(i=[],n=e.length,r=0;n>r;r++)i.push(u(e[r]));return t.apply(null,i)},o=function(e,t,i){2===arguments.length&&(i=t,t=null),r(t||[],function(){s(e,i,arguments)})},s=function(e,t,i){var o,s={exports:t};"function"==typeof t&&(i.length||(i=[r,s.exports,s]),o=t.apply(null,i),void 0!==o&&(s.exports=o)),n[e]=s.exports},u=function(t){var i=n[t]||e[t];if(!i)throw new Error("`"+t+"` is undefined");return i},a=function(e){var t,i,r,o,s,u;u=function(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)};for(t in n)if(i=e,n.hasOwnProperty(t)){for(r=t.split("/"),s=u(r.pop());o=u(r.shift());)i[o]=i[o]||{},i=i[o];i[s]=n[t]}},c=t(e,o,r);a(c),"object"==typeof module&&"object"==typeof module.exports?module.exports=c:"function"==typeof define&&define.amd?define([],c):(i=e.WebUploader,e.WebUploader=c,e.WebUploader.noConflict=function(){e.WebUploader=i})}(this,function(e,t,i){return t("dollar-third",[],function(){return e.jQuery||e.Zepto}),t("dollar",["dollar-third"],function(e){return e}),t("promise-third",["dollar"],function(e){return{Deferred:e.Deferred,when:e.when,isPromise:function(e){return e&&"function"==typeof e.then}}}),t("promise",["promise-third"],function(e){return e}),t("base",["dollar","promise"],function(t,i){function n(e){return function(){return u.apply(e,arguments)}}function r(e,t){return function(){return e.apply(t,arguments)}}function o(e){var t;return Object.create?Object.create(e):(t=function(){},t.prototype=e,new t)}var s=function(){},u=Function.call;return{version:"0.1.2",$:t,Deferred:i.Deferred,isPromise:i.isPromise,when:i.when,browser:function(e){var t={},i=e.match(/WebKit\/([\d.]+)/),n=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),r=e.match(/MSIE\s([\d\.]+)/)||e.match(/(?:trident)(?:.*rv:([\w.]+))?/i),o=e.match(/Firefox\/([\d.]+)/),s=e.match(/Safari\/([\d.]+)/),u=e.match(/OPR\/([\d.]+)/);return i&&(t.webkit=parseFloat(i[1])),n&&(t.chrome=parseFloat(n[1])),r&&(t.ie=parseFloat(r[1])),o&&(t.firefox=parseFloat(o[1])),s&&(t.safari=parseFloat(s[1])),u&&(t.opera=parseFloat(u[1])),t}(navigator.userAgent),os:function(e){var t={},i=e.match(/(?:Android);?[\s\/]+([\d.]+)?/),n=e.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return i&&(t.android=parseFloat(i[1])),n&&(t.ios=parseFloat(n[1].replace(/_/g,"."))),t}(navigator.userAgent),inherits:function(e,i,n){var r;return"function"==typeof i?(r=i,i=null):r=i&&i.hasOwnProperty("constructor")?i.constructor:function(){return e.apply(this,arguments)},t.extend(!0,r,e,n||{}),r.__super__=e.prototype,r.prototype=o(e.prototype),i&&t.extend(!0,r.prototype,i),r},noop:s,bindFn:r,log:function(){return e.console?r(console.log,console):s}(),nextTick:function(){return function(e){setTimeout(e,1)}}(),slice:n([].slice),guid:function(){var e=0;return function(t){for(var i=(+new Date).toString(32),n=0;5>n;n++)i+=Math.floor(65535*Math.random()).toString(32);return(t||"wu_")+i+(e++).toString(32)}}(),formatSize:function(e,t,i){var n;for(i=i||["B","K","M","G","TB"];(n=i.shift())&&e>1024;)e/=1024;return("B"===n?e:e.toFixed(t||2))+n}}}),t("mediator",["base"],function(e){function t(e,t,i,n){return o.grep(e,function(e){return!(!e||t&&e.e!==t||i&&e.cb!==i&&e.cb._cb!==i||n&&e.ctx!==n)})}function i(e,t,i){o.each((e||"").split(u),function(e,n){i(n,t)})}function n(e,t){for(var i,n=!1,r=-1,o=e.length;++r<o;)if(i=e[r],i.cb.apply(i.ctx2,t)===!1){n=!0;break}return!n}var r,o=e.$,s=[].slice,u=/\s+/;return r={on:function(e,t,n){var r,o=this;return t?(r=this._events||(this._events=[]),i(e,t,function(e,t){var i={e:e};i.cb=t,i.ctx=n,i.ctx2=n||o,i.id=r.length,r.push(i)}),this):this},once:function(e,t,n){var r=this;return t?(i(e,t,function(e,t){var i=function(){return r.off(e,i),t.apply(n||r,arguments)};i._cb=t,r.on(e,i,n)}),r):r},off:function(e,n,r){var s=this._events;return s?e||n||r?(i(e,n,function(e,i){o.each(t(s,e,i,r),function(){delete s[this.id]})}),this):(this._events=[],this):this},trigger:function(e){var i,r,o;return this._events&&e?(i=s.call(arguments,1),r=t(this._events,e),o=t(this._events,"all"),n(r,i)&&n(o,arguments)):
i.sendAsBinary?(s+=(/\?/.test(s)?"&":"?")+n.param(t._formData),e=o.uid):(n.each(t._formData,function(e,t){r.exec("append",e,t)}),r.exec("appendBlob",i.fileVal,o.uid,i.filename||t._formData.name||"")),this._setRequestHeader(r,i.headers),r.exec("send",{method:i.method,url:s},e)},getStatus:function(){return this._status},getResponse:function(){return this._response},getResponseAsJson:function(){return this._responseJson},abort:function(){var e=this._xhr;e&&(e.exec("abort"),e.destroy(),this._xhr=e=null)},destroy:function(){this.abort()},_initAjax:function(){var e=this,t=new i("XMLHttpRequest");return t.on("uploadprogress progress",function(t){return e.trigger("progress",t.loaded/t.total)}),t.on("load",function(){var i=t.exec("getStatus"),n="";return t.off(),e._xhr=null,i>=200&&300>i?(e._response=t.exec("getResponse"),e._responseJson=t.exec("getResponseAsJson")):i>=500&&600>i?(e._response=t.exec("getResponse"),e._responseJson=t.exec("getResponseAsJson"),n="server"):n="http",t.destroy(),t=null,n?e.trigger("error",n):e.trigger("load")}),t.on("error",function(){t.off(),e._xhr=null,e.trigger("error","http")}),e._xhr=t,t},_setRequestHeader:function(e,t){n.each(t,function(t,i){e.exec("setRequestHeader",t,i)})}})}),t("preset/flashonly",["base","widgets/filepicker","widgets/image","widgets/queue","widgets/runtime","widgets/upload","widgets/validator","runtime/flash/filepicker","runtime/flash/image","runtime/flash/transport"],function(e){return e}),t("webuploader",["preset/flashonly"],function(e){return e}),i("webuploader")});