@mx-space/api-client 1.3.3 → 1.3.5
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/.eslintcache +1 -1
- package/controllers/subscribe.ts +1 -1
- package/dist/adaptors/axios.cjs +4 -0
- package/dist/adaptors/axios.global.js +188 -85
- package/dist/adaptors/ky.cjs +4 -0
- package/dist/adaptors/ky.global.js +11 -1
- package/dist/adaptors/umi-request.global.js +165 -74
- package/dist/index.cjs +90 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.global.js +90 -1
- package/dist/index.js +90 -1
- package/models/comment.ts +1 -0
- package/package.json +3 -4
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
return to;
|
|
26
26
|
};
|
|
27
27
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
28
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
29
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
30
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
32
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
29
33
|
mod
|
|
30
34
|
));
|
|
@@ -237,6 +241,7 @@
|
|
|
237
241
|
"%encodeURIComponent%": encodeURIComponent,
|
|
238
242
|
"%Error%": Error,
|
|
239
243
|
"%eval%": eval,
|
|
244
|
+
// eslint-disable-line no-eval
|
|
240
245
|
"%EvalError%": EvalError,
|
|
241
246
|
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
242
247
|
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
@@ -528,16 +533,16 @@
|
|
|
528
533
|
}
|
|
529
534
|
});
|
|
530
535
|
|
|
531
|
-
// ../../node_modules/.pnpm/object-inspect@1.12.
|
|
536
|
+
// ../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect.js
|
|
532
537
|
var require_util_inspect = __commonJS({
|
|
533
|
-
"../../node_modules/.pnpm/object-inspect@1.12.
|
|
538
|
+
"../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect.js"(exports, module) {
|
|
534
539
|
module.exports = __require("util").inspect;
|
|
535
540
|
}
|
|
536
541
|
});
|
|
537
542
|
|
|
538
|
-
// ../../node_modules/.pnpm/object-inspect@1.12.
|
|
543
|
+
// ../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js
|
|
539
544
|
var require_object_inspect = __commonJS({
|
|
540
|
-
"../../node_modules/.pnpm/object-inspect@1.12.
|
|
545
|
+
"../../node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js"(exports, module) {
|
|
541
546
|
var hasMap = typeof Map === "function" && Map.prototype;
|
|
542
547
|
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
|
|
543
548
|
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
|
|
@@ -714,16 +719,20 @@
|
|
|
714
719
|
}
|
|
715
720
|
if (isMap(obj)) {
|
|
716
721
|
var mapParts = [];
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
722
|
+
if (mapForEach) {
|
|
723
|
+
mapForEach.call(obj, function(value, key) {
|
|
724
|
+
mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
|
|
725
|
+
});
|
|
726
|
+
}
|
|
720
727
|
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
721
728
|
}
|
|
722
729
|
if (isSet(obj)) {
|
|
723
730
|
var setParts = [];
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
731
|
+
if (setForEach) {
|
|
732
|
+
setForEach.call(obj, function(value) {
|
|
733
|
+
setParts.push(inspect(value, obj));
|
|
734
|
+
});
|
|
735
|
+
}
|
|
727
736
|
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
728
737
|
}
|
|
729
738
|
if (isWeakMap(obj)) {
|
|
@@ -1076,6 +1085,7 @@
|
|
|
1076
1085
|
node.value = value;
|
|
1077
1086
|
} else {
|
|
1078
1087
|
objects.next = {
|
|
1088
|
+
// eslint-disable-line no-param-reassign
|
|
1079
1089
|
key,
|
|
1080
1090
|
next: objects.next,
|
|
1081
1091
|
value
|
|
@@ -1150,9 +1160,9 @@
|
|
|
1150
1160
|
}
|
|
1151
1161
|
});
|
|
1152
1162
|
|
|
1153
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1163
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js
|
|
1154
1164
|
var require_formats = __commonJS({
|
|
1155
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1165
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/formats.js"(exports, module) {
|
|
1156
1166
|
"use strict";
|
|
1157
1167
|
var replace = String.prototype.replace;
|
|
1158
1168
|
var percentTwenties = /%20/g;
|
|
@@ -1176,9 +1186,9 @@
|
|
|
1176
1186
|
}
|
|
1177
1187
|
});
|
|
1178
1188
|
|
|
1179
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1189
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js
|
|
1180
1190
|
var require_utils = __commonJS({
|
|
1181
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1191
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/utils.js"(exports, module) {
|
|
1182
1192
|
"use strict";
|
|
1183
1193
|
var formats = require_formats();
|
|
1184
1194
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1375,9 +1385,9 @@
|
|
|
1375
1385
|
}
|
|
1376
1386
|
});
|
|
1377
1387
|
|
|
1378
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1388
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js
|
|
1379
1389
|
var require_stringify = __commonJS({
|
|
1380
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1390
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/stringify.js"(exports, module) {
|
|
1381
1391
|
"use strict";
|
|
1382
1392
|
var getSideChannel = require_side_channel();
|
|
1383
1393
|
var utils = require_utils();
|
|
@@ -1396,7 +1406,6 @@
|
|
|
1396
1406
|
}
|
|
1397
1407
|
};
|
|
1398
1408
|
var isArray2 = Array.isArray;
|
|
1399
|
-
var split = String.prototype.split;
|
|
1400
1409
|
var push = Array.prototype.push;
|
|
1401
1410
|
var pushToArray = function(arr, valueOrArray) {
|
|
1402
1411
|
push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
@@ -1414,6 +1423,7 @@
|
|
|
1414
1423
|
encodeValuesOnly: false,
|
|
1415
1424
|
format: defaultFormat,
|
|
1416
1425
|
formatter: formats.formatters[defaultFormat],
|
|
1426
|
+
// deprecated
|
|
1417
1427
|
indices: false,
|
|
1418
1428
|
serializeDate: function serializeDate(date) {
|
|
1419
1429
|
return toISO.call(date);
|
|
@@ -1465,14 +1475,6 @@
|
|
|
1465
1475
|
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
|
1466
1476
|
if (encoder) {
|
|
1467
1477
|
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format);
|
|
1468
|
-
if (generateArrayPrefix === "comma" && encodeValuesOnly) {
|
|
1469
|
-
var valuesArray = split.call(String(obj), ",");
|
|
1470
|
-
var valuesJoined = "";
|
|
1471
|
-
for (var i = 0; i < valuesArray.length; ++i) {
|
|
1472
|
-
valuesJoined += (i === 0 ? "" : ",") + formatter(encoder(valuesArray[i], defaults.encoder, charset, "value", format));
|
|
1473
|
-
}
|
|
1474
|
-
return [formatter(keyValue) + (commaRoundTrip && isArray2(obj) && valuesArray.length === 1 ? "[]" : "") + "=" + valuesJoined];
|
|
1475
|
-
}
|
|
1476
1478
|
return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))];
|
|
1477
1479
|
}
|
|
1478
1480
|
return [formatter(prefix) + "=" + formatter(String(obj))];
|
|
@@ -1483,6 +1485,9 @@
|
|
|
1483
1485
|
}
|
|
1484
1486
|
var objKeys;
|
|
1485
1487
|
if (generateArrayPrefix === "comma" && isArray2(obj)) {
|
|
1488
|
+
if (encodeValuesOnly && encoder) {
|
|
1489
|
+
obj = utils.maybeMap(obj, encoder);
|
|
1490
|
+
}
|
|
1486
1491
|
objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
|
|
1487
1492
|
} else if (isArray2(filter)) {
|
|
1488
1493
|
objKeys = filter;
|
|
@@ -1508,7 +1513,7 @@
|
|
|
1508
1513
|
commaRoundTrip,
|
|
1509
1514
|
strictNullHandling,
|
|
1510
1515
|
skipNulls,
|
|
1511
|
-
encoder,
|
|
1516
|
+
generateArrayPrefix === "comma" && encodeValuesOnly && isArray2(obj) ? null : encoder,
|
|
1512
1517
|
filter,
|
|
1513
1518
|
sort,
|
|
1514
1519
|
allowDots,
|
|
@@ -1637,9 +1642,9 @@
|
|
|
1637
1642
|
}
|
|
1638
1643
|
});
|
|
1639
1644
|
|
|
1640
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1645
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js
|
|
1641
1646
|
var require_parse = __commonJS({
|
|
1642
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1647
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/parse.js"(exports, module) {
|
|
1643
1648
|
"use strict";
|
|
1644
1649
|
var utils = require_utils();
|
|
1645
1650
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -1808,6 +1813,7 @@
|
|
|
1808
1813
|
comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
|
|
1809
1814
|
decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
|
|
1810
1815
|
delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
1816
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
1811
1817
|
depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
|
|
1812
1818
|
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
1813
1819
|
interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
@@ -1838,9 +1844,9 @@
|
|
|
1838
1844
|
}
|
|
1839
1845
|
});
|
|
1840
1846
|
|
|
1841
|
-
// ../../node_modules/.pnpm/qs@6.11.
|
|
1847
|
+
// ../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js
|
|
1842
1848
|
var require_lib = __commonJS({
|
|
1843
|
-
"../../node_modules/.pnpm/qs@6.11.
|
|
1849
|
+
"../../node_modules/.pnpm/qs@6.11.1/node_modules/qs/lib/index.js"(exports, module) {
|
|
1844
1850
|
"use strict";
|
|
1845
1851
|
var stringify2 = require_stringify();
|
|
1846
1852
|
var parse2 = require_parse();
|
|
@@ -1975,6 +1981,7 @@
|
|
|
1975
1981
|
"use strict";
|
|
1976
1982
|
var Buffer2 = require_safer().Buffer;
|
|
1977
1983
|
module.exports = {
|
|
1984
|
+
// Encodings
|
|
1978
1985
|
utf8: { type: "_internal", bomAware: true },
|
|
1979
1986
|
cesu8: { type: "_internal", bomAware: true },
|
|
1980
1987
|
unicode11utf8: "utf8",
|
|
@@ -1983,6 +1990,7 @@
|
|
|
1983
1990
|
binary: { type: "_internal" },
|
|
1984
1991
|
base64: { type: "_internal" },
|
|
1985
1992
|
hex: { type: "_internal" },
|
|
1993
|
+
// Codec.
|
|
1986
1994
|
_internal: InternalCodec
|
|
1987
1995
|
};
|
|
1988
1996
|
function InternalCodec(codecOptions, iconv) {
|
|
@@ -2746,6 +2754,7 @@
|
|
|
2746
2754
|
"../../node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/sbcs-data.js"(exports, module) {
|
|
2747
2755
|
"use strict";
|
|
2748
2756
|
module.exports = {
|
|
2757
|
+
// Not supported by iconv, not sure why.
|
|
2749
2758
|
"10029": "maccenteuro",
|
|
2750
2759
|
"maccenteuro": {
|
|
2751
2760
|
"type": "_sbcs",
|
|
@@ -2765,6 +2774,7 @@
|
|
|
2765
2774
|
"type": "_sbcs",
|
|
2766
2775
|
"chars": "\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0"
|
|
2767
2776
|
},
|
|
2777
|
+
// Aliases of generated encodings.
|
|
2768
2778
|
"ascii8bit": "ascii",
|
|
2769
2779
|
"usascii": "ascii",
|
|
2770
2780
|
"ansix34": "ascii",
|
|
@@ -5021,6 +5031,36 @@
|
|
|
5021
5031
|
"../../node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/encodings/dbcs-data.js"(exports, module) {
|
|
5022
5032
|
"use strict";
|
|
5023
5033
|
module.exports = {
|
|
5034
|
+
// == Japanese/ShiftJIS ====================================================
|
|
5035
|
+
// All japanese encodings are based on JIS X set of standards:
|
|
5036
|
+
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
5037
|
+
// JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
|
|
5038
|
+
// Has several variations in 1978, 1983, 1990 and 1997.
|
|
5039
|
+
// JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
|
|
5040
|
+
// JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
|
|
5041
|
+
// 2 planes, first is superset of 0208, second - revised 0212.
|
|
5042
|
+
// Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
|
|
5043
|
+
// Byte encodings are:
|
|
5044
|
+
// * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
|
|
5045
|
+
// encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
|
|
5046
|
+
// Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
|
|
5047
|
+
// * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
|
|
5048
|
+
// 0x00-0x7F - lower part of 0201
|
|
5049
|
+
// 0x8E, 0xA1-0xDF - upper part of 0201
|
|
5050
|
+
// (0xA1-0xFE)x2 - 0208 plane (94x94).
|
|
5051
|
+
// 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
|
|
5052
|
+
// * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
|
|
5053
|
+
// Used as-is in ISO2022 family.
|
|
5054
|
+
// * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
|
|
5055
|
+
// 0201-1976 Roman, 0208-1978, 0208-1983.
|
|
5056
|
+
// * ISO2022-JP-1: Adds esc seq for 0212-1990.
|
|
5057
|
+
// * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
|
|
5058
|
+
// * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
|
|
5059
|
+
// * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
|
|
5060
|
+
//
|
|
5061
|
+
// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
|
|
5062
|
+
//
|
|
5063
|
+
// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
|
|
5024
5064
|
"shiftjis": {
|
|
5025
5065
|
type: "_dbcs",
|
|
5026
5066
|
table: function() {
|
|
@@ -5046,12 +5086,20 @@
|
|
|
5046
5086
|
},
|
|
5047
5087
|
encodeAdd: { "\xA5": 92, "\u203E": 126 }
|
|
5048
5088
|
},
|
|
5089
|
+
// TODO: KDDI extension to Shift_JIS
|
|
5090
|
+
// TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
|
|
5091
|
+
// TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
|
|
5092
|
+
// == Chinese/GBK ==========================================================
|
|
5093
|
+
// http://en.wikipedia.org/wiki/GBK
|
|
5094
|
+
// We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
5095
|
+
// Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
|
|
5049
5096
|
"gb2312": "cp936",
|
|
5050
5097
|
"gb231280": "cp936",
|
|
5051
5098
|
"gb23121980": "cp936",
|
|
5052
5099
|
"csgb2312": "cp936",
|
|
5053
5100
|
"csiso58gb231280": "cp936",
|
|
5054
5101
|
"euccn": "cp936",
|
|
5102
|
+
// Microsoft's CP936 is a subset and approximation of GBK.
|
|
5055
5103
|
"windows936": "cp936",
|
|
5056
5104
|
"ms936": "cp936",
|
|
5057
5105
|
"936": "cp936",
|
|
@@ -5061,6 +5109,7 @@
|
|
|
5061
5109
|
return require_cp936();
|
|
5062
5110
|
}
|
|
5063
5111
|
},
|
|
5112
|
+
// GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
|
|
5064
5113
|
"gbk": {
|
|
5065
5114
|
type: "_dbcs",
|
|
5066
5115
|
table: function() {
|
|
@@ -5069,6 +5118,11 @@
|
|
|
5069
5118
|
},
|
|
5070
5119
|
"xgbk": "gbk",
|
|
5071
5120
|
"isoir58": "gbk",
|
|
5121
|
+
// GB18030 is an algorithmic extension of GBK.
|
|
5122
|
+
// Main source: https://www.w3.org/TR/encoding/#gbk-encoder
|
|
5123
|
+
// http://icu-project.org/docs/papers/gb18030.html
|
|
5124
|
+
// http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
|
|
5125
|
+
// http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
|
|
5072
5126
|
"gb18030": {
|
|
5073
5127
|
type: "_dbcs",
|
|
5074
5128
|
table: function() {
|
|
@@ -5081,6 +5135,8 @@
|
|
|
5081
5135
|
encodeAdd: { "\u20AC": 41699 }
|
|
5082
5136
|
},
|
|
5083
5137
|
"chinese": "gb18030",
|
|
5138
|
+
// == Korean ===============================================================
|
|
5139
|
+
// EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
|
|
5084
5140
|
"windows949": "cp949",
|
|
5085
5141
|
"ms949": "cp949",
|
|
5086
5142
|
"949": "cp949",
|
|
@@ -5098,6 +5154,28 @@
|
|
|
5098
5154
|
"ksc56011987": "cp949",
|
|
5099
5155
|
"ksc56011989": "cp949",
|
|
5100
5156
|
"ksc5601": "cp949",
|
|
5157
|
+
// == Big5/Taiwan/Hong Kong ================================================
|
|
5158
|
+
// There are lots of tables for Big5 and cp950. Please see the following links for history:
|
|
5159
|
+
// http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
|
|
5160
|
+
// Variations, in roughly number of defined chars:
|
|
5161
|
+
// * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
|
|
5162
|
+
// * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
|
|
5163
|
+
// * Big5-2003 (Taiwan standard) almost superset of cp950.
|
|
5164
|
+
// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
|
|
5165
|
+
// * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
|
|
5166
|
+
// many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
|
|
5167
|
+
// Plus, it has 4 combining sequences.
|
|
5168
|
+
// Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
|
|
5169
|
+
// because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
|
|
5170
|
+
// Implementations are not consistent within browsers; sometimes labeled as just big5.
|
|
5171
|
+
// MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
|
|
5172
|
+
// Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
|
|
5173
|
+
// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
|
|
5174
|
+
// Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
|
|
5175
|
+
// http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
|
|
5176
|
+
//
|
|
5177
|
+
// Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
|
|
5178
|
+
// Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
|
|
5101
5179
|
"windows950": "cp950",
|
|
5102
5180
|
"ms950": "cp950",
|
|
5103
5181
|
"950": "cp950",
|
|
@@ -5107,6 +5185,7 @@
|
|
|
5107
5185
|
return require_cp950();
|
|
5108
5186
|
}
|
|
5109
5187
|
},
|
|
5188
|
+
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
|
|
5110
5189
|
"big5": "big5hkscs",
|
|
5111
5190
|
"big5hkscs": {
|
|
5112
5191
|
type: "_dbcs",
|
|
@@ -5114,6 +5193,9 @@
|
|
|
5114
5193
|
return require_cp950().concat(require_big5_added());
|
|
5115
5194
|
},
|
|
5116
5195
|
encodeSkipVals: [
|
|
5196
|
+
// Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
|
|
5197
|
+
// https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.
|
|
5198
|
+
// But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.
|
|
5117
5199
|
36457,
|
|
5118
5200
|
36463,
|
|
5119
5201
|
36478,
|
|
@@ -5175,6 +5257,7 @@
|
|
|
5175
5257
|
37576,
|
|
5176
5258
|
38468,
|
|
5177
5259
|
38637,
|
|
5260
|
+
// Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345
|
|
5178
5261
|
41636,
|
|
5179
5262
|
41637,
|
|
5180
5263
|
41639,
|
|
@@ -6277,40 +6360,43 @@
|
|
|
6277
6360
|
}
|
|
6278
6361
|
_createClass(Onion2, [{
|
|
6279
6362
|
key: "use",
|
|
6280
|
-
value:
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6363
|
+
value: (
|
|
6364
|
+
// 内置内核中间件长度
|
|
6365
|
+
function use(newMiddleware) {
|
|
6366
|
+
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6367
|
+
global: false,
|
|
6368
|
+
core: false,
|
|
6369
|
+
defaultInstance: false
|
|
6370
|
+
};
|
|
6371
|
+
var core = false;
|
|
6372
|
+
var global2 = false;
|
|
6373
|
+
var defaultInstance = false;
|
|
6374
|
+
if (typeof opts === "number") {
|
|
6375
|
+
if (process && process.env && process.env.NODE_ENV === "development") {
|
|
6376
|
+
console.warn('use() options should be object, number property would be deprecated in future\uFF0Cplease update use() options to "{ core: true }".');
|
|
6377
|
+
}
|
|
6378
|
+
core = true;
|
|
6379
|
+
global2 = false;
|
|
6380
|
+
} else if (_typeof(opts) === "object" && opts) {
|
|
6381
|
+
global2 = opts.global || false;
|
|
6382
|
+
core = opts.core || false;
|
|
6383
|
+
defaultInstance = opts.defaultInstance || false;
|
|
6384
|
+
}
|
|
6385
|
+
if (global2) {
|
|
6386
|
+
Onion2.globalMiddlewares.splice(Onion2.globalMiddlewares.length - Onion2.defaultGlobalMiddlewaresLength, 0, newMiddleware);
|
|
6387
|
+
return;
|
|
6388
|
+
}
|
|
6389
|
+
if (core) {
|
|
6390
|
+
Onion2.coreMiddlewares.splice(Onion2.coreMiddlewares.length - Onion2.defaultCoreMiddlewaresLength, 0, newMiddleware);
|
|
6391
|
+
return;
|
|
6392
|
+
}
|
|
6393
|
+
if (defaultInstance) {
|
|
6394
|
+
this.defaultMiddlewares.push(newMiddleware);
|
|
6395
|
+
return;
|
|
6396
|
+
}
|
|
6397
|
+
this.middlewares.push(newMiddleware);
|
|
6311
6398
|
}
|
|
6312
|
-
|
|
6313
|
-
}
|
|
6399
|
+
)
|
|
6314
6400
|
}, {
|
|
6315
6401
|
key: "execute",
|
|
6316
6402
|
value: function execute() {
|
|
@@ -6795,6 +6881,7 @@
|
|
|
6795
6881
|
this.initOptions = mergeRequestOptions(this.initOptions, options);
|
|
6796
6882
|
this.mapCache.extendOptions(options);
|
|
6797
6883
|
}
|
|
6884
|
+
// 执行请求前拦截器
|
|
6798
6885
|
}, {
|
|
6799
6886
|
key: "dealRequestInterceptors",
|
|
6800
6887
|
value: function dealRequestInterceptors(ctx) {
|
|
@@ -6855,18 +6942,22 @@
|
|
|
6855
6942
|
}
|
|
6856
6943
|
}], [{
|
|
6857
6944
|
key: "requestUse",
|
|
6858
|
-
value:
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6945
|
+
value: (
|
|
6946
|
+
// 请求拦截器 默认 { global: true } 兼容旧版本拦截器
|
|
6947
|
+
function requestUse(handler) {
|
|
6948
|
+
var opt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
6949
|
+
global: true
|
|
6950
|
+
};
|
|
6951
|
+
if (typeof handler !== "function")
|
|
6952
|
+
throw new TypeError("Interceptor must be function!");
|
|
6953
|
+
if (opt.global) {
|
|
6954
|
+
Core2.requestInterceptors.push(handler);
|
|
6955
|
+
} else {
|
|
6956
|
+
this.instanceRequestInterceptors.push(handler);
|
|
6957
|
+
}
|
|
6868
6958
|
}
|
|
6869
|
-
|
|
6959
|
+
)
|
|
6960
|
+
// 响应拦截器 默认 { global: true } 兼容旧版本拦截器
|
|
6870
6961
|
}, {
|
|
6871
6962
|
key: "responseUse",
|
|
6872
6963
|
value: function responseUse(handler) {
|