strapi-plugin-comments 3.0.15 → 3.0.16

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.
@@ -3984,6 +3984,11 @@ const ua = (i) => {
3984
3984
  (M) => !Object.keys(M).includes("removed")
3985
3985
  ), P = m.$or?.some((M) => M.removed);
3986
3986
  let I = {
3987
+ reports: {
3988
+ where: {
3989
+ resolved: !1
3990
+ }
3991
+ },
3987
3992
  ...A
3988
3993
  }, U = {
3989
3994
  threadOf: {
@@ -3996,6 +4001,11 @@ const ua = (i) => {
3996
4001
  if ("author" in A) {
3997
4002
  const { author: M, ...Z } = A;
3998
4003
  I = {
4004
+ reports: {
4005
+ where: {
4006
+ resolved: !1
4007
+ }
4008
+ },
3999
4009
  ...Z,
4000
4010
  authorUser: M
4001
4011
  }, U = {
@@ -6083,7 +6093,15 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6083
6093
  page: Xr.default(1),
6084
6094
  withCount: Iy.optional().default(!1)
6085
6095
  }).optional()
6086
- }), Im = (i) => {
6096
+ }), qy = v.record(v.union([
6097
+ v.union([
6098
+ v.boolean(),
6099
+ v.literal("true").transform(() => !0),
6100
+ v.literal("false").transform(() => !1),
6101
+ v.literal("*")
6102
+ ]),
6103
+ v.record(v.any())
6104
+ ])).optional(), Im = (i) => {
6087
6105
  const u = wm({
6088
6106
  id: !0,
6089
6107
  content: !0,
@@ -6109,15 +6127,15 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6109
6127
  })
6110
6128
  ).optional(),
6111
6129
  isAdmin: v.boolean().optional().default(!1),
6112
- populate: v.record(v.union([v.boolean(), v.object({ populate: v.boolean() })])).optional(),
6130
+ populate: qy,
6113
6131
  limit: Xr.optional(),
6114
6132
  skip: Xr.optional(),
6115
6133
  locale: v.string().optional()
6116
6134
  }).merge(Gy(i)).merge(zy);
6117
- }, qy = (i, u, o) => Nt(Im(i).safeParse({
6135
+ }, Hy = (i, u, o) => Nt(Im(i).safeParse({
6118
6136
  ...o,
6119
6137
  relation: u
6120
- })), Hy = (i, u, o) => {
6138
+ })), Yy = (i, u, o) => {
6121
6139
  const h = Im(i).pick({
6122
6140
  sort: !0,
6123
6141
  fields: !0,
@@ -6137,7 +6155,7 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6137
6155
  ...o,
6138
6156
  relation: u
6139
6157
  }));
6140
- }, Yy = (i, u) => {
6158
+ }, Qy = (i, u) => {
6141
6159
  const o = Im([]).pick({
6142
6160
  sort: !0,
6143
6161
  fields: !0,
@@ -6157,16 +6175,16 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6157
6175
  ...u,
6158
6176
  ...i
6159
6177
  }));
6160
- }, Qy = (i) => v.object({
6178
+ }, Jy = (i) => v.object({
6161
6179
  relation: Ff(i[Ir.ENABLED_COLLECTIONS]),
6162
6180
  commentId: Xr,
6163
6181
  content: v.string().min(1),
6164
6182
  reason: v.nativeEnum(i.reportReasons)
6165
- }), Jy = (i, u) => Nt(Qy(i).safeParse(u)), Xy = (i) => v.object({
6183
+ }), Xy = (i, u) => Nt(Jy(i).safeParse(u)), Zy = (i) => v.object({
6166
6184
  relation: Ff(i),
6167
6185
  commentId: v.union([v.string(), v.number()]),
6168
6186
  authorId: v.union([v.string(), v.number()])
6169
- }), Zy = (i, u) => Nt(Xy(i).safeParse(u)), Ky = ({ strapi: i }) => ({
6187
+ }), Ky = (i, u) => Nt(Zy(i).safeParse(u)), e_ = ({ strapi: i }) => ({
6170
6188
  getService(u) {
6171
6189
  return ft(i, u);
6172
6190
  },
@@ -6307,7 +6325,7 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6307
6325
  pageSize: v.number(),
6308
6326
  pageCount: v.number(),
6309
6327
  total: v.number()
6310
- }), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), hv = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), e_ = v.object({
6328
+ }), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), hv = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), t_ = v.object({
6311
6329
  id: v.number(),
6312
6330
  documentId: v.string().nullable(),
6313
6331
  content: v.string(),
@@ -6322,13 +6340,13 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6322
6340
  {
6323
6341
  gotThread: v.boolean().nullable().optional(),
6324
6342
  threadFirstItemId: v.number().nullable().optional(),
6325
- reports: v.array(e_).default([]),
6343
+ reports: v.array(t_).default([]),
6326
6344
  author: v.any()
6327
6345
  }
6328
6346
  )
6329
6347
  ), ul = Bm.extend({
6330
6348
  threadOf: v.lazy(() => v.union([v.number(), Bm])).nullable().optional()
6331
- }), t_ = v.object({
6349
+ }), n_ = v.object({
6332
6350
  id: v.number(),
6333
6351
  uid: v.string(),
6334
6352
  documentId: v.string(),
@@ -6336,17 +6354,17 @@ const av = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
6336
6354
  locale: v.string().nullable().optional()
6337
6355
  });
6338
6356
  ul.omit({ related: !0 }).extend({
6339
- related: t_.nullable().optional()
6357
+ related: n_.nullable().optional()
6340
6358
  });
6341
- const n_ = v.array(ul), r_ = v.object({
6359
+ const r_ = v.array(ul), i_ = v.object({
6342
6360
  pagination: fv,
6343
6361
  results: v.array(ul)
6344
6362
  }), ia = {
6345
- findMany: n_,
6346
- findWithCount: r_,
6363
+ findMany: r_,
6364
+ findWithCount: i_,
6347
6365
  findOne: ul,
6348
6366
  create: ul
6349
- }, i_ = v.object({
6367
+ }, o_ = v.object({
6350
6368
  id: v.number(),
6351
6369
  documentId: v.string(),
6352
6370
  content: v.string(),
@@ -6375,11 +6393,11 @@ const n_ = v.array(ul), r_ = v.object({
6375
6393
  updatedAt: v.string(),
6376
6394
  publishedAt: v.string().nullable(),
6377
6395
  locale: v.string().nullable(),
6378
- related: i_.nullable().optional()
6379
- }), o_ = v.object({
6396
+ related: o_.nullable().optional()
6397
+ }), u_ = v.object({
6380
6398
  results: v.array(pv),
6381
6399
  pagination: fv
6382
- }), u_ = v.object({
6400
+ }), a_ = v.object({
6383
6401
  id: v.number(),
6384
6402
  documentId: v.string().nullable(),
6385
6403
  content: v.string(),
@@ -6389,7 +6407,7 @@ const n_ = v.array(ul), r_ = v.object({
6389
6407
  updatedAt: v.string(),
6390
6408
  publishedAt: v.string().nullable(),
6391
6409
  locale: v.string().nullable()
6392
- }), a_ = v.array(v.object({
6410
+ }), s_ = v.array(v.object({
6393
6411
  id: v.number(),
6394
6412
  documentId: v.string().nullable(),
6395
6413
  content: v.string(),
@@ -6401,11 +6419,11 @@ const n_ = v.array(ul), r_ = v.object({
6401
6419
  locale: v.string().nullable(),
6402
6420
  related: cv.nullable()
6403
6421
  })), Of = {
6404
- findMany: a_,
6405
- findPage: o_,
6406
- update: u_,
6422
+ findMany: s_,
6423
+ findPage: u_,
6424
+ update: a_,
6407
6425
  create: pv
6408
- }, s_ = (i) => {
6426
+ }, l_ = (i) => {
6409
6427
  const u = lr(i, "comment-report"), o = i.query(u);
6410
6428
  return {
6411
6429
  async findPage(h) {
@@ -6428,7 +6446,7 @@ const n_ = v.array(ul), r_ = v.object({
6428
6446
  return o.create(h).then(Fi(m, Of.create));
6429
6447
  }
6430
6448
  };
6431
- }, Di = Te.once(s_), l_ = (i) => {
6449
+ }, Di = Te.once(l_), c_ = (i) => {
6432
6450
  const u = lr(i, "comment");
6433
6451
  return {
6434
6452
  async findMany(o) {
@@ -6462,7 +6480,7 @@ const n_ = v.array(ul), r_ = v.object({
6462
6480
  return i.query(u).create(o).then(Fi(h, ia.create));
6463
6481
  }
6464
6482
  };
6465
- }, it = Te.once(l_), c_ = (i) => ({
6483
+ }, it = Te.once(c_), f_ = (i) => ({
6466
6484
  getLocalConfig(u, o) {
6467
6485
  return i.config.get([Tv, u].filter(Boolean).join("."), o);
6468
6486
  },
@@ -6523,7 +6541,7 @@ const n_ = v.array(ul), r_ = v.object({
6523
6541
  async restore() {
6524
6542
  return await (await this.getStore()).delete({ key: "config" }), this.get();
6525
6543
  }
6526
- }), Uf = Te.once(c_), f_ = ({ strapi: i }) => ({
6544
+ }), Uf = Te.once(f_), h_ = ({ strapi: i }) => ({
6527
6545
  getService(u) {
6528
6546
  return ft(i, u);
6529
6547
  },
@@ -6543,7 +6561,7 @@ const n_ = v.array(ul), r_ = v.object({
6543
6561
  async findAllFlat(u) {
6544
6562
  const o = await this.getStoreRepository().get(!0);
6545
6563
  if (pe(o)) {
6546
- const h = Y(o), m = qy(h.enabledCollections, u.params.relation, u.query);
6564
+ const h = Y(o), m = Hy(h.enabledCollections, u.params.relation, u.query);
6547
6565
  if (pe(m))
6548
6566
  return this.getService("common").findAllFlat(
6549
6567
  ua(m.right)
@@ -6555,7 +6573,7 @@ const n_ = v.array(ul), r_ = v.object({
6555
6573
  async findAllInHierarchy(u) {
6556
6574
  const o = await this.getStoreRepository().get(!0);
6557
6575
  if (pe(o)) {
6558
- const h = Y(o), m = Hy(h.enabledCollections, u.params.relation, u.query);
6576
+ const h = Y(o), m = Yy(h.enabledCollections, u.params.relation, u.query);
6559
6577
  if (pe(m))
6560
6578
  return this.getService("common").findAllInHierarchy(
6561
6579
  ua(m.right)
@@ -6565,7 +6583,7 @@ const n_ = v.array(ul), r_ = v.object({
6565
6583
  throw ce(u, Y(o));
6566
6584
  },
6567
6585
  async findAllPerAuthor(u) {
6568
- const o = Yy(u.params, u.query);
6586
+ const o = Qy(u.params, u.query);
6569
6587
  if (pe(o))
6570
6588
  return this.getService("common").findAllPerAuthor(
6571
6589
  ua(o.right),
@@ -6593,7 +6611,7 @@ const n_ = v.array(ul), r_ = v.object({
6593
6611
  async reportAbuse(u) {
6594
6612
  const { state: o } = u, { user: h } = o, m = await this.getStoreRepository().get(!0);
6595
6613
  if (pe(m)) {
6596
- const A = Y(m), E = Jy(A, {
6614
+ const A = Y(m), E = Xy(A, {
6597
6615
  ...u.request.body,
6598
6616
  ...u.params
6599
6617
  });
@@ -6609,7 +6627,7 @@ const n_ = v.array(ul), r_ = v.object({
6609
6627
  async removeComment(u) {
6610
6628
  const { state: o } = u, { user: h } = o, m = await this.getStoreRepository().get(!0);
6611
6629
  if (pe(m)) {
6612
- const A = Y(m), E = Zy(A.enabledCollections, {
6630
+ const A = Y(m), E = Ky(A.enabledCollections, {
6613
6631
  ...u.query,
6614
6632
  ...u.params
6615
6633
  });
@@ -6622,7 +6640,7 @@ const n_ = v.array(ul), r_ = v.object({
6622
6640
  }
6623
6641
  throw ce(u, Y(m));
6624
6642
  }
6625
- }), h_ = ({ strapi: i }) => {
6643
+ }), p_ = ({ strapi: i }) => {
6626
6644
  const u = ft(i, "settings");
6627
6645
  return {
6628
6646
  async get(o) {
@@ -6660,11 +6678,11 @@ const n_ = v.array(ul), r_ = v.object({
6660
6678
  }
6661
6679
  }
6662
6680
  };
6663
- }, p_ = {
6664
- admin: Ky,
6665
- client: f_,
6666
- settings: h_
6667
- }, d_ = [
6681
+ }, d_ = {
6682
+ admin: e_,
6683
+ client: h_,
6684
+ settings: p_
6685
+ }, g_ = [
6668
6686
  {
6669
6687
  method: "GET",
6670
6688
  path: "/moderate/all",
@@ -6801,7 +6819,7 @@ const n_ = v.array(ul), r_ = v.object({
6801
6819
  policies: []
6802
6820
  }
6803
6821
  }
6804
- ], g_ = [
6822
+ ], m_ = [
6805
6823
  {
6806
6824
  method: "PUT",
6807
6825
  path: "/settings/config",
@@ -6842,10 +6860,10 @@ const n_ = v.array(ul), r_ = v.object({
6842
6860
  policies: []
6843
6861
  }
6844
6862
  }
6845
- ], m_ = [
6846
- ...d_,
6847
- ...g_
6848
6863
  ], v_ = [
6864
+ ...g_,
6865
+ ...m_
6866
+ ], y_ = [
6849
6867
  {
6850
6868
  method: "GET",
6851
6869
  path: "/:relation",
@@ -6958,14 +6976,14 @@ const n_ = v.array(ul), r_ = v.object({
6958
6976
  }
6959
6977
  }
6960
6978
  }
6961
- ], y_ = {
6979
+ ], __ = {
6962
6980
  "content-api": {
6963
6981
  type: "content-api",
6964
- routes: v_
6982
+ routes: y_
6965
6983
  },
6966
6984
  admin: {
6967
6985
  type: "admin",
6968
- routes: m_
6986
+ routes: v_
6969
6987
  }
6970
6988
  };
6971
6989
  class fn extends Error {
@@ -7042,10 +7060,10 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7042
7060
  };
7043
7061
  }, Tf = (i) => {
7044
7062
  throw i ? new fn(401, "Not authenticated") : new fn(403, "Not authorized");
7045
- }, __ = (i) => {
7063
+ }, b_ = (i) => {
7046
7064
  const { lastname: u, username: o, firstname: h } = i;
7047
7065
  return u && h ? `${h} ${u}` : o || h || "";
7048
- }, b_ = Te.once((i) => ({
7066
+ }, w_ = Te.once((i) => ({
7049
7067
  findAll: {
7050
7068
  createParams(u, o, h, m, A) {
7051
7069
  const [E, T] = mm(u), R = {
@@ -7125,8 +7143,8 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7125
7143
  };
7126
7144
  }
7127
7145
  }
7128
- })), w_ = ({ strapi: i }) => {
7129
- const u = b_(i);
7146
+ })), A_ = ({ strapi: i }) => {
7147
+ const u = w_(i);
7130
7148
  return {
7131
7149
  getCommonService() {
7132
7150
  return ft(i, "common");
@@ -7372,7 +7390,7 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7372
7390
  content: m,
7373
7391
  threadOf: o,
7374
7392
  authorId: h.id,
7375
- authorName: __(h),
7393
+ authorName: b_(h),
7376
7394
  authorEmail: h.email,
7377
7395
  related: A.related,
7378
7396
  isAdminComment: !0
@@ -7389,13 +7407,13 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7389
7407
  return this.getCommonService().sanitizeCommentEntity(m, []);
7390
7408
  }
7391
7409
  };
7392
- }, A_ = async (i, u) => {
7410
+ }, S_ = async (i, u) => {
7393
7411
  try {
7394
7412
  return il(await i());
7395
7413
  } catch {
7396
7414
  return iv(u);
7397
7415
  }
7398
- }, S_ = ({ strapi: i }) => {
7416
+ }, E_ = ({ strapi: i }) => {
7399
7417
  const u = async (o, h) => {
7400
7418
  if (h) {
7401
7419
  const m = await i.query("plugin::users-permissions.user").findOne({
@@ -7431,7 +7449,7 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7431
7449
  const Z = (await this.getCommonService().getConfig(oa.APPROVAL_FLOW, [])).includes(P) || U.requireCommentsApproval, j = await this.getCommonService().getConfig(
7432
7450
  oa.AUTHOR_BLOCKED_PROPS,
7433
7451
  []
7434
- ), K = await A_(
7452
+ ), K = await S_(
7435
7453
  async () => m ? await this.getCommonService().findOne({ id: m, related: o, locale: T || null }) : null,
7436
7454
  new fn(400, "Thread does not exist")
7437
7455
  );
@@ -7633,7 +7651,7 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7633
7651
  }
7634
7652
  }
7635
7653
  };
7636
- }, E_ = 10, O_ = ["id"], T_ = ({ strapi: i }) => ({
7654
+ }, O_ = 10, T_ = ["id"], I_ = ({ strapi: i }) => ({
7637
7655
  async getConfig(u, o, h = !1) {
7638
7656
  const m = Uf(i), A = await m.getConfig();
7639
7657
  return u && !h ? Te.get(A, u, o) : h ? m.getLocalConfig(u, o) : A;
@@ -7671,7 +7689,7 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7671
7689
  filters: P = {},
7672
7690
  locale: I
7673
7691
  }, U) {
7674
- const M = E.filter((Qe) => !O_.includes(Qe)), Z = ["id", "related"].filter((Qe) => !M.includes(Qe)), j = {
7692
+ const M = E.filter((Qe) => !T_.includes(Qe)), Z = ["id", "related"].filter((Qe) => !M.includes(Qe)), j = {
7675
7693
  authorUser: !0,
7676
7694
  ...Te.isObject(A) ? A : {}
7677
7695
  }, K = T ? [] : await this.getConfig(Ir.AUTHOR_BLOCKED_PROPS, []), [te, Q] = mm(m), we = {
@@ -7684,7 +7702,7 @@ const dv = (i, u = null, o = "threadOf", h = !1, m = !1) => i.filter((A) => {
7684
7702
  },
7685
7703
  populate: j,
7686
7704
  ...we,
7687
- pageSize: R?.pageSize || o || E_,
7705
+ pageSize: R?.pageSize || o || O_,
7688
7706
  page: R?.page || (h ? Math.floor(h / o) : 1) || 1
7689
7707
  }, { results: Pe, pagination: Ge } = await it(i).findWithCount(me), Ye = await Promise.all(
7690
7708
  Pe.map(async (Qe) => {
@@ -11017,7 +11035,7 @@ function print() { __p += __j.call(arguments, '') }
11017
11035
  Hn ? ((Hn.exports = mn)._ = mn, Da._ = mn) : at._ = mn;
11018
11036
  }).call(xr);
11019
11037
  })(xf, xf.exports);
11020
- var I_ = xf.exports, mv = {};
11038
+ var C_ = xf.exports, mv = {};
11021
11039
  (function(i) {
11022
11040
  i.aliasToReal = {
11023
11041
  // Lodash aliases.
@@ -11521,8 +11539,8 @@ var I_ = xf.exports, mv = {};
11521
11539
  zipObjectDeep: !0
11522
11540
  };
11523
11541
  })(mv);
11524
- var C_ = {}, ct = mv, x_ = C_, km = Array.prototype.push;
11525
- function R_(i, u) {
11542
+ var x_ = {}, ct = mv, R_ = x_, km = Array.prototype.push;
11543
+ function N_(i, u) {
11526
11544
  return u == 2 ? function(o, h) {
11527
11545
  return i.apply(void 0, arguments);
11528
11546
  } : function(o) {
@@ -11541,12 +11559,12 @@ function Vm(i) {
11541
11559
  o[u] = i[u];
11542
11560
  return o;
11543
11561
  }
11544
- function N_(i) {
11562
+ function L_(i) {
11545
11563
  return function(u) {
11546
11564
  return i({}, u);
11547
11565
  };
11548
11566
  }
11549
- function L_(i, u) {
11567
+ function P_(i, u) {
11550
11568
  return function() {
11551
11569
  for (var o = arguments.length, h = o - 1, m = Array(o); o--; )
11552
11570
  m[o] = arguments[o];
@@ -11576,7 +11594,7 @@ function Am(i, u, o, h) {
11576
11594
  fixed: "fixed" in h ? h.fixed : !0,
11577
11595
  immutable: "immutable" in h ? h.immutable : !0,
11578
11596
  rearg: "rearg" in h ? h.rearg : !0
11579
- }, T = m ? o : x_, R = "curry" in h && h.curry, P = "fixed" in h && h.fixed, I = "rearg" in h && h.rearg, U = m ? o.runInContext() : void 0, M = m ? o : {
11597
+ }, T = m ? o : R_, R = "curry" in h && h.curry, P = "fixed" in h && h.fixed, I = "rearg" in h && h.rearg, U = m ? o.runInContext() : void 0, M = m ? o : {
11580
11598
  ary: i.ary,
11581
11599
  assign: i.assign,
11582
11600
  clone: i.clone,
@@ -11653,7 +11671,7 @@ function Am(i, u, o, h) {
11653
11671
  function fr(z, B, V) {
11654
11672
  if (E.fixed && (P || !ct.skipFixed[z])) {
11655
11673
  var q = ct.methodSpread[z], re = q && q.start;
11656
- return re === void 0 ? Z(B, V) : L_(B, re);
11674
+ return re === void 0 ? Z(B, V) : P_(B, re);
11657
11675
  }
11658
11676
  return B;
11659
11677
  }
@@ -11686,7 +11704,7 @@ function Am(i, u, o, h) {
11686
11704
  function ei(z, B) {
11687
11705
  return Wt(z, function(V) {
11688
11706
  var q = B.length;
11689
- return R_(We(pm(V, q), B), q);
11707
+ return N_(We(pm(V, q), B), q);
11690
11708
  });
11691
11709
  }
11692
11710
  function Wt(z, B) {
@@ -11702,7 +11720,7 @@ function Am(i, u, o, h) {
11702
11720
  }
11703
11721
  function Ro(z, B, V) {
11704
11722
  var q, re = ct.aliasToReal[z] || z, ot = B, wt = Sn[re];
11705
- return wt ? ot = wt(B) : E.immutable && (ct.mutate.array[re] ? ot = dm(B, Vm) : ct.mutate.object[re] ? ot = dm(B, N_(B)) : ct.mutate.set[re] && (ot = dm(B, Bi))), Q(Qe, function(ut) {
11723
+ return wt ? ot = wt(B) : E.immutable && (ct.mutate.array[re] ? ot = dm(B, Vm) : ct.mutate.object[re] ? ot = dm(B, L_(B)) : ct.mutate.set[re] && (ot = dm(B, Bi))), Q(Qe, function(ut) {
11706
11724
  return Q(ct.aryMethod[ut], function(Ke) {
11707
11725
  if (re == Ke) {
11708
11726
  var De = ct.methodSpread[re], hr = De && De.afterRearg;
@@ -11737,7 +11755,7 @@ function Am(i, u, o, h) {
11737
11755
  });
11738
11756
  }), ze;
11739
11757
  }
11740
- var P_ = Am, Gm = I_.runInContext(), nl = P_(Gm, Gm), xe;
11758
+ var D_ = Am, Gm = C_.runInContext(), nl = D_(Gm, Gm), xe;
11741
11759
  (function(i) {
11742
11760
  i.Arg = "Arg", i.DynamicInput = "DynamicInput", i.DynamicOutputMethod = "DynamicOutputMethod", i.DynamicOutputProperty = "DynamicOutputProperty", i.Enum = "Enum", i.ExtendInputObject = "ExtendInputObject", i.ExtendObject = "ExtendObject", i.InputField = "InputField", i.InputObject = "InputObject", i.Interface = "Interface", i.List = "List", i.NonNull = "NonNull", i.Null = "Null", i.Object = "Object", i.OutputField = "OutputField", i.Plugin = "Plugin", i.PrintedGenTyping = "PrintedGenTyping", i.PrintedGenTypingImport = "PrintedGenTypingImport", i.Scalar = "Scalar", i.Union = "Union";
11743
11761
  })(xe || (xe = {}));
@@ -11745,7 +11763,7 @@ const Mf = Symbol.for("@nexus/wrapped");
11745
11763
  function bt(i, u) {
11746
11764
  i.prototype[Mf] = u;
11747
11765
  }
11748
- class D_ {
11766
+ class F_ {
11749
11767
  constructor(u, o) {
11750
11768
  this.name = u, this.config = o, Wi(u);
11751
11769
  }
@@ -11753,8 +11771,8 @@ class D_ {
11753
11771
  return this.config;
11754
11772
  }
11755
11773
  }
11756
- bt(D_, xe.Interface);
11757
- class F_ {
11774
+ bt(F_, xe.Interface);
11775
+ class U_ {
11758
11776
  constructor(u, o) {
11759
11777
  this.name = u, this.config = o, Wi(u);
11760
11778
  }
@@ -11762,8 +11780,8 @@ class F_ {
11762
11780
  return this.config;
11763
11781
  }
11764
11782
  }
11765
- bt(F_, xe.Object);
11766
- class U_ {
11783
+ bt(U_, xe.Object);
11784
+ class M_ {
11767
11785
  constructor(u, o) {
11768
11786
  this.name = u, this.config = o, Wi(u);
11769
11787
  }
@@ -11771,34 +11789,34 @@ class U_ {
11771
11789
  return this.config;
11772
11790
  }
11773
11791
  }
11774
- bt(U_, xe.Union);
11775
- function M_(i, u) {
11792
+ bt(M_, xe.Union);
11793
+ function W_(i, u) {
11776
11794
  var o;
11777
11795
  return i.extensions = Object.assign(Object.assign({}, i.extensions), { nexus: Object.assign(Object.assign({}, Object((o = i.extensions) === null || o === void 0 ? void 0 : o.nexus)), u) }), i;
11778
11796
  }
11779
- const Rf = Symbol.for("@nexus/meta/NEXUS_TYPE"), W_ = Symbol.for("@nexus/meta/NEXUS_BUILD");
11780
- function B_(i) {
11781
- return !!(i && typeof al.get(i, W_) == "function");
11782
- }
11797
+ const Rf = Symbol.for("@nexus/meta/NEXUS_TYPE"), B_ = Symbol.for("@nexus/meta/NEXUS_BUILD");
11783
11798
  function $_(i) {
11784
- return j_(i) || vv(i);
11799
+ return !!(i && typeof al.get(i, B_) == "function");
11785
11800
  }
11786
11801
  function j_(i) {
11802
+ return k_(i) || vv(i);
11803
+ }
11804
+ function k_(i) {
11787
11805
  return !!(i && al.has(i, Rf) && la(al.get(i, Rf)));
11788
11806
  }
11789
11807
  function vv(i) {
11790
11808
  return !!(i && al.has(i, Rf) && typeof al.get(i, Rf) == "function");
11791
11809
  }
11792
11810
  function Cm(i) {
11793
- return B_(i) || $_(i) || vv(i);
11811
+ return $_(i) || j_(i) || vv(i);
11794
11812
  }
11795
- class k_ {
11813
+ class V_ {
11796
11814
  constructor(u) {
11797
11815
  this.config = u;
11798
11816
  }
11799
11817
  }
11800
- bt(k_, xe.PrintedGenTypingImport);
11801
- class V_ {
11818
+ bt(V_, xe.PrintedGenTypingImport);
11819
+ class G_ {
11802
11820
  constructor(u) {
11803
11821
  this.config = u;
11804
11822
  }
@@ -11817,8 +11835,8 @@ ${this.config.description.split(`
11817
11835
  return u += `${o}: ${this.config.type}`, u;
11818
11836
  }
11819
11837
  }
11820
- bt(V_, xe.PrintedGenTyping);
11821
- M_(new Km({
11838
+ bt(G_, xe.PrintedGenTyping);
11839
+ W_(new Km({
11822
11840
  name: "NEXUS__UNKNOWN__TYPE",
11823
11841
  description: `
11824
11842
  This scalar should never make it into production. It is used as a placeholder for situations
@@ -11869,13 +11887,13 @@ function _v(i) {
11869
11887
  function Bf(i) {
11870
11888
  return Wf(Object.assign({ type: "Int" }, i));
11871
11889
  }
11872
- class G_ {
11890
+ class z_ {
11873
11891
  constructor(u) {
11874
11892
  if (this.ofNexusType = u, this._isNexusListDef = !0, typeof u != "string" && !la(u) && !Cm(u) && !sl(u))
11875
11893
  throw new Error("Cannot wrap unknown types in list(). Saw " + u);
11876
11894
  }
11877
11895
  }
11878
- bt(G_, xe.List);
11896
+ bt(z_, xe.List);
11879
11897
  class Sm {
11880
11898
  constructor(u) {
11881
11899
  if (this.ofNexusType = u, this._isNexusNonNullDef = !0, typeof u != "string" && !la(u) && !Cm(u) && !sl(u))
@@ -11906,13 +11924,13 @@ function wv(i) {
11906
11924
  function Av(i) {
11907
11925
  return la(i) && i[Mf] === xe.Null;
11908
11926
  }
11909
- class z_ {
11927
+ class q_ {
11910
11928
  constructor(u) {
11911
11929
  this.config = u;
11912
11930
  }
11913
11931
  }
11914
- bt(z_, xe.Plugin);
11915
- class q_ {
11932
+ bt(q_, xe.Plugin);
11933
+ class H_ {
11916
11934
  constructor(u, o) {
11917
11935
  this.name = u, this.config = o;
11918
11936
  }
@@ -11920,8 +11938,8 @@ class q_ {
11920
11938
  return this.config;
11921
11939
  }
11922
11940
  }
11923
- bt(q_, xe.DynamicInput);
11924
- class H_ {
11941
+ bt(H_, xe.DynamicInput);
11942
+ class Y_ {
11925
11943
  constructor(u, o) {
11926
11944
  this.name = u, this.config = o;
11927
11945
  }
@@ -11929,21 +11947,21 @@ class H_ {
11929
11947
  return this.config;
11930
11948
  }
11931
11949
  }
11932
- bt(H_, xe.DynamicOutputMethod);
11933
- const Y_ = {
11950
+ bt(Y_, xe.DynamicOutputMethod);
11951
+ const Q_ = {
11934
11952
  first: Nf(Bf({ description: "Returns the first n elements from the list." })),
11935
11953
  after: Nf(_v({ description: "Returns the elements in the list that come after the specified cursor" }))
11936
11954
  };
11937
- Object.assign(Object.assign({}, Y_), { first: bv(Bf({ description: "Returns the first n elements from the list." })) });
11938
- const Q_ = {
11955
+ Object.assign(Object.assign({}, Q_), { first: bv(Bf({ description: "Returns the first n elements from the list." })) });
11956
+ const J_ = {
11939
11957
  last: Nf(Bf({ description: "Returns the last n elements from the list." })),
11940
11958
  before: Nf(_v({ description: "Returns the elements in the list that come before the specified cursor" }))
11941
11959
  };
11942
- Object.assign(Object.assign({}, Q_), { last: bv(Bf({ description: "Returns the last n elements from the list." })) });
11960
+ Object.assign(Object.assign({}, J_), { last: bv(Bf({ description: "Returns the last n elements from the list." })) });
11943
11961
  var Lf = typeof Symbol == "function" ? Symbol : void 0;
11944
11962
  Lf && Lf.iterator;
11945
11963
  Lf && Lf.asyncIterator;
11946
- class J_ {
11964
+ class X_ {
11947
11965
  constructor(u, o) {
11948
11966
  this.name = u, this.config = o, Wi(u);
11949
11967
  }
@@ -11962,7 +11980,7 @@ class J_ {
11962
11980
  return Wf(Object.assign(Object.assign({}, u), { type: this }));
11963
11981
  }
11964
11982
  }
11965
- bt(J_, xe.Enum);
11983
+ bt(X_, xe.Enum);
11966
11984
  class Sv {
11967
11985
  constructor(u, o) {
11968
11986
  this.name = u, this.config = o, Wi(u);
@@ -11983,10 +12001,10 @@ class Sv {
11983
12001
  }
11984
12002
  }
11985
12003
  bt(Sv, xe.InputObject);
11986
- function X_(i) {
12004
+ function Z_(i) {
11987
12005
  return new Sv(i.name, i);
11988
12006
  }
11989
- class Z_ {
12007
+ class K_ {
11990
12008
  constructor(u, o) {
11991
12009
  this.name = u, this.config = o, Wi(u);
11992
12010
  }
@@ -11994,8 +12012,8 @@ class Z_ {
11994
12012
  return this.config;
11995
12013
  }
11996
12014
  }
11997
- bt(Z_, xe.Scalar);
11998
- class K_ {
12015
+ bt(K_, xe.Scalar);
12016
+ class e1 {
11999
12017
  constructor(u, o) {
12000
12018
  this.name = u, this.config = o, Wi(u);
12001
12019
  }
@@ -12003,8 +12021,8 @@ class K_ {
12003
12021
  return this.config;
12004
12022
  }
12005
12023
  }
12006
- bt(K_, xe.ExtendInputObject);
12007
- class e1 {
12024
+ bt(e1, xe.ExtendInputObject);
12025
+ class t1 {
12008
12026
  constructor(u, o) {
12009
12027
  this.name = u, this.config = o, Wi(u);
12010
12028
  }
@@ -12012,8 +12030,8 @@ class e1 {
12012
12030
  return this.config;
12013
12031
  }
12014
12032
  }
12015
- bt(e1, xe.ExtendObject);
12016
- class t1 {
12033
+ bt(t1, xe.ExtendObject);
12034
+ class n1 {
12017
12035
  constructor(u, o) {
12018
12036
  this.name = u, this.config = o;
12019
12037
  }
@@ -12021,16 +12039,16 @@ class t1 {
12021
12039
  return this.config;
12022
12040
  }
12023
12041
  }
12024
- bt(t1, xe.DynamicOutputProperty);
12025
- const zm = ["id"], n1 = (i, u, o) => {
12042
+ bt(n1, xe.DynamicOutputProperty);
12043
+ const zm = ["id"], r1 = (i, u, o) => {
12026
12044
  const { naming: h, mappers: m } = strapi.plugin("graphql").service("utils"), A = m.strapiScalarToGraphQLScalar(o.type);
12027
12045
  i.field(u, {
12028
12046
  type: h.getScalarFilterInputTypeName(A)
12029
12047
  });
12030
- }, r1 = (i, u, o) => {
12048
+ }, i1 = (i, u, o) => {
12031
12049
  const h = strapi.plugin("graphql").service("utils"), m = strapi.plugin("graphql").service("extension"), { getFiltersInputTypeName: A } = h.naming, { isMorphRelation: E } = h.attributes, T = strapi.getModel(o.target);
12032
12050
  !T || E(o) || m.shadowCRUD(T.uid).isDisabled() || i.field(u, { type: A(T) });
12033
- }, i1 = ({ strapi: i }) => {
12051
+ }, o1 = ({ strapi: i }) => {
12034
12052
  const { service: u } = i.plugin("graphql"), o = (A) => {
12035
12053
  const { operators: E } = u("builders").filters;
12036
12054
  if (Array.isArray(A))
@@ -12080,7 +12098,7 @@ const zm = ["id"], n1 = (i, u, o) => {
12080
12098
  graphQLFiltersToStrapiQuery: m,
12081
12099
  buildContentTypeFilters(A) {
12082
12100
  const E = i.plugin("graphql").service("utils"), T = i.plugin("graphql").service("extension"), { getFiltersInputTypeName: R, getScalarFilterInputTypeName: P } = E.naming, { isStrapiScalar: I, isRelation: U } = E.attributes, { attributes: M } = A, Z = R(A);
12083
- return X_({
12101
+ return Z_({
12084
12102
  name: Z,
12085
12103
  definition(j) {
12086
12104
  const K = Object.entries(M).filter(
@@ -12088,14 +12106,14 @@ const zm = ["id"], n1 = (i, u, o) => {
12088
12106
  ), te = T.shadowCRUD(A.uid).field("id").hasFiltersEnabeld();
12089
12107
  A.kind === "collectionType" && te && j.field("id", { type: P("ID") });
12090
12108
  for (const [Q, we] of K)
12091
- I(we) ? n1(j, Q, we) : U(we) && r1(j, Q, we);
12109
+ I(we) ? r1(j, Q, we) : U(we) && i1(j, Q, we);
12092
12110
  for (const Q of h())
12093
12111
  Q.add(j, Z);
12094
12112
  }
12095
12113
  });
12096
12114
  }
12097
12115
  };
12098
- }, o1 = ({ strapi: i }) => {
12116
+ }, u1 = ({ strapi: i }) => {
12099
12117
  const u = Uf(i);
12100
12118
  return {
12101
12119
  getConfig: async (o = !1) => {
@@ -12118,21 +12136,21 @@ const zm = ["id"], n1 = (i, u, o) => {
12118
12136
  },
12119
12137
  restart: () => i.reload()
12120
12138
  };
12121
- }, u1 = {
12122
- admin: w_,
12123
- client: S_,
12124
- common: T_,
12125
- settings: o1,
12126
- gql: i1
12127
- }, f1 = {
12139
+ }, a1 = {
12140
+ admin: A_,
12141
+ client: E_,
12142
+ common: I_,
12143
+ settings: u1,
12144
+ gql: o1
12145
+ }, h1 = {
12128
12146
  register: Fv,
12129
12147
  bootstrap: dy,
12130
12148
  config: vy,
12131
- controllers: p_,
12132
- routes: y_,
12133
- services: u1,
12149
+ controllers: d_,
12150
+ routes: __,
12151
+ services: a1,
12134
12152
  contentTypes: Nv
12135
12153
  };
12136
12154
  export {
12137
- f1 as default
12155
+ h1 as default
12138
12156
  };