@infinitetoken/lumber-kit 0.1.2 → 0.2.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/dist/cjs/constants/index.d.ts +1 -1
- package/dist/cjs/constants/index.d.ts.map +1 -1
- package/dist/cjs/constants/index.js +1 -1
- package/dist/cjs/types/index.d.ts +89 -41
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/esm/constants/index.d.ts +1 -1
- package/dist/esm/constants/index.d.ts.map +1 -1
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/types/index.d.ts +89 -41
- package/dist/esm/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare const enum LogLevel {
|
|
|
6
6
|
Error = 3,
|
|
7
7
|
Fatal = 4
|
|
8
8
|
}
|
|
9
|
-
/** User subscription tier. Mirrors User.
|
|
9
|
+
/** User subscription tier. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
10
10
|
export declare const enum SubscriptionLevel {
|
|
11
11
|
Hobby = 0,
|
|
12
12
|
Dev = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,0BAAkB,QAAQ;IACxB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,0BAAkB,QAAQ;IACxB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,4EAA4E;AAC5E,0BAAkB,iBAAiB;IACjC,KAAK,IAAI;IACT,GAAG,IAAI;IACP,GAAG,IAAI;CACR"}
|
|
@@ -11,7 +11,7 @@ var LogLevel;
|
|
|
11
11
|
LogLevel[LogLevel["Error"] = 3] = "Error";
|
|
12
12
|
LogLevel[LogLevel["Fatal"] = 4] = "Fatal";
|
|
13
13
|
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
14
|
-
/** User subscription tier. Mirrors User.
|
|
14
|
+
/** User subscription tier. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
15
15
|
var SubscriptionLevel;
|
|
16
16
|
(function (SubscriptionLevel) {
|
|
17
17
|
SubscriptionLevel[SubscriptionLevel["Hobby"] = 0] = "Hobby";
|
|
@@ -1,92 +1,140 @@
|
|
|
1
1
|
import { LogLevel, SubscriptionLevel } from '../constants';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Lumber-Node and Lumber-Python serialize this object, then encrypt it
|
|
5
|
-
* into EncryptedPayload.payload using AES-256-GCM.
|
|
3
|
+
* Structured log context content.
|
|
6
4
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
|
|
5
|
+
export interface LogContext {
|
|
6
|
+
requestId?: string;
|
|
7
|
+
traceId?: string;
|
|
9
8
|
code?: string;
|
|
9
|
+
method?: string;
|
|
10
10
|
line?: number;
|
|
11
11
|
column?: number;
|
|
12
|
-
method?: string;
|
|
13
12
|
note?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Encrypted
|
|
17
|
-
* payload = base64(
|
|
18
|
-
*
|
|
16
|
+
* Encrypted private container.
|
|
17
|
+
* payload = base64(ciphertext)
|
|
18
|
+
* nonce = base64(random nonce/iv)
|
|
19
|
+
* keyVersion enables future rotation support.
|
|
19
20
|
*/
|
|
20
|
-
export interface
|
|
21
|
+
export interface LogPrivate {
|
|
21
22
|
payload: string;
|
|
22
|
-
|
|
23
|
+
nonce: string;
|
|
24
|
+
keyVersion: number;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* API response shape for a stored log.
|
|
26
|
-
* payload is the ciphertext — level and flagged are stored unencrypted for server-side filtering.
|
|
27
|
-
* Source: D-06, ENCRYPT-05, ENCRYPT-06
|
|
28
28
|
*/
|
|
29
29
|
export interface LogRecord {
|
|
30
30
|
id: string;
|
|
31
|
-
|
|
31
|
+
appId: string;
|
|
32
|
+
requestId?: string;
|
|
33
|
+
traceId?: string;
|
|
32
34
|
level: LogLevel;
|
|
35
|
+
message: string;
|
|
33
36
|
flagged: boolean;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
context?: LogContext;
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
private?: LogPrivate;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Wrapped application encryption key for a specific user.
|
|
45
|
+
*/
|
|
46
|
+
export interface AppEncryptedKey {
|
|
47
|
+
userId: string;
|
|
48
|
+
encryptedKey: string;
|
|
49
|
+
keyVersion: number;
|
|
37
50
|
}
|
|
38
51
|
/**
|
|
39
52
|
* API response shape for a listed or fetched app.
|
|
40
|
-
* public_key doubles as both the app identifier and the encryption recipient key.
|
|
41
|
-
* private_key is intentionally absent — returned once in AppCreatedRecord and never again.
|
|
42
|
-
* Source: D-06, ENCRYPT-02, ENCRYPT-03
|
|
43
53
|
*/
|
|
44
54
|
export interface AppRecord {
|
|
45
55
|
id: string;
|
|
46
|
-
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
47
58
|
name: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
encryptedKeys?: AppEncryptedKey[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* App creation response.
|
|
63
|
+
* Initial wrapped encryption key may optionally be returned.
|
|
64
|
+
*/
|
|
65
|
+
export interface AppCreatedRecord extends AppRecord {
|
|
66
|
+
apiKey?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Machine authentication credential.
|
|
70
|
+
*/
|
|
71
|
+
export interface ApiKeyRecord {
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
appId: string;
|
|
76
|
+
name?: string;
|
|
51
77
|
}
|
|
52
78
|
/**
|
|
53
|
-
* App
|
|
54
|
-
* Same shape as AppRecord — no secrets returned, key pair is generated on-device.
|
|
55
|
-
* Source: D-06, ENCRYPT-02
|
|
79
|
+
* App membership / authorization.
|
|
56
80
|
*/
|
|
57
|
-
export
|
|
81
|
+
export interface AppMembershipRecord {
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
appId: string;
|
|
86
|
+
userId: string;
|
|
87
|
+
role: 'owner' | 'admin' | 'read' | 'write';
|
|
88
|
+
}
|
|
89
|
+
export interface FcmToken {
|
|
90
|
+
token: string;
|
|
91
|
+
deviceId?: string;
|
|
92
|
+
platform?: 'ios' | 'android' | 'web';
|
|
93
|
+
}
|
|
94
|
+
export interface NotificationPreference {
|
|
95
|
+
enabled?: boolean;
|
|
96
|
+
minimumLevel?: number;
|
|
97
|
+
}
|
|
98
|
+
export interface NotificationPreferences {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
minimumLevel?: number;
|
|
101
|
+
perApp?: Record<string, NotificationPreference>;
|
|
102
|
+
}
|
|
58
103
|
/**
|
|
59
|
-
*
|
|
60
|
-
* password_digest is intentionally absent.
|
|
104
|
+
* Public user profile returned from API.
|
|
61
105
|
*/
|
|
62
106
|
export interface UserRecord {
|
|
63
107
|
id: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
updatedAt: string;
|
|
64
110
|
email: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
111
|
+
publicKey?: string;
|
|
112
|
+
subscriptionLevel: SubscriptionLevel;
|
|
113
|
+
agreedToTerms: boolean;
|
|
114
|
+
notificationPreferences: NotificationPreferences;
|
|
115
|
+
fcmTokens: FcmToken[];
|
|
69
116
|
}
|
|
70
117
|
/**
|
|
71
118
|
* Filter params for GET /logs.
|
|
72
|
-
* Source: D-06
|
|
73
119
|
*/
|
|
74
|
-
export interface
|
|
75
|
-
|
|
120
|
+
export interface LogsQuery {
|
|
121
|
+
appIds?: string[];
|
|
122
|
+
levels?: LogLevel[];
|
|
76
123
|
flagged?: boolean;
|
|
77
124
|
limit?: number;
|
|
78
|
-
|
|
125
|
+
cursor?: string;
|
|
79
126
|
sort?: string;
|
|
80
127
|
from?: string;
|
|
81
128
|
to?: string;
|
|
82
129
|
}
|
|
83
130
|
/**
|
|
84
131
|
* Filter params for GET /apps.
|
|
85
|
-
* Source: D-06
|
|
86
132
|
*/
|
|
87
|
-
export interface
|
|
133
|
+
export interface AppsQuery {
|
|
88
134
|
limit?: number;
|
|
89
|
-
|
|
135
|
+
cursor?: string;
|
|
90
136
|
sort?: string;
|
|
137
|
+
from?: string;
|
|
138
|
+
to?: string;
|
|
91
139
|
}
|
|
92
140
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE1D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,IAAI,CAAC,EA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OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -6,7 +6,7 @@ export declare const enum LogLevel {
|
|
|
6
6
|
Error = 3,
|
|
7
7
|
Fatal = 4
|
|
8
8
|
}
|
|
9
|
-
/** User subscription tier. Mirrors User.
|
|
9
|
+
/** User subscription tier. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
10
10
|
export declare const enum SubscriptionLevel {
|
|
11
11
|
Hobby = 0,
|
|
12
12
|
Dev = 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,0BAAkB,QAAQ;IACxB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,0BAAkB,QAAQ;IACxB,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;IACT,KAAK,IAAI;CACV;AAED,4EAA4E;AAC5E,0BAAkB,iBAAiB;IACjC,KAAK,IAAI;IACT,GAAG,IAAI;IACP,GAAG,IAAI;CACR"}
|
|
@@ -8,7 +8,7 @@ export var LogLevel;
|
|
|
8
8
|
LogLevel[LogLevel["Error"] = 3] = "Error";
|
|
9
9
|
LogLevel[LogLevel["Fatal"] = 4] = "Fatal";
|
|
10
10
|
})(LogLevel || (LogLevel = {}));
|
|
11
|
-
/** User subscription tier. Mirrors User.
|
|
11
|
+
/** User subscription tier. Mirrors User.subscriptionLevel in Lumber-API. */
|
|
12
12
|
export var SubscriptionLevel;
|
|
13
13
|
(function (SubscriptionLevel) {
|
|
14
14
|
SubscriptionLevel[SubscriptionLevel["Hobby"] = 0] = "Hobby";
|
|
@@ -1,92 +1,140 @@
|
|
|
1
1
|
import { LogLevel, SubscriptionLevel } from '../constants';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* Lumber-Node and Lumber-Python serialize this object, then encrypt it
|
|
5
|
-
* into EncryptedPayload.payload using AES-256-GCM.
|
|
3
|
+
* Structured log context content.
|
|
6
4
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
|
|
5
|
+
export interface LogContext {
|
|
6
|
+
requestId?: string;
|
|
7
|
+
traceId?: string;
|
|
9
8
|
code?: string;
|
|
9
|
+
method?: string;
|
|
10
10
|
line?: number;
|
|
11
11
|
column?: number;
|
|
12
|
-
method?: string;
|
|
13
12
|
note?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* Encrypted
|
|
17
|
-
* payload = base64(
|
|
18
|
-
*
|
|
16
|
+
* Encrypted private container.
|
|
17
|
+
* payload = base64(ciphertext)
|
|
18
|
+
* nonce = base64(random nonce/iv)
|
|
19
|
+
* keyVersion enables future rotation support.
|
|
19
20
|
*/
|
|
20
|
-
export interface
|
|
21
|
+
export interface LogPrivate {
|
|
21
22
|
payload: string;
|
|
22
|
-
|
|
23
|
+
nonce: string;
|
|
24
|
+
keyVersion: number;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* API response shape for a stored log.
|
|
26
|
-
* payload is the ciphertext — level and flagged are stored unencrypted for server-side filtering.
|
|
27
|
-
* Source: D-06, ENCRYPT-05, ENCRYPT-06
|
|
28
28
|
*/
|
|
29
29
|
export interface LogRecord {
|
|
30
30
|
id: string;
|
|
31
|
-
|
|
31
|
+
appId: string;
|
|
32
|
+
requestId?: string;
|
|
33
|
+
traceId?: string;
|
|
32
34
|
level: LogLevel;
|
|
35
|
+
message: string;
|
|
33
36
|
flagged: boolean;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
context?: LogContext;
|
|
38
|
+
metadata?: Record<string, unknown>;
|
|
39
|
+
private?: LogPrivate;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Wrapped application encryption key for a specific user.
|
|
45
|
+
*/
|
|
46
|
+
export interface AppEncryptedKey {
|
|
47
|
+
userId: string;
|
|
48
|
+
encryptedKey: string;
|
|
49
|
+
keyVersion: number;
|
|
37
50
|
}
|
|
38
51
|
/**
|
|
39
52
|
* API response shape for a listed or fetched app.
|
|
40
|
-
* public_key doubles as both the app identifier and the encryption recipient key.
|
|
41
|
-
* private_key is intentionally absent — returned once in AppCreatedRecord and never again.
|
|
42
|
-
* Source: D-06, ENCRYPT-02, ENCRYPT-03
|
|
43
53
|
*/
|
|
44
54
|
export interface AppRecord {
|
|
45
55
|
id: string;
|
|
46
|
-
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
47
58
|
name: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
encryptedKeys?: AppEncryptedKey[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* App creation response.
|
|
63
|
+
* Initial wrapped encryption key may optionally be returned.
|
|
64
|
+
*/
|
|
65
|
+
export interface AppCreatedRecord extends AppRecord {
|
|
66
|
+
apiKey?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Machine authentication credential.
|
|
70
|
+
*/
|
|
71
|
+
export interface ApiKeyRecord {
|
|
72
|
+
id: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
appId: string;
|
|
76
|
+
name?: string;
|
|
51
77
|
}
|
|
52
78
|
/**
|
|
53
|
-
* App
|
|
54
|
-
* Same shape as AppRecord — no secrets returned, key pair is generated on-device.
|
|
55
|
-
* Source: D-06, ENCRYPT-02
|
|
79
|
+
* App membership / authorization.
|
|
56
80
|
*/
|
|
57
|
-
export
|
|
81
|
+
export interface AppMembershipRecord {
|
|
82
|
+
id: string;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
appId: string;
|
|
86
|
+
userId: string;
|
|
87
|
+
role: 'owner' | 'admin' | 'read' | 'write';
|
|
88
|
+
}
|
|
89
|
+
export interface FcmToken {
|
|
90
|
+
token: string;
|
|
91
|
+
deviceId?: string;
|
|
92
|
+
platform?: 'ios' | 'android' | 'web';
|
|
93
|
+
}
|
|
94
|
+
export interface NotificationPreference {
|
|
95
|
+
enabled?: boolean;
|
|
96
|
+
minimumLevel?: number;
|
|
97
|
+
}
|
|
98
|
+
export interface NotificationPreferences {
|
|
99
|
+
enabled?: boolean;
|
|
100
|
+
minimumLevel?: number;
|
|
101
|
+
perApp?: Record<string, NotificationPreference>;
|
|
102
|
+
}
|
|
58
103
|
/**
|
|
59
|
-
*
|
|
60
|
-
* password_digest is intentionally absent.
|
|
104
|
+
* Public user profile returned from API.
|
|
61
105
|
*/
|
|
62
106
|
export interface UserRecord {
|
|
63
107
|
id: string;
|
|
108
|
+
createdAt: string;
|
|
109
|
+
updatedAt: string;
|
|
64
110
|
email: string;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
111
|
+
publicKey?: string;
|
|
112
|
+
subscriptionLevel: SubscriptionLevel;
|
|
113
|
+
agreedToTerms: boolean;
|
|
114
|
+
notificationPreferences: NotificationPreferences;
|
|
115
|
+
fcmTokens: FcmToken[];
|
|
69
116
|
}
|
|
70
117
|
/**
|
|
71
118
|
* Filter params for GET /logs.
|
|
72
|
-
* Source: D-06
|
|
73
119
|
*/
|
|
74
|
-
export interface
|
|
75
|
-
|
|
120
|
+
export interface LogsQuery {
|
|
121
|
+
appIds?: string[];
|
|
122
|
+
levels?: LogLevel[];
|
|
76
123
|
flagged?: boolean;
|
|
77
124
|
limit?: number;
|
|
78
|
-
|
|
125
|
+
cursor?: string;
|
|
79
126
|
sort?: string;
|
|
80
127
|
from?: string;
|
|
81
128
|
to?: string;
|
|
82
129
|
}
|
|
83
130
|
/**
|
|
84
131
|
* Filter params for GET /apps.
|
|
85
|
-
* Source: D-06
|
|
86
132
|
*/
|
|
87
|
-
export interface
|
|
133
|
+
export interface AppsQuery {
|
|
88
134
|
limit?: number;
|
|
89
|
-
|
|
135
|
+
cursor?: string;
|
|
90
136
|
sort?: string;
|
|
137
|
+
from?: string;
|
|
138
|
+
to?: string;
|
|
91
139
|
}
|
|
92
140
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE1D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,IAAI,CAAC,EAAE,MAAM,CAAA;IA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