devexpress-richedit 24.1.8 → 24.1.9-build-25002-0102
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/bin/gulpfile.js +2 -2
- package/bin/index-custom.js +2 -2
- package/bin/localization-builder.js +2 -2
- package/bin/nspell-index.js +2 -2
- package/bin/nspell.webpack.config.js +2 -2
- package/bin/webpack-externals.js +2 -2
- package/bin/webpack.config.js +2 -2
- package/dist/dx.richedit.d.ts +2 -2
- package/dist/dx.richedit.js +11 -2440
- package/dist/dx.richedit.min.js +3 -3
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/lib/common/layout-formatter/formatter/utils/restart-preparer.js +2 -2
- package/lib/common/model/caches/images.d.ts +1 -0
- package/lib/common/model/caches/images.js +5 -2
- package/package.json +3 -3
package/dist/dx.richedit.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
/**
|
2
2
|
* DevExpress WebRichEdit (dx.richedit.js)
|
3
|
-
* Version: 24.1.
|
4
|
-
* Copyright (c) 2012 -
|
3
|
+
* Version: 24.1.9
|
4
|
+
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
|
5
5
|
* License: https://www.devexpress.com/Support/EULAs
|
6
6
|
*/
|
7
7
|
/******/ (function() { // webpackBootstrap
|
8
|
+
/******/ "use strict";
|
8
9
|
/******/ var __webpack_modules__ = ({
|
9
10
|
|
10
11
|
/***/ 9279:
|
11
12
|
/***/ (function(__unused_webpack_module, exports) {
|
12
13
|
|
13
|
-
"use strict";
|
14
14
|
|
15
15
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
16
16
|
exports.Browser = void 0;
|
@@ -235,7 +235,6 @@ exports.Browser = Browser;
|
|
235
235
|
/***/ 1772:
|
236
236
|
/***/ (function(__unused_webpack_module, exports) {
|
237
237
|
|
238
|
-
"use strict";
|
239
238
|
var __webpack_unused_export__;
|
240
239
|
|
241
240
|
__webpack_unused_export__ = ({ value: true });
|
@@ -307,7 +306,6 @@ exports.m1 = EmptyBatchUpdatableObject;
|
|
307
306
|
/***/ 677:
|
308
307
|
/***/ (function(__unused_webpack_module, exports) {
|
309
308
|
|
310
|
-
"use strict";
|
311
309
|
var __webpack_unused_export__;
|
312
310
|
|
313
311
|
__webpack_unused_export__ = ({ value: true });
|
@@ -458,7 +456,6 @@ exports.T = ChunkedText;
|
|
458
456
|
/***/ 6218:
|
459
457
|
/***/ (function(__unused_webpack_module, exports) {
|
460
458
|
|
461
|
-
"use strict";
|
462
459
|
var __webpack_unused_export__;
|
463
460
|
|
464
461
|
__webpack_unused_export__ = ({ value: true });
|
@@ -510,7 +507,6 @@ exports.R = DelayedActionManager;
|
|
510
507
|
/***/ 6136:
|
511
508
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
512
509
|
|
513
|
-
"use strict";
|
514
510
|
var __webpack_unused_export__;
|
515
511
|
|
516
512
|
__webpack_unused_export__ = ({ value: true });
|
@@ -562,7 +558,6 @@ exports.$ = DomEventHandlersHolder;
|
|
562
558
|
/***/ 7820:
|
563
559
|
/***/ (function(__unused_webpack_module, exports) {
|
564
560
|
|
565
|
-
"use strict";
|
566
561
|
|
567
562
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
568
563
|
exports.Flag = void 0;
|
@@ -615,7 +610,6 @@ exports.Flag = Flag;
|
|
615
610
|
/***/ 7496:
|
616
611
|
/***/ (function(__unused_webpack_module, exports) {
|
617
612
|
|
618
|
-
"use strict";
|
619
613
|
var __webpack_unused_export__;
|
620
614
|
|
621
615
|
__webpack_unused_export__ = ({ value: true });
|
@@ -651,7 +645,6 @@ __webpack_unused_export__ = Initialize;
|
|
651
645
|
/***/ 6799:
|
652
646
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
653
647
|
|
654
|
-
"use strict";
|
655
648
|
|
656
649
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
657
650
|
exports.ExtendedMinMax = exports.ExtendedMax = exports.ExtendedMin = exports.MinMaxNumber = exports.MinMax = void 0;
|
@@ -713,7 +706,6 @@ exports.ExtendedMinMax = ExtendedMinMax;
|
|
713
706
|
/***/ 9094:
|
714
707
|
/***/ (function(__unused_webpack_module, exports) {
|
715
708
|
|
716
|
-
"use strict";
|
717
709
|
var __webpack_unused_export__;
|
718
710
|
|
719
711
|
__webpack_unused_export__ = ({ value: true });
|
@@ -758,7 +750,6 @@ exports.K = Stack;
|
|
758
750
|
/***/ 9291:
|
759
751
|
/***/ (function(__unused_webpack_module, exports) {
|
760
752
|
|
761
|
-
"use strict";
|
762
753
|
var __webpack_unused_export__;
|
763
754
|
|
764
755
|
__webpack_unused_export__ = ({ value: true });
|
@@ -905,7 +896,6 @@ exports.u = UnitConverter;
|
|
905
896
|
/***/ 8785:
|
906
897
|
/***/ (function(__unused_webpack_module, exports) {
|
907
898
|
|
908
|
-
"use strict";
|
909
899
|
|
910
900
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
911
901
|
exports.Int32Constants = exports.Constants = void 0;
|
@@ -933,7 +923,6 @@ exports.Int32Constants = Int32Constants;
|
|
933
923
|
/***/ 7774:
|
934
924
|
/***/ (function(__unused_webpack_module, exports) {
|
935
925
|
|
936
|
-
"use strict";
|
937
926
|
var __webpack_unused_export__;
|
938
927
|
|
939
928
|
__webpack_unused_export__ = ({ value: true });
|
@@ -957,7 +946,6 @@ exports.D = Errors;
|
|
957
946
|
/***/ 8889:
|
958
947
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
959
948
|
|
960
|
-
"use strict";
|
961
949
|
var __webpack_unused_export__;
|
962
950
|
|
963
951
|
__webpack_unused_export__ = ({ value: true });
|
@@ -1211,7 +1199,6 @@ var YearFormattingItem = (function (_super) {
|
|
1211
1199
|
/***/ 8786:
|
1212
1200
|
/***/ (function(__unused_webpack_module, exports) {
|
1213
1201
|
|
1214
|
-
"use strict";
|
1215
1202
|
|
1216
1203
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1217
1204
|
exports.DateUtils = void 0;
|
@@ -1256,7 +1243,6 @@ exports.DateUtils = DateUtils;
|
|
1256
1243
|
/***/ 5308:
|
1257
1244
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
1258
1245
|
|
1259
|
-
"use strict";
|
1260
1246
|
|
1261
1247
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1262
1248
|
exports.DateFormatter = void 0;
|
@@ -1785,7 +1771,6 @@ exports.DateFormatter = DateFormatter;
|
|
1785
1771
|
/***/ 1768:
|
1786
1772
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
1787
1773
|
|
1788
|
-
"use strict";
|
1789
1774
|
var __webpack_unused_export__;
|
1790
1775
|
|
1791
1776
|
__webpack_unused_export__ = ({ value: true });
|
@@ -1826,7 +1811,6 @@ exports.$ = SimpleFormattersManager;
|
|
1826
1811
|
/***/ 2004:
|
1827
1812
|
/***/ (function(__unused_webpack_module, exports) {
|
1828
1813
|
|
1829
|
-
"use strict";
|
1830
1814
|
|
1831
1815
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
1832
1816
|
exports.NumberFormatter = void 0;
|
@@ -2673,7 +2657,6 @@ exports.NumberFormatter = NumberFormatter;
|
|
2673
2657
|
/***/ 5418:
|
2674
2658
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2675
2659
|
|
2676
|
-
"use strict";
|
2677
2660
|
|
2678
2661
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
2679
2662
|
exports.StringFormatter = void 0;
|
@@ -2818,7 +2801,6 @@ exports.StringFormatter = StringFormatter;
|
|
2818
2801
|
/***/ 3604:
|
2819
2802
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
2820
2803
|
|
2821
|
-
"use strict";
|
2822
2804
|
var __webpack_unused_export__;
|
2823
2805
|
|
2824
2806
|
__webpack_unused_export__ = ({ value: true });
|
@@ -2846,7 +2828,6 @@ exports.m = Margins;
|
|
2846
2828
|
/***/ 5596:
|
2847
2829
|
/***/ (function(__unused_webpack_module, exports) {
|
2848
2830
|
|
2849
|
-
"use strict";
|
2850
2831
|
|
2851
2832
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
2852
2833
|
exports.Metrics = void 0;
|
@@ -2871,7 +2852,6 @@ exports.Metrics = Metrics;
|
|
2871
2852
|
/***/ 4125:
|
2872
2853
|
/***/ (function(__unused_webpack_module, exports) {
|
2873
2854
|
|
2874
|
-
"use strict";
|
2875
2855
|
|
2876
2856
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
2877
2857
|
exports.Offsets = void 0;
|
@@ -2986,7 +2966,6 @@ exports.Offsets = Offsets;
|
|
2986
2966
|
/***/ 8900:
|
2987
2967
|
/***/ (function(__unused_webpack_module, exports) {
|
2988
2968
|
|
2989
|
-
"use strict";
|
2990
2969
|
|
2991
2970
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
2992
2971
|
exports.Point = void 0;
|
@@ -3067,7 +3046,6 @@ exports.Point = Point;
|
|
3067
3046
|
/***/ 9210:
|
3068
3047
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3069
3048
|
|
3070
|
-
"use strict";
|
3071
3049
|
var __webpack_unused_export__;
|
3072
3050
|
|
3073
3051
|
__webpack_unused_export__ = ({ value: true });
|
@@ -3138,7 +3116,6 @@ var CollisionResult;
|
|
3138
3116
|
/***/ 2313:
|
3139
3117
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3140
3118
|
|
3141
|
-
"use strict";
|
3142
3119
|
|
3143
3120
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3144
3121
|
exports.PolygonalChain = void 0;
|
@@ -3199,7 +3176,6 @@ exports.PolygonalChain = PolygonalChain;
|
|
3199
3176
|
/***/ 8011:
|
3200
3177
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3201
3178
|
|
3202
|
-
"use strict";
|
3203
3179
|
|
3204
3180
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3205
3181
|
exports.RectangleDeviation = exports.HitTestDeviation = exports.Rectangle = void 0;
|
@@ -3520,7 +3496,6 @@ exports.RectangleDeviation = RectangleDeviation;
|
|
3520
3496
|
/***/ 1335:
|
3521
3497
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3522
3498
|
|
3523
|
-
"use strict";
|
3524
3499
|
|
3525
3500
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3526
3501
|
exports.Segment = void 0;
|
@@ -3617,7 +3592,6 @@ exports.Segment = Segment;
|
|
3617
3592
|
/***/ 6353:
|
3618
3593
|
/***/ (function(__unused_webpack_module, exports) {
|
3619
3594
|
|
3620
|
-
"use strict";
|
3621
3595
|
|
3622
3596
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3623
3597
|
exports.Size = void 0;
|
@@ -3688,7 +3662,6 @@ exports.Size = Size;
|
|
3688
3662
|
/***/ 9716:
|
3689
3663
|
/***/ (function(__unused_webpack_module, exports) {
|
3690
3664
|
|
3691
|
-
"use strict";
|
3692
3665
|
|
3693
3666
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3694
3667
|
exports.Vector = void 0;
|
@@ -3756,7 +3729,6 @@ exports.Vector = Vector;
|
|
3756
3729
|
/***/ 1104:
|
3757
3730
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3758
3731
|
|
3759
|
-
"use strict";
|
3760
3732
|
|
3761
3733
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
3762
3734
|
exports.IntervalAlgorithms = void 0;
|
@@ -3926,7 +3898,6 @@ exports.IntervalAlgorithms = IntervalAlgorithms;
|
|
3926
3898
|
/***/ 7093:
|
3927
3899
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
3928
3900
|
|
3929
|
-
"use strict";
|
3930
3901
|
var __webpack_unused_export__;
|
3931
3902
|
|
3932
3903
|
__webpack_unused_export__ = ({ value: true });
|
@@ -4000,7 +3971,6 @@ exports.e = BoundaryInterval;
|
|
4000
3971
|
/***/ 7814:
|
4001
3972
|
/***/ (function(__unused_webpack_module, exports) {
|
4002
3973
|
|
4003
|
-
"use strict";
|
4004
3974
|
|
4005
3975
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4006
3976
|
exports.ConstInterval = void 0;
|
@@ -4051,7 +4021,6 @@ exports.ConstInterval = ConstInterval;
|
|
4051
4021
|
/***/ 8860:
|
4052
4022
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4053
4023
|
|
4054
|
-
"use strict";
|
4055
4024
|
|
4056
4025
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4057
4026
|
exports.FixedInterval = void 0;
|
@@ -4123,7 +4092,6 @@ exports.FixedInterval = FixedInterval;
|
|
4123
4092
|
/***/ 8678:
|
4124
4093
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4125
4094
|
|
4126
|
-
"use strict";
|
4127
4095
|
|
4128
4096
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4129
4097
|
exports.MutableInterval = void 0;
|
@@ -4149,7 +4117,6 @@ exports.MutableInterval = MutableInterval;
|
|
4149
4117
|
/***/ 6102:
|
4150
4118
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4151
4119
|
|
4152
|
-
"use strict";
|
4153
4120
|
|
4154
4121
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4155
4122
|
exports.SparseIntervalsCollector = void 0;
|
@@ -4180,7 +4147,6 @@ exports.SparseIntervalsCollector = SparseIntervalsCollector;
|
|
4180
4147
|
/***/ 448:
|
4181
4148
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4182
4149
|
|
4183
|
-
"use strict";
|
4184
4150
|
|
4185
4151
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4186
4152
|
exports.SparseIntervals = void 0;
|
@@ -4231,7 +4197,6 @@ exports.SparseIntervals = SparseIntervals;
|
|
4231
4197
|
/***/ 8094:
|
4232
4198
|
/***/ (function(__unused_webpack_module, exports) {
|
4233
4199
|
|
4234
|
-
"use strict";
|
4235
4200
|
|
4236
4201
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4237
4202
|
exports.SparseIntervalsIterator = void 0;
|
@@ -4296,7 +4261,6 @@ exports.SparseIntervalsIterator = SparseIntervalsIterator;
|
|
4296
4261
|
/***/ 1215:
|
4297
4262
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4298
4263
|
|
4299
|
-
"use strict";
|
4300
4264
|
var __webpack_unused_export__;
|
4301
4265
|
|
4302
4266
|
__webpack_unused_export__ = ({ value: true });
|
@@ -4332,7 +4296,6 @@ exports.g = SparseIntervalsMapCollector;
|
|
4332
4296
|
/***/ 3578:
|
4333
4297
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4334
4298
|
|
4335
|
-
"use strict";
|
4336
4299
|
|
4337
4300
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4338
4301
|
exports.SparseIntervalsMapIterator = void 0;
|
@@ -4379,7 +4342,6 @@ exports.SparseIntervalsMapIterator = SparseIntervalsMapIterator;
|
|
4379
4342
|
/***/ 510:
|
4380
4343
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4381
4344
|
|
4382
|
-
"use strict";
|
4383
4345
|
|
4384
4346
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4385
4347
|
exports.SparseObjectsIterator = void 0;
|
@@ -4405,7 +4367,6 @@ exports.SparseObjectsIterator = SparseObjectsIterator;
|
|
4405
4367
|
/***/ 1695:
|
4406
4368
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4407
4369
|
|
4408
|
-
"use strict";
|
4409
4370
|
var __webpack_unused_export__;
|
4410
4371
|
|
4411
4372
|
__webpack_unused_export__ = ({ value: true });
|
@@ -4500,7 +4461,6 @@ exports.E = PdfHelperFrame;
|
|
4500
4461
|
/***/ 5438:
|
4501
4462
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4502
4463
|
|
4503
|
-
"use strict";
|
4504
4464
|
|
4505
4465
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4506
4466
|
exports.PdfPluginHelper = void 0;
|
@@ -4563,7 +4523,6 @@ exports.PdfPluginHelper = PdfPluginHelper;
|
|
4563
4523
|
/***/ 2217:
|
4564
4524
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4565
4525
|
|
4566
|
-
"use strict";
|
4567
4526
|
var __webpack_unused_export__;
|
4568
4527
|
|
4569
4528
|
__webpack_unused_export__ = ({ value: true });
|
@@ -4652,7 +4611,6 @@ exports.F = AttrUtils;
|
|
4652
4611
|
/***/ 6477:
|
4653
4612
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4654
4613
|
|
4655
|
-
"use strict";
|
4656
4614
|
|
4657
4615
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4658
4616
|
exports.Base64Utils = void 0;
|
@@ -4725,7 +4683,6 @@ exports.Base64Utils = Base64Utils;
|
|
4725
4683
|
/***/ 13:
|
4726
4684
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4727
4685
|
|
4728
|
-
"use strict";
|
4729
4686
|
var __webpack_unused_export__;
|
4730
4687
|
|
4731
4688
|
__webpack_unused_export__ = ({ value: true });
|
@@ -4886,7 +4843,6 @@ exports.i = ColorUtils;
|
|
4886
4843
|
/***/ 2491:
|
4887
4844
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4888
4845
|
|
4889
|
-
"use strict";
|
4890
4846
|
|
4891
4847
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4892
4848
|
exports.numberToStringHex = exports.numberToStringBin = exports.isOdd = exports.isEven = exports.isNonNullString = exports.isString = exports.isNumber = exports.boolToString = exports.boolToInt = exports.isDefined = void 0;
|
@@ -4940,7 +4896,6 @@ exports.numberToStringHex = numberToStringHex;
|
|
4940
4896
|
/***/ 4170:
|
4941
4897
|
/***/ (function(__unused_webpack_module, exports) {
|
4942
4898
|
|
4943
|
-
"use strict";
|
4944
4899
|
|
4945
4900
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
4946
4901
|
exports.Equals = exports.Comparers = void 0;
|
@@ -4980,7 +4935,6 @@ exports.Equals = Equals;
|
|
4980
4935
|
/***/ 8475:
|
4981
4936
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
4982
4937
|
|
4983
|
-
"use strict";
|
4984
4938
|
var __webpack_unused_export__;
|
4985
4939
|
|
4986
4940
|
__webpack_unused_export__ = ({ value: true });
|
@@ -5027,7 +4981,6 @@ exports.F = DataTransferUtils;
|
|
5027
4981
|
/***/ 6907:
|
5028
4982
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
5029
4983
|
|
5030
|
-
"use strict";
|
5031
4984
|
|
5032
4985
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5033
4986
|
exports.DomUtils = void 0;
|
@@ -5505,7 +5458,6 @@ function getAbsoluteScrollOffset_OperaFF(curEl, isX) {
|
|
5505
5458
|
/***/ 9712:
|
5506
5459
|
/***/ (function(__unused_webpack_module, exports) {
|
5507
5460
|
|
5508
|
-
"use strict";
|
5509
5461
|
|
5510
5462
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5511
5463
|
exports.EncodeUtils = void 0;
|
@@ -5555,7 +5507,6 @@ exports.EncodeUtils = EncodeUtils;
|
|
5555
5507
|
/***/ 310:
|
5556
5508
|
/***/ (function(__unused_webpack_module, exports) {
|
5557
5509
|
|
5558
|
-
"use strict";
|
5559
5510
|
var __webpack_unused_export__;
|
5560
5511
|
|
5561
5512
|
__webpack_unused_export__ = ({ value: true });
|
@@ -5594,7 +5545,6 @@ exports.Y = EnumUtils;
|
|
5594
5545
|
/***/ 3714:
|
5595
5546
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
5596
5547
|
|
5597
|
-
"use strict";
|
5598
5548
|
var __webpack_unused_export__;
|
5599
5549
|
|
5600
5550
|
__webpack_unused_export__ = ({ value: true });
|
@@ -5704,7 +5654,6 @@ exports.g = EvtUtils;
|
|
5704
5654
|
/***/ 2674:
|
5705
5655
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
5706
5656
|
|
5707
|
-
"use strict";
|
5708
5657
|
|
5709
5658
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
5710
5659
|
exports.FileUtils = void 0;
|
@@ -5775,7 +5724,6 @@ exports.FileUtils = FileUtils;
|
|
5775
5724
|
/***/ 4004:
|
5776
5725
|
/***/ (function(__unused_webpack_module, exports) {
|
5777
5726
|
|
5778
|
-
"use strict";
|
5779
5727
|
var __webpack_unused_export__;
|
5780
5728
|
|
5781
5729
|
__webpack_unused_export__ = ({ value: true });
|
@@ -5814,7 +5762,6 @@ __webpack_unused_export__ = checkFont;
|
|
5814
5762
|
/***/ 2153:
|
5815
5763
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
5816
5764
|
|
5817
|
-
"use strict";
|
5818
5765
|
var __webpack_unused_export__;
|
5819
5766
|
|
5820
5767
|
__webpack_unused_export__ = ({ value: true });
|
@@ -6097,7 +6044,6 @@ var KeyCode;
|
|
6097
6044
|
/***/ 2940:
|
6098
6045
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
6099
6046
|
|
6100
|
-
"use strict";
|
6101
6047
|
|
6102
6048
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
6103
6049
|
exports.ListUtils = void 0;
|
@@ -6553,7 +6499,6 @@ exports.ListUtils = ListUtils;
|
|
6553
6499
|
/***/ 1167:
|
6554
6500
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
6555
6501
|
|
6556
|
-
"use strict";
|
6557
6502
|
var __webpack_unused_export__;
|
6558
6503
|
|
6559
6504
|
__webpack_unused_export__ = ({ value: true });
|
@@ -6787,7 +6732,6 @@ exports.j = NumberMapUtils;
|
|
6787
6732
|
/***/ 2866:
|
6788
6733
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
6789
6734
|
|
6790
|
-
"use strict";
|
6791
6735
|
|
6792
6736
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
6793
6737
|
exports.StringMapUtils = void 0;
|
@@ -7019,7 +6963,6 @@ exports.StringMapUtils = StringMapUtils;
|
|
7019
6963
|
/***/ 8679:
|
7020
6964
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
7021
6965
|
|
7022
|
-
"use strict";
|
7023
6966
|
|
7024
6967
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7025
6968
|
exports.MathUtils = void 0;
|
@@ -7081,7 +7024,6 @@ exports.MathUtils = MathUtils;
|
|
7081
7024
|
/***/ 4633:
|
7082
7025
|
/***/ (function(__unused_webpack_module, exports) {
|
7083
7026
|
|
7084
|
-
"use strict";
|
7085
7027
|
|
7086
7028
|
var _a, _b, _c;
|
7087
7029
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
@@ -7221,7 +7163,6 @@ exports.MimeTypeUtils = MimeTypeUtils;
|
|
7221
7163
|
/***/ 499:
|
7222
7164
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
7223
7165
|
|
7224
|
-
"use strict";
|
7225
7166
|
var __webpack_unused_export__;
|
7226
7167
|
|
7227
7168
|
__webpack_unused_export__ = ({ value: true });
|
@@ -7246,7 +7187,6 @@ exports.y = PopupUtils;
|
|
7246
7187
|
/***/ 2400:
|
7247
7188
|
/***/ (function(__unused_webpack_module, exports) {
|
7248
7189
|
|
7249
|
-
"use strict";
|
7250
7190
|
|
7251
7191
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7252
7192
|
exports.SearchUtils = void 0;
|
@@ -7321,7 +7261,6 @@ exports.SearchUtils = SearchUtils;
|
|
7321
7261
|
/***/ 49:
|
7322
7262
|
/***/ (function(__unused_webpack_module, exports) {
|
7323
7263
|
|
7324
|
-
"use strict";
|
7325
7264
|
|
7326
7265
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7327
7266
|
exports.StringUtils = void 0;
|
@@ -7447,7 +7386,6 @@ exports.StringUtils = StringUtils;
|
|
7447
7386
|
/***/ 1632:
|
7448
7387
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
7449
7388
|
|
7450
|
-
"use strict";
|
7451
7389
|
|
7452
7390
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
7453
7391
|
exports.TouchUtils = void 0;
|
@@ -7493,7 +7431,6 @@ exports.TouchUtils = TouchUtils;
|
|
7493
7431
|
/***/ 6795:
|
7494
7432
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
7495
7433
|
|
7496
|
-
"use strict";
|
7497
7434
|
var __webpack_unused_export__;
|
7498
7435
|
|
7499
7436
|
__webpack_unused_export__ = ({ value: true });
|
@@ -7600,7 +7537,6 @@ exports.R = Url;
|
|
7600
7537
|
/***/ 2020:
|
7601
7538
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
7602
7539
|
|
7603
|
-
"use strict";
|
7604
7540
|
__webpack_require__.r(__webpack_exports__);
|
7605
7541
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
7606
7542
|
/* harmony export */ __assign: function() { return /* binding */ __assign; },
|
@@ -7869,2377 +7805,11 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
7869
7805
|
}
|
7870
7806
|
|
7871
7807
|
|
7872
|
-
/***/ }),
|
7873
|
-
|
7874
|
-
/***/ 9742:
|
7875
|
-
/***/ (function(__unused_webpack_module, exports) {
|
7876
|
-
|
7877
|
-
"use strict";
|
7878
|
-
|
7879
|
-
|
7880
|
-
exports.byteLength = byteLength
|
7881
|
-
exports.toByteArray = toByteArray
|
7882
|
-
exports.fromByteArray = fromByteArray
|
7883
|
-
|
7884
|
-
var lookup = []
|
7885
|
-
var revLookup = []
|
7886
|
-
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
7887
|
-
|
7888
|
-
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
7889
|
-
for (var i = 0, len = code.length; i < len; ++i) {
|
7890
|
-
lookup[i] = code[i]
|
7891
|
-
revLookup[code.charCodeAt(i)] = i
|
7892
|
-
}
|
7893
|
-
|
7894
|
-
// Support decoding URL-safe base64 strings, as Node.js does.
|
7895
|
-
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
7896
|
-
revLookup['-'.charCodeAt(0)] = 62
|
7897
|
-
revLookup['_'.charCodeAt(0)] = 63
|
7898
|
-
|
7899
|
-
function getLens (b64) {
|
7900
|
-
var len = b64.length
|
7901
|
-
|
7902
|
-
if (len % 4 > 0) {
|
7903
|
-
throw new Error('Invalid string. Length must be a multiple of 4')
|
7904
|
-
}
|
7905
|
-
|
7906
|
-
// Trim off extra bytes after placeholder bytes are found
|
7907
|
-
// See: https://github.com/beatgammit/base64-js/issues/42
|
7908
|
-
var validLen = b64.indexOf('=')
|
7909
|
-
if (validLen === -1) validLen = len
|
7910
|
-
|
7911
|
-
var placeHoldersLen = validLen === len
|
7912
|
-
? 0
|
7913
|
-
: 4 - (validLen % 4)
|
7914
|
-
|
7915
|
-
return [validLen, placeHoldersLen]
|
7916
|
-
}
|
7917
|
-
|
7918
|
-
// base64 is 4/3 + up to two characters of the original data
|
7919
|
-
function byteLength (b64) {
|
7920
|
-
var lens = getLens(b64)
|
7921
|
-
var validLen = lens[0]
|
7922
|
-
var placeHoldersLen = lens[1]
|
7923
|
-
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
7924
|
-
}
|
7925
|
-
|
7926
|
-
function _byteLength (b64, validLen, placeHoldersLen) {
|
7927
|
-
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
7928
|
-
}
|
7929
|
-
|
7930
|
-
function toByteArray (b64) {
|
7931
|
-
var tmp
|
7932
|
-
var lens = getLens(b64)
|
7933
|
-
var validLen = lens[0]
|
7934
|
-
var placeHoldersLen = lens[1]
|
7935
|
-
|
7936
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
7937
|
-
|
7938
|
-
var curByte = 0
|
7939
|
-
|
7940
|
-
// if there are placeholders, only get up to the last complete 4 chars
|
7941
|
-
var len = placeHoldersLen > 0
|
7942
|
-
? validLen - 4
|
7943
|
-
: validLen
|
7944
|
-
|
7945
|
-
var i
|
7946
|
-
for (i = 0; i < len; i += 4) {
|
7947
|
-
tmp =
|
7948
|
-
(revLookup[b64.charCodeAt(i)] << 18) |
|
7949
|
-
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
7950
|
-
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
7951
|
-
revLookup[b64.charCodeAt(i + 3)]
|
7952
|
-
arr[curByte++] = (tmp >> 16) & 0xFF
|
7953
|
-
arr[curByte++] = (tmp >> 8) & 0xFF
|
7954
|
-
arr[curByte++] = tmp & 0xFF
|
7955
|
-
}
|
7956
|
-
|
7957
|
-
if (placeHoldersLen === 2) {
|
7958
|
-
tmp =
|
7959
|
-
(revLookup[b64.charCodeAt(i)] << 2) |
|
7960
|
-
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
7961
|
-
arr[curByte++] = tmp & 0xFF
|
7962
|
-
}
|
7963
|
-
|
7964
|
-
if (placeHoldersLen === 1) {
|
7965
|
-
tmp =
|
7966
|
-
(revLookup[b64.charCodeAt(i)] << 10) |
|
7967
|
-
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
7968
|
-
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
7969
|
-
arr[curByte++] = (tmp >> 8) & 0xFF
|
7970
|
-
arr[curByte++] = tmp & 0xFF
|
7971
|
-
}
|
7972
|
-
|
7973
|
-
return arr
|
7974
|
-
}
|
7975
|
-
|
7976
|
-
function tripletToBase64 (num) {
|
7977
|
-
return lookup[num >> 18 & 0x3F] +
|
7978
|
-
lookup[num >> 12 & 0x3F] +
|
7979
|
-
lookup[num >> 6 & 0x3F] +
|
7980
|
-
lookup[num & 0x3F]
|
7981
|
-
}
|
7982
|
-
|
7983
|
-
function encodeChunk (uint8, start, end) {
|
7984
|
-
var tmp
|
7985
|
-
var output = []
|
7986
|
-
for (var i = start; i < end; i += 3) {
|
7987
|
-
tmp =
|
7988
|
-
((uint8[i] << 16) & 0xFF0000) +
|
7989
|
-
((uint8[i + 1] << 8) & 0xFF00) +
|
7990
|
-
(uint8[i + 2] & 0xFF)
|
7991
|
-
output.push(tripletToBase64(tmp))
|
7992
|
-
}
|
7993
|
-
return output.join('')
|
7994
|
-
}
|
7995
|
-
|
7996
|
-
function fromByteArray (uint8) {
|
7997
|
-
var tmp
|
7998
|
-
var len = uint8.length
|
7999
|
-
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
8000
|
-
var parts = []
|
8001
|
-
var maxChunkLength = 16383 // must be multiple of 3
|
8002
|
-
|
8003
|
-
// go through the array every three bytes, we'll deal with trailing stuff later
|
8004
|
-
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
8005
|
-
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
|
8006
|
-
}
|
8007
|
-
|
8008
|
-
// pad the end with zeros, but make sure to not forget the extra bytes
|
8009
|
-
if (extraBytes === 1) {
|
8010
|
-
tmp = uint8[len - 1]
|
8011
|
-
parts.push(
|
8012
|
-
lookup[tmp >> 2] +
|
8013
|
-
lookup[(tmp << 4) & 0x3F] +
|
8014
|
-
'=='
|
8015
|
-
)
|
8016
|
-
} else if (extraBytes === 2) {
|
8017
|
-
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
8018
|
-
parts.push(
|
8019
|
-
lookup[tmp >> 10] +
|
8020
|
-
lookup[(tmp >> 4) & 0x3F] +
|
8021
|
-
lookup[(tmp << 2) & 0x3F] +
|
8022
|
-
'='
|
8023
|
-
)
|
8024
|
-
}
|
8025
|
-
|
8026
|
-
return parts.join('')
|
8027
|
-
}
|
8028
|
-
|
8029
|
-
|
8030
|
-
/***/ }),
|
8031
|
-
|
8032
|
-
/***/ 8764:
|
8033
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
8034
|
-
|
8035
|
-
"use strict";
|
8036
|
-
var __webpack_unused_export__;
|
8037
|
-
/*!
|
8038
|
-
* The buffer module from node.js, for the browser.
|
8039
|
-
*
|
8040
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
8041
|
-
* @license MIT
|
8042
|
-
*/
|
8043
|
-
/* eslint-disable no-proto */
|
8044
|
-
|
8045
|
-
|
8046
|
-
|
8047
|
-
const base64 = __webpack_require__(9742)
|
8048
|
-
const ieee754 = __webpack_require__(645)
|
8049
|
-
const customInspectSymbol =
|
8050
|
-
(typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation
|
8051
|
-
? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
|
8052
|
-
: null
|
8053
|
-
|
8054
|
-
exports.lW = Buffer
|
8055
|
-
__webpack_unused_export__ = SlowBuffer
|
8056
|
-
exports.h2 = 50
|
8057
|
-
|
8058
|
-
const K_MAX_LENGTH = 0x7fffffff
|
8059
|
-
__webpack_unused_export__ = K_MAX_LENGTH
|
8060
|
-
|
8061
|
-
/**
|
8062
|
-
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
8063
|
-
* === true Use Uint8Array implementation (fastest)
|
8064
|
-
* === false Print warning and recommend using `buffer` v4.x which has an Object
|
8065
|
-
* implementation (most compatible, even IE6)
|
8066
|
-
*
|
8067
|
-
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
8068
|
-
* Opera 11.6+, iOS 4.2+.
|
8069
|
-
*
|
8070
|
-
* We report that the browser does not support typed arrays if the are not subclassable
|
8071
|
-
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
|
8072
|
-
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
|
8073
|
-
* for __proto__ and has a buggy typed array implementation.
|
8074
|
-
*/
|
8075
|
-
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
|
8076
|
-
|
8077
|
-
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
|
8078
|
-
typeof console.error === 'function') {
|
8079
|
-
console.error(
|
8080
|
-
'This browser lacks typed array (Uint8Array) support which is required by ' +
|
8081
|
-
'`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
|
8082
|
-
)
|
8083
|
-
}
|
8084
|
-
|
8085
|
-
function typedArraySupport () {
|
8086
|
-
// Can typed array instances can be augmented?
|
8087
|
-
try {
|
8088
|
-
const arr = new Uint8Array(1)
|
8089
|
-
const proto = { foo: function () { return 42 } }
|
8090
|
-
Object.setPrototypeOf(proto, Uint8Array.prototype)
|
8091
|
-
Object.setPrototypeOf(arr, proto)
|
8092
|
-
return arr.foo() === 42
|
8093
|
-
} catch (e) {
|
8094
|
-
return false
|
8095
|
-
}
|
8096
|
-
}
|
8097
|
-
|
8098
|
-
Object.defineProperty(Buffer.prototype, 'parent', {
|
8099
|
-
enumerable: true,
|
8100
|
-
get: function () {
|
8101
|
-
if (!Buffer.isBuffer(this)) return undefined
|
8102
|
-
return this.buffer
|
8103
|
-
}
|
8104
|
-
})
|
8105
|
-
|
8106
|
-
Object.defineProperty(Buffer.prototype, 'offset', {
|
8107
|
-
enumerable: true,
|
8108
|
-
get: function () {
|
8109
|
-
if (!Buffer.isBuffer(this)) return undefined
|
8110
|
-
return this.byteOffset
|
8111
|
-
}
|
8112
|
-
})
|
8113
|
-
|
8114
|
-
function createBuffer (length) {
|
8115
|
-
if (length > K_MAX_LENGTH) {
|
8116
|
-
throw new RangeError('The value "' + length + '" is invalid for option "size"')
|
8117
|
-
}
|
8118
|
-
// Return an augmented `Uint8Array` instance
|
8119
|
-
const buf = new Uint8Array(length)
|
8120
|
-
Object.setPrototypeOf(buf, Buffer.prototype)
|
8121
|
-
return buf
|
8122
|
-
}
|
8123
|
-
|
8124
|
-
/**
|
8125
|
-
* The Buffer constructor returns instances of `Uint8Array` that have their
|
8126
|
-
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
8127
|
-
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
8128
|
-
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
8129
|
-
* returns a single octet.
|
8130
|
-
*
|
8131
|
-
* The `Uint8Array` prototype remains unmodified.
|
8132
|
-
*/
|
8133
|
-
|
8134
|
-
function Buffer (arg, encodingOrOffset, length) {
|
8135
|
-
// Common case.
|
8136
|
-
if (typeof arg === 'number') {
|
8137
|
-
if (typeof encodingOrOffset === 'string') {
|
8138
|
-
throw new TypeError(
|
8139
|
-
'The "string" argument must be of type string. Received type number'
|
8140
|
-
)
|
8141
|
-
}
|
8142
|
-
return allocUnsafe(arg)
|
8143
|
-
}
|
8144
|
-
return from(arg, encodingOrOffset, length)
|
8145
|
-
}
|
8146
|
-
|
8147
|
-
Buffer.poolSize = 8192 // not used by this implementation
|
8148
|
-
|
8149
|
-
function from (value, encodingOrOffset, length) {
|
8150
|
-
if (typeof value === 'string') {
|
8151
|
-
return fromString(value, encodingOrOffset)
|
8152
|
-
}
|
8153
|
-
|
8154
|
-
if (ArrayBuffer.isView(value)) {
|
8155
|
-
return fromArrayView(value)
|
8156
|
-
}
|
8157
|
-
|
8158
|
-
if (value == null) {
|
8159
|
-
throw new TypeError(
|
8160
|
-
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
8161
|
-
'or Array-like Object. Received type ' + (typeof value)
|
8162
|
-
)
|
8163
|
-
}
|
8164
|
-
|
8165
|
-
if (isInstance(value, ArrayBuffer) ||
|
8166
|
-
(value && isInstance(value.buffer, ArrayBuffer))) {
|
8167
|
-
return fromArrayBuffer(value, encodingOrOffset, length)
|
8168
|
-
}
|
8169
|
-
|
8170
|
-
if (typeof SharedArrayBuffer !== 'undefined' &&
|
8171
|
-
(isInstance(value, SharedArrayBuffer) ||
|
8172
|
-
(value && isInstance(value.buffer, SharedArrayBuffer)))) {
|
8173
|
-
return fromArrayBuffer(value, encodingOrOffset, length)
|
8174
|
-
}
|
8175
|
-
|
8176
|
-
if (typeof value === 'number') {
|
8177
|
-
throw new TypeError(
|
8178
|
-
'The "value" argument must not be of type number. Received type number'
|
8179
|
-
)
|
8180
|
-
}
|
8181
|
-
|
8182
|
-
const valueOf = value.valueOf && value.valueOf()
|
8183
|
-
if (valueOf != null && valueOf !== value) {
|
8184
|
-
return Buffer.from(valueOf, encodingOrOffset, length)
|
8185
|
-
}
|
8186
|
-
|
8187
|
-
const b = fromObject(value)
|
8188
|
-
if (b) return b
|
8189
|
-
|
8190
|
-
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
|
8191
|
-
typeof value[Symbol.toPrimitive] === 'function') {
|
8192
|
-
return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)
|
8193
|
-
}
|
8194
|
-
|
8195
|
-
throw new TypeError(
|
8196
|
-
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
8197
|
-
'or Array-like Object. Received type ' + (typeof value)
|
8198
|
-
)
|
8199
|
-
}
|
8200
|
-
|
8201
|
-
/**
|
8202
|
-
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
8203
|
-
* if value is a number.
|
8204
|
-
* Buffer.from(str[, encoding])
|
8205
|
-
* Buffer.from(array)
|
8206
|
-
* Buffer.from(buffer)
|
8207
|
-
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
8208
|
-
**/
|
8209
|
-
Buffer.from = function (value, encodingOrOffset, length) {
|
8210
|
-
return from(value, encodingOrOffset, length)
|
8211
|
-
}
|
8212
|
-
|
8213
|
-
// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
|
8214
|
-
// https://github.com/feross/buffer/pull/148
|
8215
|
-
Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
|
8216
|
-
Object.setPrototypeOf(Buffer, Uint8Array)
|
8217
|
-
|
8218
|
-
function assertSize (size) {
|
8219
|
-
if (typeof size !== 'number') {
|
8220
|
-
throw new TypeError('"size" argument must be of type number')
|
8221
|
-
} else if (size < 0) {
|
8222
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"')
|
8223
|
-
}
|
8224
|
-
}
|
8225
|
-
|
8226
|
-
function alloc (size, fill, encoding) {
|
8227
|
-
assertSize(size)
|
8228
|
-
if (size <= 0) {
|
8229
|
-
return createBuffer(size)
|
8230
|
-
}
|
8231
|
-
if (fill !== undefined) {
|
8232
|
-
// Only pay attention to encoding if it's a string. This
|
8233
|
-
// prevents accidentally sending in a number that would
|
8234
|
-
// be interpreted as a start offset.
|
8235
|
-
return typeof encoding === 'string'
|
8236
|
-
? createBuffer(size).fill(fill, encoding)
|
8237
|
-
: createBuffer(size).fill(fill)
|
8238
|
-
}
|
8239
|
-
return createBuffer(size)
|
8240
|
-
}
|
8241
|
-
|
8242
|
-
/**
|
8243
|
-
* Creates a new filled Buffer instance.
|
8244
|
-
* alloc(size[, fill[, encoding]])
|
8245
|
-
**/
|
8246
|
-
Buffer.alloc = function (size, fill, encoding) {
|
8247
|
-
return alloc(size, fill, encoding)
|
8248
|
-
}
|
8249
|
-
|
8250
|
-
function allocUnsafe (size) {
|
8251
|
-
assertSize(size)
|
8252
|
-
return createBuffer(size < 0 ? 0 : checked(size) | 0)
|
8253
|
-
}
|
8254
|
-
|
8255
|
-
/**
|
8256
|
-
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
8257
|
-
* */
|
8258
|
-
Buffer.allocUnsafe = function (size) {
|
8259
|
-
return allocUnsafe(size)
|
8260
|
-
}
|
8261
|
-
/**
|
8262
|
-
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
8263
|
-
*/
|
8264
|
-
Buffer.allocUnsafeSlow = function (size) {
|
8265
|
-
return allocUnsafe(size)
|
8266
|
-
}
|
8267
|
-
|
8268
|
-
function fromString (string, encoding) {
|
8269
|
-
if (typeof encoding !== 'string' || encoding === '') {
|
8270
|
-
encoding = 'utf8'
|
8271
|
-
}
|
8272
|
-
|
8273
|
-
if (!Buffer.isEncoding(encoding)) {
|
8274
|
-
throw new TypeError('Unknown encoding: ' + encoding)
|
8275
|
-
}
|
8276
|
-
|
8277
|
-
const length = byteLength(string, encoding) | 0
|
8278
|
-
let buf = createBuffer(length)
|
8279
|
-
|
8280
|
-
const actual = buf.write(string, encoding)
|
8281
|
-
|
8282
|
-
if (actual !== length) {
|
8283
|
-
// Writing a hex string, for example, that contains invalid characters will
|
8284
|
-
// cause everything after the first invalid character to be ignored. (e.g.
|
8285
|
-
// 'abxxcd' will be treated as 'ab')
|
8286
|
-
buf = buf.slice(0, actual)
|
8287
|
-
}
|
8288
|
-
|
8289
|
-
return buf
|
8290
|
-
}
|
8291
|
-
|
8292
|
-
function fromArrayLike (array) {
|
8293
|
-
const length = array.length < 0 ? 0 : checked(array.length) | 0
|
8294
|
-
const buf = createBuffer(length)
|
8295
|
-
for (let i = 0; i < length; i += 1) {
|
8296
|
-
buf[i] = array[i] & 255
|
8297
|
-
}
|
8298
|
-
return buf
|
8299
|
-
}
|
8300
|
-
|
8301
|
-
function fromArrayView (arrayView) {
|
8302
|
-
if (isInstance(arrayView, Uint8Array)) {
|
8303
|
-
const copy = new Uint8Array(arrayView)
|
8304
|
-
return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)
|
8305
|
-
}
|
8306
|
-
return fromArrayLike(arrayView)
|
8307
|
-
}
|
8308
|
-
|
8309
|
-
function fromArrayBuffer (array, byteOffset, length) {
|
8310
|
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
8311
|
-
throw new RangeError('"offset" is outside of buffer bounds')
|
8312
|
-
}
|
8313
|
-
|
8314
|
-
if (array.byteLength < byteOffset + (length || 0)) {
|
8315
|
-
throw new RangeError('"length" is outside of buffer bounds')
|
8316
|
-
}
|
8317
|
-
|
8318
|
-
let buf
|
8319
|
-
if (byteOffset === undefined && length === undefined) {
|
8320
|
-
buf = new Uint8Array(array)
|
8321
|
-
} else if (length === undefined) {
|
8322
|
-
buf = new Uint8Array(array, byteOffset)
|
8323
|
-
} else {
|
8324
|
-
buf = new Uint8Array(array, byteOffset, length)
|
8325
|
-
}
|
8326
|
-
|
8327
|
-
// Return an augmented `Uint8Array` instance
|
8328
|
-
Object.setPrototypeOf(buf, Buffer.prototype)
|
8329
|
-
|
8330
|
-
return buf
|
8331
|
-
}
|
8332
|
-
|
8333
|
-
function fromObject (obj) {
|
8334
|
-
if (Buffer.isBuffer(obj)) {
|
8335
|
-
const len = checked(obj.length) | 0
|
8336
|
-
const buf = createBuffer(len)
|
8337
|
-
|
8338
|
-
if (buf.length === 0) {
|
8339
|
-
return buf
|
8340
|
-
}
|
8341
|
-
|
8342
|
-
obj.copy(buf, 0, 0, len)
|
8343
|
-
return buf
|
8344
|
-
}
|
8345
|
-
|
8346
|
-
if (obj.length !== undefined) {
|
8347
|
-
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
|
8348
|
-
return createBuffer(0)
|
8349
|
-
}
|
8350
|
-
return fromArrayLike(obj)
|
8351
|
-
}
|
8352
|
-
|
8353
|
-
if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
|
8354
|
-
return fromArrayLike(obj.data)
|
8355
|
-
}
|
8356
|
-
}
|
8357
|
-
|
8358
|
-
function checked (length) {
|
8359
|
-
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when
|
8360
|
-
// length is NaN (which is otherwise coerced to zero.)
|
8361
|
-
if (length >= K_MAX_LENGTH) {
|
8362
|
-
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
8363
|
-
'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
|
8364
|
-
}
|
8365
|
-
return length | 0
|
8366
|
-
}
|
8367
|
-
|
8368
|
-
function SlowBuffer (length) {
|
8369
|
-
if (+length != length) { // eslint-disable-line eqeqeq
|
8370
|
-
length = 0
|
8371
|
-
}
|
8372
|
-
return Buffer.alloc(+length)
|
8373
|
-
}
|
8374
|
-
|
8375
|
-
Buffer.isBuffer = function isBuffer (b) {
|
8376
|
-
return b != null && b._isBuffer === true &&
|
8377
|
-
b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
|
8378
|
-
}
|
8379
|
-
|
8380
|
-
Buffer.compare = function compare (a, b) {
|
8381
|
-
if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
|
8382
|
-
if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
|
8383
|
-
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
8384
|
-
throw new TypeError(
|
8385
|
-
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
8386
|
-
)
|
8387
|
-
}
|
8388
|
-
|
8389
|
-
if (a === b) return 0
|
8390
|
-
|
8391
|
-
let x = a.length
|
8392
|
-
let y = b.length
|
8393
|
-
|
8394
|
-
for (let i = 0, len = Math.min(x, y); i < len; ++i) {
|
8395
|
-
if (a[i] !== b[i]) {
|
8396
|
-
x = a[i]
|
8397
|
-
y = b[i]
|
8398
|
-
break
|
8399
|
-
}
|
8400
|
-
}
|
8401
|
-
|
8402
|
-
if (x < y) return -1
|
8403
|
-
if (y < x) return 1
|
8404
|
-
return 0
|
8405
|
-
}
|
8406
|
-
|
8407
|
-
Buffer.isEncoding = function isEncoding (encoding) {
|
8408
|
-
switch (String(encoding).toLowerCase()) {
|
8409
|
-
case 'hex':
|
8410
|
-
case 'utf8':
|
8411
|
-
case 'utf-8':
|
8412
|
-
case 'ascii':
|
8413
|
-
case 'latin1':
|
8414
|
-
case 'binary':
|
8415
|
-
case 'base64':
|
8416
|
-
case 'ucs2':
|
8417
|
-
case 'ucs-2':
|
8418
|
-
case 'utf16le':
|
8419
|
-
case 'utf-16le':
|
8420
|
-
return true
|
8421
|
-
default:
|
8422
|
-
return false
|
8423
|
-
}
|
8424
|
-
}
|
8425
|
-
|
8426
|
-
Buffer.concat = function concat (list, length) {
|
8427
|
-
if (!Array.isArray(list)) {
|
8428
|
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
8429
|
-
}
|
8430
|
-
|
8431
|
-
if (list.length === 0) {
|
8432
|
-
return Buffer.alloc(0)
|
8433
|
-
}
|
8434
|
-
|
8435
|
-
let i
|
8436
|
-
if (length === undefined) {
|
8437
|
-
length = 0
|
8438
|
-
for (i = 0; i < list.length; ++i) {
|
8439
|
-
length += list[i].length
|
8440
|
-
}
|
8441
|
-
}
|
8442
|
-
|
8443
|
-
const buffer = Buffer.allocUnsafe(length)
|
8444
|
-
let pos = 0
|
8445
|
-
for (i = 0; i < list.length; ++i) {
|
8446
|
-
let buf = list[i]
|
8447
|
-
if (isInstance(buf, Uint8Array)) {
|
8448
|
-
if (pos + buf.length > buffer.length) {
|
8449
|
-
if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
|
8450
|
-
buf.copy(buffer, pos)
|
8451
|
-
} else {
|
8452
|
-
Uint8Array.prototype.set.call(
|
8453
|
-
buffer,
|
8454
|
-
buf,
|
8455
|
-
pos
|
8456
|
-
)
|
8457
|
-
}
|
8458
|
-
} else if (!Buffer.isBuffer(buf)) {
|
8459
|
-
throw new TypeError('"list" argument must be an Array of Buffers')
|
8460
|
-
} else {
|
8461
|
-
buf.copy(buffer, pos)
|
8462
|
-
}
|
8463
|
-
pos += buf.length
|
8464
|
-
}
|
8465
|
-
return buffer
|
8466
|
-
}
|
8467
|
-
|
8468
|
-
function byteLength (string, encoding) {
|
8469
|
-
if (Buffer.isBuffer(string)) {
|
8470
|
-
return string.length
|
8471
|
-
}
|
8472
|
-
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
8473
|
-
return string.byteLength
|
8474
|
-
}
|
8475
|
-
if (typeof string !== 'string') {
|
8476
|
-
throw new TypeError(
|
8477
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
|
8478
|
-
'Received type ' + typeof string
|
8479
|
-
)
|
8480
|
-
}
|
8481
|
-
|
8482
|
-
const len = string.length
|
8483
|
-
const mustMatch = (arguments.length > 2 && arguments[2] === true)
|
8484
|
-
if (!mustMatch && len === 0) return 0
|
8485
|
-
|
8486
|
-
// Use a for loop to avoid recursion
|
8487
|
-
let loweredCase = false
|
8488
|
-
for (;;) {
|
8489
|
-
switch (encoding) {
|
8490
|
-
case 'ascii':
|
8491
|
-
case 'latin1':
|
8492
|
-
case 'binary':
|
8493
|
-
return len
|
8494
|
-
case 'utf8':
|
8495
|
-
case 'utf-8':
|
8496
|
-
return utf8ToBytes(string).length
|
8497
|
-
case 'ucs2':
|
8498
|
-
case 'ucs-2':
|
8499
|
-
case 'utf16le':
|
8500
|
-
case 'utf-16le':
|
8501
|
-
return len * 2
|
8502
|
-
case 'hex':
|
8503
|
-
return len >>> 1
|
8504
|
-
case 'base64':
|
8505
|
-
return base64ToBytes(string).length
|
8506
|
-
default:
|
8507
|
-
if (loweredCase) {
|
8508
|
-
return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
|
8509
|
-
}
|
8510
|
-
encoding = ('' + encoding).toLowerCase()
|
8511
|
-
loweredCase = true
|
8512
|
-
}
|
8513
|
-
}
|
8514
|
-
}
|
8515
|
-
Buffer.byteLength = byteLength
|
8516
|
-
|
8517
|
-
function slowToString (encoding, start, end) {
|
8518
|
-
let loweredCase = false
|
8519
|
-
|
8520
|
-
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
8521
|
-
// property of a typed array.
|
8522
|
-
|
8523
|
-
// This behaves neither like String nor Uint8Array in that we set start/end
|
8524
|
-
// to their upper/lower bounds if the value passed is out of range.
|
8525
|
-
// undefined is handled specially as per ECMA-262 6th Edition,
|
8526
|
-
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
8527
|
-
if (start === undefined || start < 0) {
|
8528
|
-
start = 0
|
8529
|
-
}
|
8530
|
-
// Return early if start > this.length. Done here to prevent potential uint32
|
8531
|
-
// coercion fail below.
|
8532
|
-
if (start > this.length) {
|
8533
|
-
return ''
|
8534
|
-
}
|
8535
|
-
|
8536
|
-
if (end === undefined || end > this.length) {
|
8537
|
-
end = this.length
|
8538
|
-
}
|
8539
|
-
|
8540
|
-
if (end <= 0) {
|
8541
|
-
return ''
|
8542
|
-
}
|
8543
|
-
|
8544
|
-
// Force coercion to uint32. This will also coerce falsey/NaN values to 0.
|
8545
|
-
end >>>= 0
|
8546
|
-
start >>>= 0
|
8547
|
-
|
8548
|
-
if (end <= start) {
|
8549
|
-
return ''
|
8550
|
-
}
|
8551
|
-
|
8552
|
-
if (!encoding) encoding = 'utf8'
|
8553
|
-
|
8554
|
-
while (true) {
|
8555
|
-
switch (encoding) {
|
8556
|
-
case 'hex':
|
8557
|
-
return hexSlice(this, start, end)
|
8558
|
-
|
8559
|
-
case 'utf8':
|
8560
|
-
case 'utf-8':
|
8561
|
-
return utf8Slice(this, start, end)
|
8562
|
-
|
8563
|
-
case 'ascii':
|
8564
|
-
return asciiSlice(this, start, end)
|
8565
|
-
|
8566
|
-
case 'latin1':
|
8567
|
-
case 'binary':
|
8568
|
-
return latin1Slice(this, start, end)
|
8569
|
-
|
8570
|
-
case 'base64':
|
8571
|
-
return base64Slice(this, start, end)
|
8572
|
-
|
8573
|
-
case 'ucs2':
|
8574
|
-
case 'ucs-2':
|
8575
|
-
case 'utf16le':
|
8576
|
-
case 'utf-16le':
|
8577
|
-
return utf16leSlice(this, start, end)
|
8578
|
-
|
8579
|
-
default:
|
8580
|
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
8581
|
-
encoding = (encoding + '').toLowerCase()
|
8582
|
-
loweredCase = true
|
8583
|
-
}
|
8584
|
-
}
|
8585
|
-
}
|
8586
|
-
|
8587
|
-
// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
|
8588
|
-
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
|
8589
|
-
// reliably in a browserify context because there could be multiple different
|
8590
|
-
// copies of the 'buffer' package in use. This method works even for Buffer
|
8591
|
-
// instances that were created from another copy of the `buffer` package.
|
8592
|
-
// See: https://github.com/feross/buffer/issues/154
|
8593
|
-
Buffer.prototype._isBuffer = true
|
8594
|
-
|
8595
|
-
function swap (b, n, m) {
|
8596
|
-
const i = b[n]
|
8597
|
-
b[n] = b[m]
|
8598
|
-
b[m] = i
|
8599
|
-
}
|
8600
|
-
|
8601
|
-
Buffer.prototype.swap16 = function swap16 () {
|
8602
|
-
const len = this.length
|
8603
|
-
if (len % 2 !== 0) {
|
8604
|
-
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
8605
|
-
}
|
8606
|
-
for (let i = 0; i < len; i += 2) {
|
8607
|
-
swap(this, i, i + 1)
|
8608
|
-
}
|
8609
|
-
return this
|
8610
|
-
}
|
8611
|
-
|
8612
|
-
Buffer.prototype.swap32 = function swap32 () {
|
8613
|
-
const len = this.length
|
8614
|
-
if (len % 4 !== 0) {
|
8615
|
-
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
8616
|
-
}
|
8617
|
-
for (let i = 0; i < len; i += 4) {
|
8618
|
-
swap(this, i, i + 3)
|
8619
|
-
swap(this, i + 1, i + 2)
|
8620
|
-
}
|
8621
|
-
return this
|
8622
|
-
}
|
8623
|
-
|
8624
|
-
Buffer.prototype.swap64 = function swap64 () {
|
8625
|
-
const len = this.length
|
8626
|
-
if (len % 8 !== 0) {
|
8627
|
-
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
8628
|
-
}
|
8629
|
-
for (let i = 0; i < len; i += 8) {
|
8630
|
-
swap(this, i, i + 7)
|
8631
|
-
swap(this, i + 1, i + 6)
|
8632
|
-
swap(this, i + 2, i + 5)
|
8633
|
-
swap(this, i + 3, i + 4)
|
8634
|
-
}
|
8635
|
-
return this
|
8636
|
-
}
|
8637
|
-
|
8638
|
-
Buffer.prototype.toString = function toString () {
|
8639
|
-
const length = this.length
|
8640
|
-
if (length === 0) return ''
|
8641
|
-
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
8642
|
-
return slowToString.apply(this, arguments)
|
8643
|
-
}
|
8644
|
-
|
8645
|
-
Buffer.prototype.toLocaleString = Buffer.prototype.toString
|
8646
|
-
|
8647
|
-
Buffer.prototype.equals = function equals (b) {
|
8648
|
-
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
8649
|
-
if (this === b) return true
|
8650
|
-
return Buffer.compare(this, b) === 0
|
8651
|
-
}
|
8652
|
-
|
8653
|
-
Buffer.prototype.inspect = function inspect () {
|
8654
|
-
let str = ''
|
8655
|
-
const max = exports.h2
|
8656
|
-
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
|
8657
|
-
if (this.length > max) str += ' ... '
|
8658
|
-
return '<Buffer ' + str + '>'
|
8659
|
-
}
|
8660
|
-
if (customInspectSymbol) {
|
8661
|
-
Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
|
8662
|
-
}
|
8663
|
-
|
8664
|
-
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
8665
|
-
if (isInstance(target, Uint8Array)) {
|
8666
|
-
target = Buffer.from(target, target.offset, target.byteLength)
|
8667
|
-
}
|
8668
|
-
if (!Buffer.isBuffer(target)) {
|
8669
|
-
throw new TypeError(
|
8670
|
-
'The "target" argument must be one of type Buffer or Uint8Array. ' +
|
8671
|
-
'Received type ' + (typeof target)
|
8672
|
-
)
|
8673
|
-
}
|
8674
|
-
|
8675
|
-
if (start === undefined) {
|
8676
|
-
start = 0
|
8677
|
-
}
|
8678
|
-
if (end === undefined) {
|
8679
|
-
end = target ? target.length : 0
|
8680
|
-
}
|
8681
|
-
if (thisStart === undefined) {
|
8682
|
-
thisStart = 0
|
8683
|
-
}
|
8684
|
-
if (thisEnd === undefined) {
|
8685
|
-
thisEnd = this.length
|
8686
|
-
}
|
8687
|
-
|
8688
|
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
8689
|
-
throw new RangeError('out of range index')
|
8690
|
-
}
|
8691
|
-
|
8692
|
-
if (thisStart >= thisEnd && start >= end) {
|
8693
|
-
return 0
|
8694
|
-
}
|
8695
|
-
if (thisStart >= thisEnd) {
|
8696
|
-
return -1
|
8697
|
-
}
|
8698
|
-
if (start >= end) {
|
8699
|
-
return 1
|
8700
|
-
}
|
8701
|
-
|
8702
|
-
start >>>= 0
|
8703
|
-
end >>>= 0
|
8704
|
-
thisStart >>>= 0
|
8705
|
-
thisEnd >>>= 0
|
8706
|
-
|
8707
|
-
if (this === target) return 0
|
8708
|
-
|
8709
|
-
let x = thisEnd - thisStart
|
8710
|
-
let y = end - start
|
8711
|
-
const len = Math.min(x, y)
|
8712
|
-
|
8713
|
-
const thisCopy = this.slice(thisStart, thisEnd)
|
8714
|
-
const targetCopy = target.slice(start, end)
|
8715
|
-
|
8716
|
-
for (let i = 0; i < len; ++i) {
|
8717
|
-
if (thisCopy[i] !== targetCopy[i]) {
|
8718
|
-
x = thisCopy[i]
|
8719
|
-
y = targetCopy[i]
|
8720
|
-
break
|
8721
|
-
}
|
8722
|
-
}
|
8723
|
-
|
8724
|
-
if (x < y) return -1
|
8725
|
-
if (y < x) return 1
|
8726
|
-
return 0
|
8727
|
-
}
|
8728
|
-
|
8729
|
-
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
8730
|
-
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
8731
|
-
//
|
8732
|
-
// Arguments:
|
8733
|
-
// - buffer - a Buffer to search
|
8734
|
-
// - val - a string, Buffer, or number
|
8735
|
-
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
8736
|
-
// - encoding - an optional encoding, relevant is val is a string
|
8737
|
-
// - dir - true for indexOf, false for lastIndexOf
|
8738
|
-
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
8739
|
-
// Empty buffer means no match
|
8740
|
-
if (buffer.length === 0) return -1
|
8741
|
-
|
8742
|
-
// Normalize byteOffset
|
8743
|
-
if (typeof byteOffset === 'string') {
|
8744
|
-
encoding = byteOffset
|
8745
|
-
byteOffset = 0
|
8746
|
-
} else if (byteOffset > 0x7fffffff) {
|
8747
|
-
byteOffset = 0x7fffffff
|
8748
|
-
} else if (byteOffset < -0x80000000) {
|
8749
|
-
byteOffset = -0x80000000
|
8750
|
-
}
|
8751
|
-
byteOffset = +byteOffset // Coerce to Number.
|
8752
|
-
if (numberIsNaN(byteOffset)) {
|
8753
|
-
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
8754
|
-
byteOffset = dir ? 0 : (buffer.length - 1)
|
8755
|
-
}
|
8756
|
-
|
8757
|
-
// Normalize byteOffset: negative offsets start from the end of the buffer
|
8758
|
-
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
8759
|
-
if (byteOffset >= buffer.length) {
|
8760
|
-
if (dir) return -1
|
8761
|
-
else byteOffset = buffer.length - 1
|
8762
|
-
} else if (byteOffset < 0) {
|
8763
|
-
if (dir) byteOffset = 0
|
8764
|
-
else return -1
|
8765
|
-
}
|
8766
|
-
|
8767
|
-
// Normalize val
|
8768
|
-
if (typeof val === 'string') {
|
8769
|
-
val = Buffer.from(val, encoding)
|
8770
|
-
}
|
8771
|
-
|
8772
|
-
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
8773
|
-
if (Buffer.isBuffer(val)) {
|
8774
|
-
// Special case: looking for empty string/buffer always fails
|
8775
|
-
if (val.length === 0) {
|
8776
|
-
return -1
|
8777
|
-
}
|
8778
|
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
8779
|
-
} else if (typeof val === 'number') {
|
8780
|
-
val = val & 0xFF // Search for a byte value [0-255]
|
8781
|
-
if (typeof Uint8Array.prototype.indexOf === 'function') {
|
8782
|
-
if (dir) {
|
8783
|
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
8784
|
-
} else {
|
8785
|
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
8786
|
-
}
|
8787
|
-
}
|
8788
|
-
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
|
8789
|
-
}
|
8790
|
-
|
8791
|
-
throw new TypeError('val must be string, number or Buffer')
|
8792
|
-
}
|
8793
|
-
|
8794
|
-
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
8795
|
-
let indexSize = 1
|
8796
|
-
let arrLength = arr.length
|
8797
|
-
let valLength = val.length
|
8798
|
-
|
8799
|
-
if (encoding !== undefined) {
|
8800
|
-
encoding = String(encoding).toLowerCase()
|
8801
|
-
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
8802
|
-
encoding === 'utf16le' || encoding === 'utf-16le') {
|
8803
|
-
if (arr.length < 2 || val.length < 2) {
|
8804
|
-
return -1
|
8805
|
-
}
|
8806
|
-
indexSize = 2
|
8807
|
-
arrLength /= 2
|
8808
|
-
valLength /= 2
|
8809
|
-
byteOffset /= 2
|
8810
|
-
}
|
8811
|
-
}
|
8812
|
-
|
8813
|
-
function read (buf, i) {
|
8814
|
-
if (indexSize === 1) {
|
8815
|
-
return buf[i]
|
8816
|
-
} else {
|
8817
|
-
return buf.readUInt16BE(i * indexSize)
|
8818
|
-
}
|
8819
|
-
}
|
8820
|
-
|
8821
|
-
let i
|
8822
|
-
if (dir) {
|
8823
|
-
let foundIndex = -1
|
8824
|
-
for (i = byteOffset; i < arrLength; i++) {
|
8825
|
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
8826
|
-
if (foundIndex === -1) foundIndex = i
|
8827
|
-
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
8828
|
-
} else {
|
8829
|
-
if (foundIndex !== -1) i -= i - foundIndex
|
8830
|
-
foundIndex = -1
|
8831
|
-
}
|
8832
|
-
}
|
8833
|
-
} else {
|
8834
|
-
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
8835
|
-
for (i = byteOffset; i >= 0; i--) {
|
8836
|
-
let found = true
|
8837
|
-
for (let j = 0; j < valLength; j++) {
|
8838
|
-
if (read(arr, i + j) !== read(val, j)) {
|
8839
|
-
found = false
|
8840
|
-
break
|
8841
|
-
}
|
8842
|
-
}
|
8843
|
-
if (found) return i
|
8844
|
-
}
|
8845
|
-
}
|
8846
|
-
|
8847
|
-
return -1
|
8848
|
-
}
|
8849
|
-
|
8850
|
-
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
8851
|
-
return this.indexOf(val, byteOffset, encoding) !== -1
|
8852
|
-
}
|
8853
|
-
|
8854
|
-
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
8855
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
8856
|
-
}
|
8857
|
-
|
8858
|
-
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
8859
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
8860
|
-
}
|
8861
|
-
|
8862
|
-
function hexWrite (buf, string, offset, length) {
|
8863
|
-
offset = Number(offset) || 0
|
8864
|
-
const remaining = buf.length - offset
|
8865
|
-
if (!length) {
|
8866
|
-
length = remaining
|
8867
|
-
} else {
|
8868
|
-
length = Number(length)
|
8869
|
-
if (length > remaining) {
|
8870
|
-
length = remaining
|
8871
|
-
}
|
8872
|
-
}
|
8873
|
-
|
8874
|
-
const strLen = string.length
|
8875
|
-
|
8876
|
-
if (length > strLen / 2) {
|
8877
|
-
length = strLen / 2
|
8878
|
-
}
|
8879
|
-
let i
|
8880
|
-
for (i = 0; i < length; ++i) {
|
8881
|
-
const parsed = parseInt(string.substr(i * 2, 2), 16)
|
8882
|
-
if (numberIsNaN(parsed)) return i
|
8883
|
-
buf[offset + i] = parsed
|
8884
|
-
}
|
8885
|
-
return i
|
8886
|
-
}
|
8887
|
-
|
8888
|
-
function utf8Write (buf, string, offset, length) {
|
8889
|
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
8890
|
-
}
|
8891
|
-
|
8892
|
-
function asciiWrite (buf, string, offset, length) {
|
8893
|
-
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
8894
|
-
}
|
8895
|
-
|
8896
|
-
function base64Write (buf, string, offset, length) {
|
8897
|
-
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
8898
|
-
}
|
8899
|
-
|
8900
|
-
function ucs2Write (buf, string, offset, length) {
|
8901
|
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
8902
|
-
}
|
8903
|
-
|
8904
|
-
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
8905
|
-
// Buffer#write(string)
|
8906
|
-
if (offset === undefined) {
|
8907
|
-
encoding = 'utf8'
|
8908
|
-
length = this.length
|
8909
|
-
offset = 0
|
8910
|
-
// Buffer#write(string, encoding)
|
8911
|
-
} else if (length === undefined && typeof offset === 'string') {
|
8912
|
-
encoding = offset
|
8913
|
-
length = this.length
|
8914
|
-
offset = 0
|
8915
|
-
// Buffer#write(string, offset[, length][, encoding])
|
8916
|
-
} else if (isFinite(offset)) {
|
8917
|
-
offset = offset >>> 0
|
8918
|
-
if (isFinite(length)) {
|
8919
|
-
length = length >>> 0
|
8920
|
-
if (encoding === undefined) encoding = 'utf8'
|
8921
|
-
} else {
|
8922
|
-
encoding = length
|
8923
|
-
length = undefined
|
8924
|
-
}
|
8925
|
-
} else {
|
8926
|
-
throw new Error(
|
8927
|
-
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
8928
|
-
)
|
8929
|
-
}
|
8930
|
-
|
8931
|
-
const remaining = this.length - offset
|
8932
|
-
if (length === undefined || length > remaining) length = remaining
|
8933
|
-
|
8934
|
-
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
8935
|
-
throw new RangeError('Attempt to write outside buffer bounds')
|
8936
|
-
}
|
8937
|
-
|
8938
|
-
if (!encoding) encoding = 'utf8'
|
8939
|
-
|
8940
|
-
let loweredCase = false
|
8941
|
-
for (;;) {
|
8942
|
-
switch (encoding) {
|
8943
|
-
case 'hex':
|
8944
|
-
return hexWrite(this, string, offset, length)
|
8945
|
-
|
8946
|
-
case 'utf8':
|
8947
|
-
case 'utf-8':
|
8948
|
-
return utf8Write(this, string, offset, length)
|
8949
|
-
|
8950
|
-
case 'ascii':
|
8951
|
-
case 'latin1':
|
8952
|
-
case 'binary':
|
8953
|
-
return asciiWrite(this, string, offset, length)
|
8954
|
-
|
8955
|
-
case 'base64':
|
8956
|
-
// Warning: maxLength not taken into account in base64Write
|
8957
|
-
return base64Write(this, string, offset, length)
|
8958
|
-
|
8959
|
-
case 'ucs2':
|
8960
|
-
case 'ucs-2':
|
8961
|
-
case 'utf16le':
|
8962
|
-
case 'utf-16le':
|
8963
|
-
return ucs2Write(this, string, offset, length)
|
8964
|
-
|
8965
|
-
default:
|
8966
|
-
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
8967
|
-
encoding = ('' + encoding).toLowerCase()
|
8968
|
-
loweredCase = true
|
8969
|
-
}
|
8970
|
-
}
|
8971
|
-
}
|
8972
|
-
|
8973
|
-
Buffer.prototype.toJSON = function toJSON () {
|
8974
|
-
return {
|
8975
|
-
type: 'Buffer',
|
8976
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
8977
|
-
}
|
8978
|
-
}
|
8979
|
-
|
8980
|
-
function base64Slice (buf, start, end) {
|
8981
|
-
if (start === 0 && end === buf.length) {
|
8982
|
-
return base64.fromByteArray(buf)
|
8983
|
-
} else {
|
8984
|
-
return base64.fromByteArray(buf.slice(start, end))
|
8985
|
-
}
|
8986
|
-
}
|
8987
|
-
|
8988
|
-
function utf8Slice (buf, start, end) {
|
8989
|
-
end = Math.min(buf.length, end)
|
8990
|
-
const res = []
|
8991
|
-
|
8992
|
-
let i = start
|
8993
|
-
while (i < end) {
|
8994
|
-
const firstByte = buf[i]
|
8995
|
-
let codePoint = null
|
8996
|
-
let bytesPerSequence = (firstByte > 0xEF)
|
8997
|
-
? 4
|
8998
|
-
: (firstByte > 0xDF)
|
8999
|
-
? 3
|
9000
|
-
: (firstByte > 0xBF)
|
9001
|
-
? 2
|
9002
|
-
: 1
|
9003
|
-
|
9004
|
-
if (i + bytesPerSequence <= end) {
|
9005
|
-
let secondByte, thirdByte, fourthByte, tempCodePoint
|
9006
|
-
|
9007
|
-
switch (bytesPerSequence) {
|
9008
|
-
case 1:
|
9009
|
-
if (firstByte < 0x80) {
|
9010
|
-
codePoint = firstByte
|
9011
|
-
}
|
9012
|
-
break
|
9013
|
-
case 2:
|
9014
|
-
secondByte = buf[i + 1]
|
9015
|
-
if ((secondByte & 0xC0) === 0x80) {
|
9016
|
-
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
9017
|
-
if (tempCodePoint > 0x7F) {
|
9018
|
-
codePoint = tempCodePoint
|
9019
|
-
}
|
9020
|
-
}
|
9021
|
-
break
|
9022
|
-
case 3:
|
9023
|
-
secondByte = buf[i + 1]
|
9024
|
-
thirdByte = buf[i + 2]
|
9025
|
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
9026
|
-
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
9027
|
-
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
9028
|
-
codePoint = tempCodePoint
|
9029
|
-
}
|
9030
|
-
}
|
9031
|
-
break
|
9032
|
-
case 4:
|
9033
|
-
secondByte = buf[i + 1]
|
9034
|
-
thirdByte = buf[i + 2]
|
9035
|
-
fourthByte = buf[i + 3]
|
9036
|
-
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
9037
|
-
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
9038
|
-
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
9039
|
-
codePoint = tempCodePoint
|
9040
|
-
}
|
9041
|
-
}
|
9042
|
-
}
|
9043
|
-
}
|
9044
|
-
|
9045
|
-
if (codePoint === null) {
|
9046
|
-
// we did not generate a valid codePoint so insert a
|
9047
|
-
// replacement char (U+FFFD) and advance only 1 byte
|
9048
|
-
codePoint = 0xFFFD
|
9049
|
-
bytesPerSequence = 1
|
9050
|
-
} else if (codePoint > 0xFFFF) {
|
9051
|
-
// encode to utf16 (surrogate pair dance)
|
9052
|
-
codePoint -= 0x10000
|
9053
|
-
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
9054
|
-
codePoint = 0xDC00 | codePoint & 0x3FF
|
9055
|
-
}
|
9056
|
-
|
9057
|
-
res.push(codePoint)
|
9058
|
-
i += bytesPerSequence
|
9059
|
-
}
|
9060
|
-
|
9061
|
-
return decodeCodePointsArray(res)
|
9062
|
-
}
|
9063
|
-
|
9064
|
-
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
9065
|
-
// the lowest limit is Chrome, with 0x10000 args.
|
9066
|
-
// We go 1 magnitude less, for safety
|
9067
|
-
const MAX_ARGUMENTS_LENGTH = 0x1000
|
9068
|
-
|
9069
|
-
function decodeCodePointsArray (codePoints) {
|
9070
|
-
const len = codePoints.length
|
9071
|
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
9072
|
-
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
9073
|
-
}
|
9074
|
-
|
9075
|
-
// Decode in chunks to avoid "call stack size exceeded".
|
9076
|
-
let res = ''
|
9077
|
-
let i = 0
|
9078
|
-
while (i < len) {
|
9079
|
-
res += String.fromCharCode.apply(
|
9080
|
-
String,
|
9081
|
-
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
9082
|
-
)
|
9083
|
-
}
|
9084
|
-
return res
|
9085
|
-
}
|
9086
|
-
|
9087
|
-
function asciiSlice (buf, start, end) {
|
9088
|
-
let ret = ''
|
9089
|
-
end = Math.min(buf.length, end)
|
9090
|
-
|
9091
|
-
for (let i = start; i < end; ++i) {
|
9092
|
-
ret += String.fromCharCode(buf[i] & 0x7F)
|
9093
|
-
}
|
9094
|
-
return ret
|
9095
|
-
}
|
9096
|
-
|
9097
|
-
function latin1Slice (buf, start, end) {
|
9098
|
-
let ret = ''
|
9099
|
-
end = Math.min(buf.length, end)
|
9100
|
-
|
9101
|
-
for (let i = start; i < end; ++i) {
|
9102
|
-
ret += String.fromCharCode(buf[i])
|
9103
|
-
}
|
9104
|
-
return ret
|
9105
|
-
}
|
9106
|
-
|
9107
|
-
function hexSlice (buf, start, end) {
|
9108
|
-
const len = buf.length
|
9109
|
-
|
9110
|
-
if (!start || start < 0) start = 0
|
9111
|
-
if (!end || end < 0 || end > len) end = len
|
9112
|
-
|
9113
|
-
let out = ''
|
9114
|
-
for (let i = start; i < end; ++i) {
|
9115
|
-
out += hexSliceLookupTable[buf[i]]
|
9116
|
-
}
|
9117
|
-
return out
|
9118
|
-
}
|
9119
|
-
|
9120
|
-
function utf16leSlice (buf, start, end) {
|
9121
|
-
const bytes = buf.slice(start, end)
|
9122
|
-
let res = ''
|
9123
|
-
// If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
|
9124
|
-
for (let i = 0; i < bytes.length - 1; i += 2) {
|
9125
|
-
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
|
9126
|
-
}
|
9127
|
-
return res
|
9128
|
-
}
|
9129
|
-
|
9130
|
-
Buffer.prototype.slice = function slice (start, end) {
|
9131
|
-
const len = this.length
|
9132
|
-
start = ~~start
|
9133
|
-
end = end === undefined ? len : ~~end
|
9134
|
-
|
9135
|
-
if (start < 0) {
|
9136
|
-
start += len
|
9137
|
-
if (start < 0) start = 0
|
9138
|
-
} else if (start > len) {
|
9139
|
-
start = len
|
9140
|
-
}
|
9141
|
-
|
9142
|
-
if (end < 0) {
|
9143
|
-
end += len
|
9144
|
-
if (end < 0) end = 0
|
9145
|
-
} else if (end > len) {
|
9146
|
-
end = len
|
9147
|
-
}
|
9148
|
-
|
9149
|
-
if (end < start) end = start
|
9150
|
-
|
9151
|
-
const newBuf = this.subarray(start, end)
|
9152
|
-
// Return an augmented `Uint8Array` instance
|
9153
|
-
Object.setPrototypeOf(newBuf, Buffer.prototype)
|
9154
|
-
|
9155
|
-
return newBuf
|
9156
|
-
}
|
9157
|
-
|
9158
|
-
/*
|
9159
|
-
* Need to make sure that buffer isn't trying to write out of bounds.
|
9160
|
-
*/
|
9161
|
-
function checkOffset (offset, ext, length) {
|
9162
|
-
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
9163
|
-
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
9164
|
-
}
|
9165
|
-
|
9166
|
-
Buffer.prototype.readUintLE =
|
9167
|
-
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
9168
|
-
offset = offset >>> 0
|
9169
|
-
byteLength = byteLength >>> 0
|
9170
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
9171
|
-
|
9172
|
-
let val = this[offset]
|
9173
|
-
let mul = 1
|
9174
|
-
let i = 0
|
9175
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
9176
|
-
val += this[offset + i] * mul
|
9177
|
-
}
|
9178
|
-
|
9179
|
-
return val
|
9180
|
-
}
|
9181
|
-
|
9182
|
-
Buffer.prototype.readUintBE =
|
9183
|
-
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
9184
|
-
offset = offset >>> 0
|
9185
|
-
byteLength = byteLength >>> 0
|
9186
|
-
if (!noAssert) {
|
9187
|
-
checkOffset(offset, byteLength, this.length)
|
9188
|
-
}
|
9189
|
-
|
9190
|
-
let val = this[offset + --byteLength]
|
9191
|
-
let mul = 1
|
9192
|
-
while (byteLength > 0 && (mul *= 0x100)) {
|
9193
|
-
val += this[offset + --byteLength] * mul
|
9194
|
-
}
|
9195
|
-
|
9196
|
-
return val
|
9197
|
-
}
|
9198
|
-
|
9199
|
-
Buffer.prototype.readUint8 =
|
9200
|
-
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
9201
|
-
offset = offset >>> 0
|
9202
|
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
9203
|
-
return this[offset]
|
9204
|
-
}
|
9205
|
-
|
9206
|
-
Buffer.prototype.readUint16LE =
|
9207
|
-
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
9208
|
-
offset = offset >>> 0
|
9209
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
9210
|
-
return this[offset] | (this[offset + 1] << 8)
|
9211
|
-
}
|
9212
|
-
|
9213
|
-
Buffer.prototype.readUint16BE =
|
9214
|
-
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
9215
|
-
offset = offset >>> 0
|
9216
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
9217
|
-
return (this[offset] << 8) | this[offset + 1]
|
9218
|
-
}
|
9219
|
-
|
9220
|
-
Buffer.prototype.readUint32LE =
|
9221
|
-
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
9222
|
-
offset = offset >>> 0
|
9223
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9224
|
-
|
9225
|
-
return ((this[offset]) |
|
9226
|
-
(this[offset + 1] << 8) |
|
9227
|
-
(this[offset + 2] << 16)) +
|
9228
|
-
(this[offset + 3] * 0x1000000)
|
9229
|
-
}
|
9230
|
-
|
9231
|
-
Buffer.prototype.readUint32BE =
|
9232
|
-
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
9233
|
-
offset = offset >>> 0
|
9234
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9235
|
-
|
9236
|
-
return (this[offset] * 0x1000000) +
|
9237
|
-
((this[offset + 1] << 16) |
|
9238
|
-
(this[offset + 2] << 8) |
|
9239
|
-
this[offset + 3])
|
9240
|
-
}
|
9241
|
-
|
9242
|
-
Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {
|
9243
|
-
offset = offset >>> 0
|
9244
|
-
validateNumber(offset, 'offset')
|
9245
|
-
const first = this[offset]
|
9246
|
-
const last = this[offset + 7]
|
9247
|
-
if (first === undefined || last === undefined) {
|
9248
|
-
boundsError(offset, this.length - 8)
|
9249
|
-
}
|
9250
|
-
|
9251
|
-
const lo = first +
|
9252
|
-
this[++offset] * 2 ** 8 +
|
9253
|
-
this[++offset] * 2 ** 16 +
|
9254
|
-
this[++offset] * 2 ** 24
|
9255
|
-
|
9256
|
-
const hi = this[++offset] +
|
9257
|
-
this[++offset] * 2 ** 8 +
|
9258
|
-
this[++offset] * 2 ** 16 +
|
9259
|
-
last * 2 ** 24
|
9260
|
-
|
9261
|
-
return BigInt(lo) + (BigInt(hi) << BigInt(32))
|
9262
|
-
})
|
9263
|
-
|
9264
|
-
Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {
|
9265
|
-
offset = offset >>> 0
|
9266
|
-
validateNumber(offset, 'offset')
|
9267
|
-
const first = this[offset]
|
9268
|
-
const last = this[offset + 7]
|
9269
|
-
if (first === undefined || last === undefined) {
|
9270
|
-
boundsError(offset, this.length - 8)
|
9271
|
-
}
|
9272
|
-
|
9273
|
-
const hi = first * 2 ** 24 +
|
9274
|
-
this[++offset] * 2 ** 16 +
|
9275
|
-
this[++offset] * 2 ** 8 +
|
9276
|
-
this[++offset]
|
9277
|
-
|
9278
|
-
const lo = this[++offset] * 2 ** 24 +
|
9279
|
-
this[++offset] * 2 ** 16 +
|
9280
|
-
this[++offset] * 2 ** 8 +
|
9281
|
-
last
|
9282
|
-
|
9283
|
-
return (BigInt(hi) << BigInt(32)) + BigInt(lo)
|
9284
|
-
})
|
9285
|
-
|
9286
|
-
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
9287
|
-
offset = offset >>> 0
|
9288
|
-
byteLength = byteLength >>> 0
|
9289
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
9290
|
-
|
9291
|
-
let val = this[offset]
|
9292
|
-
let mul = 1
|
9293
|
-
let i = 0
|
9294
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
9295
|
-
val += this[offset + i] * mul
|
9296
|
-
}
|
9297
|
-
mul *= 0x80
|
9298
|
-
|
9299
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
9300
|
-
|
9301
|
-
return val
|
9302
|
-
}
|
9303
|
-
|
9304
|
-
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
9305
|
-
offset = offset >>> 0
|
9306
|
-
byteLength = byteLength >>> 0
|
9307
|
-
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
9308
|
-
|
9309
|
-
let i = byteLength
|
9310
|
-
let mul = 1
|
9311
|
-
let val = this[offset + --i]
|
9312
|
-
while (i > 0 && (mul *= 0x100)) {
|
9313
|
-
val += this[offset + --i] * mul
|
9314
|
-
}
|
9315
|
-
mul *= 0x80
|
9316
|
-
|
9317
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
9318
|
-
|
9319
|
-
return val
|
9320
|
-
}
|
9321
|
-
|
9322
|
-
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
9323
|
-
offset = offset >>> 0
|
9324
|
-
if (!noAssert) checkOffset(offset, 1, this.length)
|
9325
|
-
if (!(this[offset] & 0x80)) return (this[offset])
|
9326
|
-
return ((0xff - this[offset] + 1) * -1)
|
9327
|
-
}
|
9328
|
-
|
9329
|
-
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
9330
|
-
offset = offset >>> 0
|
9331
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
9332
|
-
const val = this[offset] | (this[offset + 1] << 8)
|
9333
|
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
9334
|
-
}
|
9335
|
-
|
9336
|
-
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
9337
|
-
offset = offset >>> 0
|
9338
|
-
if (!noAssert) checkOffset(offset, 2, this.length)
|
9339
|
-
const val = this[offset + 1] | (this[offset] << 8)
|
9340
|
-
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
9341
|
-
}
|
9342
|
-
|
9343
|
-
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
9344
|
-
offset = offset >>> 0
|
9345
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9346
|
-
|
9347
|
-
return (this[offset]) |
|
9348
|
-
(this[offset + 1] << 8) |
|
9349
|
-
(this[offset + 2] << 16) |
|
9350
|
-
(this[offset + 3] << 24)
|
9351
|
-
}
|
9352
|
-
|
9353
|
-
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
9354
|
-
offset = offset >>> 0
|
9355
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9356
|
-
|
9357
|
-
return (this[offset] << 24) |
|
9358
|
-
(this[offset + 1] << 16) |
|
9359
|
-
(this[offset + 2] << 8) |
|
9360
|
-
(this[offset + 3])
|
9361
|
-
}
|
9362
|
-
|
9363
|
-
Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {
|
9364
|
-
offset = offset >>> 0
|
9365
|
-
validateNumber(offset, 'offset')
|
9366
|
-
const first = this[offset]
|
9367
|
-
const last = this[offset + 7]
|
9368
|
-
if (first === undefined || last === undefined) {
|
9369
|
-
boundsError(offset, this.length - 8)
|
9370
|
-
}
|
9371
|
-
|
9372
|
-
const val = this[offset + 4] +
|
9373
|
-
this[offset + 5] * 2 ** 8 +
|
9374
|
-
this[offset + 6] * 2 ** 16 +
|
9375
|
-
(last << 24) // Overflow
|
9376
|
-
|
9377
|
-
return (BigInt(val) << BigInt(32)) +
|
9378
|
-
BigInt(first +
|
9379
|
-
this[++offset] * 2 ** 8 +
|
9380
|
-
this[++offset] * 2 ** 16 +
|
9381
|
-
this[++offset] * 2 ** 24)
|
9382
|
-
})
|
9383
|
-
|
9384
|
-
Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {
|
9385
|
-
offset = offset >>> 0
|
9386
|
-
validateNumber(offset, 'offset')
|
9387
|
-
const first = this[offset]
|
9388
|
-
const last = this[offset + 7]
|
9389
|
-
if (first === undefined || last === undefined) {
|
9390
|
-
boundsError(offset, this.length - 8)
|
9391
|
-
}
|
9392
|
-
|
9393
|
-
const val = (first << 24) + // Overflow
|
9394
|
-
this[++offset] * 2 ** 16 +
|
9395
|
-
this[++offset] * 2 ** 8 +
|
9396
|
-
this[++offset]
|
9397
|
-
|
9398
|
-
return (BigInt(val) << BigInt(32)) +
|
9399
|
-
BigInt(this[++offset] * 2 ** 24 +
|
9400
|
-
this[++offset] * 2 ** 16 +
|
9401
|
-
this[++offset] * 2 ** 8 +
|
9402
|
-
last)
|
9403
|
-
})
|
9404
|
-
|
9405
|
-
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
9406
|
-
offset = offset >>> 0
|
9407
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9408
|
-
return ieee754.read(this, offset, true, 23, 4)
|
9409
|
-
}
|
9410
|
-
|
9411
|
-
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
9412
|
-
offset = offset >>> 0
|
9413
|
-
if (!noAssert) checkOffset(offset, 4, this.length)
|
9414
|
-
return ieee754.read(this, offset, false, 23, 4)
|
9415
|
-
}
|
9416
|
-
|
9417
|
-
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
9418
|
-
offset = offset >>> 0
|
9419
|
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
9420
|
-
return ieee754.read(this, offset, true, 52, 8)
|
9421
|
-
}
|
9422
|
-
|
9423
|
-
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
9424
|
-
offset = offset >>> 0
|
9425
|
-
if (!noAssert) checkOffset(offset, 8, this.length)
|
9426
|
-
return ieee754.read(this, offset, false, 52, 8)
|
9427
|
-
}
|
9428
|
-
|
9429
|
-
function checkInt (buf, value, offset, ext, max, min) {
|
9430
|
-
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
9431
|
-
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
9432
|
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
9433
|
-
}
|
9434
|
-
|
9435
|
-
Buffer.prototype.writeUintLE =
|
9436
|
-
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
9437
|
-
value = +value
|
9438
|
-
offset = offset >>> 0
|
9439
|
-
byteLength = byteLength >>> 0
|
9440
|
-
if (!noAssert) {
|
9441
|
-
const maxBytes = Math.pow(2, 8 * byteLength) - 1
|
9442
|
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
9443
|
-
}
|
9444
|
-
|
9445
|
-
let mul = 1
|
9446
|
-
let i = 0
|
9447
|
-
this[offset] = value & 0xFF
|
9448
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
9449
|
-
this[offset + i] = (value / mul) & 0xFF
|
9450
|
-
}
|
9451
|
-
|
9452
|
-
return offset + byteLength
|
9453
|
-
}
|
9454
|
-
|
9455
|
-
Buffer.prototype.writeUintBE =
|
9456
|
-
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
9457
|
-
value = +value
|
9458
|
-
offset = offset >>> 0
|
9459
|
-
byteLength = byteLength >>> 0
|
9460
|
-
if (!noAssert) {
|
9461
|
-
const maxBytes = Math.pow(2, 8 * byteLength) - 1
|
9462
|
-
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
9463
|
-
}
|
9464
|
-
|
9465
|
-
let i = byteLength - 1
|
9466
|
-
let mul = 1
|
9467
|
-
this[offset + i] = value & 0xFF
|
9468
|
-
while (--i >= 0 && (mul *= 0x100)) {
|
9469
|
-
this[offset + i] = (value / mul) & 0xFF
|
9470
|
-
}
|
9471
|
-
|
9472
|
-
return offset + byteLength
|
9473
|
-
}
|
9474
|
-
|
9475
|
-
Buffer.prototype.writeUint8 =
|
9476
|
-
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
9477
|
-
value = +value
|
9478
|
-
offset = offset >>> 0
|
9479
|
-
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
9480
|
-
this[offset] = (value & 0xff)
|
9481
|
-
return offset + 1
|
9482
|
-
}
|
9483
|
-
|
9484
|
-
Buffer.prototype.writeUint16LE =
|
9485
|
-
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
9486
|
-
value = +value
|
9487
|
-
offset = offset >>> 0
|
9488
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
9489
|
-
this[offset] = (value & 0xff)
|
9490
|
-
this[offset + 1] = (value >>> 8)
|
9491
|
-
return offset + 2
|
9492
|
-
}
|
9493
|
-
|
9494
|
-
Buffer.prototype.writeUint16BE =
|
9495
|
-
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
9496
|
-
value = +value
|
9497
|
-
offset = offset >>> 0
|
9498
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
9499
|
-
this[offset] = (value >>> 8)
|
9500
|
-
this[offset + 1] = (value & 0xff)
|
9501
|
-
return offset + 2
|
9502
|
-
}
|
9503
|
-
|
9504
|
-
Buffer.prototype.writeUint32LE =
|
9505
|
-
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
9506
|
-
value = +value
|
9507
|
-
offset = offset >>> 0
|
9508
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
9509
|
-
this[offset + 3] = (value >>> 24)
|
9510
|
-
this[offset + 2] = (value >>> 16)
|
9511
|
-
this[offset + 1] = (value >>> 8)
|
9512
|
-
this[offset] = (value & 0xff)
|
9513
|
-
return offset + 4
|
9514
|
-
}
|
9515
|
-
|
9516
|
-
Buffer.prototype.writeUint32BE =
|
9517
|
-
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
9518
|
-
value = +value
|
9519
|
-
offset = offset >>> 0
|
9520
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
9521
|
-
this[offset] = (value >>> 24)
|
9522
|
-
this[offset + 1] = (value >>> 16)
|
9523
|
-
this[offset + 2] = (value >>> 8)
|
9524
|
-
this[offset + 3] = (value & 0xff)
|
9525
|
-
return offset + 4
|
9526
|
-
}
|
9527
|
-
|
9528
|
-
function wrtBigUInt64LE (buf, value, offset, min, max) {
|
9529
|
-
checkIntBI(value, min, max, buf, offset, 7)
|
9530
|
-
|
9531
|
-
let lo = Number(value & BigInt(0xffffffff))
|
9532
|
-
buf[offset++] = lo
|
9533
|
-
lo = lo >> 8
|
9534
|
-
buf[offset++] = lo
|
9535
|
-
lo = lo >> 8
|
9536
|
-
buf[offset++] = lo
|
9537
|
-
lo = lo >> 8
|
9538
|
-
buf[offset++] = lo
|
9539
|
-
let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))
|
9540
|
-
buf[offset++] = hi
|
9541
|
-
hi = hi >> 8
|
9542
|
-
buf[offset++] = hi
|
9543
|
-
hi = hi >> 8
|
9544
|
-
buf[offset++] = hi
|
9545
|
-
hi = hi >> 8
|
9546
|
-
buf[offset++] = hi
|
9547
|
-
return offset
|
9548
|
-
}
|
9549
|
-
|
9550
|
-
function wrtBigUInt64BE (buf, value, offset, min, max) {
|
9551
|
-
checkIntBI(value, min, max, buf, offset, 7)
|
9552
|
-
|
9553
|
-
let lo = Number(value & BigInt(0xffffffff))
|
9554
|
-
buf[offset + 7] = lo
|
9555
|
-
lo = lo >> 8
|
9556
|
-
buf[offset + 6] = lo
|
9557
|
-
lo = lo >> 8
|
9558
|
-
buf[offset + 5] = lo
|
9559
|
-
lo = lo >> 8
|
9560
|
-
buf[offset + 4] = lo
|
9561
|
-
let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))
|
9562
|
-
buf[offset + 3] = hi
|
9563
|
-
hi = hi >> 8
|
9564
|
-
buf[offset + 2] = hi
|
9565
|
-
hi = hi >> 8
|
9566
|
-
buf[offset + 1] = hi
|
9567
|
-
hi = hi >> 8
|
9568
|
-
buf[offset] = hi
|
9569
|
-
return offset + 8
|
9570
|
-
}
|
9571
|
-
|
9572
|
-
Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {
|
9573
|
-
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
|
9574
|
-
})
|
9575
|
-
|
9576
|
-
Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {
|
9577
|
-
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))
|
9578
|
-
})
|
9579
|
-
|
9580
|
-
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
9581
|
-
value = +value
|
9582
|
-
offset = offset >>> 0
|
9583
|
-
if (!noAssert) {
|
9584
|
-
const limit = Math.pow(2, (8 * byteLength) - 1)
|
9585
|
-
|
9586
|
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
9587
|
-
}
|
9588
|
-
|
9589
|
-
let i = 0
|
9590
|
-
let mul = 1
|
9591
|
-
let sub = 0
|
9592
|
-
this[offset] = value & 0xFF
|
9593
|
-
while (++i < byteLength && (mul *= 0x100)) {
|
9594
|
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
9595
|
-
sub = 1
|
9596
|
-
}
|
9597
|
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
9598
|
-
}
|
9599
|
-
|
9600
|
-
return offset + byteLength
|
9601
|
-
}
|
9602
|
-
|
9603
|
-
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
9604
|
-
value = +value
|
9605
|
-
offset = offset >>> 0
|
9606
|
-
if (!noAssert) {
|
9607
|
-
const limit = Math.pow(2, (8 * byteLength) - 1)
|
9608
|
-
|
9609
|
-
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
9610
|
-
}
|
9611
|
-
|
9612
|
-
let i = byteLength - 1
|
9613
|
-
let mul = 1
|
9614
|
-
let sub = 0
|
9615
|
-
this[offset + i] = value & 0xFF
|
9616
|
-
while (--i >= 0 && (mul *= 0x100)) {
|
9617
|
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
9618
|
-
sub = 1
|
9619
|
-
}
|
9620
|
-
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
9621
|
-
}
|
9622
|
-
|
9623
|
-
return offset + byteLength
|
9624
|
-
}
|
9625
|
-
|
9626
|
-
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
9627
|
-
value = +value
|
9628
|
-
offset = offset >>> 0
|
9629
|
-
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
9630
|
-
if (value < 0) value = 0xff + value + 1
|
9631
|
-
this[offset] = (value & 0xff)
|
9632
|
-
return offset + 1
|
9633
|
-
}
|
9634
|
-
|
9635
|
-
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
9636
|
-
value = +value
|
9637
|
-
offset = offset >>> 0
|
9638
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
9639
|
-
this[offset] = (value & 0xff)
|
9640
|
-
this[offset + 1] = (value >>> 8)
|
9641
|
-
return offset + 2
|
9642
|
-
}
|
9643
|
-
|
9644
|
-
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
9645
|
-
value = +value
|
9646
|
-
offset = offset >>> 0
|
9647
|
-
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
9648
|
-
this[offset] = (value >>> 8)
|
9649
|
-
this[offset + 1] = (value & 0xff)
|
9650
|
-
return offset + 2
|
9651
|
-
}
|
9652
|
-
|
9653
|
-
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
9654
|
-
value = +value
|
9655
|
-
offset = offset >>> 0
|
9656
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
9657
|
-
this[offset] = (value & 0xff)
|
9658
|
-
this[offset + 1] = (value >>> 8)
|
9659
|
-
this[offset + 2] = (value >>> 16)
|
9660
|
-
this[offset + 3] = (value >>> 24)
|
9661
|
-
return offset + 4
|
9662
|
-
}
|
9663
|
-
|
9664
|
-
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
9665
|
-
value = +value
|
9666
|
-
offset = offset >>> 0
|
9667
|
-
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
9668
|
-
if (value < 0) value = 0xffffffff + value + 1
|
9669
|
-
this[offset] = (value >>> 24)
|
9670
|
-
this[offset + 1] = (value >>> 16)
|
9671
|
-
this[offset + 2] = (value >>> 8)
|
9672
|
-
this[offset + 3] = (value & 0xff)
|
9673
|
-
return offset + 4
|
9674
|
-
}
|
9675
|
-
|
9676
|
-
Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {
|
9677
|
-
return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
|
9678
|
-
})
|
9679
|
-
|
9680
|
-
Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {
|
9681
|
-
return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))
|
9682
|
-
})
|
9683
|
-
|
9684
|
-
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
9685
|
-
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
9686
|
-
if (offset < 0) throw new RangeError('Index out of range')
|
9687
|
-
}
|
9688
|
-
|
9689
|
-
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
9690
|
-
value = +value
|
9691
|
-
offset = offset >>> 0
|
9692
|
-
if (!noAssert) {
|
9693
|
-
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
9694
|
-
}
|
9695
|
-
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
9696
|
-
return offset + 4
|
9697
|
-
}
|
9698
|
-
|
9699
|
-
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
9700
|
-
return writeFloat(this, value, offset, true, noAssert)
|
9701
|
-
}
|
9702
|
-
|
9703
|
-
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
9704
|
-
return writeFloat(this, value, offset, false, noAssert)
|
9705
|
-
}
|
9706
|
-
|
9707
|
-
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
9708
|
-
value = +value
|
9709
|
-
offset = offset >>> 0
|
9710
|
-
if (!noAssert) {
|
9711
|
-
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
9712
|
-
}
|
9713
|
-
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
9714
|
-
return offset + 8
|
9715
|
-
}
|
9716
|
-
|
9717
|
-
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
9718
|
-
return writeDouble(this, value, offset, true, noAssert)
|
9719
|
-
}
|
9720
|
-
|
9721
|
-
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
9722
|
-
return writeDouble(this, value, offset, false, noAssert)
|
9723
|
-
}
|
9724
|
-
|
9725
|
-
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
9726
|
-
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
9727
|
-
if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
|
9728
|
-
if (!start) start = 0
|
9729
|
-
if (!end && end !== 0) end = this.length
|
9730
|
-
if (targetStart >= target.length) targetStart = target.length
|
9731
|
-
if (!targetStart) targetStart = 0
|
9732
|
-
if (end > 0 && end < start) end = start
|
9733
|
-
|
9734
|
-
// Copy 0 bytes; we're done
|
9735
|
-
if (end === start) return 0
|
9736
|
-
if (target.length === 0 || this.length === 0) return 0
|
9737
|
-
|
9738
|
-
// Fatal error conditions
|
9739
|
-
if (targetStart < 0) {
|
9740
|
-
throw new RangeError('targetStart out of bounds')
|
9741
|
-
}
|
9742
|
-
if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
|
9743
|
-
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
9744
|
-
|
9745
|
-
// Are we oob?
|
9746
|
-
if (end > this.length) end = this.length
|
9747
|
-
if (target.length - targetStart < end - start) {
|
9748
|
-
end = target.length - targetStart + start
|
9749
|
-
}
|
9750
|
-
|
9751
|
-
const len = end - start
|
9752
|
-
|
9753
|
-
if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
|
9754
|
-
// Use built-in when available, missing from IE11
|
9755
|
-
this.copyWithin(targetStart, start, end)
|
9756
|
-
} else {
|
9757
|
-
Uint8Array.prototype.set.call(
|
9758
|
-
target,
|
9759
|
-
this.subarray(start, end),
|
9760
|
-
targetStart
|
9761
|
-
)
|
9762
|
-
}
|
9763
|
-
|
9764
|
-
return len
|
9765
|
-
}
|
9766
|
-
|
9767
|
-
// Usage:
|
9768
|
-
// buffer.fill(number[, offset[, end]])
|
9769
|
-
// buffer.fill(buffer[, offset[, end]])
|
9770
|
-
// buffer.fill(string[, offset[, end]][, encoding])
|
9771
|
-
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
9772
|
-
// Handle string cases:
|
9773
|
-
if (typeof val === 'string') {
|
9774
|
-
if (typeof start === 'string') {
|
9775
|
-
encoding = start
|
9776
|
-
start = 0
|
9777
|
-
end = this.length
|
9778
|
-
} else if (typeof end === 'string') {
|
9779
|
-
encoding = end
|
9780
|
-
end = this.length
|
9781
|
-
}
|
9782
|
-
if (encoding !== undefined && typeof encoding !== 'string') {
|
9783
|
-
throw new TypeError('encoding must be a string')
|
9784
|
-
}
|
9785
|
-
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
9786
|
-
throw new TypeError('Unknown encoding: ' + encoding)
|
9787
|
-
}
|
9788
|
-
if (val.length === 1) {
|
9789
|
-
const code = val.charCodeAt(0)
|
9790
|
-
if ((encoding === 'utf8' && code < 128) ||
|
9791
|
-
encoding === 'latin1') {
|
9792
|
-
// Fast path: If `val` fits into a single byte, use that numeric value.
|
9793
|
-
val = code
|
9794
|
-
}
|
9795
|
-
}
|
9796
|
-
} else if (typeof val === 'number') {
|
9797
|
-
val = val & 255
|
9798
|
-
} else if (typeof val === 'boolean') {
|
9799
|
-
val = Number(val)
|
9800
|
-
}
|
9801
|
-
|
9802
|
-
// Invalid ranges are not set to a default, so can range check early.
|
9803
|
-
if (start < 0 || this.length < start || this.length < end) {
|
9804
|
-
throw new RangeError('Out of range index')
|
9805
|
-
}
|
9806
|
-
|
9807
|
-
if (end <= start) {
|
9808
|
-
return this
|
9809
|
-
}
|
9810
|
-
|
9811
|
-
start = start >>> 0
|
9812
|
-
end = end === undefined ? this.length : end >>> 0
|
9813
|
-
|
9814
|
-
if (!val) val = 0
|
9815
|
-
|
9816
|
-
let i
|
9817
|
-
if (typeof val === 'number') {
|
9818
|
-
for (i = start; i < end; ++i) {
|
9819
|
-
this[i] = val
|
9820
|
-
}
|
9821
|
-
} else {
|
9822
|
-
const bytes = Buffer.isBuffer(val)
|
9823
|
-
? val
|
9824
|
-
: Buffer.from(val, encoding)
|
9825
|
-
const len = bytes.length
|
9826
|
-
if (len === 0) {
|
9827
|
-
throw new TypeError('The value "' + val +
|
9828
|
-
'" is invalid for argument "value"')
|
9829
|
-
}
|
9830
|
-
for (i = 0; i < end - start; ++i) {
|
9831
|
-
this[i + start] = bytes[i % len]
|
9832
|
-
}
|
9833
|
-
}
|
9834
|
-
|
9835
|
-
return this
|
9836
|
-
}
|
9837
|
-
|
9838
|
-
// CUSTOM ERRORS
|
9839
|
-
// =============
|
9840
|
-
|
9841
|
-
// Simplified versions from Node, changed for Buffer-only usage
|
9842
|
-
const errors = {}
|
9843
|
-
function E (sym, getMessage, Base) {
|
9844
|
-
errors[sym] = class NodeError extends Base {
|
9845
|
-
constructor () {
|
9846
|
-
super()
|
9847
|
-
|
9848
|
-
Object.defineProperty(this, 'message', {
|
9849
|
-
value: getMessage.apply(this, arguments),
|
9850
|
-
writable: true,
|
9851
|
-
configurable: true
|
9852
|
-
})
|
9853
|
-
|
9854
|
-
// Add the error code to the name to include it in the stack trace.
|
9855
|
-
this.name = `${this.name} [${sym}]`
|
9856
|
-
// Access the stack to generate the error message including the error code
|
9857
|
-
// from the name.
|
9858
|
-
this.stack // eslint-disable-line no-unused-expressions
|
9859
|
-
// Reset the name to the actual name.
|
9860
|
-
delete this.name
|
9861
|
-
}
|
9862
|
-
|
9863
|
-
get code () {
|
9864
|
-
return sym
|
9865
|
-
}
|
9866
|
-
|
9867
|
-
set code (value) {
|
9868
|
-
Object.defineProperty(this, 'code', {
|
9869
|
-
configurable: true,
|
9870
|
-
enumerable: true,
|
9871
|
-
value,
|
9872
|
-
writable: true
|
9873
|
-
})
|
9874
|
-
}
|
9875
|
-
|
9876
|
-
toString () {
|
9877
|
-
return `${this.name} [${sym}]: ${this.message}`
|
9878
|
-
}
|
9879
|
-
}
|
9880
|
-
}
|
9881
|
-
|
9882
|
-
E('ERR_BUFFER_OUT_OF_BOUNDS',
|
9883
|
-
function (name) {
|
9884
|
-
if (name) {
|
9885
|
-
return `${name} is outside of buffer bounds`
|
9886
|
-
}
|
9887
|
-
|
9888
|
-
return 'Attempt to access memory outside buffer bounds'
|
9889
|
-
}, RangeError)
|
9890
|
-
E('ERR_INVALID_ARG_TYPE',
|
9891
|
-
function (name, actual) {
|
9892
|
-
return `The "${name}" argument must be of type number. Received type ${typeof actual}`
|
9893
|
-
}, TypeError)
|
9894
|
-
E('ERR_OUT_OF_RANGE',
|
9895
|
-
function (str, range, input) {
|
9896
|
-
let msg = `The value of "${str}" is out of range.`
|
9897
|
-
let received = input
|
9898
|
-
if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
|
9899
|
-
received = addNumericalSeparator(String(input))
|
9900
|
-
} else if (typeof input === 'bigint') {
|
9901
|
-
received = String(input)
|
9902
|
-
if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
|
9903
|
-
received = addNumericalSeparator(received)
|
9904
|
-
}
|
9905
|
-
received += 'n'
|
9906
|
-
}
|
9907
|
-
msg += ` It must be ${range}. Received ${received}`
|
9908
|
-
return msg
|
9909
|
-
}, RangeError)
|
9910
|
-
|
9911
|
-
function addNumericalSeparator (val) {
|
9912
|
-
let res = ''
|
9913
|
-
let i = val.length
|
9914
|
-
const start = val[0] === '-' ? 1 : 0
|
9915
|
-
for (; i >= start + 4; i -= 3) {
|
9916
|
-
res = `_${val.slice(i - 3, i)}${res}`
|
9917
|
-
}
|
9918
|
-
return `${val.slice(0, i)}${res}`
|
9919
|
-
}
|
9920
|
-
|
9921
|
-
// CHECK FUNCTIONS
|
9922
|
-
// ===============
|
9923
|
-
|
9924
|
-
function checkBounds (buf, offset, byteLength) {
|
9925
|
-
validateNumber(offset, 'offset')
|
9926
|
-
if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
|
9927
|
-
boundsError(offset, buf.length - (byteLength + 1))
|
9928
|
-
}
|
9929
|
-
}
|
9930
|
-
|
9931
|
-
function checkIntBI (value, min, max, buf, offset, byteLength) {
|
9932
|
-
if (value > max || value < min) {
|
9933
|
-
const n = typeof min === 'bigint' ? 'n' : ''
|
9934
|
-
let range
|
9935
|
-
if (byteLength > 3) {
|
9936
|
-
if (min === 0 || min === BigInt(0)) {
|
9937
|
-
range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`
|
9938
|
-
} else {
|
9939
|
-
range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +
|
9940
|
-
`${(byteLength + 1) * 8 - 1}${n}`
|
9941
|
-
}
|
9942
|
-
} else {
|
9943
|
-
range = `>= ${min}${n} and <= ${max}${n}`
|
9944
|
-
}
|
9945
|
-
throw new errors.ERR_OUT_OF_RANGE('value', range, value)
|
9946
|
-
}
|
9947
|
-
checkBounds(buf, offset, byteLength)
|
9948
|
-
}
|
9949
|
-
|
9950
|
-
function validateNumber (value, name) {
|
9951
|
-
if (typeof value !== 'number') {
|
9952
|
-
throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)
|
9953
|
-
}
|
9954
|
-
}
|
9955
|
-
|
9956
|
-
function boundsError (value, length, type) {
|
9957
|
-
if (Math.floor(value) !== value) {
|
9958
|
-
validateNumber(value, type)
|
9959
|
-
throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)
|
9960
|
-
}
|
9961
|
-
|
9962
|
-
if (length < 0) {
|
9963
|
-
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()
|
9964
|
-
}
|
9965
|
-
|
9966
|
-
throw new errors.ERR_OUT_OF_RANGE(type || 'offset',
|
9967
|
-
`>= ${type ? 1 : 0} and <= ${length}`,
|
9968
|
-
value)
|
9969
|
-
}
|
9970
|
-
|
9971
|
-
// HELPER FUNCTIONS
|
9972
|
-
// ================
|
9973
|
-
|
9974
|
-
const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
|
9975
|
-
|
9976
|
-
function base64clean (str) {
|
9977
|
-
// Node takes equal signs as end of the Base64 encoding
|
9978
|
-
str = str.split('=')[0]
|
9979
|
-
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
9980
|
-
str = str.trim().replace(INVALID_BASE64_RE, '')
|
9981
|
-
// Node converts strings with length < 2 to ''
|
9982
|
-
if (str.length < 2) return ''
|
9983
|
-
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
9984
|
-
while (str.length % 4 !== 0) {
|
9985
|
-
str = str + '='
|
9986
|
-
}
|
9987
|
-
return str
|
9988
|
-
}
|
9989
|
-
|
9990
|
-
function utf8ToBytes (string, units) {
|
9991
|
-
units = units || Infinity
|
9992
|
-
let codePoint
|
9993
|
-
const length = string.length
|
9994
|
-
let leadSurrogate = null
|
9995
|
-
const bytes = []
|
9996
|
-
|
9997
|
-
for (let i = 0; i < length; ++i) {
|
9998
|
-
codePoint = string.charCodeAt(i)
|
9999
|
-
|
10000
|
-
// is surrogate component
|
10001
|
-
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
10002
|
-
// last char was a lead
|
10003
|
-
if (!leadSurrogate) {
|
10004
|
-
// no lead yet
|
10005
|
-
if (codePoint > 0xDBFF) {
|
10006
|
-
// unexpected trail
|
10007
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
10008
|
-
continue
|
10009
|
-
} else if (i + 1 === length) {
|
10010
|
-
// unpaired lead
|
10011
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
10012
|
-
continue
|
10013
|
-
}
|
10014
|
-
|
10015
|
-
// valid lead
|
10016
|
-
leadSurrogate = codePoint
|
10017
|
-
|
10018
|
-
continue
|
10019
|
-
}
|
10020
|
-
|
10021
|
-
// 2 leads in a row
|
10022
|
-
if (codePoint < 0xDC00) {
|
10023
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
10024
|
-
leadSurrogate = codePoint
|
10025
|
-
continue
|
10026
|
-
}
|
10027
|
-
|
10028
|
-
// valid surrogate pair
|
10029
|
-
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
10030
|
-
} else if (leadSurrogate) {
|
10031
|
-
// valid bmp char, but last char was a lead
|
10032
|
-
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
10033
|
-
}
|
10034
|
-
|
10035
|
-
leadSurrogate = null
|
10036
|
-
|
10037
|
-
// encode utf8
|
10038
|
-
if (codePoint < 0x80) {
|
10039
|
-
if ((units -= 1) < 0) break
|
10040
|
-
bytes.push(codePoint)
|
10041
|
-
} else if (codePoint < 0x800) {
|
10042
|
-
if ((units -= 2) < 0) break
|
10043
|
-
bytes.push(
|
10044
|
-
codePoint >> 0x6 | 0xC0,
|
10045
|
-
codePoint & 0x3F | 0x80
|
10046
|
-
)
|
10047
|
-
} else if (codePoint < 0x10000) {
|
10048
|
-
if ((units -= 3) < 0) break
|
10049
|
-
bytes.push(
|
10050
|
-
codePoint >> 0xC | 0xE0,
|
10051
|
-
codePoint >> 0x6 & 0x3F | 0x80,
|
10052
|
-
codePoint & 0x3F | 0x80
|
10053
|
-
)
|
10054
|
-
} else if (codePoint < 0x110000) {
|
10055
|
-
if ((units -= 4) < 0) break
|
10056
|
-
bytes.push(
|
10057
|
-
codePoint >> 0x12 | 0xF0,
|
10058
|
-
codePoint >> 0xC & 0x3F | 0x80,
|
10059
|
-
codePoint >> 0x6 & 0x3F | 0x80,
|
10060
|
-
codePoint & 0x3F | 0x80
|
10061
|
-
)
|
10062
|
-
} else {
|
10063
|
-
throw new Error('Invalid code point')
|
10064
|
-
}
|
10065
|
-
}
|
10066
|
-
|
10067
|
-
return bytes
|
10068
|
-
}
|
10069
|
-
|
10070
|
-
function asciiToBytes (str) {
|
10071
|
-
const byteArray = []
|
10072
|
-
for (let i = 0; i < str.length; ++i) {
|
10073
|
-
// Node's code seems to be doing this and not & 0x7F..
|
10074
|
-
byteArray.push(str.charCodeAt(i) & 0xFF)
|
10075
|
-
}
|
10076
|
-
return byteArray
|
10077
|
-
}
|
10078
|
-
|
10079
|
-
function utf16leToBytes (str, units) {
|
10080
|
-
let c, hi, lo
|
10081
|
-
const byteArray = []
|
10082
|
-
for (let i = 0; i < str.length; ++i) {
|
10083
|
-
if ((units -= 2) < 0) break
|
10084
|
-
|
10085
|
-
c = str.charCodeAt(i)
|
10086
|
-
hi = c >> 8
|
10087
|
-
lo = c % 256
|
10088
|
-
byteArray.push(lo)
|
10089
|
-
byteArray.push(hi)
|
10090
|
-
}
|
10091
|
-
|
10092
|
-
return byteArray
|
10093
|
-
}
|
10094
|
-
|
10095
|
-
function base64ToBytes (str) {
|
10096
|
-
return base64.toByteArray(base64clean(str))
|
10097
|
-
}
|
10098
|
-
|
10099
|
-
function blitBuffer (src, dst, offset, length) {
|
10100
|
-
let i
|
10101
|
-
for (i = 0; i < length; ++i) {
|
10102
|
-
if ((i + offset >= dst.length) || (i >= src.length)) break
|
10103
|
-
dst[i + offset] = src[i]
|
10104
|
-
}
|
10105
|
-
return i
|
10106
|
-
}
|
10107
|
-
|
10108
|
-
// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
|
10109
|
-
// the `instanceof` check but they should be treated as of that type.
|
10110
|
-
// See: https://github.com/feross/buffer/issues/166
|
10111
|
-
function isInstance (obj, type) {
|
10112
|
-
return obj instanceof type ||
|
10113
|
-
(obj != null && obj.constructor != null && obj.constructor.name != null &&
|
10114
|
-
obj.constructor.name === type.name)
|
10115
|
-
}
|
10116
|
-
function numberIsNaN (obj) {
|
10117
|
-
// For IE11 support
|
10118
|
-
return obj !== obj // eslint-disable-line no-self-compare
|
10119
|
-
}
|
10120
|
-
|
10121
|
-
// Create lookup table for `toString('hex')`
|
10122
|
-
// See: https://github.com/feross/buffer/issues/219
|
10123
|
-
const hexSliceLookupTable = (function () {
|
10124
|
-
const alphabet = '0123456789abcdef'
|
10125
|
-
const table = new Array(256)
|
10126
|
-
for (let i = 0; i < 16; ++i) {
|
10127
|
-
const i16 = i * 16
|
10128
|
-
for (let j = 0; j < 16; ++j) {
|
10129
|
-
table[i16 + j] = alphabet[i] + alphabet[j]
|
10130
|
-
}
|
10131
|
-
}
|
10132
|
-
return table
|
10133
|
-
})()
|
10134
|
-
|
10135
|
-
// Return not function with Error if BigInt not supported
|
10136
|
-
function defineBigIntMethod (fn) {
|
10137
|
-
return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn
|
10138
|
-
}
|
10139
|
-
|
10140
|
-
function BufferBigIntNotDefined () {
|
10141
|
-
throw new Error('BigInt not supported')
|
10142
|
-
}
|
10143
|
-
|
10144
|
-
|
10145
|
-
/***/ }),
|
10146
|
-
|
10147
|
-
/***/ 645:
|
10148
|
-
/***/ (function(__unused_webpack_module, exports) {
|
10149
|
-
|
10150
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
10151
|
-
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
10152
|
-
var e, m
|
10153
|
-
var eLen = (nBytes * 8) - mLen - 1
|
10154
|
-
var eMax = (1 << eLen) - 1
|
10155
|
-
var eBias = eMax >> 1
|
10156
|
-
var nBits = -7
|
10157
|
-
var i = isLE ? (nBytes - 1) : 0
|
10158
|
-
var d = isLE ? -1 : 1
|
10159
|
-
var s = buffer[offset + i]
|
10160
|
-
|
10161
|
-
i += d
|
10162
|
-
|
10163
|
-
e = s & ((1 << (-nBits)) - 1)
|
10164
|
-
s >>= (-nBits)
|
10165
|
-
nBits += eLen
|
10166
|
-
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
10167
|
-
|
10168
|
-
m = e & ((1 << (-nBits)) - 1)
|
10169
|
-
e >>= (-nBits)
|
10170
|
-
nBits += mLen
|
10171
|
-
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
10172
|
-
|
10173
|
-
if (e === 0) {
|
10174
|
-
e = 1 - eBias
|
10175
|
-
} else if (e === eMax) {
|
10176
|
-
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
10177
|
-
} else {
|
10178
|
-
m = m + Math.pow(2, mLen)
|
10179
|
-
e = e - eBias
|
10180
|
-
}
|
10181
|
-
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
10182
|
-
}
|
10183
|
-
|
10184
|
-
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
10185
|
-
var e, m, c
|
10186
|
-
var eLen = (nBytes * 8) - mLen - 1
|
10187
|
-
var eMax = (1 << eLen) - 1
|
10188
|
-
var eBias = eMax >> 1
|
10189
|
-
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
10190
|
-
var i = isLE ? 0 : (nBytes - 1)
|
10191
|
-
var d = isLE ? 1 : -1
|
10192
|
-
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
10193
|
-
|
10194
|
-
value = Math.abs(value)
|
10195
|
-
|
10196
|
-
if (isNaN(value) || value === Infinity) {
|
10197
|
-
m = isNaN(value) ? 1 : 0
|
10198
|
-
e = eMax
|
10199
|
-
} else {
|
10200
|
-
e = Math.floor(Math.log(value) / Math.LN2)
|
10201
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
10202
|
-
e--
|
10203
|
-
c *= 2
|
10204
|
-
}
|
10205
|
-
if (e + eBias >= 1) {
|
10206
|
-
value += rt / c
|
10207
|
-
} else {
|
10208
|
-
value += rt * Math.pow(2, 1 - eBias)
|
10209
|
-
}
|
10210
|
-
if (value * c >= 2) {
|
10211
|
-
e++
|
10212
|
-
c /= 2
|
10213
|
-
}
|
10214
|
-
|
10215
|
-
if (e + eBias >= eMax) {
|
10216
|
-
m = 0
|
10217
|
-
e = eMax
|
10218
|
-
} else if (e + eBias >= 1) {
|
10219
|
-
m = ((value * c) - 1) * Math.pow(2, mLen)
|
10220
|
-
e = e + eBias
|
10221
|
-
} else {
|
10222
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
10223
|
-
e = 0
|
10224
|
-
}
|
10225
|
-
}
|
10226
|
-
|
10227
|
-
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
10228
|
-
|
10229
|
-
e = (e << mLen) | m
|
10230
|
-
eLen += mLen
|
10231
|
-
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
10232
|
-
|
10233
|
-
buffer[offset + i - d] |= s * 128
|
10234
|
-
}
|
10235
|
-
|
10236
|
-
|
10237
7808
|
/***/ }),
|
10238
7809
|
|
10239
7810
|
/***/ 5929:
|
10240
7811
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10241
7812
|
|
10242
|
-
"use strict";
|
10243
7813
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
10244
7814
|
/* harmony export */ Ev: function() { return /* binding */ splitByLines; },
|
10245
7815
|
/* harmony export */ Fw: function() { return /* binding */ searchTreeItem; },
|
@@ -10404,9 +7974,8 @@ UrlUtils.EmptyPage = "about:blank";
|
|
10404
7974
|
/******/
|
10405
7975
|
/************************************************************************/
|
10406
7976
|
var __webpack_exports__ = {};
|
10407
|
-
// This entry need to be wrapped in an IIFE because it need to be in
|
7977
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
10408
7978
|
!function() {
|
10409
|
-
"use strict";
|
10410
7979
|
|
10411
7980
|
// UNUSED EXPORTS: ActiveSubDocumentChangedEvent, AuthenticationOptions, AutoCorrectEvent, AutoCorrectEventArgs, Bookmark, BookmarkBase, BookmarkCollectionBase, BorderLineStyle, CalculateDocumentVariableAsyncEvent, CalculateDocumentVariableEvent, CalculateDocumentVariableEventArgs, CharacterProperties, CharacterPropertiesChangedEvent, CharacterPropertiesScript, Characters, CommandStateChangedEvent, CommandStateChangedEventArgs, ContentChangedEventArgs, ContentInsertedEvent, ContentRemovedEvent, ContentRemovedEventArgs, ContextMenuCommandId, ContextMenuItem, ContextMenuShowingEvent, ContextMenuShowingEventArgs, CustomCommandExecutedEvent, CustomCommandExecutedEventArgs, DocumentChangedEvent, DocumentFormat, DocumentFormattedEvent, DocumentFormattedEventArgs, DocumentLinkType, DocumentLoadedEvent, DocumentProcessor, DocumentProcessorBase, Event, EventArgs, Events, Field, FieldName, FileTabCommandId, FileTabItemId, FloatingImage, FloatingObjectHorizontalAlignment, FloatingObjectHorizontalAnchorElement, FloatingObjectHorizontalPositionType, FloatingObjectVerticalAlignment, FloatingObjectVerticalAnchorElement, FloatingObjectVerticalPositionType, FloatingObjectsFormatTabCommandId, FloatingObjectsFormatTabItemId, Font, GotFocusEvent, HeaderAndFooterTabCommandId, HeaderAndFooterTabItemId, HeaderFooterType, HomeTabCommandId, HomeTabItemId, HorizontalAbsolutePosition, HorizontalAlignedPosition, HorizontalRelativePosition, Hyperlink, HyperlinkClickEvent, HyperlinkClickEventArgs, HyperlinkInfo, Image, ImageIterator, Images, InlineImage, InsertTabCommandId, InsertTabItemId, Interval, KeyCode, KeyDownEvent, KeyUpEvent, KeyboardEventArgs, List, ListLevelFormat, ListLevelNumberAlignment, ListLevelSettings, ListType, LoadingPanel, LostFocusEvent, MailMergeOptions, MailMergeTabCommandId, MailMergeTabItemId, Margins, MergeMode, Paddings, PageLayoutTabCommandId, PageLayoutTabItemId, PaperSize, Paragraph, ParagraphAlignment, ParagraphFirstLineIndent, ParagraphLineSpacingType, ParagraphProperties, ParagraphPropertiesChangedEvent, ParagraphPropertiesChangedEventArgs, PdfExportedEvent, PdfExportedEventArgs, PdfExportingEvent, PdfExportingEventArgs, PointerDownEvent, PointerEventArgs, PointerUpEvent, PrintMode, RangePermission, RangePermissionOptions, ReferencesTabCommandId, ReferencesTabItemId, Ribbon, RibbonButtonItem, RibbonColorBoxItem, RibbonContextTab, RibbonItemBase, RibbonItemType, RibbonMenuItem, RibbonNumberBoxItem, RibbonSelectBoxItem, RibbonSubMenuItem, RibbonTab, RibbonTabType, RichEdit, RichEditDocumentBase, RichEditEvent, RichEditUnit, SavedEvent, SavedEventArgs, SavingEvent, SavingEventArgs, Section, SectionBreakType, SelectionChangedEvent, ShortcutOptions, Size, SpellCheckerOptions, SubDocument, SubDocumentBase, SubDocumentCollectionBase, SubDocumentType, Table, TableBorder, TableBorders, TableBordersBase, TableCell, TableCellBorders, TableContentHorizontalAlignment, TableContentVerticalAlignment, TableDesignTabCommandId, TableDesignTabItemId, TableLayoutTabCommandId, TableLayoutTabItemId, TableRow, TableRowHeightType, TableStyleOptions, TableWidthType, UpdateFieldsOptions, Utils, VerticalAbsolutePosition, VerticalAlignedPosition, VerticalRelativePosition, ViewTabCommandId, ViewTabItemId, ViewType, WrapSide, WrapType, create, createOptions
|
10412
7981
|
|
@@ -18802,7 +16371,6 @@ var geometry_size = __webpack_require__(6353);
|
|
18802
16371
|
// EXTERNAL MODULE: ./node_modules/@devexpress/utils/lib/utils/base64.js
|
18803
16372
|
var utils_base64 = __webpack_require__(6477);
|
18804
16373
|
;// CONCATENATED MODULE: ./src/common/model/caches/images.ts
|
18805
|
-
/* provided dependency */ var Buffer = __webpack_require__(8764)["lW"];
|
18806
16374
|
|
18807
16375
|
|
18808
16376
|
|
@@ -18860,18 +16428,21 @@ class CacheImageInfo {
|
|
18860
16428
|
const data = this.getImageHeader();
|
18861
16429
|
if (data[0] === 0xff && data[1] === 0xd8)
|
18862
16430
|
return true;
|
18863
|
-
else if (data[0] === 0x89 &&
|
16431
|
+
else if (data[0] === 0x89 && this.toString(data, 1, 4) === 'PNG')
|
18864
16432
|
return true;
|
18865
16433
|
}
|
18866
16434
|
return false;
|
18867
16435
|
}
|
16436
|
+
toString(data, start, end) {
|
16437
|
+
return Array.from(data.slice(start, end)).map(b => String.fromCharCode(b)).join("");
|
16438
|
+
}
|
18868
16439
|
setPdfCompatibleBase64(val) {
|
18869
16440
|
this._convertedBase64 = utils_base64.Base64Utils.normalizeToDataUrl(val, "image/png");
|
18870
16441
|
}
|
18871
16442
|
getImageHeader() {
|
18872
16443
|
const match = /^data:.+;base64,(.*)$/.exec(this.base64);
|
18873
16444
|
const header = match[1].substring(0, 8);
|
18874
|
-
return
|
16445
|
+
return Uint8Array.from(atob(header), c => c.charCodeAt(0));
|
18875
16446
|
}
|
18876
16447
|
}
|
18877
16448
|
CacheImageInfo.emptyPicDimension = unit_converter/* UnitConverter */.u.pixelsToTwips(32);
|
@@ -101270,8 +98841,8 @@ class RestartPreparer {
|
|
101270
98841
|
const ancPosInfo = this.manager.layout.anchorObjectsPositionInfo;
|
101271
98842
|
const rowPos = this.manager.invalidator.getStartModelPositionOfRow(lp);
|
101272
98843
|
lp.page.anchoredObjectHolder.objects = number/* NumberMapUtils */.j.reducedMap(lp.page.anchoredObjectHolder.objects, (obj) => {
|
101273
|
-
if (ancPosInfo.getPosition(obj.objectId) >= rowPos) {
|
101274
|
-
if (obj.getType()
|
98844
|
+
if (ancPosInfo.getPosition(obj.objectId) >= rowPos && lp.pageArea.subDocument.id === obj.belongsToSubDocId) {
|
98845
|
+
if (obj.getType() === LayoutBoxType.AnchorTextBox) {
|
101275
98846
|
const id = obj.internalSubDocId;
|
101276
98847
|
delete lp.page.otherPageAreas[id];
|
101277
98848
|
pageChange.otherPageAreaChanges.push(new PageAreaChange(id, LayoutChangeType.Deleted));
|