no message
Former-commit-id: 5d4fc8ad17870dd49f0f3096772fed4fc483271b Former-commit-id: c0ebeab6257f49e96972f7c6da97f6f7b9763042 Former-commit-id: b4f3f13275592d01e25443869a7ff691383ac544
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
/* Blob.js
|
/* Blob.js
|
||||||
* A Blob implementation.
|
* A Blob implementation.
|
||||||
* 2014-05-27
|
* 2018-01-12
|
||||||
*
|
*
|
||||||
* By Eli Grey, http://eligrey.com
|
* By Eli Grey, http://eligrey.com
|
||||||
* By Devin Samarin, https://github.com/eboyjr
|
* By Devin Samarin, https://github.com/dsamarin
|
||||||
* License: X11/MIT
|
* License: MIT
|
||||||
* See LICENSE.md
|
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*global self, unescape */
|
/*global self, unescape */
|
||||||
@@ -63,13 +64,31 @@
|
|||||||
|
|
||||||
, ArrayBuffer = view.ArrayBuffer
|
, ArrayBuffer = view.ArrayBuffer
|
||||||
, Uint8Array = view.Uint8Array
|
, Uint8Array = view.Uint8Array
|
||||||
|
|
||||||
|
, origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/
|
||||||
;
|
;
|
||||||
FakeBlob.fake = FB_proto.fake = true;
|
FakeBlob.fake = FB_proto.fake = true;
|
||||||
while (file_ex_code--) {
|
while (file_ex_code--) {
|
||||||
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
|
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
|
||||||
}
|
}
|
||||||
|
// Polyfill URL
|
||||||
if (!real_URL.createObjectURL) {
|
if (!real_URL.createObjectURL) {
|
||||||
URL = view.URL = {};
|
URL = view.URL = function(uri) {
|
||||||
|
var
|
||||||
|
uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
|
||||||
|
, uri_origin
|
||||||
|
;
|
||||||
|
uri_info.href = uri;
|
||||||
|
if (!("origin" in uri_info)) {
|
||||||
|
if (uri_info.protocol.toLowerCase() === "data:") {
|
||||||
|
uri_info.origin = null;
|
||||||
|
} else {
|
||||||
|
uri_origin = uri.match(origin);
|
||||||
|
uri_info.origin = uri_origin && uri_origin[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return uri_info;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
URL.createObjectURL = function(blob) {
|
URL.createObjectURL = function(blob) {
|
||||||
var
|
var
|
||||||
@@ -161,19 +180,38 @@
|
|||||||
return "[object Blob]";
|
return "[object Blob]";
|
||||||
};
|
};
|
||||||
FB_proto.close = function() {
|
FB_proto.close = function() {
|
||||||
this.size = this.data.length = 0;
|
this.size = 0;
|
||||||
|
delete this.data;
|
||||||
};
|
};
|
||||||
return FakeBlobBuilder;
|
return FakeBlobBuilder;
|
||||||
}(view));
|
}(view));
|
||||||
|
|
||||||
view.Blob = function Blob(blobParts, options) {
|
view.Blob = function(blobParts, options) {
|
||||||
var type = options ? (options.type || "") : "";
|
var type = options ? (options.type || "") : "";
|
||||||
var builder = new BlobBuilder();
|
var builder = new BlobBuilder();
|
||||||
if (blobParts) {
|
if (blobParts) {
|
||||||
for (var i = 0, len = blobParts.length; i < len; i++) {
|
for (var i = 0, len = blobParts.length; i < len; i++) {
|
||||||
|
if (Uint8Array && blobParts[i] instanceof Uint8Array) {
|
||||||
|
builder.append(blobParts[i].buffer);
|
||||||
|
}
|
||||||
|
else {
|
||||||
builder.append(blobParts[i]);
|
builder.append(blobParts[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return builder.getBlob(type);
|
}
|
||||||
|
var blob = builder.getBlob(type);
|
||||||
|
if (!blob.slice && blob.webkitSlice) {
|
||||||
|
blob.slice = blob.webkitSlice;
|
||||||
|
}
|
||||||
|
return blob;
|
||||||
};
|
};
|
||||||
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
|
|
||||||
|
var getPrototypeOf = Object.getPrototypeOf || function(object) {
|
||||||
|
return object.__proto__;
|
||||||
|
};
|
||||||
|
view.Blob.prototype = getPrototypeOf(new view.Blob());
|
||||||
|
}(
|
||||||
|
typeof self !== "undefined" && self
|
||||||
|
|| typeof window !== "undefined" && window
|
||||||
|
|| this
|
||||||
|
));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import FileSaver from 'file-saver'
|
|
||||||
import './_blob'
|
import './_blob'
|
||||||
|
import FileSaver from 'file-saver'
|
||||||
import XLSX from 'xlsx'
|
import XLSX from 'xlsx'
|
||||||
|
|
||||||
function generateArray(table) {
|
function generateArray(table) {
|
||||||
|
|||||||
Reference in New Issue
Block a user