nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions
+17 -12
View File
@@ -144,6 +144,22 @@ function Inflate(options) {
this.header = new GZheader();
zlib_inflate.inflateGetHeader(this.strm, this.header);
// Setup dictionary
if (opt.dictionary) {
// Convert data if needed
if (typeof opt.dictionary === 'string') {
opt.dictionary = strings.string2buf(opt.dictionary);
} else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {
opt.dictionary = new Uint8Array(opt.dictionary);
}
if (opt.raw) { //In raw mode we need to set the dictionary early
status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);
if (status !== c.Z_OK) {
throw new Error(msg[status]);
}
}
}
}
/**
@@ -180,7 +196,6 @@ Inflate.prototype.push = function (data, mode) {
var dictionary = this.options.dictionary;
var status, _mode;
var next_out_utf8, tail, utf8str;
var dict;
// Flag to properly process Z_BUF_ERROR on testing inflate call
// when we check that all output data was flushed.
@@ -212,17 +227,7 @@ Inflate.prototype.push = function (data, mode) {
status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */
if (status === c.Z_NEED_DICT && dictionary) {
// Convert data if needed
if (typeof dictionary === 'string') {
dict = strings.string2buf(dictionary);
} else if (toString.call(dictionary) === '[object ArrayBuffer]') {
dict = new Uint8Array(dictionary);
} else {
dict = dictionary;
}
status = zlib_inflate.inflateSetDictionary(this.strm, dict);
status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);
}
if (status === c.Z_BUF_ERROR && allowBufError === true) {
+4 -2
View File
@@ -83,8 +83,10 @@ exports.string2buf = function (str) {
// Helper (used in 2 places)
function buf2binstring(buf, len) {
// use fallback for big arrays to avoid stack overflow
if (len < 65537) {
// On Chrome, the arguments in a function call that are allowed is `65534`.
// If the length of the buffer is smaller than that, we can use this optimization,
// otherwise we will take a slower path.
if (len < 65534) {
if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
}
+1 -1
View File
@@ -1454,7 +1454,7 @@ function deflate(strm, flush) {
(!s.gzhead.extra ? 0 : 4) +
(!s.gzhead.name ? 0 : 8) +
(!s.gzhead.comment ? 0 : 16)
);
);
put_byte(s, s.gzhead.time & 0xff);
put_byte(s, (s.gzhead.time >> 8) & 0xff);
put_byte(s, (s.gzhead.time >> 16) & 0xff);
+2
View File
@@ -19,6 +19,8 @@
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.
/* eslint-disable space-unary-ops */
var utils = require('../utils/common');
/* Public constants ==========================================================*/