@snabcentr/common-lib 1.69.0 → 1.70.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.
@@ -1,14 +1,14 @@
1
1
  var yr = Object.defineProperty;
2
- var Cr = (n, r, e) => r in n ? yr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var t = (n, r, e) => Cr(n, typeof r != "symbol" ? r + "" : r, e);
2
+ var wr = (n, r, e) => r in n ? yr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var t = (n, r, e) => wr(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as Qe } from "jwt-decode";
5
- import { merge as ke, isUndefined as wr, isNil as T, noop as C, toUpper as vr, constant as Pr, isString as m, cloneDeep as Rr, toLower as Ar, isFunction as xe, map as ce, forEach as Dr, isDate as Se, isEmpty as Ce, isArray as Ne, omitBy as Ye, isObject as Xe } from "lodash-es";
6
- import { objectToCamel as Oe, objectToSnake as He } from "ts-case-convert";
7
- import { defineStore as X } from "pinia";
8
- import { ref as f, computed as v } from "vue";
9
- import { parseISO as y, format as q, isAfter as ar, startOfToday as Ze, addSeconds as $r, addBusinessDays as Tr, endOfTomorrow as br, startOfTomorrow as _r, endOfYesterday as Sr, startOfYesterday as Ir, endOfToday as Lr, endOfDay as dr, startOfDay as kr } from "date-fns";
10
- import xr from "axios";
11
- class he {
5
+ import { merge as xe, isUndefined as Cr, isNil as $, noop as w, mapValues as vr, isArray as J, every as Pr, split as Rr, toUpper as Ar, constant as Dr, isString as y, cloneDeep as ar, toLower as $r, isFunction as Ne, map as ue, forEach as Tr, isDate as Ie, isEmpty as ve, omitBy as Ye, isObject as Xe } from "lodash-es";
6
+ import { objectToCamel as Oe, objectToSnake as Me } from "ts-case-convert";
7
+ import { defineStore as Z } from "pinia";
8
+ import { ref as f, computed as R } from "vue";
9
+ import { parseISO as C, format as q, isAfter as br, startOfToday as Ze, addSeconds as _r, addBusinessDays as Sr, endOfTomorrow as Ir, startOfTomorrow as dr, endOfYesterday as Lr, startOfYesterday as kr, endOfToday as xr, endOfDay as Nr, startOfDay as Or } from "date-fns";
10
+ import qr from "axios";
11
+ class ie {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -99,7 +99,7 @@ class he {
99
99
  * @inheritDoc
100
100
  */
101
101
  t(this, "email", "");
102
- ke(this, r);
102
+ xe(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -107,10 +107,11 @@ class he {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- return new he(Oe(Qe(r)));
110
+ const e = Qe(r), s = new ie(Oe(e));
111
+ return s.resourceAccess = e.resource_access, s;
111
112
  }
112
113
  }
113
- class Tt extends he {
114
+ class St extends ie {
114
115
  /**
115
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
116
117
  *
@@ -142,7 +143,7 @@ class Tt extends he {
142
143
  * @inheritDoc
143
144
  */
144
145
  t(this, "address");
145
- ke(this, e);
146
+ xe(this, e);
146
147
  }
147
148
  /**
148
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -150,7 +151,7 @@ class Tt extends he {
150
151
  * @param jwtToken JWT-ключ доступа.
151
152
  */
152
153
  static getJwtPayload(e) {
153
- return new he(Oe(Qe(e)));
154
+ return new ie(Oe(Qe(e)));
154
155
  }
155
156
  }
156
157
  const W = class W {
@@ -167,7 +168,7 @@ const W = class W {
167
168
  */
168
169
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
169
170
  static getConfig() {
170
- if (wr(W.config))
171
+ if (Cr(W.config))
171
172
  throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
172
173
  return W.config;
173
174
  }
@@ -189,55 +190,91 @@ const W = class W {
189
190
  * Конфигурация приложения.
190
191
  */
191
192
  t(W, "config");
192
- let A = W;
193
- const Ae = X("__auth_state_private", () => {
194
- var e;
195
- const n = f(Promise.resolve((e = A.getConfig().devMode) == null ? void 0 : e.initAuthBearerToken)), r = f(void 0);
193
+ let D = W;
194
+ const ee = Z("__auth_state_private", () => {
195
+ var i;
196
+ const n = f(Promise.resolve((i = D.getConfig().devMode) == null ? void 0 : i.initAuthBearerToken)), r = f(void 0), e = f(void 0), s = f({});
196
197
  return {
197
198
  /**
198
- * {@link Promise<string>} для получения ключа доступа к системам.
199
+ * {@link Promise<string>} для получения jwt-ключа доступа к системам.
199
200
  */
200
- accessToken: n,
201
+ jwtToken: n,
201
202
  /**
202
- * Функция для обновления ключа доступа к системам.
203
+ * Функция для обновления jwt-ключа доступа к системам.
203
204
  */
204
- accessTokenUpdater: r
205
+ jwtTokenUpdater: r,
206
+ /**
207
+ * Список прав текущего пользователя.
208
+ */
209
+ userPermissions: e,
210
+ /**
211
+ * Список вычисляемых свойств для проверки наличия у пользователя прав доступа.
212
+ */
213
+ userPermissionsComputedRefs: s
205
214
  };
206
- }), De = X("__auth_state", () => {
207
- const n = v(() => {
208
- const s = Ae();
209
- if (T(s.accessToken) && !T(s.accessTokenUpdater)) {
210
- const i = s.accessTokenUpdater();
211
- s.accessToken = i, i.then((o) => {
212
- s.accessToken = Promise.resolve(o);
213
- }).catch(C);
215
+ }), ae = Z("__auth_state", () => {
216
+ const n = R(() => {
217
+ const i = ee();
218
+ if ($(i.jwtToken) && !$(i.jwtTokenUpdater)) {
219
+ const o = i.jwtTokenUpdater();
220
+ i.jwtToken = o, o.then((c) => {
221
+ i.jwtToken = Promise.resolve(c);
222
+ }).catch(w);
214
223
  }
215
- return s.accessToken;
224
+ return i.jwtToken;
216
225
  });
217
- function r(s) {
218
- Ae().accessTokenUpdater = s;
226
+ function r(i) {
227
+ ee().jwtTokenUpdater = i;
219
228
  }
220
229
  function e() {
221
- Ae().accessToken = void 0;
230
+ ee().jwtToken = void 0;
231
+ }
232
+ function s(i) {
233
+ const o = ee();
234
+ !$(o.jwtToken) && $(o.userPermissions) && o.jwtToken.then((u) => {
235
+ const m = ie.getJwtPayload(u);
236
+ o.userPermissions = m.exp * 1e3 > Date.now() ? vr(m.resourceAccess, (v) => (v == null ? void 0 : v.roles) ?? []) : void 0;
237
+ }).catch(w);
238
+ const c = J(i) ? i.join(" && ") : i;
239
+ if (!$(o.userPermissionsComputedRefs[c]))
240
+ return o.userPermissionsComputedRefs[c];
241
+ const p = R(() => {
242
+ const u = (m) => {
243
+ var _;
244
+ const v = Rr(m, ".");
245
+ if (v.length < 2)
246
+ return !1;
247
+ const [S, I] = v, b = (_ = ee().userPermissions) == null ? void 0 : _[S];
248
+ return J(b) && b.includes(I);
249
+ };
250
+ return J(i) ? Pr(i, (m) => u(m)) : u(i);
251
+ });
252
+ return o.userPermissionsComputedRefs[c] = p, p;
222
253
  }
223
254
  return {
224
255
  /**
225
- * {@link Promise<string>} для получения ключа доступа к системам.
256
+ * {@link Promise<string>} для получения jwt-ключа доступа к системам.
226
257
  */
227
- accessToken: n,
258
+ jwtToken: n,
228
259
  /**
229
- * Устанавливает механизм для обновления ключа доступа к системам.
260
+ * Устанавливает механизм для обновления jwt-ключа доступа к системам.
230
261
  *
231
- * @param updater Механизм для обновления ключа доступа к системам.
262
+ * @param updater Механизм для обновления jwt-ключа доступа к системам.
232
263
  */
233
- setAccessTokenUpdater: r,
264
+ setJwtTokenUpdater: r,
234
265
  /**
235
- * Выполняет очистку ключа доступа к системам.
266
+ * Выполняет очистку jwt-ключа доступа к системам.
236
267
  */
237
- invalidateAccessToken: e
268
+ invalidateJwtToken: e,
269
+ /**
270
+ * Возвращает вычисляемое поле для проверки наличия указанных прав доступа.
271
+ *
272
+ * @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
273
+ */
274
+ hasUserPermission: s
238
275
  };
239
276
  });
240
- class H {
277
+ class M {
241
278
  /**
242
279
  * Инициализирует экземпляр класса {@link Identity}.
243
280
  *
@@ -253,16 +290,16 @@ class H {
253
290
  * @inheritDoc
254
291
  */
255
292
  t(this, "guid");
256
- this.id = r == null ? void 0 : r.id, T(this.id) && (T(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
293
+ this.id = r == null ? void 0 : r.id, $(this.id) && ($(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
257
294
  }
258
295
  /**
259
296
  * Возвращает признак, что это новая запись.
260
297
  */
261
298
  isNewRec() {
262
- return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
299
+ return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
263
300
  }
264
301
  }
265
- class $ extends H {
302
+ class T extends M {
266
303
  /**
267
304
  * Инициализирует экземпляр класса {@link NamedIdentity}.
268
305
  *
@@ -277,7 +314,7 @@ class $ extends H {
277
314
  this.name = (e == null ? void 0 : e.name) ?? "";
278
315
  }
279
316
  }
280
- class te extends $ {
317
+ class ne extends T {
281
318
  /**
282
319
  * Инициализирует экземпляр класса {@link NamedIdentity}.
283
320
  *
@@ -292,7 +329,7 @@ class te extends $ {
292
329
  this.code = (e == null ? void 0 : e.code) ?? "";
293
330
  }
294
331
  }
295
- class er extends te {
332
+ class er extends ne {
296
333
  /**
297
334
  * Инициализирует экземпляр класса {@link CatalogableItem}.
298
335
  *
@@ -311,7 +348,7 @@ class er extends te {
311
348
  this.slug = (e == null ? void 0 : e.slug) ?? "";
312
349
  }
313
350
  }
314
- class Ie extends er {
351
+ class de extends er {
315
352
  /**
316
353
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
317
354
  *
@@ -326,7 +363,7 @@ class Ie extends er {
326
363
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
327
364
  }
328
365
  }
329
- class le extends Ie {
366
+ class he extends de {
330
367
  /**
331
368
  * Инициализирует экземпляр класса {@link BaseCategory}.
332
369
  *
@@ -350,11 +387,11 @@ class le extends Ie {
350
387
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
351
388
  */
352
389
  t(this, "currencyRates");
353
- 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]) => [vr(s), i])) : void 0;
390
+ 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]) => [Ar(s), i])) : void 0;
354
391
  }
355
392
  }
356
393
  var rr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(rr || {});
357
- class w extends $ {
394
+ class P extends T {
358
395
  /**
359
396
  * Инициализирует экземпляр класса {@link Reference}.
360
397
  *
@@ -373,12 +410,12 @@ class w extends $ {
373
410
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
374
411
  }
375
412
  }
376
- class we extends w {
413
+ class Pe extends P {
377
414
  /**
378
415
  * Возвращает значение справочника коэффициента розничной цены.
379
416
  */
380
417
  static getRetailPriceCoefficient() {
381
- return { id: -2, slug: rr.Retail, name: "Розн. цена", guid: "", isNewRec: Pr(!0) };
418
+ return { id: -2, slug: rr.Retail, name: "Розн. цена", guid: "", isNewRec: Dr(!0) };
382
419
  }
383
420
  }
384
421
  class qe {
@@ -408,7 +445,7 @@ class qe {
408
445
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
409
446
  */
410
447
  t(this, "readOnly");
411
- this.coefficient = new we(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
448
+ this.coefficient = new Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
412
449
  }
413
450
  }
414
451
  class tr {
@@ -429,9 +466,9 @@ class tr {
429
466
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
430
467
  }
431
468
  }
432
- class J extends w {
469
+ class K extends P {
433
470
  }
434
- class ve extends w {
471
+ class Re extends P {
435
472
  /**
436
473
  * Инициализирует экземпляр класса {@link Warehouse}.
437
474
  *
@@ -460,10 +497,10 @@ class ve extends w {
460
497
  * Координаты склада.
461
498
  */
462
499
  t(this, "coordinates");
463
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new tr(e == null ? void 0 : e.coordinates);
500
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new tr(e == null ? void 0 : e.coordinates);
464
501
  }
465
502
  }
466
- class Nr {
503
+ class Ur {
467
504
  /**
468
505
  * Инициализирует экземпляр класса {@link StockCount}.
469
506
  *
@@ -478,10 +515,10 @@ class Nr {
478
515
  * Количество остатков товара на складе.
479
516
  */
480
517
  t(this, "count");
481
- this.warehouse = new ve(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
518
+ this.warehouse = new Re(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
482
519
  }
483
520
  }
484
- class Or extends er {
521
+ class Gr extends er {
485
522
  /**
486
523
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
487
524
  *
@@ -496,7 +533,7 @@ class Or extends er {
496
533
  this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
497
534
  }
498
535
  }
499
- class qr {
536
+ class jr {
500
537
  /**
501
538
  * Инициализирует экземпляр класса {@link Image}.
502
539
  *
@@ -519,7 +556,7 @@ class qr {
519
556
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
520
557
  }
521
558
  }
522
- class S extends Or {
559
+ class k extends Gr {
523
560
  /**
524
561
  * Инициализирует экземпляр класса {@link Product}.
525
562
  *
@@ -604,16 +641,16 @@ class S extends Or {
604
641
  * Список коэффициентов цен на продукт.
605
642
  */
606
643
  t(this, "priceCoefficients");
607
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? y(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((u) => new Nr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
644
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = y(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((u) => new Ur(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
608
645
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
609
- s && (this.category = new Ie({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new Ie(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new qr(u, A.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new qe(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
646
+ s && (this.category = new de({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new de(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new jr(u, D.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new qe(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
610
647
  }
611
648
  /**
612
649
  * Возвращает признак, что это измеряемый товар.
613
650
  */
614
651
  getIsMeasurable() {
615
652
  var s;
616
- const e = (s = A.getConfig().catalog) == null ? void 0 : s.products.units;
653
+ const e = (s = D.getConfig().catalog) == null ? void 0 : s.products.units;
617
654
  return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
618
655
  }
619
656
  /**
@@ -629,7 +666,7 @@ class S extends Or {
629
666
  return this.retailCostRub ?? this.costRub;
630
667
  }
631
668
  }
632
- class Ur extends H {
669
+ class Fr extends M {
633
670
  /**
634
671
  * Инициализирует экземпляр класса {@link CartItemBase}.
635
672
  *
@@ -681,10 +718,10 @@ class Ur extends H {
681
718
  * Признак того, что позиция является дополнительной продажей.
682
719
  */
683
720
  t(this, "isAdditionalSale");
684
- this.product = new S(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new le(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Rr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
721
+ this.product = new k(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new he(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && ar(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
685
722
  }
686
723
  }
687
- class Gr extends Ur {
724
+ class Mr extends Fr {
688
725
  /**
689
726
  * Инициализирует экземпляр класса {@link CartItem}.
690
727
  *
@@ -734,7 +771,7 @@ class Gr extends Ur {
734
771
  this.currency = e.currency, this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
735
772
  }
736
773
  }
737
- class ue {
774
+ class me {
738
775
  /**
739
776
  * Инициализирует экземпляр класса {@link Cart}.
740
777
  *
@@ -753,7 +790,7 @@ class ue {
753
790
  * Список итоговых сумм по направлениям продаж.
754
791
  */
755
792
  t(this, "directionsSum");
756
- this.items = r.items.map((e) => new Gr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
793
+ this.items = r.items.map((e) => new Mr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
757
794
  }
758
795
  }
759
796
  class Ue {
@@ -775,7 +812,7 @@ class Ue {
775
812
  return new r(e);
776
813
  }
777
814
  }
778
- const _ = class _ {
815
+ const L = class L {
779
816
  /**
780
817
  * Инициализирует экземпляр класса {@link HttpRequester}.
781
818
  */
@@ -787,7 +824,7 @@ const _ = class _ {
787
824
  /**
788
825
  * Базовый URL путь для выполнения запросов.
789
826
  */
790
- t(this, "baseUrl", `${A.getConfig().http.portalApiUrl}/api`);
827
+ t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
791
828
  /**
792
829
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
793
830
  *
@@ -795,7 +832,7 @@ const _ = class _ {
795
832
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
796
833
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
797
834
  */
798
- t(this, "errorResponseHandler", C);
835
+ t(this, "errorResponseHandler", w);
799
836
  /**
800
837
  * Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
801
838
  */
@@ -814,7 +851,7 @@ const _ = class _ {
814
851
  // eslint-disable-next-line class-methods-use-this
815
852
  t(this, "authRequestInterceptor", async (r) => {
816
853
  let e;
817
- return T(De().accessToken) || (e = await De().accessToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
854
+ return $(ae().jwtToken) || (e = await ae().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
818
855
  });
819
856
  /**
820
857
  * Перехватчик запроса для преобразования данных запроса.
@@ -822,7 +859,7 @@ const _ = class _ {
822
859
  * @param request Данные запроса.
823
860
  */
824
861
  // eslint-disable-next-line class-methods-use-this
825
- t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = He(r.params)), ["put", "patch", "post"].includes(Ar(r.method)) && r.data && (r.data = He(r.data))), r));
862
+ t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Me(r.params)), ["put", "patch", "post"].includes($r(r.method)) && r.data && (r.data = Me(r.data))), r));
826
863
  /**
827
864
  * Перехватчик ошибок ответов на запрос.
828
865
  *
@@ -831,7 +868,7 @@ const _ = class _ {
831
868
  t(this, "authErrorsResponseInterceptors", (r) => {
832
869
  var s;
833
870
  const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
834
- return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (De().invalidateAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
871
+ return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (ae().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
835
872
  });
836
873
  /**
837
874
  * Перехватчик ответа для преобразования данных ответа на запрос.
@@ -840,10 +877,10 @@ const _ = class _ {
840
877
  */
841
878
  // eslint-disable-next-line class-methods-use-this
842
879
  t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Oe(r.data)), r));
843
- const r = A.getConfig().version;
844
- this.errorResponseHandler = _.defaultErrorsResponseHandler, this.httpClient = xr.create({
880
+ const r = D.getConfig().version;
881
+ this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = qr.create({
845
882
  headers: {
846
- "APP-VERSION": `${r.name} (${r.version}, ${q(r.date, A.getConfig().dateFormats.uiDate)})`,
883
+ "APP-VERSION": `${r.name} (${r.version}, ${q(r.date, D.getConfig().dateFormats.uiDate)})`,
847
884
  Accept: "application/json",
848
885
  "Content-Type": "application/json"
849
886
  }
@@ -852,7 +889,7 @@ const _ = class _ {
852
889
  (e) => Promise.reject(e)
853
890
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
854
891
  (e) => e,
855
- (e) => _.convertHttpErrorResponse(e)
892
+ (e) => L.convertHttpErrorResponse(e)
856
893
  ), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
857
894
  this.dataConverterResponseInterceptor,
858
895
  (e) => Promise.reject(e)
@@ -864,7 +901,7 @@ const _ = class _ {
864
901
  * @param handler Ссылка на функцию-обработчик ошибок.
865
902
  */
866
903
  static setDefaultErrorsResponseHandler(r) {
867
- _.defaultErrorsResponseHandler = r;
904
+ L.defaultErrorsResponseHandler = r;
868
905
  }
869
906
  /**
870
907
  * Возвращает экземпляр объекта текущего класса.
@@ -872,7 +909,7 @@ const _ = class _ {
872
909
  * @param type Тип данных, которыми оперирует метод.
873
910
  */
874
911
  static getInstance(r) {
875
- return Object.prototype.hasOwnProperty.call(_.instances, r.name) || (_.instances[r.name] = Ue.simpleInstanceInitializer(r)), _.instances[r.name];
912
+ return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = Ue.simpleInstanceInitializer(r)), L.instances[r.name];
876
913
  }
877
914
  /**
878
915
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -881,7 +918,7 @@ const _ = class _ {
881
918
  */
882
919
  static convertHttpErrorResponse(r) {
883
920
  var e, s;
884
- if (!T(r.request) || !T(r.response)) {
921
+ if (!$(r.request) || !$(r.response)) {
885
922
  const i = r == null ? void 0 : r.response;
886
923
  return Promise.reject({
887
924
  status: (i == null ? void 0 : i.status) ?? 0,
@@ -970,16 +1007,16 @@ const _ = class _ {
970
1007
  * Экземпляр объекта текущего класса.
971
1008
  */
972
1009
  // eslint-disable-next-line no-use-before-define
973
- t(_, "instances", {}), /**
1010
+ t(L, "instances", {}), /**
974
1011
  * Базовый обработчик ошибок выполнения запросов.
975
1012
  *
976
1013
  * @param error Данные об ошибке.
977
1014
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
978
1015
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
979
1016
  */
980
- t(_, "defaultErrorsResponseHandler", C);
981
- let h = _;
982
- class bt extends h {
1017
+ t(L, "defaultErrorsResponseHandler", w);
1018
+ let h = L;
1019
+ class It extends h {
983
1020
  /**
984
1021
  * Возвращает содержимое корзины указанного клиента.
985
1022
  *
@@ -988,7 +1025,7 @@ class bt extends h {
988
1025
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
989
1026
  */
990
1027
  getCart(r) {
991
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ue(e.data));
1028
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new me(e.data));
992
1029
  }
993
1030
  /**
994
1031
  * Удаляет всё содержимое корзины.
@@ -1026,7 +1063,7 @@ class bt extends h {
1026
1063
  isAdditionalSale: e.isAdditionalSale,
1027
1064
  ...e.configuratorParams
1028
1065
  },
1029
- (i) => new ue(i.data),
1066
+ (i) => new me(i.data),
1030
1067
  s
1031
1068
  );
1032
1069
  }
@@ -1056,7 +1093,7 @@ class bt extends h {
1056
1093
  isAdditionalSale: e.isAdditionalSale,
1057
1094
  ...e.configuratorParams
1058
1095
  },
1059
- (i) => new ue(i.data),
1096
+ (i) => new me(i.data),
1060
1097
  s
1061
1098
  );
1062
1099
  }
@@ -1079,11 +1116,11 @@ class bt extends h {
1079
1116
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1080
1117
  */
1081
1118
  addCartItemFromCSV(r) {
1082
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ue(e.data));
1119
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new me(e.data));
1083
1120
  }
1084
1121
  }
1085
- var Fr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Fr || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), Mr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Mr || {});
1086
- class z extends le {
1122
+ var Hr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Hr || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), Br = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Br || {});
1123
+ class B extends he {
1087
1124
  /**
1088
1125
  * Инициализирует экземпляр класса {@link Category}.
1089
1126
  *
@@ -1100,10 +1137,10 @@ class z extends le {
1100
1137
  * Список продуктов категории.
1101
1138
  */
1102
1139
  t(this, "products");
1103
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new z(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new S(o));
1140
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new B(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new k(o));
1104
1141
  }
1105
1142
  }
1106
- class sr extends $ {
1143
+ class sr extends T {
1107
1144
  /**
1108
1145
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1109
1146
  *
@@ -1115,10 +1152,10 @@ class sr extends $ {
1115
1152
  * Дата и время последнего изменения.
1116
1153
  */
1117
1154
  t(this, "updatedAt");
1118
- this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1155
+ this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1119
1156
  }
1120
1157
  }
1121
- class Hr extends sr {
1158
+ class zr extends sr {
1122
1159
  /**
1123
1160
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1124
1161
  *
@@ -1130,10 +1167,10 @@ class Hr extends sr {
1130
1167
  * Дата и время последнего удаления.
1131
1168
  */
1132
1169
  t(this, "deletedAt");
1133
- this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1170
+ this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1134
1171
  }
1135
1172
  }
1136
- class _t {
1173
+ class dt {
1137
1174
  /**
1138
1175
  * Возвращает актуальные и не просроченные данные из хранилища.
1139
1176
  *
@@ -1144,7 +1181,7 @@ class _t {
1144
1181
  if (e)
1145
1182
  try {
1146
1183
  const s = JSON.parse(e);
1147
- if (ar(y(s.availableFor) || Ze(), /* @__PURE__ */ new Date()))
1184
+ if (br(C(s.availableFor) || Ze(), /* @__PURE__ */ new Date()))
1148
1185
  return s.data ?? {};
1149
1186
  } catch {
1150
1187
  localStorage.removeItem(r);
@@ -1167,7 +1204,7 @@ class _t {
1167
1204
  );
1168
1205
  }
1169
1206
  }
1170
- class G extends $ {
1207
+ class G extends T {
1171
1208
  /**
1172
1209
  * Инициализирует экземпляр класса {@link UserShortInfo}.
1173
1210
  *
@@ -1182,7 +1219,7 @@ class G extends $ {
1182
1219
  this.type = e == null ? void 0 : e.type;
1183
1220
  }
1184
1221
  }
1185
- class Br extends $ {
1222
+ class Wr extends T {
1186
1223
  /**
1187
1224
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
1188
1225
  *
@@ -1218,10 +1255,10 @@ class Br extends $ {
1218
1255
  * Дата и время удаления.
1219
1256
  */
1220
1257
  t(this, "deletedAt");
1221
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? y(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new G(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1258
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = y(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new G(e == null ? void 0 : e.owner), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1222
1259
  }
1223
1260
  }
1224
- class j extends sr {
1261
+ class z extends sr {
1225
1262
  /**
1226
1263
  * Инициализирует экземпляр класса {@link PriceTemplate}.
1227
1264
  *
@@ -1237,10 +1274,10 @@ class j extends sr {
1237
1274
  * Дата и время создания шаблона.
1238
1275
  */
1239
1276
  t(this, "createdAt");
1240
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1277
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1241
1278
  }
1242
1279
  }
1243
- class K extends S {
1280
+ class Q extends k {
1244
1281
  /**
1245
1282
  * Инициализирует экземпляр класса {@link ClientProduct}.
1246
1283
  *
@@ -1276,10 +1313,10 @@ class K extends S {
1276
1313
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1277
1314
  */
1278
1315
  t(this, "isFavorite");
1279
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new Br(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new j(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1316
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new Wr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new z(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1280
1317
  }
1281
1318
  }
1282
- class zr {
1319
+ class Vr {
1283
1320
  /**
1284
1321
  * Инициализирует экземпляр класса {@link ContactLinks}.
1285
1322
  *
@@ -1297,9 +1334,9 @@ class zr {
1297
1334
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1298
1335
  }
1299
1336
  }
1300
- class I extends w {
1337
+ class x extends P {
1301
1338
  }
1302
- class se extends $ {
1339
+ class oe extends T {
1303
1340
  /**
1304
1341
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1305
1342
  *
@@ -1310,7 +1347,7 @@ class se extends $ {
1310
1347
  /**
1311
1348
  * Направление продаж.
1312
1349
  */
1313
- t(this, "salesDirection", new I());
1350
+ t(this, "salesDirection", new x());
1314
1351
  /**
1315
1352
  * URI путь к фотографии пользователя.
1316
1353
  */
@@ -1323,10 +1360,10 @@ class se extends $ {
1323
1360
  * Признак того, что менеджер является основным для клиента.
1324
1361
  */
1325
1362
  t(this, "isDefault");
1326
- e && (this.salesDirection = new I(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new zr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1363
+ e && (this.salesDirection = new x(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Vr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1327
1364
  }
1328
1365
  }
1329
- class Pe extends se {
1366
+ class Ae extends oe {
1330
1367
  /**
1331
1368
  * Инициализирует экземпляр класса {@link Manager}.
1332
1369
  *
@@ -1357,7 +1394,7 @@ class Pe extends se {
1357
1394
  this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId;
1358
1395
  }
1359
1396
  }
1360
- class jr extends le {
1397
+ class Er extends he {
1361
1398
  /**
1362
1399
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1363
1400
  *
@@ -1385,10 +1422,10 @@ class jr extends le {
1385
1422
  * Данные о менеджере за которым закреплена категория.
1386
1423
  */
1387
1424
  t(this, "manager");
1388
- this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Pe(e.manager) : void 0;
1425
+ this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Ae(e.manager) : void 0;
1389
1426
  }
1390
1427
  }
1391
- class ge extends jr {
1428
+ class fe extends Er {
1392
1429
  /**
1393
1430
  * Инициализирует экземпляр класса {@link ClientCategory}.
1394
1431
  *
@@ -1405,7 +1442,7 @@ class ge extends jr {
1405
1442
  * Список продуктов категории.
1406
1443
  */
1407
1444
  t(this, "products");
1408
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ge(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
1445
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new fe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Q(o));
1409
1446
  }
1410
1447
  }
1411
1448
  class ir {
@@ -1423,10 +1460,10 @@ class ir {
1423
1460
  * Процент, который прибавляется к значению выбранного коэффициента.
1424
1461
  */
1425
1462
  t(this, "increasePercent");
1426
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new we(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1463
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1427
1464
  }
1428
1465
  }
1429
- class ae extends ir {
1466
+ class $e extends ir {
1430
1467
  /**
1431
1468
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1432
1469
  *
@@ -1438,12 +1475,12 @@ class ae extends ir {
1438
1475
  * Базовые данные о продукте.
1439
1476
  */
1440
1477
  t(this, "productCategory");
1441
- this.productCategory = new le(e == null ? void 0 : e.productCategory);
1478
+ this.productCategory = new he(e == null ? void 0 : e.productCategory);
1442
1479
  }
1443
1480
  }
1444
- class Q extends w {
1481
+ class Y extends P {
1445
1482
  }
1446
- class ie extends w {
1483
+ class ce extends P {
1447
1484
  /**
1448
1485
  * Инициализирует экземпляр класса {@link Region}.
1449
1486
  *
@@ -1454,11 +1491,11 @@ class ie extends w {
1454
1491
  /**
1455
1492
  * Данные о стране, в которой расположен регион.
1456
1493
  */
1457
- t(this, "country", new Q());
1458
- e && (this.country = new Q(e.country));
1494
+ t(this, "country", new Y());
1495
+ e && (this.country = new Y(e.country));
1459
1496
  }
1460
1497
  }
1461
- class Fe extends w {
1498
+ class je extends P {
1462
1499
  /**
1463
1500
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1464
1501
  *
@@ -1469,11 +1506,11 @@ class Fe extends w {
1469
1506
  /**
1470
1507
  * Данные о регионе, в котором расположен город.
1471
1508
  */
1472
- t(this, "region", new ie());
1473
- e && (this.region = new ie(e.region));
1509
+ t(this, "region", new ce());
1510
+ e && (this.region = new ce(e.region));
1474
1511
  }
1475
1512
  }
1476
- class nr extends $ {
1513
+ class nr extends T {
1477
1514
  /**
1478
1515
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1479
1516
  *
@@ -1509,10 +1546,10 @@ class nr extends $ {
1509
1546
  * Признак активности учетной записи пользователя.
1510
1547
  */
1511
1548
  t(this, "isActive");
1512
- 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 I(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? y(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1549
+ 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 x(e.salesDirection) : void 0, this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = y(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1513
1550
  }
1514
1551
  }
1515
- class pe extends nr {
1552
+ class ge extends nr {
1516
1553
  /**
1517
1554
  * Инициализирует экземпляр класса {@link Client}.
1518
1555
  *
@@ -1554,10 +1591,10 @@ class pe extends nr {
1554
1591
  * Список менеджеров клиента.
1555
1592
  */
1556
1593
  t(this, "managers");
1557
- this.salesDirection = new I(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 Fe(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((i) => new se(i))) ?? [];
1594
+ this.salesDirection = new x(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 je(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((i) => new oe(i))) ?? [];
1558
1595
  }
1559
1596
  }
1560
- class Z extends H {
1597
+ class re extends M {
1561
1598
  /**
1562
1599
  * Инициализирует новый экземпляр класса.
1563
1600
  *
@@ -1581,10 +1618,10 @@ class Z extends H {
1581
1618
  * Данные шаблона прайс-листа.
1582
1619
  */
1583
1620
  t(this, "priceTemplate");
1584
- this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new pe(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
1621
+ this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ge(e == null ? void 0 : e.client), this.priceTemplate = new z(e == null ? void 0 : e.priceTemplate);
1585
1622
  }
1586
1623
  }
1587
- class $e extends ir {
1624
+ class Te extends ir {
1588
1625
  /**
1589
1626
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1590
1627
  *
@@ -1596,12 +1633,12 @@ class $e extends ir {
1596
1633
  * Базовые данные о продукте.
1597
1634
  */
1598
1635
  t(this, "product");
1599
- this.product = new S(e == null ? void 0 : e.product);
1636
+ this.product = new k(e == null ? void 0 : e.product);
1600
1637
  }
1601
1638
  }
1602
- class or extends w {
1639
+ class or extends P {
1603
1640
  }
1604
- class ee extends $ {
1641
+ class te extends T {
1605
1642
  /**
1606
1643
  * Инициализирует экземпляр класса {@link Property}.
1607
1644
  *
@@ -1624,7 +1661,7 @@ class ee extends $ {
1624
1661
  this.type = new or(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1625
1662
  }
1626
1663
  }
1627
- class B {
1664
+ class H {
1628
1665
  /**
1629
1666
  * Инициализирует экземпляр класса {@link PropertyValue}.
1630
1667
  *
@@ -1640,7 +1677,7 @@ class B {
1640
1677
  * Может быть строкой, числом, boolean, диапазоном или JSON объектом.
1641
1678
  */
1642
1679
  t(this, "value");
1643
- this.property = new ee(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1680
+ this.property = new te(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1644
1681
  }
1645
1682
  }
1646
1683
  class O {
@@ -1658,10 +1695,10 @@ class O {
1658
1695
  * Окончание периода.
1659
1696
  */
1660
1697
  t(this, "to");
1661
- this.from = m(r == null ? void 0 : r.from) ? y(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? y(r.to) : (r == null ? void 0 : r.to) ?? null;
1698
+ this.from = y(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = y(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
1662
1699
  }
1663
1700
  }
1664
- class St {
1701
+ class Lt {
1665
1702
  /**
1666
1703
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
1667
1704
  *
@@ -1721,11 +1758,11 @@ class St {
1721
1758
  return Object.keys(this).forEach((c) => {
1722
1759
  const p = this[c];
1723
1760
  // eslint-disable-next-line prettier/prettier
1724
- T(p) || m(p) && p.trim().length === 0 || xe(p.isNewRec) && p.isNewRec() || (r[c] = p);
1761
+ $(p) || y(p) && p.trim().length === 0 || Ne(p.isNewRec) && p.isNewRec() || (r[c] = p);
1725
1762
  }), !((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;
1726
1763
  }
1727
1764
  }
1728
- class re extends $ {
1765
+ class se extends T {
1729
1766
  /**
1730
1767
  * Инициализирует экземпляр класса {@link PricingRole}.
1731
1768
  *
@@ -1760,7 +1797,7 @@ class re extends $ {
1760
1797
  this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
1761
1798
  }
1762
1799
  }
1763
- class Be {
1800
+ class He {
1764
1801
  /**
1765
1802
  * Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
1766
1803
  *
@@ -1779,10 +1816,10 @@ class Be {
1779
1816
  * Минимальный коэффициент цены.
1780
1817
  */
1781
1818
  t(this, "minCoefficient");
1782
- this.role = new re(r == null ? void 0 : r.role), this.category = new le(r == null ? void 0 : r.category), this.minCoefficient = new we(r == null ? void 0 : r.minCoefficient);
1819
+ this.role = new se(r == null ? void 0 : r.role), this.category = new he(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
1783
1820
  }
1784
1821
  }
1785
- class Wr {
1822
+ class Jr {
1786
1823
  /**
1787
1824
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
1788
1825
  *
@@ -1804,7 +1841,7 @@ class Wr {
1804
1841
  this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
1805
1842
  }
1806
1843
  }
1807
- class Vr {
1844
+ class Kr {
1808
1845
  /**
1809
1846
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
1810
1847
  *
@@ -1834,7 +1871,7 @@ class Vr {
1834
1871
  this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.priceHistoryApiUrl = (r == null ? void 0 : r.priceHistoryApiUrl) ?? "", this.recommendationsApiUrl = (r == null ? void 0 : r.recommendationsApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
1835
1872
  }
1836
1873
  }
1837
- class Er {
1874
+ class Qr {
1838
1875
  /**
1839
1876
  * Инициализирует экземпляр класса {@link SentryConfig}.
1840
1877
  *
@@ -1879,7 +1916,7 @@ class Er {
1879
1916
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
1880
1917
  }
1881
1918
  }
1882
- class Jr {
1919
+ class Yr {
1883
1920
  /**
1884
1921
  * Инициализирует экземпляр класса {@link VersionConfig}.
1885
1922
  *
@@ -1898,10 +1935,10 @@ class Jr {
1898
1935
  * Текущая версия приложения.
1899
1936
  */
1900
1937
  t(this, "version");
1901
- this.date = m(r == null ? void 0 : r.date) ? y(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
1938
+ this.date = y(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
1902
1939
  }
1903
1940
  }
1904
- class It {
1941
+ class kt {
1905
1942
  /**
1906
1943
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
1907
1944
  *
@@ -1941,17 +1978,17 @@ class It {
1941
1978
  */
1942
1979
  t(this, "dateFormats");
1943
1980
  var e, s, i;
1944
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Vr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Wr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Er({
1981
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Kr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Jr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Qr({
1945
1982
  environment: this.environment,
1946
1983
  ...r == null ? void 0 : r.sentry
1947
- }), this.urls = r == null ? void 0 : r.urls, this.version = new Jr(r == null ? void 0 : r.version), this.dateFormats = {
1984
+ }), this.urls = r == null ? void 0 : r.urls, this.version = new Yr(r == null ? void 0 : r.version), this.dateFormats = {
1948
1985
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
1949
1986
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
1950
1987
  uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
1951
1988
  };
1952
1989
  }
1953
1990
  }
1954
- class Lt extends h {
1991
+ class xt extends h {
1955
1992
  /**
1956
1993
  * Возвращает данные о результатах поиска категорий и товаров.
1957
1994
  *
@@ -1978,11 +2015,11 @@ class Lt extends h {
1978
2015
  */
1979
2016
  // eslint-disable-next-line class-methods-use-this
1980
2017
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
1981
- let c = `${A.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2018
+ let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
1982
2019
  return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
1983
2020
  }
1984
2021
  }
1985
- class dt extends h {
2022
+ class Nt extends h {
1986
2023
  /**
1987
2024
  * Импортирует цены клиента из CSV файла.
1988
2025
  *
@@ -2106,7 +2143,7 @@ class dt extends h {
2106
2143
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2107
2144
  increase_percent: s.value
2108
2145
  },
2109
- (o) => new K(o.data)
2146
+ (o) => new Q(o.data)
2110
2147
  );
2111
2148
  }
2112
2149
  /**
@@ -2118,7 +2155,7 @@ class dt extends h {
2118
2155
  * @see /doc/api/internal#/operations/api_internal_client_price_products_remove
2119
2156
  */
2120
2157
  removeProductPrice(r, e) {
2121
- return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new K(s.data));
2158
+ return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new Q(s.data));
2122
2159
  }
2123
2160
  /**
2124
2161
  * Добавляет указанный продукт в список товаров для дополнительных продаж.
@@ -2181,7 +2218,7 @@ class dt extends h {
2181
2218
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2182
2219
  }
2183
2220
  }
2184
- class kt extends h {
2221
+ class Ot extends h {
2185
2222
  /**
2186
2223
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2187
2224
  *
@@ -2193,7 +2230,7 @@ class kt extends h {
2193
2230
  return this.get(
2194
2231
  `/internal/clients/${r}/price/templates`,
2195
2232
  {},
2196
- (e) => e.data.map((s) => new Z(s))
2233
+ (e) => e.data.map((s) => new re(s))
2197
2234
  );
2198
2235
  }
2199
2236
  /**
@@ -2204,7 +2241,7 @@ class kt extends h {
2204
2241
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
2205
2242
  */
2206
2243
  getActiveTemplate(r) {
2207
- return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Z(e.data));
2244
+ return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new re(e.data));
2208
2245
  }
2209
2246
  /**
2210
2247
  * Добавляет связь между клиентом и шаблоном прайс-листа.
@@ -2216,14 +2253,14 @@ class kt extends h {
2216
2253
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2217
2254
  */
2218
2255
  attachTemplate(r, e, s) {
2219
- const i = A.getConfig().dateFormats.api;
2256
+ const i = D.getConfig().dateFormats.api;
2220
2257
  return this.post(
2221
2258
  `/internal/clients/${r}/price/templates/${e}`,
2222
2259
  s && {
2223
2260
  startAt: s.startAt && q(s.startAt, i),
2224
2261
  endAt: s.endAt && q(s.endAt, i)
2225
2262
  },
2226
- (o) => new Z(o.data),
2263
+ (o) => new re(o.data),
2227
2264
  {},
2228
2265
  !0
2229
2266
  );
@@ -2250,14 +2287,14 @@ class kt extends h {
2250
2287
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2251
2288
  */
2252
2289
  changeTemplate(r, e, s, i) {
2253
- const o = A.getConfig().dateFormats.api;
2290
+ const o = D.getConfig().dateFormats.api;
2254
2291
  return this.patch(
2255
2292
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2256
2293
  i && {
2257
2294
  startAt: i.startAt && q(i.startAt, o),
2258
2295
  endAt: i.endAt && q(i.endAt, o)
2259
2296
  },
2260
- (c) => new Z(c.data)
2297
+ (c) => new re(c.data)
2261
2298
  );
2262
2299
  }
2263
2300
  /**
@@ -2273,7 +2310,7 @@ class kt extends h {
2273
2310
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2274
2311
  }
2275
2312
  }
2276
- class xt extends h {
2313
+ class qt extends h {
2277
2314
  /**
2278
2315
  * Возвращает список данных о корневых категориях.
2279
2316
  *
@@ -2287,7 +2324,7 @@ class xt extends h {
2287
2324
  {
2288
2325
  showHidden: r
2289
2326
  },
2290
- (e) => e.data.map((s) => new z(s))
2327
+ (e) => e.data.map((s) => new B(s))
2291
2328
  );
2292
2329
  }
2293
2330
  /**
@@ -2306,7 +2343,7 @@ class xt extends h {
2306
2343
  showHidden: e,
2307
2344
  withNestedCategories: s
2308
2345
  },
2309
- (i) => new z(i.data)
2346
+ (i) => new B(i.data)
2310
2347
  );
2311
2348
  }
2312
2349
  /**
@@ -2315,7 +2352,7 @@ class xt extends h {
2315
2352
  * @param categoryID Идентификатор категории продуктов.
2316
2353
  */
2317
2354
  getPublicCategoryData(r) {
2318
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new z(e.data));
2355
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new B(e.data));
2319
2356
  }
2320
2357
  /**
2321
2358
  * Возвращает список продуктов категории.
@@ -2333,7 +2370,7 @@ class xt extends h {
2333
2370
  showHidden: s,
2334
2371
  withPriceCoefficients: e
2335
2372
  },
2336
- (i) => ce(i.data, (o) => new S(o))
2373
+ (i) => ue(i.data, (o) => new k(o))
2337
2374
  );
2338
2375
  }
2339
2376
  /**
@@ -2346,7 +2383,7 @@ class xt extends h {
2346
2383
  getCategoryProductsCoefficients(r) {
2347
2384
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2348
2385
  const { data: s } = e;
2349
- return Dr(s, (i) => i.map((o) => new qe(o))), s;
2386
+ return Tr(s, (i) => i.map((o) => new qe(o))), s;
2350
2387
  });
2351
2388
  }
2352
2389
  /**
@@ -2358,14 +2395,14 @@ class xt extends h {
2358
2395
  publicSimpleSearch(r, e = 10) {
2359
2396
  return new Promise((s, i) => {
2360
2397
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2361
- s(o.categories.map((c) => new z(c)));
2398
+ s(o.categories.map((c) => new B(c)));
2362
2399
  }).catch((o) => {
2363
2400
  i(o);
2364
2401
  });
2365
2402
  });
2366
2403
  }
2367
2404
  }
2368
- class Nt extends h {
2405
+ class Ut extends h {
2369
2406
  /**
2370
2407
  * Возвращает данные об указанном продукте.
2371
2408
  *
@@ -2375,7 +2412,7 @@ class Nt extends h {
2375
2412
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2376
2413
  */
2377
2414
  getProductData(r, e = !1) {
2378
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new S(s.data));
2415
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new k(s.data));
2379
2416
  }
2380
2417
  /**
2381
2418
  * Возвращает публичные данные об указанном продукте.
@@ -2383,7 +2420,7 @@ class Nt extends h {
2383
2420
  * @param productId Идентификатор продукта.
2384
2421
  */
2385
2422
  getPublicProductData(r) {
2386
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new S(e.data));
2423
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new k(e.data));
2387
2424
  }
2388
2425
  /**
2389
2426
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2396,7 +2433,7 @@ class Nt extends h {
2396
2433
  return this.get(
2397
2434
  `/internal/catalog/products/${r}/coefficients`,
2398
2435
  {},
2399
- (e) => ce(e.data, (s) => new qe(s))
2436
+ (e) => ue(e.data, (s) => new qe(s))
2400
2437
  );
2401
2438
  }
2402
2439
  /**
@@ -2408,14 +2445,14 @@ class Nt extends h {
2408
2445
  publicSimpleSearch(r, e = 10) {
2409
2446
  return new Promise((s, i) => {
2410
2447
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2411
- s(o.products.map((c) => new S(c)));
2448
+ s(o.products.map((c) => new k(c)));
2412
2449
  }).catch((o) => {
2413
2450
  i(o);
2414
2451
  });
2415
2452
  });
2416
2453
  }
2417
2454
  }
2418
- class Ot extends h {
2455
+ class Gt extends h {
2419
2456
  /**
2420
2457
  * Возвращает список данных о корневых категориях указанного клиента.
2421
2458
  *
@@ -2431,7 +2468,7 @@ class Ot extends h {
2431
2468
  clientId: r,
2432
2469
  showHidden: e
2433
2470
  },
2434
- (s) => s.data.map((i) => new ge(i))
2471
+ (s) => s.data.map((i) => new fe(i))
2435
2472
  );
2436
2473
  }
2437
2474
  /**
@@ -2452,7 +2489,7 @@ class Ot extends h {
2452
2489
  showHidden: s,
2453
2490
  withNestedCategories: i
2454
2491
  },
2455
- (o) => new ge(o.data)
2492
+ (o) => new fe(o.data)
2456
2493
  );
2457
2494
  }
2458
2495
  /**
@@ -2473,11 +2510,11 @@ class Ot extends h {
2473
2510
  showHidden: i,
2474
2511
  withPriceCoefficients: s
2475
2512
  },
2476
- (o) => ce(o.data, (c) => new K(c))
2513
+ (o) => ue(o.data, (c) => new Q(c))
2477
2514
  );
2478
2515
  }
2479
2516
  }
2480
- class qt extends h {
2517
+ class jt extends h {
2481
2518
  /**
2482
2519
  * Возвращает данные об указанном продукте для указанного клиента.
2483
2520
  *
@@ -2494,12 +2531,12 @@ class qt extends h {
2494
2531
  clientId: e,
2495
2532
  withPriceCoefficients: s
2496
2533
  },
2497
- (i) => new K(i.data)
2534
+ (i) => new Q(i.data)
2498
2535
  );
2499
2536
  }
2500
2537
  }
2501
- var Me = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Me || {});
2502
- class ze {
2538
+ var Fe = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Fe || {});
2539
+ class Be {
2503
2540
  /**
2504
2541
  * Инициализирует экземпляр класса {@link FilterItem}.
2505
2542
  *
@@ -2518,7 +2555,7 @@ class ze {
2518
2555
  * Значение с которым сравнивается поле.
2519
2556
  */
2520
2557
  t(this, "value");
2521
- this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Me.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2558
+ this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Fe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2522
2559
  }
2523
2560
  /**
2524
2561
  * Преобразует фильтр в примитивное представление для API.
@@ -2530,10 +2567,10 @@ class ze {
2530
2567
  field: this.field,
2531
2568
  op: this.op
2532
2569
  };
2533
- return r.value = Se(this.value) ? q(this.value, A.getConfig().dateFormats.api) : this.value, r;
2570
+ return r.value = Ie(this.value) ? q(this.value, D.getConfig().dateFormats.api) : this.value, r;
2534
2571
  }
2535
2572
  }
2536
- class ne {
2573
+ class le {
2537
2574
  /**
2538
2575
  * Инициализирует экземпляр класса {@link FilterGroup}.
2539
2576
  *
@@ -2553,7 +2590,7 @@ class ne {
2553
2590
  */
2554
2591
  t(this, "groups");
2555
2592
  var e, s;
2556
- this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new ze(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
2593
+ this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Be(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new le(i))) ?? [];
2557
2594
  }
2558
2595
  /**
2559
2596
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2563,12 +2600,12 @@ class ne {
2563
2600
  toPrimitive() {
2564
2601
  return {
2565
2602
  groupOp: this.groupOp,
2566
- filters: this.filters.map((r) => r instanceof ze && xe(r.toPrimitive) ? r.toPrimitive() : r),
2567
- groups: this.groups.map((r) => r instanceof ne ? r.toPrimitive() : r)
2603
+ filters: this.filters.map((r) => r instanceof Be && Ne(r.toPrimitive) ? r.toPrimitive() : r),
2604
+ groups: this.groups.map((r) => r instanceof le ? r.toPrimitive() : r)
2568
2605
  };
2569
2606
  }
2570
2607
  }
2571
- class Re extends h {
2608
+ class De extends h {
2572
2609
  /**
2573
2610
  * Получает пагинированный список данных.
2574
2611
  *
@@ -2585,10 +2622,10 @@ class Re extends h {
2585
2622
  page: (i == null ? void 0 : i.page) ?? 1,
2586
2623
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2587
2624
  };
2588
- return e && (u.filters = JSON.stringify((e instanceof ne ? e : new ne(e)).toPrimitive())), Ce(s) || (u.sort = Ne(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
2625
+ return e && (u.filters = JSON.stringify((e instanceof le ? e : new le(e)).toPrimitive())), ve(s) || (u.sort = J(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
2589
2626
  }
2590
2627
  }
2591
- class Ut extends Re {
2628
+ class Ft extends De {
2592
2629
  /**
2593
2630
  * Возвращает список шаблонов прайс-листа.
2594
2631
  *
@@ -2601,7 +2638,7 @@ class Ut extends Re {
2601
2638
  getTemplateList(r, e, s) {
2602
2639
  return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
2603
2640
  const o = { ...i.data };
2604
- return o.data = o.data.map((c) => new j(c)), o;
2641
+ return o.data = o.data.map((c) => new z(c)), o;
2605
2642
  });
2606
2643
  }
2607
2644
  /**
@@ -2614,7 +2651,7 @@ class Ut extends Re {
2614
2651
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
2615
2652
  */
2616
2653
  createTemplate(r, e = {}) {
2617
- return this.post("/internal/price/templates", r, (s) => new j(s.data), e);
2654
+ return this.post("/internal/price/templates", r, (s) => new z(s.data), e);
2618
2655
  }
2619
2656
  /**
2620
2657
  * Возвращает данные о шаблоне прайс-листа.
@@ -2624,7 +2661,7 @@ class Ut extends Re {
2624
2661
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
2625
2662
  */
2626
2663
  getTemplate(r) {
2627
- return this.get(`/internal/price/templates/${r}`, {}, (e) => new j(e.data));
2664
+ return this.get(`/internal/price/templates/${r}`, {}, (e) => new z(e.data));
2628
2665
  }
2629
2666
  /**
2630
2667
  * Изменяет данные о шаблоне прайс-листа.
@@ -2637,7 +2674,7 @@ class Ut extends Re {
2637
2674
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
2638
2675
  */
2639
2676
  updateTemplate(r, e, s = {}) {
2640
- return this.patch(`/internal/price/templates/${r}`, e, (i) => new j(i.data), s);
2677
+ return this.patch(`/internal/price/templates/${r}`, e, (i) => new z(i.data), s);
2641
2678
  }
2642
2679
  /**
2643
2680
  * Удаляет данные о шаблоне прайс-листа.
@@ -2660,7 +2697,7 @@ class Ut extends Re {
2660
2697
  return this.get(
2661
2698
  `/internal/price/templates/${r}/products`,
2662
2699
  {},
2663
- (e) => e.data.map((s) => new $e(s))
2700
+ (e) => e.data.map((s) => new Te(s))
2664
2701
  );
2665
2702
  }
2666
2703
  /**
@@ -2672,7 +2709,7 @@ class Ut extends Re {
2672
2709
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
2673
2710
  */
2674
2711
  getProductTemplatePrice(r, e) {
2675
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new $e(s.data));
2712
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Te(s.data));
2676
2713
  }
2677
2714
  /**
2678
2715
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -2691,7 +2728,7 @@ class Ut extends Re {
2691
2728
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2692
2729
  increase_percent: s.value
2693
2730
  },
2694
- (o) => new $e(o.data)
2731
+ (o) => new Te(o.data)
2695
2732
  );
2696
2733
  }
2697
2734
  /**
@@ -2716,7 +2753,7 @@ class Ut extends Re {
2716
2753
  return this.get(
2717
2754
  `/internal/price/templates/${r}/categories`,
2718
2755
  {},
2719
- (e) => e.data.map((s) => new ae(s))
2756
+ (e) => e.data.map((s) => new $e(s))
2720
2757
  );
2721
2758
  }
2722
2759
  /**
@@ -2731,7 +2768,7 @@ class Ut extends Re {
2731
2768
  return this.get(
2732
2769
  `/internal/price/templates/${r}/categories/${e}`,
2733
2770
  {},
2734
- (s) => new ae(s.data)
2771
+ (s) => new $e(s.data)
2735
2772
  );
2736
2773
  }
2737
2774
  /**
@@ -2757,7 +2794,7 @@ class Ut extends Re {
2757
2794
  },
2758
2795
  params: i ? { recursively: !0 } : {}
2759
2796
  },
2760
- (c) => new ae(c.data)
2797
+ (c) => new $e(c.data)
2761
2798
  );
2762
2799
  }
2763
2800
  /**
@@ -2788,18 +2825,18 @@ class Ut extends Re {
2788
2825
  return this.get(
2789
2826
  `/internal/price/templates/${r}/clients`,
2790
2827
  {},
2791
- (e) => e.data.map((s) => new Z(s))
2828
+ (e) => e.data.map((s) => new re(s))
2792
2829
  );
2793
2830
  }
2794
2831
  }
2795
- class Gt extends h {
2832
+ class Mt extends h {
2796
2833
  /**
2797
2834
  * Возвращает список ролей ценообразования.
2798
2835
  *
2799
2836
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
2800
2837
  */
2801
2838
  getRoles() {
2802
- return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new re(e)));
2839
+ return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new se(e)));
2803
2840
  }
2804
2841
  /**
2805
2842
  * Добавляет новую роль ценообразования.
@@ -2809,7 +2846,7 @@ class Gt extends h {
2809
2846
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
2810
2847
  */
2811
2848
  createRole(r) {
2812
- return this.post("/internal/price/roles", r, (e) => new re(e.data));
2849
+ return this.post("/internal/price/roles", r, (e) => new se(e.data));
2813
2850
  }
2814
2851
  /**
2815
2852
  * Возвращает данные роли ценообразования.
@@ -2819,7 +2856,7 @@ class Gt extends h {
2819
2856
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
2820
2857
  */
2821
2858
  getRole(r) {
2822
- return this.get(`/internal/price/roles/${r}`, {}, (e) => new re(e.data));
2859
+ return this.get(`/internal/price/roles/${r}`, {}, (e) => new se(e.data));
2823
2860
  }
2824
2861
  /**
2825
2862
  * Обновляет данные роли ценообразования.
@@ -2830,7 +2867,7 @@ class Gt extends h {
2830
2867
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
2831
2868
  */
2832
2869
  updateRole(r, e) {
2833
- return this.patch(`/internal/price/roles/${r}`, e, (s) => new re(s.data));
2870
+ return this.patch(`/internal/price/roles/${r}`, e, (s) => new se(s.data));
2834
2871
  }
2835
2872
  /**
2836
2873
  * Удаляет роль ценообразования.
@@ -2853,7 +2890,7 @@ class Gt extends h {
2853
2890
  return this.get(
2854
2891
  `/internal/price/roles/rules/categories/${r}`,
2855
2892
  {},
2856
- (e) => e.data.map((s) => new Be(s))
2893
+ (e) => e.data.map((s) => new He(s))
2857
2894
  );
2858
2895
  }
2859
2896
  /**
@@ -2868,11 +2905,11 @@ class Gt extends h {
2868
2905
  return this.patch(
2869
2906
  `/internal/price/roles/rules/categories/${r}`,
2870
2907
  e,
2871
- (s) => s.data.map((i) => new Be(i))
2908
+ (s) => s.data.map((i) => new He(i))
2872
2909
  );
2873
2910
  }
2874
2911
  }
2875
- class Ft extends Re {
2912
+ class Ht extends De {
2876
2913
  /**
2877
2914
  * Возвращает пагинированный список свойств.
2878
2915
  *
@@ -2885,7 +2922,7 @@ class Ft extends Re {
2885
2922
  getProperties(r, e, s) {
2886
2923
  return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
2887
2924
  const o = { ...i.data };
2888
- return o.data = o.data.map((c) => new ee(c)), o;
2925
+ return o.data = o.data.map((c) => new te(c)), o;
2889
2926
  });
2890
2927
  }
2891
2928
  /**
@@ -2902,7 +2939,7 @@ class Ft extends Re {
2902
2939
  ...s,
2903
2940
  type: e
2904
2941
  },
2905
- (i) => new ee(i.data)
2942
+ (i) => new te(i.data)
2906
2943
  );
2907
2944
  }
2908
2945
  /**
@@ -2912,7 +2949,7 @@ class Ft extends Re {
2912
2949
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get
2913
2950
  */
2914
2951
  getProperty(r) {
2915
- return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ee(e.data));
2952
+ return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new te(e.data));
2916
2953
  }
2917
2954
  /**
2918
2955
  * Обновляет существующее свойство.
@@ -2929,7 +2966,7 @@ class Ft extends Re {
2929
2966
  ...i,
2930
2967
  type: s
2931
2968
  },
2932
- (o) => new ee(o.data)
2969
+ (o) => new te(o.data)
2933
2970
  );
2934
2971
  }
2935
2972
  /**
@@ -2948,7 +2985,7 @@ class Ft extends Re {
2948
2985
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
2949
2986
  */
2950
2987
  getProductProperties(r) {
2951
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new B(s)));
2988
+ return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
2952
2989
  }
2953
2990
  /**
2954
2991
  * Возвращает значение свойства продукта.
@@ -2958,7 +2995,7 @@ class Ft extends Re {
2958
2995
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
2959
2996
  */
2960
2997
  getProductProperty(r, e) {
2961
- return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new B(s.data));
2998
+ return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new H(s.data));
2962
2999
  }
2963
3000
  /**
2964
3001
  * Обновляет значение свойства продукта.
@@ -2969,7 +3006,7 @@ class Ft extends Re {
2969
3006
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
2970
3007
  */
2971
3008
  updateProductProperty(r, e, s) {
2972
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new B(i.data));
3009
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
2973
3010
  }
2974
3011
  /**
2975
3012
  * Удаляет значение свойства продукта.
@@ -3094,7 +3131,7 @@ class Ft extends Re {
3094
3131
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
3095
3132
  */
3096
3133
  getCategoryProperties(r) {
3097
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new B(s)));
3134
+ return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
3098
3135
  }
3099
3136
  /**
3100
3137
  * Возвращает значение свойства категории.
@@ -3104,7 +3141,7 @@ class Ft extends Re {
3104
3141
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
3105
3142
  */
3106
3143
  getCategoryProperty(r, e) {
3107
- return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new B(s.data));
3144
+ return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new H(s.data));
3108
3145
  }
3109
3146
  /**
3110
3147
  * Обновляет значение свойства категории.
@@ -3115,7 +3152,7 @@ class Ft extends Re {
3115
3152
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3116
3153
  */
3117
3154
  updateCategoryProperty(r, e, s) {
3118
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new B(i.data));
3155
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
3119
3156
  }
3120
3157
  /**
3121
3158
  * Удаляет значение свойства категории.
@@ -3244,7 +3281,7 @@ class Ft extends Re {
3244
3281
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3245
3282
  }
3246
3283
  }
3247
- function je(n, r, e) {
3284
+ function ze(n, r, e) {
3248
3285
  let s;
3249
3286
  return n.some((i) => {
3250
3287
  if (i.type === e && i.id === r)
@@ -3253,28 +3290,28 @@ function je(n, r, e) {
3253
3290
  return !1;
3254
3291
  const o = i;
3255
3292
  if (o.products && o.products.length > 0) {
3256
- const c = je(o.products, r, e);
3293
+ const c = ze(o.products, r, e);
3257
3294
  if (c)
3258
3295
  return s = c, !0;
3259
3296
  }
3260
3297
  if (o.categories && o.categories.length > 0) {
3261
- const c = je(o.categories, r, e);
3298
+ const c = ze(o.categories, r, e);
3262
3299
  if (c)
3263
3300
  return s = c, !0;
3264
3301
  }
3265
3302
  return !1;
3266
3303
  }), s;
3267
3304
  }
3268
- var Kr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(Kr || {}), b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
3269
- class Qr extends w {
3305
+ var Xr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(Xr || {}), d = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(d || {});
3306
+ class Zr extends P {
3270
3307
  }
3271
- class cr extends w {
3308
+ class cr extends P {
3272
3309
  }
3273
- class Mt extends w {
3310
+ class Bt extends P {
3274
3311
  }
3275
- class Yr extends w {
3312
+ class et extends P {
3276
3313
  }
3277
- class me extends $ {
3314
+ class ye extends T {
3278
3315
  /**
3279
3316
  * Инициализирует экземпляр класса {@link Currency}.
3280
3317
  *
@@ -3293,34 +3330,34 @@ class me extends $ {
3293
3330
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
3294
3331
  }
3295
3332
  }
3296
- class F extends w {
3333
+ class j extends P {
3297
3334
  /**
3298
3335
  * Возвращает сгенерированную запись-описание физического лица.
3299
3336
  */
3300
3337
  static generatePersonItem() {
3301
- return new F({
3338
+ return new j({
3302
3339
  id: 1,
3303
3340
  guid: "",
3304
- slug: b.Person,
3341
+ slug: d.Person,
3305
3342
  name: ""
3306
3343
  });
3307
3344
  }
3308
3345
  }
3309
- class Xr extends w {
3346
+ class rt extends P {
3310
3347
  }
3311
- class Zr extends w {
3348
+ class tt extends P {
3312
3349
  }
3313
- class Y extends w {
3350
+ class X extends P {
3314
3351
  }
3315
- class et extends w {
3352
+ class st extends P {
3316
3353
  }
3317
- class rt extends w {
3354
+ class it extends P {
3318
3355
  }
3319
- class lr extends w {
3356
+ class lr extends P {
3320
3357
  }
3321
- class pr extends w {
3358
+ class pr extends P {
3322
3359
  }
3323
- class Le extends H {
3360
+ class Le extends M {
3324
3361
  /**
3325
3362
  * Инициализирует экземпляр класса {@link BankAccount}.
3326
3363
  *
@@ -3347,11 +3384,11 @@ class Le extends H {
3347
3384
  /**
3348
3385
  * Данные о валюте.
3349
3386
  */
3350
- t(this, "currency", new me());
3351
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new me(e.currency));
3387
+ t(this, "currency", new ye());
3388
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ye(e.currency));
3352
3389
  }
3353
3390
  }
3354
- class de extends $ {
3391
+ class ke extends T {
3355
3392
  /**
3356
3393
  * Инициализирует экземпляр класса {@link Contact}.
3357
3394
  *
@@ -3370,7 +3407,7 @@ class de extends $ {
3370
3407
  this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
3371
3408
  }
3372
3409
  }
3373
- class M extends de {
3410
+ class F extends ke {
3374
3411
  /**
3375
3412
  * Инициализирует экземпляр класса {@link ContactPerson}.
3376
3413
  *
@@ -3402,10 +3439,10 @@ class M extends de {
3402
3439
  * Дата и время последнего удаления.
3403
3440
  */
3404
3441
  t(this, "deletedAt");
3405
- this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3442
+ this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3406
3443
  }
3407
3444
  }
3408
- class ur extends $ {
3445
+ class ur extends T {
3409
3446
  /**
3410
3447
  * Инициализирует экземпляр класса {@link ContragentBase}.
3411
3448
  *
@@ -3417,19 +3454,19 @@ class ur extends $ {
3417
3454
  /**
3418
3455
  * Данные о менеджере.
3419
3456
  */
3420
- t(this, "manager", new se());
3457
+ t(this, "manager", new oe());
3421
3458
  /**
3422
3459
  * Данные об организационно-правовой форме.
3423
3460
  */
3424
- t(this, "opf", F.generatePersonItem());
3461
+ t(this, "opf", j.generatePersonItem());
3425
3462
  /**
3426
3463
  * Направление продаж.
3427
3464
  */
3428
- t(this, "salesDirection", new I());
3465
+ t(this, "salesDirection", new x());
3429
3466
  /**
3430
3467
  * Группа партнеров (направление деятельности).
3431
3468
  */
3432
- t(this, "partnerGroup", new Y());
3469
+ t(this, "partnerGroup", new X());
3433
3470
  /**
3434
3471
  * Список контактных лиц контрагента.
3435
3472
  */
@@ -3463,10 +3500,10 @@ class ur extends $ {
3463
3500
  */
3464
3501
  t(this, "updater");
3465
3502
  if (e) {
3466
- if (this.opf = new F(e.opf), this.salesDirection = new I(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Y(e.partnerGroup)), e.manager && (this.manager = new se(e.manager)), e.contacts) {
3503
+ if (this.opf = new j(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new X(e.partnerGroup)), e.manager && (this.manager = new oe(e.manager)), e.contacts) {
3467
3504
  const s = [];
3468
3505
  e.contacts.forEach((i) => {
3469
- s.push(new M(i));
3506
+ s.push(new F(i));
3470
3507
  }), this.contacts = s;
3471
3508
  }
3472
3509
  if (e.bankAccounts) {
@@ -3478,7 +3515,7 @@ class ur extends $ {
3478
3515
  }
3479
3516
  }
3480
3517
  }
3481
- class tt extends ur {
3518
+ class nt extends ur {
3482
3519
  /**
3483
3520
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3484
3521
  *
@@ -3546,7 +3583,7 @@ class gr extends hr {
3546
3583
  e && (this.kpp = e.kpp ?? "");
3547
3584
  }
3548
3585
  }
3549
- class st extends gr {
3586
+ class ot extends gr {
3550
3587
  /**
3551
3588
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3552
3589
  *
@@ -3557,7 +3594,7 @@ class st extends gr {
3557
3594
  /**
3558
3595
  * Страна регистрации юридического лица нерезидента.
3559
3596
  */
3560
- t(this, "registrationCountry", new Q());
3597
+ t(this, "registrationCountry", new Y());
3561
3598
  /**
3562
3599
  * Регистрационный номер юридического лица нерезидента.
3563
3600
  */
@@ -3566,10 +3603,10 @@ class st extends gr {
3566
3603
  * Налоговый номер юридического лица нерезидента.
3567
3604
  */
3568
3605
  t(this, "taxNumber", "");
3569
- e && (this.registrationCountry = new Q(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3606
+ e && (this.registrationCountry = new Y(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3570
3607
  }
3571
3608
  }
3572
- class fe {
3609
+ class we {
3573
3610
  /**
3574
3611
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
3575
3612
  *
@@ -3577,18 +3614,18 @@ class fe {
3577
3614
  */
3578
3615
  static createInstance(r) {
3579
3616
  switch (r.opf.slug) {
3580
- case b.Ic:
3617
+ case d.Ic:
3581
3618
  return new hr(r);
3582
- case b.UlR:
3619
+ case d.UlR:
3583
3620
  return new gr(r);
3584
- case b.UlNr:
3585
- return new st(r);
3621
+ case d.UlNr:
3622
+ return new ot(r);
3586
3623
  default:
3587
- return new tt(r);
3624
+ return new nt(r);
3588
3625
  }
3589
3626
  }
3590
3627
  }
3591
- class Te extends H {
3628
+ class be extends M {
3592
3629
  /**
3593
3630
  * Инициализирует экземпляр класса {@link ContactRelation}.
3594
3631
  *
@@ -3603,7 +3640,7 @@ class Te extends H {
3603
3640
  this.isPrimary = e.isPrimary;
3604
3641
  }
3605
3642
  }
3606
- class it extends M {
3643
+ class ct extends F {
3607
3644
  /**
3608
3645
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
3609
3646
  *
@@ -3628,10 +3665,10 @@ class it extends M {
3628
3665
  */
3629
3666
  addresses: []
3630
3667
  });
3631
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Te(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Te(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Te(s))));
3668
+ e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new be(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new be(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new be(s))));
3632
3669
  }
3633
3670
  }
3634
- class ye extends Hr {
3671
+ class Ce extends zr {
3635
3672
  /**
3636
3673
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
3637
3674
  *
@@ -3668,10 +3705,10 @@ class ye extends Hr {
3668
3705
  * Признак того, что указанный адрес является адресом транспортной компании.
3669
3706
  */
3670
3707
  t(this, "isTransportCompanyAddress");
3671
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new tr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(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;
3708
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new tr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(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;
3672
3709
  }
3673
3710
  }
3674
- class We extends pe {
3711
+ class We extends ge {
3675
3712
  /**
3676
3713
  * Инициализирует экземпляр класса {@link Client}.
3677
3714
  *
@@ -3725,10 +3762,10 @@ class We extends pe {
3725
3762
  * Дополнительные данные о клиенте.
3726
3763
  */
3727
3764
  t(this, "extraData");
3728
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => fe.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new Y(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new ye(p))) ?? [], this.channelPrimaryInterest = new cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new pr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ve(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3765
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => we.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new X(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new Ce(p))) ?? [], this.channelPrimaryInterest = new cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new pr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3729
3766
  }
3730
3767
  }
3731
- class Ht {
3768
+ class zt {
3732
3769
  /**
3733
3770
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
3734
3771
  *
@@ -3824,7 +3861,7 @@ class Ht {
3824
3861
  */
3825
3862
  t(this, "lastOrder");
3826
3863
  var e, s, i, o, c, p;
3827
- this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new Fe(u)), this.region = new ie(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((u) => new Pe(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new I(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new J(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((u) => new Y(u)), this.contact = new de(r == null ? void 0 : r.contact), this.lastOrder = {
3864
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new je(u)), this.region = new ce(r == null ? void 0 : r.region), this.country = new Y(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((u) => new Ae(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new x(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new j(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new K(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((u) => new X(u)), this.contact = new ke(r == null ? void 0 : r.contact), this.lastOrder = {
3828
3865
  createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
3829
3866
  creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
3830
3867
  isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
@@ -3850,7 +3887,7 @@ class Ht {
3850
3887
  this.cities = [];
3851
3888
  break;
3852
3889
  case "region":
3853
- this.region = new ie();
3890
+ this.region = new ce();
3854
3891
  break;
3855
3892
  case "isActive":
3856
3893
  this.isActive = !0;
@@ -3874,16 +3911,16 @@ class Ht {
3874
3911
  this.salesDirections = [];
3875
3912
  break;
3876
3913
  case "contragentType":
3877
- this.contragentType = new F();
3914
+ this.contragentType = new j();
3878
3915
  break;
3879
3916
  case "preferredDeliveryType":
3880
- this.preferredDeliveryType = new J();
3917
+ this.preferredDeliveryType = new K();
3881
3918
  break;
3882
3919
  case "partnerGroups":
3883
3920
  this.partnerGroups = [];
3884
3921
  break;
3885
3922
  case "contact":
3886
- this.contact = new de();
3923
+ this.contact = new ke();
3887
3924
  break;
3888
3925
  }
3889
3926
  return this;
@@ -3898,11 +3935,11 @@ class Ht {
3898
3935
  return Object.keys(this).forEach((c) => {
3899
3936
  const p = this[c];
3900
3937
  // eslint-disable-next-line prettier/prettier
3901
- T(p) || m(p) && p.trim().length === 0 || xe(p.isNewRec) && p.isNewRec() || (r[c] = p);
3938
+ $(p) || y(p) && p.trim().length === 0 || Ne(p.isNewRec) && p.isNewRec() || (r[c] = p);
3902
3939
  }), !((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.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
3903
3940
  }
3904
3941
  }
3905
- class mr extends H {
3942
+ class mr extends M {
3906
3943
  /**
3907
3944
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
3908
3945
  *
@@ -3922,10 +3959,10 @@ class mr extends H {
3922
3959
  * Признак того, что заказ подтвержден в 1С.
3923
3960
  */
3924
3961
  t(this, "isApproved1c");
3925
- this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
3962
+ this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
3926
3963
  }
3927
3964
  }
3928
- class nt extends $ {
3965
+ class lt extends T {
3929
3966
  /**
3930
3967
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
3931
3968
  *
@@ -3958,10 +3995,10 @@ class nt extends $ {
3958
3995
  * Список менеджеров.
3959
3996
  */
3960
3997
  t(this, "managers");
3961
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new mr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new Y(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new I(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new se(o)));
3998
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new mr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new X(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new K(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new x(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new oe(o)));
3962
3999
  }
3963
4000
  }
3964
- class ot {
4001
+ class pt {
3965
4002
  /**
3966
4003
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
3967
4004
  *
@@ -3979,7 +4016,7 @@ class ot {
3979
4016
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
3980
4017
  }
3981
4018
  }
3982
- class Bt extends ot {
4019
+ class Wt extends pt {
3983
4020
  /**
3984
4021
  * Инициализирует экземпляр класса {@link DataTablePagination}.
3985
4022
  *
@@ -4010,7 +4047,7 @@ class Bt extends ot {
4010
4047
  this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
4011
4048
  }
4012
4049
  }
4013
- class zt {
4050
+ class Vt {
4014
4051
  /**
4015
4052
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4016
4053
  *
@@ -4028,7 +4065,7 @@ class zt {
4028
4065
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4029
4066
  }
4030
4067
  }
4031
- class jt extends Re {
4068
+ class Et extends De {
4032
4069
  /**
4033
4070
  * Возвращает данные об указанном клиенте.
4034
4071
  *
@@ -4051,7 +4088,7 @@ class jt extends Re {
4051
4088
  getClientsList(r, e, s, i) {
4052
4089
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4053
4090
  const c = { ...o.data };
4054
- return c.data = c.data.map((p) => new pe(p)), c;
4091
+ return c.data = c.data.map((p) => new ge(p)), c;
4055
4092
  });
4056
4093
  }
4057
4094
  /**
@@ -4064,7 +4101,7 @@ class jt extends Re {
4064
4101
  return this.getClientsList({
4065
4102
  groupOp: "and",
4066
4103
  groups: [],
4067
- filters: [{ field: "phone", op: Me.Contains, value: r }]
4104
+ filters: [{ field: "phone", op: Fe.Contains, value: r }]
4068
4105
  });
4069
4106
  }
4070
4107
  /**
@@ -4078,7 +4115,7 @@ class jt extends Re {
4078
4115
  const s = r.map((i) => i.id);
4079
4116
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4080
4117
  let o = [];
4081
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new nt(c))), o;
4118
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new lt(c))), o;
4082
4119
  });
4083
4120
  }
4084
4121
  /**
@@ -4090,7 +4127,7 @@ class jt extends Re {
4090
4127
  getAllClientContacts(r) {
4091
4128
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4092
4129
  let s = [];
4093
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new it(i))), s;
4130
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ct(i))), s;
4094
4131
  });
4095
4132
  }
4096
4133
  /**
@@ -4230,17 +4267,17 @@ class jt extends Re {
4230
4267
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4231
4268
  */
4232
4269
  createContragentClientData(r, e, s = {}) {
4233
- var u, P, a, L, d, k, x, N;
4270
+ var u, m, v, S, I, b, _, N;
4234
4271
  let i;
4235
4272
  const o = e, c = e, p = e;
4236
4273
  switch (e.opf.slug) {
4237
- case b.Ic:
4274
+ case d.Ic:
4238
4275
  i = {
4239
4276
  opf: o.opf.slug,
4240
4277
  name: o.name,
4241
4278
  alternative_name: o.alternativeName,
4242
4279
  partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4243
- manager_id: (P = o.manager) == null ? void 0 : P.id,
4280
+ manager_id: (m = o.manager) == null ? void 0 : m.id,
4244
4281
  comment: o.comment,
4245
4282
  inn: o.inn,
4246
4283
  okpo: o.okpo,
@@ -4252,13 +4289,13 @@ class jt extends Re {
4252
4289
  actual_address: o.actualAddress
4253
4290
  };
4254
4291
  break;
4255
- case b.UlR:
4292
+ case d.UlR:
4256
4293
  i = {
4257
4294
  opf: c.opf.slug,
4258
4295
  name: c.name,
4259
4296
  alternative_name: c.alternativeName,
4260
- partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
4261
- manager_id: (L = c.manager) == null ? void 0 : L.id,
4297
+ partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
4298
+ manager_id: (S = c.manager) == null ? void 0 : S.id,
4262
4299
  comment: c.comment,
4263
4300
  inn: c.inn,
4264
4301
  kpp: c.kpp,
@@ -4271,13 +4308,13 @@ class jt extends Re {
4271
4308
  actual_address: c.actualAddress
4272
4309
  };
4273
4310
  break;
4274
- case b.UlNr:
4311
+ case d.UlNr:
4275
4312
  i = {
4276
4313
  opf: p.opf.slug,
4277
4314
  name: p.name,
4278
4315
  alternative_name: p.alternativeName,
4279
- partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
4280
- manager_id: (k = p.manager) == null ? void 0 : k.id,
4316
+ partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4317
+ manager_id: (b = p.manager) == null ? void 0 : b.id,
4281
4318
  comment: p.comment,
4282
4319
  director_name: p.directorName,
4283
4320
  director_position: p.directorPosition,
@@ -4295,7 +4332,7 @@ class jt extends Re {
4295
4332
  opf: e.opf.slug,
4296
4333
  name: e.name,
4297
4334
  alternative_name: e.alternativeName,
4298
- partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
4335
+ partner_group_id: (_ = e.partnerGroup) == null ? void 0 : _.id,
4299
4336
  manager_id: (N = e.manager) == null ? void 0 : N.id,
4300
4337
  comment: e.comment
4301
4338
  };
@@ -4304,7 +4341,7 @@ class jt extends Re {
4304
4341
  return this.post(
4305
4342
  `/internal/clients/${r}/contragents`,
4306
4343
  i,
4307
- (U) => fe.createInstance(U.data),
4344
+ (U) => we.createInstance(U.data),
4308
4345
  s
4309
4346
  );
4310
4347
  }
@@ -4319,17 +4356,17 @@ class jt extends Re {
4319
4356
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4320
4357
  */
4321
4358
  updateContragentClientData(r, e, s = {}) {
4322
- var u, P, a, L, d, k, x, N;
4359
+ var u, m, v, S, I, b, _, N;
4323
4360
  let i;
4324
4361
  const o = e, c = e, p = e;
4325
4362
  switch (e.opf.slug) {
4326
- case b.Ic:
4363
+ case d.Ic:
4327
4364
  i = {
4328
4365
  opf: o.opf.slug,
4329
4366
  name: o.name,
4330
4367
  alternative_name: o.alternativeName,
4331
4368
  partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4332
- manager_id: (P = o.manager) == null ? void 0 : P.id,
4369
+ manager_id: (m = o.manager) == null ? void 0 : m.id,
4333
4370
  comment: o.comment,
4334
4371
  inn: o.inn,
4335
4372
  okpo: o.okpo,
@@ -4341,13 +4378,13 @@ class jt extends Re {
4341
4378
  actual_address: o.actualAddress
4342
4379
  };
4343
4380
  break;
4344
- case b.UlR:
4381
+ case d.UlR:
4345
4382
  i = {
4346
4383
  opf: c.opf.slug,
4347
4384
  name: c.name,
4348
4385
  alternative_name: c.alternativeName,
4349
- partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
4350
- manager_id: (L = c.manager) == null ? void 0 : L.id,
4386
+ partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
4387
+ manager_id: (S = c.manager) == null ? void 0 : S.id,
4351
4388
  comment: c.comment,
4352
4389
  inn: c.inn,
4353
4390
  kpp: c.kpp,
@@ -4360,13 +4397,13 @@ class jt extends Re {
4360
4397
  actual_address: c.actualAddress
4361
4398
  };
4362
4399
  break;
4363
- case b.UlNr:
4400
+ case d.UlNr:
4364
4401
  i = {
4365
4402
  opf: p.opf.slug,
4366
4403
  name: p.name,
4367
4404
  alternative_name: p.alternativeName,
4368
- partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
4369
- manager_id: (k = p.manager) == null ? void 0 : k.id,
4405
+ partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4406
+ manager_id: (b = p.manager) == null ? void 0 : b.id,
4370
4407
  comment: p.comment,
4371
4408
  director_name: p.directorName,
4372
4409
  director_position: p.directorPosition,
@@ -4384,7 +4421,7 @@ class jt extends Re {
4384
4421
  opf: e.opf.slug,
4385
4422
  name: e.name,
4386
4423
  alternative_name: e.alternativeName,
4387
- partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
4424
+ partner_group_id: (_ = e.partnerGroup) == null ? void 0 : _.id,
4388
4425
  manager_id: (N = e.manager) == null ? void 0 : N.id,
4389
4426
  comment: e.comment
4390
4427
  };
@@ -4393,7 +4430,7 @@ class jt extends Re {
4393
4430
  return this.patch(
4394
4431
  `/internal/clients/${r}/contragents/${e.id}`,
4395
4432
  i,
4396
- (U) => fe.createInstance(U.data),
4433
+ (U) => we.createInstance(U.data),
4397
4434
  s
4398
4435
  );
4399
4436
  }
@@ -4431,7 +4468,7 @@ class jt extends Re {
4431
4468
  }), e.operatingHours && (i.operating_hours = {
4432
4469
  from: e.operatingHours.from,
4433
4470
  to: e.operatingHours.to
4434
- }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new ye(p.data), s);
4471
+ }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new Ce(p.data), s);
4435
4472
  }
4436
4473
  /**
4437
4474
  * Обновляет данные об адресе доставки клиента.
@@ -4460,7 +4497,7 @@ class jt extends Re {
4460
4497
  }), this.patch(
4461
4498
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4462
4499
  i,
4463
- (p) => new ye(p.data),
4500
+ (p) => new Ce(p.data),
4464
4501
  s
4465
4502
  );
4466
4503
  }
@@ -4583,7 +4620,7 @@ class jt extends Re {
4583
4620
  comment: e.comment,
4584
4621
  not_disturb: e.notDisturb
4585
4622
  },
4586
- (i) => new M(i.data),
4623
+ (i) => new F(i.data),
4587
4624
  s
4588
4625
  );
4589
4626
  }
@@ -4726,7 +4763,7 @@ class jt extends Re {
4726
4763
  comment: e.comment,
4727
4764
  ...s
4728
4765
  };
4729
- return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new M(u.data), i);
4766
+ return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new F(u.data), i);
4730
4767
  }
4731
4768
  /**
4732
4769
  * Устанавливает признак основного контактного лица.
@@ -4765,7 +4802,7 @@ const V = class V extends h {
4765
4802
  * Время кэширования данных ответов на запросы (секунд).
4766
4803
  */
4767
4804
  t(this, "responseDataCacheTimeout");
4768
- this.responseDataCacheTimeout = A.getConfig().http.responseDataCacheTimeout;
4805
+ this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
4769
4806
  }
4770
4807
  /**
4771
4808
  * Возвращает кэшированные данные.
@@ -4787,7 +4824,7 @@ const V = class V extends h {
4787
4824
  */
4788
4825
  cacheResponse(e, s) {
4789
4826
  V.responseDataCache.set(e, {
4790
- validTo: $r(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
4827
+ validTo: _r(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
4791
4828
  val: s
4792
4829
  });
4793
4830
  }
@@ -4802,10 +4839,10 @@ const V = class V extends h {
4802
4839
  */
4803
4840
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
4804
4841
  getTypedDataArrayRequester(e, s, i = !1, o = {}) {
4805
- const c = s + (Ce(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
4842
+ const c = s + (ve(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
4806
4843
  return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
4807
- const P = u.map((a) => Ue.instanceInitializer(e, a));
4808
- return i && P && this.cacheResponse(s, P), P;
4844
+ const m = u.map((v) => Ue.instanceInitializer(e, v));
4845
+ return i && m && this.cacheResponse(s, m), m;
4809
4846
  });
4810
4847
  }
4811
4848
  };
@@ -4813,8 +4850,8 @@ const V = class V extends h {
4813
4850
  * Кэш результатов запросов.
4814
4851
  */
4815
4852
  t(V, "responseDataCache", /* @__PURE__ */ new Map());
4816
- let oe = V;
4817
- class Wt extends h {
4853
+ let pe = V;
4854
+ class Jt extends h {
4818
4855
  /**
4819
4856
  * Выполняет проверку занят ли указанный номер телефона.
4820
4857
  *
@@ -4828,7 +4865,7 @@ class Wt extends h {
4828
4865
  });
4829
4866
  }
4830
4867
  }
4831
- class Vt extends h {
4868
+ class Kt extends h {
4832
4869
  /**
4833
4870
  * Возвращает настройки указанного конфигуратора для указанной категории.
4834
4871
  *
@@ -4856,7 +4893,7 @@ class Vt extends h {
4856
4893
  const i = this.get(
4857
4894
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
4858
4895
  { params: e },
4859
- (c) => new S(c.data)
4896
+ (c) => new k(c.data)
4860
4897
  );
4861
4898
  return i.catch((c) => {
4862
4899
  this.errorResponseHandler(c, s);
@@ -4899,18 +4936,18 @@ class Vt extends h {
4899
4936
  return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
4900
4937
  }
4901
4938
  }
4902
- class Et {
4939
+ class Qt {
4903
4940
  /**
4904
4941
  * Возвращает диапазон дат по умолчанию.
4905
4942
  */
4906
4943
  static defaultDateRanges() {
4907
- const r = Tr(/* @__PURE__ */ new Date(), 1);
4944
+ const r = Sr(/* @__PURE__ */ new Date(), 1);
4908
4945
  return {
4909
4946
  // 'Следующий рабочий день' - это значение по-умолчанию
4910
- nextWorkingDay: { label: "Следующий рабочий день", from: kr(r), to: dr(r) },
4911
- today: { label: "Сегодня", from: Ze(), to: Lr() },
4912
- yesterday: { label: "Вчера", from: Ir(), to: Sr() },
4913
- tomorrow: { label: "Завтра", from: _r(), to: br() }
4947
+ nextWorkingDay: { label: "Следующий рабочий день", from: Or(r), to: Nr(r) },
4948
+ today: { label: "Сегодня", from: Ze(), to: xr() },
4949
+ yesterday: { label: "Вчера", from: kr(), to: Lr() },
4950
+ tomorrow: { label: "Завтра", from: dr(), to: Ir() }
4914
4951
  };
4915
4952
  }
4916
4953
  }
@@ -4955,12 +4992,12 @@ const E = class E {
4955
4992
  */
4956
4993
  t(E, "linearValues", ["пог.м.", "м.", "м2"]);
4957
4994
  let Ve = E;
4958
- class Jt {
4995
+ class Yt {
4959
4996
  /**
4960
4997
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
4961
4998
  */
4962
4999
  static generateUndefinedManagerInstance() {
4963
- return new Pe({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5000
+ return new Ae({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
4964
5001
  }
4965
5002
  /**
4966
5003
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -4971,15 +5008,15 @@ class Jt {
4971
5008
  return r.id === 0 && r.guid === "-undefined-";
4972
5009
  }
4973
5010
  }
4974
- class ct extends oe {
5011
+ class ut extends pe {
4975
5012
  /**
4976
5013
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
4977
5014
  */
4978
5015
  async getManagers() {
4979
- const r = "/internal/managers", e = oe.getCachedResponse(r);
5016
+ const r = "/internal/managers", e = pe.getCachedResponse(r);
4980
5017
  if (e)
4981
5018
  return e;
4982
- const i = (await this.get(r)).data.map((o) => Ue.instanceInitializer(Pe, o));
5019
+ const i = (await this.get(r)).data.map((o) => Ue.instanceInitializer(Ae, o));
4983
5020
  return this.cacheResponse(r, i), i;
4984
5021
  }
4985
5022
  }
@@ -4990,7 +5027,7 @@ class fr extends mr {
4990
5027
  * @param data Данные для первоначальной инициализации.
4991
5028
  */
4992
5029
  constructor(e) {
4993
- var s, i, o, c, p, u, P, a;
5030
+ var s, i, o, c, p, u, m, v;
4994
5031
  super(e);
4995
5032
  /**
4996
5033
  * Краткие данные о клиенте.
@@ -5032,19 +5069,19 @@ class fr extends mr {
5032
5069
  * Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
5033
5070
  */
5034
5071
  t(this, "isNotInStock");
5035
- this.client = new pe(e == null ? void 0 : e.client), this.payment = {
5072
+ this.client = new ge(e == null ? void 0 : e.client), this.payment = {
5036
5073
  type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5037
5074
  status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5038
5075
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5039
5076
  }, this.delivery = {
5040
5077
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5041
- date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? y(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
5042
- address: (P = e == null ? void 0 : e.delivery) != null && P.address ? new ye(e.delivery.address) : void 0,
5043
- warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new ve(e.delivery.warehouse) : void 0
5044
- }, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? y(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? y(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
5078
+ date: y((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? C(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
5079
+ address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Ce(e.delivery.address) : void 0,
5080
+ warehouse: (v = e == null ? void 0 : e.delivery) != null && v.warehouse ? new Re(e.delivery.warehouse) : void 0
5081
+ }, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
5045
5082
  }
5046
5083
  }
5047
- class lt extends H {
5084
+ class ht extends M {
5048
5085
  /**
5049
5086
  * Инициализирует экземпляр класса {@link OrderProduct}.
5050
5087
  *
@@ -5124,10 +5161,10 @@ class lt extends H {
5124
5161
  * который соответствует указанной ширине. Количество не ограничено.
5125
5162
  */
5126
5163
  t(this, "sawing");
5127
- this.product = new K(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
5164
+ this.product = new Q(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
5128
5165
  }
5129
5166
  }
5130
- class pt extends fr {
5167
+ class gt extends fr {
5131
5168
  /**
5132
5169
  * Инициализирует экземпляр класса {@link Order}.
5133
5170
  *
@@ -5167,10 +5204,10 @@ class pt extends fr {
5167
5204
  * Признак, что разрешена передача заказа в работу без оплаты.
5168
5205
  */
5169
5206
  t(this, "isAllowProcessingWithoutPayment");
5170
- this.products = (e.products ?? []).map((s) => new lt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? fe.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5207
+ this.products = (e.products ?? []).map((s) => new ht(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? we.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new P(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5171
5208
  }
5172
5209
  }
5173
- class Kt extends Re {
5210
+ class Xt extends De {
5174
5211
  /**
5175
5212
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5176
5213
  *
@@ -5201,10 +5238,10 @@ class Kt extends Re {
5201
5238
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5202
5239
  */
5203
5240
  getOrder(r) {
5204
- return this.get(`/internal/orders/${r}`, {}, (e) => new pt(e.data));
5241
+ return this.get(`/internal/orders/${r}`, {}, (e) => new gt(e.data));
5205
5242
  }
5206
5243
  }
5207
- class be {
5244
+ class _e {
5208
5245
  /**
5209
5246
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
5210
5247
  *
@@ -5231,10 +5268,10 @@ class be {
5231
5268
  * Источник клиентской цены.
5232
5269
  */
5233
5270
  t(this, "source");
5234
- this.client = new pe(r == null ? void 0 : r.client), this.product = new S(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) ?? Ge.Product;
5271
+ this.client = new ge(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) ?? Ge.Product;
5235
5272
  }
5236
5273
  }
5237
- const _e = (n) => {
5274
+ const Se = (n) => {
5238
5275
  var r, e, s, i, o;
5239
5276
  return n ? Ye(
5240
5277
  {
@@ -5245,13 +5282,13 @@ const _e = (n) => {
5245
5282
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5246
5283
  hideNotActive: n.hideNotActive
5247
5284
  },
5248
- (c) => T(c) || (Ne(c) || Xe(c)) && Ce(c)
5285
+ (c) => $(c) || (J(c) || Xe(c)) && ve(c)
5249
5286
  ) : {};
5250
5287
  }, Ee = (n) => {
5251
5288
  const r = {};
5252
5289
  return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
5253
5290
  };
5254
- class Qt extends h {
5291
+ class Zt extends h {
5255
5292
  /**
5256
5293
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
5257
5294
  *
@@ -5266,9 +5303,9 @@ class Qt extends h {
5266
5303
  `/internal/price/products/${r}/analyze`,
5267
5304
  {
5268
5305
  ...Ee(e),
5269
- filters: _e(s)
5306
+ filters: Se(s)
5270
5307
  },
5271
- (i) => i.data.map((o) => new be(o))
5308
+ (i) => i.data.map((o) => new _e(o))
5272
5309
  );
5273
5310
  }
5274
5311
  /**
@@ -5285,9 +5322,9 @@ class Qt extends h {
5285
5322
  `/internal/price/categories/${r}/analyze`,
5286
5323
  {
5287
5324
  ...Ee(e),
5288
- filters: _e(s)
5325
+ filters: Se(s)
5289
5326
  },
5290
- (i) => i.data.map((o) => new be(o))
5327
+ (i) => i.data.map((o) => new _e(o))
5291
5328
  );
5292
5329
  }
5293
5330
  /**
@@ -5306,13 +5343,13 @@ class Qt extends h {
5306
5343
  `/internal/price/categories/${r}/analyze/square`,
5307
5344
  {
5308
5345
  ...e,
5309
- filters: _e(s)
5346
+ filters: Se(s)
5310
5347
  },
5311
- (i) => i.data.map((o) => new be(o))
5348
+ (i) => i.data.map((o) => new _e(o))
5312
5349
  );
5313
5350
  }
5314
5351
  }
5315
- class ut {
5352
+ class mt {
5316
5353
  /**
5317
5354
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
5318
5355
  *
@@ -5359,10 +5396,10 @@ class ut {
5359
5396
  * @inheritDoc
5360
5397
  */
5361
5398
  t(this, "currency");
5362
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = m(r.costDate) ? y(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new te(r.product) : void 0, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new me(r.currency) : void 0;
5399
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ne(r.product) : void 0, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new ye(r.currency) : void 0;
5363
5400
  }
5364
5401
  }
5365
- class ht extends te {
5402
+ class ft extends ne {
5366
5403
  /**
5367
5404
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
5368
5405
  *
@@ -5374,15 +5411,15 @@ class ht extends te {
5374
5411
  * @inheritDoc
5375
5412
  */
5376
5413
  t(this, "history");
5377
- this.history = ce(e.history, (s) => new ut(s));
5414
+ this.history = ue(e.history, (s) => new mt(s));
5378
5415
  }
5379
5416
  }
5380
- class Yt extends h {
5417
+ class es extends h {
5381
5418
  /**
5382
5419
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5383
5420
  */
5384
5421
  constructor() {
5385
- super(), this.baseUrl = `${A.getConfig().http.priceHistoryApiUrl}/api`;
5422
+ super(), this.baseUrl = `${D.getConfig().http.priceHistoryApiUrl}/api`;
5386
5423
  }
5387
5424
  /**
5388
5425
  * Возвращает данные об истории изменения цен.
@@ -5393,16 +5430,16 @@ class Yt extends h {
5393
5430
  */
5394
5431
  getProductPriceHistory(r) {
5395
5432
  var i, o, c, p;
5396
- const e = A.getConfig().dateFormats.api, s = Ye(
5397
- ke(r, {
5433
+ const e = D.getConfig().dateFormats.api, s = Ye(
5434
+ xe(r, {
5398
5435
  costDate: {
5399
- from: Se((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
5400
- to: Se((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
5436
+ from: Ie((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
5437
+ to: Ie((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
5401
5438
  }
5402
5439
  }),
5403
- (u) => T(u) || (Ne(u) || Xe(u)) && Ce(u)
5440
+ (u) => $(u) || (J(u) || Xe(u)) && ve(u)
5404
5441
  );
5405
- return this.get("/internal/history", s, (u) => ce(u.data, (P) => new ht(P)));
5442
+ return this.get("/internal/history", s, (u) => ue(u.data, (m) => new ft(m)));
5406
5443
  }
5407
5444
  }
5408
5445
  class Je {
@@ -5420,15 +5457,15 @@ class Je {
5420
5457
  * Список рекомендованных категорий продуктов.
5421
5458
  */
5422
5459
  t(this, "productCategories", []);
5423
- r != null && r.products && (this.products = r.products.map((e) => new te(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new te(e)));
5460
+ r != null && r.products && (this.products = r.products.map((e) => new ne(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ne(e)));
5424
5461
  }
5425
5462
  }
5426
- class Xt extends h {
5463
+ class rs extends h {
5427
5464
  /**
5428
5465
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5429
5466
  */
5430
5467
  constructor() {
5431
- super(), this.baseUrl = `${A.getConfig().http.recommendationsApiUrl}/api`;
5468
+ super(), this.baseUrl = `${D.getConfig().http.recommendationsApiUrl}/api`;
5432
5469
  }
5433
5470
  /**
5434
5471
  * Возвращает данные о рекомендациях указанной категории продуктов.
@@ -5475,7 +5512,7 @@ class Xt extends h {
5475
5512
  });
5476
5513
  }
5477
5514
  }
5478
- class D extends oe {
5515
+ class a extends pe {
5479
5516
  /**
5480
5517
  * Возвращает {@link Promise} для получения данных указанного справочника.
5481
5518
  *
@@ -5484,7 +5521,7 @@ class D extends oe {
5484
5521
  * и использовать в случае аналогичных запросов.
5485
5522
  */
5486
5523
  getReference(r, e = !1) {
5487
- return this.getTypedDataArrayRequester(Qr, `/internal/references/${r}`, e);
5524
+ return this.getTypedDataArrayRequester(Zr, `/internal/references/${r}`, e);
5488
5525
  }
5489
5526
  /**
5490
5527
  * Возвращает {@link Promise} для получения справочника данных о канале
@@ -5497,44 +5534,44 @@ class D extends oe {
5497
5534
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
5498
5535
  */
5499
5536
  getContactPositions() {
5500
- return this.getTypedDataArrayRequester(Yr, "/internal/references/contact-position", !0);
5537
+ return this.getTypedDataArrayRequester(et, "/internal/references/contact-position", !0);
5501
5538
  }
5502
5539
  /**
5503
5540
  * Возвращает {@link Promise} для получения справочника списка валют.
5504
5541
  */
5505
5542
  getCurrency() {
5506
- return this.getTypedDataArrayRequester(me, "/public/references/currency", !0);
5543
+ return this.getTypedDataArrayRequester(ye, "/public/references/currency", !0);
5507
5544
  }
5508
5545
  /**
5509
5546
  * Возвращает {@link Promise} для получения справочника данных
5510
5547
  * групп партнеров (направлений деятельности).
5511
5548
  */
5512
5549
  getPartnerGroup() {
5513
- return this.getTypedDataArrayRequester(Y, "/internal/references/partner-group", !0);
5550
+ return this.getTypedDataArrayRequester(X, "/internal/references/partner-group", !0);
5514
5551
  }
5515
5552
  /**
5516
5553
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
5517
5554
  */
5518
5555
  getOpf() {
5519
- return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
5556
+ return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
5520
5557
  }
5521
5558
  /**
5522
5559
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
5523
5560
  */
5524
5561
  getOrderPaymentStatuses() {
5525
- return this.getTypedDataArrayRequester(Xr, "/public/references/order-payment-status", !0);
5562
+ return this.getTypedDataArrayRequester(rt, "/public/references/order-payment-status", !0);
5526
5563
  }
5527
5564
  /**
5528
5565
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
5529
5566
  */
5530
5567
  getOrderStatuses() {
5531
- return this.getTypedDataArrayRequester(Zr, "/public/references/order-status", !0);
5568
+ return this.getTypedDataArrayRequester(tt, "/public/references/order-status", !0);
5532
5569
  }
5533
5570
  /**
5534
5571
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
5535
5572
  */
5536
5573
  getPaymentTypes() {
5537
- return this.getTypedDataArrayRequester(et, "/public/references/payment-type", !0);
5574
+ return this.getTypedDataArrayRequester(st, "/public/references/payment-type", !0);
5538
5575
  }
5539
5576
  /**
5540
5577
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
@@ -5546,7 +5583,7 @@ class D extends oe {
5546
5583
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
5547
5584
  */
5548
5585
  getSalesDirections() {
5549
- return this.getTypedDataArrayRequester(I, "/public/references/sales-direction", !0);
5586
+ return this.getTypedDataArrayRequester(x, "/public/references/sales-direction", !0);
5550
5587
  }
5551
5588
  /**
5552
5589
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
@@ -5560,7 +5597,7 @@ class D extends oe {
5560
5597
  * @param term Терм поиска.
5561
5598
  */
5562
5599
  searchCity(r) {
5563
- return this.getTypedDataArrayRequester(Fe, `/internal/references/city-with-region-and-country/search?term=${r}`);
5600
+ return this.getTypedDataArrayRequester(je, `/internal/references/city-with-region-and-country/search?term=${r}`);
5564
5601
  }
5565
5602
  /**
5566
5603
  * Выполняет поиск данных о регионах по терму в названии.
@@ -5568,7 +5605,7 @@ class D extends oe {
5568
5605
  * @param term Терм поиска.
5569
5606
  */
5570
5607
  searchRegion(r) {
5571
- return this.getTypedDataArrayRequester(ie, `/internal/references/region-with-country/search?term=${r}`);
5608
+ return this.getTypedDataArrayRequester(ce, `/internal/references/region-with-country/search?term=${r}`);
5572
5609
  }
5573
5610
  /**
5574
5611
  * Выполняет поиск данных о странах по терму в названии.
@@ -5576,19 +5613,19 @@ class D extends oe {
5576
5613
  * @param term Терм поиска.
5577
5614
  */
5578
5615
  searchCountry(r) {
5579
- return this.getTypedDataArrayRequester(Q, `/internal/references/country/search?term=${r}`);
5616
+ return this.getTypedDataArrayRequester(Y, `/internal/references/country/search?term=${r}`);
5580
5617
  }
5581
5618
  /**
5582
5619
  * Возвращает {@link Promise} для получения справочника типов доставки.
5583
5620
  */
5584
5621
  getDeliveryTypes() {
5585
- return this.getTypedDataArrayRequester(J, "/internal/references/delivery-type", !0);
5622
+ return this.getTypedDataArrayRequester(K, "/internal/references/delivery-type", !0);
5586
5623
  }
5587
5624
  /**
5588
5625
  * Возвращает {@link Promise} для получения справочника складов.
5589
5626
  */
5590
5627
  getWarehouses() {
5591
- return this.getTypedDataArrayRequester(ve, "/public/references/warehouse", !0);
5628
+ return this.getTypedDataArrayRequester(Re, "/public/references/warehouse", !0);
5592
5629
  }
5593
5630
  /**
5594
5631
  * Возвращает {@link Promise} для получения справочника типов свойств.
@@ -5600,17 +5637,17 @@ class D extends oe {
5600
5637
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
5601
5638
  */
5602
5639
  getPriceCoefficients() {
5603
- return this.getTypedDataArrayRequester(we, "/internal/references/price-coefficient", !0);
5640
+ return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
5604
5641
  }
5605
5642
  /**
5606
5643
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
5607
5644
  */
5608
5645
  getProductFileType() {
5609
- return this.getTypedDataArrayRequester(rt, "/public/references/product-file-type", !0);
5646
+ return this.getTypedDataArrayRequester(it, "/public/references/product-file-type", !0);
5610
5647
  }
5611
5648
  }
5612
- const R = X("__references_private", () => {
5613
- const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), P = f(void 0), a = f(void 0), L = f(void 0), d = f(void 0), k = f(void 0), x = f(void 0), N = f(void 0), U = f(void 0), l = f(void 0);
5649
+ const A = Z("__references_private", () => {
5650
+ const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), m = f(void 0), v = f(void 0), S = f(void 0), I = f(void 0), b = f(void 0), _ = f(void 0), N = f(void 0), U = f(void 0), l = f(void 0);
5614
5651
  return {
5615
5652
  /**
5616
5653
  * Список загружаемых/загруженных на данный момент значений.
@@ -5651,27 +5688,27 @@ const R = X("__references_private", () => {
5651
5688
  /**
5652
5689
  * Справочник типов оплаты заказов.
5653
5690
  */
5654
- paymentTypeReference: P,
5691
+ paymentTypeReference: m,
5655
5692
  /**
5656
5693
  * Справочник групп партнеров.
5657
5694
  */
5658
- partnerGroupReference: a,
5695
+ partnerGroupReference: v,
5659
5696
  /**
5660
5697
  * Справочник типов файлов продукктов/категорий.
5661
5698
  */
5662
- productFileTypeReference: L,
5699
+ productFileTypeReference: S,
5663
5700
  /**
5664
5701
  * Справочник типов ресурсов.
5665
5702
  */
5666
- resourceTypesReference: d,
5703
+ resourceTypesReference: I,
5667
5704
  /**
5668
5705
  * Справочник направлений продаж.
5669
5706
  */
5670
- salesDirectionsReference: k,
5707
+ salesDirectionsReference: b,
5671
5708
  /**
5672
5709
  * Справочник источников первичного интереса.
5673
5710
  */
5674
- sourcePrimaryInterestReference: x,
5711
+ sourcePrimaryInterestReference: _,
5675
5712
  /**
5676
5713
  * Справочник складов.
5677
5714
  */
@@ -5685,92 +5722,92 @@ const R = X("__references_private", () => {
5685
5722
  */
5686
5723
  priceCoefficientsReference: l
5687
5724
  };
5688
- }), Zt = X("references", () => {
5689
- const n = v(() => {
5690
- const l = R();
5691
- return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(D).getChannelPrimaryInterest().then((g) => {
5725
+ }), ts = Z("references", () => {
5726
+ const n = R(() => {
5727
+ const l = A();
5728
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(a).getChannelPrimaryInterest().then((g) => {
5692
5729
  l.channelPrimaryInterestReference = g;
5693
- }).catch(C)), l.channelPrimaryInterestReference;
5694
- }), r = v(() => {
5695
- const l = R();
5696
- return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(D).getContactPositions().then((g) => {
5730
+ }).catch(w)), l.channelPrimaryInterestReference;
5731
+ }), r = R(() => {
5732
+ const l = A();
5733
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(a).getContactPositions().then((g) => {
5697
5734
  l.contactPositionsReference = g;
5698
- }).catch(C)), l.contactPositionsReference;
5699
- }), e = v(() => {
5700
- const l = R();
5701
- return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(D).getCurrency().then((g) => {
5735
+ }).catch(w)), l.contactPositionsReference;
5736
+ }), e = R(() => {
5737
+ const l = A();
5738
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(a).getCurrency().then((g) => {
5702
5739
  l.currencyReference = g;
5703
- }).catch(C)), l.currencyReference;
5704
- }), s = v(() => {
5705
- const l = R();
5706
- return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(D).getOpf().then((g) => {
5740
+ }).catch(w)), l.currencyReference;
5741
+ }), s = R(() => {
5742
+ const l = A();
5743
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(a).getOpf().then((g) => {
5707
5744
  l.opfReference = g;
5708
- }).catch(C)), l.opfReference;
5709
- }), i = v(() => {
5710
- const l = R();
5711
- return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(D).getOrderPaymentStatuses().then((g) => {
5745
+ }).catch(w)), l.opfReference;
5746
+ }), i = R(() => {
5747
+ const l = A();
5748
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(a).getOrderPaymentStatuses().then((g) => {
5712
5749
  l.orderPaymentStatusReference = g;
5713
- }).catch(C)), l.orderPaymentStatusReference;
5714
- }), o = v(() => {
5715
- const l = R();
5716
- return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(D).getOrderStatuses().then((g) => {
5750
+ }).catch(w)), l.orderPaymentStatusReference;
5751
+ }), o = R(() => {
5752
+ const l = A();
5753
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(a).getOrderStatuses().then((g) => {
5717
5754
  l.orderStatusReference = g;
5718
- }).catch(C)), l.orderStatusReference;
5719
- }), c = v(() => {
5720
- const l = R();
5721
- return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(D).getPaymentTypes().then((g) => {
5755
+ }).catch(w)), l.orderStatusReference;
5756
+ }), c = R(() => {
5757
+ const l = A();
5758
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(a).getPaymentTypes().then((g) => {
5722
5759
  l.paymentTypeReference = g;
5723
- }).catch(C)), l.paymentTypeReference;
5724
- }), p = v(() => {
5725
- const l = R();
5726
- return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(D).getPartnerGroup().then((g) => {
5760
+ }).catch(w)), l.paymentTypeReference;
5761
+ }), p = R(() => {
5762
+ const l = A();
5763
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(a).getPartnerGroup().then((g) => {
5727
5764
  l.partnerGroupReference = g;
5728
- }).catch(C)), l.partnerGroupReference;
5729
- }), u = v(() => {
5730
- const l = R();
5731
- return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(D).getProductFileType().then((g) => {
5765
+ }).catch(w)), l.partnerGroupReference;
5766
+ }), u = R(() => {
5767
+ const l = A();
5768
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(a).getProductFileType().then((g) => {
5732
5769
  l.productFileTypeReference = g;
5733
- }).catch(C)), l.productFileTypeReference;
5734
- }), P = v(() => {
5735
- const l = R();
5736
- return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(D).getResourceTypes().then((g) => {
5770
+ }).catch(w)), l.productFileTypeReference;
5771
+ }), m = R(() => {
5772
+ const l = A();
5773
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(a).getResourceTypes().then((g) => {
5737
5774
  l.resourceTypesReference = g;
5738
- }).catch(C)), l.resourceTypesReference;
5739
- }), a = v(() => {
5740
- const l = R();
5741
- return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(D).getSalesDirections().then((g) => {
5775
+ }).catch(w)), l.resourceTypesReference;
5776
+ }), v = R(() => {
5777
+ const l = A();
5778
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(a).getSalesDirections().then((g) => {
5742
5779
  l.salesDirectionsReference = g;
5743
- }).catch(C)), l.salesDirectionsReference;
5744
- }), L = v(() => {
5745
- const l = R();
5746
- return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(D).getSourcePrimaryInterest().then((g) => {
5780
+ }).catch(w)), l.salesDirectionsReference;
5781
+ }), S = R(() => {
5782
+ const l = A();
5783
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(a).getSourcePrimaryInterest().then((g) => {
5747
5784
  l.sourcePrimaryInterestReference = g;
5748
- }).catch(C)), l.sourcePrimaryInterestReference;
5749
- }), d = v(() => {
5750
- const l = R();
5751
- return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(D).getDeliveryTypes().then((g) => {
5785
+ }).catch(w)), l.sourcePrimaryInterestReference;
5786
+ }), I = R(() => {
5787
+ const l = A();
5788
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(a).getDeliveryTypes().then((g) => {
5752
5789
  l.deliveryTypeReference = g;
5753
- }).catch(C)), l.deliveryTypeReference;
5754
- }), k = v(() => {
5755
- const l = R();
5756
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(ct).getManagers().then((g) => {
5790
+ }).catch(w)), l.deliveryTypeReference;
5791
+ }), b = R(() => {
5792
+ const l = A();
5793
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(ut).getManagers().then((g) => {
5757
5794
  l.managersList = g;
5758
- }).catch(C)), l.managersList;
5759
- }), x = v(() => {
5760
- const l = R();
5761
- return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(D).getWarehouses().then((g) => {
5795
+ }).catch(w)), l.managersList;
5796
+ }), _ = R(() => {
5797
+ const l = A();
5798
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(a).getWarehouses().then((g) => {
5762
5799
  l.warehousesReference = g;
5763
- }).catch(C)), l.warehousesReference;
5764
- }), N = v(() => {
5765
- const l = R();
5766
- return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(D).getPropertyTypes().then((g) => {
5800
+ }).catch(w)), l.warehousesReference;
5801
+ }), N = R(() => {
5802
+ const l = A();
5803
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(a).getPropertyTypes().then((g) => {
5767
5804
  l.propertyTypesReference = g;
5768
- }).catch(C)), l.propertyTypesReference;
5769
- }), U = v(() => {
5770
- const l = R();
5771
- return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(D).getPriceCoefficients().then((g) => {
5805
+ }).catch(w)), l.propertyTypesReference;
5806
+ }), U = R(() => {
5807
+ const l = A();
5808
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(a).getPriceCoefficients().then((g) => {
5772
5809
  l.priceCoefficientsReference = g;
5773
- }).catch(C)), l.priceCoefficientsReference;
5810
+ }).catch(w)), l.priceCoefficientsReference;
5774
5811
  });
5775
5812
  return {
5776
5813
  /**
@@ -5812,27 +5849,27 @@ const R = X("__references_private", () => {
5812
5849
  /**
5813
5850
  * Справочник типов ресурсов.
5814
5851
  */
5815
- resourceTypesReference: P,
5852
+ resourceTypesReference: m,
5816
5853
  /**
5817
5854
  * Справочник направлений продаж.
5818
5855
  */
5819
- salesDirectionsReference: a,
5856
+ salesDirectionsReference: v,
5820
5857
  /**
5821
5858
  * Справочник каналов первичного интереса.
5822
5859
  */
5823
- sourcePrimaryInterestsReference: L,
5860
+ sourcePrimaryInterestsReference: S,
5824
5861
  /**
5825
5862
  * Справочник типов доставки.
5826
5863
  */
5827
- deliveryTypeReference: d,
5864
+ deliveryTypeReference: I,
5828
5865
  /**
5829
5866
  * Список менеджеров.
5830
5867
  */
5831
- managersList: k,
5868
+ managersList: b,
5832
5869
  /**
5833
5870
  * Справочник складов.
5834
5871
  */
5835
- warehousesReference: x,
5872
+ warehousesReference: _,
5836
5873
  /**
5837
5874
  * Справочник типов свойств.
5838
5875
  */
@@ -5843,7 +5880,7 @@ const R = X("__references_private", () => {
5843
5880
  priceCoefficientsReference: U
5844
5881
  };
5845
5882
  });
5846
- class gt {
5883
+ class yt {
5847
5884
  /**
5848
5885
  * Инициализирует экземпляр класса {@link MetaTagItem}.
5849
5886
  *
@@ -5897,10 +5934,10 @@ class Ke {
5897
5934
  */
5898
5935
  t(this, "meta");
5899
5936
  var e;
5900
- this.resourceType = new lr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new gt(s))) ?? [];
5937
+ this.resourceType = new lr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new yt(s))) ?? [];
5901
5938
  }
5902
5939
  }
5903
- class es extends h {
5940
+ class ss extends h {
5904
5941
  /**
5905
5942
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
5906
5943
  *
@@ -5931,7 +5968,7 @@ class es extends h {
5931
5968
  return this.delete(`/internal/seo/${r.slug}/${e}`);
5932
5969
  }
5933
5970
  }
5934
- class rs extends h {
5971
+ class is extends h {
5935
5972
  /**
5936
5973
  * Возвращает подсказки по адресам.
5937
5974
  *
@@ -5978,8 +6015,8 @@ class rs extends h {
5978
6015
  });
5979
6016
  }
5980
6017
  }
5981
- var mt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(mt || {});
5982
- class ft extends nr {
6018
+ var wt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(wt || {});
6019
+ class Ct extends nr {
5983
6020
  /**
5984
6021
  * Инициализирует экземпляр класса {@link User}.
5985
6022
  *
@@ -6002,12 +6039,12 @@ class ft extends nr {
6002
6039
  this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
6003
6040
  }
6004
6041
  }
6005
- class ts extends h {
6042
+ class ns extends h {
6006
6043
  /**
6007
6044
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6008
6045
  */
6009
6046
  constructor() {
6010
- super(), this.baseUrl = `${A.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6047
+ super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6011
6048
  }
6012
6049
  /**
6013
6050
  * Функция для получения обновленных токенов доступа.
@@ -6018,16 +6055,16 @@ class ts extends h {
6018
6055
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6019
6056
  }
6020
6057
  }
6021
- class yt extends h {
6058
+ class vt extends h {
6022
6059
  /**
6023
6060
  * Возвращает данные о текущем пользователе.
6024
6061
  */
6025
6062
  // eslint-disable-next-line class-methods-use-this
6026
6063
  getCurrentUser() {
6027
- return this.get("/internal/users/info", {}, (r) => new ft(r.data));
6064
+ return this.get("/internal/users/info", {}, (r) => new Ct(r.data));
6028
6065
  }
6029
6066
  }
6030
- const Ct = X("__user_state_private", () => {
6067
+ const Pt = Z("__user_state_private", () => {
6031
6068
  const n = f({}), r = f(void 0);
6032
6069
  return {
6033
6070
  /**
@@ -6039,20 +6076,20 @@ const Ct = X("__user_state_private", () => {
6039
6076
  */
6040
6077
  currentUser: r
6041
6078
  };
6042
- }), ss = X("user_state", () => ({
6079
+ }), os = Z("user_state", () => ({
6043
6080
  /**
6044
6081
  * Данные о текущем пользователе.
6045
6082
  */
6046
- currentUser: v(() => {
6047
- const r = Ct();
6048
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(yt).getCurrentUser().then((e) => {
6083
+ currentUser: R(() => {
6084
+ const r = Pt();
6085
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(vt).getCurrentUser().then((e) => {
6049
6086
  r.currentUser = e;
6050
- }).catch(C).finally(() => {
6087
+ }).catch(w).finally(() => {
6051
6088
  r.dataLoaderList.currentUser = !1;
6052
6089
  })), r.currentUser;
6053
6090
  })
6054
6091
  }));
6055
- class is {
6092
+ class cs {
6056
6093
  /**
6057
6094
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
6058
6095
  *
@@ -6076,147 +6113,147 @@ class is {
6076
6113
  }
6077
6114
  }
6078
6115
  export {
6079
- Qr as AnyReference,
6080
- It as AppBaseConfig,
6081
- A as AppConfigProvider,
6116
+ Zr as AnyReference,
6117
+ kt as AppBaseConfig,
6118
+ D as AppConfigProvider,
6082
6119
  Le as BankAccount,
6083
- Re as BasePaginationProvider,
6084
- Fr as CalculationTypeEnum,
6085
- ue as Cart,
6086
- Gr as CartItem,
6087
- Ur as CartItemBase,
6088
- bt as CartProvider,
6089
- Lt as CatalogProvider,
6120
+ De as BasePaginationProvider,
6121
+ Hr as CalculationTypeEnum,
6122
+ me as Cart,
6123
+ Mr as CartItem,
6124
+ Fr as CartItemBase,
6125
+ It as CartProvider,
6126
+ xt as CatalogProvider,
6090
6127
  er as CatalogableItem,
6091
- z as Category,
6092
- Be as CategoryPricingRule,
6128
+ B as Category,
6129
+ He as CategoryPricingRule,
6093
6130
  cr as ChannelPrimaryInterest,
6094
- Mt as City,
6095
- Fe as CityWithRegionAndCountry,
6131
+ Bt as City,
6132
+ je as CityWithRegionAndCountry,
6096
6133
  We as Client,
6097
- nt as ClientAdditionalData,
6098
- ge as ClientCategory,
6099
- jt as ClientDataProvider,
6100
- dt as ClientPriceProvider,
6101
- kt as ClientPriceTemplateProvider,
6102
- K as ClientProduct,
6103
- Ot as ClientProductCategoryDataProvider,
6104
- qt as ClientProductDataProvider,
6105
- pe as ClientShortInfo,
6106
- Kr as ClientsAdditionalDataRequestTypeEnum,
6107
- Ht as ClientsListFilters,
6108
- te as CodedIdentity,
6109
- Vt as ConfiguratorProvider,
6110
- de as Contact,
6111
- zr as ContactLinks,
6112
- M as ContactPerson,
6113
- it as ContactPersonRelated,
6114
- Yr as ContactPosition,
6115
- Te as ContactRelation,
6134
+ lt as ClientAdditionalData,
6135
+ fe as ClientCategory,
6136
+ Et as ClientDataProvider,
6137
+ Nt as ClientPriceProvider,
6138
+ Ot as ClientPriceTemplateProvider,
6139
+ Q as ClientProduct,
6140
+ Gt as ClientProductCategoryDataProvider,
6141
+ jt as ClientProductDataProvider,
6142
+ ge as ClientShortInfo,
6143
+ Xr as ClientsAdditionalDataRequestTypeEnum,
6144
+ zt as ClientsListFilters,
6145
+ ne as CodedIdentity,
6146
+ Kt as ConfiguratorProvider,
6147
+ ke as Contact,
6148
+ Vr as ContactLinks,
6149
+ F as ContactPerson,
6150
+ ct as ContactPersonRelated,
6151
+ et as ContactPosition,
6152
+ be as ContactRelation,
6116
6153
  ur as ContragentBase,
6117
- fe as ContragentFactory,
6154
+ we as ContragentFactory,
6118
6155
  hr as ContragentIc,
6119
- tt as ContragentPerson,
6120
- st as ContragentUlNr,
6156
+ nt as ContragentPerson,
6157
+ ot as ContragentUlNr,
6121
6158
  gr as ContragentUlR,
6122
6159
  Ge as CostSourceEnum,
6123
- Q as Country,
6124
- me as Currency,
6125
- rs as DataSuggestionProvider,
6126
- Bt as DataTablePagination,
6127
- ot as DataTablePaginationRequestParams,
6128
- zt as DataTableSortRequestParams,
6129
- Et as DateTimeProvider,
6130
- Hr as DeletableNamedIdentity,
6131
- ye as DeliveryAddress,
6132
- J as DeliveryType,
6133
- Tt as DetailedJwtPayload,
6134
- Wr as DeviceTypeResolutionConfig,
6135
- Br as DiscountShortInfo,
6136
- is as FieldValidationResultData,
6137
- ne as FilterGroup,
6138
- ze as FilterItem,
6139
- Me as FilterOpEnum,
6160
+ Y as Country,
6161
+ ye as Currency,
6162
+ is as DataSuggestionProvider,
6163
+ Wt as DataTablePagination,
6164
+ pt as DataTablePaginationRequestParams,
6165
+ Vt as DataTableSortRequestParams,
6166
+ Qt as DateTimeProvider,
6167
+ zr as DeletableNamedIdentity,
6168
+ Ce as DeliveryAddress,
6169
+ K as DeliveryType,
6170
+ St as DetailedJwtPayload,
6171
+ Jr as DeviceTypeResolutionConfig,
6172
+ Wr as DiscountShortInfo,
6173
+ cs as FieldValidationResultData,
6174
+ le as FilterGroup,
6175
+ Be as FilterItem,
6176
+ Fe as FilterOpEnum,
6140
6177
  tr as GeoCoordinates,
6141
- Or as HiddenCatalogableItem,
6142
- oe as HttpCachedRequester,
6143
- Vr as HttpParamsConfig,
6178
+ Gr as HiddenCatalogableItem,
6179
+ pe as HttpCachedRequester,
6180
+ Kr as HttpParamsConfig,
6144
6181
  h as HttpRequester,
6145
- H as Identity,
6146
- qr as Image,
6147
- he as JwtPayload,
6148
- Pe as Manager,
6149
- se as ManagerCommon,
6150
- Jt as ManagerDataFactory,
6151
- ct as ManagerDataProvider,
6152
- gt as MetaTagItem,
6153
- $ as NamedIdentity,
6154
- F as Opf,
6155
- b as OpfEnum,
6156
- pt as Order,
6182
+ M as Identity,
6183
+ jr as Image,
6184
+ ie as JwtPayload,
6185
+ Ae as Manager,
6186
+ oe as ManagerCommon,
6187
+ Yt as ManagerDataFactory,
6188
+ ut as ManagerDataProvider,
6189
+ yt as MetaTagItem,
6190
+ T as NamedIdentity,
6191
+ j as Opf,
6192
+ d as OpfEnum,
6193
+ gt as Order,
6157
6194
  fr as OrderInfo,
6158
- Xr as OrderPaymentStatus,
6159
- lt as OrderProduct,
6195
+ rt as OrderPaymentStatus,
6196
+ ht as OrderProduct,
6160
6197
  mr as OrderShortInfo,
6161
- Zr as OrderStatus,
6162
- Kt as OrdersDataProvider,
6163
- Y as PartnerGroup,
6164
- et as PaymentType,
6165
- _t as PreferencesStorageProvider,
6166
- be as PriceAnalyze,
6167
- Qt as PriceAnalyzeProvider,
6168
- we as PriceCoefficient,
6198
+ tt as OrderStatus,
6199
+ Xt as OrdersDataProvider,
6200
+ X as PartnerGroup,
6201
+ st as PaymentType,
6202
+ dt as PreferencesStorageProvider,
6203
+ _e as PriceAnalyze,
6204
+ Zt as PriceAnalyzeProvider,
6205
+ Pe as PriceCoefficient,
6169
6206
  rr as PriceCoefficientEnum,
6170
- Yt as PriceHistoryDataProvider,
6171
- ut as PriceHistoryItem,
6172
- j as PriceTemplate,
6173
- ae as PriceTemplateCategory,
6174
- Z as PriceTemplateClient,
6207
+ es as PriceHistoryDataProvider,
6208
+ mt as PriceHistoryItem,
6209
+ z as PriceTemplate,
6210
+ $e as PriceTemplateCategory,
6211
+ re as PriceTemplateClient,
6175
6212
  ir as PriceTemplateICatalogableItem,
6176
- $e as PriceTemplateProduct,
6177
- Ut as PriceTemplateProvider,
6178
- re as PricingRole,
6179
- Gt as PricingRoleProvider,
6180
- Ie as PrimaryCatalogableItem,
6181
- S as Product,
6182
- xt as ProductCategoryDataProvider,
6183
- Nt as ProductDataProvider,
6184
- rt as ProductFileType,
6213
+ Te as PriceTemplateProduct,
6214
+ Ft as PriceTemplateProvider,
6215
+ se as PricingRole,
6216
+ Mt as PricingRoleProvider,
6217
+ de as PrimaryCatalogableItem,
6218
+ k as Product,
6219
+ qt as ProductCategoryDataProvider,
6220
+ Ut as ProductDataProvider,
6221
+ it as ProductFileType,
6185
6222
  qe as ProductPriceCoefficient,
6186
- ht as ProductPriceHistory,
6187
- Ft as PropertiesProvider,
6188
- ee as Property,
6223
+ ft as ProductPriceHistory,
6224
+ Ht as PropertiesProvider,
6225
+ te as Property,
6189
6226
  or as PropertyType,
6190
- Mr as PropertyTypeEnum,
6191
- B as PropertyValue,
6192
- Xt as RecommendationsDataProvider,
6227
+ Br as PropertyTypeEnum,
6228
+ H as PropertyValue,
6229
+ rs as RecommendationsDataProvider,
6193
6230
  Je as RecommendationsList,
6194
- w as Reference,
6195
- D as ReferenceDataProvider,
6196
- ie as Region,
6231
+ P as Reference,
6232
+ a as ReferenceDataProvider,
6233
+ ce as Region,
6197
6234
  lr as ResourceType,
6198
- I as SalesDirection,
6199
- Er as SentryConfig,
6235
+ x as SalesDirection,
6236
+ Qr as SentryConfig,
6200
6237
  Ke as Seo,
6201
- es as SeoDataProvider,
6238
+ ss as SeoDataProvider,
6202
6239
  pr as SourcePrimaryInterest,
6203
- Nr as StockCount,
6204
- St as TemplatesListFilters,
6240
+ Ur as StockCount,
6241
+ Lt as TemplatesListFilters,
6205
6242
  Ue as TypedInstanceFactory,
6206
6243
  Ve as UnitsHelper,
6207
- Wt as UnknownClientDataProvider,
6244
+ Jt as UnknownClientDataProvider,
6208
6245
  sr as UpdatableNamedIdentity,
6209
- ft as User,
6210
- ts as UserAuthDataProvider,
6246
+ Ct as User,
6247
+ ns as UserAuthDataProvider,
6211
6248
  nr as UserCommonInfo,
6212
- yt as UserDataProvider,
6249
+ vt as UserDataProvider,
6213
6250
  G as UserShortInfo,
6214
- mt as UserTypeEnum,
6215
- Jr as VersionConfig,
6216
- ve as Warehouse,
6217
- je as findCatalogItemByIdRecursive,
6218
- De as useAuthStateStore,
6219
- Zt as useReferencesStore,
6220
- ss as useUserStateStore
6251
+ wt as UserTypeEnum,
6252
+ Yr as VersionConfig,
6253
+ Re as Warehouse,
6254
+ ze as findCatalogItemByIdRecursive,
6255
+ ae as useAuthStateStore,
6256
+ ts as useReferencesStore,
6257
+ os as useUserStateStore
6221
6258
  };
6222
6259
  //# sourceMappingURL=sc-common-lib.js.map