@opfr/services 0.29.13 → 0.30.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/dist/index.es.js CHANGED
@@ -20,14 +20,14 @@ _a.index({ unbannedTimestamp: 1 });
20
20
  var xs;
21
21
  const it = ((xs = T) == null ? void 0 : xs.Bans) || F("Bans", _a), Di = async () => await it.find({
22
22
  unbannedTimestamp: { $lte: /* @__PURE__ */ new Date(), $ne: null }
23
- }), y_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
+ }), __ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
24
  __proto__: null,
25
25
  getUnbanUsers: Di
26
- }, Symbol.toStringTag, { value: "Module" })), __ = async (t) => await it.create({
26
+ }, Symbol.toStringTag, { value: "Module" })), g_ = async (t) => await it.create({
27
27
  ...t
28
- }), g_ = async (t) => await it.findOne({ bannedUserId: t }), w_ = async (t) => {
28
+ }), w_ = async (t) => await it.findOne({ bannedUserId: t }), b_ = async (t) => {
29
29
  await it.deleteOne({ bannedUserId: t });
30
- }, b_ = (t) => it.exists({ bannedUserId: t }), Ci = new b({
30
+ }, v_ = (t) => it.exists({ bannedUserId: t }), Ci = new b({
31
31
  betOwner: String,
32
32
  betId: Number,
33
33
  channelId: String,
@@ -50,10 +50,10 @@ const it = ((xs = T) == null ? void 0 : xs.Bans) || F("Bans", _a), Di = async ()
50
50
  }
51
51
  });
52
52
  var Us;
53
- const zs = ((Us = T) == null ? void 0 : Us.Bets) || F("Bets", Ci), v_ = async (t, a = {}) => {
53
+ const zs = ((Us = T) == null ? void 0 : Us.Bets) || F("Bets", Ci), M_ = async (t, a = {}) => {
54
54
  const s = await zs.findById(t, a);
55
55
  return s || null;
56
- }, M_ = async (t) => await zs.create({
56
+ }, k_ = async (t) => await zs.create({
57
57
  ...t
58
58
  }), Xs = new b({
59
59
  senderId: String,
@@ -66,14 +66,14 @@ const zs = ((Us = T) == null ? void 0 : Us.Bets) || F("Bets", Ci), v_ = async (t
66
66
  });
67
67
  Xs.index({ receiverId: 1 });
68
68
  var Ss;
69
- const ga = ((Ss = T) == null ? void 0 : Ss.Invitations) || F("Invitations", Xs), k_ = async (t) => {
69
+ const ga = ((Ss = T) == null ? void 0 : Ss.Invitations) || F("Invitations", Xs), x_ = async (t) => {
70
70
  const a = await ga.findOne({
71
71
  ...t
72
72
  });
73
73
  return a || null;
74
- }, x_ = async (t) => await ga.create({
74
+ }, U_ = async (t) => await ga.create({
75
75
  ...t
76
- }), U_ = async (t) => {
76
+ }), S_ = async (t) => {
77
77
  await ga.deleteMany({
78
78
  ...t
79
79
  });
@@ -2837,7 +2837,7 @@ const Qa = ((Ds = T) == null ? void 0 : Ds.Settings) || F("Settings", qn), L = a
2837
2837
  await L(t, {
2838
2838
  $push: { "crew.crewChannelIds": { channelId: s, crewId: a } }
2839
2839
  });
2840
- }, S_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2840
+ }, D_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2841
2841
  __proto__: null,
2842
2842
  addCrewChannelId: Vc,
2843
2843
  randomizeEditoPrice: Ic,
@@ -2857,7 +2857,7 @@ const Qa = ((Ds = T) == null ? void 0 : Ds.Settings) || F("Settings", qn), L = a
2857
2857
  setSuggestionChannel: Tc
2858
2858
  }, Symbol.toStringTag, { value: "Module" })), zc = async (t) => await Qa.create({
2859
2859
  guildId: t
2860
- }), D_ = async (t, a = {}) => {
2860
+ }), C_ = async (t, a = {}) => {
2861
2861
  const s = await Qa.findOne({ guildId: t }, a);
2862
2862
  return s || zc(t);
2863
2863
  };
@@ -3044,7 +3044,7 @@ const Wn = (t, a) => {
3044
3044
  n && a.push(n);
3045
3045
  }
3046
3046
  return a;
3047
- }, C_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3047
+ }, O_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3048
3048
  __proto__: null,
3049
3049
  getShopItem: Wn,
3050
3050
  getShopItemList: su
@@ -3109,7 +3109,7 @@ const Ha = ((Cs = T) == null ? void 0 : Cs.Shop) || F("Shop", Vn), nu = async (t
3109
3109
  items: [...a]
3110
3110
  }
3111
3111
  });
3112
- }, O_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3112
+ }, B_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3113
3113
  __proto__: null,
3114
3114
  buyShopItem: iu,
3115
3115
  publish: lu,
@@ -3117,10 +3117,10 @@ const Ha = ((Cs = T) == null ? void 0 : Cs.Shop) || F("Shop", Vn), nu = async (t
3117
3117
  updateShopStats: ru
3118
3118
  }, Symbol.toStringTag, { value: "Module" })), du = (t) => Ha.create({
3119
3119
  shopType: t
3120
- }), B_ = async (t, a = {}) => {
3120
+ }), R_ = async (t, a = {}) => {
3121
3121
  const s = await cu({ shopType: t }, a);
3122
3122
  return s || await du(t);
3123
- }, cu = (t, a = {}) => Ha.findOne(t, a), uu = (t, a) => t.commands[a], fu = (t, a) => t.raid[a ? "special" : "classic"], R_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3123
+ }, cu = (t, a = {}) => Ha.findOne(t, a), uu = (t, a) => t.commands[a], fu = (t, a) => t.raid[a ? "special" : "classic"], $_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3124
3124
  __proto__: null,
3125
3125
  getCommandCooldown: uu,
3126
3126
  getRaidCooldown: fu
@@ -3139,7 +3139,7 @@ const Ha = ((Cs = T) == null ? void 0 : Cs.Shop) || F("Shop", Vn), nu = async (t
3139
3139
  qa.index({ user: 1 });
3140
3140
  qa.index({ date: -1 });
3141
3141
  var Os;
3142
- const We = ((Os = T) == null ? void 0 : Os.Reminder) || F("Reminder", qa), pu = async () => await We.find({ date: { $lte: /* @__PURE__ */ new Date() } }), $_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3142
+ const We = ((Os = T) == null ? void 0 : Os.Reminder) || F("Reminder", qa), pu = async () => await We.find({ date: { $lte: /* @__PURE__ */ new Date() } }), T_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3143
3143
  __proto__: null,
3144
3144
  getAllPassedReminder: pu
3145
3145
  }, Symbol.toStringTag, { value: "Module" })), mu = async (t, a) => {
@@ -3169,16 +3169,16 @@ const We = ((Os = T) == null ? void 0 : Os.Reminder) || F("Reminder", qa), pu =
3169
3169
  await mu(t, a);
3170
3170
  }, yu = async (t) => {
3171
3171
  await We.deleteMany({ _id: { $in: t } });
3172
- }, T_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3172
+ }, F_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3173
3173
  __proto__: null,
3174
3174
  addReminder: Wa,
3175
3175
  deleteSelectedReminders: yu,
3176
3176
  removeReminder: hu,
3177
3177
  updateReminderDate: fa
3178
- }, Symbol.toStringTag, { value: "Module" })), F_ = async (t, a = {}) => {
3178
+ }, Symbol.toStringTag, { value: "Module" })), E_ = async (t, a = {}) => {
3179
3179
  const s = await We.findOne({ user: t }, a);
3180
3180
  return s || null;
3181
- }, E_ = async (t, a, s) => await We.create({
3181
+ }, A_ = async (t, a, s) => await We.create({
3182
3182
  user: t,
3183
3183
  date: a,
3184
3184
  type: s
@@ -3266,13 +3266,13 @@ const Lt = ((Bs = T) == null ? void 0 : Bs.UserCooldown) || F("UserCooldown", Zn
3266
3266
  `commands/${a}`,
3267
3267
  new Date(Date.now() + s)
3268
3268
  );
3269
- }, A_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3269
+ }, Y_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3270
3270
  __proto__: null,
3271
3271
  lockUserCommand: Kn,
3272
3272
  reduceRaidCooldown: _u,
3273
3273
  startRaidCooldown: Jn,
3274
3274
  useCommand: gu
3275
- }, Symbol.toStringTag, { value: "Module" })), Y_ = [
3275
+ }, Symbol.toStringTag, { value: "Module" })), I_ = [
3276
3276
  "work",
3277
3277
  "rps",
3278
3278
  "blackjack",
@@ -3281,7 +3281,7 @@ const Lt = ((Bs = T) == null ? void 0 : Bs.UserCooldown) || F("UserCooldown", Zn
3281
3281
  "dice"
3282
3282
  ], er = async (t) => await Lt.create({
3283
3283
  user: t
3284
- }), I_ = async (t, a = {}) => {
3284
+ }), N_ = async (t, a = {}) => {
3285
3285
  const s = await Lt.findOne({ user: t }, a);
3286
3286
  return s || await er(t);
3287
3287
  }, Va = new b(
@@ -3328,16 +3328,16 @@ const ut = ((Rs = T) == null ? void 0 : Rs.UserCrew) || F("UserCrew", Va), tr =
3328
3328
  lastAllMembersDaily: /* @__PURE__ */ new Date()
3329
3329
  }
3330
3330
  });
3331
- }, N_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3331
+ }, P_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3332
3332
  __proto__: null,
3333
3333
  allMembersDailyComplete: ar,
3334
3334
  updatePercent: wu
3335
- }, Symbol.toStringTag, { value: "Module" })), bu = (t) => ut.findOne({ user: t }), P_ = async (t, a, s, n) => await ut.create({
3335
+ }, Symbol.toStringTag, { value: "Module" })), bu = (t) => ut.findOne({ user: t }), j_ = async (t, a, s, n) => await ut.create({
3336
3336
  user: t,
3337
3337
  crew: a,
3338
3338
  percent: n,
3339
3339
  permission: s
3340
- }), j_ = (t) => ut.exists({ user: t }), sr = new b({
3340
+ }), L_ = (t) => ut.exists({ user: t }), sr = new b({
3341
3341
  user: {
3342
3342
  type: b.Types.ObjectId,
3343
3343
  required: !0,
@@ -3372,7 +3372,7 @@ const za = (($s = T) == null ? void 0 : $s.UserDailyReport) || F("UserDailyRepor
3372
3372
  previousMessageSent: a.questMeta.messageSent
3373
3373
  }
3374
3374
  });
3375
- }, L_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3375
+ }, Q_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3376
3376
  __proto__: null,
3377
3377
  updateDailyReport: Mu
3378
3378
  }, Symbol.toStringTag, { value: "Module" })), nr = new b({
@@ -3419,14 +3419,14 @@ const Ht = ((Ts = T) == null ? void 0 : Ts.UserGames) || F("UserGames", nr), Xa
3419
3419
  "guess.tries": 1
3420
3420
  }
3421
3421
  });
3422
- }, Q_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3422
+ }, H_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3423
3423
  __proto__: null,
3424
3424
  resetGuessGame: xu,
3425
3425
  setGuessGame: ku,
3426
3426
  updateGuessGame: Uu
3427
3427
  }, Symbol.toStringTag, { value: "Module" })), rr = async (t) => await Ht.create({
3428
3428
  user: t
3429
- }), H_ = async (t, a) => {
3429
+ }), G_ = async (t, a) => {
3430
3430
  const s = await Ht.findOne({ user: t }, a);
3431
3431
  return s || await rr(t);
3432
3432
  }, Su = (t, a) => {
@@ -3498,7 +3498,7 @@ const Ht = ((Ts = T) == null ? void 0 : Ts.UserGames) || F("UserGames", nr), Xa
3498
3498
  ([n, r]) => n.id === "little_blacksmith" && r !== null
3499
3499
  );
3500
3500
  return (s == null ? void 0 : s[1]) === "full" && a === "chest_3" ? "chest_blacksmith_3" : (s == null ? void 0 : s[1]) === "half" && a === "chest_2" ? "chest_blacksmith_2" : (s == null ? void 0 : s[1]) === "half" && a === "chest_1" ? "chest_blacksmith_1" : a;
3501
- }, G_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3501
+ }, q_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3502
3502
  __proto__: null,
3503
3503
  calcBottleMultiplier: Fu,
3504
3504
  calcMinStreakForWorkLoot: Eu,
@@ -3512,7 +3512,7 @@ const Ht = ((Ts = T) == null ? void 0 : Ts.UserGames) || F("UserGames", nr), Xa
3512
3512
  hasInventoryRequirements: Ou,
3513
3513
  hasRevolutionaryBuff: Au,
3514
3514
  maxCraftQuantity: Du
3515
- }, Symbol.toStringTag, { value: "Module" })), Iu = (t, a) => t.encyclopedia.includes(a), Nu = (t) => t.encyclopedia, q_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3515
+ }, Symbol.toStringTag, { value: "Module" })), Iu = (t, a) => t.encyclopedia.includes(a), Nu = (t) => t.encyclopedia, W_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3516
3516
  __proto__: null,
3517
3517
  getEncyclopedia: Nu,
3518
3518
  hasFoundItem: Iu
@@ -3535,12 +3535,12 @@ const Ja = ((Fs = T) == null ? void 0 : Fs.UserEncyclopedia) || F("UserEncyclope
3535
3535
  await Pu(t, {
3536
3536
  $addToSet: { encyclopedia: { $each: a } }
3537
3537
  });
3538
- }, W_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3538
+ }, V_ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3539
3539
  __proto__: null,
3540
3540
  addItem: Gt
3541
3541
  }, Symbol.toStringTag, { value: "Module" })), lr = async (t) => await Ja.create({
3542
3542
  user: t
3543
- }), V_ = async (t) => {
3543
+ }), z_ = async (t) => {
3544
3544
  const a = await Ja.findOne({ user: t });
3545
3545
  return a || await lr(t);
3546
3546
  }, ju = [
@@ -3555,7 +3555,7 @@ const Ja = ((Fs = T) == null ? void 0 : Fs.UserEncyclopedia) || F("UserEncyclope
3555
3555
  "crewDaily"
3556
3556
  ], or = new xi.EventEmitter(), ve = (t, a, s) => {
3557
3557
  or.emit(t, a, s);
3558
- }, z_ = (t) => {
3558
+ }, X_ = (t) => {
3559
3559
  for (const a of ju)
3560
3560
  or.on(a, (s, n) => {
3561
3561
  t(a, s, n);
@@ -7341,7 +7341,7 @@ class hm extends o {
7341
7341
  e(this, "onUserQuestMetaUpdate", ({ writeDifferentChat: s }) => s.length >= 200);
7342
7342
  }
7343
7343
  }
7344
- const X_ = async (t, a, s, { berry: n, xp: r }) => {
7344
+ const Z_ = async (t, a, s, { berry: n, xp: r }) => {
7345
7345
  const i = await Pr(a).then(
7346
7346
  (A) => A.populate("user", "faction")
7347
7347
  ), d = os(i), c = Er(
@@ -7383,7 +7383,7 @@ const X_ = async (t, a, s, { berry: n, xp: r }) => {
7383
7383
  ).setFont("poppins_bold", 35).setColor((D == null ? void 0 : D.rank.color) ?? "white").draw(!!D).next(
7384
7384
  (A, P) => le(A.Text((c == null ? void 0 : c.name) ?? ""), P)
7385
7385
  ).setColor((c == null ? void 0 : c.rank.color) ?? "white").draw(g && !!c), await s.encode("webp");
7386
- }, Z_ = 10, J_ = 1e7, K_ = 100, eg = [
7386
+ }, J_ = 10, K_ = 1e7, eg = 100, tg = [
7387
7387
  "berry",
7388
7388
  "success_COMMON",
7389
7389
  "success_RARE",
@@ -7657,14 +7657,14 @@ const X_ = async (t, a, s, { berry: n, xp: r }) => {
7657
7657
  },
7658
7658
  items: _m,
7659
7659
  equipments: ym
7660
- }, tg = (t, a) => {
7660
+ }, ag = (t, a) => {
7661
7661
  const s = t.badge, n = t.isFactionBadge;
7662
7662
  return s ? ya(s) ? s.emojis[s.isProgressive.findIndex((r) => r === t.rank.id)] : s.emojis : n ? gm.factions[`b_${a}_${t.rank.id}`] : "";
7663
- }, ag = (t) => {
7663
+ }, sg = (t) => {
7664
7664
  const [a, s] = t.split("_"), n = Object.values(f).find((r) => r.id === a);
7665
7665
  if (n)
7666
7666
  return ya(n) ? n.emojis[n.isProgressive.findIndex((r) => r === s)] : n.emojis;
7667
- }, sg = async (t, a) => {
7667
+ }, ng = async (t, a) => {
7668
7668
  const s = Object.values(dr).find(
7669
7669
  (n) => new n().id === t
7670
7670
  );
@@ -7672,7 +7672,7 @@ const X_ = async (t, a, s, { berry: n, xp: r }) => {
7672
7672
  const n = new s(), r = await n.complete(a, {});
7673
7673
  r && ve("userDaily", a, [[n, r]]);
7674
7674
  }
7675
- }, ng = async (t, a) => {
7675
+ }, rg = async (t, a) => {
7676
7676
  const s = Object.values(Hu).find(
7677
7677
  (n) => new n().id === t
7678
7678
  );
@@ -8203,7 +8203,7 @@ class Nm extends o {
8203
8203
  const yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8204
8204
  __proto__: null,
8205
8205
  DailyAll: Nm
8206
- }, Symbol.toStringTag, { value: "Module" })), rg = [
8206
+ }, Symbol.toStringTag, { value: "Module" })), ig = [
8207
8207
  ...Object.values(pr),
8208
8208
  ...Object.values(mr),
8209
8209
  ...Object.values(fr),
@@ -8238,7 +8238,7 @@ const yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8238
8238
  a.length > 0 && ve("userQuestMetaUpdate", t.user._id, a);
8239
8239
  }, Lm = ["raidUnlock"], _r = new Ui.EventEmitter(), Ct = (t, a, s) => {
8240
8240
  _r.emit(t, a, s);
8241
- }, ig = (t) => {
8241
+ }, lg = (t) => {
8242
8242
  for (const a of Lm)
8243
8243
  _r.on(a, (s, n) => {
8244
8244
  t(a, s, n);
@@ -8521,7 +8521,7 @@ const ye = ((Es = T) == null ? void 0 : Es.UserQuestMeta) || F("UserQuestMeta",
8521
8521
  await k(t, {
8522
8522
  $inc: { "items.chest.total": a }
8523
8523
  });
8524
- }, lg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8524
+ }, og = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8525
8525
  __proto__: null,
8526
8526
  addTotalMinutesInVoice: gh,
8527
8527
  addWrittenTextChannel: hh,
@@ -8729,7 +8729,7 @@ const Ee = ((As = T) == null ? void 0 : As.UserMeta) || F("UserMeta", ft), br =
8729
8729
  if (s < 0 && (!r || !Fe(r)) && (n ?? /* @__PURE__ */ new Date()) <= /* @__PURE__ */ new Date())
8730
8730
  return !0;
8731
8731
  return !1;
8732
- }, og = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8732
+ }, dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8733
8733
  __proto__: null,
8734
8734
  calcBerry: Sh,
8735
8735
  calcBerryGlobalBuff: vr,
@@ -8987,7 +8987,7 @@ const Ee = ((As = T) == null ? void 0 : As.UserMeta) || F("UserMeta", ft), br =
8987
8987
  await I(t, {
8988
8988
  $set: { workUnluckyStreak: 0 }
8989
8989
  });
8990
- }, dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8990
+ }, cg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8991
8991
  __proto__: null,
8992
8992
  addBerry: Mr,
8993
8993
  addCharacteristics: Qh,
@@ -9114,7 +9114,7 @@ const Wt = ((Ys = T) == null ? void 0 : Ys.UserInventory) || F("UserInventory",
9114
9114
  await $e(t, a, n * 4), await $e(t, "enchanted_stone", n), await ke(t, s, n);
9115
9115
  }, ry = async (t, a) => {
9116
9116
  await Me(t, { $addToSet: { recipes: a } });
9117
- }, cg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9117
+ }, ug = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9118
9118
  __proto__: null,
9119
9119
  addEquipments: Ur,
9120
9120
  addInventoryItem: ke,
@@ -9212,7 +9212,7 @@ const Vt = ((Is = T) == null ? void 0 : Is.UserOrnaments) || F("UserOrnaments",
9212
9212
  await ne(t, {
9213
9213
  $addToSet: { unlockedProfileAssets: a }
9214
9214
  });
9215
- }, ug = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9215
+ }, fg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9216
9216
  __proto__: null,
9217
9217
  selectBackground: cy,
9218
9218
  selectTitle: oy,
@@ -9225,7 +9225,7 @@ const Vt = ((Is = T) == null ? void 0 : Is.UserOrnaments) || F("UserOrnaments",
9225
9225
  unlockTitles: ly
9226
9226
  }, Symbol.toStringTag, { value: "Module" })), Rr = async (t) => await Vt.create({
9227
9227
  user: t
9228
- }), fg = async (t, a) => {
9228
+ }), pg = async (t, a) => {
9229
9229
  const s = await Vt.findOne({ user: t }, a);
9230
9230
  return s || await Rr(t);
9231
9231
  }, $r = (t, a) => t.completed.includes(a), Tr = (t, a) => {
@@ -9239,7 +9239,7 @@ const Vt = ((Is = T) == null ? void 0 : Is.UserOrnaments) || F("UserOrnaments",
9239
9239
  return Si.find(
9240
9240
  (n) => n.strength === s && n.faction === a
9241
9241
  );
9242
- }, pg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9242
+ }, mg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9243
9243
  __proto__: null,
9244
9244
  getFactionTitle: Er,
9245
9245
  getFactionTitleStrength: Fr,
@@ -9298,7 +9298,7 @@ const zt = ((Ns = T) == null ? void 0 : Ns.UserQuest) || F("UserQuest", ds), Ot
9298
9298
  }) : await Ot(t, {
9299
9299
  $set: { lastFullComplete: /* @__PURE__ */ new Date(), streak: 1 }
9300
9300
  });
9301
- }, mg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9301
+ }, hg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9302
9302
  __proto__: null,
9303
9303
  completeDailyQuest: Yr,
9304
9304
  completeQuest: Ar,
@@ -9311,9 +9311,10 @@ const zt = ((Ns = T) == null ? void 0 : Ns.UserQuest) || F("UserQuest", ds), Ot
9311
9311
  }, st = (t, a) => {
9312
9312
  var s;
9313
9313
  return (s = t.unlocked) == null ? void 0 : s[a];
9314
- }, fy = (t, a, s) => a in t.obtainedRewards ? t.obtainedRewards[a].includes(s) : !1, hg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9314
+ }, fy = (t, a, s) => a in t.obtainedRewards ? t.obtainedRewards[a].includes(s) : !1, py = (t, a) => t.obtainedRewards[a] ?? [], yg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9315
9315
  __proto__: null,
9316
9316
  alreadyObtainedRaidReward: fy,
9317
+ getObtainedRaidReward: py,
9317
9318
  hasUnlockedRaid: st
9318
9319
  }, Symbol.toStringTag, { value: "Module" })), jr = new b(
9319
9320
  {
@@ -9346,7 +9347,7 @@ const Xt = ((Ps = T) == null ? void 0 : Ps.UserRaid) || F("UserRaid", jr), Ae =
9346
9347
  });
9347
9348
  }, nt = async (t, a) => {
9348
9349
  await Ae(t, { $set: { [`unlocked.${a}`]: !0 } });
9349
- }, py = async (t, a, s, n, r) => {
9350
+ }, my = async (t, a, s, n, r) => {
9350
9351
  const i = Date.now();
9351
9352
  return await Ae(t, {
9352
9353
  $set: {
@@ -9359,31 +9360,31 @@ const Xt = ((Ps = T) == null ? void 0 : Ps.UserRaid) || F("UserRaid", jr), Ae =
9359
9360
  }
9360
9361
  }
9361
9362
  }), await Jn(t, n, r), i;
9362
- }, my = async (t) => {
9363
+ }, hy = async (t) => {
9363
9364
  await Ae(t, {
9364
9365
  $unset: {
9365
9366
  currentRaid: ""
9366
9367
  }
9367
9368
  });
9368
- }, hy = async (t) => {
9369
+ }, yy = async (t) => {
9369
9370
  await Ae(t, {
9370
9371
  $set: {
9371
9372
  "currentRaid.progression": []
9372
9373
  }
9373
9374
  });
9374
- }, yy = async (t, a) => {
9375
+ }, _y = async (t, a) => {
9375
9376
  await Ae(t, {
9376
9377
  $push: {
9377
9378
  "currentRaid.progression": a
9378
9379
  }
9379
9380
  });
9380
- }, _y = async (t, a, s) => {
9381
+ }, gy = async (t, a, s) => {
9381
9382
  await Ae(t, {
9382
9383
  $push: {
9383
9384
  [`obtainedRewards.${a}`]: s
9384
9385
  }
9385
9386
  });
9386
- }, gy = async (t, a) => {
9387
+ }, wy = async (t, a) => {
9387
9388
  await Ae(t, {
9388
9389
  $inc: Object.fromEntries(
9389
9390
  Object.entries(a).map(([s, n]) => [
@@ -9392,34 +9393,34 @@ const Xt = ((Ps = T) == null ? void 0 : Ps.UserRaid) || F("UserRaid", jr), Ae =
9392
9393
  ])
9393
9394
  )
9394
9395
  });
9395
- }, yg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9396
+ }, _g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9396
9397
  __proto__: null,
9397
- addRewardsToRaid: gy,
9398
- claimReward: _y,
9399
- progressRaid: yy,
9400
- resetRaid: my,
9401
- resetRaidProgression: hy,
9402
- startRaid: py,
9398
+ addRewardsToRaid: wy,
9399
+ claimReward: gy,
9400
+ progressRaid: _y,
9401
+ resetRaid: hy,
9402
+ resetRaidProgression: yy,
9403
+ startRaid: my,
9403
9404
  unlockRaid: nt
9404
9405
  }, Symbol.toStringTag, { value: "Module" })), Lr = async (t) => await Xt.create({
9405
9406
  user: t
9406
9407
  }), Qr = async (t) => {
9407
9408
  const a = await Xt.findOne({ user: t });
9408
9409
  return a || await Lr(t);
9409
- }, wy = (t, a, s, n) => {
9410
+ }, by = (t, a, s, n) => {
9410
9411
  var d;
9411
9412
  let r = Vs()[a];
9412
9413
  const i = (d = t.limit) == null ? void 0 : d[a];
9413
9414
  return n === "half" && a === "chest_2" && (r += 2), n === "full" && a === "chest_3" && (r += 1), t.lastShopId !== s ? !1 : !!(r && i && i >= r);
9414
- }, by = (t, a, s, n, r) => {
9415
+ }, vy = (t, a, s, n, r) => {
9415
9416
  var c;
9416
9417
  let i = Vs()[a];
9417
9418
  const d = (c = t.limit) == null ? void 0 : c[a];
9418
9419
  return r === "half" && a === "chest_2" && (i += 2), r === "full" && a === "chest_3" && (i += 1), i ? t.lastShopId !== s ? i : d ? i - d : Math.min(i, n) : n;
9419
- }, _g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9420
+ }, gg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9420
9421
  __proto__: null,
9421
- getShopItemRest: by,
9422
- isShopBuyLimitReached: wy
9422
+ getShopItemRest: vy,
9423
+ isShopBuyLimitReached: by
9423
9424
  }, Symbol.toStringTag, { value: "Module" })), Hr = new b(
9424
9425
  {
9425
9426
  user: {
@@ -9435,12 +9436,12 @@ const Xt = ((Ps = T) == null ? void 0 : Ps.UserRaid) || F("UserRaid", jr), Ae =
9435
9436
  );
9436
9437
  Hr.index({ user: 1 });
9437
9438
  var js;
9438
- const cs = ((js = T) == null ? void 0 : js.UserShop) || F("UserShop", Hr), vy = async (t, a) => {
9439
+ const cs = ((js = T) == null ? void 0 : js.UserShop) || F("UserShop", Hr), My = async (t, a) => {
9439
9440
  await cs.updateOne({ user: t }, a, {
9440
9441
  upsert: !0
9441
9442
  });
9442
- }, My = async (t, a, s, n) => {
9443
- await vy(t, [
9443
+ }, ky = async (t, a, s, n) => {
9444
+ await My(t, [
9444
9445
  {
9445
9446
  $set: {
9446
9447
  [`limit.${a}`]: {
@@ -9455,9 +9456,9 @@ const cs = ((js = T) == null ? void 0 : js.UserShop) || F("UserShop", Hr), vy =
9455
9456
  }
9456
9457
  }
9457
9458
  ]);
9458
- }, gg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9459
+ }, wg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9459
9460
  __proto__: null,
9460
- increaseShopBuyLimit: My
9461
+ increaseShopBuyLimit: ky
9461
9462
  }, Symbol.toStringTag, { value: "Module" })), X = {
9462
9463
  localField: "_id",
9463
9464
  foreignField: "user",
@@ -9531,12 +9532,12 @@ Q.post("deleteOne", async function() {
9531
9532
  await Wt.deleteOne({ user: t }), await Ht.deleteOne({ user: t }), await Vt.deleteOne({ user: t }), await Xt.deleteOne({ user: t }), await ut.deleteOne({ user: t }), await za.deleteOne({ user: t }), await cs.deleteOne({ user: t }), await Ee.deleteOne({ user: t }), await zt.deleteOne({ user: t }), await ye.deleteOne({ user: t }), await Lt.deleteOne({ user: t });
9532
9533
  });
9533
9534
  var Ls;
9534
- const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.create({
9535
+ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), xy = (t) => Z.create({
9535
9536
  userId: t
9536
9537
  }), us = async (t, a = {}) => {
9537
- const s = await xy({ userId: t }, a);
9538
- return s || await ky(t);
9539
- }, xy = (t, a = {}) => Z.findOne(t, a), Uy = () => Z.aggregate([
9538
+ const s = await Uy({ userId: t }, a);
9539
+ return s || await xy(t);
9540
+ }, Uy = (t, a = {}) => Z.findOne(t, a), Sy = () => Z.aggregate([
9540
9541
  {
9541
9542
  $match: {
9542
9543
  birthday: { $ne: null }
@@ -9593,7 +9594,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9593
9594
  nextBirthday: 1
9594
9595
  }
9595
9596
  }
9596
- ]), Sy = async (t) => await us(t, { birthday: 1 }), Dy = async (t, a) => (await Z.aggregate([
9597
+ ]), Dy = async (t) => await us(t, { birthday: 1 }), Cy = async (t, a) => (await Z.aggregate([
9597
9598
  {
9598
9599
  $lookup: {
9599
9600
  from: "usermetas",
@@ -9616,7 +9617,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9616
9617
  rank: 1
9617
9618
  }
9618
9619
  }
9619
- ]))[0], Cy = async (t) => Z.aggregate([
9620
+ ]))[0], Oy = async (t) => Z.aggregate([
9620
9621
  { $match: { faction: t } },
9621
9622
  {
9622
9623
  $lookup: {
@@ -9636,7 +9637,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9636
9637
  "meta.xp.amount": 1
9637
9638
  }
9638
9639
  }
9639
- ]), Oy = async () => Z.aggregate([
9640
+ ]), By = async () => Z.aggregate([
9640
9641
  {
9641
9642
  $lookup: {
9642
9643
  from: "usermetas",
@@ -9655,7 +9656,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9655
9656
  "meta.xp.amount": 1
9656
9657
  }
9657
9658
  }
9658
- ]), By = async () => Z.aggregate([
9659
+ ]), Ry = async () => Z.aggregate([
9659
9660
  {
9660
9661
  $lookup: {
9661
9662
  from: "usermetas",
@@ -9674,7 +9675,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9674
9675
  "meta.berry": 1
9675
9676
  }
9676
9677
  }
9677
- ]), Ry = async () => Z.aggregate([
9678
+ ]), $y = async () => Z.aggregate([
9678
9679
  {
9679
9680
  $lookup: {
9680
9681
  from: "userquests",
@@ -9698,7 +9699,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9698
9699
  "quest.completed": 1
9699
9700
  }
9700
9701
  }
9701
- ]), $y = (t) => {
9702
+ ]), Ty = (t) => {
9702
9703
  const { berry: a, xp: s } = t.meta, { voice: n, amount: r } = s, { unlockedBadges: i, unlockedBackgrounds: d, unlockedTitles: c } = t.ornaments, {
9703
9704
  previousOrnament: m,
9704
9705
  previousCompletedQuest: g,
@@ -9719,7 +9720,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9719
9720
  m.unlockedBackgrounds
9720
9721
  )
9721
9722
  };
9722
- }, Ty = () => Z.aggregate([
9723
+ }, Fy = () => Z.aggregate([
9723
9724
  { $match: { birthday: { $ne: null } } },
9724
9725
  {
9725
9726
  $addFields: {
@@ -9743,7 +9744,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9743
9744
  }
9744
9745
  }
9745
9746
  }
9746
- ]), Fy = async () => Z.aggregate([
9747
+ ]), Ey = async () => Z.aggregate([
9747
9748
  { $match: { "settings.sendDailyReport": { $eq: !0 } } },
9748
9749
  {
9749
9750
  $lookup: {
@@ -9771,70 +9772,70 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9771
9772
  }
9772
9773
  }
9773
9774
  }
9774
- ]), wg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9775
+ ]), bg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9775
9776
  __proto__: null,
9776
- getAllDailyReport: Fy,
9777
- getBerryRanking: By,
9778
- getDailyReport: $y,
9779
- getFactionRank: Dy,
9780
- getFactionRanking: Cy,
9781
- getGlobalRanking: Oy,
9782
- getNextBirthdays: Uy,
9783
- getSuccessRanking: Ry,
9784
- getTodayAllBirthday: Ty,
9785
- getUserBirthday: Sy
9777
+ getAllDailyReport: Ey,
9778
+ getBerryRanking: Ry,
9779
+ getDailyReport: Ty,
9780
+ getFactionRank: Cy,
9781
+ getFactionRanking: Oy,
9782
+ getGlobalRanking: By,
9783
+ getNextBirthdays: Sy,
9784
+ getSuccessRanking: $y,
9785
+ getTodayAllBirthday: Fy,
9786
+ getUserBirthday: Dy
9786
9787
  }, Symbol.toStringTag, { value: "Module" })), Ce = async (t, a, s = !1) => {
9787
9788
  await Z.updateOne(t, a, { upsert: s });
9788
9789
  }, Gr = async (t, a) => {
9789
9790
  await Ce({ _id: t }, { $set: { canChooseFaction: a } });
9790
9791
  }, qr = async (t, a) => {
9791
9792
  await Ce({ _id: t }, { $set: { canChangeFaction: a } });
9792
- }, Ey = async (t, a) => {
9793
+ }, Ay = async (t, a) => {
9793
9794
  await Ce({ userId: t }, { $set: { birthday: a } });
9794
- }, Ay = async (t) => {
9795
+ }, Yy = async (t) => {
9795
9796
  await Ce({ userId: t }, { $set: { birthday: null } });
9796
- }, Yy = async (t, a) => {
9797
+ }, Iy = async (t, a) => {
9797
9798
  await Ce(
9798
9799
  { userId: t },
9799
9800
  { $set: { "settings.sendDailyQuest": a } }
9800
9801
  );
9801
- }, Iy = async (t, a) => {
9802
+ }, Ny = async (t, a) => {
9802
9803
  await Ce(
9803
9804
  { userId: t },
9804
9805
  { $set: { "settings.sendDailyReport": a } }
9805
9806
  );
9806
- }, Ny = async (t, a) => {
9807
+ }, Py = async (t, a) => {
9807
9808
  await Ce(
9808
9809
  { _id: t },
9809
9810
  { $set: { "settings.sort.inventory": a } }
9810
9811
  );
9811
- }, Py = async (t, a, s) => {
9812
+ }, jy = async (t, a, s) => {
9812
9813
  await Ce(
9813
9814
  { _id: t },
9814
9815
  { $set: { [`settings.reminder.${a}`]: s } }
9815
9816
  );
9816
- }, bg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9817
+ }, vg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9817
9818
  __proto__: null,
9818
9819
  canChangeFaction: qr,
9819
9820
  canChooseFaction: Gr,
9820
- removeBirthday: Ay,
9821
- setBirthday: Ey,
9822
- updateInventorySort: Ny,
9823
- updateReminderSettings: Py,
9824
- updateSendDailyQuest: Yy,
9825
- updateSendDailyReport: Iy
9826
- }, Symbol.toStringTag, { value: "Module" })), vg = async (t) => {
9821
+ removeBirthday: Yy,
9822
+ setBirthday: Ay,
9823
+ updateInventorySort: Py,
9824
+ updateReminderSettings: jy,
9825
+ updateSendDailyQuest: Iy,
9826
+ updateSendDailyReport: Ny
9827
+ }, Symbol.toStringTag, { value: "Module" })), Mg = async (t) => {
9827
9828
  await Z.deleteOne({ userId: t });
9828
- }, jy = async (t) => await za.create({
9829
+ }, Ly = async (t) => await za.create({
9829
9830
  user: t
9830
- }), Ly = async (t) => await ye.create({
9831
+ }), Qy = async (t) => await ye.create({
9831
9832
  user: t
9832
- }), Qy = async (t) => await cs.create({
9833
+ }), Hy = async (t) => await cs.create({
9833
9834
  user: t
9834
9835
  }), Ms = (t, a) => {
9835
9836
  switch (t) {
9836
9837
  case "dailyReport":
9837
- return jy(a);
9838
+ return Ly(a);
9838
9839
  case "games":
9839
9840
  return rr(a);
9840
9841
  case "inventory":
@@ -9848,9 +9849,9 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9848
9849
  case "quest":
9849
9850
  return Nr(a);
9850
9851
  case "questMeta":
9851
- return Ly(a);
9852
- case "shop":
9853
9852
  return Qy(a);
9853
+ case "shop":
9854
+ return Hy(a);
9854
9855
  case "cooldown":
9855
9856
  return er(a);
9856
9857
  case "reminder":
@@ -9860,7 +9861,7 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9860
9861
  case "encyclopedia":
9861
9862
  return lr(a);
9862
9863
  }
9863
- }, Hy = async (t, a, s) => {
9864
+ }, Gy = async (t, a, s) => {
9864
9865
  if (Array.isArray(a)) {
9865
9866
  const n = await t.populate(a);
9866
9867
  for (const r of a)
@@ -9887,13 +9888,13 @@ const Z = ((Ls = T) == null ? void 0 : Ls.User) || F("User", Q), ky = (t) => Z.c
9887
9888
  });
9888
9889
  Wr.index({ warnedUserId: 1 });
9889
9890
  var Qs;
9890
- const pt = ((Qs = T) == null ? void 0 : Qs.Warns) || F("Warns", Wr), Gy = async (t) => await pt.find({ warnedUserId: t }), qy = async (t) => await pt.countDocuments({ warnedUserId: t }), Mg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9891
+ const pt = ((Qs = T) == null ? void 0 : Qs.Warns) || F("Warns", Wr), qy = async (t) => await pt.find({ warnedUserId: t }), Wy = async (t) => await pt.countDocuments({ warnedUserId: t }), kg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9891
9892
  __proto__: null,
9892
- getUserWarnCount: qy,
9893
- getUserWarns: Gy
9894
- }, Symbol.toStringTag, { value: "Module" })), kg = async (t) => await pt.findOne({ warnedUserId: t }), xg = async (t) => await pt.create({
9893
+ getUserWarnCount: Wy,
9894
+ getUserWarns: qy
9895
+ }, Symbol.toStringTag, { value: "Module" })), xg = async (t) => await pt.findOne({ warnedUserId: t }), Ug = async (t) => await pt.create({
9895
9896
  ...t
9896
- }), Ug = async (t) => await pt.findByIdAndDelete(t), Wy = async (t) => {
9897
+ }), Sg = async (t) => await pt.findByIdAndDelete(t), Vy = async (t) => {
9897
9898
  var s;
9898
9899
  const a = {};
9899
9900
  for (const n of Object.values(ur)) {
@@ -9912,7 +9913,7 @@ const pt = ((Qs = T) == null ? void 0 : Qs.Warns) || F("Warns", Wr), Gy = async
9912
9913
  Object.values(a).forEach(([n, r]) => {
9913
9914
  ve("crewUpdate", n, r);
9914
9915
  });
9915
- }, Vy = {
9916
+ }, zy = {
9916
9917
  localField: "_id",
9917
9918
  foreignField: "crew",
9918
9919
  justOne: !0
@@ -9946,15 +9947,15 @@ const pt = ((Qs = T) == null ? void 0 : Qs.Warns) || F("Warns", Wr), Gy = async
9946
9947
  Zt.index({ "meta.xp": -1 });
9947
9948
  Zt.virtual("quest", {
9948
9949
  ref: "CrewQuest",
9949
- ...Vy
9950
+ ...zy
9950
9951
  });
9951
9952
  Zt.post("findOneAndUpdate", async function(t) {
9952
- await Wy(t);
9953
+ await Vy(t);
9953
9954
  });
9954
9955
  var Hs;
9955
- const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) => Math.ceil(
9956
+ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), Xy = (t, a) => Math.ceil(
9956
9957
  a * (t.disintegration / 100) * (Vr(t) || 1)
9957
- ), Vr = (t) => /* @__PURE__ */ new Date() >= (t.meta.buffs.xp.expireAt ?? /* @__PURE__ */ new Date(0)) ? !1 : t.meta.buffs.xp.boost, Xy = async (t) => (await mt.aggregate([
9958
+ ), Vr = (t) => /* @__PURE__ */ new Date() >= (t.meta.buffs.xp.expireAt ?? /* @__PURE__ */ new Date(0)) ? !1 : t.meta.buffs.xp.boost, Zy = async (t) => (await mt.aggregate([
9958
9959
  {
9959
9960
  $setWindowFields: {
9960
9961
  sortBy: { "meta.xp": -1 },
@@ -9973,14 +9974,14 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
9973
9974
  rank: 1
9974
9975
  }
9975
9976
  }
9976
- ]))[0], Zy = async () => mt.aggregate([
9977
+ ]))[0], Jy = async () => mt.aggregate([
9977
9978
  { $sort: { "meta.xp": -1 } },
9978
9979
  { $limit: 10 }
9979
- ]), Sg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9980
+ ]), Dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9980
9981
  __proto__: null,
9981
- calcXp: zy,
9982
- getCrewRank: Xy,
9983
- getCrewRanking: Zy,
9982
+ calcXp: Xy,
9983
+ getCrewRank: Zy,
9984
+ getCrewRanking: Jy,
9984
9985
  hasXpBuff: Vr
9985
9986
  }, Symbol.toStringTag, { value: "Module" })), _e = async (t, a) => {
9986
9987
  await mt.findOneAndUpdate({ _id: t }, a, {
@@ -9992,26 +9993,26 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
9992
9993
  }) : await _e(t, {
9993
9994
  $addToSet: { "ornament.unlockedBadges": a.id }
9994
9995
  });
9995
- }, Jy = async (t, a, s) => {
9996
+ }, Ky = async (t, a, s) => {
9996
9997
  await _e(t, {
9997
9998
  $inc: {
9998
9999
  "meta.xp": a,
9999
10000
  [`stats.${s.toHexString()}.xp`]: a
10000
10001
  }
10001
10002
  });
10002
- }, Ky = async (t, a, s) => {
10003
+ }, e_ = async (t, a, s) => {
10003
10004
  await _e(t, {
10004
10005
  $inc: {
10005
10006
  "meta.berry": a,
10006
10007
  [`stats.${s.toHexString()}.berry`]: a
10007
10008
  }
10008
10009
  });
10009
- }, e_ = async (t, a) => {
10010
+ }, t_ = async (t, a) => {
10010
10011
  await _e(t, {
10011
10012
  $inc: { limit: 1 },
10012
10013
  $set: { "meta.berry": -a }
10013
10014
  });
10014
- }, t_ = async (t, a) => {
10015
+ }, a_ = async (t, a) => {
10015
10016
  await _e(t, [
10016
10017
  {
10017
10018
  $set: {
@@ -10038,7 +10039,7 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
10038
10039
  }
10039
10040
  }
10040
10041
  ]);
10041
- }, a_ = async (t, a) => {
10042
+ }, s_ = async (t, a) => {
10042
10043
  await _e(t, [
10043
10044
  {
10044
10045
  $set: {
@@ -10048,9 +10049,9 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
10048
10049
  }
10049
10050
  }
10050
10051
  ]);
10051
- }, s_ = async (t, a) => {
10052
- await _e(t, { $addToSet: { members: a } });
10053
10052
  }, n_ = async (t, a) => {
10053
+ await _e(t, { $addToSet: { members: a } });
10054
+ }, r_ = async (t, a) => {
10054
10055
  const [s, n] = [a - 2, (a - 3) * 2 + 3];
10055
10056
  await _e(t, [
10056
10057
  {
@@ -10066,20 +10067,20 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
10066
10067
  }
10067
10068
  }
10068
10069
  ]);
10069
- }, Dg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10070
+ }, Cg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10070
10071
  __proto__: null,
10071
- addBerry: Ky,
10072
- addMember: s_,
10073
- addXp: Jy,
10074
- addXpBuff: t_,
10075
- applyDisintegration: n_,
10076
- increaseLimit: e_,
10077
- repair: a_,
10072
+ addBerry: e_,
10073
+ addMember: n_,
10074
+ addXp: Ky,
10075
+ addXpBuff: a_,
10076
+ applyDisintegration: r_,
10077
+ increaseLimit: t_,
10078
+ repair: s_,
10078
10079
  unlockBadge: zr
10079
- }, Symbol.toStringTag, { value: "Module" })), Cg = async (t, a = {}) => {
10080
+ }, Symbol.toStringTag, { value: "Module" })), Og = async (t, a = {}) => {
10080
10081
  const s = await mt.findById(t, a);
10081
10082
  return s || null;
10082
- }, Og = async (t, {
10083
+ }, Bg = async (t, {
10083
10084
  name: a,
10084
10085
  description: s,
10085
10086
  channelId: n,
@@ -10096,17 +10097,17 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
10096
10097
  if (!(s != null && s[a]) || !he(s[a], /* @__PURE__ */ new Date()))
10097
10098
  return !1;
10098
10099
  return !0;
10099
- }, Bg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10100
+ }, Rg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10100
10101
  __proto__: null,
10101
10102
  isAllDailyCompleted: Xr
10102
- }, Symbol.toStringTag, { value: "Module" })), r_ = async (t) => {
10103
+ }, Symbol.toStringTag, { value: "Module" })), i_ = async (t) => {
10103
10104
  var n;
10104
10105
  const a = {}, { crew: s } = await t.populate("crew");
10105
10106
  for (const r of Object.values(cr)) {
10106
10107
  const i = new r();
10107
10108
  for (const d of s.members) {
10108
10109
  const c = await us(d, { _id: 1, crew: 1 }).then(
10109
- (m) => Hy(m, "crew", { lastAllMembersDaily: 1 })
10110
+ (m) => Gy(m, "crew", { lastAllMembersDaily: 1 })
10110
10111
  );
10111
10112
  if (c.crew && ((n = i.onCrewQuestUpdate) != null && n.call(i, t, c.crew))) {
10112
10113
  const m = await i.complete(c._id, {});
@@ -10143,7 +10144,7 @@ const mt = ((Hs = T) == null ? void 0 : Hs.Crew) || F("Crew", Zt), zy = (t, a) =
10143
10144
  );
10144
10145
  fs.index({ crew: 1 });
10145
10146
  fs.post("findOneAndUpdate", async function(t) {
10146
- await r_(t);
10147
+ await i_(t);
10147
10148
  });
10148
10149
  var Gs;
10149
10150
  const ps = ((Gs = T) == null ? void 0 : Gs.CrewQuest) || F("CrewQuest", fs), Jt = async (t, a) => {
@@ -10163,28 +10164,28 @@ const ps = ((Gs = T) == null ? void 0 : Gs.CrewQuest) || F("CrewQuest", fs), Jt
10163
10164
  }
10164
10165
  }
10165
10166
  ]);
10166
- }, i_ = async (t, a) => {
10167
+ }, l_ = async (t, a) => {
10167
10168
  await Jt(t, {
10168
10169
  $set: {
10169
10170
  "meta.actualVoiceMembers.amount": a,
10170
10171
  "meta.actualVoiceMembers.connectedAt": /* @__PURE__ */ new Date()
10171
10172
  }
10172
10173
  });
10173
- }, l_ = async (t, a) => {
10174
+ }, o_ = async (t, a) => {
10174
10175
  await Jt(t, {
10175
10176
  $set: {
10176
10177
  "meta.maxVoiceMembers": a
10177
10178
  }
10178
10179
  });
10179
- }, Rg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10180
+ }, $g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10180
10181
  __proto__: null,
10181
10182
  completeDailyQuest: Jr,
10182
10183
  completeQuest: Zr,
10183
- setActualVoiceMembers: i_,
10184
- setMaxVoiceMembers: l_
10184
+ setActualVoiceMembers: l_,
10185
+ setMaxVoiceMembers: o_
10185
10186
  }, Symbol.toStringTag, { value: "Module" })), Kr = async (t) => await ps.create({
10186
10187
  crew: t
10187
- }), $g = async (t) => {
10188
+ }), Tg = async (t) => {
10188
10189
  const a = await ps.findOne({ crew: t });
10189
10190
  return a || await Kr(t);
10190
10191
  }, ks = (t, a) => {
@@ -10192,7 +10193,7 @@ const ps = ((Gs = T) == null ? void 0 : Gs.CrewQuest) || F("CrewQuest", fs), Jt
10192
10193
  case "quest":
10193
10194
  return Kr(a);
10194
10195
  }
10195
- }, Tg = async (t, a, s) => {
10196
+ }, Fg = async (t, a, s) => {
10196
10197
  if (Array.isArray(a)) {
10197
10198
  const n = await t.populate(a);
10198
10199
  for (const r of a)
@@ -10211,25 +10212,25 @@ const ps = ((Gs = T) == null ? void 0 : Gs.CrewQuest) || F("CrewQuest", fs), Jt
10211
10212
  t._id
10212
10213
  )), n;
10213
10214
  }
10214
- }, Fg = (t) => {
10215
+ }, Eg = (t) => {
10215
10216
  ni(t);
10216
10217
  };
10217
- class Eg extends ri.ObjectId {
10218
+ class Ag extends ri.ObjectId {
10218
10219
  }
10219
10220
  export {
10220
- rg as ALL_QUESTS,
10221
- J_ as BET_MAX_VALUE,
10222
- Z_ as BET_MIN_VALUE,
10221
+ ig as ALL_QUESTS,
10222
+ K_ as BET_MAX_VALUE,
10223
+ J_ as BET_MIN_VALUE,
10223
10224
  Xc as BackgroundShopItem,
10224
10225
  Zc as BoostXpShopItem,
10225
- Y_ as COOLDOWN_COMMANDS,
10226
+ I_ as COOLDOWN_COMMANDS,
10226
10227
  Jc as ChestShopItem,
10227
10228
  Kc as CraftShopItem,
10228
10229
  cr as CrewQuestQuests,
10229
10230
  ur as CrewQuests,
10230
- K_ as EDITO_READ,
10231
- Eg as ObjectId,
10232
- eg as QUEST_ASSET_IMAGES,
10231
+ eg as EDITO_READ,
10232
+ Ag as ObjectId,
10233
+ tg as QUEST_ASSET_IMAGES,
10233
10234
  o as Quest,
10234
10235
  eu as RepairShopItem,
10235
10236
  tu as StoreShopItem,
@@ -10240,106 +10241,106 @@ export {
10240
10241
  mr as UserOrnamentsQuests,
10241
10242
  hr as UserQuestMetaQuests,
10242
10243
  yr as UserQuestQuests,
10243
- b_ as banExists,
10244
- y_ as banGetters,
10244
+ v_ as banExists,
10245
+ __ as banGetters,
10245
10246
  it as banModel,
10246
10247
  zs as betModel,
10247
- ng as completeCrewQuest,
10248
- sg as completeDailyQuest,
10249
- Fg as connectToServices,
10250
- __ as createBan,
10251
- M_ as createBet,
10252
- Og as createCrew,
10248
+ rg as completeCrewQuest,
10249
+ ng as completeDailyQuest,
10250
+ Eg as connectToServices,
10251
+ g_ as createBan,
10252
+ k_ as createBet,
10253
+ Bg as createCrew,
10253
10254
  Kr as createCrewQuest,
10254
- x_ as createInvitations,
10255
- E_ as createReminder,
10255
+ U_ as createInvitations,
10256
+ A_ as createReminder,
10256
10257
  zc as createSettings,
10257
- P_ as createUserCrew,
10258
- xg as createWarn,
10259
- Sg as crewGetters,
10258
+ j_ as createUserCrew,
10259
+ Ug as createWarn,
10260
+ Dg as crewGetters,
10260
10261
  mt as crewModel,
10261
- Bg as crewQuestGetters,
10262
+ Rg as crewQuestGetters,
10262
10263
  ps as crewQuestModel,
10263
- Rg as crewQuestUpdates,
10264
- Dg as crewUpdates,
10265
- w_ as deleteBan,
10266
- U_ as deleteInvitations,
10267
- vg as deleteUserById,
10268
- Ug as deleteWarn,
10264
+ $g as crewQuestUpdates,
10265
+ Cg as crewUpdates,
10266
+ b_ as deleteBan,
10267
+ S_ as deleteInvitations,
10268
+ Mg as deleteUserById,
10269
+ Sg as deleteWarn,
10269
10270
  ve as emitQuestEvent,
10270
10271
  Ct as emitRaidEvent,
10271
- kg as finWarnById,
10272
- g_ as findBan,
10273
- v_ as findBetById,
10274
- Cg as findCrewById,
10275
- $g as findCrewQuest,
10276
- k_ as findInvitations,
10277
- F_ as findReminder,
10278
- D_ as findSettingsByGuildId,
10272
+ xg as finWarnById,
10273
+ w_ as findBan,
10274
+ M_ as findBetById,
10275
+ Og as findCrewById,
10276
+ Tg as findCrewQuest,
10277
+ x_ as findInvitations,
10278
+ E_ as findReminder,
10279
+ C_ as findSettingsByGuildId,
10279
10280
  cu as findShop,
10280
- B_ as findShopByType,
10281
- xy as findUser,
10281
+ R_ as findShopByType,
10282
+ Uy as findUser,
10282
10283
  us as findUserById,
10283
- I_ as findUserCooldown,
10284
+ N_ as findUserCooldown,
10284
10285
  bu as findUserCrew,
10285
- V_ as findUserEncyclopedia,
10286
- H_ as findUserGames,
10286
+ z_ as findUserEncyclopedia,
10287
+ G_ as findUserGames,
10287
10288
  ns as findUserInventory,
10288
10289
  qt as findUserMeta,
10289
- fg as findUserOrnaments,
10290
+ pg as findUserOrnaments,
10290
10291
  Pr as findUserQuest,
10291
10292
  Qr as findUserRaid,
10292
- ag as getBadgeEmojisFromId,
10293
- tg as getQuestBadgeEmojis,
10293
+ sg as getBadgeEmojisFromId,
10294
+ ag as getQuestBadgeEmojis,
10294
10295
  ga as invitationsModel,
10295
- z_ as onQuestEvent,
10296
- ig as onRaidEvent,
10297
- Tg as populateCrew,
10298
- Hy as populateUser,
10299
- X_ as questCanvas,
10300
- $_ as reminderGetters,
10296
+ X_ as onQuestEvent,
10297
+ lg as onRaidEvent,
10298
+ Fg as populateCrew,
10299
+ Gy as populateUser,
10300
+ Z_ as questCanvas,
10301
+ T_ as reminderGetters,
10301
10302
  We as reminderModel,
10302
- T_ as reminderUpdates,
10303
+ F_ as reminderUpdates,
10303
10304
  Qa as settingsModel,
10304
- S_ as settingsUpdates,
10305
- C_ as shopGetters,
10305
+ D_ as settingsUpdates,
10306
+ O_ as shopGetters,
10306
10307
  Ha as shopModel,
10307
- O_ as shopUpdates,
10308
- R_ as userCooldownGetters,
10308
+ B_ as shopUpdates,
10309
+ $_ as userCooldownGetters,
10309
10310
  Lt as userCooldownModel,
10310
- A_ as userCooldownUpdates,
10311
- j_ as userCrewExists,
10311
+ Y_ as userCooldownUpdates,
10312
+ L_ as userCrewExists,
10312
10313
  ut as userCrewModel,
10313
- N_ as userCrewUpdates,
10314
+ P_ as userCrewUpdates,
10314
10315
  za as userDailyReportModel,
10315
- L_ as userDailyReportUpdates,
10316
- q_ as userEncyclopediaGetters,
10316
+ Q_ as userDailyReportUpdates,
10317
+ W_ as userEncyclopediaGetters,
10317
10318
  Ja as userEncyclopediaModel,
10318
- W_ as userEncyclopediaUpdates,
10319
+ V_ as userEncyclopediaUpdates,
10319
10320
  Ht as userGamesModel,
10320
- Q_ as userGamesUpdates,
10321
- wg as userGetters,
10322
- G_ as userInventoryGetters,
10321
+ H_ as userGamesUpdates,
10322
+ bg as userGetters,
10323
+ q_ as userInventoryGetters,
10323
10324
  Wt as userInventoryModel,
10324
- cg as userInventoryUpdates,
10325
- og as userMetaGetters,
10325
+ ug as userInventoryUpdates,
10326
+ dg as userMetaGetters,
10326
10327
  Ee as userMetaModel,
10327
- dg as userMetaUpdates,
10328
+ cg as userMetaUpdates,
10328
10329
  Z as userModel,
10329
10330
  Vt as userOrnamentsModel,
10330
- ug as userOrnamentsUpdates,
10331
- pg as userQuestGetters,
10331
+ fg as userOrnamentsUpdates,
10332
+ mg as userQuestGetters,
10332
10333
  ye as userQuestMetaModel,
10333
- lg as userQuestMetaUpdates,
10334
+ og as userQuestMetaUpdates,
10334
10335
  zt as userQuestModel,
10335
- mg as userQuestUpdates,
10336
- hg as userRaidGetters,
10336
+ hg as userQuestUpdates,
10337
+ yg as userRaidGetters,
10337
10338
  Xt as userRaidModel,
10338
- yg as userRaidUpdates,
10339
- _g as userShopGetters,
10339
+ _g as userRaidUpdates,
10340
+ gg as userShopGetters,
10340
10341
  cs as userShopModel,
10341
- gg as userShopUpdates,
10342
- bg as userUpdates,
10343
- Mg as warnGetters,
10342
+ wg as userShopUpdates,
10343
+ vg as userUpdates,
10344
+ kg as warnGetters,
10344
10345
  pt as warnModel
10345
10346
  };