Files
Testing/plupload/js/plupload.min.js

13 lines
31 KiB
JavaScript
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
/**
* Plupload - multi-runtime File Uploader
* v3.1.2
*
* Copyright 2018, Ephox
* Released under AGPLv3 License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*
* Date: 2018-02-20
*/
!function(t,e){var i=function(){var t={};return e.apply(t,arguments),t.plupload};"function"==typeof define&&define.amd?define("plupload",["./moxie"],i):"object"==typeof module&&module.exports?module.exports=i(require("./moxie")):t.plupload=i(t.moxie)}(this||window,function(t){!function(e,i){"use strict";function n(t,e){for(var i,n=[],r=0;r<t.length;++r){if(i=a[t[r]]||s(t[r]),!i)throw"module definition dependecy not found: "+t[r];n.push(i)}e.apply(null,n)}function r(t,e,r){if("string"!=typeof t)throw"invalid module definition, module id must be defined and be a string";if(e===i)throw"invalid module definition, dependencies must be specified";if(r===i)throw"invalid module definition, definition function must be specified";n(e,function(){a[t]=r.apply(null,arguments)})}function s(t){for(var i=e,n=t.split(/[.\/]/),r=0;r<n.length;++r){if(!i[n[r]])return;i=i[n[r]]}return i}function o(t){for(var n=0;n<t.length;n++){for(var r=e,s=t[n],o=s.split(/[.\/]/),u=0;u<o.length-1;++u)r[o[u]]===i&&(r[o[u]]={}),r=r[o[u]];r[o[o.length-1]]=a[s]}}var a={};r("plupload",[],function(){var e=t,i=e.core.utils;return i.Env.global_event_dispatcher="plupload.EventTarget.instance.dispatchEvent",{VERSION:"3.1.2",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,FILE_DUPLICATE_ERROR:-602,IMAGE_FORMAT_ERROR:-700,MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,OPTION_ERROR:-800,moxie:e,ua:i.Env,typeOf:i.Basic.typeOf,clone:i.Basic.clone,inherit:i.Basic.inherit,extend:i.Basic.extend,extendImmutable:i.Basic.extendImmutable,extendIf:i.Basic.extendIf,inSeries:i.Basic.inSeries,inParallel:i.Basic.inParallel,guid:i.Basic.guid,getAll:function(t){var e,n=[];"array"!==i.Basic.typeOf(t)&&(t=[t]);for(var r=t.length;r--;)e=i.Dom.get(t[r]),e&&n.push(e);return n.length?n:null},get:i.Dom.get,each:i.Basic.each,getPos:i.Dom.getPos,getSize:i.Dom.getSize,xmlEncode:function(t){var e={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g;return t?(""+t).replace(i,function(t){return e[t]?"&"+e[t]+";":t}):t},toArray:i.Basic.toArray,inArray:i.Basic.inArray,addI18n:e.core.I18n.addI18n,translate:e.core.I18n.translate,sprintf:i.Basic.sprintf,isEmptyObj:i.Basic.isEmptyObj,hasClass:i.Dom.hasClass,addClass:i.Dom.addClass,removeClass:i.Dom.removeClass,getStyle:i.Dom.getStyle,addEvent:i.Events.addEvent,removeEvent:i.Events.removeEvent,removeAllEvents:i.Events.removeAllEvents,cleanName:function(t){var e,i;for(i=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],e=0;e<i.length;e+=2)t=t.replace(i[e],i[e+1]);return t=t.replace(/\s+/g,"_"),t=t.replace(/[^a-z0-9_\-\.]+/gi,"")},buildUrl:function(t,e){var n="";return i.Basic.each(e,function(t,e){n+=(n?"&":"")+encodeURIComponent(e)+"="+encodeURIComponent(t)}),n&&(t+=(t.indexOf("?")>0?"&":"?")+n),t},formatSize:function(t){function e(t,e){return Math.round(t*Math.pow(10,e))/Math.pow(10,e)}var i=this;if(t=parseInt(t,10),isNaN(t))return i.translate("N/A");var n=Math.pow(1024,4);return t>n?e(t/n,1)+" "+i.translate("tb"):t>(n/=1024)?e(t/n,1)+" "+i.translate("gb"):t>(n/=1024)?e(t/n,1)+" "+i.translate("mb"):t>1024?Math.round(t/1024)+" "+i.translate("kb"):t+" "+i.translate("b")},mimes2extList:t.core.utils.Mime.mimes2extList,resolveUrl:i.Url.resolveUrl,parseSize:i.Basic.parseSizeStr,delay:i.Basic.delay,EventTarget:t.core.EventTarget,Runtime:t.runtime.Runtime,FileInput:t.file.FileInput,FileReader:t.file.FileReader}}),r("plupload/core/Collection",["plupload"],function(){var t=function(){function e(){var t;for(t in n);return n[t]}var i,n={},r=0;plupload.extend(this,{count:function(){return r},hasKey:function(t){return n.hasOwnProperty(t)},get:function(t){return n[t]},first:function(){for(var t in n)return n[t]},last:function(){return i},toObject:function(){return n},add:function(t,e){var s=this;return"object"!=typeof t||e?n.hasOwn