wenum 1.94.0 → 2.0.0
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/.claude/settings.local.json +7 -0
- package/dist/index.cjs +405 -0
- package/dist/{index.d.ts → index.d.cts} +206 -132
- package/dist/index.d.mts +206 -132
- package/dist/index.mjs +319 -425
- package/package.json +15 -10
- package/tsconfig.json +1 -2
- package/dist/index.js +0 -537
package/dist/index.mjs
CHANGED
|
@@ -1,468 +1,362 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
//#region src/page/profile/profile.ts
|
|
2
|
+
let ChallengeStatus = /* @__PURE__ */ function(ChallengeStatus) {
|
|
3
|
+
ChallengeStatus[ChallengeStatus["None"] = 0] = "None";
|
|
4
|
+
ChallengeStatus[ChallengeStatus["Open"] = 1] = "Open";
|
|
5
|
+
ChallengeStatus[ChallengeStatus["Closed"] = 2] = "Closed";
|
|
6
|
+
return ChallengeStatus;
|
|
7
|
+
}({});
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/page/profile/market/type/index.ts
|
|
10
|
+
const ZeroMarketOption = {
|
|
11
|
+
label: "",
|
|
12
|
+
marketType: ""
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/page/profile/event.ts
|
|
16
|
+
let AttendanceStatus = /* @__PURE__ */ function(AttendanceStatus) {
|
|
17
|
+
AttendanceStatus[AttendanceStatus["None"] = 0] = "None";
|
|
18
|
+
AttendanceStatus[AttendanceStatus["Pending"] = 1] = "Pending";
|
|
19
|
+
AttendanceStatus[AttendanceStatus["OnTime"] = 2] = "OnTime";
|
|
20
|
+
AttendanceStatus[AttendanceStatus["Late"] = 3] = "Late";
|
|
21
|
+
AttendanceStatus[AttendanceStatus["CheckedIn"] = 4] = "CheckedIn";
|
|
22
|
+
AttendanceStatus[AttendanceStatus["Left"] = 5] = "Left";
|
|
23
|
+
return AttendanceStatus;
|
|
24
|
+
}({});
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/page/profile/game/index.ts
|
|
27
|
+
const ZeroGameMeta = {
|
|
28
|
+
gameType: "other",
|
|
29
|
+
label: ""
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
return PID_ALPHANUMERIC_REGEX.test(pid);
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/page/pid.ts
|
|
33
|
+
const PID_LENGTH = 9;
|
|
34
|
+
const PID_PREFIX_LENGTH = 3;
|
|
35
|
+
const PID_ALPHANUMERIC_REGEX = /^[A-Za-z0-9]+$/;
|
|
36
|
+
const isValidPID = (pid) => {
|
|
37
|
+
if (pid.length !== 9) return false;
|
|
38
|
+
return PID_ALPHANUMERIC_REGEX.test(pid);
|
|
41
39
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
return pid.slice(0, PID_PREFIX_LENGTH);
|
|
40
|
+
const getPIDPrefix = (pid) => {
|
|
41
|
+
if (!isValidPID(pid)) return "";
|
|
42
|
+
return pid.slice(0, 3);
|
|
47
43
|
};
|
|
48
44
|
function getProfileTypeByPID(pid) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
case "org":
|
|
62
|
-
return "organization";
|
|
63
|
-
case "lbd":
|
|
64
|
-
return "leaderboard";
|
|
65
|
-
case "gme":
|
|
66
|
-
return "game";
|
|
67
|
-
case "mkt":
|
|
68
|
-
return "market";
|
|
69
|
-
default:
|
|
70
|
-
return "none";
|
|
71
|
-
}
|
|
45
|
+
switch (getPIDPrefix(pid)) {
|
|
46
|
+
case "usr": return "user";
|
|
47
|
+
case "uoi": return "uoi";
|
|
48
|
+
case "tms": return "team";
|
|
49
|
+
case "arn": return "arena";
|
|
50
|
+
case "evt": return "event";
|
|
51
|
+
case "org": return "organization";
|
|
52
|
+
case "lbd": return "leaderboard";
|
|
53
|
+
case "gme": return "game";
|
|
54
|
+
case "mkt": return "market";
|
|
55
|
+
default: return "none";
|
|
56
|
+
}
|
|
72
57
|
}
|
|
73
58
|
function getEntityTypeByPID(pid) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return "collection";
|
|
82
|
-
case "uoi":
|
|
83
|
-
return "uoi";
|
|
84
|
-
default:
|
|
85
|
-
return void 0;
|
|
86
|
-
}
|
|
59
|
+
switch (getPIDPrefix(pid)) {
|
|
60
|
+
case "lbd": return "leaderboard";
|
|
61
|
+
case "tms": return "team";
|
|
62
|
+
case "col": return "collection";
|
|
63
|
+
case "uoi": return "uoi";
|
|
64
|
+
default: return;
|
|
65
|
+
}
|
|
87
66
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
case "organization":
|
|
101
|
-
return "org";
|
|
102
|
-
case "leaderboard":
|
|
103
|
-
return "lbd";
|
|
104
|
-
case "game":
|
|
105
|
-
return "gme";
|
|
106
|
-
default:
|
|
107
|
-
return "";
|
|
108
|
-
}
|
|
67
|
+
const getPIDPrefixByProfileType = (profileType) => {
|
|
68
|
+
switch (profileType) {
|
|
69
|
+
case "user": return "usr";
|
|
70
|
+
case "uoi": return "uoi";
|
|
71
|
+
case "team": return "tms";
|
|
72
|
+
case "arena": return "arn";
|
|
73
|
+
case "event": return "evt";
|
|
74
|
+
case "organization": return "org";
|
|
75
|
+
case "leaderboard": return "lbd";
|
|
76
|
+
case "game": return "gme";
|
|
77
|
+
default: return "";
|
|
78
|
+
}
|
|
109
79
|
};
|
|
110
80
|
function isTeamPID(pid) {
|
|
111
|
-
|
|
81
|
+
return getPIDPrefix(pid) === "tms";
|
|
112
82
|
}
|
|
113
83
|
function isUoiPID(pid) {
|
|
114
|
-
|
|
84
|
+
return getPIDPrefix(pid) === "uoi";
|
|
115
85
|
}
|
|
116
86
|
function isGamePID(pid) {
|
|
117
|
-
|
|
87
|
+
return getPIDPrefix(pid) === "gme";
|
|
118
88
|
}
|
|
119
89
|
function isLeaderboardPID(pid) {
|
|
120
|
-
|
|
90
|
+
return getPIDPrefix(pid) === "lbd";
|
|
121
91
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/page/collection/other.ts
|
|
94
|
+
const ZeroCollectionMeta = {
|
|
95
|
+
collectionType: "zzzother",
|
|
96
|
+
label: ""
|
|
127
97
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/page/nearby.ts
|
|
100
|
+
const getNearbyIndex = (h3Cell, interestID) => `${h3Cell}_${interestID}`;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/page/attachment.ts
|
|
103
|
+
let AttachmentType = /* @__PURE__ */ function(AttachmentType) {
|
|
104
|
+
AttachmentType[AttachmentType["None"] = 0] = "None";
|
|
105
|
+
AttachmentType[AttachmentType["Image"] = 1] = "Image";
|
|
106
|
+
AttachmentType[AttachmentType["Video"] = 2] = "Video";
|
|
107
|
+
AttachmentType[AttachmentType["Poll"] = 4] = "Poll";
|
|
108
|
+
return AttachmentType;
|
|
109
|
+
}({});
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region src/page/entity.ts
|
|
142
112
|
function getPIDPrefixByEntityType(entityType) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
case "collection":
|
|
151
|
-
return "col";
|
|
152
|
-
default:
|
|
153
|
-
return "";
|
|
154
|
-
}
|
|
113
|
+
switch (entityType) {
|
|
114
|
+
case "uoi": return "uoi";
|
|
115
|
+
case "team": return "tms";
|
|
116
|
+
case "leaderboard": return "lbd";
|
|
117
|
+
case "collection": return "col";
|
|
118
|
+
default: return "";
|
|
119
|
+
}
|
|
155
120
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/auth.ts
|
|
123
|
+
let AdminAccountStatus = /* @__PURE__ */ function(AdminAccountStatus) {
|
|
124
|
+
AdminAccountStatus[AdminAccountStatus["None"] = 0] = "None";
|
|
125
|
+
AdminAccountStatus[AdminAccountStatus["Active"] = 1] = "Active";
|
|
126
|
+
AdminAccountStatus[AdminAccountStatus["Inactive"] = 2] = "Inactive";
|
|
127
|
+
return AdminAccountStatus;
|
|
128
|
+
}({});
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/connection.ts
|
|
131
|
+
let FollowingStatus = /* @__PURE__ */ function(FollowingStatus) {
|
|
132
|
+
FollowingStatus[FollowingStatus["None"] = 0] = "None";
|
|
133
|
+
FollowingStatus[FollowingStatus["Pending"] = 1] = "Pending";
|
|
134
|
+
FollowingStatus[FollowingStatus["Approved"] = 2] = "Approved";
|
|
135
|
+
FollowingStatus[FollowingStatus["Blocked"] = 3] = "Blocked";
|
|
136
|
+
FollowingStatus[FollowingStatus["Withdrawn"] = 4] = "Withdrawn";
|
|
137
|
+
FollowingStatus[FollowingStatus["Unfollowed"] = 5] = "Unfollowed";
|
|
138
|
+
return FollowingStatus;
|
|
139
|
+
}({});
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/attribute/uoi/sports/basketball.ts
|
|
142
|
+
let BasketballPosition = /* @__PURE__ */ function(BasketballPosition) {
|
|
143
|
+
BasketballPosition[BasketballPosition["None"] = 0] = "None";
|
|
144
|
+
BasketballPosition[BasketballPosition["SG"] = 1] = "SG";
|
|
145
|
+
BasketballPosition[BasketballPosition["PG"] = 2] = "PG";
|
|
146
|
+
BasketballPosition[BasketballPosition["C"] = 4] = "C";
|
|
147
|
+
BasketballPosition[BasketballPosition["SF"] = 8] = "SF";
|
|
148
|
+
BasketballPosition[BasketballPosition["PF"] = 16] = "PF";
|
|
149
|
+
return BasketballPosition;
|
|
150
|
+
}({});
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/interest/category.ts
|
|
153
|
+
const ALL_INTEREST_CATEGORIES = [
|
|
154
|
+
"1_sports",
|
|
155
|
+
"2_pets",
|
|
156
|
+
"3_cardgames",
|
|
157
|
+
"4_music",
|
|
158
|
+
"5_travel",
|
|
159
|
+
"6_leisure"
|
|
195
160
|
];
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/interest/interestByCategory/cardgames.ts
|
|
163
|
+
const ALL_CARDGAMES_INTERESTS = [
|
|
164
|
+
"texasholdem",
|
|
165
|
+
"omaha",
|
|
166
|
+
"blackjack"
|
|
202
167
|
];
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/interest/interestByCategory/music.ts
|
|
170
|
+
const ALL_MUSIC_INTERESTS = [
|
|
171
|
+
"singing",
|
|
172
|
+
"guitar",
|
|
173
|
+
"piano",
|
|
174
|
+
"violin",
|
|
175
|
+
"cello",
|
|
176
|
+
"bass",
|
|
177
|
+
"drum",
|
|
178
|
+
"saxophone",
|
|
179
|
+
"flute",
|
|
180
|
+
"harp",
|
|
181
|
+
"keytar",
|
|
182
|
+
"trombone",
|
|
183
|
+
"tuba",
|
|
184
|
+
"clarinet"
|
|
220
185
|
];
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/interest/interestByCategory/pets.ts
|
|
188
|
+
const ALL_PETS_INTERESTS = ["dog", "cat"];
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/interest/interestByCategory/sports.ts
|
|
191
|
+
const ALL_SPORTS_INTERESTS = [
|
|
192
|
+
"tennis",
|
|
193
|
+
"pickleball",
|
|
194
|
+
"basketball",
|
|
195
|
+
"golf",
|
|
196
|
+
"hiking",
|
|
197
|
+
"running",
|
|
198
|
+
"gym",
|
|
199
|
+
"baseball",
|
|
200
|
+
"biking",
|
|
201
|
+
"yoga",
|
|
202
|
+
"tabletennis",
|
|
203
|
+
"football",
|
|
204
|
+
"soccer",
|
|
205
|
+
"badminton",
|
|
206
|
+
"skiing",
|
|
207
|
+
"surfing",
|
|
208
|
+
"swimming",
|
|
209
|
+
"hockey"
|
|
226
210
|
];
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/interest/interestByCategory/travel.ts
|
|
213
|
+
const ALL_TRAVEL_INTERESTS = [
|
|
214
|
+
"landmark",
|
|
215
|
+
"nationalpark",
|
|
216
|
+
"beach",
|
|
217
|
+
"museum",
|
|
218
|
+
"garden",
|
|
219
|
+
"zoo",
|
|
220
|
+
"food",
|
|
221
|
+
"drinks",
|
|
222
|
+
"entertainment",
|
|
223
|
+
"cruise",
|
|
224
|
+
"culture",
|
|
225
|
+
"heritage",
|
|
226
|
+
"island",
|
|
227
|
+
"lake",
|
|
228
|
+
"river",
|
|
229
|
+
"waterfall",
|
|
230
|
+
"cave",
|
|
231
|
+
"desert",
|
|
232
|
+
"mountain",
|
|
233
|
+
"forest",
|
|
234
|
+
"wellness",
|
|
235
|
+
"wildlife",
|
|
236
|
+
"technology"
|
|
248
237
|
];
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
"entertainment",
|
|
261
|
-
"cruise",
|
|
262
|
-
"culture",
|
|
263
|
-
"heritage",
|
|
264
|
-
"island",
|
|
265
|
-
"lake",
|
|
266
|
-
"river",
|
|
267
|
-
"waterfall",
|
|
268
|
-
"cave",
|
|
269
|
-
"desert",
|
|
270
|
-
"mountain",
|
|
271
|
-
"forest",
|
|
272
|
-
"wellness",
|
|
273
|
-
"wildlife",
|
|
274
|
-
"technology"
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/interest/interestByCategory/leisure.ts
|
|
240
|
+
const ALL_LEISURE_INTERESTS = [
|
|
241
|
+
"walking",
|
|
242
|
+
"movie",
|
|
243
|
+
"concert",
|
|
244
|
+
"dining",
|
|
245
|
+
"camping",
|
|
246
|
+
"shopping",
|
|
247
|
+
"picnic",
|
|
248
|
+
"show"
|
|
275
249
|
];
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"picnic",
|
|
286
|
-
"show"
|
|
287
|
-
];
|
|
288
|
-
|
|
289
|
-
// src/interest/interestByCategory/interest.ts
|
|
290
|
-
var INTERESTS_BY_CATEGORY = {
|
|
291
|
-
"1_sports": ALL_SPORTS_INTERESTS,
|
|
292
|
-
"2_pets": ALL_PETS_INTERESTS,
|
|
293
|
-
"3_cardgames": ALL_CARDGAMES_INTERESTS,
|
|
294
|
-
"4_music": ALL_MUSIC_INTERESTS,
|
|
295
|
-
"5_travel": ALL_TRAVEL_INTERESTS,
|
|
296
|
-
"6_leisure": ALL_LEISURE_INTERESTS
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// src/meta/common/label.ts
|
|
300
|
-
var COMMON_ATTRIBUTE_LABEL = {
|
|
301
|
-
handedness: "Handedness",
|
|
302
|
-
gender: "Gender",
|
|
303
|
-
dob: "Date of Birth"
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
// src/meta/common/util.ts
|
|
307
|
-
var getCommonAttributeLabel = ({
|
|
308
|
-
attributeType
|
|
309
|
-
}) => {
|
|
310
|
-
return COMMON_ATTRIBUTE_LABEL[attributeType] || "";
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/interest/interestByCategory/interest.ts
|
|
252
|
+
const INTERESTS_BY_CATEGORY = {
|
|
253
|
+
"1_sports": ALL_SPORTS_INTERESTS,
|
|
254
|
+
"2_pets": ALL_PETS_INTERESTS,
|
|
255
|
+
"3_cardgames": ALL_CARDGAMES_INTERESTS,
|
|
256
|
+
"4_music": ALL_MUSIC_INTERESTS,
|
|
257
|
+
"5_travel": ALL_TRAVEL_INTERESTS,
|
|
258
|
+
"6_leisure": ALL_LEISURE_INTERESTS
|
|
311
259
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/meta/common/label.ts
|
|
262
|
+
const COMMON_ATTRIBUTE_LABEL = {
|
|
263
|
+
handedness: "Handedness",
|
|
264
|
+
gender: "Gender",
|
|
265
|
+
dob: "Date of Birth"
|
|
318
266
|
};
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/meta/common/util.ts
|
|
269
|
+
const getCommonAttributeLabel = ({ attributeType }) => {
|
|
270
|
+
return COMMON_ATTRIBUTE_LABEL[attributeType] || "";
|
|
323
271
|
};
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/meta/uoi/sports/tennis/label.ts
|
|
274
|
+
const UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL = {
|
|
275
|
+
level: "Level",
|
|
276
|
+
backhand: "Backhand",
|
|
277
|
+
handedness: "Handedness"
|
|
329
278
|
};
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region src/meta/uoi/sports/basketball/label.ts
|
|
281
|
+
const UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL = { positions: "Positions" };
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/meta/uoi/sports/label.ts
|
|
284
|
+
const UOI_SPORTS_ATTRIBUTE_LABEL = {
|
|
285
|
+
tennis: UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
286
|
+
basketball: UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL
|
|
334
287
|
};
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
346
|
-
if (interestType) {
|
|
347
|
-
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
348
|
-
}
|
|
349
|
-
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
288
|
+
//#endregion
|
|
289
|
+
//#region src/meta/uoi/label.ts
|
|
290
|
+
const UOI_ATTRIBUTE_LABEL = { "1_sports": UOI_SPORTS_ATTRIBUTE_LABEL };
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/meta/uoi/util.ts
|
|
293
|
+
const getUoiAttributeLabel = ({ categoryType, interestType, attributeType }) => {
|
|
294
|
+
let labels = UOI_ATTRIBUTE_LABEL;
|
|
295
|
+
if (categoryType) labels = labels?.[categoryType] || {};
|
|
296
|
+
if (interestType) labels = labels?.[interestType] || {};
|
|
297
|
+
return labels?.[attributeType] || "";
|
|
350
298
|
};
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region src/meta/collection/pets/label.ts
|
|
301
|
+
const COLLECTION_PETS_ATTRIBUTE_LABEL = {
|
|
302
|
+
breed: "Breed",
|
|
303
|
+
father: "Father",
|
|
304
|
+
mother: "Mother",
|
|
305
|
+
gender: "Gender",
|
|
306
|
+
height: "Height",
|
|
307
|
+
weight: "Weight",
|
|
308
|
+
children: "Children",
|
|
309
|
+
dob: "Date of Birth"
|
|
362
310
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/meta/collection/label.ts
|
|
313
|
+
const COLLECTION_ATTRIBUTE_LABEL = { "2_pets": COLLECTION_PETS_ATTRIBUTE_LABEL };
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region src/meta/collection/util.ts
|
|
316
|
+
const getCollectionAttributeLabel = ({ categoryType, interestType, attributeType }) => {
|
|
317
|
+
let labels = COLLECTION_ATTRIBUTE_LABEL;
|
|
318
|
+
if (categoryType) labels = labels?.[categoryType] || {};
|
|
319
|
+
if (interestType) labels = labels?.[interestType] || {};
|
|
320
|
+
return labels?.[attributeType] || "";
|
|
367
321
|
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
})
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
labels = (labels == null ? void 0 : labels[categoryType]) || {};
|
|
378
|
-
}
|
|
379
|
-
if (interestType) {
|
|
380
|
-
labels = (labels == null ? void 0 : labels[interestType]) || {};
|
|
381
|
-
}
|
|
382
|
-
return (labels == null ? void 0 : labels[attributeType]) || "";
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
// src/reaction.ts
|
|
386
|
-
var ReactionType = /* @__PURE__ */ ((ReactionType2) => {
|
|
387
|
-
ReactionType2[ReactionType2["None"] = 0] = "None";
|
|
388
|
-
ReactionType2[ReactionType2["Like"] = 1] = "Like";
|
|
389
|
-
return ReactionType2;
|
|
390
|
-
})(ReactionType || {});
|
|
391
|
-
|
|
392
|
-
// src/r2/subjectR2Folder.ts
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/reaction.ts
|
|
324
|
+
let ReactionType = /* @__PURE__ */ function(ReactionType) {
|
|
325
|
+
ReactionType[ReactionType["None"] = 0] = "None";
|
|
326
|
+
ReactionType[ReactionType["Like"] = 1] = "Like";
|
|
327
|
+
return ReactionType;
|
|
328
|
+
}({});
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/r2/subjectR2Folder.ts
|
|
393
331
|
function getSubjectR2CdnUrl(folder, imageFID, size) {
|
|
394
|
-
|
|
395
|
-
|
|
332
|
+
if (!imageFID) return "";
|
|
333
|
+
return `https://subject.buddiesnearby.com/${folder}/${imageFID}/${size}.webp`;
|
|
396
334
|
}
|
|
397
|
-
|
|
398
|
-
|
|
335
|
+
//#endregion
|
|
336
|
+
//#region src/r2/pageR2Folder.ts
|
|
399
337
|
function getPageR2CdnUrl(folder, pageID, imageID, size) {
|
|
400
|
-
|
|
401
|
-
|
|
338
|
+
if (!imageID) return "";
|
|
339
|
+
return `https://page.buddiesnearby.com/${folder}/${pageID}/${imageID}/${size}.webp`;
|
|
402
340
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/r2/avatarR2Folder.ts
|
|
343
|
+
const entityTypeToAvatarR2Folder = {
|
|
344
|
+
user: "user",
|
|
345
|
+
uoi: "user",
|
|
346
|
+
team: "team",
|
|
347
|
+
arena: "arena",
|
|
348
|
+
event: "event",
|
|
349
|
+
market: "market",
|
|
350
|
+
leaderboard: "leaderboard",
|
|
351
|
+
game: "game",
|
|
352
|
+
collection: "collection"
|
|
415
353
|
};
|
|
416
354
|
function getAvatarR2FolderByEntityType(entityType) {
|
|
417
|
-
|
|
418
|
-
return (_a = entityTypeToAvatarR2Folder[entityType]) != null ? _a : "";
|
|
355
|
+
return entityTypeToAvatarR2Folder[entityType] ?? "";
|
|
419
356
|
}
|
|
420
357
|
function getAvatarR2CdnUrl(folder, pageID, imageID, size) {
|
|
421
|
-
|
|
422
|
-
|
|
358
|
+
if (!imageID) return "";
|
|
359
|
+
return `https://avatar.buddiesnearby.com/${folder}/${pageID}/${imageID}/${size}.webp`;
|
|
423
360
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
ALL_INTEREST_CATEGORIES,
|
|
427
|
-
ALL_LEISURE_INTERESTS,
|
|
428
|
-
ALL_MUSIC_INTERESTS,
|
|
429
|
-
ALL_PETS_INTERESTS,
|
|
430
|
-
ALL_SPORTS_INTERESTS,
|
|
431
|
-
ALL_TRAVEL_INTERESTS,
|
|
432
|
-
AdminAccountStatus,
|
|
433
|
-
AttachmentType,
|
|
434
|
-
AttendanceStatus,
|
|
435
|
-
BasketballPosition,
|
|
436
|
-
COLLECTION_ATTRIBUTE_LABEL,
|
|
437
|
-
COLLECTION_PETS_ATTRIBUTE_LABEL,
|
|
438
|
-
COMMON_ATTRIBUTE_LABEL,
|
|
439
|
-
ChallengeStatus,
|
|
440
|
-
FollowingStatus,
|
|
441
|
-
INTERESTS_BY_CATEGORY,
|
|
442
|
-
PID_LENGTH,
|
|
443
|
-
PID_PREFIX_LENGTH,
|
|
444
|
-
ReactionType,
|
|
445
|
-
UOI_ATTRIBUTE_LABEL,
|
|
446
|
-
UOI_SPORTS_ATTRIBUTE_LABEL,
|
|
447
|
-
UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL,
|
|
448
|
-
UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL,
|
|
449
|
-
ZeroCollectionMeta,
|
|
450
|
-
ZeroGameMeta,
|
|
451
|
-
ZeroMarketOption,
|
|
452
|
-
getAvatarR2CdnUrl,
|
|
453
|
-
getAvatarR2FolderByEntityType,
|
|
454
|
-
getCollectionAttributeLabel,
|
|
455
|
-
getCommonAttributeLabel,
|
|
456
|
-
getEntityTypeByPID,
|
|
457
|
-
getNearbyIndex,
|
|
458
|
-
getPIDPrefixByEntityType,
|
|
459
|
-
getPIDPrefixByProfileType,
|
|
460
|
-
getPageR2CdnUrl,
|
|
461
|
-
getProfileTypeByPID,
|
|
462
|
-
getSubjectR2CdnUrl,
|
|
463
|
-
getUoiAttributeLabel,
|
|
464
|
-
isGamePID,
|
|
465
|
-
isLeaderboardPID,
|
|
466
|
-
isTeamPID,
|
|
467
|
-
isUoiPID
|
|
468
|
-
};
|
|
361
|
+
//#endregion
|
|
362
|
+
export { ALL_CARDGAMES_INTERESTS, ALL_INTEREST_CATEGORIES, ALL_LEISURE_INTERESTS, ALL_MUSIC_INTERESTS, ALL_PETS_INTERESTS, ALL_SPORTS_INTERESTS, ALL_TRAVEL_INTERESTS, AdminAccountStatus, AttachmentType, AttendanceStatus, BasketballPosition, COLLECTION_ATTRIBUTE_LABEL, COLLECTION_PETS_ATTRIBUTE_LABEL, COMMON_ATTRIBUTE_LABEL, ChallengeStatus, FollowingStatus, INTERESTS_BY_CATEGORY, PID_LENGTH, PID_PREFIX_LENGTH, ReactionType, UOI_ATTRIBUTE_LABEL, UOI_SPORTS_ATTRIBUTE_LABEL, UOI_SPORTS_BASKETBALL_ATTRIBUTE_LABEL, UOI_SPORTS_TENNIS_ATTRIBUTE_LABEL, ZeroCollectionMeta, ZeroGameMeta, ZeroMarketOption, getAvatarR2CdnUrl, getAvatarR2FolderByEntityType, getCollectionAttributeLabel, getCommonAttributeLabel, getEntityTypeByPID, getNearbyIndex, getPIDPrefixByEntityType, getPIDPrefixByProfileType, getPageR2CdnUrl, getProfileTypeByPID, getSubjectR2CdnUrl, getUoiAttributeLabel, isGamePID, isLeaderboardPID, isTeamPID, isUoiPID };
|