solid-logic 1.3.17-ec29db42 → 1.3.17-f02a2f1a
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/lib/acl/aclLogic.d.ts +3 -30
- package/lib/acl/aclLogic.d.ts.map +1 -1
- package/lib/acl/aclLogic.js +152 -119
- package/lib/acl/aclLogic.js.map +1 -1
- package/lib/authn/SolidAuthnLogic.d.ts.map +1 -1
- package/lib/authn/SolidAuthnLogic.js +2 -2
- package/lib/authn/SolidAuthnLogic.js.map +1 -1
- package/lib/chat/chatLogic.d.ts +3 -0
- package/lib/chat/chatLogic.d.ts.map +1 -0
- package/lib/chat/{ChatLogic.js → chatLogic.js} +82 -86
- package/lib/chat/chatLogic.js.map +1 -0
- package/lib/inbox/inboxLogic.d.ts +3 -0
- package/lib/inbox/inboxLogic.d.ts.map +1 -0
- package/lib/inbox/{InboxLogic.js → inboxLogic.js} +58 -64
- package/lib/inbox/inboxLogic.js.map +1 -0
- package/lib/index.d.ts +6 -11
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -25
- package/lib/index.js.map +1 -1
- package/lib/logic/CustomError.d.ts +4 -0
- package/lib/logic/CustomError.d.ts.map +1 -1
- package/lib/logic/CustomError.js +17 -1
- package/lib/logic/CustomError.js.map +1 -1
- package/lib/logic/SolidLogic.d.ts +4 -46
- package/lib/logic/SolidLogic.d.ts.map +1 -1
- package/lib/logic/SolidLogic.js +44 -273
- package/lib/logic/SolidLogic.js.map +1 -1
- package/lib/logic/solidLogicSingleton.d.ts +1 -2
- package/lib/logic/solidLogicSingleton.d.ts.map +1 -1
- package/lib/logic/solidLogicSingleton.js +2 -2
- package/lib/logic/solidLogicSingleton.js.map +1 -1
- package/lib/profile/profileLogic.d.ts +3 -0
- package/lib/profile/profileLogic.d.ts.map +1 -0
- package/lib/profile/profileLogic.js +246 -0
- package/lib/profile/profileLogic.js.map +1 -0
- package/lib/typeIndex/typeIndexLogic.d.ts +2 -21
- package/lib/typeIndex/typeIndexLogic.d.ts.map +1 -1
- package/lib/typeIndex/typeIndexLogic.js +304 -296
- package/lib/typeIndex/typeIndexLogic.js.map +1 -1
- package/lib/types.d.ts +82 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/util/containerLogic.d.ts +11 -0
- package/lib/util/containerLogic.d.ts.map +1 -0
- package/lib/{profile/ProfileLogic.js → util/containerLogic.js} +53 -44
- package/lib/util/containerLogic.js.map +1 -0
- package/lib/util/ns.d.ts +2 -0
- package/lib/util/ns.d.ts.map +1 -0
- package/lib/util/ns.js +34 -0
- package/lib/util/ns.js.map +1 -0
- package/lib/util/utilityLogic.d.ts +15 -0
- package/lib/util/utilityLogic.d.ts.map +1 -0
- package/lib/util/utilityLogic.js +272 -0
- package/lib/util/utilityLogic.js.map +1 -0
- package/lib/util/utils.d.ts +8 -0
- package/lib/util/utils.d.ts.map +1 -0
- package/lib/util/utils.js +48 -0
- package/lib/util/utils.js.map +1 -0
- package/package.json +3 -1
- package/src/acl/aclLogic.ts +137 -118
- package/src/authn/SolidAuthnLogic.ts +3 -2
- package/src/chat/chatLogic.ts +225 -0
- package/src/inbox/inboxLogic.ts +58 -0
- package/src/index.ts +11 -30
- package/src/logic/CustomError.ts +5 -1
- package/src/logic/SolidLogic.ts +42 -229
- package/src/logic/solidLogicSingleton.ts +3 -3
- package/src/profile/profileLogic.ts +126 -0
- package/src/typeIndex/typeIndexLogic.ts +175 -182
- package/src/types.ts +83 -4
- package/src/util/containerLogic.ts +54 -0
- package/src/util/ns.ts +5 -0
- package/src/util/utilityLogic.ts +155 -0
- package/src/util/utils.ts +52 -0
- package/test/aclLogic.test.ts +13 -4
- package/test/chatLogic.test.ts +70 -71
- package/test/container.test.ts +56 -0
- package/test/helpers/dataSetup.ts +134 -0
- package/test/helpers/setup.ts +4 -0
- package/test/inboxLogic.test.ts +39 -38
- package/test/logic.test.ts +10 -9
- package/test/profileLogic.test.ts +246 -0
- package/test/typeIndexLogic.test.ts +487 -30
- package/test/utilityLogic.test.ts +172 -126
- package/test/utils.test.ts +32 -0
- package/lib/chat/ChatLogic.d.ts +0 -26
- package/lib/chat/ChatLogic.d.ts.map +0 -1
- package/lib/chat/ChatLogic.js.map +0 -1
- package/lib/chat/determineChatContainer.d.ts +0 -3
- package/lib/chat/determineChatContainer.d.ts.map +0 -1
- package/lib/chat/determineChatContainer.js +0 -12
- package/lib/chat/determineChatContainer.js.map +0 -1
- package/lib/discovery/discoveryLogic.d.ts +0 -37
- package/lib/discovery/discoveryLogic.d.ts.map +0 -1
- package/lib/discovery/discoveryLogic.js +0 -507
- package/lib/discovery/discoveryLogic.js.map +0 -1
- package/lib/inbox/InboxLogic.d.ts +0 -18
- package/lib/inbox/InboxLogic.d.ts.map +0 -1
- package/lib/inbox/InboxLogic.js.map +0 -1
- package/lib/profile/ProfileLogic.d.ts +0 -13
- package/lib/profile/ProfileLogic.d.ts.map +0 -1
- package/lib/profile/ProfileLogic.js.map +0 -1
- package/lib/util/UtilityLogic.d.ts +0 -33
- package/lib/util/UtilityLogic.d.ts.map +0 -1
- package/lib/util/UtilityLogic.js +0 -240
- package/lib/util/UtilityLogic.js.map +0 -1
- package/lib/util/uri.d.ts +0 -3
- package/lib/util/uri.d.ts.map +0 -1
- package/lib/util/uri.js +0 -9
- package/lib/util/uri.js.map +0 -1
- package/src/chat/ChatLogic.ts +0 -244
- package/src/chat/determineChatContainer.ts +0 -14
- package/src/discovery/discoveryLogic.ts +0 -288
- package/src/inbox/InboxLogic.ts +0 -66
- package/src/profile/ProfileLogic.ts +0 -44
- package/src/util/UtilityLogic.ts +0 -161
- package/src/util/uri.ts +0 -5
- package/test/discoveryLogic.test.ts +0 -712
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (_) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
exports.createProfileLogic = void 0;
|
|
63
|
+
var CustomError_1 = require("../logic/CustomError");
|
|
64
|
+
var debug = __importStar(require("../util/debug"));
|
|
65
|
+
var ns_1 = require("../util/ns");
|
|
66
|
+
var utils_1 = require("../util/utils");
|
|
67
|
+
function createProfileLogic(store, authn, utilityLogic) {
|
|
68
|
+
var ns = ns_1.ns;
|
|
69
|
+
/**
|
|
70
|
+
* loads the preference without throwing errors - if it can create it it does so.
|
|
71
|
+
* remark: it still throws error if it cannot load profile.
|
|
72
|
+
* @param user
|
|
73
|
+
* @returns undefined if preferenceFile cannot be returned or NamedNode if it can find it or create it
|
|
74
|
+
*/
|
|
75
|
+
function silencedLoadPreferences(user) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
+
var err_1;
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
switch (_a.label) {
|
|
80
|
+
case 0:
|
|
81
|
+
_a.trys.push([0, 2, , 3]);
|
|
82
|
+
return [4 /*yield*/, loadPreferences(user)];
|
|
83
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
84
|
+
case 2:
|
|
85
|
+
err_1 = _a.sent();
|
|
86
|
+
return [2 /*return*/, undefined];
|
|
87
|
+
case 3: return [2 /*return*/];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* loads the preference without returning different errors if it cannot create or load it.
|
|
94
|
+
* remark: it also throws error if it cannot load profile.
|
|
95
|
+
* @param user
|
|
96
|
+
* @returns undefined if preferenceFile cannot be an Error or NamedNode if it can find it or create it
|
|
97
|
+
*/
|
|
98
|
+
function loadPreferences(user) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var possiblePreferencesFile, preferencesFile, err_2, message, response, err_3, msg;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0: return [4 /*yield*/, loadProfile(user)];
|
|
104
|
+
case 1:
|
|
105
|
+
_a.sent();
|
|
106
|
+
possiblePreferencesFile = (0, utils_1.suggestPreferencesFile)(user);
|
|
107
|
+
_a.label = 2;
|
|
108
|
+
case 2:
|
|
109
|
+
_a.trys.push([2, 4, , 5]);
|
|
110
|
+
return [4 /*yield*/, utilityLogic.followOrCreateLink(user, ns.space('preferencesFile'), possiblePreferencesFile, user.doc())];
|
|
111
|
+
case 3:
|
|
112
|
+
preferencesFile = _a.sent();
|
|
113
|
+
return [3 /*break*/, 5];
|
|
114
|
+
case 4:
|
|
115
|
+
err_2 = _a.sent();
|
|
116
|
+
message = "User ".concat(user, " has no pointer in profile to preferences file.");
|
|
117
|
+
debug.warn(message);
|
|
118
|
+
// we are listing the possible errors
|
|
119
|
+
if (err_2 instanceof CustomError_1.NotEditableError) {
|
|
120
|
+
throw err_2;
|
|
121
|
+
}
|
|
122
|
+
if (err_2 instanceof CustomError_1.WebOperationError) {
|
|
123
|
+
throw err_2;
|
|
124
|
+
}
|
|
125
|
+
if (err_2 instanceof CustomError_1.UnauthorizedError) {
|
|
126
|
+
throw err_2;
|
|
127
|
+
}
|
|
128
|
+
if (err_2 instanceof CustomError_1.CrossOriginForbiddenError) {
|
|
129
|
+
throw err_2;
|
|
130
|
+
}
|
|
131
|
+
if (err_2 instanceof CustomError_1.SameOriginForbiddenError) {
|
|
132
|
+
throw err_2;
|
|
133
|
+
}
|
|
134
|
+
if (err_2 instanceof CustomError_1.FetchError) {
|
|
135
|
+
throw err_2;
|
|
136
|
+
}
|
|
137
|
+
throw err_2;
|
|
138
|
+
case 5:
|
|
139
|
+
_a.trys.push([5, 7, , 8]);
|
|
140
|
+
return [4 /*yield*/, store.fetcher.load(preferencesFile)];
|
|
141
|
+
case 6:
|
|
142
|
+
response = _a.sent();
|
|
143
|
+
return [3 /*break*/, 8];
|
|
144
|
+
case 7:
|
|
145
|
+
err_3 = _a.sent();
|
|
146
|
+
msg = "Unable to load preference of user ".concat(user, ": ").concat(err_3);
|
|
147
|
+
debug.warn(msg);
|
|
148
|
+
if (err_3.response.status === 401) {
|
|
149
|
+
throw new CustomError_1.UnauthorizedError();
|
|
150
|
+
}
|
|
151
|
+
if (err_3.response.status === 403) {
|
|
152
|
+
if ((0, utils_1.differentOrigin)(preferencesFile)) {
|
|
153
|
+
throw new CustomError_1.CrossOriginForbiddenError();
|
|
154
|
+
}
|
|
155
|
+
throw new CustomError_1.SameOriginForbiddenError();
|
|
156
|
+
}
|
|
157
|
+
/*if (err.response.status === 404) {
|
|
158
|
+
throw new NotFoundError();
|
|
159
|
+
}*/
|
|
160
|
+
throw new Error(msg);
|
|
161
|
+
case 8: return [2 /*return*/, preferencesFile];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function loadProfile(user) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
168
|
+
var err_4;
|
|
169
|
+
return __generator(this, function (_a) {
|
|
170
|
+
switch (_a.label) {
|
|
171
|
+
case 0:
|
|
172
|
+
if (!user) {
|
|
173
|
+
throw new Error("loadProfile: no user given.");
|
|
174
|
+
}
|
|
175
|
+
_a.label = 1;
|
|
176
|
+
case 1:
|
|
177
|
+
_a.trys.push([1, 3, , 4]);
|
|
178
|
+
return [4 /*yield*/, store.fetcher.load(user.doc())];
|
|
179
|
+
case 2:
|
|
180
|
+
_a.sent();
|
|
181
|
+
return [3 /*break*/, 4];
|
|
182
|
+
case 3:
|
|
183
|
+
err_4 = _a.sent();
|
|
184
|
+
throw new Error("Unable to load profile of user ".concat(user, ": ").concat(err_4));
|
|
185
|
+
case 4: return [2 /*return*/, user.doc()];
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function loadMe() {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
+
var me;
|
|
193
|
+
return __generator(this, function (_a) {
|
|
194
|
+
switch (_a.label) {
|
|
195
|
+
case 0:
|
|
196
|
+
me = authn.currentUser();
|
|
197
|
+
if (me === null) {
|
|
198
|
+
throw new Error("Current user not found! Not logged in?");
|
|
199
|
+
}
|
|
200
|
+
return [4 /*yield*/, store.fetcher.load(me.doc())];
|
|
201
|
+
case 1:
|
|
202
|
+
_a.sent();
|
|
203
|
+
return [2 /*return*/, me];
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function getPodRoot(user) {
|
|
209
|
+
var podRoot = findStorage(user);
|
|
210
|
+
if (!podRoot) {
|
|
211
|
+
throw new Error("User pod root not found!");
|
|
212
|
+
}
|
|
213
|
+
return podRoot;
|
|
214
|
+
}
|
|
215
|
+
function getMainInbox(user) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
217
|
+
var mainInbox;
|
|
218
|
+
return __generator(this, function (_a) {
|
|
219
|
+
switch (_a.label) {
|
|
220
|
+
case 0: return [4 /*yield*/, store.fetcher.load(user)];
|
|
221
|
+
case 1:
|
|
222
|
+
_a.sent();
|
|
223
|
+
mainInbox = store.any(user, ns.ldp("inbox"), undefined, user.doc());
|
|
224
|
+
if (!mainInbox) {
|
|
225
|
+
throw new Error("User main inbox not found!");
|
|
226
|
+
}
|
|
227
|
+
return [2 /*return*/, mainInbox];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function findStorage(me) {
|
|
233
|
+
return store.any(me, ns.space("storage"), undefined, me.doc());
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
loadMe: loadMe,
|
|
237
|
+
getPodRoot: getPodRoot,
|
|
238
|
+
getMainInbox: getMainInbox,
|
|
239
|
+
findStorage: findStorage,
|
|
240
|
+
loadPreferences: loadPreferences,
|
|
241
|
+
loadProfile: loadProfile,
|
|
242
|
+
silencedLoadPreferences: silencedLoadPreferences
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
exports.createProfileLogic = createProfileLogic;
|
|
246
|
+
//# sourceMappingURL=profileLogic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileLogic.js","sourceRoot":"","sources":["../../src/profile/profileLogic.ts"],"names":[],"m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export declare const ns: any;
|
|
4
|
-
/**
|
|
5
|
-
* Resolves with the same context, outputting
|
|
6
|
-
* output: index.public, index.private
|
|
7
|
-
* @@ This is a very bizare function
|
|
8
|
-
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
9
|
-
*/
|
|
10
|
-
export declare function loadIndex(context: AuthenticationContext, isPublic: boolean): Promise<AuthenticationContext>;
|
|
11
|
-
export declare function loadTypeIndexes(context: AuthenticationContext): Promise<AuthenticationContext | undefined>;
|
|
12
|
-
/**
|
|
13
|
-
* Resolves with the same context, outputting
|
|
14
|
-
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
15
|
-
*/
|
|
16
|
-
export declare function ensureTypeIndexes(context: AuthenticationContext, agent?: NamedNode): Promise<AuthenticationContext>;
|
|
17
|
-
/**
|
|
18
|
-
* Register a new app in a type index
|
|
19
|
-
* used in chat in bookmark.js (solid-ui)
|
|
20
|
-
*/
|
|
21
|
-
export declare function registerInTypeIndex(context: AuthenticationContext, instance: NamedNode, theClass: NamedNode, isPublic: boolean, agent?: NamedNode): Promise<AuthenticationContext>;
|
|
1
|
+
import { TypeIndexLogic } from '../types';
|
|
2
|
+
export declare function createTypeIndexLogic(store: any, authn: any, profileLogic: any, utilityLogic: any): TypeIndexLogic;
|
|
22
3
|
//# sourceMappingURL=typeIndexLogic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeIndexLogic.d.ts","sourceRoot":"","sources":["../../src/typeIndex/typeIndexLogic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typeIndexLogic.d.ts","sourceRoot":"","sources":["../../src/typeIndex/typeIndexLogic.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAkB,MAAM,UAAU,CAAA;AAKpE,wBAAgB,oBAAoB,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,EAAE,YAAY,KAAA,EAAE,YAAY,KAAA,GAAG,cAAc,CA2L7F"}
|