@hashgraphonline/standards-sdk 0.0.105 → 0.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/hcs-10/sdk.d.ts +1 -0
- package/dist/es/hcs-10/sdk.d.ts.map +1 -1
- package/dist/es/standards-sdk.es100.js +136 -2
- package/dist/es/standards-sdk.es100.js.map +1 -1
- package/dist/es/standards-sdk.es101.js +162 -126
- package/dist/es/standards-sdk.es101.js.map +1 -1
- package/dist/es/standards-sdk.es102.js +2281 -171
- package/dist/es/standards-sdk.es102.js.map +1 -1
- package/dist/es/standards-sdk.es105.js +1 -1
- package/dist/es/standards-sdk.es106.js +3 -3
- package/dist/es/standards-sdk.es109.js +1 -1
- package/dist/es/standards-sdk.es111.js +1 -1
- package/dist/es/standards-sdk.es112.js +6 -6
- package/dist/es/standards-sdk.es113.js +3 -3
- package/dist/es/standards-sdk.es120.js +1 -1
- package/dist/es/standards-sdk.es121.js +2 -2
- package/dist/es/standards-sdk.es13.js +2 -2
- package/dist/es/standards-sdk.es15.js +1 -1
- package/dist/es/standards-sdk.es18.js +2 -2
- package/dist/es/standards-sdk.es19.js +17 -6
- package/dist/es/standards-sdk.es19.js.map +1 -1
- package/dist/es/standards-sdk.es20.js +1 -1
- package/dist/es/standards-sdk.es21.js +2 -2
- package/dist/es/standards-sdk.es24.js +10 -10
- package/dist/es/standards-sdk.es26.js +7190 -3
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +36 -4168
- package/dist/es/standards-sdk.es27.js.map +1 -1
- package/dist/es/standards-sdk.es28.js +21 -7163
- package/dist/es/standards-sdk.es28.js.map +1 -1
- package/dist/es/standards-sdk.es29.js +5 -36
- package/dist/es/standards-sdk.es29.js.map +1 -1
- package/dist/es/standards-sdk.es30.js +9 -47
- package/dist/es/standards-sdk.es30.js.map +1 -1
- package/dist/es/standards-sdk.es31.js +3 -5
- package/dist/es/standards-sdk.es31.js.map +1 -1
- package/dist/es/standards-sdk.es32.js +4166 -8
- package/dist/es/standards-sdk.es32.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +419 -2
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +2 -84
- package/dist/es/standards-sdk.es36.js.map +1 -1
- package/dist/es/standards-sdk.es37.js +119 -22
- package/dist/es/standards-sdk.es37.js.map +1 -1
- package/dist/es/standards-sdk.es38.js +7105 -117
- package/dist/es/standards-sdk.es38.js.map +1 -1
- package/dist/es/standards-sdk.es39.js +3 -90
- package/dist/es/standards-sdk.es39.js.map +1 -1
- package/dist/es/standards-sdk.es40.js +3 -195
- package/dist/es/standards-sdk.es40.js.map +1 -1
- package/dist/es/standards-sdk.es41.js +2 -438
- package/dist/es/standards-sdk.es41.js.map +1 -1
- package/dist/es/standards-sdk.es42.js +80 -21
- package/dist/es/standards-sdk.es42.js.map +1 -1
- package/dist/es/standards-sdk.es43.js +21 -137
- package/dist/es/standards-sdk.es43.js.map +1 -1
- package/dist/es/standards-sdk.es44.js +143 -13
- package/dist/es/standards-sdk.es44.js.map +1 -1
- package/dist/es/standards-sdk.es45.js +83 -21
- package/dist/es/standards-sdk.es45.js.map +1 -1
- package/dist/es/standards-sdk.es46.js +170 -25
- package/dist/es/standards-sdk.es46.js.map +1 -1
- package/dist/es/standards-sdk.es47.js +191 -17
- package/dist/es/standards-sdk.es47.js.map +1 -1
- package/dist/es/standards-sdk.es48.js +431 -37
- package/dist/es/standards-sdk.es48.js.map +1 -1
- package/dist/es/standards-sdk.es49.js +16 -9
- package/dist/es/standards-sdk.es49.js.map +1 -1
- package/dist/es/standards-sdk.es50.js +125 -47
- package/dist/es/standards-sdk.es50.js.map +1 -1
- package/dist/es/standards-sdk.es51.js +13 -1284
- package/dist/es/standards-sdk.es51.js.map +1 -1
- package/dist/es/standards-sdk.es52.js +25 -28
- package/dist/es/standards-sdk.es52.js.map +1 -1
- package/dist/es/standards-sdk.es53.js +28 -5
- package/dist/es/standards-sdk.es53.js.map +1 -1
- package/dist/es/standards-sdk.es54.js +17 -155
- package/dist/es/standards-sdk.es54.js.map +1 -1
- package/dist/es/standards-sdk.es55.js +32 -781
- package/dist/es/standards-sdk.es55.js.map +1 -1
- package/dist/es/standards-sdk.es56.js +13 -169
- package/dist/es/standards-sdk.es56.js.map +1 -1
- package/dist/es/standards-sdk.es57.js +54 -136
- package/dist/es/standards-sdk.es57.js.map +1 -1
- package/dist/es/standards-sdk.es58.js +1214 -7061
- package/dist/es/standards-sdk.es58.js.map +1 -1
- package/dist/es/standards-sdk.es59.js +28 -97
- package/dist/es/standards-sdk.es59.js.map +1 -1
- package/dist/es/standards-sdk.es60.js +6 -2
- package/dist/es/standards-sdk.es60.js.map +1 -1
- package/dist/es/standards-sdk.es61.js +158 -15
- package/dist/es/standards-sdk.es61.js.map +1 -1
- package/dist/es/standards-sdk.es62.js +786 -402
- package/dist/es/standards-sdk.es62.js.map +1 -1
- package/dist/es/standards-sdk.es63.js +138 -16
- package/dist/es/standards-sdk.es63.js.map +1 -1
- package/dist/es/standards-sdk.es64.js +338 -393
- package/dist/es/standards-sdk.es64.js.map +1 -1
- package/dist/es/standards-sdk.es65.js +6 -2
- package/dist/es/standards-sdk.es65.js.map +1 -1
- package/dist/es/standards-sdk.es66.js +168 -109
- package/dist/es/standards-sdk.es66.js.map +1 -1
- package/dist/es/standards-sdk.es67.js +79 -25
- package/dist/es/standards-sdk.es67.js.map +1 -1
- package/dist/es/standards-sdk.es68.js +112 -24
- package/dist/es/standards-sdk.es68.js.map +1 -1
- package/dist/es/standards-sdk.es69.js +48 -34
- package/dist/es/standards-sdk.es69.js.map +1 -1
- package/dist/es/standards-sdk.es7.js +8 -5
- package/dist/es/standards-sdk.es7.js.map +1 -1
- package/dist/es/standards-sdk.es70.js +10 -3
- package/dist/es/standards-sdk.es70.js.map +1 -1
- package/dist/es/standards-sdk.es71.js +97 -2282
- package/dist/es/standards-sdk.es71.js.map +1 -1
- package/dist/es/standards-sdk.es72.js +3 -163
- package/dist/es/standards-sdk.es72.js.map +1 -1
- package/dist/es/standards-sdk.es73.js +2 -364
- package/dist/es/standards-sdk.es73.js.map +1 -1
- package/dist/es/standards-sdk.es74.js +112 -5
- package/dist/es/standards-sdk.es74.js.map +1 -1
- package/dist/es/standards-sdk.es75.js +68 -173
- package/dist/es/standards-sdk.es75.js.map +1 -1
- package/dist/es/standards-sdk.es76.js +4 -79
- package/dist/es/standards-sdk.es76.js.map +1 -1
- package/dist/es/standards-sdk.es77.js +4 -113
- package/dist/es/standards-sdk.es77.js.map +1 -1
- package/dist/es/standards-sdk.es78.js +214 -45
- package/dist/es/standards-sdk.es78.js.map +1 -1
- package/dist/es/standards-sdk.es79.js +57 -9
- package/dist/es/standards-sdk.es79.js.map +1 -1
- package/dist/es/standards-sdk.es8.js +2 -2
- package/dist/es/standards-sdk.es80.js +69 -97
- package/dist/es/standards-sdk.es80.js.map +1 -1
- package/dist/es/standards-sdk.es81.js +26 -3
- package/dist/es/standards-sdk.es81.js.map +1 -1
- package/dist/es/standards-sdk.es82.js +26 -2
- package/dist/es/standards-sdk.es82.js.map +1 -1
- package/dist/es/standards-sdk.es83.js +34 -109
- package/dist/es/standards-sdk.es83.js.map +1 -1
- package/dist/es/standards-sdk.es84.js +18 -71
- package/dist/es/standards-sdk.es84.js.map +1 -1
- package/dist/es/standards-sdk.es85.js +100 -5
- package/dist/es/standards-sdk.es85.js.map +1 -1
- package/dist/es/standards-sdk.es86.js +2 -5
- package/dist/es/standards-sdk.es86.js.map +1 -1
- package/dist/es/standards-sdk.es87.js +15 -220
- package/dist/es/standards-sdk.es87.js.map +1 -1
- package/dist/es/standards-sdk.es88.js +403 -52
- package/dist/es/standards-sdk.es88.js.map +1 -1
- package/dist/es/standards-sdk.es89.js +163 -68
- package/dist/es/standards-sdk.es89.js.map +1 -1
- package/dist/es/standards-sdk.es90.js +31 -3
- package/dist/es/standards-sdk.es90.js.map +1 -1
- package/dist/es/standards-sdk.es91.js +57 -26
- package/dist/es/standards-sdk.es91.js.map +1 -1
- package/dist/es/standards-sdk.es92.js +45 -58
- package/dist/es/standards-sdk.es92.js.map +1 -1
- package/dist/es/standards-sdk.es93.js +8 -48
- package/dist/es/standards-sdk.es93.js.map +1 -1
- package/dist/es/standards-sdk.es94.js +63 -8
- package/dist/es/standards-sdk.es94.js.map +1 -1
- package/dist/es/standards-sdk.es95.js +5 -64
- package/dist/es/standards-sdk.es95.js.map +1 -1
- package/dist/es/standards-sdk.es96.js +15 -6
- package/dist/es/standards-sdk.es96.js.map +1 -1
- package/dist/es/standards-sdk.es97.js +7 -15
- package/dist/es/standards-sdk.es97.js.map +1 -1
- package/dist/es/standards-sdk.es98.js +44 -6
- package/dist/es/standards-sdk.es98.js.map +1 -1
- package/dist/es/standards-sdk.es99.js +2 -45
- package/dist/es/standards-sdk.es99.js.map +1 -1
- package/dist/es/utils/transaction-parser.d.ts +1 -0
- package/dist/es/utils/transaction-parser.d.ts.map +1 -1
- package/dist/umd/hcs-10/sdk.d.ts +1 -0
- package/dist/umd/hcs-10/sdk.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +1 -1
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/dist/umd/utils/transaction-parser.d.ts +1 -0
- package/dist/umd/utils/transaction-parser.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
1
|
+
function number(n) {
|
|
2
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
|
3
|
+
throw new Error(`Wrong positive integer: ${n}`);
|
|
4
|
+
}
|
|
5
|
+
function bytes(b, ...lengths) {
|
|
6
|
+
if (!(b instanceof Uint8Array))
|
|
7
|
+
throw new Error("Expected Uint8Array");
|
|
8
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
9
|
+
throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);
|
|
10
|
+
}
|
|
11
|
+
function exists(instance, checkFinished = true) {
|
|
12
|
+
if (instance.destroyed)
|
|
13
|
+
throw new Error("Hash instance has been destroyed");
|
|
14
|
+
if (checkFinished && instance.finished)
|
|
15
|
+
throw new Error("Hash#digest() has already been called");
|
|
16
|
+
}
|
|
17
|
+
function output(out, instance) {
|
|
18
|
+
bytes(out);
|
|
19
|
+
const min = instance.outputLen;
|
|
20
|
+
if (out.length < min) {
|
|
21
|
+
throw new Error(`digestInto() expects output buffer of length at least ${min}`);
|
|
22
|
+
}
|
|
3
23
|
}
|
|
4
24
|
export {
|
|
5
|
-
|
|
25
|
+
bytes,
|
|
26
|
+
exists,
|
|
27
|
+
number,
|
|
28
|
+
output
|
|
6
29
|
};
|
|
7
30
|
//# sourceMappingURL=standards-sdk.es81.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es81.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es81.js","sources":["../../node_modules/@noble/hashes/esm/_assert.js"],"sourcesContent":["function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nfunction bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nfunction bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nfunction hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nfunction exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nfunction output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nexport { number, bool, bytes, hash, exists, output };\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n//# sourceMappingURL=_assert.js.map"],"names":[],"mappings":"AAAA,SAAS,OAAO,GAAG;AACf,MAAI,CAAC,OAAO,cAAc,CAAC,KAAK,IAAI;AAChC,UAAM,IAAI,MAAM,2BAA2B,CAAC,EAAE;AACtD;AAKA,SAAS,MAAM,MAAM,SAAS;AAC1B,MAAI,EAAE,aAAa;AACf,UAAM,IAAI,MAAM,qBAAqB;AACzC,MAAI,QAAQ,SAAS,KAAK,CAAC,QAAQ,SAAS,EAAE,MAAM;AAChD,UAAM,IAAI,MAAM,iCAAiC,OAAO,mBAAmB,EAAE,MAAM,EAAE;AAC7F;AAOA,SAAS,OAAO,UAAU,gBAAgB,MAAM;AAC5C,MAAI,SAAS;AACT,UAAM,IAAI,MAAM,kCAAkC;AACtD,MAAI,iBAAiB,SAAS;AAC1B,UAAM,IAAI,MAAM,uCAAuC;AAC/D;AACA,SAAS,OAAO,KAAK,UAAU;AAC3B,QAAM,GAAG;AACT,QAAM,MAAM,SAAS;AACrB,MAAI,IAAI,SAAS,KAAK;AAClB,UAAM,IAAI,MAAM,yDAAyD,GAAG,EAAE;AAAA,EACtF;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
|
-
const
|
|
1
|
+
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
2
|
+
const _32n = /* @__PURE__ */ BigInt(32);
|
|
3
|
+
function fromBig(n, le = false) {
|
|
4
|
+
if (le)
|
|
5
|
+
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
6
|
+
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
7
|
+
}
|
|
8
|
+
function split(lst, le = false) {
|
|
9
|
+
let Ah = new Uint32Array(lst.length);
|
|
10
|
+
let Al = new Uint32Array(lst.length);
|
|
11
|
+
for (let i = 0; i < lst.length; i++) {
|
|
12
|
+
const { h, l } = fromBig(lst[i], le);
|
|
13
|
+
[Ah[i], Al[i]] = [h, l];
|
|
14
|
+
}
|
|
15
|
+
return [Ah, Al];
|
|
16
|
+
}
|
|
17
|
+
const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
18
|
+
const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
19
|
+
const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
20
|
+
const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
2
21
|
export {
|
|
3
|
-
|
|
22
|
+
fromBig,
|
|
23
|
+
rotlBH,
|
|
24
|
+
rotlBL,
|
|
25
|
+
rotlSH,
|
|
26
|
+
rotlSL,
|
|
27
|
+
split
|
|
4
28
|
};
|
|
5
29
|
//# sourceMappingURL=standards-sdk.es82.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es82.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es82.js","sources":["../../node_modules/@noble/hashes/esm/_u64.js"],"sourcesContent":["const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { fromBig, split, toBig, shrSH, shrSL, rotrSH, rotrSL, rotrBH, rotrBL, rotr32H, rotr32L, rotlSH, rotlSL, rotlBH, rotlBL, add, add3L, add3H, add4L, add4H, add5H, add5L, };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map"],"names":[],"mappings":"AAAA,MAAM,aAA6B,uBAAO,KAAK,KAAK,CAAC;AACrD,MAAM,OAAuB,uBAAO,EAAE;AAEtC,SAAS,QAAQ,GAAG,KAAK,OAAO;AAC5B,MAAI;AACA,WAAO,EAAE,GAAG,OAAO,IAAI,UAAU,GAAG,GAAG,OAAQ,KAAK,OAAQ,UAAU,EAAG;AAC7E,SAAO,EAAE,GAAG,OAAQ,KAAK,OAAQ,UAAU,IAAI,GAAG,GAAG,OAAO,IAAI,UAAU,IAAI,EAAG;AACrF;AACA,SAAS,MAAM,KAAK,KAAK,OAAO;AAC5B,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,MAAI,KAAK,IAAI,YAAY,IAAI,MAAM;AACnC,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACjC,UAAM,EAAE,GAAG,EAAG,IAAG,QAAQ,IAAI,CAAC,GAAG,EAAE;AACnC,KAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAAA,EAC9B;AACI,SAAO,CAAC,IAAI,EAAE;AAClB;AAeK,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAC/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAK,IAAM,MAAO,KAAK;AAE/C,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;AACtD,MAAC,SAAS,CAAC,GAAG,GAAG,MAAO,KAAM,IAAI,KAAQ,MAAO,KAAK;","x_google_ignoreList":[0]}
|
|
@@ -1,116 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2
|
+
const u8a = (a) => a instanceof Uint8Array;
|
|
3
|
+
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
4
|
+
const isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
5
|
+
if (!isLE)
|
|
6
|
+
throw new Error("Non little-endian hardware is not supported");
|
|
7
|
+
function utf8ToBytes(str) {
|
|
8
|
+
if (typeof str !== "string")
|
|
9
|
+
throw new Error(`utf8ToBytes expected string, got ${typeof str}`);
|
|
10
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
6
11
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
12
|
+
function toBytes(data) {
|
|
13
|
+
if (typeof data === "string")
|
|
14
|
+
data = utf8ToBytes(data);
|
|
15
|
+
if (!u8a(data))
|
|
16
|
+
throw new Error(`expected Uint8Array, got ${typeof data}`);
|
|
17
|
+
return data;
|
|
9
18
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return !dots && i ? "[" + token + "]" : token;
|
|
15
|
-
}).join(dots ? "." : "");
|
|
16
|
-
}
|
|
17
|
-
function isFlatArray(arr) {
|
|
18
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
19
|
-
}
|
|
20
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
21
|
-
return /^is[A-Z]/.test(prop);
|
|
22
|
-
});
|
|
23
|
-
function toFormData(obj, formData, options) {
|
|
24
|
-
if (!utils.isObject(obj)) {
|
|
25
|
-
throw new TypeError("target must be an object");
|
|
26
|
-
}
|
|
27
|
-
formData = formData || new FormData();
|
|
28
|
-
options = utils.toFlatObject(options, {
|
|
29
|
-
metaTokens: true,
|
|
30
|
-
dots: false,
|
|
31
|
-
indexes: false
|
|
32
|
-
}, false, function defined(option, source) {
|
|
33
|
-
return !utils.isUndefined(source[option]);
|
|
34
|
-
});
|
|
35
|
-
const metaTokens = options.metaTokens;
|
|
36
|
-
const visitor = options.visitor || defaultVisitor;
|
|
37
|
-
const dots = options.dots;
|
|
38
|
-
const indexes = options.indexes;
|
|
39
|
-
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
40
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
41
|
-
if (!utils.isFunction(visitor)) {
|
|
42
|
-
throw new TypeError("visitor must be a function");
|
|
43
|
-
}
|
|
44
|
-
function convertValue(value) {
|
|
45
|
-
if (value === null) return "";
|
|
46
|
-
if (utils.isDate(value)) {
|
|
47
|
-
return value.toISOString();
|
|
48
|
-
}
|
|
49
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
50
|
-
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
51
|
-
}
|
|
52
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
53
|
-
return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
|
|
54
|
-
}
|
|
55
|
-
return value;
|
|
19
|
+
class Hash {
|
|
20
|
+
// Safe version that clones internal state
|
|
21
|
+
clone() {
|
|
22
|
+
return this._cloneInto();
|
|
56
23
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
arr.forEach(function each(el, index) {
|
|
66
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
67
|
-
// eslint-disable-next-line no-nested-ternary
|
|
68
|
-
indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]",
|
|
69
|
-
convertValue(el)
|
|
70
|
-
);
|
|
71
|
-
});
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
if (isVisitable(value)) {
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
const stack = [];
|
|
82
|
-
const exposedHelpers = Object.assign(predicates, {
|
|
83
|
-
defaultVisitor,
|
|
84
|
-
convertValue,
|
|
85
|
-
isVisitable
|
|
86
|
-
});
|
|
87
|
-
function build(value, path) {
|
|
88
|
-
if (utils.isUndefined(value)) return;
|
|
89
|
-
if (stack.indexOf(value) !== -1) {
|
|
90
|
-
throw Error("Circular reference detected in " + path.join("."));
|
|
91
|
-
}
|
|
92
|
-
stack.push(value);
|
|
93
|
-
utils.forEach(value, function each(el, key) {
|
|
94
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
95
|
-
formData,
|
|
96
|
-
el,
|
|
97
|
-
utils.isString(key) ? key.trim() : key,
|
|
98
|
-
path,
|
|
99
|
-
exposedHelpers
|
|
100
|
-
);
|
|
101
|
-
if (result === true) {
|
|
102
|
-
build(el, path ? path.concat(key) : [key]);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
stack.pop();
|
|
106
|
-
}
|
|
107
|
-
if (!utils.isObject(obj)) {
|
|
108
|
-
throw new TypeError("data must be an object");
|
|
109
|
-
}
|
|
110
|
-
build(obj);
|
|
111
|
-
return formData;
|
|
24
|
+
}
|
|
25
|
+
function wrapConstructor(hashCons) {
|
|
26
|
+
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
27
|
+
const tmp = hashCons();
|
|
28
|
+
hashC.outputLen = tmp.outputLen;
|
|
29
|
+
hashC.blockLen = tmp.blockLen;
|
|
30
|
+
hashC.create = () => hashCons();
|
|
31
|
+
return hashC;
|
|
112
32
|
}
|
|
113
33
|
export {
|
|
114
|
-
|
|
34
|
+
Hash,
|
|
35
|
+
isLE,
|
|
36
|
+
toBytes,
|
|
37
|
+
u32,
|
|
38
|
+
utf8ToBytes,
|
|
39
|
+
wrapConstructor
|
|
115
40
|
};
|
|
116
41
|
//# sourceMappingURL=standards-sdk.es83.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es83.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es83.js","sources":["../../node_modules/@noble/hashes/esm/utils.js"],"sourcesContent":["/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\nconst toStr = {}.toString;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":"AAAA;AAQA,MAAM,MAAM,CAAC,MAAM,aAAa;AAGpB,MAAC,MAAM,CAAC,QAAQ,IAAI,YAAY,IAAI,QAAQ,IAAI,YAAY,KAAK,MAAM,IAAI,aAAa,CAAC,CAAC;AAO1F,MAAC,OAAO,IAAI,WAAW,IAAI,YAAY,CAAC,SAAU,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM;AAChF,IAAI,CAAC;AACD,QAAM,IAAI,MAAM,6CAA6C;AAuD1D,SAAS,YAAY,KAAK;AAC7B,MAAI,OAAO,QAAQ;AACf,UAAM,IAAI,MAAM,oCAAoC,OAAO,GAAG,EAAE;AACpE,SAAO,IAAI,WAAW,IAAI,YAAa,EAAC,OAAO,GAAG,CAAC;AACvD;AAMO,SAAS,QAAQ,MAAM;AAC1B,MAAI,OAAO,SAAS;AAChB,WAAO,YAAY,IAAI;AAC3B,MAAI,CAAC,IAAI,IAAI;AACT,UAAM,IAAI,MAAM,4BAA4B,OAAO,IAAI,EAAE;AAC7D,SAAO;AACX;AAgBO,MAAM,KAAK;AAAA;AAAA,EAEd,QAAQ;AACJ,WAAO,KAAK,WAAY;AAAA,EAChC;AACA;AAQO,SAAS,gBAAgB,UAAU;AACtC,QAAM,QAAQ,CAAC,QAAQ,SAAU,EAAC,OAAO,QAAQ,GAAG,CAAC,EAAE,OAAQ;AAC/D,QAAM,MAAM,SAAU;AACtB,QAAM,YAAY,IAAI;AACtB,QAAM,WAAW,IAAI;AACrB,QAAM,SAAS,MAAM,SAAU;AAC/B,SAAO;AACX;","x_google_ignoreList":[0]}
|
|
@@ -1,77 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { Coder } from "./standards-sdk.es48.js";
|
|
5
|
+
class AnonymousCoder extends Coder {
|
|
6
|
+
constructor(coder) {
|
|
7
|
+
super(coder.name, coder.type, "_", coder.dynamic);
|
|
8
|
+
__publicField(this, "coder");
|
|
9
|
+
this.coder = coder;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
code && (this.code = code);
|
|
12
|
-
config && (this.config = config);
|
|
13
|
-
request && (this.request = request);
|
|
14
|
-
if (response) {
|
|
15
|
-
this.response = response;
|
|
16
|
-
this.status = response.status ? response.status : null;
|
|
11
|
+
defaultValue() {
|
|
12
|
+
return this.coder.defaultValue();
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
toJSON: function toJSON() {
|
|
21
|
-
return {
|
|
22
|
-
// Standard
|
|
23
|
-
message: this.message,
|
|
24
|
-
name: this.name,
|
|
25
|
-
// Microsoft
|
|
26
|
-
description: this.description,
|
|
27
|
-
number: this.number,
|
|
28
|
-
// Mozilla
|
|
29
|
-
fileName: this.fileName,
|
|
30
|
-
lineNumber: this.lineNumber,
|
|
31
|
-
columnNumber: this.columnNumber,
|
|
32
|
-
stack: this.stack,
|
|
33
|
-
// Axios
|
|
34
|
-
config: utils.toJSONObject(this.config),
|
|
35
|
-
code: this.code,
|
|
36
|
-
status: this.status
|
|
37
|
-
};
|
|
14
|
+
encode(writer, value) {
|
|
15
|
+
return this.coder.encode(writer, value);
|
|
38
16
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"ERR_BAD_OPTION_VALUE",
|
|
44
|
-
"ERR_BAD_OPTION",
|
|
45
|
-
"ECONNABORTED",
|
|
46
|
-
"ETIMEDOUT",
|
|
47
|
-
"ERR_NETWORK",
|
|
48
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
49
|
-
"ERR_DEPRECATED",
|
|
50
|
-
"ERR_BAD_RESPONSE",
|
|
51
|
-
"ERR_BAD_REQUEST",
|
|
52
|
-
"ERR_CANCELED",
|
|
53
|
-
"ERR_NOT_SUPPORT",
|
|
54
|
-
"ERR_INVALID_URL"
|
|
55
|
-
// eslint-disable-next-line func-names
|
|
56
|
-
].forEach((code) => {
|
|
57
|
-
descriptors[code] = { value: code };
|
|
58
|
-
});
|
|
59
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
60
|
-
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
61
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
62
|
-
const axiosError = Object.create(prototype);
|
|
63
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
64
|
-
return obj !== Error.prototype;
|
|
65
|
-
}, (prop) => {
|
|
66
|
-
return prop !== "isAxiosError";
|
|
67
|
-
});
|
|
68
|
-
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
69
|
-
axiosError.cause = error;
|
|
70
|
-
axiosError.name = error.name;
|
|
71
|
-
customProps && Object.assign(axiosError, customProps);
|
|
72
|
-
return axiosError;
|
|
73
|
-
};
|
|
17
|
+
decode(reader) {
|
|
18
|
+
return this.coder.decode(reader);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
74
21
|
export {
|
|
75
|
-
|
|
22
|
+
AnonymousCoder
|
|
76
23
|
};
|
|
77
24
|
//# sourceMappingURL=standards-sdk.es84.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es84.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es84.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/anonymous.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map"],"names":[],"mappings":";;;;AAMO,MAAM,uBAAuB,MAAM;AAAA,EAEtC,YAAY,OAAO;AACf,UAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAFpD;AAGI,SAAK,QAAQ;AAAA,EACrB;AAAA,EACI,eAAe;AACX,WAAO,KAAK,MAAM,aAAc;AAAA,EACxC;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,WAAO,KAAK,MAAM,OAAO,QAAQ,KAAK;AAAA,EAC9C;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,KAAK,MAAM,OAAO,MAAM;AAAA,EACvC;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { __exports as mimeTypes } from "./standards-sdk.es86.js";
|
|
2
|
+
import { __require as requireMimeDb } from "./standards-sdk.es87.js";
|
|
3
|
+
import { __require as requirePathBrowserify } from "./standards-sdk.es88.js";
|
|
4
|
+
/*!
|
|
5
|
+
* mime-types
|
|
6
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
7
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
8
|
+
* MIT Licensed
|
|
9
|
+
*/
|
|
10
|
+
var hasRequiredMimeTypes;
|
|
11
|
+
function requireMimeTypes() {
|
|
12
|
+
if (hasRequiredMimeTypes) return mimeTypes;
|
|
13
|
+
hasRequiredMimeTypes = 1;
|
|
14
|
+
(function(exports) {
|
|
15
|
+
var db = requireMimeDb();
|
|
16
|
+
var extname = requirePathBrowserify().extname;
|
|
17
|
+
var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/;
|
|
18
|
+
var TEXT_TYPE_REGEXP = /^text\//i;
|
|
19
|
+
exports.charset = charset;
|
|
20
|
+
exports.charsets = { lookup: charset };
|
|
21
|
+
exports.contentType = contentType;
|
|
22
|
+
exports.extension = extension;
|
|
23
|
+
exports.extensions = /* @__PURE__ */ Object.create(null);
|
|
24
|
+
exports.lookup = lookup;
|
|
25
|
+
exports.types = /* @__PURE__ */ Object.create(null);
|
|
26
|
+
populateMaps(exports.extensions, exports.types);
|
|
27
|
+
function charset(type) {
|
|
28
|
+
if (!type || typeof type !== "string") {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
var match = EXTRACT_TYPE_REGEXP.exec(type);
|
|
32
|
+
var mime = match && db[match[1].toLowerCase()];
|
|
33
|
+
if (mime && mime.charset) {
|
|
34
|
+
return mime.charset;
|
|
35
|
+
}
|
|
36
|
+
if (match && TEXT_TYPE_REGEXP.test(match[1])) {
|
|
37
|
+
return "UTF-8";
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function contentType(str) {
|
|
42
|
+
if (!str || typeof str !== "string") {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
var mime = str.indexOf("/") === -1 ? exports.lookup(str) : str;
|
|
46
|
+
if (!mime) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
if (mime.indexOf("charset") === -1) {
|
|
50
|
+
var charset2 = exports.charset(mime);
|
|
51
|
+
if (charset2) mime += "; charset=" + charset2.toLowerCase();
|
|
52
|
+
}
|
|
53
|
+
return mime;
|
|
54
|
+
}
|
|
55
|
+
function extension(type) {
|
|
56
|
+
if (!type || typeof type !== "string") {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
var match = EXTRACT_TYPE_REGEXP.exec(type);
|
|
60
|
+
var exts = match && exports.extensions[match[1].toLowerCase()];
|
|
61
|
+
if (!exts || !exts.length) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return exts[0];
|
|
65
|
+
}
|
|
66
|
+
function lookup(path) {
|
|
67
|
+
if (!path || typeof path !== "string") {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
var extension2 = extname("x." + path).toLowerCase().substr(1);
|
|
71
|
+
if (!extension2) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return exports.types[extension2] || false;
|
|
75
|
+
}
|
|
76
|
+
function populateMaps(extensions, types) {
|
|
77
|
+
var preference = ["nginx", "apache", void 0, "iana"];
|
|
78
|
+
Object.keys(db).forEach(function forEachMimeType(type) {
|
|
79
|
+
var mime = db[type];
|
|
80
|
+
var exts = mime.extensions;
|
|
81
|
+
if (!exts || !exts.length) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
extensions[type] = exts;
|
|
85
|
+
for (var i = 0; i < exts.length; i++) {
|
|
86
|
+
var extension2 = exts[i];
|
|
87
|
+
if (types[extension2]) {
|
|
88
|
+
var from = preference.indexOf(db[types[extension2]].source);
|
|
89
|
+
var to = preference.indexOf(mime.source);
|
|
90
|
+
if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
types[extension2] = type;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
})(mimeTypes);
|
|
99
|
+
return mimeTypes;
|
|
5
100
|
}
|
|
6
101
|
export {
|
|
7
|
-
|
|
102
|
+
requireMimeTypes as __require
|
|
8
103
|
};
|
|
9
104
|
//# sourceMappingURL=standards-sdk.es85.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es85.js","sources":["../../node_modules/
|
|
1
|
+
{"version":3,"file":"standards-sdk.es85.js","sources":["../../node_modules/mime-types/index.js"],"sourcesContent":["/*!\n * mime-types\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar db = require('mime-db')\nvar extname = require('path').extname\n\n/**\n * Module variables.\n * @private\n */\n\nvar EXTRACT_TYPE_REGEXP = /^\\s*([^;\\s]*)(?:;|\\s|$)/\nvar TEXT_TYPE_REGEXP = /^text\\//i\n\n/**\n * Module exports.\n * @public\n */\n\nexports.charset = charset\nexports.charsets = { lookup: charset }\nexports.contentType = contentType\nexports.extension = extension\nexports.extensions = Object.create(null)\nexports.lookup = lookup\nexports.types = Object.create(null)\n\n// Populate the extensions/types maps\npopulateMaps(exports.extensions, exports.types)\n\n/**\n * Get the default charset for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction charset (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n var mime = match && db[match[1].toLowerCase()]\n\n if (mime && mime.charset) {\n return mime.charset\n }\n\n // default text/* to utf-8\n if (match && TEXT_TYPE_REGEXP.test(match[1])) {\n return 'UTF-8'\n }\n\n return false\n}\n\n/**\n * Create a full Content-Type header given a MIME type or extension.\n *\n * @param {string} str\n * @return {boolean|string}\n */\n\nfunction contentType (str) {\n // TODO: should this even be in this module?\n if (!str || typeof str !== 'string') {\n return false\n }\n\n var mime = str.indexOf('/') === -1\n ? exports.lookup(str)\n : str\n\n if (!mime) {\n return false\n }\n\n // TODO: use content-type or other module\n if (mime.indexOf('charset') === -1) {\n var charset = exports.charset(mime)\n if (charset) mime += '; charset=' + charset.toLowerCase()\n }\n\n return mime\n}\n\n/**\n * Get the default extension for a MIME type.\n *\n * @param {string} type\n * @return {boolean|string}\n */\n\nfunction extension (type) {\n if (!type || typeof type !== 'string') {\n return false\n }\n\n // TODO: use media-typer\n var match = EXTRACT_TYPE_REGEXP.exec(type)\n\n // get extensions\n var exts = match && exports.extensions[match[1].toLowerCase()]\n\n if (!exts || !exts.length) {\n return false\n }\n\n return exts[0]\n}\n\n/**\n * Lookup the MIME type for a file path/extension.\n *\n * @param {string} path\n * @return {boolean|string}\n */\n\nfunction lookup (path) {\n if (!path || typeof path !== 'string') {\n return false\n }\n\n // get the extension (\"ext\" or \".ext\" or full path)\n var extension = extname('x.' + path)\n .toLowerCase()\n .substr(1)\n\n if (!extension) {\n return false\n }\n\n return exports.types[extension] || false\n}\n\n/**\n * Populate the extensions and types maps.\n * @private\n */\n\nfunction populateMaps (extensions, types) {\n // source preference (least -> most)\n var preference = ['nginx', 'apache', undefined, 'iana']\n\n Object.keys(db).forEach(function forEachMimeType (type) {\n var mime = db[type]\n var exts = mime.extensions\n\n if (!exts || !exts.length) {\n return\n }\n\n // mime -> extensions\n extensions[type] = exts\n\n // extension -> mime\n for (var i = 0; i < exts.length; i++) {\n var extension = exts[i]\n\n if (types[extension]) {\n var from = preference.indexOf(db[types[extension]].source)\n var to = preference.indexOf(mime.source)\n\n if (types[extension] !== 'application/octet-stream' &&\n (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) {\n // skip the remapping\n continue\n }\n }\n\n // set the extension -> mime\n types[extension] = type\n }\n })\n}\n"],"names":["require$$0","require$$1","charset","extension"],"mappings":";;;;;;;;;;;;;;AAcA,QAAI,KAAKA,cAAA;AACT,QAAI,UAAUC,wBAAgB;AAO9B,QAAI,sBAAsB;AAC1B,QAAI,mBAAmB;AAOvB,YAAkB,UAAA;AAClB,YAAmB,WAAA,EAAE,QAAQ,QAAO;AACpC,YAAsB,cAAA;AACtB,YAAoB,YAAA;AACpB,YAAA,aAAqB,uBAAO,OAAO,IAAI;AACvC,YAAiB,SAAA;AACjB,YAAA,QAAgB,uBAAO,OAAO,IAAI;AAGlC,iBAAa,QAAQ,YAAY,QAAQ,KAAK;AAS9C,aAAS,QAAS,MAAM;AACtB,UAAI,CAAC,QAAQ,OAAO,SAAS,UAAU;AACrC,eAAO;AAAA,MACX;AAGE,UAAI,QAAQ,oBAAoB,KAAK,IAAI;AACzC,UAAI,OAAO,SAAS,GAAG,MAAM,CAAC,EAAE,YAAa,CAAA;AAE7C,UAAI,QAAQ,KAAK,SAAS;AACxB,eAAO,KAAK;AAAA,MAChB;AAGE,UAAI,SAAS,iBAAiB,KAAK,MAAM,CAAC,CAAC,GAAG;AAC5C,eAAO;AAAA,MACX;AAEE,aAAO;AAAA,IACT;AASA,aAAS,YAAa,KAAK;AAEzB,UAAI,CAAC,OAAO,OAAO,QAAQ,UAAU;AACnC,eAAO;AAAA,MACX;AAEE,UAAI,OAAO,IAAI,QAAQ,GAAG,MAAM,KAC5B,QAAQ,OAAO,GAAG,IAClB;AAEJ,UAAI,CAAC,MAAM;AACT,eAAO;AAAA,MACX;AAGE,UAAI,KAAK,QAAQ,SAAS,MAAM,IAAI;AAClC,YAAIC,WAAU,QAAQ,QAAQ,IAAI;AAClC,YAAIA,SAAS,SAAQ,eAAeA,SAAQ,YAAW;AAAA,MAC3D;AAEE,aAAO;AAAA,IACT;AASA,aAAS,UAAW,MAAM;AACxB,UAAI,CAAC,QAAQ,OAAO,SAAS,UAAU;AACrC,eAAO;AAAA,MACX;AAGE,UAAI,QAAQ,oBAAoB,KAAK,IAAI;AAGzC,UAAI,OAAO,SAAS,QAAQ,WAAW,MAAM,CAAC,EAAE,YAAa,CAAA;AAE7D,UAAI,CAAC,QAAQ,CAAC,KAAK,QAAQ;AACzB,eAAO;AAAA,MACX;AAEE,aAAO,KAAK,CAAC;AAAA,IACf;AASA,aAAS,OAAQ,MAAM;AACrB,UAAI,CAAC,QAAQ,OAAO,SAAS,UAAU;AACrC,eAAO;AAAA,MACX;AAGE,UAAIC,aAAY,QAAQ,OAAO,IAAI,EAChC,YAAW,EACX,OAAO,CAAC;AAEX,UAAI,CAACA,YAAW;AACd,eAAO;AAAA,MACX;AAEE,aAAO,QAAQ,MAAMA,UAAS,KAAK;AAAA,IACrC;AAOA,aAAS,aAAc,YAAY,OAAO;AAExC,UAAI,aAAa,CAAC,SAAS,UAAU,QAAW,MAAM;AAEtD,aAAO,KAAK,EAAE,EAAE,QAAQ,SAAS,gBAAiB,MAAM;AACtD,YAAI,OAAO,GAAG,IAAI;AAClB,YAAI,OAAO,KAAK;AAEhB,YAAI,CAAC,QAAQ,CAAC,KAAK,QAAQ;AACzB;AAAA,QACN;AAGI,mBAAW,IAAI,IAAI;AAGnB,iBAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,cAAIA,aAAY,KAAK,CAAC;AAEtB,cAAI,MAAMA,UAAS,GAAG;AACpB,gBAAI,OAAO,WAAW,QAAQ,GAAG,MAAMA,UAAS,CAAC,EAAE,MAAM;AACzD,gBAAI,KAAK,WAAW,QAAQ,KAAK,MAAM;AAEvC,gBAAI,MAAMA,UAAS,MAAM,+BACtB,OAAO,MAAO,SAAS,MAAM,MAAMA,UAAS,EAAE,OAAO,GAAG,EAAE,MAAM,iBAAkB;AAEnF;AAAA,YACV;AAAA,UACA;AAGM,gBAAMA,UAAS,IAAI;AAAA,QACzB;AAAA,MACG,CAAA;AAAA,IACH;AAAA;;;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function isAxiosError(payload) {
|
|
3
|
-
return utils.isObject(payload) && payload.isAxiosError === true;
|
|
4
|
-
}
|
|
1
|
+
var mimeTypes = {};
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
mimeTypes as __exports
|
|
7
4
|
};
|
|
8
5
|
//# sourceMappingURL=standards-sdk.es86.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standards-sdk.es86.js","sources":[
|
|
1
|
+
{"version":3,"file":"standards-sdk.es86.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|