filesbox/web/dist/js/webuploader.min.js

2 lines
70 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function(I,k){var se,f={},p=function(i,e){var n,s,a;if(typeof i=="string")return o(i);for(n=[],s=i.length,a=0;s>a;a++)n.push(o(i[a]));return e.apply(null,n)},d=function(i,e,n){arguments.length===2&&(n=e,e=null),p(e||[],function(){u(i,n,arguments)})},u=function(i,e,n){var s,a={exports:e};typeof e=="function"&&(n.length||(n=[p,a.exports,a]),s=e.apply(null,n),s!==void 0&&(a.exports=s)),f[i]=a.exports},o=function(i){var e=f[i]||I[i];if(!e)throw new Error("`"+i+"` is undefined");return e},t=function(i){var e,n,s,a,l,y;y=function(w){return w&&w.charAt(0).toUpperCase()+w.substr(1)};for(e in f)if(n=i,f.hasOwnProperty(e)){for(s=e.split("/"),l=y(s.pop());a=y(s.shift());)n[a]=n[a]||{},n=n[a];n[l]=f[e]}return i},r=function(i){return I.__dollar=i,t(k(I,d,p))};typeof module=="object"&&typeof module.exports=="object"?module.exports=r():typeof define=="function"&&define.amd?define(["jquery"],r):(se=I.WebUploader,I.WebUploader=r(),I.WebUploader.noConflict=function(){I.WebUploader=se})})(window,function(I,k,se){return k("dollar-third",[],function(){var f=I.__dollar||I.jQuery||I.Zepto;if(!f)throw new Error("jQuery or Zepto not found!");return f}),k("dollar",["dollar-third"],function(f){return f}),k("promise-third",["dollar"],function(f){return{Deferred:f.Deferred,when:f.when,isPromise:function(p){return p&&typeof p.then=="function"}}}),k("promise",["promise-third"],function(f){return f}),k("base",["dollar","promise"],function(f,p){function d(i){return function(){return r.apply(i,arguments)}}function u(i,e){return function(){return i.apply(e,arguments)}}function o(i){var e;return Object.create?Object.create(i):(e=function(){},e.prototype=i,new e)}var t=function(){},r=Function.call;return{version:"0.1.5",$:f,Deferred:p.Deferred,isPromise:p.isPromise,when:p.when,browser:function(i){var e={},n=i.match(/WebKit\/([\d.]+)/),s=i.match(/Chrome\/([\d.]+)/)||i.match(/CriOS\/([\d.]+)/),a=i.match(/MSIE\s([\d\.]+)/)||i.match(/(?:trident)(?:.*rv:([\w.]+))?/i),l=i.match(/Firefox\/([\d.]+)/),y=i.match(/Safari\/([\d.]+)/),w=i.match(/OPR\/([\d.]+)/);return n&&(e.webkit=parseFloat(n[1])),s&&(e.chrome=parseFloat(s[1])),a&&(e.ie=parseFloat(a[1])),l&&(e.firefox=parseFloat(l[1])),y&&(e.safari=parseFloat(y[1])),w&&(e.opera=parseFloat(w[1])),e}(navigator.userAgent),os:function(i){var e={},n=i.match(/(?:Android);?[\s\/]+([\d.]+)?/),s=i.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return n&&(e.android=parseFloat(n[1])),s&&(e.ios=parseFloat(s[1].replace(/_/g,"."))),e}(navigator.userAgent),inherits:function(i,e,n){var s;return typeof e=="function"?(s=e,e=null):s=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return i.apply(this,arguments)},f.extend(!0,s,i,n||{}),s.__super__=i.prototype,s.prototype=o(i.prototype),e&&f.extend(!0,s.prototype,e),s},noop:t,bindFn:u,log:function(){return I.console?u(console.log,console):t}(),nextTick:function(){return function(i){setTimeout(i,1)}}(),slice:d([].slice),guid:function(){var i=0;return function(e){for(var n=(+new Date).toString(32),s=0;5>s;s++)n+=Math.floor(65535*Math.random()).toString(32);return(e||"wu_")+n+(i++).toString(32)}}(),formatSize:function(i,e,n){var s;for(n=n||["B","K","M","G","TB"];(s=n.shift())&&i>1024;)i/=1024;return(s==="B"?i:i.toFixed(e||2))+s}}}),k("mediator",["base"],function(f){function p(e,n,s,a){return t.grep(e,function(l){return!(!l||n&&l.e!==n||s&&l.cb!==s&&l.cb._cb!==s||a&&l.ctx!==a)})}function d(e,n,s){t.each((e||"").split(i),function(a,l){s(l,n)})}function u(e,n){for(var s,a=!1,l=-1,y=e.length;++l<y;)if(s=e[l],s.cb.apply(s.ctx2,n)===!1){a=!0;break}return!a}var o,t=f.$,r=[].slice,i=/\s+/;return o={on:function(e,n,s){var a,l=this;return n?(a=this._events||(this._events=[]),d(e,n,function(y,w){var R={e:y};R.cb=w,R.ctx=s,R.ctx2=s||l,R.id=a.length,a.push(R)}),this):this},once:function(e,n,s){var a=this;return n&&d(e,n,function(l,y){var w=function(){return a.off(l,w),y.apply(s||a,arguments)};w._cb=y,a.on(l,w,s)}),a},off:function(e,n,s){var a=this._events;return a?e||n||s?(d(e,n,function(l,y){t.each(p(a,l,y,s),function(){delete a[this.id]})}),this):(this._events=[],this):this},trigger:function(e