dldiscuss
Version:
#### 介绍 {**以下是 Gitee 平台说明,您可以替换此简介** Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
966 lines (963 loc) • 235 kB
JavaScript
import { defineComponent as xe, ref as Se, onMounted as Ce, openBlock as Ae, createElementBlock as Pe } from "vue";
import { c as Dt, g as Ee } from "./_commonjsHelpers-DaMA6jEr.mjs";
import { useRoute as Ne } from "vue-router";
import { o as Te } from "./discussCom-BiaeqCV0.mjs";
function It(d) {
throw new Error('Could not dynamically require "' + d + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
}
var ie = { exports: {} };
/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/
(function(d, e) {
(function(t) {
d.exports = t();
})(function() {
return function t(r, n, a) {
function i(v, w) {
if (!n[v]) {
if (!r[v]) {
var _ = typeof It == "function" && It;
if (!w && _)
return _(v, !0);
if (o)
return o(v, !0);
var k = new Error("Cannot find module '" + v + "'");
throw k.code = "MODULE_NOT_FOUND", k;
}
var u = n[v] = { exports: {} };
r[v][0].call(u.exports, function(y) {
var h = r[v][1][y];
return i(h || y);
}, u, u.exports, t, r, n, a);
}
return n[v].exports;
}
for (var o = typeof It == "function" && It, c = 0; c < a.length; c++)
i(a[c]);
return i;
}({ 1: [function(t, r, n) {
var a = t("./utils"), i = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
n.encode = function(c) {
for (var v, w, _, k, u, y, h, m = [], f = 0, b = c.length, S = b, P = a.getTypeOf(c) !== "string"; f < c.length; )
S = b - f, _ = P ? (v = c[f++], w = f < b ? c[f++] : 0, f < b ? c[f++] : 0) : (v = c.charCodeAt(f++), w = f < b ? c.charCodeAt(f++) : 0, f < b ? c.charCodeAt(f++) : 0), k = v >> 2, u = (3 & v) << 4 | w >> 4, y = 1 < S ? (15 & w) << 2 | _ >> 6 : 64, h = 2 < S ? 63 & _ : 64, m.push(o.charAt(k) + o.charAt(u) + o.charAt(y) + o.charAt(h));
return m.join("");
}, n.decode = function(c) {
var v, w, _, k, u, y, h = 0, m = 0, f = "data:";
if (c.substr(0, f.length) === f)
throw new Error("Invalid base64 input, it looks like a data url.");
var b, S = 3 * (c = c.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
if (c.charAt(c.length - 1) === o.charAt(64) && S--, c.charAt(c.length - 2) === o.charAt(64) && S--, S % 1 != 0)
throw new Error("Invalid base64 input, bad content length.");
for (b = i.uint8array ? new Uint8Array(0 | S) : new Array(0 | S); h < c.length; )
v = o.indexOf(c.charAt(h++)) << 2 | (k = o.indexOf(c.charAt(h++))) >> 4, w = (15 & k) << 4 | (u = o.indexOf(c.charAt(h++))) >> 2, _ = (3 & u) << 6 | (y = o.indexOf(c.charAt(h++))), b[m++] = v, u !== 64 && (b[m++] = w), y !== 64 && (b[m++] = _);
return b;
};
}, { "./support": 30, "./utils": 32 }], 2: [function(t, r, n) {
var a = t("./external"), i = t("./stream/DataWorker"), o = t("./stream/Crc32Probe"), c = t("./stream/DataLengthProbe");
function v(w, _, k, u, y) {
this.compressedSize = w, this.uncompressedSize = _, this.crc32 = k, this.compression = u, this.compressedContent = y;
}
v.prototype = { getContentWorker: function() {
var w = new i(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")), _ = this;
return w.on("end", function() {
if (this.streamInfo.data_length !== _.uncompressedSize)
throw new Error("Bug : uncompressed data size mismatch");
}), w;
}, getCompressedWorker: function() {
return new i(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
} }, v.createWorkerFrom = function(w, _, k) {
return w.pipe(new o()).pipe(new c("uncompressedSize")).pipe(_.compressWorker(k)).pipe(new c("compressedSize")).withStreamInfo("compression", _);
}, r.exports = v;
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(t, r, n) {
var a = t("./stream/GenericWorker");
n.STORE = { magic: "\0\0", compressWorker: function() {
return new a("STORE compression");
}, uncompressWorker: function() {
return new a("STORE decompression");
} }, n.DEFLATE = t("./flate");
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(t, r, n) {
var a = t("./utils"), i = function() {
for (var o, c = [], v = 0; v < 256; v++) {
o = v;
for (var w = 0; w < 8; w++)
o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
c[v] = o;
}
return c;
}();
r.exports = function(o, c) {
return o !== void 0 && o.length ? a.getTypeOf(o) !== "string" ? function(v, w, _, k) {
var u = i, y = k + _;
v ^= -1;
for (var h = k; h < y; h++)
v = v >>> 8 ^ u[255 & (v ^ w[h])];
return -1 ^ v;
}(0 | c, o, o.length, 0) : function(v, w, _, k) {
var u = i, y = k + _;
v ^= -1;
for (var h = k; h < y; h++)
v = v >>> 8 ^ u[255 & (v ^ w.charCodeAt(h))];
return -1 ^ v;
}(0 | c, o, o.length, 0) : 0;
};
}, { "./utils": 32 }], 5: [function(t, r, n) {
n.base64 = !1, n.binary = !1, n.dir = !1, n.createFolders = !0, n.date = null, n.compression = null, n.compressionOptions = null, n.comment = null, n.unixPermissions = null, n.dosPermissions = null;
}, {}], 6: [function(t, r, n) {
var a = null;
a = typeof Promise < "u" ? Promise : t("lie"), r.exports = { Promise: a };
}, { lie: 37 }], 7: [function(t, r, n) {
var a = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", i = t("pako"), o = t("./utils"), c = t("./stream/GenericWorker"), v = a ? "uint8array" : "array";
function w(_, k) {
c.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions = k, this.meta = {};
}
n.magic = "\b\0", o.inherits(w, c), w.prototype.processChunk = function(_) {
this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(v, _.data), !1);
}, w.prototype.flush = function() {
c.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
}, w.prototype.cleanUp = function() {
c.prototype.cleanUp.call(this), this._pako = null;
}, w.prototype._createPako = function() {
this._pako = new i[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
var _ = this;
this._pako.onData = function(k) {
_.push({ data: k, meta: _.meta });
};
}, n.compressWorker = function(_) {
return new w("Deflate", _);
}, n.uncompressWorker = function() {
return new w("Inflate", {});
};
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(t, r, n) {
function a(u, y) {
var h, m = "";
for (h = 0; h < y; h++)
m += String.fromCharCode(255 & u), u >>>= 8;
return m;
}
function i(u, y, h, m, f, b) {
var S, P, A = u.file, F = u.compression, I = b !== v.utf8encode, H = o.transformTo("string", b(A.name)), D = o.transformTo("string", v.utf8encode(A.name)), V = A.comment, Q = o.transformTo("string", b(V)), x = o.transformTo("string", v.utf8encode(V)), M = D.length !== A.name.length, l = x.length !== V.length, L = "", et = "", W = "", rt = A.dir, $ = A.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
y && !h || (tt.crc32 = u.crc32, tt.compressedSize = u.compressedSize, tt.uncompressedSize = u.uncompressedSize);
var z = 0;
y && (z |= 8), I || !M && !l || (z |= 2048);
var T = 0, J = 0;
rt && (T |= 16), f === "UNIX" ? (J = 798, T |= function(X, ut) {
var bt = X;
return X || (bt = ut ? 16893 : 33204), (65535 & bt) << 16;
}(A.unixPermissions, rt)) : (J = 20, T |= function(X) {
return 63 & (X || 0);
}(A.dosPermissions)), S = $.getUTCHours(), S <<= 6, S |= $.getUTCMinutes(), S <<= 5, S |= $.getUTCSeconds() / 2, P = $.getUTCFullYear() - 1980, P <<= 4, P |= $.getUTCMonth() + 1, P <<= 5, P |= $.getUTCDate(), M && (et = a(1, 1) + a(w(H), 4) + D, L += "up" + a(et.length, 2) + et), l && (W = a(1, 1) + a(w(Q), 4) + x, L += "uc" + a(W.length, 2) + W);
var q = "";
return q += `
\0`, q += a(z, 2), q += F.magic, q += a(S, 2), q += a(P, 2), q += a(tt.crc32, 4), q += a(tt.compressedSize, 4), q += a(tt.uncompressedSize, 4), q += a(H.length, 2), q += a(L.length, 2), { fileRecord: _.LOCAL_FILE_HEADER + q + H + L, dirRecord: _.CENTRAL_FILE_HEADER + a(J, 2) + q + a(Q.length, 2) + "\0\0\0\0" + a(T, 4) + a(m, 4) + H + L + Q };
}
var o = t("../utils"), c = t("../stream/GenericWorker"), v = t("../utf8"), w = t("../crc32"), _ = t("../signature");
function k(u, y, h, m) {
c.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = y, this.zipPlatform = h, this.encodeFileName = m, this.streamFiles = u, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
}
o.inherits(k, c), k.prototype.push = function(u) {
var y = u.meta.percent || 0, h = this.entriesCount, m = this._sources.length;
this.accumulate ? this.contentBuffer.push(u) : (this.bytesWritten += u.data.length, c.prototype.push.call(this, { data: u.data, meta: { currentFile: this.currentFile, percent: h ? (y + 100 * (h - m - 1)) / h : 100 } }));
}, k.prototype.openedSource = function(u) {
this.currentSourceOffset = this.bytesWritten, this.currentFile = u.file.name;
var y = this.streamFiles && !u.file.dir;
if (y) {
var h = i(u, y, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
this.push({ data: h.fileRecord, meta: { percent: 0 } });
} else
this.accumulate = !0;
}, k.prototype.closedSource = function(u) {
this.accumulate = !1;
var y = this.streamFiles && !u.file.dir, h = i(u, y, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
if (this.dirRecords.push(h.dirRecord), y)
this.push({ data: function(m) {
return _.DATA_DESCRIPTOR + a(m.crc32, 4) + a(m.compressedSize, 4) + a(m.uncompressedSize, 4);
}(u), meta: { percent: 100 } });
else
for (this.push({ data: h.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; )
this.push(this.contentBuffer.shift());
this.currentFile = null;
}, k.prototype.flush = function() {
for (var u = this.bytesWritten, y = 0; y < this.dirRecords.length; y++)
this.push({ data: this.dirRecords[y], meta: { percent: 100 } });
var h = this.bytesWritten - u, m = function(f, b, S, P, A) {
var F = o.transformTo("string", A(P));
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(f, 2) + a(f, 2) + a(b, 4) + a(S, 4) + a(F.length, 2) + F;
}(this.dirRecords.length, h, u, this.zipComment, this.encodeFileName);
this.push({ data: m, meta: { percent: 100 } });
}, k.prototype.prepareNextSource = function() {
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
}, k.prototype.registerPrevious = function(u) {
this._sources.push(u);
var y = this;
return u.on("data", function(h) {
y.processChunk(h);
}), u.on("end", function() {
y.closedSource(y.previous.streamInfo), y._sources.length ? y.prepareNextSource() : y.end();
}), u.on("error", function(h) {
y.error(h);
}), this;
}, k.prototype.resume = function() {
return !!c.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
}, k.prototype.error = function(u) {
var y = this._sources;
if (!c.prototype.error.call(this, u))
return !1;
for (var h = 0; h < y.length; h++)
try {
y[h].error(u);
} catch {
}
return !0;
}, k.prototype.lock = function() {
c.prototype.lock.call(this);
for (var u = this._sources, y = 0; y < u.length; y++)
u[y].lock();
}, r.exports = k;
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(t, r, n) {
var a = t("../compressions"), i = t("./ZipFileWorker");
n.generateWorker = function(o, c, v) {
var w = new i(c.streamFiles, v, c.platform, c.encodeFileName), _ = 0;
try {
o.forEach(function(k, u) {
_++;
var y = function(b, S) {
var P = b || S, A = a[P];
if (!A)
throw new Error(P + " is not a valid compression method !");
return A;
}(u.options.compression, c.compression), h = u.options.compressionOptions || c.compressionOptions || {}, m = u.dir, f = u.date;
u._compressWorker(y, h).withStreamInfo("file", { name: k, dir: m, date: f, comment: u.comment || "", unixPermissions: u.unixPermissions, dosPermissions: u.dosPermissions }).pipe(w);
}), w.entriesCount = _;
} catch (k) {
w.error(k);
}
return w;
};
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(t, r, n) {
function a() {
if (!(this instanceof a))
return new a();
if (arguments.length)
throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
var i = new a();
for (var o in this)
typeof this[o] != "function" && (i[o] = this[o]);
return i;
};
}
(a.prototype = t("./object")).loadAsync = t("./load"), a.support = t("./support"), a.defaults = t("./defaults"), a.version = "3.10.1", a.loadAsync = function(i, o) {
return new a().loadAsync(i, o);
}, a.external = t("./external"), r.exports = a;
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(t, r, n) {
var a = t("./utils"), i = t("./external"), o = t("./utf8"), c = t("./zipEntries"), v = t("./stream/Crc32Probe"), w = t("./nodejsUtils");
function _(k) {
return new i.Promise(function(u, y) {
var h = k.decompressed.getContentWorker().pipe(new v());
h.on("error", function(m) {
y(m);
}).on("end", function() {
h.streamInfo.crc32 !== k.decompressed.crc32 ? y(new Error("Corrupted zip : CRC32 mismatch")) : u();
}).resume();
});
}
r.exports = function(k, u) {
var y = this;
return u = a.extend(u || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), w.isNode && w.isStream(k) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : a.prepareContent("the loaded zip file", k, !0, u.optimizedBinaryString, u.base64).then(function(h) {
var m = new c(u);
return m.load(h), m;
}).then(function(h) {
var m = [i.Promise.resolve(h)], f = h.files;
if (u.checkCRC32)
for (var b = 0; b < f.length; b++)
m.push(_(f[b]));
return i.Promise.all(m);
}).then(function(h) {
for (var m = h.shift(), f = m.files, b = 0; b < f.length; b++) {
var S = f[b], P = S.fileNameStr, A = a.resolve(S.fileNameStr);
y.file(A, S.decompressed, { binary: !0, optimizedBinaryString: !0, date: S.date, dir: S.dir, comment: S.fileCommentStr.length ? S.fileCommentStr : null, unixPermissions: S.unixPermissions, dosPermissions: S.dosPermissions, createFolders: u.createFolders }), S.dir || (y.file(A).unsafeOriginalName = P);
}
return m.zipComment.length && (y.comment = m.zipComment), y;
});
};
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(t, r, n) {
var a = t("../utils"), i = t("../stream/GenericWorker");
function o(c, v) {
i.call(this, "Nodejs stream input adapter for " + c), this._upstreamEnded = !1, this._bindStream(v);
}
a.inherits(o, i), o.prototype._bindStream = function(c) {
var v = this;
(this._stream = c).pause(), c.on("data", function(w) {
v.push({ data: w, meta: { percent: 0 } });
}).on("error", function(w) {
v.isPaused ? this.generatedError = w : v.error(w);
}).on("end", function() {
v.isPaused ? v._upstreamEnded = !0 : v.end();
});
}, o.prototype.pause = function() {
return !!i.prototype.pause.call(this) && (this._stream.pause(), !0);
}, o.prototype.resume = function() {
return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
}, r.exports = o;
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(t, r, n) {
var a = t("readable-stream").Readable;
function i(o, c, v) {
a.call(this, c), this._helper = o;
var w = this;
o.on("data", function(_, k) {
w.push(_) || w._helper.pause(), v && v(k);
}).on("error", function(_) {
w.emit("error", _);
}).on("end", function() {
w.push(null);
});
}
t("../utils").inherits(i, a), i.prototype._read = function() {
this._helper.resume();
}, r.exports = i;
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(t, r, n) {
r.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(a, i) {
if (Buffer.from && Buffer.from !== Uint8Array.from)
return Buffer.from(a, i);
if (typeof a == "number")
throw new Error('The "data" argument must not be a number');
return new Buffer(a, i);
}, allocBuffer: function(a) {
if (Buffer.alloc)
return Buffer.alloc(a);
var i = new Buffer(a);
return i.fill(0), i;
}, isBuffer: function(a) {
return Buffer.isBuffer(a);
}, isStream: function(a) {
return a && typeof a.on == "function" && typeof a.pause == "function" && typeof a.resume == "function";
} };
}, {}], 15: [function(t, r, n) {
function a(A, F, I) {
var H, D = o.getTypeOf(F), V = o.extend(I || {}, w);
V.date = V.date || /* @__PURE__ */ new Date(), V.compression !== null && (V.compression = V.compression.toUpperCase()), typeof V.unixPermissions == "string" && (V.unixPermissions = parseInt(V.unixPermissions, 8)), V.unixPermissions && 16384 & V.unixPermissions && (V.dir = !0), V.dosPermissions && 16 & V.dosPermissions && (V.dir = !0), V.dir && (A = f(A)), V.createFolders && (H = m(A)) && b.call(this, H, !0);
var Q = D === "string" && V.binary === !1 && V.base64 === !1;
I && I.binary !== void 0 || (V.binary = !Q), (F instanceof _ && F.uncompressedSize === 0 || V.dir || !F || F.length === 0) && (V.base64 = !1, V.binary = !0, F = "", V.compression = "STORE", D = "string");
var x = null;
x = F instanceof _ || F instanceof c ? F : y.isNode && y.isStream(F) ? new h(A, F) : o.prepareContent(A, F, V.binary, V.optimizedBinaryString, V.base64);
var M = new k(A, x, V);
this.files[A] = M;
}
var i = t("./utf8"), o = t("./utils"), c = t("./stream/GenericWorker"), v = t("./stream/StreamHelper"), w = t("./defaults"), _ = t("./compressedObject"), k = t("./zipObject"), u = t("./generate"), y = t("./nodejsUtils"), h = t("./nodejs/NodejsStreamInputAdapter"), m = function(A) {
A.slice(-1) === "/" && (A = A.substring(0, A.length - 1));
var F = A.lastIndexOf("/");
return 0 < F ? A.substring(0, F) : "";
}, f = function(A) {
return A.slice(-1) !== "/" && (A += "/"), A;
}, b = function(A, F) {
return F = F !== void 0 ? F : w.createFolders, A = f(A), this.files[A] || a.call(this, A, null, { dir: !0, createFolders: F }), this.files[A];
};
function S(A) {
return Object.prototype.toString.call(A) === "[object RegExp]";
}
var P = { load: function() {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
}, forEach: function(A) {
var F, I, H;
for (F in this.files)
H = this.files[F], (I = F.slice(this.root.length, F.length)) && F.slice(0, this.root.length) === this.root && A(I, H);
}, filter: function(A) {
var F = [];
return this.forEach(function(I, H) {
A(I, H) && F.push(H);
}), F;
}, file: function(A, F, I) {
if (arguments.length !== 1)
return A = this.root + A, a.call(this, A, F, I), this;
if (S(A)) {
var H = A;
return this.filter(function(V, Q) {
return !Q.dir && H.test(V);
});
}
var D = this.files[this.root + A];
return D && !D.dir ? D : null;
}, folder: function(A) {
if (!A)
return this;
if (S(A))
return this.filter(function(D, V) {
return V.dir && A.test(D);
});
var F = this.root + A, I = b.call(this, F), H = this.clone();
return H.root = I.name, H;
}, remove: function(A) {
A = this.root + A;
var F = this.files[A];
if (F || (A.slice(-1) !== "/" && (A += "/"), F = this.files[A]), F && !F.dir)
delete this.files[A];
else
for (var I = this.filter(function(D, V) {
return V.name.slice(0, A.length) === A;
}), H = 0; H < I.length; H++)
delete this.files[I[H].name];
return this;
}, generate: function() {
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
}, generateInternalStream: function(A) {
var F, I = {};
try {
if ((I = o.extend(A || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i.utf8encode })).type = I.type.toLowerCase(), I.compression = I.compression.toUpperCase(), I.type === "binarystring" && (I.type = "string"), !I.type)
throw new Error("No output type specified.");
o.checkSupport(I.type), I.platform !== "darwin" && I.platform !== "freebsd" && I.platform !== "linux" && I.platform !== "sunos" || (I.platform = "UNIX"), I.platform === "win32" && (I.platform = "DOS");
var H = I.comment || this.comment || "";
F = u.generateWorker(this, I, H);
} catch (D) {
(F = new c("error")).error(D);
}
return new v(F, I.type || "string", I.mimeType);
}, generateAsync: function(A, F) {
return this.generateInternalStream(A).accumulate(F);
}, generateNodeStream: function(A, F) {
return (A = A || {}).type || (A.type = "nodebuffer"), this.generateInternalStream(A).toNodejsStream(F);
} };
r.exports = P;
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(t, r, n) {
r.exports = t("stream");
}, { stream: void 0 }], 17: [function(t, r, n) {
var a = t("./DataReader");
function i(o) {
a.call(this, o);
for (var c = 0; c < this.data.length; c++)
o[c] = 255 & o[c];
}
t("../utils").inherits(i, a), i.prototype.byteAt = function(o) {
return this.data[this.zero + o];
}, i.prototype.lastIndexOfSignature = function(o) {
for (var c = o.charCodeAt(0), v = o.charCodeAt(1), w = o.charCodeAt(2), _ = o.charCodeAt(3), k = this.length - 4; 0 <= k; --k)
if (this.data[k] === c && this.data[k + 1] === v && this.data[k + 2] === w && this.data[k + 3] === _)
return k - this.zero;
return -1;
}, i.prototype.readAndCheckSignature = function(o) {
var c = o.charCodeAt(0), v = o.charCodeAt(1), w = o.charCodeAt(2), _ = o.charCodeAt(3), k = this.readData(4);
return c === k[0] && v === k[1] && w === k[2] && _ === k[3];
}, i.prototype.readData = function(o) {
if (this.checkOffset(o), o === 0)
return [];
var c = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, c;
}, r.exports = i;
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(t, r, n) {
var a = t("../utils");
function i(o) {
this.data = o, this.length = o.length, this.index = 0, this.zero = 0;
}
i.prototype = { checkOffset: function(o) {
this.checkIndex(this.index + o);
}, checkIndex: function(o) {
if (this.length < this.zero + o || o < 0)
throw new Error("End of data reached (data length = " + this.length + ", asked index = " + o + "). Corrupted zip ?");
}, setIndex: function(o) {
this.checkIndex(o), this.index = o;
}, skip: function(o) {
this.setIndex(this.index + o);
}, byteAt: function() {
}, readInt: function(o) {
var c, v = 0;
for (this.checkOffset(o), c = this.index + o - 1; c >= this.index; c--)
v = (v << 8) + this.byteAt(c);
return this.index += o, v;
}, readString: function(o) {
return a.transformTo("string", this.readData(o));
}, readData: function() {
}, lastIndexOfSignature: function() {
}, readAndCheckSignature: function() {
}, readDate: function() {
var o = this.readInt(4);
return new Date(Date.UTC(1980 + (o >> 25 & 127), (o >> 21 & 15) - 1, o >> 16 & 31, o >> 11 & 31, o >> 5 & 63, (31 & o) << 1));
} }, r.exports = i;
}, { "../utils": 32 }], 19: [function(t, r, n) {
var a = t("./Uint8ArrayReader");
function i(o) {
a.call(this, o);
}
t("../utils").inherits(i, a), i.prototype.readData = function(o) {
this.checkOffset(o);
var c = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, c;
}, r.exports = i;
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(t, r, n) {
var a = t("./DataReader");
function i(o) {
a.call(this, o);
}
t("../utils").inherits(i, a), i.prototype.byteAt = function(o) {
return this.data.charCodeAt(this.zero + o);
}, i.prototype.lastIndexOfSignature = function(o) {
return this.data.lastIndexOf(o) - this.zero;
}, i.prototype.readAndCheckSignature = function(o) {
return o === this.readData(4);
}, i.prototype.readData = function(o) {
this.checkOffset(o);
var c = this.data.slice(this.zero + this.index, this.zero + this.index + o);
return this.index += o, c;
}, r.exports = i;
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(t, r, n) {
var a = t("./ArrayReader");
function i(o) {
a.call(this, o);
}
t("../utils").inherits(i, a), i.prototype.readData = function(o) {
if (this.checkOffset(o), o === 0)
return new Uint8Array(0);
var c = this.data.subarray(this.zero + this.index, this.zero + this.index + o);
return this.index += o, c;
}, r.exports = i;
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(t, r, n) {
var a = t("../utils"), i = t("../support"), o = t("./ArrayReader"), c = t("./StringReader"), v = t("./NodeBufferReader"), w = t("./Uint8ArrayReader");
r.exports = function(_) {
var k = a.getTypeOf(_);
return a.checkSupport(k), k !== "string" || i.uint8array ? k === "nodebuffer" ? new v(_) : i.uint8array ? new w(a.transformTo("uint8array", _)) : new o(a.transformTo("array", _)) : new c(_);
};
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(t, r, n) {
n.LOCAL_FILE_HEADER = "PK", n.CENTRAL_FILE_HEADER = "PK", n.CENTRAL_DIRECTORY_END = "PK", n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", n.ZIP64_CENTRAL_DIRECTORY_END = "PK", n.DATA_DESCRIPTOR = "PK\x07\b";
}, {}], 24: [function(t, r, n) {
var a = t("./GenericWorker"), i = t("../utils");
function o(c) {
a.call(this, "ConvertWorker to " + c), this.destType = c;
}
i.inherits(o, a), o.prototype.processChunk = function(c) {
this.push({ data: i.transformTo(this.destType, c.data), meta: c.meta });
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(t, r, n) {
var a = t("./GenericWorker"), i = t("../crc32");
function o() {
a.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
}
t("../utils").inherits(o, a), o.prototype.processChunk = function(c) {
this.streamInfo.crc32 = i(c.data, this.streamInfo.crc32 || 0), this.push(c);
}, r.exports = o;
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(t, r, n) {
var a = t("../utils"), i = t("./GenericWorker");
function o(c) {
i.call(this, "DataLengthProbe for " + c), this.propName = c, this.withStreamInfo(c, 0);
}
a.inherits(o, i), o.prototype.processChunk = function(c) {
if (c) {
var v = this.streamInfo[this.propName] || 0;
this.streamInfo[this.propName] = v + c.data.length;
}
i.prototype.processChunk.call(this, c);
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(t, r, n) {
var a = t("../utils"), i = t("./GenericWorker");
function o(c) {
i.call(this, "DataWorker");
var v = this;
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, c.then(function(w) {
v.dataIsReady = !0, v.data = w, v.max = w && w.length || 0, v.type = a.getTypeOf(w), v.isPaused || v._tickAndRepeat();
}, function(w) {
v.error(w);
});
}
a.inherits(o, i), o.prototype.cleanUp = function() {
i.prototype.cleanUp.call(this), this.data = null;
}, o.prototype.resume = function() {
return !!i.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, a.delay(this._tickAndRepeat, [], this)), !0);
}, o.prototype._tickAndRepeat = function() {
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (a.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
}, o.prototype._tick = function() {
if (this.isPaused || this.isFinished)
return !1;
var c = null, v = Math.min(this.max, this.index + 16384);
if (this.index >= this.max)
return this.end();
switch (this.type) {
case "string":
c = this.data.substring(this.index, v);
break;
case "uint8array":
c = this.data.subarray(this.index, v);
break;
case "array":
case "nodebuffer":
c = this.data.slice(this.index, v);
}
return this.index = v, this.push({ data: c, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
}, r.exports = o;
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(t, r, n) {
function a(i) {
this.name = i || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
}
a.prototype = { push: function(i) {
this.emit("data", i);
}, end: function() {
if (this.isFinished)
return !1;
this.flush();
try {
this.emit("end"), this.cleanUp(), this.isFinished = !0;
} catch (i) {
this.emit("error", i);
}
return !0;
}, error: function(i) {
return !this.isFinished && (this.isPaused ? this.generatedError = i : (this.isFinished = !0, this.emit("error", i), this.previous && this.previous.error(i), this.cleanUp()), !0);
}, on: function(i, o) {
return this._listeners[i].push(o), this;
}, cleanUp: function() {
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
}, emit: function(i, o) {
if (this._listeners[i])
for (var c = 0; c < this._listeners[i].length; c++)
this._listeners[i][c].call(this, o);
}, pipe: function(i) {
return i.registerPrevious(this);
}, registerPrevious: function(i) {
if (this.isLocked)
throw new Error("The stream '" + this + "' has already been used.");
this.streamInfo = i.streamInfo, this.mergeStreamInfo(), this.previous = i;
var o = this;
return i.on("data", function(c) {
o.processChunk(c);
}), i.on("end", function() {
o.end();
}), i.on("error", function(c) {
o.error(c);
}), this;
}, pause: function() {
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
}, resume: function() {
if (!this.isPaused || this.isFinished)
return !1;
var i = this.isPaused = !1;
return this.generatedError && (this.error(this.generatedError), i = !0), this.previous && this.previous.resume(), !i;
}, flush: function() {
}, processChunk: function(i) {
this.push(i);
}, withStreamInfo: function(i, o) {
return this.extraStreamInfo[i] = o, this.mergeStreamInfo(), this;
}, mergeStreamInfo: function() {
for (var i in this.extraStreamInfo)
Object.prototype.hasOwnProperty.call(this.extraStreamInfo, i) && (this.streamInfo[i] = this.extraStreamInfo[i]);
}, lock: function() {
if (this.isLocked)
throw new Error("The stream '" + this + "' has already been used.");
this.isLocked = !0, this.previous && this.previous.lock();
}, toString: function() {
var i = "Worker " + this.name;
return this.previous ? this.previous + " -> " + i : i;
} }, r.exports = a;
}, {}], 29: [function(t, r, n) {
var a = t("../utils"), i = t("./ConvertWorker"), o = t("./GenericWorker"), c = t("../base64"), v = t("../support"), w = t("../external"), _ = null;
if (v.nodestream)
try {
_ = t("../nodejs/NodejsStreamOutputAdapter");
} catch {
}
function k(y, h) {
return new w.Promise(function(m, f) {
var b = [], S = y._internalType, P = y._outputType, A = y._mimeType;
y.on("data", function(F, I) {
b.push(F), h && h(I);
}).on("error", function(F) {
b = [], f(F);
}).on("end", function() {
try {
var F = function(I, H, D) {
switch (I) {
case "blob":
return a.newBlob(a.transformTo("arraybuffer", H), D);
case "base64":
return c.encode(H);
default:
return a.transformTo(I, H);
}
}(P, function(I, H) {
var D, V = 0, Q = null, x = 0;
for (D = 0; D < H.length; D++)
x += H[D].length;
switch (I) {
case "string":
return H.join("");
case "array":
return Array.prototype.concat.apply([], H);
case "uint8array":
for (Q = new Uint8Array(x), D = 0; D < H.length; D++)
Q.set(H[D], V), V += H[D].length;
return Q;
case "nodebuffer":
return Buffer.concat(H);
default:
throw new Error("concat : unsupported type '" + I + "'");
}
}(S, b), A);
m(F);
} catch (I) {
f(I);
}
b = [];
}).resume();
});
}
function u(y, h, m) {
var f = h;
switch (h) {
case "blob":
case "arraybuffer":
f = "uint8array";
break;
case "base64":
f = "string";
}
try {
this._internalType = f, this._outputType = h, this._mimeType = m, a.checkSupport(f), this._worker = y.pipe(new i(f)), y.lock();
} catch (b) {
this._worker = new o("error"), this._worker.error(b);
}
}
u.prototype = { accumulate: function(y) {
return k(this, y);
}, on: function(y, h) {
var m = this;
return y === "data" ? this._worker.on(y, function(f) {
h.call(m, f.data, f.meta);
}) : this._worker.on(y, function() {
a.delay(h, arguments, m);
}), this;
}, resume: function() {
return a.delay(this._worker.resume, [], this._worker), this;
}, pause: function() {
return this._worker.pause(), this;
}, toNodejsStream: function(y) {
if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer")
throw new Error(this._outputType + " is not supported by this method");
return new _(this, { objectMode: this._outputType !== "nodebuffer" }, y);
} }, r.exports = u;
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(t, r, n) {
if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", n.nodebuffer = typeof Buffer < "u", n.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u")
n.blob = !1;
else {
var a = new ArrayBuffer(0);
try {
n.blob = new Blob([a], { type: "application/zip" }).size === 0;
} catch {
try {
var i = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
i.append(a), n.blob = i.getBlob("application/zip").size === 0;
} catch {
n.blob = !1;
}
}
}
try {
n.nodestream = !!t("readable-stream").Readable;
} catch {
n.nodestream = !1;
}
}, { "readable-stream": 16 }], 31: [function(t, r, n) {
for (var a = t("./utils"), i = t("./support"), o = t("./nodejsUtils"), c = t("./stream/GenericWorker"), v = new Array(256), w = 0; w < 256; w++)
v[w] = 252 <= w ? 6 : 248 <= w ? 5 : 240 <= w ? 4 : 224 <= w ? 3 : 192 <= w ? 2 : 1;
v[254] = v[254] = 1;
function _() {
c.call(this, "utf-8 decode"), this.leftOver = null;
}
function k() {
c.call(this, "utf-8 encode");
}
n.utf8encode = function(u) {
return i.nodebuffer ? o.newBufferFrom(u, "utf-8") : function(y) {
var h, m, f, b, S, P = y.length, A = 0;
for (b = 0; b < P; b++)
(64512 & (m = y.charCodeAt(b))) == 55296 && b + 1 < P && (64512 & (f = y.charCodeAt(b + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), b++), A += m < 128 ? 1 : m < 2048 ? 2 : m < 65536 ? 3 : 4;
for (h = i.uint8array ? new Uint8Array(A) : new Array(A), b = S = 0; S < A; b++)
(64512 & (m = y.charCodeAt(b))) == 55296 && b + 1 < P && (64512 & (f = y.charCodeAt(b + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), b++), m < 128 ? h[S++] = m : (m < 2048 ? h[S++] = 192 | m >>> 6 : (m < 65536 ? h[S++] = 224 | m >>> 12 : (h[S++] = 240 | m >>> 18, h[S++] = 128 | m >>> 12 & 63), h[S++] = 128 | m >>> 6 & 63), h[S++] = 128 | 63 & m);
return h;
}(u);
}, n.utf8decode = function(u) {
return i.nodebuffer ? a.transformTo("nodebuffer", u).toString("utf-8") : function(y) {
var h, m, f, b, S = y.length, P = new Array(2 * S);
for (h = m = 0; h < S; )
if ((f = y[h++]) < 128)
P[m++] = f;
else if (4 < (b = v[f]))
P[m++] = 65533, h += b - 1;
else {
for (f &= b === 2 ? 31 : b === 3 ? 15 : 7; 1 < b && h < S; )
f = f << 6 | 63 & y[h++], b--;
1 < b ? P[m++] = 65533 : f < 65536 ? P[m++] = f : (f -= 65536, P[m++] = 55296 | f >> 10 & 1023, P[m++] = 56320 | 1023 & f);
}
return P.length !== m && (P.subarray ? P = P.subarray(0, m) : P.length = m), a.applyFromCharCode(P);
}(u = a.transformTo(i.uint8array ? "uint8array" : "array", u));
}, a.inherits(_, c), _.prototype.processChunk = function(u) {
var y = a.transformTo(i.uint8array ? "uint8array" : "array", u.data);
if (this.leftOver && this.leftOver.length) {
if (i.uint8array) {
var h = y;
(y = new Uint8Array(h.length + this.leftOver.length)).set(this.leftOver, 0), y.set(h, this.leftOver.length);
} else
y = this.leftOver.concat(y);
this.leftOver = null;
}
var m = function(b, S) {
var P;
for ((S = S || b.length) > b.length && (S = b.length), P = S - 1; 0 <= P && (192 & b[P]) == 128; )
P--;
return P < 0 || P === 0 ? S : P + v[b[P]] > S ? P : S;
}(y), f = y;
m !== y.length && (i.uint8array ? (f = y.subarray(0, m), this.leftOver = y.subarray(m, y.length)) : (f = y.slice(0, m), this.leftOver = y.slice(m, y.length))), this.push({ data: n.utf8decode(f), meta: u.meta });
}, _.prototype.flush = function() {
this.leftOver && this.leftOver.length && (this.push({ data: n.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
}, n.Utf8DecodeWorker = _, a.inherits(k, c), k.prototype.processChunk = function(u) {
this.push({ data: n.utf8encode(u.data), meta: u.meta });
}, n.Utf8EncodeWorker = k;
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(t, r, n) {
var a = t("./support"), i = t("./base64"), o = t("./nodejsUtils"), c = t("./external");
function v(h) {
return h;
}
function w(h, m) {
for (var f = 0; f < h.length; ++f)
m[f] = 255 & h.charCodeAt(f);
return m;
}
t("setimmediate"), n.newBlob = function(h, m) {
n.checkSupport("blob");
try {
return new Blob([h], { type: m });
} catch {
try {
var f = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
return f.append(h), f.getBlob(m);
} catch {
throw new Error("Bug : can't construct the Blob.");
}
}
};
var _ = { stringifyByChunk: function(h, m, f) {
var b = [], S = 0, P = h.length;
if (P <= f)
return String.fromCharCode.apply(null, h);
for (; S < P; )
m === "array" || m === "nodebuffer" ? b.push(String.fromCharCode.apply(null, h.slice(S, Math.min(S + f, P)))) : b.push(String.fromCharCode.apply(null, h.subarray(S, Math.min(S + f, P)))), S += f;
return b.join("");
}, stringifyByChar: function(h) {
for (var m = "", f = 0; f < h.length; f++)
m += String.fromCharCode(h[f]);
return m;
}, applyCanBeUsed: { uint8array: function() {
try {
return a.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
} catch {
return !1;
}
}(), nodebuffer: function() {
try {
return a.nodebuffer && String.fromCharCode.apply(null, o.allocBuffer(1)).length === 1;
} catch {
return !1;
}
}() } };
function k(h) {
var m = 65536, f = n.getTypeOf(h), b = !0;
if (f === "uint8array" ? b = _.applyCanBeUsed.uint8array : f === "nodebuffer" && (b = _.applyCanBeUsed.nodebuffer), b)
for (; 1 < m; )
try {
return _.stringifyByChunk(h, f, m);
} catch {
m = Math.floor(m / 2);
}
return _.stringifyByChar(h);
}
function u(h, m) {
for (var f = 0; f < h.length; f++)
m[f] = h[f];
return m;
}
n.applyFromCharCode = k;
var y = {};
y.string = { string: v, array: function(h) {
return w(h, new Array(h.length));
}, arraybuffer: function(h) {
return y.string.uint8array(h).buffer;
}, uint8array: function(h) {
return w(h, new Uint8Array(h.length));
}, nodebuffer: function(h) {
return w(h, o.allocBuffer(h.length));
} }, y.array = { string: k, array: v, arraybuffer: function(h) {
return new Uint8Array(h).buffer;
}, uint8array: function(h) {
return new Uint8Array(h);
}, nodebuffer: function(h) {
return o.newBufferFrom(h);
} }, y.arraybuffer = { string: function(h) {
return k(new Uint8Array(h));
}, array: function(h) {
return u(new Uint8Array(h), new Array(h.byteLength));
}, arraybuffer: v, uint8array: function(h) {
return new Uint8Array(h);
}, nodebuffer: function(h) {
return o.newBufferFrom(new Uint8Array(h));
} }, y.uint8array = { string: k, array: function(h) {
return u(h, new Array(h.length));
}, arraybuffer: function(h) {
return h.buffer;
}, uint8array: v, nodebuffer: function(h) {
return o.newBufferFrom(h);
} }, y.nodebuffer = { string: k, array: function(h) {
return u(h, new Array(h.length));
}, arraybuffer: function(h) {
return y.nodebuffer.uint8array(h).buffer;
}, uint8array: function(h) {
return u(h, new Uint8Array(h.length));
}, nodebuffer: v }, n.transformTo = function(h, m) {
if (m = m || "", !h)
return m;
n.checkSupport(h);
var f = n.getTypeOf(m);
return y[f][h](m);
}, n.resolve = function(h) {
for (var m = h.split("/"), f = [], b = 0; b < m.length; b++) {
var S = m[b];
S === "." || S === "" && b !== 0 && b !== m.length - 1 || (S === ".." ? f.pop() : f.push(S));
}
return f.join("/");
}, n.getTypeOf = function(h) {
return typeof h == "string" ? "string" : Object.prototype.toString.call(h) === "[object Array]" ? "array" : a.nodebuffer && o.isBuffer(h) ? "nodebuffer" : a.uint8array && h instanceof Uint8Array ? "uint8array" : a.arraybuffer && h instanceof ArrayBuffer ? "arraybuffer" : void 0;
}, n.checkSupport = function(h) {
if (!a[h.toLowerCase()])
throw new Error(h + " is not supported by this platform");
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(h) {
var m, f, b = "";
for (f = 0; f < (h || "").length; f++)
b += "\\x" + ((m = h.charCodeAt(f)) < 16 ? "0" : "") + m.toString(16).toUpperCase();
return b;
}, n.delay = function(h, m, f) {
setImmediate(function() {
h.apply(f || null, m || []);
});
}, n.inherits = function(h, m) {
function f() {
}
f.prototype = m.prototype, h.prototype = new f();
}, n.extend = function() {
var h, m, f = {};
for (h = 0; h < arguments.length; h++)
for (m in arguments[h])
Object.prototype.hasOwnProperty.call(arguments[h], m) && f[m] === void 0 && (f[m] = arguments[h][m]);
return f;
}, n.prepareContent = function(h, m, f, b, S) {
return c.Promise.resolve(m).then(function(P) {
return a.blob && (P instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(P)) !== -1) && typeof FileReader < "u" ? new c.Promise(function(A, F) {
var I = new FileReader();
I.onload = function(H) {
A(H.target.result);
}, I.onerror = function(H) {
F(H.target.error);
}, I.readAsArrayBuffer(P);
}) : P;
}).then(function(P) {
var A = n.getTypeOf(P);
return A ? (A === "arraybuffer" ? P = n.transformTo("uint8array", P) : A === "string" && (S ? P = i.decode(P) : f && b !== !0 && (P = function(F) {
return