ueberdb2 4.1.32 → 4.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +301 -314
- package/package.json +1 -1
- package/dist/index.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -31305,7 +31305,7 @@ ieee754.write = function(buffer2, value, offset2, isLE, mLen, nBytes) {
|
|
|
31305
31305
|
return 1;
|
|
31306
31306
|
return 0;
|
|
31307
31307
|
};
|
|
31308
|
-
Buffer2.isEncoding = function
|
|
31308
|
+
Buffer2.isEncoding = function isEncoding2(encoding2) {
|
|
31309
31309
|
switch (String(encoding2).toLowerCase()) {
|
|
31310
31310
|
case "hex":
|
|
31311
31311
|
case "utf8":
|
|
@@ -50112,325 +50112,312 @@ function requireEncoding() {
|
|
|
50112
50112
|
}
|
|
50113
50113
|
var string_decoder = {};
|
|
50114
50114
|
var safeBuffer$1 = { exports: {} };
|
|
50115
|
-
|
|
50116
|
-
|
|
50117
|
-
|
|
50118
|
-
|
|
50119
|
-
|
|
50120
|
-
|
|
50121
|
-
var buffer2 = buffer$3;
|
|
50122
|
-
var Buffer2 = buffer2.Buffer;
|
|
50123
|
-
function copyProps(src2, dst) {
|
|
50124
|
-
for (var key2 in src2) {
|
|
50125
|
-
dst[key2] = src2[key2];
|
|
50126
|
-
}
|
|
50115
|
+
(function(module2, exports2) {
|
|
50116
|
+
var buffer2 = buffer$3;
|
|
50117
|
+
var Buffer2 = buffer2.Buffer;
|
|
50118
|
+
function copyProps(src2, dst) {
|
|
50119
|
+
for (var key2 in src2) {
|
|
50120
|
+
dst[key2] = src2[key2];
|
|
50127
50121
|
}
|
|
50128
|
-
|
|
50129
|
-
|
|
50130
|
-
|
|
50131
|
-
|
|
50132
|
-
|
|
50122
|
+
}
|
|
50123
|
+
if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
|
|
50124
|
+
module2.exports = buffer2;
|
|
50125
|
+
} else {
|
|
50126
|
+
copyProps(buffer2, exports2);
|
|
50127
|
+
exports2.Buffer = SafeBuffer;
|
|
50128
|
+
}
|
|
50129
|
+
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
50130
|
+
return Buffer2(arg, encodingOrOffset, length);
|
|
50131
|
+
}
|
|
50132
|
+
copyProps(Buffer2, SafeBuffer);
|
|
50133
|
+
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
50134
|
+
if (typeof arg === "number") {
|
|
50135
|
+
throw new TypeError("Argument must not be a number");
|
|
50133
50136
|
}
|
|
50134
|
-
|
|
50135
|
-
|
|
50137
|
+
return Buffer2(arg, encodingOrOffset, length);
|
|
50138
|
+
};
|
|
50139
|
+
SafeBuffer.alloc = function(size, fill, encoding2) {
|
|
50140
|
+
if (typeof size !== "number") {
|
|
50141
|
+
throw new TypeError("Argument must be a number");
|
|
50136
50142
|
}
|
|
50137
|
-
|
|
50138
|
-
|
|
50139
|
-
if (typeof
|
|
50140
|
-
|
|
50141
|
-
}
|
|
50142
|
-
return Buffer2(arg, encodingOrOffset, length);
|
|
50143
|
-
};
|
|
50144
|
-
SafeBuffer.alloc = function(size, fill, encoding2) {
|
|
50145
|
-
if (typeof size !== "number") {
|
|
50146
|
-
throw new TypeError("Argument must be a number");
|
|
50147
|
-
}
|
|
50148
|
-
var buf = Buffer2(size);
|
|
50149
|
-
if (fill !== void 0) {
|
|
50150
|
-
if (typeof encoding2 === "string") {
|
|
50151
|
-
buf.fill(fill, encoding2);
|
|
50152
|
-
} else {
|
|
50153
|
-
buf.fill(fill);
|
|
50154
|
-
}
|
|
50143
|
+
var buf = Buffer2(size);
|
|
50144
|
+
if (fill !== void 0) {
|
|
50145
|
+
if (typeof encoding2 === "string") {
|
|
50146
|
+
buf.fill(fill, encoding2);
|
|
50155
50147
|
} else {
|
|
50156
|
-
buf.fill(
|
|
50148
|
+
buf.fill(fill);
|
|
50157
50149
|
}
|
|
50158
|
-
|
|
50159
|
-
|
|
50160
|
-
|
|
50161
|
-
|
|
50162
|
-
|
|
50163
|
-
|
|
50164
|
-
|
|
50165
|
-
|
|
50166
|
-
|
|
50167
|
-
|
|
50168
|
-
|
|
50169
|
-
|
|
50170
|
-
|
|
50171
|
-
|
|
50172
|
-
|
|
50173
|
-
|
|
50174
|
-
}
|
|
50175
|
-
|
|
50176
|
-
|
|
50177
|
-
|
|
50178
|
-
|
|
50179
|
-
|
|
50180
|
-
|
|
50181
|
-
|
|
50182
|
-
|
|
50183
|
-
|
|
50184
|
-
|
|
50150
|
+
} else {
|
|
50151
|
+
buf.fill(0);
|
|
50152
|
+
}
|
|
50153
|
+
return buf;
|
|
50154
|
+
};
|
|
50155
|
+
SafeBuffer.allocUnsafe = function(size) {
|
|
50156
|
+
if (typeof size !== "number") {
|
|
50157
|
+
throw new TypeError("Argument must be a number");
|
|
50158
|
+
}
|
|
50159
|
+
return Buffer2(size);
|
|
50160
|
+
};
|
|
50161
|
+
SafeBuffer.allocUnsafeSlow = function(size) {
|
|
50162
|
+
if (typeof size !== "number") {
|
|
50163
|
+
throw new TypeError("Argument must be a number");
|
|
50164
|
+
}
|
|
50165
|
+
return buffer2.SlowBuffer(size);
|
|
50166
|
+
};
|
|
50167
|
+
})(safeBuffer$1, safeBuffer$1.exports);
|
|
50168
|
+
var safeBufferExports = safeBuffer$1.exports;
|
|
50169
|
+
var Buffer$3 = safeBufferExports.Buffer;
|
|
50170
|
+
var isEncoding = Buffer$3.isEncoding || function(encoding2) {
|
|
50171
|
+
encoding2 = "" + encoding2;
|
|
50172
|
+
switch (encoding2 && encoding2.toLowerCase()) {
|
|
50173
|
+
case "hex":
|
|
50174
|
+
case "utf8":
|
|
50175
|
+
case "utf-8":
|
|
50176
|
+
case "ascii":
|
|
50177
|
+
case "binary":
|
|
50178
|
+
case "base64":
|
|
50179
|
+
case "ucs2":
|
|
50180
|
+
case "ucs-2":
|
|
50181
|
+
case "utf16le":
|
|
50182
|
+
case "utf-16le":
|
|
50183
|
+
case "raw":
|
|
50184
|
+
return true;
|
|
50185
|
+
default:
|
|
50186
|
+
return false;
|
|
50187
|
+
}
|
|
50188
|
+
};
|
|
50189
|
+
function _normalizeEncoding(enc) {
|
|
50190
|
+
if (!enc)
|
|
50191
|
+
return "utf8";
|
|
50192
|
+
var retried;
|
|
50193
|
+
while (true) {
|
|
50194
|
+
switch (enc) {
|
|
50185
50195
|
case "utf8":
|
|
50186
50196
|
case "utf-8":
|
|
50187
|
-
|
|
50188
|
-
case "binary":
|
|
50189
|
-
case "base64":
|
|
50197
|
+
return "utf8";
|
|
50190
50198
|
case "ucs2":
|
|
50191
50199
|
case "ucs-2":
|
|
50192
50200
|
case "utf16le":
|
|
50193
50201
|
case "utf-16le":
|
|
50194
|
-
|
|
50195
|
-
|
|
50196
|
-
|
|
50197
|
-
return
|
|
50198
|
-
}
|
|
50199
|
-
};
|
|
50200
|
-
function _normalizeEncoding(enc) {
|
|
50201
|
-
if (!enc)
|
|
50202
|
-
return "utf8";
|
|
50203
|
-
var retried;
|
|
50204
|
-
while (true) {
|
|
50205
|
-
switch (enc) {
|
|
50206
|
-
case "utf8":
|
|
50207
|
-
case "utf-8":
|
|
50208
|
-
return "utf8";
|
|
50209
|
-
case "ucs2":
|
|
50210
|
-
case "ucs-2":
|
|
50211
|
-
case "utf16le":
|
|
50212
|
-
case "utf-16le":
|
|
50213
|
-
return "utf16le";
|
|
50214
|
-
case "latin1":
|
|
50215
|
-
case "binary":
|
|
50216
|
-
return "latin1";
|
|
50217
|
-
case "base64":
|
|
50218
|
-
case "ascii":
|
|
50219
|
-
case "hex":
|
|
50220
|
-
return enc;
|
|
50221
|
-
default:
|
|
50222
|
-
if (retried)
|
|
50223
|
-
return;
|
|
50224
|
-
enc = ("" + enc).toLowerCase();
|
|
50225
|
-
retried = true;
|
|
50226
|
-
}
|
|
50227
|
-
}
|
|
50228
|
-
}
|
|
50229
|
-
function normalizeEncoding(enc) {
|
|
50230
|
-
var nenc = _normalizeEncoding(enc);
|
|
50231
|
-
if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc)))
|
|
50232
|
-
throw new Error("Unknown encoding: " + enc);
|
|
50233
|
-
return nenc || enc;
|
|
50234
|
-
}
|
|
50235
|
-
string_decoder.StringDecoder = StringDecoder;
|
|
50236
|
-
function StringDecoder(encoding2) {
|
|
50237
|
-
this.encoding = normalizeEncoding(encoding2);
|
|
50238
|
-
var nb;
|
|
50239
|
-
switch (this.encoding) {
|
|
50240
|
-
case "utf16le":
|
|
50241
|
-
this.text = utf16Text;
|
|
50242
|
-
this.end = utf16End;
|
|
50243
|
-
nb = 4;
|
|
50244
|
-
break;
|
|
50245
|
-
case "utf8":
|
|
50246
|
-
this.fillLast = utf8FillLast;
|
|
50247
|
-
nb = 4;
|
|
50248
|
-
break;
|
|
50202
|
+
return "utf16le";
|
|
50203
|
+
case "latin1":
|
|
50204
|
+
case "binary":
|
|
50205
|
+
return "latin1";
|
|
50249
50206
|
case "base64":
|
|
50250
|
-
|
|
50251
|
-
|
|
50252
|
-
|
|
50253
|
-
break;
|
|
50207
|
+
case "ascii":
|
|
50208
|
+
case "hex":
|
|
50209
|
+
return enc;
|
|
50254
50210
|
default:
|
|
50255
|
-
|
|
50256
|
-
|
|
50257
|
-
|
|
50258
|
-
|
|
50259
|
-
|
|
50260
|
-
|
|
50261
|
-
|
|
50211
|
+
if (retried)
|
|
50212
|
+
return;
|
|
50213
|
+
enc = ("" + enc).toLowerCase();
|
|
50214
|
+
retried = true;
|
|
50215
|
+
}
|
|
50216
|
+
}
|
|
50217
|
+
}
|
|
50218
|
+
function normalizeEncoding(enc) {
|
|
50219
|
+
var nenc = _normalizeEncoding(enc);
|
|
50220
|
+
if (typeof nenc !== "string" && (Buffer$3.isEncoding === isEncoding || !isEncoding(enc)))
|
|
50221
|
+
throw new Error("Unknown encoding: " + enc);
|
|
50222
|
+
return nenc || enc;
|
|
50223
|
+
}
|
|
50224
|
+
string_decoder.StringDecoder = StringDecoder;
|
|
50225
|
+
function StringDecoder(encoding2) {
|
|
50226
|
+
this.encoding = normalizeEncoding(encoding2);
|
|
50227
|
+
var nb;
|
|
50228
|
+
switch (this.encoding) {
|
|
50229
|
+
case "utf16le":
|
|
50230
|
+
this.text = utf16Text;
|
|
50231
|
+
this.end = utf16End;
|
|
50232
|
+
nb = 4;
|
|
50233
|
+
break;
|
|
50234
|
+
case "utf8":
|
|
50235
|
+
this.fillLast = utf8FillLast;
|
|
50236
|
+
nb = 4;
|
|
50237
|
+
break;
|
|
50238
|
+
case "base64":
|
|
50239
|
+
this.text = base64Text;
|
|
50240
|
+
this.end = base64End;
|
|
50241
|
+
nb = 3;
|
|
50242
|
+
break;
|
|
50243
|
+
default:
|
|
50244
|
+
this.write = simpleWrite;
|
|
50245
|
+
this.end = simpleEnd;
|
|
50246
|
+
return;
|
|
50262
50247
|
}
|
|
50263
|
-
|
|
50264
|
-
|
|
50248
|
+
this.lastNeed = 0;
|
|
50249
|
+
this.lastTotal = 0;
|
|
50250
|
+
this.lastChar = Buffer$3.allocUnsafe(nb);
|
|
50251
|
+
}
|
|
50252
|
+
StringDecoder.prototype.write = function(buf) {
|
|
50253
|
+
if (buf.length === 0)
|
|
50254
|
+
return "";
|
|
50255
|
+
var r2;
|
|
50256
|
+
var i2;
|
|
50257
|
+
if (this.lastNeed) {
|
|
50258
|
+
r2 = this.fillLast(buf);
|
|
50259
|
+
if (r2 === void 0)
|
|
50265
50260
|
return "";
|
|
50266
|
-
|
|
50267
|
-
|
|
50268
|
-
|
|
50269
|
-
|
|
50270
|
-
|
|
50271
|
-
|
|
50272
|
-
|
|
50273
|
-
|
|
50274
|
-
|
|
50275
|
-
|
|
50276
|
-
|
|
50277
|
-
|
|
50278
|
-
|
|
50279
|
-
|
|
50280
|
-
|
|
50281
|
-
|
|
50282
|
-
|
|
50283
|
-
|
|
50284
|
-
|
|
50285
|
-
|
|
50286
|
-
|
|
50287
|
-
|
|
50288
|
-
|
|
50289
|
-
|
|
50290
|
-
|
|
50291
|
-
|
|
50292
|
-
|
|
50293
|
-
|
|
50294
|
-
|
|
50295
|
-
|
|
50296
|
-
|
|
50297
|
-
|
|
50298
|
-
|
|
50299
|
-
return 4;
|
|
50300
|
-
return byte >> 6 === 2 ? -1 : -2;
|
|
50301
|
-
}
|
|
50302
|
-
function utf8CheckIncomplete(self2, buf, i2) {
|
|
50303
|
-
var j2 = buf.length - 1;
|
|
50304
|
-
if (j2 < i2)
|
|
50305
|
-
return 0;
|
|
50306
|
-
var nb = utf8CheckByte(buf[j2]);
|
|
50307
|
-
if (nb >= 0) {
|
|
50308
|
-
if (nb > 0)
|
|
50309
|
-
self2.lastNeed = nb - 1;
|
|
50310
|
-
return nb;
|
|
50311
|
-
}
|
|
50312
|
-
if (--j2 < i2 || nb === -2)
|
|
50313
|
-
return 0;
|
|
50314
|
-
nb = utf8CheckByte(buf[j2]);
|
|
50315
|
-
if (nb >= 0) {
|
|
50316
|
-
if (nb > 0)
|
|
50317
|
-
self2.lastNeed = nb - 2;
|
|
50318
|
-
return nb;
|
|
50319
|
-
}
|
|
50320
|
-
if (--j2 < i2 || nb === -2)
|
|
50321
|
-
return 0;
|
|
50322
|
-
nb = utf8CheckByte(buf[j2]);
|
|
50323
|
-
if (nb >= 0) {
|
|
50324
|
-
if (nb > 0) {
|
|
50325
|
-
if (nb === 2)
|
|
50326
|
-
nb = 0;
|
|
50327
|
-
else
|
|
50328
|
-
self2.lastNeed = nb - 3;
|
|
50329
|
-
}
|
|
50330
|
-
return nb;
|
|
50331
|
-
}
|
|
50261
|
+
i2 = this.lastNeed;
|
|
50262
|
+
this.lastNeed = 0;
|
|
50263
|
+
} else {
|
|
50264
|
+
i2 = 0;
|
|
50265
|
+
}
|
|
50266
|
+
if (i2 < buf.length)
|
|
50267
|
+
return r2 ? r2 + this.text(buf, i2) : this.text(buf, i2);
|
|
50268
|
+
return r2 || "";
|
|
50269
|
+
};
|
|
50270
|
+
StringDecoder.prototype.end = utf8End;
|
|
50271
|
+
StringDecoder.prototype.text = utf8Text;
|
|
50272
|
+
StringDecoder.prototype.fillLast = function(buf) {
|
|
50273
|
+
if (this.lastNeed <= buf.length) {
|
|
50274
|
+
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
|
|
50275
|
+
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
50276
|
+
}
|
|
50277
|
+
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
|
|
50278
|
+
this.lastNeed -= buf.length;
|
|
50279
|
+
};
|
|
50280
|
+
function utf8CheckByte(byte) {
|
|
50281
|
+
if (byte <= 127)
|
|
50282
|
+
return 0;
|
|
50283
|
+
else if (byte >> 5 === 6)
|
|
50284
|
+
return 2;
|
|
50285
|
+
else if (byte >> 4 === 14)
|
|
50286
|
+
return 3;
|
|
50287
|
+
else if (byte >> 3 === 30)
|
|
50288
|
+
return 4;
|
|
50289
|
+
return byte >> 6 === 2 ? -1 : -2;
|
|
50290
|
+
}
|
|
50291
|
+
function utf8CheckIncomplete(self2, buf, i2) {
|
|
50292
|
+
var j2 = buf.length - 1;
|
|
50293
|
+
if (j2 < i2)
|
|
50332
50294
|
return 0;
|
|
50295
|
+
var nb = utf8CheckByte(buf[j2]);
|
|
50296
|
+
if (nb >= 0) {
|
|
50297
|
+
if (nb > 0)
|
|
50298
|
+
self2.lastNeed = nb - 1;
|
|
50299
|
+
return nb;
|
|
50333
50300
|
}
|
|
50334
|
-
|
|
50335
|
-
|
|
50336
|
-
|
|
50337
|
-
|
|
50338
|
-
|
|
50339
|
-
|
|
50340
|
-
|
|
50341
|
-
self2.lastNeed = 1;
|
|
50342
|
-
return "�";
|
|
50343
|
-
}
|
|
50344
|
-
if (self2.lastNeed > 2 && buf.length > 2) {
|
|
50345
|
-
if ((buf[2] & 192) !== 128) {
|
|
50346
|
-
self2.lastNeed = 2;
|
|
50347
|
-
return "�";
|
|
50348
|
-
}
|
|
50349
|
-
}
|
|
50350
|
-
}
|
|
50301
|
+
if (--j2 < i2 || nb === -2)
|
|
50302
|
+
return 0;
|
|
50303
|
+
nb = utf8CheckByte(buf[j2]);
|
|
50304
|
+
if (nb >= 0) {
|
|
50305
|
+
if (nb > 0)
|
|
50306
|
+
self2.lastNeed = nb - 2;
|
|
50307
|
+
return nb;
|
|
50351
50308
|
}
|
|
50352
|
-
|
|
50353
|
-
|
|
50354
|
-
|
|
50355
|
-
|
|
50356
|
-
|
|
50357
|
-
|
|
50358
|
-
|
|
50359
|
-
|
|
50309
|
+
if (--j2 < i2 || nb === -2)
|
|
50310
|
+
return 0;
|
|
50311
|
+
nb = utf8CheckByte(buf[j2]);
|
|
50312
|
+
if (nb >= 0) {
|
|
50313
|
+
if (nb > 0) {
|
|
50314
|
+
if (nb === 2)
|
|
50315
|
+
nb = 0;
|
|
50316
|
+
else
|
|
50317
|
+
self2.lastNeed = nb - 3;
|
|
50360
50318
|
}
|
|
50361
|
-
|
|
50362
|
-
this.lastNeed -= buf.length;
|
|
50363
|
-
}
|
|
50364
|
-
function utf8Text(buf, i2) {
|
|
50365
|
-
var total = utf8CheckIncomplete(this, buf, i2);
|
|
50366
|
-
if (!this.lastNeed)
|
|
50367
|
-
return buf.toString("utf8", i2);
|
|
50368
|
-
this.lastTotal = total;
|
|
50369
|
-
var end2 = buf.length - (total - this.lastNeed);
|
|
50370
|
-
buf.copy(this.lastChar, 0, end2);
|
|
50371
|
-
return buf.toString("utf8", i2, end2);
|
|
50319
|
+
return nb;
|
|
50372
50320
|
}
|
|
50373
|
-
|
|
50374
|
-
|
|
50375
|
-
|
|
50376
|
-
|
|
50377
|
-
|
|
50321
|
+
return 0;
|
|
50322
|
+
}
|
|
50323
|
+
function utf8CheckExtraBytes(self2, buf, p2) {
|
|
50324
|
+
if ((buf[0] & 192) !== 128) {
|
|
50325
|
+
self2.lastNeed = 0;
|
|
50326
|
+
return "�";
|
|
50378
50327
|
}
|
|
50379
|
-
|
|
50380
|
-
if ((buf
|
|
50381
|
-
|
|
50382
|
-
|
|
50383
|
-
|
|
50384
|
-
|
|
50385
|
-
|
|
50386
|
-
|
|
50387
|
-
|
|
50388
|
-
this.lastChar[1] = buf[buf.length - 1];
|
|
50389
|
-
return r2.slice(0, -1);
|
|
50390
|
-
}
|
|
50328
|
+
if (self2.lastNeed > 1 && buf.length > 1) {
|
|
50329
|
+
if ((buf[1] & 192) !== 128) {
|
|
50330
|
+
self2.lastNeed = 1;
|
|
50331
|
+
return "�";
|
|
50332
|
+
}
|
|
50333
|
+
if (self2.lastNeed > 2 && buf.length > 2) {
|
|
50334
|
+
if ((buf[2] & 192) !== 128) {
|
|
50335
|
+
self2.lastNeed = 2;
|
|
50336
|
+
return "�";
|
|
50391
50337
|
}
|
|
50392
|
-
return r2;
|
|
50393
50338
|
}
|
|
50394
|
-
this.lastNeed = 1;
|
|
50395
|
-
this.lastTotal = 2;
|
|
50396
|
-
this.lastChar[0] = buf[buf.length - 1];
|
|
50397
|
-
return buf.toString("utf16le", i2, buf.length - 1);
|
|
50398
50339
|
}
|
|
50399
|
-
|
|
50400
|
-
|
|
50401
|
-
|
|
50402
|
-
|
|
50403
|
-
|
|
50404
|
-
}
|
|
50340
|
+
}
|
|
50341
|
+
function utf8FillLast(buf) {
|
|
50342
|
+
var p2 = this.lastTotal - this.lastNeed;
|
|
50343
|
+
var r2 = utf8CheckExtraBytes(this, buf);
|
|
50344
|
+
if (r2 !== void 0)
|
|
50405
50345
|
return r2;
|
|
50406
|
-
|
|
50407
|
-
|
|
50408
|
-
|
|
50409
|
-
|
|
50410
|
-
|
|
50411
|
-
|
|
50412
|
-
|
|
50413
|
-
|
|
50414
|
-
|
|
50415
|
-
|
|
50416
|
-
|
|
50417
|
-
|
|
50346
|
+
if (this.lastNeed <= buf.length) {
|
|
50347
|
+
buf.copy(this.lastChar, p2, 0, this.lastNeed);
|
|
50348
|
+
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
|
|
50349
|
+
}
|
|
50350
|
+
buf.copy(this.lastChar, p2, 0, buf.length);
|
|
50351
|
+
this.lastNeed -= buf.length;
|
|
50352
|
+
}
|
|
50353
|
+
function utf8Text(buf, i2) {
|
|
50354
|
+
var total = utf8CheckIncomplete(this, buf, i2);
|
|
50355
|
+
if (!this.lastNeed)
|
|
50356
|
+
return buf.toString("utf8", i2);
|
|
50357
|
+
this.lastTotal = total;
|
|
50358
|
+
var end2 = buf.length - (total - this.lastNeed);
|
|
50359
|
+
buf.copy(this.lastChar, 0, end2);
|
|
50360
|
+
return buf.toString("utf8", i2, end2);
|
|
50361
|
+
}
|
|
50362
|
+
function utf8End(buf) {
|
|
50363
|
+
var r2 = buf && buf.length ? this.write(buf) : "";
|
|
50364
|
+
if (this.lastNeed)
|
|
50365
|
+
return r2 + "�";
|
|
50366
|
+
return r2;
|
|
50367
|
+
}
|
|
50368
|
+
function utf16Text(buf, i2) {
|
|
50369
|
+
if ((buf.length - i2) % 2 === 0) {
|
|
50370
|
+
var r2 = buf.toString("utf16le", i2);
|
|
50371
|
+
if (r2) {
|
|
50372
|
+
var c2 = r2.charCodeAt(r2.length - 1);
|
|
50373
|
+
if (c2 >= 55296 && c2 <= 56319) {
|
|
50374
|
+
this.lastNeed = 2;
|
|
50375
|
+
this.lastTotal = 4;
|
|
50376
|
+
this.lastChar[0] = buf[buf.length - 2];
|
|
50377
|
+
this.lastChar[1] = buf[buf.length - 1];
|
|
50378
|
+
return r2.slice(0, -1);
|
|
50379
|
+
}
|
|
50418
50380
|
}
|
|
50419
|
-
return buf.toString("base64", i2, buf.length - n2);
|
|
50420
|
-
}
|
|
50421
|
-
function base64End(buf) {
|
|
50422
|
-
var r2 = buf && buf.length ? this.write(buf) : "";
|
|
50423
|
-
if (this.lastNeed)
|
|
50424
|
-
return r2 + this.lastChar.toString("base64", 0, 3 - this.lastNeed);
|
|
50425
50381
|
return r2;
|
|
50426
50382
|
}
|
|
50427
|
-
|
|
50428
|
-
|
|
50383
|
+
this.lastNeed = 1;
|
|
50384
|
+
this.lastTotal = 2;
|
|
50385
|
+
this.lastChar[0] = buf[buf.length - 1];
|
|
50386
|
+
return buf.toString("utf16le", i2, buf.length - 1);
|
|
50387
|
+
}
|
|
50388
|
+
function utf16End(buf) {
|
|
50389
|
+
var r2 = buf && buf.length ? this.write(buf) : "";
|
|
50390
|
+
if (this.lastNeed) {
|
|
50391
|
+
var end2 = this.lastTotal - this.lastNeed;
|
|
50392
|
+
return r2 + this.lastChar.toString("utf16le", 0, end2);
|
|
50429
50393
|
}
|
|
50430
|
-
|
|
50431
|
-
|
|
50394
|
+
return r2;
|
|
50395
|
+
}
|
|
50396
|
+
function base64Text(buf, i2) {
|
|
50397
|
+
var n2 = (buf.length - i2) % 3;
|
|
50398
|
+
if (n2 === 0)
|
|
50399
|
+
return buf.toString("base64", i2);
|
|
50400
|
+
this.lastNeed = 3 - n2;
|
|
50401
|
+
this.lastTotal = 3;
|
|
50402
|
+
if (n2 === 1) {
|
|
50403
|
+
this.lastChar[0] = buf[buf.length - 1];
|
|
50404
|
+
} else {
|
|
50405
|
+
this.lastChar[0] = buf[buf.length - 2];
|
|
50406
|
+
this.lastChar[1] = buf[buf.length - 1];
|
|
50432
50407
|
}
|
|
50433
|
-
return
|
|
50408
|
+
return buf.toString("base64", i2, buf.length - n2);
|
|
50409
|
+
}
|
|
50410
|
+
function base64End(buf) {
|
|
50411
|
+
var r2 = buf && buf.length ? this.write(buf) : "";
|
|
50412
|
+
if (this.lastNeed)
|
|
50413
|
+
return r2 + this.lastChar.toString("base64", 0, 3 - this.lastNeed);
|
|
50414
|
+
return r2;
|
|
50415
|
+
}
|
|
50416
|
+
function simpleWrite(buf) {
|
|
50417
|
+
return buf.toString(this.encoding);
|
|
50418
|
+
}
|
|
50419
|
+
function simpleEnd(buf) {
|
|
50420
|
+
return buf && buf.length ? this.write(buf) : "";
|
|
50434
50421
|
}
|
|
50435
50422
|
var util$b;
|
|
50436
50423
|
var hasRequiredUtil$5;
|
|
@@ -50450,7 +50437,7 @@ function requireUtil$5() {
|
|
|
50450
50437
|
const { DOMException: DOMException2 } = requireConstants$6();
|
|
50451
50438
|
const { serializeAMimeType, parseMIMEType } = requireDataURL();
|
|
50452
50439
|
const { types: types2 } = require$$0$9;
|
|
50453
|
-
const { StringDecoder } =
|
|
50440
|
+
const { StringDecoder: StringDecoder2 } = string_decoder;
|
|
50454
50441
|
const { btoa: btoa2 } = buffer$3;
|
|
50455
50442
|
const staticPropertyDescriptors = {
|
|
50456
50443
|
enumerable: true,
|
|
@@ -50541,7 +50528,7 @@ function requireUtil$5() {
|
|
|
50541
50528
|
dataURL2 += serializeAMimeType(parsed);
|
|
50542
50529
|
}
|
|
50543
50530
|
dataURL2 += ";base64,";
|
|
50544
|
-
const decoder2 = new
|
|
50531
|
+
const decoder2 = new StringDecoder2("latin1");
|
|
50545
50532
|
for (const chunk of bytes) {
|
|
50546
50533
|
dataURL2 += btoa2(decoder2.write(chunk));
|
|
50547
50534
|
}
|
|
@@ -50570,7 +50557,7 @@ function requireUtil$5() {
|
|
|
50570
50557
|
}
|
|
50571
50558
|
case "BinaryString": {
|
|
50572
50559
|
let binaryString = "";
|
|
50573
|
-
const decoder2 = new
|
|
50560
|
+
const decoder2 = new StringDecoder2("latin1");
|
|
50574
50561
|
for (const chunk of bytes) {
|
|
50575
50562
|
binaryString += decoder2.write(chunk);
|
|
50576
50563
|
}
|
|
@@ -182053,7 +182040,7 @@ function require_stream_readable$1() {
|
|
|
182053
182040
|
var destroyImpl = destroy_1$1;
|
|
182054
182041
|
var _require = state, getHighWaterMark2 = _require.getHighWaterMark;
|
|
182055
182042
|
var _require$codes2 = errorsBrowser.codes, ERR_INVALID_ARG_TYPE = _require$codes2.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes2.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED2 = _require$codes2.ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes2.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
|
182056
|
-
var
|
|
182043
|
+
var StringDecoder2;
|
|
182057
182044
|
var createReadableStreamAsyncIterator;
|
|
182058
182045
|
var from;
|
|
182059
182046
|
requireInherits_browser()(Readable2, Stream2);
|
|
@@ -182101,9 +182088,9 @@ function require_stream_readable$1() {
|
|
|
182101
182088
|
this.decoder = null;
|
|
182102
182089
|
this.encoding = null;
|
|
182103
182090
|
if (options2.encoding) {
|
|
182104
|
-
if (!
|
|
182105
|
-
|
|
182106
|
-
this.decoder = new
|
|
182091
|
+
if (!StringDecoder2)
|
|
182092
|
+
StringDecoder2 = string_decoder.StringDecoder;
|
|
182093
|
+
this.decoder = new StringDecoder2(options2.encoding);
|
|
182107
182094
|
this.encoding = options2.encoding;
|
|
182108
182095
|
}
|
|
182109
182096
|
}
|
|
@@ -182235,9 +182222,9 @@ function require_stream_readable$1() {
|
|
|
182235
182222
|
return this._readableState.flowing === false;
|
|
182236
182223
|
};
|
|
182237
182224
|
Readable2.prototype.setEncoding = function(enc) {
|
|
182238
|
-
if (!
|
|
182239
|
-
|
|
182240
|
-
var decoder2 = new
|
|
182225
|
+
if (!StringDecoder2)
|
|
182226
|
+
StringDecoder2 = string_decoder.StringDecoder;
|
|
182227
|
+
var decoder2 = new StringDecoder2(enc);
|
|
182241
182228
|
this._readableState.decoder = decoder2;
|
|
182242
182229
|
this._readableState.encoding = this._readableState.decoder.encoding;
|
|
182243
182230
|
var p2 = this._readableState.buffer.head;
|
|
@@ -195861,12 +195848,12 @@ function requireInternal() {
|
|
|
195861
195848
|
}
|
|
195862
195849
|
InternalCodec.prototype.encoder = InternalEncoder;
|
|
195863
195850
|
InternalCodec.prototype.decoder = InternalDecoder;
|
|
195864
|
-
var
|
|
195865
|
-
if (!
|
|
195866
|
-
|
|
195851
|
+
var StringDecoder2 = string_decoder.StringDecoder;
|
|
195852
|
+
if (!StringDecoder2.prototype.end)
|
|
195853
|
+
StringDecoder2.prototype.end = function() {
|
|
195867
195854
|
};
|
|
195868
195855
|
function InternalDecoder(options2, codec) {
|
|
195869
|
-
this.decoder = new
|
|
195856
|
+
this.decoder = new StringDecoder2(codec.enc);
|
|
195870
195857
|
}
|
|
195871
195858
|
InternalDecoder.prototype.write = function(buf) {
|
|
195872
195859
|
if (!Buffer2.isBuffer(buf)) {
|
|
@@ -224435,7 +224422,7 @@ function require_stream_readable() {
|
|
|
224435
224422
|
}
|
|
224436
224423
|
var BufferList2 = requireBufferList();
|
|
224437
224424
|
var destroyImpl = requireDestroy();
|
|
224438
|
-
var
|
|
224425
|
+
var StringDecoder2;
|
|
224439
224426
|
util2.inherits(Readable2, Stream2);
|
|
224440
224427
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
224441
224428
|
function prependListener2(emitter, event, fn) {
|
|
@@ -224485,9 +224472,9 @@ function require_stream_readable() {
|
|
|
224485
224472
|
this.decoder = null;
|
|
224486
224473
|
this.encoding = null;
|
|
224487
224474
|
if (options2.encoding) {
|
|
224488
|
-
if (!
|
|
224489
|
-
|
|
224490
|
-
this.decoder = new
|
|
224475
|
+
if (!StringDecoder2)
|
|
224476
|
+
StringDecoder2 = string_decoder.StringDecoder;
|
|
224477
|
+
this.decoder = new StringDecoder2(options2.encoding);
|
|
224491
224478
|
this.encoding = options2.encoding;
|
|
224492
224479
|
}
|
|
224493
224480
|
}
|
|
@@ -224614,9 +224601,9 @@ function require_stream_readable() {
|
|
|
224614
224601
|
return this._readableState.flowing === false;
|
|
224615
224602
|
};
|
|
224616
224603
|
Readable2.prototype.setEncoding = function(enc) {
|
|
224617
|
-
if (!
|
|
224618
|
-
|
|
224619
|
-
this._readableState.decoder = new
|
|
224604
|
+
if (!StringDecoder2)
|
|
224605
|
+
StringDecoder2 = string_decoder.StringDecoder;
|
|
224606
|
+
this._readableState.decoder = new StringDecoder2(enc);
|
|
224620
224607
|
this._readableState.encoding = enc;
|
|
224621
224608
|
return this;
|
|
224622
224609
|
};
|
|
@@ -230421,7 +230408,7 @@ function requireSplit2() {
|
|
|
230421
230408
|
return split2;
|
|
230422
230409
|
hasRequiredSplit2 = 1;
|
|
230423
230410
|
const { Transform: Transform2 } = require$$1$4;
|
|
230424
|
-
const { StringDecoder } =
|
|
230411
|
+
const { StringDecoder: StringDecoder2 } = string_decoder;
|
|
230425
230412
|
const kLast = Symbol("last");
|
|
230426
230413
|
const kDecoder = Symbol("decoder");
|
|
230427
230414
|
function transform2(chunk, enc, cb) {
|
|
@@ -230502,7 +230489,7 @@ function requireSplit2() {
|
|
|
230502
230489
|
options2.readableObjectMode = true;
|
|
230503
230490
|
const stream2 = new Transform2(options2);
|
|
230504
230491
|
stream2[kLast] = "";
|
|
230505
|
-
stream2[kDecoder] = new
|
|
230492
|
+
stream2[kDecoder] = new StringDecoder2("utf8");
|
|
230506
230493
|
stream2.matcher = matcher;
|
|
230507
230494
|
stream2.mapper = mapper2;
|
|
230508
230495
|
stream2.maxLength = options2.maxLength;
|
|
@@ -238929,7 +238916,7 @@ class BufferComposer {
|
|
|
238929
238916
|
buffer.default = BufferComposer;
|
|
238930
238917
|
var string = {};
|
|
238931
238918
|
Object.defineProperty(string, "__esModule", { value: true });
|
|
238932
|
-
const string_decoder_1 =
|
|
238919
|
+
const string_decoder_1 = string_decoder;
|
|
238933
238920
|
class StringComposer {
|
|
238934
238921
|
constructor() {
|
|
238935
238922
|
Object.defineProperty(this, "decoder", {
|
package/package.json
CHANGED
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index'
|