@mtkruto/node 0.76.1 → 0.77.1
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/esm/0_deps.d.ts +1 -2
- package/esm/0_deps.d.ts.map +1 -1
- package/esm/0_deps.js +1 -2
- package/esm/0_errors.d.ts +6 -0
- package/esm/0_errors.d.ts.map +1 -1
- package/esm/0_errors.js +11 -0
- package/esm/1_utilities.d.ts +1 -2
- package/esm/1_utilities.d.ts.map +1 -1
- package/esm/1_utilities.js +1 -2
- package/esm/2_tl.d.ts +0 -1
- package/esm/2_tl.d.ts.map +1 -1
- package/esm/2_tl.js +0 -1
- package/esm/client/0_password.d.ts.map +1 -1
- package/esm/client/0_password.js +8 -8
- package/esm/client/0_storage_operations.d.ts.map +1 -1
- package/esm/client/0_storage_operations.js +2 -2
- package/esm/client/1_client_plain.js +14 -14
- package/{script/deps/jsr.io/@std/assert/1.0.12 → esm/deps/jsr.io/@std/assert/1.0.16}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.12 → 1.0.16}/not_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.12 → 1.0.16}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.d.ts.map +1 -1
- package/esm/session/2_session_encrypted.js +6 -5
- package/esm/session/2_session_plain.js +2 -2
- package/esm/tl/0_utilities.d.ts +1 -0
- package/esm/tl/0_utilities.d.ts.map +1 -1
- package/esm/tl/0_utilities.js +3 -0
- package/esm/tl/1_tl_reader.d.ts +6 -8
- package/esm/tl/1_tl_reader.d.ts.map +1 -1
- package/esm/tl/1_tl_reader.js +39 -30
- package/esm/tl/1_tl_writer.d.ts +5 -5
- package/esm/tl/1_tl_writer.d.ts.map +1 -1
- package/esm/tl/1_tl_writer.js +49 -35
- package/esm/transport/0_obfuscation.d.ts.map +1 -1
- package/esm/transport/0_obfuscation.js +2 -2
- package/esm/transport/1_transport_abridged.js +3 -3
- package/esm/transport/1_transport_intermediate.js +2 -2
- package/esm/types/0_link_preview_media_size.d.ts +19 -0
- package/esm/types/0_link_preview_media_size.d.ts.map +1 -1
- package/esm/types/0_link_preview_media_size.js +19 -0
- package/esm/types/7_saved_chat.d.ts.map +1 -1
- package/esm/types/7_saved_chat.js +1 -1
- package/esm/utilities/0_int.d.ts +52 -0
- package/esm/utilities/0_int.d.ts.map +1 -0
- package/esm/utilities/0_int.js +141 -0
- package/esm/utilities/0_int_test.d.ts.map +1 -0
- package/esm/utilities/1_auth.d.ts.map +1 -1
- package/esm/utilities/1_auth.js +3 -4
- package/esm/utilities/1_base64.js +1 -1
- package/esm/utilities/1_crypto.d.ts.map +1 -1
- package/esm/utilities/1_crypto.js +2 -3
- package/esm/utilities/1_math.js +1 -1
- package/package.json +1 -1
- package/script/0_deps.d.ts +1 -2
- package/script/0_deps.d.ts.map +1 -1
- package/script/0_deps.js +2 -4
- package/script/0_errors.d.ts +6 -0
- package/script/0_errors.d.ts.map +1 -1
- package/script/0_errors.js +13 -1
- package/script/1_utilities.d.ts +1 -2
- package/script/1_utilities.d.ts.map +1 -1
- package/script/1_utilities.js +1 -2
- package/script/2_tl.d.ts +0 -1
- package/script/2_tl.d.ts.map +1 -1
- package/script/2_tl.js +1 -3
- package/script/client/0_password.d.ts.map +1 -1
- package/script/client/0_password.js +7 -7
- package/script/client/0_storage_operations.d.ts.map +1 -1
- package/script/client/0_storage_operations.js +1 -1
- package/script/client/1_client_plain.js +13 -13
- package/{esm/deps/jsr.io/@std/assert/1.0.12 → script/deps/jsr.io/@std/assert/1.0.16}/is_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.12 → 1.0.16}/not_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.12 → 1.0.16}/throws.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.d.ts.map +1 -1
- package/script/session/2_session_encrypted.d.ts.map +1 -1
- package/script/session/2_session_encrypted.js +5 -4
- package/script/session/2_session_plain.js +1 -1
- package/script/tl/0_utilities.d.ts +1 -0
- package/script/tl/0_utilities.d.ts.map +1 -1
- package/script/tl/0_utilities.js +4 -0
- package/script/tl/1_tl_reader.d.ts +6 -8
- package/script/tl/1_tl_reader.d.ts.map +1 -1
- package/script/tl/1_tl_reader.js +38 -30
- package/script/tl/1_tl_writer.d.ts +5 -5
- package/script/tl/1_tl_writer.d.ts.map +1 -1
- package/script/tl/1_tl_writer.js +49 -35
- package/script/transport/0_obfuscation.d.ts.map +1 -1
- package/script/transport/0_obfuscation.js +1 -1
- package/script/transport/1_transport_abridged.js +2 -2
- package/script/transport/1_transport_intermediate.js +1 -1
- package/script/types/0_link_preview_media_size.d.ts +19 -0
- package/script/types/0_link_preview_media_size.d.ts.map +1 -1
- package/script/types/0_link_preview_media_size.js +19 -0
- package/script/types/7_saved_chat.d.ts.map +1 -1
- package/script/types/7_saved_chat.js +3 -3
- package/script/utilities/0_int.d.ts +52 -0
- package/script/utilities/0_int.d.ts.map +1 -0
- package/script/utilities/{0_bigint.js → 0_int.js} +66 -15
- package/script/utilities/0_int_test.d.ts.map +1 -0
- package/script/utilities/1_auth.d.ts.map +1 -1
- package/script/utilities/1_auth.js +4 -5
- package/script/utilities/1_base64.js +2 -2
- package/script/utilities/1_crypto.d.ts.map +1 -1
- package/script/utilities/1_crypto.js +2 -3
- package/script/utilities/1_math.js +4 -4
- package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/assertion_error.d.ts +0 -26
- package/esm/deps/jsr.io/@std/assert/1.0.13/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/assertion_error.js +0 -30
- package/esm/deps/jsr.io/@std/assert/1.0.13/unreachable.d.ts +0 -15
- package/esm/deps/jsr.io/@std/assert/1.0.13/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.13/unreachable.js +0 -20
- package/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts +0 -23
- package/esm/deps/jsr.io/@std/assert/1.0.16/instance_of.js +0 -52
- package/esm/tl/0_tl_error.d.ts +0 -23
- package/esm/tl/0_tl_error.d.ts.map +0 -1
- package/esm/tl/0_tl_error.js +0 -22
- package/esm/utilities/0_bigint.d.ts +0 -10
- package/esm/utilities/0_bigint.d.ts.map +0 -1
- package/esm/utilities/0_bigint.js +0 -91
- package/esm/utilities/0_bigint_test.d.ts.map +0 -1
- package/esm/utilities/0_buffer.d.ts +0 -21
- package/esm/utilities/0_buffer.d.ts.map +0 -1
- package/esm/utilities/0_buffer.js +0 -51
- package/esm/utilities/0_buffer_test.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/assertion_error.d.ts +0 -26
- package/script/deps/jsr.io/@std/assert/1.0.13/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/assertion_error.js +0 -34
- package/script/deps/jsr.io/@std/assert/1.0.13/unreachable.d.ts +0 -15
- package/script/deps/jsr.io/@std/assert/1.0.13/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.13/unreachable.js +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/instance_of.d.ts +0 -23
- package/script/deps/jsr.io/@std/assert/1.0.16/instance_of.js +0 -55
- package/script/tl/0_tl_error.d.ts +0 -23
- package/script/tl/0_tl_error.d.ts.map +0 -1
- package/script/tl/0_tl_error.js +0 -26
- package/script/utilities/0_bigint.d.ts +0 -10
- package/script/utilities/0_bigint.d.ts.map +0 -1
- package/script/utilities/0_bigint_test.d.ts.map +0 -1
- package/script/utilities/0_buffer.d.ts +0 -21
- package/script/utilities/0_buffer.d.ts.map +0 -1
- package/script/utilities/0_buffer.js +0 -54
- package/script/utilities/0_buffer_test.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.d.ts +0 -0
- /package/esm/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.js +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.d.ts +0 -0
- /package/script/deps/jsr.io/@std/streams/{1.0.12 → 1.0.14}/to_array_buffer.js +0 -0
package/esm/tl/1_tl_reader.js
CHANGED
|
@@ -18,59 +18,59 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
// deno-lint-ignore-file no-explicit-any
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
}
|
|
21
|
+
import { decodeText, intFromBytes } from "../1_utilities.js";
|
|
22
|
+
import { TLError } from "../0_errors.js";
|
|
23
|
+
import { analyzeOptionalParam, BOOL_FALSE, BOOL_TRUE, constructorIdToHex, getOptionalParamInnerType, getVectorItemType, isOptionalParam, VECTOR, X } from "./0_utilities.js";
|
|
25
24
|
export class TLReader {
|
|
26
25
|
_buffer;
|
|
26
|
+
#path = new Array();
|
|
27
27
|
constructor(_buffer) {
|
|
28
28
|
this._buffer = _buffer;
|
|
29
29
|
}
|
|
30
30
|
get buffer() {
|
|
31
31
|
return this._buffer;
|
|
32
32
|
}
|
|
33
|
-
read(
|
|
34
|
-
if (this._buffer.
|
|
35
|
-
throw new TLError("No data remaining");
|
|
33
|
+
read(byteCount) {
|
|
34
|
+
if (this._buffer.byteLength < byteCount) {
|
|
35
|
+
throw new TLError("No data remaining", this.#path);
|
|
36
36
|
}
|
|
37
|
-
const buffer = this._buffer.slice(0,
|
|
38
|
-
this._buffer = this._buffer.subarray(
|
|
37
|
+
const buffer = this._buffer.slice(0, byteCount);
|
|
38
|
+
this._buffer = this._buffer.subarray(byteCount);
|
|
39
39
|
return buffer;
|
|
40
40
|
}
|
|
41
41
|
unread(count) {
|
|
42
42
|
const newOffest = this._buffer.byteOffset - count;
|
|
43
43
|
if (newOffest < 0) {
|
|
44
|
-
throw new TLError("No data has been read");
|
|
44
|
+
throw new TLError("No data has been read", this.#path);
|
|
45
45
|
}
|
|
46
46
|
this._buffer = new Uint8Array(this._buffer.buffer, newOffest);
|
|
47
47
|
}
|
|
48
|
-
readInt24(
|
|
48
|
+
readInt24(isSigned = true) {
|
|
49
49
|
const buffer = this.read(24 / 8);
|
|
50
|
-
return Number(
|
|
50
|
+
return Number(intFromBytes(buffer, { isSigned }));
|
|
51
51
|
}
|
|
52
|
-
readInt32(
|
|
52
|
+
readInt32(isSigned = true) {
|
|
53
53
|
const buffer = this.read(32 / 8);
|
|
54
|
-
return Number(
|
|
54
|
+
return Number(intFromBytes(buffer, { isSigned }));
|
|
55
55
|
}
|
|
56
56
|
unreadInt32() {
|
|
57
57
|
this.unread(32 / 8);
|
|
58
58
|
}
|
|
59
|
-
readInt64(
|
|
59
|
+
readInt64(isSigned = true) {
|
|
60
60
|
const buffer = this.read(64 / 8);
|
|
61
|
-
return
|
|
61
|
+
return intFromBytes(buffer, { isSigned });
|
|
62
62
|
}
|
|
63
63
|
readDouble() {
|
|
64
64
|
const buffer = this.read(8);
|
|
65
65
|
return new DataView(buffer.buffer, buffer.byteOffset, buffer.byteLength).getFloat64(0, true);
|
|
66
66
|
}
|
|
67
|
-
readInt128(
|
|
67
|
+
readInt128(isSigned = true) {
|
|
68
68
|
const buffer = this.read(128 / 8);
|
|
69
|
-
return
|
|
69
|
+
return intFromBytes(buffer, { isSigned });
|
|
70
70
|
}
|
|
71
|
-
readInt256(
|
|
71
|
+
readInt256(isSigned = true) {
|
|
72
72
|
const buffer = this.read(256 / 8);
|
|
73
|
-
return
|
|
73
|
+
return intFromBytes(buffer, { isSigned });
|
|
74
74
|
}
|
|
75
75
|
readBytes() {
|
|
76
76
|
let L = this.read(1)[0];
|
|
@@ -104,7 +104,7 @@ export class TLReader {
|
|
|
104
104
|
if (name === X) {
|
|
105
105
|
const typeName = schema.identifierToName[id];
|
|
106
106
|
if (!typeName) {
|
|
107
|
-
throw new TLError(`Unknown constructor: ${id
|
|
107
|
+
throw new TLError(`Unknown constructor ID: ${constructorIdToHex(id)}`, this.#path);
|
|
108
108
|
}
|
|
109
109
|
this.unreadInt32();
|
|
110
110
|
return await this.readType(typeName, schema);
|
|
@@ -120,7 +120,7 @@ export class TLReader {
|
|
|
120
120
|
if (deserializedEnum !== undefined) {
|
|
121
121
|
return deserializedEnum;
|
|
122
122
|
}
|
|
123
|
-
throw new TLError(`Unknown type: ${name}
|
|
123
|
+
throw new TLError(`Unknown type: ${name}#${constructorIdToHex(id)}`, this.#path);
|
|
124
124
|
}
|
|
125
125
|
async #deserializeEnum(type, id, schema) {
|
|
126
126
|
const name = schema.identifierToName[id];
|
|
@@ -135,23 +135,32 @@ export class TLReader {
|
|
|
135
135
|
}
|
|
136
136
|
async #deserializeType(type, desc, id, schema) {
|
|
137
137
|
if (desc[0] !== id) {
|
|
138
|
-
throw new TLError(`Expected constructor ${desc[0]
|
|
138
|
+
throw new TLError(`Expected constructor with ID ${constructorIdToHex(desc[0])} but received ${constructorIdToHex(id)}`, this.#path);
|
|
139
139
|
}
|
|
140
|
+
let isFirstPathElementExisting = false;
|
|
140
141
|
const type_ = { _: type };
|
|
141
142
|
const flagFields = {};
|
|
142
|
-
for (const [name,
|
|
143
|
-
if (isOptionalParam(
|
|
144
|
-
const { flagField, bitIndex } = analyzeOptionalParam(
|
|
143
|
+
for (const [name, fieldType] of desc[1]) {
|
|
144
|
+
if (isOptionalParam(fieldType)) {
|
|
145
|
+
const { flagField, bitIndex } = analyzeOptionalParam(fieldType);
|
|
145
146
|
const bits = flagFields[flagField];
|
|
146
147
|
if ((bits & (1 << bitIndex)) === 0) {
|
|
147
148
|
continue;
|
|
148
149
|
}
|
|
149
150
|
}
|
|
150
|
-
if (
|
|
151
|
+
if (fieldType === "#") {
|
|
151
152
|
flagFields[name] = this.readInt32();
|
|
152
153
|
continue;
|
|
153
154
|
}
|
|
154
|
-
const
|
|
155
|
+
const pathElement = `[${type}.]${name}`;
|
|
156
|
+
if (isFirstPathElementExisting) {
|
|
157
|
+
this.#path[this.#path.length - 1] = pathElement;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
this.#path.push(pathElement);
|
|
161
|
+
isFirstPathElementExisting = true;
|
|
162
|
+
}
|
|
163
|
+
const value = await this.readType(fieldType, schema);
|
|
155
164
|
if (typeof value !== "boolean" || value) {
|
|
156
165
|
type_[name] = value;
|
|
157
166
|
}
|
|
@@ -161,7 +170,7 @@ export class TLReader {
|
|
|
161
170
|
async #deserializeVector(type, schema) {
|
|
162
171
|
const itemType = getVectorItemType(type);
|
|
163
172
|
if (!itemType) {
|
|
164
|
-
throw new TLError(`Expected Vector but received ${type}
|
|
173
|
+
throw new TLError(`Expected Vector but received ${type}`, this.#path);
|
|
165
174
|
}
|
|
166
175
|
const size = this.readInt32();
|
|
167
176
|
const array = new Array();
|
|
@@ -195,7 +204,7 @@ export class TLReader {
|
|
|
195
204
|
return false;
|
|
196
205
|
}
|
|
197
206
|
else {
|
|
198
|
-
throw new TLError(`Expected boolTrue or boolFalse but
|
|
207
|
+
throw new TLError(`Expected boolTrue or boolFalse but received ${constructorIdToHex(id)}`, this.#path);
|
|
199
208
|
}
|
|
200
209
|
}
|
|
201
210
|
case "string":
|
package/esm/tl/1_tl_writer.d.ts
CHANGED
|
@@ -24,12 +24,12 @@ export declare class TLWriter {
|
|
|
24
24
|
constructor();
|
|
25
25
|
get buffer(): Uint8Array<ArrayBuffer>;
|
|
26
26
|
write(buffer: Uint8Array): typeof this;
|
|
27
|
-
writeInt24(int: number,
|
|
28
|
-
writeInt32(int: number,
|
|
29
|
-
writeInt64(int: bigint,
|
|
27
|
+
writeInt24(int: number, isSigned?: boolean): typeof this;
|
|
28
|
+
writeInt32(int: number, isSigned?: boolean): typeof this;
|
|
29
|
+
writeInt64(int: bigint, isSigned?: boolean): typeof this;
|
|
30
30
|
writeDouble(double: number): typeof this;
|
|
31
|
-
writeInt128(int: bigint,
|
|
32
|
-
writeInt256(int: bigint,
|
|
31
|
+
writeInt128(int: bigint, isSigned?: boolean): typeof this;
|
|
32
|
+
writeInt256(int: bigint, isSigned?: boolean): typeof this;
|
|
33
33
|
writeBytes(bytes: Uint8Array): typeof this;
|
|
34
34
|
writeString(string: string): typeof this;
|
|
35
35
|
writeObject(value: any, schema: Schema): typeof this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_tl_writer.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,qBAAa,QAAQ;;IACnB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAoB;;
|
|
1
|
+
{"version":3,"file":"1_tl_writer.d.ts","sourceRoot":"","sources":["../../src/tl/1_tl_writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,qBAAa,QAAQ;;IACnB,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC,WAAW,CAAC,CAAoB;;IAM9D,IAAI,MAAM,IAAI,UAAU,CAAC,WAAW,CAAC,CAEpC;IAED,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,IAAI;IAKtC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,IAAI;IAKrD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,IAAI;IAKrD,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,IAAI;IAKrD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;IAOxC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,IAAI;IAKtD,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,UAAO,GAAG,OAAO,IAAI;IAKtD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,IAAI;IAkB1C,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;IAKxC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,IAAI;CAyLrD"}
|
package/esm/tl/1_tl_writer.js
CHANGED
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
*/
|
|
20
20
|
// deno-lint-ignore-file no-explicit-any
|
|
21
21
|
import { concat } from "../0_deps.js";
|
|
22
|
-
import { TLError } from "
|
|
22
|
+
import { TLError } from "../0_errors.js";
|
|
23
23
|
import { analyzeOptionalParam, BOOL_FALSE, BOOL_TRUE, getOptionalParamInnerType, getVectorItemType, isOptionalParam, repr, VECTOR } from "./0_utilities.js";
|
|
24
|
-
import {
|
|
24
|
+
import { intToBytes } from "../utilities/0_int.js";
|
|
25
25
|
import { encodeText } from "../1_utilities.js";
|
|
26
26
|
export class TLWriter {
|
|
27
27
|
_buffer = new Uint8Array();
|
|
28
|
+
#path = new Array();
|
|
28
29
|
constructor() {
|
|
29
30
|
}
|
|
30
31
|
get buffer() {
|
|
@@ -34,16 +35,16 @@ export class TLWriter {
|
|
|
34
35
|
this._buffer = concat([this._buffer, buffer]);
|
|
35
36
|
return this;
|
|
36
37
|
}
|
|
37
|
-
writeInt24(int,
|
|
38
|
-
this.write(
|
|
38
|
+
writeInt24(int, isSigned = true) {
|
|
39
|
+
this.write(intToBytes(int, 24 / 8, { isSigned, path: this.#path }));
|
|
39
40
|
return this;
|
|
40
41
|
}
|
|
41
|
-
writeInt32(int,
|
|
42
|
-
this.write(
|
|
42
|
+
writeInt32(int, isSigned = true) {
|
|
43
|
+
this.write(intToBytes(int, 32 / 8, { isSigned, path: this.#path }));
|
|
43
44
|
return this;
|
|
44
45
|
}
|
|
45
|
-
writeInt64(int,
|
|
46
|
-
this.write(
|
|
46
|
+
writeInt64(int, isSigned = true) {
|
|
47
|
+
this.write(intToBytes(int, 64 / 8, { isSigned, path: this.#path }));
|
|
47
48
|
return this;
|
|
48
49
|
}
|
|
49
50
|
writeDouble(double) {
|
|
@@ -52,12 +53,12 @@ export class TLWriter {
|
|
|
52
53
|
this.write(buffer);
|
|
53
54
|
return this;
|
|
54
55
|
}
|
|
55
|
-
writeInt128(int,
|
|
56
|
-
this.write(
|
|
56
|
+
writeInt128(int, isSigned = true) {
|
|
57
|
+
this.write(intToBytes(int, 128 / 8, { isSigned, path: this.#path }));
|
|
57
58
|
return this;
|
|
58
59
|
}
|
|
59
|
-
writeInt256(int,
|
|
60
|
-
this.write(
|
|
60
|
+
writeInt256(int, isSigned = true) {
|
|
61
|
+
this.write(intToBytes(int, 256 / 8, { isSigned, path: this.#path }));
|
|
61
62
|
return this;
|
|
62
63
|
}
|
|
63
64
|
writeBytes(bytes) {
|
|
@@ -83,31 +84,31 @@ export class TLWriter {
|
|
|
83
84
|
return this;
|
|
84
85
|
}
|
|
85
86
|
writeObject(value, schema) {
|
|
86
|
-
this.#serialize(value._, value,
|
|
87
|
+
this.#serialize(value._, value, schema);
|
|
87
88
|
return this;
|
|
88
89
|
}
|
|
89
|
-
#serialize(type, value,
|
|
90
|
-
if (this.#serializePrimitive(type, value
|
|
90
|
+
#serialize(type, value, schema) {
|
|
91
|
+
if (this.#serializePrimitive(type, value)) {
|
|
91
92
|
return;
|
|
92
93
|
}
|
|
93
|
-
if (this.#serializeVector(type, value,
|
|
94
|
+
if (this.#serializeVector(type, value, schema)) {
|
|
94
95
|
return;
|
|
95
96
|
}
|
|
96
97
|
const maybeDefinition = schema.definitions[value._];
|
|
97
98
|
if (!maybeDefinition) {
|
|
98
|
-
throw new TLError(`Unknown
|
|
99
|
+
throw new TLError(`Unknown constructor: ${value._}`, this.#path);
|
|
99
100
|
}
|
|
100
101
|
if (type !== "!X" && !this.#isTypeValid(type, value, schema)) {
|
|
101
|
-
throw new TLError(`Expected ${type} but got ${value._}
|
|
102
|
+
throw new TLError(`Expected ${type} but instead got ${value._}`, this.#path);
|
|
102
103
|
}
|
|
103
104
|
const type__ = value;
|
|
104
105
|
const [id, parameters_] = maybeDefinition;
|
|
105
106
|
this.writeInt32(id, false);
|
|
106
|
-
|
|
107
|
+
let isFirstPathElementExisting = false;
|
|
108
|
+
for (let [name, type] of parameters_.values()) {
|
|
107
109
|
if (isOptionalParam(type) && type__[name] === undefined) {
|
|
108
110
|
continue;
|
|
109
111
|
}
|
|
110
|
-
const debugInfo = ` [0x${id.toString(16).toUpperCase()}::${i}]`;
|
|
111
112
|
if (type === "#") {
|
|
112
113
|
let flags = 0;
|
|
113
114
|
const flagField_ = name;
|
|
@@ -124,32 +125,40 @@ export class TLWriter {
|
|
|
124
125
|
this.writeInt32(flags);
|
|
125
126
|
continue;
|
|
126
127
|
}
|
|
128
|
+
const pathElement = `[${value._}.]${name}`;
|
|
129
|
+
if (isFirstPathElementExisting) {
|
|
130
|
+
this.#path[this.#path.length - 1] = pathElement;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.#path.push(pathElement);
|
|
134
|
+
isFirstPathElementExisting = true;
|
|
135
|
+
}
|
|
127
136
|
if (type__[name] === undefined && !isOptionalParam(type)) {
|
|
128
|
-
throw new
|
|
137
|
+
throw new TLError("Missing required field", this.#path);
|
|
129
138
|
}
|
|
130
139
|
if (isOptionalParam(type)) {
|
|
131
140
|
type = getOptionalParamInnerType(type);
|
|
132
141
|
}
|
|
133
|
-
this.#serialize(type, type__[name],
|
|
142
|
+
this.#serialize(type, type__[name], schema);
|
|
134
143
|
}
|
|
135
144
|
return;
|
|
136
145
|
}
|
|
137
|
-
#serializeVector(type, value,
|
|
146
|
+
#serializeVector(type, value, schema) {
|
|
138
147
|
const itemType = getVectorItemType(type);
|
|
139
148
|
if (!itemType) {
|
|
140
149
|
return false;
|
|
141
150
|
}
|
|
142
151
|
if (!Array.isArray(value)) {
|
|
143
|
-
throw new
|
|
152
|
+
throw new TLError(`Expected an array but received ${repr(value)}`, this.#path);
|
|
144
153
|
}
|
|
145
154
|
this.writeInt32(VECTOR, false);
|
|
146
155
|
this.writeInt32(value.length);
|
|
147
156
|
for (const item of value) {
|
|
148
|
-
this.#serialize(itemType, item,
|
|
157
|
+
this.#serialize(itemType, item, schema);
|
|
149
158
|
}
|
|
150
159
|
return true;
|
|
151
160
|
}
|
|
152
|
-
#serializePrimitive(type, value
|
|
161
|
+
#serializePrimitive(type, value) {
|
|
153
162
|
const valueRepr = repr(value);
|
|
154
163
|
switch (type) {
|
|
155
164
|
case "bytes":
|
|
@@ -157,7 +166,7 @@ export class TLWriter {
|
|
|
157
166
|
this.writeBytes(value);
|
|
158
167
|
}
|
|
159
168
|
else {
|
|
160
|
-
throw new TLError(`Expected Uint8Array but received ${valueRepr}
|
|
169
|
+
throw new TLError(`Expected Uint8Array but received ${valueRepr}`, this.#path);
|
|
161
170
|
}
|
|
162
171
|
return true;
|
|
163
172
|
case "int128":
|
|
@@ -165,7 +174,7 @@ export class TLWriter {
|
|
|
165
174
|
this.writeInt128(value);
|
|
166
175
|
}
|
|
167
176
|
else {
|
|
168
|
-
throw new TLError(`Expected bigint but received ${valueRepr}
|
|
177
|
+
throw new TLError(`Expected bigint but received ${valueRepr}`, this.#path);
|
|
169
178
|
}
|
|
170
179
|
return true;
|
|
171
180
|
case "int256":
|
|
@@ -173,7 +182,7 @@ export class TLWriter {
|
|
|
173
182
|
this.writeInt256(value);
|
|
174
183
|
}
|
|
175
184
|
else {
|
|
176
|
-
throw new TLError(`Expected bigint but received ${valueRepr}
|
|
185
|
+
throw new TLError(`Expected bigint but received ${valueRepr}`, this.#path);
|
|
177
186
|
}
|
|
178
187
|
return true;
|
|
179
188
|
case "long":
|
|
@@ -181,7 +190,7 @@ export class TLWriter {
|
|
|
181
190
|
this.writeInt64(value);
|
|
182
191
|
}
|
|
183
192
|
else {
|
|
184
|
-
throw new TLError(`Expected bigint but received ${valueRepr}
|
|
193
|
+
throw new TLError(`Expected bigint but received ${valueRepr}`, this.#path);
|
|
185
194
|
}
|
|
186
195
|
return true;
|
|
187
196
|
case "Bool":
|
|
@@ -194,7 +203,7 @@ export class TLWriter {
|
|
|
194
203
|
}
|
|
195
204
|
}
|
|
196
205
|
else {
|
|
197
|
-
throw new TLError(`Expected boolean but received ${valueRepr}
|
|
206
|
+
throw new TLError(`Expected boolean but received ${valueRepr}`, this.#path);
|
|
198
207
|
}
|
|
199
208
|
return true;
|
|
200
209
|
case "int":
|
|
@@ -204,10 +213,15 @@ export class TLWriter {
|
|
|
204
213
|
}
|
|
205
214
|
//
|
|
206
215
|
if (typeof value === "number") {
|
|
207
|
-
|
|
216
|
+
if (value % 1 === 0) {
|
|
217
|
+
this.writeInt32(value);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
throw new TLError("Expected an integer value but received a floating point", this.#path);
|
|
221
|
+
}
|
|
208
222
|
}
|
|
209
223
|
else {
|
|
210
|
-
throw new TLError(`Expected number but received ${valueRepr}
|
|
224
|
+
throw new TLError(`Expected number but received ${valueRepr}`, this.#path);
|
|
211
225
|
}
|
|
212
226
|
return true;
|
|
213
227
|
case "double":
|
|
@@ -220,7 +234,7 @@ export class TLWriter {
|
|
|
220
234
|
this.writeDouble(value);
|
|
221
235
|
}
|
|
222
236
|
else {
|
|
223
|
-
throw new TLError(`Expected number but received ${valueRepr}
|
|
237
|
+
throw new TLError(`Expected number but received ${valueRepr}`, this.#path);
|
|
224
238
|
}
|
|
225
239
|
return true;
|
|
226
240
|
case "string":
|
|
@@ -239,7 +253,7 @@ export class TLWriter {
|
|
|
239
253
|
return true;
|
|
240
254
|
case "true":
|
|
241
255
|
if (value !== true) {
|
|
242
|
-
throw new TLError(`Expected true but received ${valueRepr}
|
|
256
|
+
throw new TLError(`Expected \`true\` but received ${valueRepr}`, this.#path);
|
|
243
257
|
}
|
|
244
258
|
return true;
|
|
245
259
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_obfuscation.d.ts","sourceRoot":"","sources":["../../src/transport/0_obfuscation.ts"],"names":[],"mappings":"AAuBA,OAAO,
|
|
1
|
+
{"version":3,"file":"0_obfuscation.d.ts","sourceRoot":"","sources":["../../src/transport/0_obfuscation.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,GAAG,EAAc,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;;;GA0CtF"}
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import * as dntShim from "../_dnt.shims.js";
|
|
21
21
|
import { concat } from "../0_deps.js";
|
|
22
|
-
import {
|
|
22
|
+
import { CTR, intToBytes } from "../1_utilities.js";
|
|
23
23
|
export async function getObfuscationParameters(protocol, connection) {
|
|
24
24
|
let init;
|
|
25
25
|
while (true) {
|
|
26
|
-
init = concat([dntShim.crypto.getRandomValues(new Uint8Array(56)),
|
|
26
|
+
init = concat([dntShim.crypto.getRandomValues(new Uint8Array(56)), intToBytes(protocol, 4, { byteOrder: "big", isSigned: false }), dntShim.crypto.getRandomValues(new Uint8Array(4))]);
|
|
27
27
|
if (init[0] === 0xEF) {
|
|
28
28
|
continue;
|
|
29
29
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { concat } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { intFromBytes, intToBytes } from "../1_utilities.js";
|
|
22
22
|
import { getObfuscationParameters } from "./0_obfuscation.js";
|
|
23
23
|
import { Transport } from "./0_transport.js";
|
|
24
24
|
export class TransportAbridged extends Transport {
|
|
@@ -50,7 +50,7 @@ export class TransportAbridged extends Transport {
|
|
|
50
50
|
let buffer = new Uint8Array(3);
|
|
51
51
|
await this.#connection.read(buffer);
|
|
52
52
|
buffer = await this.decrypt(buffer);
|
|
53
|
-
length = Number(
|
|
53
|
+
length = Number(intFromBytes(buffer, { isSigned: false }));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
length *= 4;
|
|
@@ -61,7 +61,7 @@ export class TransportAbridged extends Transport {
|
|
|
61
61
|
async send(buffer) {
|
|
62
62
|
const bufferLength = buffer.length / 4;
|
|
63
63
|
const header = new Uint8Array([bufferLength >= 0x7F ? 0x7F : bufferLength]);
|
|
64
|
-
const length = bufferLength >= 0x7F ?
|
|
64
|
+
const length = bufferLength >= 0x7F ? intToBytes(bufferLength, 3, { isSigned: false }) : new Uint8Array();
|
|
65
65
|
const data = concat([header, length, buffer]);
|
|
66
66
|
await this.#connection.write(await this.encrypt(data));
|
|
67
67
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import { concat } from "../0_deps.js";
|
|
21
|
-
import {
|
|
21
|
+
import { intToBytes } from "../1_utilities.js";
|
|
22
22
|
import { getObfuscationParameters } from "./0_obfuscation.js";
|
|
23
23
|
import { Transport } from "./0_transport.js";
|
|
24
24
|
export class TransportIntermediate extends Transport {
|
|
@@ -51,7 +51,7 @@ export class TransportIntermediate extends Transport {
|
|
|
51
51
|
return await this.decrypt(buffer);
|
|
52
52
|
}
|
|
53
53
|
async send(buffer) {
|
|
54
|
-
const length =
|
|
54
|
+
const length = intToBytes(buffer.length, 4);
|
|
55
55
|
const data = concat([length, buffer]);
|
|
56
56
|
await this.#connection.write(await this.encrypt(data));
|
|
57
57
|
}
|
|
@@ -1,2 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
1
20
|
export type LinkPreviewMediaSize = "small" | "large";
|
|
2
21
|
//# sourceMappingURL=0_link_preview_media_size.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_link_preview_media_size.d.ts","sourceRoot":"","sources":["../../src/types/0_link_preview_media_size.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"0_link_preview_media_size.d.ts","sourceRoot":"","sources":["../../src/types/0_link_preview_media_size.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2025 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
1
20
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpF,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,gBAAgB;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,GAAG,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkB7O"}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
* You should have received a copy of the GNU Lesser General Public License
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
|
+
import { unreachable } from "../0_deps.js";
|
|
20
21
|
import { peerToChatId } from "../tl/2_telegram.js";
|
|
21
22
|
import { constructChatP } from "./1_chat_p.js";
|
|
22
23
|
import { constructMessage } from "./6_message.js";
|
|
23
|
-
import { unreachable } from "../deps/jsr.io/@std/assert/1.0.13/unreachable.js";
|
|
24
24
|
export async function constructSavedChat(dialog, result, getPeer, getMessage, getStickerSetName) {
|
|
25
25
|
const message = result.messages.find((v) => v.id === dialog.top_message);
|
|
26
26
|
if (message === undefined) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type ByteOrder = "little" | "big";
|
|
2
|
+
export declare function modExp(a: bigint, b: bigint, n: bigint): bigint;
|
|
3
|
+
export declare function mod(n: bigint, m: bigint): bigint;
|
|
4
|
+
export declare function mod(n: number, m: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* Additional parameters for { @link intFromBytes }.
|
|
7
|
+
*/
|
|
8
|
+
export interface IntFromBytesParams {
|
|
9
|
+
/** The byte order of the representation. Defaults to `little`. */
|
|
10
|
+
byteOrder?: ByteOrder;
|
|
11
|
+
/** Whether the integer is a signed one. Defaults to `true`. */
|
|
12
|
+
isSigned?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Creates an integer from its byte representation.
|
|
16
|
+
*
|
|
17
|
+
* @param bytes The byte representation of the integer.
|
|
18
|
+
* @param params Additional parameters.
|
|
19
|
+
*/
|
|
20
|
+
export declare function intFromBytes(bytes: Uint8Array, { byteOrder, isSigned }?: IntFromBytesParams): bigint;
|
|
21
|
+
/**
|
|
22
|
+
* Generates a random integer of an arbitrary size.
|
|
23
|
+
*
|
|
24
|
+
* @param isSigned Whether to allow signed integers. Defaults to `true`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getRandomInt(byteLength: number, isSigned?: boolean): bigint;
|
|
27
|
+
/**
|
|
28
|
+
* Generates a random ID. Useful when interacting with the Telegram API.
|
|
29
|
+
*
|
|
30
|
+
* @param isNumber Whether the ID should be of the type number instead of a bigint.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getRandomId(isNumber: true): number;
|
|
33
|
+
export declare function getRandomId(): bigint;
|
|
34
|
+
export declare function gcd(a: bigint, b: bigint): bigint;
|
|
35
|
+
/** Additional parameters for { @link intToBuffer }. */
|
|
36
|
+
export interface BufferFromBigintParams {
|
|
37
|
+
/** The byte order to use for the representation. Defaults to `little`. */
|
|
38
|
+
byteOrder?: ByteOrder;
|
|
39
|
+
/** Whether the integer is a signed one. Defaults to `true`. */
|
|
40
|
+
isSigned?: boolean;
|
|
41
|
+
/** The path to the integer in the TL schema. Unspecified by default. */
|
|
42
|
+
path?: string[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Converts an integer to its byte representation.
|
|
46
|
+
*
|
|
47
|
+
* @param int The integer to convert.
|
|
48
|
+
* @param byteCount The expected size of the integer in bytes.
|
|
49
|
+
* @param params Additional parameters.
|
|
50
|
+
*/
|
|
51
|
+
export declare function intToBytes(int: bigint | number, byteCount: number, { byteOrder, isSigned, path, }?: BufferFromBigintParams): Uint8Array<ArrayBuffer>;
|
|
52
|
+
//# sourceMappingURL=0_int.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"0_int.d.ts","sourceRoot":"","sources":["../../src/utilities/0_int.ts"],"names":[],"mappings":"AAwBA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEzC,wBAAgB,MAAM,CACpB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,UAgBV;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAClD,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAOlD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,SAAoB,EAAE,QAAe,EAAE,GAAE,kBAAuB,UAcjH;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,UAAO,UAI/D;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAC;AACpD,wBAAgB,WAAW,IAAI,MAAM,CAAC;AAStC,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAwBvC;AAID,uDAAuD;AACvD,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,EAClE,SAAoB,EACpB,QAAe,EACf,IAAS,GACV,GAAE,sBAA2B,GAAG,UAAU,CAAC,WAAW,CAAC,CAoCvD"}
|