You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
32 KiB
1 line
32 KiB
4 months ago
|
!function(i){function o(e,t){var i,n,r;if("string"==typeof e)return s(e);for(i=[],n=e.length,r=0;r<n;r++)i.push(s(e[r]));return t.apply(null,i)}var e,v,t,n,u={},r=function(e,t,i){var n,r={exports:t};"function"==typeof t&&(i.length||(i=[o,r.exports,r]),void 0!==(n=t.apply(null,i))&&(r.exports=n)),u[e]=r.exports},s=function(e){var t=u[e]||i[e];if(!t)throw new Error("`"+e+"` is undefined");return t},a=(v=i,n=o,(t=function(e,t,i){2===arguments.length&&(i=t,t=null),o(t||[],function(){r(e,i,arguments)})})("dollar-third",[],function(){return v.jQuery||v.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(s,e){function t(){}var n,i,r,o,u,a,c,l,f,h,p,d,g,m,_=Function.call;function b(e,t){return function(){return e.apply(t,arguments)}}return{version:"0.1.2",$:s,Deferred:e.Deferred,isPromise:e.isPromise,when:e.when,browser:(c=navigator.userAgent,l={},f=c.match(/WebKit\/([\d.]+)/),h=c.match(/Chrome\/([\d.]+)/)||c.match(/CriOS\/([\d.]+)/),p=c.match(/MSIE\s([\d\.]+)/)||c.match(/(?:trident)(?:.*rv:([\w.]+))?/i),d=c.match(/Firefox\/([\d.]+)/),g=c.match(/Safari\/([\d.]+)/),m=c.match(/OPR\/([\d.]+)/),f&&(l.webkit=parseFloat(f[1])),h&&(l.chrome=parseFloat(h[1])),p&&(l.ie=parseFloat(p[1])),d&&(l.firefox=parseFloat(d[1])),g&&(l.safari=parseFloat(g[1])),m&&(l.opera=parseFloat(m[1])),l),os:(r=navigator.userAgent,o={},u=r.match(/(?:Android);?[\s\/]+([\d.]+)?/),a=r.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/),u&&(o.android=parseFloat(u[1])),a&&(o.ios=parseFloat(a[1].replace(/_/g,"."))),o),inherits:function(e,t,i){var n,r,o;return"function"==typeof t?(n=t,t=null):n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},s.extend(!0,n,e,i||{}),n.__super__=e.prototype,n.prototype=(r=e.prototype,Object.create?Object.create(r):((o=function(){}).prototype=r,new o)),t&&s.extend(!0,n.prototype,t),n},noop:t,bindFn:b,log:v.console?b(console.log,console):t,nextTick:function(e){setTimeout(e,1)},slice:(i=[].slice,function(){return _.apply(i,arguments)}),guid:(n=0,function(e){for(var t=(+new Date).toString(32),i=0;i<5;i++)t+=Math.floor(65535*Math.random()).toString(32);return(e||"wu_")+t+(n++).toString(32)}),formatSize:function(e,t,i){var n;for(i=i||["B","K","M","G","TB"];(n=i.shift())&&1024<e;)e/=1024;return("B"===n?e:e.toFixed(t||2))+n}}}),t("mediator",["base"],function(e){var t,r=e.$,o=[].slice,s=/\s+/;function u(e,t,i,n){return r.grep(e,function(e){return e&&(!t||e.e===t)&&(!i||e.cb===i||e.cb._cb===i)&&(!n||e.ctx===n)})}function a(e,i,n){r.each((e||"").split(s),function(e,t){n(t,i)})}function c(e,t){for(var i,n=!1,r=-1,o=e.length;++r<o;)if(!1===(i=e[r]).cb.apply(i.ctx2,t)){n=!0;break}return!n}return t={on:function(e,t,n){var r,o=this;return t&&(r=this._events||(this._events=[]),a(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},once:function(e,t,n){var r=this;return t&&a(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},off:function(e,t,i){var n=this._events;return n&&(e||t||i?a(e,t,function(e,t){r.each(u(n,e,t,i),function(){delete n[this.id]})}):this._events=[]),this},trigger:function(e){var t,i,n;return this._events&&e?(t=o.call(arguments,1),i=u(this._events,e),n=u(this._events,"all"),c(i,t)&&c(n,arguments)):this}},r.extend({installTo:function(e){return r.extend(e,t)}},t)}),t("uploader",["base","mediator"],function(e,r){var o=e.$;function i(e){this.options=o.extend(!0,{},i.options,e),this._init(this.options)}return i.options={},r.installTo(i.prototype),o.each({upload:"start-upload",stop:"stop-upload",getFile:"get-file",getFiles:"get-files",addFile:"add-file",addFiles:"add-file",sort:"sort-files",removeFile:"remove-file",skipFile:"skip-file",retry:"retry",isInProgress:"is-in-progress",makeThumb:"make-thumb",getDimension:"get-dimension",addButton:"add-btn",getRuntimeType:"get-runtime-type",r
|