(function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=function(){try{return!!(new Blob)}catch(a){return!1}}(),d=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,e=(c||d)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,e,f,g,h,i;a.split(",")[0].indexOf("base64")>=0?b=atob(a.split(",")[1]):b=decodeURIComponent(a.split(",")[1]),e=new ArrayBuffer(b.length),f=new Uint8Array(e);for(g=0;g<b.length;g+=1)f[g]=b.charCodeAt(g);return i=a.split(",")[0].split(":")[1].split(";")[0],c?new Blob([e],{type:i}):(h=new d,h.append(e),h.getBlob(i))};a.HTMLCanvasElement&&!b.toBlob&&(b.mozGetAsFile?b.toBlob=function(a,b){a(this.mozGetAsFile("blob",b))}:b.toDataURL&&e&&(b.toBlob=function(a,b){a(e(this.toDataURL(b)))})),typeof define!="undefined"&&define.amd?define(function(){return e}):a.dataURLtoBlob=e})(this);
|