@snabcentr/common-lib 2.1.0-dev → 2.2.0-dev

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.
@@ -2,7 +2,7 @@ var Lr = Object.defineProperty;
2
2
  var xr = (n, r, e) => r in n ? Lr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var t = (n, r, e) => xr(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as nr } from "jwt-decode";
5
- import { merge as ue, isNil as T, isEmpty as X, noop as v, mapValues as or, isArray as H, every as dr, split as Or, isString as C, constant as _r, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as me, forEach as Hr, isDate as Oe, omitBy as cr, isObject as lr } from "lodash-es";
5
+ import { merge as le, isNil as T, isEmpty as X, noop as v, mapValues as or, isArray as H, every as dr, split as Or, isString as C, constant as _r, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as ge, forEach as Hr, isDate as Oe, omitBy as cr, isObject as lr } from "lodash-es";
6
6
  import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
7
7
  import { defineStore as z } from "pinia";
8
8
  import { ref as y, markRaw as Fr, computed as D } from "vue";
@@ -99,7 +99,7 @@ class F {
99
99
  * @inheritDoc
100
100
  */
101
101
  t(this, "email", "");
102
- ue(this, r);
102
+ le(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -143,7 +143,7 @@ class Mt extends F {
143
143
  * @inheritDoc
144
144
  */
145
145
  t(this, "address");
146
- ue(this, e);
146
+ le(this, e);
147
147
  }
148
148
  /**
149
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -355,7 +355,7 @@ const I = z("common.config", () => {
355
355
  * @param appConfig Конфигурация приложения.
356
356
  */
357
357
  setConfig: (s) => {
358
- n.value = ue(n.value, s);
358
+ n.value = le(n.value, s);
359
359
  }
360
360
  };
361
361
  });
@@ -555,8 +555,8 @@ const E = z("common.auth_state_private", () => {
555
555
  const A = Or(f, ".");
556
556
  if (A.length < 2)
557
557
  return !1;
558
- const [ie, ne] = A, W = (J = E().userPermissions) == null ? void 0 : J[ie];
559
- return H(W) && W.includes(ne);
558
+ const [se, ie] = A, W = (J = E().userPermissions) == null ? void 0 : J[se];
559
+ return H(W) && W.includes(ie);
560
560
  };
561
561
  return H(o) ? dr(o, (f) => m(f)) : m(o);
562
562
  });
@@ -591,7 +591,7 @@ const E = z("common.auth_state_private", () => {
591
591
  hasUserPermission: i
592
592
  };
593
593
  });
594
- class te {
594
+ class re {
595
595
  /**
596
596
  * Инициализирует экземпляр класса {@link Identity}.
597
597
  *
@@ -616,7 +616,7 @@ class te {
616
616
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
617
617
  }
618
618
  }
619
- class b extends te {
619
+ class b extends re {
620
620
  /**
621
621
  * Инициализирует экземпляр класса {@link NamedIdentity}.
622
622
  *
@@ -631,7 +631,7 @@ class b extends te {
631
631
  this.name = (e == null ? void 0 : e.name) ?? "";
632
632
  }
633
633
  }
634
- class pe extends b {
634
+ class ue extends b {
635
635
  /**
636
636
  * Инициализирует экземпляр класса {@link NamedIdentity}.
637
637
  *
@@ -718,7 +718,7 @@ class st {
718
718
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
719
719
  }
720
720
  }
721
- class pr extends pe {
721
+ class pr extends ue {
722
722
  /**
723
723
  * Инициализирует экземпляр класса {@link CatalogableItem}.
724
724
  *
@@ -918,7 +918,7 @@ class gr {
918
918
  }
919
919
  class N extends w {
920
920
  }
921
- class Z extends w {
921
+ class me extends w {
922
922
  /**
923
923
  * Инициализирует экземпляр класса {@link Warehouse}.
924
924
  *
@@ -965,7 +965,7 @@ class ot {
965
965
  * Количество остатков товара на складе.
966
966
  */
967
967
  t(this, "count");
968
- this.warehouse = new Z(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
968
+ this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
969
969
  }
970
970
  }
971
971
  class d extends b {
@@ -1189,7 +1189,7 @@ class fe extends qe {
1189
1189
  this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [qr(s), i])) : void 0;
1190
1190
  }
1191
1191
  }
1192
- class mr extends te {
1192
+ class mr extends re {
1193
1193
  /**
1194
1194
  * Инициализирует экземпляр класса {@link OrderItemBase}.
1195
1195
  *
@@ -1960,9 +1960,9 @@ class We extends b {
1960
1960
  this.photo = e.photo, this.contacts = new fr(e.contacts), this.curatedDirection = new ze(e.curatedDirection);
1961
1961
  }
1962
1962
  }
1963
- class ee extends w {
1963
+ class Z extends w {
1964
1964
  }
1965
- class he extends w {
1965
+ class pe extends w {
1966
1966
  /**
1967
1967
  * Инициализирует экземпляр класса {@link Region}.
1968
1968
  *
@@ -1973,8 +1973,8 @@ class he extends w {
1973
1973
  /**
1974
1974
  * Данные о стране, в которой расположен регион.
1975
1975
  */
1976
- t(this, "country", new ee());
1977
- e && (this.country = new ee(e.country));
1976
+ t(this, "country", new Z());
1977
+ e && (this.country = new Z(e.country));
1978
1978
  }
1979
1979
  }
1980
1980
  class Ae extends w {
@@ -1988,8 +1988,8 @@ class Ae extends w {
1988
1988
  /**
1989
1989
  * Данные о регионе, в котором расположен город.
1990
1990
  */
1991
- t(this, "region", new he());
1992
- e && (this.region = new he(e.region));
1991
+ t(this, "region", new pe());
1992
+ e && (this.region = new pe(e.region));
1993
1993
  }
1994
1994
  }
1995
1995
  class wr extends b {
@@ -2031,7 +2031,7 @@ class wr extends b {
2031
2031
  this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new O(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? R(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2032
2032
  }
2033
2033
  }
2034
- class se extends wr {
2034
+ class te extends wr {
2035
2035
  /**
2036
2036
  * Инициализирует экземпляр класса {@link Client}.
2037
2037
  *
@@ -2080,7 +2080,7 @@ class se extends wr {
2080
2080
  this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ae(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
2081
2081
  }
2082
2082
  }
2083
- class oe extends te {
2083
+ class ne extends re {
2084
2084
  /**
2085
2085
  * Инициализирует новый экземпляр класса.
2086
2086
  *
@@ -2104,7 +2104,7 @@ class oe extends te {
2104
2104
  * Данные шаблона прайс-листа.
2105
2105
  */
2106
2106
  t(this, "priceTemplate");
2107
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new se(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2107
+ this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2108
2108
  }
2109
2109
  }
2110
2110
  class Ie extends yr {
@@ -2124,7 +2124,7 @@ class Ie extends yr {
2124
2124
  }
2125
2125
  class vr extends w {
2126
2126
  }
2127
- class ce extends b {
2127
+ class oe extends b {
2128
2128
  /**
2129
2129
  * Инициализирует экземпляр класса {@link Property}.
2130
2130
  *
@@ -2163,7 +2163,7 @@ class V {
2163
2163
  * Может быть строкой, числом, boolean, диапазоном или JSON объектом.
2164
2164
  */
2165
2165
  t(this, "value");
2166
- this.property = new ce(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
2166
+ this.property = new oe(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
2167
2167
  }
2168
2168
  }
2169
2169
  class S {
@@ -2248,7 +2248,7 @@ class Wt {
2248
2248
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2249
2249
  }
2250
2250
  }
2251
- class le extends b {
2251
+ class ce extends b {
2252
2252
  /**
2253
2253
  * Инициализирует экземпляр класса {@link PricingRole}.
2254
2254
  *
@@ -2302,7 +2302,7 @@ class Ye {
2302
2302
  * Минимальный коэффициент цены.
2303
2303
  */
2304
2304
  t(this, "minCoefficient");
2305
- this.role = new le(r == null ? void 0 : r.role), this.category = new fe(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
2305
+ this.role = new ce(r == null ? void 0 : r.role), this.category = new fe(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
2306
2306
  }
2307
2307
  }
2308
2308
  class Jt extends p {
@@ -2547,7 +2547,7 @@ class Vt extends p {
2547
2547
  return this.get(
2548
2548
  `/internal/clients/${r}/price/templates`,
2549
2549
  {},
2550
- (e) => e.data.map((s) => new oe(s))
2550
+ (e) => e.data.map((s) => new ne(s))
2551
2551
  );
2552
2552
  }
2553
2553
  /**
@@ -2558,7 +2558,7 @@ class Vt extends p {
2558
2558
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
2559
2559
  */
2560
2560
  getActiveTemplate(r) {
2561
- return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new oe(e.data), !0);
2561
+ return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ne(e.data), !0);
2562
2562
  }
2563
2563
  /**
2564
2564
  * Добавляет связь между клиентом и шаблоном прайс-листа.
@@ -2577,7 +2577,7 @@ class Vt extends p {
2577
2577
  startAt: s.startAt && U(s.startAt, i),
2578
2578
  endAt: s.endAt && U(s.endAt, i)
2579
2579
  },
2580
- (o) => new oe(o.data),
2580
+ (o) => new ne(o.data),
2581
2581
  {},
2582
2582
  !0
2583
2583
  );
@@ -2611,7 +2611,7 @@ class Vt extends p {
2611
2611
  startAt: i.startAt && U(i.startAt, o),
2612
2612
  endAt: i.endAt && U(i.endAt, o)
2613
2613
  },
2614
- (c) => new oe(c.data)
2614
+ (c) => new ne(c.data)
2615
2615
  );
2616
2616
  }
2617
2617
  /**
@@ -2687,7 +2687,7 @@ class Kt extends p {
2687
2687
  showHidden: s,
2688
2688
  withPriceCoefficients: e
2689
2689
  },
2690
- (i) => me(i.data, (o) => new k(o))
2690
+ (i) => ge(i.data, (o) => new k(o))
2691
2691
  );
2692
2692
  }
2693
2693
  /**
@@ -2750,7 +2750,7 @@ class Qt extends p {
2750
2750
  return this.get(
2751
2751
  `/internal/catalog/products/${r}/coefficients`,
2752
2752
  {},
2753
- (e) => me(e.data, (s) => new Ge(s))
2753
+ (e) => ge(e.data, (s) => new Ge(s))
2754
2754
  );
2755
2755
  }
2756
2756
  /**
@@ -2827,7 +2827,7 @@ class Yt extends p {
2827
2827
  showHidden: i,
2828
2828
  withPriceCoefficients: s
2829
2829
  },
2830
- (o) => me(o.data, (c) => new j(c))
2830
+ (o) => ge(o.data, (c) => new j(c))
2831
2831
  );
2832
2832
  }
2833
2833
  }
@@ -3143,7 +3143,7 @@ class Zt extends Te {
3143
3143
  return this.get(
3144
3144
  `/internal/price/templates/${r}/clients`,
3145
3145
  {},
3146
- (e) => e.data.map((s) => new oe(s))
3146
+ (e) => e.data.map((s) => new ne(s))
3147
3147
  );
3148
3148
  }
3149
3149
  }
@@ -3154,7 +3154,7 @@ class es extends p {
3154
3154
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
3155
3155
  */
3156
3156
  getRoles() {
3157
- return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new le(e)));
3157
+ return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ce(e)));
3158
3158
  }
3159
3159
  /**
3160
3160
  * Добавляет новую роль ценообразования.
@@ -3164,7 +3164,7 @@ class es extends p {
3164
3164
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
3165
3165
  */
3166
3166
  createRole(r) {
3167
- return this.post("/internal/price/roles", r, (e) => new le(e.data));
3167
+ return this.post("/internal/price/roles", r, (e) => new ce(e.data));
3168
3168
  }
3169
3169
  /**
3170
3170
  * Возвращает данные роли ценообразования.
@@ -3174,7 +3174,7 @@ class es extends p {
3174
3174
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
3175
3175
  */
3176
3176
  getRole(r) {
3177
- return this.get(`/internal/price/roles/${r}`, {}, (e) => new le(e.data));
3177
+ return this.get(`/internal/price/roles/${r}`, {}, (e) => new ce(e.data));
3178
3178
  }
3179
3179
  /**
3180
3180
  * Обновляет данные роли ценообразования.
@@ -3185,7 +3185,7 @@ class es extends p {
3185
3185
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
3186
3186
  */
3187
3187
  updateRole(r, e) {
3188
- return this.patch(`/internal/price/roles/${r}`, e, (s) => new le(s.data));
3188
+ return this.patch(`/internal/price/roles/${r}`, e, (s) => new ce(s.data));
3189
3189
  }
3190
3190
  /**
3191
3191
  * Удаляет роль ценообразования.
@@ -3240,7 +3240,7 @@ class rs extends Te {
3240
3240
  getProperties(r, e, s) {
3241
3241
  return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
3242
3242
  const o = { ...i.data };
3243
- return o.data = o.data.map((c) => new ce(c)), o;
3243
+ return o.data = o.data.map((c) => new oe(c)), o;
3244
3244
  });
3245
3245
  }
3246
3246
  /**
@@ -3257,7 +3257,7 @@ class rs extends Te {
3257
3257
  ...s,
3258
3258
  type: e
3259
3259
  },
3260
- (i) => new ce(i.data)
3260
+ (i) => new oe(i.data)
3261
3261
  );
3262
3262
  }
3263
3263
  /**
@@ -3267,7 +3267,7 @@ class rs extends Te {
3267
3267
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get
3268
3268
  */
3269
3269
  getProperty(r) {
3270
- return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ce(e.data));
3270
+ return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new oe(e.data));
3271
3271
  }
3272
3272
  /**
3273
3273
  * Обновляет существующее свойство.
@@ -3284,7 +3284,7 @@ class rs extends Te {
3284
3284
  ...i,
3285
3285
  type: s
3286
3286
  },
3287
- (o) => new ce(o.data)
3287
+ (o) => new oe(o.data)
3288
3288
  );
3289
3289
  }
3290
3290
  /**
@@ -3657,7 +3657,7 @@ class ts extends p {
3657
3657
  showHidden: i,
3658
3658
  withPriceCoefficients: s
3659
3659
  },
3660
- (o) => me(o.data, (c) => new k(c))
3660
+ (o) => ge(o.data, (c) => new k(c))
3661
3661
  );
3662
3662
  }
3663
3663
  }
@@ -3719,7 +3719,7 @@ class yt extends w {
3719
3719
  }
3720
3720
  class $e extends w {
3721
3721
  }
3722
- class re extends w {
3722
+ class ee extends w {
3723
3723
  }
3724
3724
  class Pr extends w {
3725
3725
  }
@@ -3748,7 +3748,7 @@ class Dr extends w {
3748
3748
  }
3749
3749
  class Ar extends w {
3750
3750
  }
3751
- class Ne extends te {
3751
+ class Ne extends re {
3752
3752
  /**
3753
3753
  * Инициализирует экземпляр класса {@link BankAccount}.
3754
3754
  *
@@ -3849,7 +3849,7 @@ class Tr extends b {
3849
3849
  /**
3850
3850
  * Группа партнеров (направление деятельности).
3851
3851
  */
3852
- t(this, "partnerGroup", new re());
3852
+ t(this, "partnerGroup", new ee());
3853
3853
  /**
3854
3854
  * Список контактных лиц контрагента.
3855
3855
  */
@@ -3883,7 +3883,7 @@ class Tr extends b {
3883
3883
  */
3884
3884
  t(this, "updater");
3885
3885
  if (e) {
3886
- if (this.opf = new M(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? R(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.contacts) {
3886
+ if (this.opf = new M(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? R(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3887
3887
  const s = [];
3888
3888
  e.contacts.forEach((i) => {
3889
3889
  s.push(new B(i));
@@ -3977,7 +3977,7 @@ class Ct extends ar {
3977
3977
  /**
3978
3978
  * Страна регистрации юридического лица нерезидента.
3979
3979
  */
3980
- t(this, "registrationCountry", new ee());
3980
+ t(this, "registrationCountry", new Z());
3981
3981
  /**
3982
3982
  * Регистрационный номер юридического лица нерезидента.
3983
3983
  */
@@ -3986,7 +3986,7 @@ class Ct extends ar {
3986
3986
  * Налоговый номер юридического лица нерезидента.
3987
3987
  */
3988
3988
  t(this, "taxNumber", "");
3989
- e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3989
+ e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3990
3990
  }
3991
3991
  }
3992
3992
  class Ce {
@@ -4008,7 +4008,7 @@ class Ce {
4008
4008
  }
4009
4009
  }
4010
4010
  }
4011
- class Le extends te {
4011
+ class Le extends re {
4012
4012
  /**
4013
4013
  * Инициализирует экземпляр класса {@link ContactRelation}.
4014
4014
  *
@@ -4091,7 +4091,7 @@ class Re extends tt {
4091
4091
  this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new gr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new B(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
4092
4092
  }
4093
4093
  }
4094
- class rr extends se {
4094
+ class rr extends te {
4095
4095
  /**
4096
4096
  * Инициализирует экземпляр класса {@link Client}.
4097
4097
  *
@@ -4141,7 +4141,7 @@ class rr extends se {
4141
4141
  * @inheritDoc
4142
4142
  */
4143
4143
  t(this, "extraData");
4144
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new B(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Re(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new N(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Z(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4144
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new B(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Re(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new N(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4145
4145
  }
4146
4146
  }
4147
4147
  class br {
@@ -4259,7 +4259,7 @@ class ns extends br {
4259
4259
  * @inheritDoc
4260
4260
  */
4261
4261
  t(this, "lastOrder");
4262
- this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new he(e == null ? void 0 : e.region), this.country = new ee(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new O(A)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new M(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new N(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((A) => new re(A)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4262
+ this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new O(A)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new M(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new N(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((A) => new ee(A)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4263
4263
  createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
4264
4264
  creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
4265
4265
  isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
@@ -4274,7 +4274,7 @@ class ns extends br {
4274
4274
  this.cities = [];
4275
4275
  break;
4276
4276
  case "region":
4277
- this.region = new he();
4277
+ this.region = new pe();
4278
4278
  break;
4279
4279
  case "isActive":
4280
4280
  this.isActive = !0;
@@ -4324,7 +4324,7 @@ class ns extends br {
4324
4324
  return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, e;
4325
4325
  }
4326
4326
  }
4327
- class Sr extends te {
4327
+ class Sr extends re {
4328
4328
  /**
4329
4329
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4330
4330
  *
@@ -4380,7 +4380,7 @@ class Pt extends b {
4380
4380
  * @inheritDoc
4381
4381
  */
4382
4382
  t(this, "curators");
4383
- this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new re(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new N(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4383
+ this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new N(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4384
4384
  }
4385
4385
  }
4386
4386
  class Dt {
@@ -4611,7 +4611,7 @@ class x extends Te {
4611
4611
  i,
4612
4612
  (c) => {
4613
4613
  const u = { ...c.data };
4614
- return u.data = u.data.map((h) => new se(h)), u;
4614
+ return u.data = u.data.map((h) => new te(h)), u;
4615
4615
  },
4616
4616
  void 0,
4617
4617
  o
@@ -5196,7 +5196,7 @@ const Y = class Y extends p {
5196
5196
  * Кэш результатов запросов.
5197
5197
  */
5198
5198
  t(Y, "responseDataCache", /* @__PURE__ */ new Map());
5199
- let ge = Y;
5199
+ let he = Y;
5200
5200
  class ls extends p {
5201
5201
  /**
5202
5202
  * Выполняет проверку занят ли указанный номер телефона.
@@ -5388,12 +5388,12 @@ class ms {
5388
5388
  return r.id === 0 && r.guid === "-undefined-";
5389
5389
  }
5390
5390
  }
5391
- class Tt extends ge {
5391
+ class Tt extends he {
5392
5392
  /**
5393
5393
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5394
5394
  */
5395
5395
  async getManagers() {
5396
- const r = "/internal/managers", e = ge.getCachedResponse(r);
5396
+ const r = "/internal/managers", e = he.getCachedResponse(r);
5397
5397
  if (e)
5398
5398
  return e;
5399
5399
  const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
@@ -5457,7 +5457,7 @@ class Ir extends Sr {
5457
5457
  * @inheritDoc
5458
5458
  */
5459
5459
  t(this, "isLargeOrder");
5460
- this.client = new se(e == null ? void 0 : e.client), this.payment = {
5460
+ this.client = new te(e == null ? void 0 : e.client), this.payment = {
5461
5461
  type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5462
5462
  status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5463
5463
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
@@ -5465,12 +5465,12 @@ class Ir extends Sr {
5465
5465
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5466
5466
  date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? R(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5467
5467
  address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
5468
- warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new Z(e.delivery.warehouse) : void 0
5468
+ warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
5469
5469
  }, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? R(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5470
5470
  }
5471
5471
  }
5472
5472
  var $t = /* @__PURE__ */ ((n) => (n.New = "new", n.WorkedOut = "worked_out", n.Pending = "pending", n.Completed = "completed", n.Declined = "declined", n.Deleted = "deleted", n))($t || {});
5473
- class a extends ge {
5473
+ class a extends he {
5474
5474
  /**
5475
5475
  * Возвращает {@link Promise} для получения данных указанного справочника.
5476
5476
  *
@@ -5511,7 +5511,7 @@ class a extends ge {
5511
5511
  * групп партнеров (направлений деятельности).
5512
5512
  */
5513
5513
  getPartnerGroup() {
5514
- return this.getTypedDataArrayRequester(re, "/internal/references/partner-group", !0);
5514
+ return this.getTypedDataArrayRequester(ee, "/internal/references/partner-group", !0);
5515
5515
  }
5516
5516
  /**
5517
5517
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
@@ -5575,7 +5575,7 @@ class a extends ge {
5575
5575
  * @param term Терм поиска.
5576
5576
  */
5577
5577
  searchRegion(r) {
5578
- return this.getTypedDataArrayRequester(he, `/internal/references/region-with-country/search?term=${r}`);
5578
+ return this.getTypedDataArrayRequester(pe, `/internal/references/region-with-country/search?term=${r}`);
5579
5579
  }
5580
5580
  /**
5581
5581
  * Выполняет поиск данных о странах по терму в названии.
@@ -5583,7 +5583,7 @@ class a extends ge {
5583
5583
  * @param term Терм поиска.
5584
5584
  */
5585
5585
  searchCountry(r) {
5586
- return this.getTypedDataArrayRequester(ee, `/internal/references/country/search?term=${r}`);
5586
+ return this.getTypedDataArrayRequester(Z, `/internal/references/country/search?term=${r}`);
5587
5587
  }
5588
5588
  /**
5589
5589
  * Возвращает {@link Promise} для получения справочника типов доставки.
@@ -5595,7 +5595,7 @@ class a extends ge {
5595
5595
  * Возвращает {@link Promise} для получения справочника складов.
5596
5596
  */
5597
5597
  getWarehouses() {
5598
- return this.getTypedDataArrayRequester(Z, "/public/references/warehouse", !0);
5598
+ return this.getTypedDataArrayRequester(me, "/public/references/warehouse", !0);
5599
5599
  }
5600
5600
  /**
5601
5601
  * Возвращает {@link Promise} для получения справочника типов свойств.
@@ -5617,7 +5617,7 @@ class a extends ge {
5617
5617
  }
5618
5618
  }
5619
5619
  const $ = z("common.references_private", () => {
5620
- const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), A = y(void 0), ie = y(void 0), ne = y(void 0), W = y(void 0), J = y(void 0), ae = y(void 0), be = y(void 0), l = y(void 0);
5620
+ const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), A = y(void 0), se = y(void 0), ie = y(void 0), W = y(void 0), J = y(void 0), ae = y(void 0), be = y(void 0), l = y(void 0);
5621
5621
  return {
5622
5622
  /**
5623
5623
  * Список загружаемых/загруженных на данный момент значений.
@@ -5670,11 +5670,11 @@ const $ = z("common.references_private", () => {
5670
5670
  /**
5671
5671
  * Справочник типов файлов продукктов/категорий.
5672
5672
  */
5673
- productFileTypeReference: ie,
5673
+ productFileTypeReference: se,
5674
5674
  /**
5675
5675
  * Справочник типов ресурсов.
5676
5676
  */
5677
- resourceTypesReference: ne,
5677
+ resourceTypesReference: ie,
5678
5678
  /**
5679
5679
  * Справочник направлений продаж.
5680
5680
  */
@@ -5757,12 +5757,12 @@ const $ = z("common.references_private", () => {
5757
5757
  return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(a).getSalesDirections().then((g) => {
5758
5758
  l.salesDirectionsReference = g;
5759
5759
  }).catch(v)), l.salesDirectionsReference;
5760
- }), ie = D(() => {
5760
+ }), se = D(() => {
5761
5761
  const l = $();
5762
5762
  return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(a).getSourcePrimaryInterest().then((g) => {
5763
5763
  l.sourcePrimaryInterestReference = g;
5764
5764
  }).catch(v)), l.sourcePrimaryInterestReference;
5765
- }), ne = D(() => {
5765
+ }), ie = D(() => {
5766
5766
  const l = $();
5767
5767
  return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(a).getDeliveryTypes().then((g) => {
5768
5768
  l.deliveryTypeReference = g;
@@ -5840,11 +5840,11 @@ const $ = z("common.references_private", () => {
5840
5840
  /**
5841
5841
  * Справочник каналов первичного интереса.
5842
5842
  */
5843
- sourcePrimaryInterestsReference: ie,
5843
+ sourcePrimaryInterestsReference: se,
5844
5844
  /**
5845
5845
  * Справочник типов доставки.
5846
5846
  */
5847
- deliveryTypeReference: ne,
5847
+ deliveryTypeReference: ie,
5848
5848
  /**
5849
5849
  * Список менеджеров.
5850
5850
  */
@@ -5870,7 +5870,7 @@ class ys extends br {
5870
5870
  * @param data Данные для первоначальной инициализации.
5871
5871
  */
5872
5872
  constructor(e) {
5873
- var s, i, o;
5873
+ var s, i, o, c;
5874
5874
  super();
5875
5875
  /**
5876
5876
  * @inheritDoc
@@ -5951,7 +5951,7 @@ class ys extends br {
5951
5951
  /**
5952
5952
  * @inheritDoc
5953
5953
  */
5954
- t(this, "warehouse");
5954
+ t(this, "warehouses");
5955
5955
  /**
5956
5956
  * @inheritDoc
5957
5957
  */
@@ -5964,7 +5964,7 @@ class ys extends br {
5964
5964
  * @inheritDoc
5965
5965
  */
5966
5966
  t(this, "onlyMyRegions");
5967
- this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((c) => new Rr(c)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new se(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((c) => new Ae(c)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((c) => new O(c)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new N(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Pr(e.paymentType) : void 0, this.warehouse = e != null && e.warehouse ? new Z(e.warehouse) : void 0, this.isToProcess = e == null ? void 0 : e.isToProcess;
5967
+ this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Rr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new N(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Pr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
5968
5968
  }
5969
5969
  /**
5970
5970
  * @inheritDoc
@@ -5996,7 +5996,7 @@ class ys extends br {
5996
5996
  this.status = [];
5997
5997
  break;
5998
5998
  case "warehouse":
5999
- this.warehouse = new Z();
5999
+ this.warehouses = [];
6000
6000
  break;
6001
6001
  default:
6002
6002
  this[e] = void 0;
@@ -6357,7 +6357,7 @@ class xe {
6357
6357
  * Источник клиентской цены.
6358
6358
  */
6359
6359
  t(this, "source");
6360
- this.client = new se(r == null ? void 0 : r.client), this.product = new k(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Me.Product;
6360
+ this.client = new te(r == null ? void 0 : r.client), this.product = new k(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Me.Product;
6361
6361
  }
6362
6362
  }
6363
6363
  const de = (n) => {
@@ -6485,10 +6485,10 @@ class St {
6485
6485
  * @inheritDoc
6486
6486
  */
6487
6487
  t(this, "currency");
6488
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new pe(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new d(r.currency) : void 0;
6488
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new d(r.currency) : void 0;
6489
6489
  }
6490
6490
  }
6491
- class kt extends pe {
6491
+ class kt extends ue {
6492
6492
  /**
6493
6493
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6494
6494
  *
@@ -6500,7 +6500,7 @@ class kt extends pe {
6500
6500
  * @inheritDoc
6501
6501
  */
6502
6502
  t(this, "history");
6503
- this.history = me(e.history, (s) => new St(s));
6503
+ this.history = ge(e.history, (s) => new St(s));
6504
6504
  }
6505
6505
  }
6506
6506
  class Cs extends p {
@@ -6514,7 +6514,7 @@ class Cs extends p {
6514
6514
  getProductPriceHistory(r) {
6515
6515
  var o, c, u, h, m;
6516
6516
  const e = I().config.dateFormats.api, s = cr(
6517
- ue(r, {
6517
+ le(r, {
6518
6518
  costDate: {
6519
6519
  from: Oe((o = r.costDate) == null ? void 0 : o.from) ? U(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6520
6520
  to: Oe((u = r.costDate) == null ? void 0 : u.to) ? U(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
@@ -6523,7 +6523,7 @@ class Cs extends p {
6523
6523
  (f) => T(f) || (H(f) || lr(f)) && X(f)
6524
6524
  ), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6525
6525
  return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
6526
- new kt(ue(f[0], { history: f }))
6526
+ new kt(le(f[0], { history: f }))
6527
6527
  ]);
6528
6528
  }
6529
6529
  }
@@ -6542,7 +6542,7 @@ class sr {
6542
6542
  * Список рекомендованных категорий продуктов.
6543
6543
  */
6544
6544
  t(this, "productCategories", []);
6545
- r != null && r.products && (this.products = r.products.map((e) => new pe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new pe(e)));
6545
+ r != null && r.products && (this.products = r.products.map((e) => new ue(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ue(e)));
6546
6546
  }
6547
6547
  }
6548
6548
  class Rs extends p {
@@ -6851,10 +6851,10 @@ export {
6851
6851
  j as ClientProduct,
6852
6852
  Yt as ClientProductCategoryDataProvider,
6853
6853
  Xt as ClientProductDataProvider,
6854
- se as ClientShortInfo,
6854
+ te as ClientShortInfo,
6855
6855
  gt as ClientsAdditionalDataRequestTypeEnum,
6856
6856
  ns as ClientsListFilters,
6857
- pe as CodedIdentity,
6857
+ ue as CodedIdentity,
6858
6858
  ps as ConfiguratorProvider,
6859
6859
  At as ConfiguratorsEnum,
6860
6860
  Ue as Contact,
@@ -6870,7 +6870,7 @@ export {
6870
6870
  Ct as ContragentUlNr,
6871
6871
  ar as ContragentUlR,
6872
6872
  Me as CostSourceEnum,
6873
- ee as Country,
6873
+ Z as Country,
6874
6874
  ze as CuratedDirection,
6875
6875
  We as Curator,
6876
6876
  d as Currency,
@@ -6891,10 +6891,10 @@ export {
6891
6891
  Je as FilterOpEnum,
6892
6892
  gr as GeoCoordinates,
6893
6893
  it as HiddenCatalogableItem,
6894
- ge as HttpCachedRequester,
6894
+ he as HttpCachedRequester,
6895
6895
  Xr as HttpParamsConfig,
6896
6896
  p as HttpRequester,
6897
- te as Identity,
6897
+ re as Identity,
6898
6898
  st as Image,
6899
6899
  F as JwtPayload,
6900
6900
  De as Manager,
@@ -6918,7 +6918,7 @@ export {
6918
6918
  ws as OrdersDataProvider,
6919
6919
  ys as OrdersListFilters,
6920
6920
  br as PaginationFiltersBase,
6921
- re as PartnerGroup,
6921
+ ee as PartnerGroup,
6922
6922
  Pr as PaymentType,
6923
6923
  we as PreferencesStorageProvider,
6924
6924
  xe as PriceAnalyze,
@@ -6929,11 +6929,11 @@ export {
6929
6929
  St as PriceHistoryItem,
6930
6930
  Q as PriceTemplate,
6931
6931
  ke as PriceTemplateCategory,
6932
- oe as PriceTemplateClient,
6932
+ ne as PriceTemplateClient,
6933
6933
  yr as PriceTemplateICatalogableItem,
6934
6934
  Ie as PriceTemplateProduct,
6935
6935
  Zt as PriceTemplateProvider,
6936
- le as PricingRole,
6936
+ ce as PricingRole,
6937
6937
  es as PricingRoleProvider,
6938
6938
  qe as PrimaryCatalogableItem,
6939
6939
  k as Product,
@@ -6944,7 +6944,7 @@ export {
6944
6944
  kt as ProductPriceHistory,
6945
6945
  Qe as ProductUnit,
6946
6946
  rs as PropertiesProvider,
6947
- ce as Property,
6947
+ oe as Property,
6948
6948
  vr as PropertyType,
6949
6949
  ut as PropertyTypeEnum,
6950
6950
  V as PropertyValue,
@@ -6953,7 +6953,7 @@ export {
6953
6953
  w as Reference,
6954
6954
  is as ReferenceDataFactory,
6955
6955
  a as ReferenceDataProvider,
6956
- he as Region,
6956
+ pe as Region,
6957
6957
  Dr as ResourceType,
6958
6958
  O as SalesDirection,
6959
6959
  Zr as SentryConfig,
@@ -6975,7 +6975,7 @@ export {
6975
6975
  L as UserShortInfo,
6976
6976
  Lt as UserTypeEnum,
6977
6977
  us as VersionConfig,
6978
- Z as Warehouse,
6978
+ me as Warehouse,
6979
6979
  et as WebSocketConfig,
6980
6980
  Ze as findCatalogItemByIdRecursive,
6981
6981
  er as flattenCatalogItems,