@snabcentr/common-lib 2.12.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,13 +2,13 @@ var Nr = Object.defineProperty;
2
2
  var Ur = (n, r, e) => r in n ? Nr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var s = (n, r, e) => Ur(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as ur } from "jwt-decode";
5
- import { merge as he, isNil as $, isEmpty as re, noop as v, mapValues as pr, isArray as H, every as Fr, split as Hr, isString as a, constant as Mr, toUpper as jr, cloneDeep as Gr, toLower as Br, isFunction as Me, map as ye, forEach as zr, isDate as qe, isObject as je, omitBy as hr } from "lodash-es";
6
- import { objectToCamel as Ge, objectToSnake as Ye } from "ts-case-convert";
5
+ import { merge as he, isNil as $, isEmpty as re, noop as v, mapValues as pr, isArray as H, every as Fr, split as Hr, isString as a, constant as Br, toUpper as Mr, cloneDeep as jr, toLower as Gr, isFunction as Be, map as ye, forEach as zr, isDate as qe, isObject as Me, omitBy as hr } from "lodash-es";
6
+ import { objectToCamel as je, objectToSnake as Ye } from "ts-case-convert";
7
7
  import { defineStore as W } from "pinia";
8
- import { ref as y, markRaw as Wr, computed as P } from "vue";
8
+ import { ref as y, markRaw as Wr, computed as R } from "vue";
9
9
  import { isAfter as Xe, parseISO as C, startOfToday as Ne, format as L, addBusinessDays as Jr, endOfTomorrow as Vr, startOfTomorrow as Er, endOfYesterday as Kr, startOfYesterday as Qr, endOfToday as Yr, endOfDay as Xr, startOfDay as Zr, addSeconds as et } from "date-fns";
10
10
  import rt, { CanceledError as tt } from "axios";
11
- class M {
11
+ class B {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -107,11 +107,11 @@ class M {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- const e = ur(r), t = new M(Ge(e));
110
+ const e = ur(r), t = new B(je(e));
111
111
  return t.resourceAccess = e.resource_access, t;
112
112
  }
113
113
  }
114
- class Et extends M {
114
+ class Et extends B {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -151,7 +151,7 @@ class Et extends M {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- return new M(Ge(ur(e)));
154
+ return new B(je(ur(e)));
155
155
  }
156
156
  }
157
157
  class st {
@@ -359,7 +359,7 @@ const k = W("common.config", () => {
359
359
  }
360
360
  };
361
361
  });
362
- class Re {
362
+ class Pe {
363
363
  /**
364
364
  * Возвращает актуальные и не просроченные данные из хранилища.
365
365
  *
@@ -470,7 +470,7 @@ class Re {
470
470
  }
471
471
  function Ze(n) {
472
472
  try {
473
- const r = M.getJwtPayload(n);
473
+ const r = B.getJwtPayload(n);
474
474
  return new Date(r.exp * 1e3);
475
475
  } catch {
476
476
  return;
@@ -480,7 +480,7 @@ const Q = W("common.auth_state_private", () => {
480
480
  const n = y(
481
481
  (() => {
482
482
  var u;
483
- const o = Re.getActualDataFromStorage(
483
+ const o = Pe.getActualDataFromStorage(
484
484
  "sc.token"
485
485
  /* JwtToken */
486
486
  );
@@ -492,7 +492,7 @@ const Q = W("common.auth_state_private", () => {
492
492
  ), r = y(void 0), e = y(void 0), t = Wr(/* @__PURE__ */ new Map());
493
493
  function i() {
494
494
  e.value = void 0, $(n.value) || n.value.then((o) => {
495
- const c = M.getJwtPayload(o);
495
+ const c = B.getJwtPayload(o);
496
496
  e.value = c.exp * 1e3 > Date.now() ? pr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
497
497
  }).catch(v);
498
498
  }
@@ -519,12 +519,12 @@ const Q = W("common.auth_state_private", () => {
519
519
  recalculateUserPermissions: i
520
520
  };
521
521
  }), ke = W("common.auth_state", () => {
522
- const n = P(() => {
522
+ const n = R(() => {
523
523
  const o = Q();
524
524
  if ($(o.jwtToken) && !$(o.jwtTokenUpdater)) {
525
525
  const c = o.jwtTokenUpdater();
526
526
  o.jwtToken = c, c.then((u) => {
527
- o.jwtToken = Promise.resolve(u), Re.saveActualDataToStorage("sc.token", u, Ze(u)), o.recalculateUserPermissions();
527
+ o.jwtToken = Promise.resolve(u), Pe.saveActualDataToStorage("sc.token", u, Ze(u)), o.recalculateUserPermissions();
528
528
  }).catch(v);
529
529
  }
530
530
  return o.jwtToken;
@@ -534,22 +534,22 @@ const Q = W("common.auth_state_private", () => {
534
534
  }
535
535
  function e(o) {
536
536
  const c = Q();
537
- c.jwtToken = Promise.resolve(o), Re.saveActualDataToStorage("sc.token", o, Ze(o)), c.recalculateUserPermissions();
537
+ c.jwtToken = Promise.resolve(o), Pe.saveActualDataToStorage("sc.token", o, Ze(o)), c.recalculateUserPermissions();
538
538
  }
539
539
  function t() {
540
540
  const o = Q();
541
- o.jwtToken = void 0, o.userPermissions = void 0, Re.saveActualDataToStorage("sc.token", void 0);
541
+ o.jwtToken = void 0, o.userPermissions = void 0, Pe.saveActualDataToStorage("sc.token", void 0);
542
542
  }
543
543
  function i(o) {
544
544
  const c = Q();
545
545
  !$(c.jwtToken) && $(c.userPermissions) && c.jwtToken.then((m) => {
546
- const f = M.getJwtPayload(m);
546
+ const f = B.getJwtPayload(m);
547
547
  c.userPermissions = f.exp * 1e3 > Date.now() ? pr(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
548
548
  }).catch(v);
549
549
  const u = H(o) ? o.join(" && ") : o;
550
550
  if (c.userPermissionsComputedRefs.has(u))
551
551
  return c.userPermissionsComputedRefs.get(u);
552
- const p = P(() => {
552
+ const p = R(() => {
553
553
  const m = (f) => {
554
554
  var K;
555
555
  const D = Hr(f, ".");
@@ -616,7 +616,7 @@ class J {
616
616
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
617
617
  }
618
618
  }
619
- class b extends J {
619
+ class S extends J {
620
620
  /**
621
621
  * Инициализирует экземпляр класса {@link NamedIdentity}.
622
622
  *
@@ -631,7 +631,7 @@ class b extends J {
631
631
  this.name = (e == null ? void 0 : e.name) ?? "";
632
632
  }
633
633
  }
634
- class I extends b {
634
+ class I extends S {
635
635
  /**
636
636
  * Инициализирует экземпляр класса {@link UserShortInfo}.
637
637
  *
@@ -646,7 +646,7 @@ class I extends b {
646
646
  this.type = e == null ? void 0 : e.type;
647
647
  }
648
648
  }
649
- class lt extends b {
649
+ class lt extends S {
650
650
  /**
651
651
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
652
652
  *
@@ -685,7 +685,7 @@ class lt extends b {
685
685
  this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(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 I(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
686
686
  }
687
687
  }
688
- class gr extends b {
688
+ class gr extends S {
689
689
  /**
690
690
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
691
691
  *
@@ -720,7 +720,7 @@ class Z extends gr {
720
720
  }
721
721
  }
722
722
  var mr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(mr || {});
723
- class w extends b {
723
+ class w extends S {
724
724
  /**
725
725
  * Инициализирует экземпляр класса {@link Reference}.
726
726
  *
@@ -744,10 +744,10 @@ class de extends w {
744
744
  * Возвращает значение справочника коэффициента розничной цены.
745
745
  */
746
746
  static getRetailPriceCoefficient() {
747
- return { id: -2, slug: mr.Retail, name: "Розн. цена", guid: "", isNewRec: Mr(!0) };
747
+ return { id: -2, slug: mr.Retail, name: "Розн. цена", guid: "", isNewRec: Br(!0) };
748
748
  }
749
749
  }
750
- class Be {
750
+ class Ge {
751
751
  /**
752
752
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
753
753
  *
@@ -847,7 +847,7 @@ class ut {
847
847
  this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
848
848
  }
849
849
  }
850
- class x extends b {
850
+ class x extends S {
851
851
  /**
852
852
  * Инициализирует экземпляр класса {@link Currency}.
853
853
  *
@@ -874,7 +874,7 @@ class x extends b {
874
874
  e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
875
875
  }
876
876
  }
877
- class er extends b {
877
+ class er extends S {
878
878
  /**
879
879
  * Инициализирует экземпляр класса {@link ProductUnit}.
880
880
  *
@@ -901,7 +901,7 @@ class er extends b {
901
901
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
902
902
  }
903
903
  }
904
- class ge extends b {
904
+ class ge extends S {
905
905
  /**
906
906
  * Инициализирует экземпляр класса {@link NamedIdentity}.
907
907
  *
@@ -1067,7 +1067,7 @@ class _ extends pt {
1067
1067
  s(this, "priceCoefficients");
1068
1068
  this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new er(e.unit) : new er(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new x(e.currency) : new x(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = a(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((p) => new ut(p))) ?? [], this.type = "product";
1069
1069
  const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
1070
- t && (this.category = new Ue({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Ue(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ht(p, k().config.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 = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Be(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1070
+ t && (this.category = new Ue({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Ue(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ht(p, k().config.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 = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Ge(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1071
1071
  }
1072
1072
  /**
1073
1073
  * Возвращает признак, что это измеряемый товар.
@@ -1089,7 +1089,7 @@ class _ extends pt {
1089
1089
  }
1090
1090
  }
1091
1091
  var ze = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(ze || {});
1092
- class j extends _ {
1092
+ class M extends _ {
1093
1093
  /**
1094
1094
  * Инициализирует экземпляр класса {@link ClientProduct}.
1095
1095
  *
@@ -1152,7 +1152,7 @@ class ve extends Ue {
1152
1152
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
1153
1153
  */
1154
1154
  s(this, "currencyRates");
1155
- 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(([t, i]) => [jr(t), i])) : void 0;
1155
+ 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(([t, i]) => [Mr(t), i])) : void 0;
1156
1156
  }
1157
1157
  }
1158
1158
  class wr extends J {
@@ -1231,7 +1231,7 @@ class wr extends J {
1231
1231
  * @inheritDoc
1232
1232
  */
1233
1233
  s(this, "replacementId");
1234
- this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ve(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Gr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new I(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
1234
+ this.product = new M(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ve(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && jr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new I(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
1235
1235
  }
1236
1236
  }
1237
1237
  let vr = class extends wr {
@@ -1322,7 +1322,7 @@ class We {
1322
1322
  return new r(e);
1323
1323
  }
1324
1324
  }
1325
- const R = class R {
1325
+ const P = class P {
1326
1326
  /**
1327
1327
  * Инициализирует экземпляр класса {@link HttpRequester}.
1328
1328
  */
@@ -1369,14 +1369,14 @@ const R = class R {
1369
1369
  * @param request Данные запроса.
1370
1370
  */
1371
1371
  // eslint-disable-next-line class-methods-use-this
1372
- s(this, "userRequestHooksInterceptor", async (r) => R.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1372
+ s(this, "userRequestHooksInterceptor", async (r) => P.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1373
1373
  /**
1374
1374
  * Перехватчик запроса для преобразования данных запроса.
1375
1375
  *
1376
1376
  * @param request Данные запроса.
1377
1377
  */
1378
1378
  // eslint-disable-next-line class-methods-use-this
1379
- s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ye(r.params)), ["put", "patch", "post"].includes(Br(r.method)) && r.data && (r.data = Ye(r.data))), r));
1379
+ s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ye(r.params)), ["put", "patch", "post"].includes(Gr(r.method)) && r.data && (r.data = Ye(r.data))), r));
1380
1380
  /**
1381
1381
  * Перехватчик ошибок ответов на запрос.
1382
1382
  *
@@ -1405,15 +1405,15 @@ const R = class R {
1405
1405
  * @param response Данные ответа на запрос.
1406
1406
  */
1407
1407
  // eslint-disable-next-line class-methods-use-this
1408
- s(this, "userResponseHooksInterceptor", async (r) => R.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1408
+ s(this, "userResponseHooksInterceptor", async (r) => P.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1409
1409
  /**
1410
1410
  * Перехватчик ответа для преобразования данных ответа на запрос.
1411
1411
  *
1412
1412
  * @param response Данные ответа на запрос.
1413
1413
  */
1414
1414
  // eslint-disable-next-line class-methods-use-this
1415
- s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ge(r.data)), r));
1416
- this.errorResponseHandler = R.defaultErrorsResponseHandler, this.httpClient = rt.create({
1415
+ s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = je(r.data)), r));
1416
+ this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = rt.create({
1417
1417
  headers: {
1418
1418
  Accept: "application/json",
1419
1419
  "Content-Type": "application/json"
@@ -1423,7 +1423,7 @@ const R = class R {
1423
1423
  (r) => Promise.reject(r)
1424
1424
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
1425
1425
  (r) => r,
1426
- (r) => R.convertHttpErrorResponse(r)
1426
+ (r) => P.convertHttpErrorResponse(r)
1427
1427
  ), this.interceptorIds.response.canceledResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.canceledResponseInterceptor), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
1428
1428
  this.dataConverterResponseInterceptor,
1429
1429
  (r) => Promise.reject(r)
@@ -1435,7 +1435,7 @@ const R = class R {
1435
1435
  * @param handler Ссылка на функцию-обработчик ошибок.
1436
1436
  */
1437
1437
  static setDefaultErrorsResponseHandler(r) {
1438
- R.defaultErrorsResponseHandler = r;
1438
+ P.defaultErrorsResponseHandler = r;
1439
1439
  }
1440
1440
  /**
1441
1441
  * Регистрирует хук, который будет вызываться перед выполнением каждого HTTP запроса.
@@ -1443,7 +1443,7 @@ const R = class R {
1443
1443
  * @param hook Функция-хук для обработки запроса.
1444
1444
  */
1445
1445
  static addRequestHook(r) {
1446
- R.requestHooks.includes(r) || R.requestHooks.push(r);
1446
+ P.requestHooks.includes(r) || P.requestHooks.push(r);
1447
1447
  }
1448
1448
  /**
1449
1449
  * Удаляет зарегистрированный хук запроса.
@@ -1451,8 +1451,8 @@ const R = class R {
1451
1451
  * @param hook Функция-хук для удаления.
1452
1452
  */
1453
1453
  static removeRequestHook(r) {
1454
- const e = R.requestHooks.indexOf(r);
1455
- e !== -1 && R.requestHooks.splice(e, 1);
1454
+ const e = P.requestHooks.indexOf(r);
1455
+ e !== -1 && P.requestHooks.splice(e, 1);
1456
1456
  }
1457
1457
  /**
1458
1458
  * Регистрирует хук, который будет вызываться после получения ответа на каждый HTTP запрос.
@@ -1460,7 +1460,7 @@ const R = class R {
1460
1460
  * @param hook Функция-хук для обработки ответа.
1461
1461
  */
1462
1462
  static addResponseHook(r) {
1463
- R.responseHooks.includes(r) || R.responseHooks.push(r);
1463
+ P.responseHooks.includes(r) || P.responseHooks.push(r);
1464
1464
  }
1465
1465
  /**
1466
1466
  * Удаляет зарегистрированный хук ответа.
@@ -1468,8 +1468,8 @@ const R = class R {
1468
1468
  * @param hook Функция-хук для удаления.
1469
1469
  */
1470
1470
  static removeResponseHook(r) {
1471
- const e = R.responseHooks.indexOf(r);
1472
- e !== -1 && R.responseHooks.splice(e, 1);
1471
+ const e = P.responseHooks.indexOf(r);
1472
+ e !== -1 && P.responseHooks.splice(e, 1);
1473
1473
  }
1474
1474
  /**
1475
1475
  * Возвращает экземпляр объекта текущего класса.
@@ -1477,7 +1477,7 @@ const R = class R {
1477
1477
  * @param type Тип данных, которыми оперирует метод.
1478
1478
  */
1479
1479
  static getInstance(r) {
1480
- return Object.prototype.hasOwnProperty.call(R.instances, r.name) || (R.instances[r.name] = We.simpleInstanceInitializer(r)), R.instances[r.name];
1480
+ return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] = We.simpleInstanceInitializer(r)), P.instances[r.name];
1481
1481
  }
1482
1482
  /**
1483
1483
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1576,21 +1576,21 @@ const R = class R {
1576
1576
  * Экземпляр объекта текущего класса.
1577
1577
  */
1578
1578
  // eslint-disable-next-line no-use-before-define
1579
- s(R, "instances", {}), /**
1579
+ s(P, "instances", {}), /**
1580
1580
  * Базовый обработчик ошибок выполнения запросов.
1581
1581
  *
1582
1582
  * @param error Данные об ошибке.
1583
1583
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1584
1584
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1585
1585
  */
1586
- s(R, "defaultErrorsResponseHandler", v), /**
1586
+ s(P, "defaultErrorsResponseHandler", v), /**
1587
1587
  * Список зарегистрированных хуков для запросов.
1588
1588
  */
1589
- s(R, "requestHooks", []), /**
1589
+ s(P, "requestHooks", []), /**
1590
1590
  * Список зарегистрированных хуков для ответов.
1591
1591
  */
1592
- s(R, "responseHooks", []);
1593
- let h = R;
1592
+ s(P, "responseHooks", []);
1593
+ let h = P;
1594
1594
  class Qt extends h {
1595
1595
  /**
1596
1596
  * Возвращает содержимое корзины указанного клиента.
@@ -1746,7 +1746,7 @@ class ar {
1746
1746
  }
1747
1747
  class q extends w {
1748
1748
  }
1749
- class Je extends b {
1749
+ class Je extends S {
1750
1750
  /**
1751
1751
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1752
1752
  *
@@ -1779,7 +1779,7 @@ class Je extends b {
1779
1779
  }
1780
1780
  class Ve extends w {
1781
1781
  }
1782
- class Cr extends b {
1782
+ class Cr extends S {
1783
1783
  /**
1784
1784
  * Инициализирует экземпляр класса {@link IUserPricingRole}.
1785
1785
  *
@@ -1873,7 +1873,7 @@ class ft extends ve {
1873
1873
  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;
1874
1874
  }
1875
1875
  }
1876
- class Pe extends ft {
1876
+ class Re extends ft {
1877
1877
  /**
1878
1878
  * Инициализирует экземпляр класса {@link ClientCategory}.
1879
1879
  *
@@ -1890,10 +1890,10 @@ class Pe extends ft {
1890
1890
  * Список продуктов категории.
1891
1891
  */
1892
1892
  s(this, "products");
1893
- this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Pe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new j(o));
1893
+ this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Re(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new M(o));
1894
1894
  }
1895
1895
  }
1896
- class Rr {
1896
+ class Pr {
1897
1897
  /**
1898
1898
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
1899
1899
  *
@@ -1911,7 +1911,7 @@ class Rr {
1911
1911
  this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new de(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1912
1912
  }
1913
1913
  }
1914
- class Le extends Rr {
1914
+ class Le extends Pr {
1915
1915
  /**
1916
1916
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1917
1917
  *
@@ -1926,7 +1926,7 @@ class Le extends Rr {
1926
1926
  this.productCategory = new ve(e == null ? void 0 : e.productCategory);
1927
1927
  }
1928
1928
  }
1929
- class Ee extends b {
1929
+ class Ee extends S {
1930
1930
  /**
1931
1931
  * Инициализирует экземпляр класса {@link Curator}.
1932
1932
  *
@@ -1981,7 +1981,7 @@ class Ae extends w {
1981
1981
  e && (this.region = new me(e.region));
1982
1982
  }
1983
1983
  }
1984
- class Pr extends b {
1984
+ class Rr extends S {
1985
1985
  /**
1986
1986
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1987
1987
  *
@@ -2020,7 +2020,7 @@ class Pr extends b {
2020
2020
  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 q(e.salesDirection) : void 0, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2021
2021
  }
2022
2022
  }
2023
- class V extends Pr {
2023
+ class V extends Rr {
2024
2024
  /**
2025
2025
  * Инициализирует экземпляр класса {@link Client}.
2026
2026
  *
@@ -2096,7 +2096,7 @@ class ce extends J {
2096
2096
  this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new V(e == null ? void 0 : e.client), this.priceTemplate = new Z(e == null ? void 0 : e.priceTemplate);
2097
2097
  }
2098
2098
  }
2099
- class _e extends Rr {
2099
+ class _e extends Pr {
2100
2100
  /**
2101
2101
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
2102
2102
  *
@@ -2113,7 +2113,7 @@ class _e extends Rr {
2113
2113
  }
2114
2114
  class Dr extends w {
2115
2115
  }
2116
- class le extends b {
2116
+ class le extends S {
2117
2117
  /**
2118
2118
  * Инициализирует экземпляр класса {@link Property}.
2119
2119
  *
@@ -2233,11 +2233,11 @@ class Yt {
2233
2233
  return Object.keys(this).forEach((c) => {
2234
2234
  const u = this[c];
2235
2235
  // eslint-disable-next-line prettier/prettier
2236
- $(u) || a(u) && u.trim().length === 0 || Me(u.isNewRec) && u.isNewRec() || (r[c] = u);
2236
+ $(u) || a(u) && u.trim().length === 0 || Be(u.isNewRec) && u.isNewRec() || (r[c] = u);
2237
2237
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
2238
2238
  }
2239
2239
  }
2240
- class ue extends b {
2240
+ class ue extends S {
2241
2241
  /**
2242
2242
  * Инициализирует экземпляр класса {@link PricingRole}.
2243
2243
  *
@@ -2449,7 +2449,7 @@ class Zt extends h {
2449
2449
  price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
2450
2450
  increase_percent: t.value
2451
2451
  },
2452
- (o) => new j(o.data)
2452
+ (o) => new M(o.data)
2453
2453
  );
2454
2454
  }
2455
2455
  /**
@@ -2461,7 +2461,7 @@ class Zt extends h {
2461
2461
  * @see /doc/api/internal#/operations/api_internal_client_price_products_remove
2462
2462
  */
2463
2463
  removeProductPrice(r, e) {
2464
- return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new j(t.data));
2464
+ return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new M(t.data));
2465
2465
  }
2466
2466
  /**
2467
2467
  * Добавляет указанный продукт в список товаров для дополнительных продаж.
@@ -2689,7 +2689,7 @@ class rs extends h {
2689
2689
  getCategoryProductsCoefficients(r) {
2690
2690
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2691
2691
  const { data: t } = e;
2692
- return zr(t, (i) => i.map((o) => new Be(o))), t;
2692
+ return zr(t, (i) => i.map((o) => new Ge(o))), t;
2693
2693
  });
2694
2694
  }
2695
2695
  /**
@@ -2739,7 +2739,7 @@ class ts extends h {
2739
2739
  return this.get(
2740
2740
  `/internal/catalog/products/${r}/coefficients`,
2741
2741
  {},
2742
- (e) => ye(e.data, (t) => new Be(t))
2742
+ (e) => ye(e.data, (t) => new Ge(t))
2743
2743
  );
2744
2744
  }
2745
2745
  /**
@@ -2774,7 +2774,7 @@ class ss extends h {
2774
2774
  clientId: r,
2775
2775
  showHidden: e
2776
2776
  },
2777
- (t) => t.data.map((i) => new Pe(i))
2777
+ (t) => t.data.map((i) => new Re(i))
2778
2778
  );
2779
2779
  }
2780
2780
  /**
@@ -2795,7 +2795,7 @@ class ss extends h {
2795
2795
  showHidden: t,
2796
2796
  withNestedCategories: i
2797
2797
  },
2798
- (o) => new Pe(o.data)
2798
+ (o) => new Re(o.data)
2799
2799
  );
2800
2800
  }
2801
2801
  /**
@@ -2816,7 +2816,7 @@ class ss extends h {
2816
2816
  showHidden: i,
2817
2817
  withPriceCoefficients: t
2818
2818
  },
2819
- (o) => ye(o.data, (c) => new j(c))
2819
+ (o) => ye(o.data, (c) => new M(c))
2820
2820
  );
2821
2821
  }
2822
2822
  }
@@ -2837,7 +2837,7 @@ class is extends h {
2837
2837
  clientId: e,
2838
2838
  withPriceCoefficients: t
2839
2839
  },
2840
- (i) => new j(i.data)
2840
+ (i) => new M(i.data)
2841
2841
  );
2842
2842
  }
2843
2843
  }
@@ -2873,13 +2873,13 @@ class tr {
2873
2873
  field: this.field,
2874
2874
  op: this.op
2875
2875
  };
2876
- return qe(this.value) ? e.value = L(this.value, r) : je(this.value) ? e.value = {
2876
+ return qe(this.value) ? e.value = L(this.value, r) : Me(this.value) ? e.value = {
2877
2877
  from: this.value.from ? L(this.value.from, r) : null,
2878
2878
  to: this.value.to ? L(this.value.to, r) : null
2879
2879
  } : e.value = this.value, e;
2880
2880
  }
2881
2881
  }
2882
- class G {
2882
+ class j {
2883
2883
  /**
2884
2884
  * Инициализирует экземпляр класса {@link FilterGroup}.
2885
2885
  *
@@ -2899,7 +2899,7 @@ class G {
2899
2899
  */
2900
2900
  s(this, "groups");
2901
2901
  var e, t;
2902
- 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 tr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new G(i))) ?? [];
2902
+ 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 tr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new j(i))) ?? [];
2903
2903
  }
2904
2904
  /**
2905
2905
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2909,8 +2909,8 @@ class G {
2909
2909
  toPrimitive() {
2910
2910
  return {
2911
2911
  groupOp: this.groupOp,
2912
- filters: this.filters.map((r) => r instanceof tr && Me(r.toPrimitive) ? r.toPrimitive() : r),
2913
- groups: this.groups.map((r) => r instanceof G ? r.toPrimitive() : r)
2912
+ filters: this.filters.map((r) => r instanceof tr && Be(r.toPrimitive) ? r.toPrimitive() : r),
2913
+ groups: this.groups.map((r) => r instanceof j ? r.toPrimitive() : r)
2914
2914
  };
2915
2915
  }
2916
2916
  }
@@ -2932,7 +2932,7 @@ class Ce extends h {
2932
2932
  page: (i == null ? void 0 : i.page) ?? 1,
2933
2933
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2934
2934
  };
2935
- return e && (m.filters = JSON.stringify((e instanceof G ? e : new G(e)).toPrimitive())), re(t) || (m.sort = H(t) ? t : [t]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
2935
+ return e && (m.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())), re(t) || (m.sort = H(t) ? t : [t]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
2936
2936
  }
2937
2937
  }
2938
2938
  class ns extends Ce {
@@ -3715,7 +3715,7 @@ class Fe extends J {
3715
3715
  e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new x(e.currency));
3716
3716
  }
3717
3717
  }
3718
- class He extends b {
3718
+ class He extends S {
3719
3719
  /**
3720
3720
  * Инициализирует экземпляр класса {@link Contact}.
3721
3721
  *
@@ -3734,7 +3734,7 @@ class He extends b {
3734
3734
  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;
3735
3735
  }
3736
3736
  }
3737
- class B extends He {
3737
+ class G extends He {
3738
3738
  /**
3739
3739
  * Инициализирует экземпляр класса {@link ContactPerson}.
3740
3740
  *
@@ -3848,7 +3848,7 @@ class Ar extends dr {
3848
3848
  if (this.opf = new z(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new I(e.creator) : void 0, this.updater = e.updater ? new I(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new se(e.partnerGroup)), e.contacts) {
3849
3849
  const t = [];
3850
3850
  e.contacts.forEach((i) => {
3851
- t.push(new B(i));
3851
+ t.push(new G(i));
3852
3852
  }), this.contacts = t;
3853
3853
  }
3854
3854
  if (e.bankAccounts) {
@@ -4007,13 +4007,13 @@ class pe extends dr {
4007
4007
  * Признак того, что указанный адрес является адресом транспортной компании.
4008
4008
  */
4009
4009
  s(this, "isTransportCompanyAddress");
4010
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new fr(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new B(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
4010
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new fr(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new G(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;
4011
4011
  }
4012
4012
  }
4013
- class Sr extends w {
4014
- }
4015
4013
  class br extends w {
4016
4014
  }
4015
+ class Sr extends w {
4016
+ }
4017
4017
  class nr extends V {
4018
4018
  /**
4019
4019
  * Инициализирует экземпляр класса {@link Client}.
@@ -4064,7 +4064,7 @@ class nr extends V {
4064
4064
  * @inheritDoc
4065
4065
  */
4066
4066
  s(this, "extraData");
4067
- this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new B(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new pe(u))) ?? [], this.channelPrimaryInterest = new Sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new br(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4067
+ this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new G(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new pe(u))) ?? [], this.channelPrimaryInterest = new br(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Sr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4068
4068
  }
4069
4069
  }
4070
4070
  class Qe {
@@ -4077,7 +4077,7 @@ class Qe {
4077
4077
  return Object.keys(this).forEach((e) => {
4078
4078
  const t = this[e];
4079
4079
  $(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4080
- a(t) && t.trim().length === 0 || Me(t.isNewRec) && t.isNewRec() || (r[e] = t);
4080
+ a(t) && t.trim().length === 0 || Be(t.isNewRec) && t.isNewRec() || (r[e] = t);
4081
4081
  }), r;
4082
4082
  }
4083
4083
  }
@@ -4277,7 +4277,7 @@ class kr extends J {
4277
4277
  this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new I(e == null ? void 0 : e.creator);
4278
4278
  }
4279
4279
  }
4280
- class at extends b {
4280
+ class at extends S {
4281
4281
  /**
4282
4282
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4283
4283
  *
@@ -4314,7 +4314,7 @@ class at extends b {
4314
4314
  * @inheritDoc
4315
4315
  */
4316
4316
  s(this, "curators");
4317
- this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new kr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new F(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Je(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Ee(u))) ?? void 0;
4317
+ this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new kr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new F(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Je(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Ee(u))) ?? void 0;
4318
4318
  }
4319
4319
  }
4320
4320
  class Ie extends J {
@@ -4332,7 +4332,7 @@ class Ie extends J {
4332
4332
  this.isPrimary = e.isPrimary;
4333
4333
  }
4334
4334
  }
4335
- class Ct extends B {
4335
+ class Ct extends G {
4336
4336
  /**
4337
4337
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
4338
4338
  *
@@ -4895,7 +4895,7 @@ class O extends Ce {
4895
4895
  comment: e.comment,
4896
4896
  not_disturb: e.notDisturb
4897
4897
  },
4898
- (i) => new B(i.data),
4898
+ (i) => new G(i.data),
4899
4899
  t
4900
4900
  );
4901
4901
  }
@@ -5032,7 +5032,7 @@ class O extends Ce {
5032
5032
  comment: e.comment,
5033
5033
  ...t
5034
5034
  };
5035
- return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new B(p.data), i);
5035
+ return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new G(p.data), i);
5036
5036
  }
5037
5037
  /**
5038
5038
  * Устанавливает признак основного контактного лица.
@@ -5097,7 +5097,7 @@ class hs {
5097
5097
  this.date = a(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";
5098
5098
  }
5099
5099
  }
5100
- var Rt = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Rt || {});
5100
+ var Pt = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Pt || {});
5101
5101
  class gs extends h {
5102
5102
  /**
5103
5103
  * Возвращает настройки указанного конфигуратора для указанной категории.
@@ -5189,7 +5189,7 @@ class gs extends h {
5189
5189
  });
5190
5190
  }
5191
5191
  }
5192
- class Pt {
5192
+ class Rt {
5193
5193
  /**
5194
5194
  * Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
5195
5195
  *
@@ -5207,7 +5207,7 @@ class Pt {
5207
5207
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
5208
5208
  }
5209
5209
  }
5210
- class ms extends Pt {
5210
+ class ms extends Rt {
5211
5211
  /**
5212
5212
  * Инициализирует экземпляр класса {@link TableDataPagination}.
5213
5213
  *
@@ -5605,10 +5605,10 @@ class dt extends wr {
5605
5605
  * Продукт, которым заменена текущая запись.
5606
5606
  */
5607
5607
  s(this, "replacement");
5608
- this.product = new j(e.product), this.currency = new x(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, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
5608
+ this.product = new M(e.product), this.currency = new x(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, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
5609
5609
  }
5610
5610
  }
5611
- class S extends Ir {
5611
+ class b extends Ir {
5612
5612
  /**
5613
5613
  * Инициализирует экземпляр класса {@link Order}.
5614
5614
  *
@@ -5775,7 +5775,7 @@ class Cs extends Ce {
5775
5775
  deliveryDate: e.deliveryDate ? L(e.deliveryDate, o) : void 0,
5776
5776
  items: t != null && t.length ? t : void 0
5777
5777
  },
5778
- (c) => c.data.map((u) => new S(u)),
5778
+ (c) => c.data.map((u) => new b(u)),
5779
5779
  i
5780
5780
  );
5781
5781
  }
@@ -5848,6 +5848,17 @@ class Cs extends Ce {
5848
5848
  deleteOfferProduct(r, e) {
5849
5849
  return this.delete(`/internal/orders/offers/${r}/products/${e}`, (t) => new X(t.data));
5850
5850
  }
5851
+ /**
5852
+ * Возвращает содержимое печатной формы заказа-черновика в формате HTML.
5853
+ *
5854
+ * @param offerId Идентификатор записи заказа-черновика.
5855
+ * @param recipientText Текст блока «Кому» в документе.
5856
+ *
5857
+ * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_view_html
5858
+ */
5859
+ getOfferHtml(r, e) {
5860
+ return this.get(`/internal/orders/offers/${r}/view`, e ? { recipientText: e } : {}, (t) => new Blob([t.data], { type: "text/html" }));
5861
+ }
5851
5862
  /**
5852
5863
  * Возвращает файл заказа-черновика в формате PDF.
5853
5864
  *
@@ -5876,7 +5887,7 @@ class Cs extends Ce {
5876
5887
  }
5877
5888
  }
5878
5889
  var At = /* @__PURE__ */ ((n) => (n.View = "view", n.Share = "share", n.EditTags = "edit_tags", n.SaveOrderIgnoredProducts = "save_order_ignored_products", n.ChangeStatus = "change_status", n.ChangeProducts = "change_products", n.ChangeOrderParameters = "change_order_parameters", n.Recalculate = "recalculate", n.AttachOrder = "attach_order", n.DetachOrder = "detach_order", n.ChangeAttachedOperator = "change_attached_operator", n.SendOnlinePaymentLink = "send_online_payment_link", n.ConfirmOnlineFullPayment = "confirm_online_full_payment", n.MergeOrders = "merge_orders", n.GetHistory = "get_history", n.CloneOrder = "clone_order", n.DeleteAttachedFile = "delete_attached_file", n))(At || {});
5879
- class Rs {
5890
+ class Ps {
5880
5891
  /**
5881
5892
  * Инициализирует экземпляр класса {@link OrderEditorData}.
5882
5893
  *
@@ -5947,7 +5958,7 @@ class Or extends w {
5947
5958
  }
5948
5959
  class xr extends w {
5949
5960
  }
5950
- class Ps extends Qe {
5961
+ class Rs extends Qe {
5951
5962
  /**
5952
5963
  * Инициализирует экземпляр класса {@link OrdersListFilters}.
5953
5964
  *
@@ -6160,7 +6171,7 @@ class Ds extends Ce {
6160
6171
  getOrdersCount(r, e = void 0) {
6161
6172
  return this.get(
6162
6173
  "/internal/orders/count",
6163
- r ? { filters: JSON.stringify((r instanceof G ? r : new G(r)).toPrimitive()) } : {},
6174
+ r ? { filters: JSON.stringify((r instanceof j ? r : new j(r)).toPrimitive()) } : {},
6164
6175
  void 0,
6165
6176
  void 0,
6166
6177
  e
@@ -6183,7 +6194,7 @@ class Ds extends Ce {
6183
6194
  * @see /doc/api/internal#/Заказы/api_internal_orders_get
6184
6195
  */
6185
6196
  getOrder(r) {
6186
- return this.get(`/internal/orders/${r}`, {}, (e) => new S(e.data));
6197
+ return this.get(`/internal/orders/${r}`, {}, (e) => new b(e.data));
6187
6198
  }
6188
6199
  /**
6189
6200
  * Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
@@ -6209,7 +6220,7 @@ class Ds extends Ce {
6209
6220
  deliveryDate: L(t.deliveryDate, c),
6210
6221
  items: i != null && i.length ? i : void 0
6211
6222
  },
6212
- (u) => u.data.map((p) => new S(p)),
6223
+ (u) => u.data.map((p) => new b(p)),
6213
6224
  o
6214
6225
  );
6215
6226
  }
@@ -6221,7 +6232,7 @@ class Ds extends Ce {
6221
6232
  * @see /doc/api/internal#/Заказы/api_internal_orders_attach
6222
6233
  */
6223
6234
  attachOrder(r) {
6224
- return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new S(e.data));
6235
+ return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new b(e.data));
6225
6236
  }
6226
6237
  /**
6227
6238
  * Открепляет указанный заказ от оператора и возвращает полные данные заказа.
@@ -6231,7 +6242,7 @@ class Ds extends Ce {
6231
6242
  * @see /doc/api/internal#/Заказы/api_internal_orders_detach
6232
6243
  */
6233
6244
  detachOrder(r) {
6234
- return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new S(e.data));
6245
+ return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new b(e.data));
6235
6246
  }
6236
6247
  /**
6237
6248
  * Объединяет указанные заказы в базовый заказ и возвращает обновлённые данные базового заказа.
@@ -6242,7 +6253,7 @@ class Ds extends Ce {
6242
6253
  * @see /doc/api/internal#/Заказы/api_internal_orders_merge
6243
6254
  */
6244
6255
  mergeOrders(r, e) {
6245
- return this.patch(`/internal/orders/${r}/merge`, { ids: e }, (t) => new S(t.data));
6256
+ return this.patch(`/internal/orders/${r}/merge`, { ids: e }, (t) => new b(t.data));
6246
6257
  }
6247
6258
  /**
6248
6259
  * Пересчитывает стоимость корзины указанного заказа и возвращает обновлённые данные заказа.
@@ -6252,7 +6263,7 @@ class Ds extends Ce {
6252
6263
  * @see /doc/api/internal#/Заказы/api_internal_orders_recalculate
6253
6264
  */
6254
6265
  recalculateOrder(r) {
6255
- return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new S(e.data));
6266
+ return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new b(e.data));
6256
6267
  }
6257
6268
  /**
6258
6269
  * Копирует товары указанного заказа в текущую корзину пользователя.
@@ -6283,7 +6294,7 @@ class Ds extends Ce {
6283
6294
  ...e,
6284
6295
  deliveryDate: e.deliveryDate ? L(e.deliveryDate, i) : void 0
6285
6296
  },
6286
- (o) => new S(o.data),
6297
+ (o) => new b(o.data),
6287
6298
  t
6288
6299
  );
6289
6300
  }
@@ -6313,7 +6324,7 @@ class Ds extends Ce {
6313
6324
  is_additional_sale: e.isAdditionalSale,
6314
6325
  ...e.configuratorParams
6315
6326
  },
6316
- (i) => new S(i.data),
6327
+ (i) => new b(i.data),
6317
6328
  t
6318
6329
  );
6319
6330
  }
@@ -6336,7 +6347,7 @@ class Ds extends Ce {
6336
6347
  status: e,
6337
6348
  statusDetail: t
6338
6349
  },
6339
- (o) => new S(o.data),
6350
+ (o) => new b(o.data),
6340
6351
  i
6341
6352
  );
6342
6353
  }
@@ -6350,7 +6361,7 @@ class Ds extends Ce {
6350
6361
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
6351
6362
  */
6352
6363
  changeOrderStatusDetail(r, e) {
6353
- return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (t) => new S(t.data));
6364
+ return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (t) => new b(t.data));
6354
6365
  }
6355
6366
  /**
6356
6367
  * Возвращает историю изменения статусов заказа.
@@ -6366,6 +6377,39 @@ class Ds extends Ce {
6366
6377
  (e) => e.data.map((t) => new $t(t))
6367
6378
  );
6368
6379
  }
6380
+ /**
6381
+ * Возвращает содержимое печатной формы заказа в формате HTML.
6382
+ *
6383
+ * @param orderId Идентификатор заказа.
6384
+ * @param options Параметры состава печатной формы.
6385
+ *
6386
+ * @see /doc/api/internal#/Заказы/api_internal_order_print_view_html
6387
+ */
6388
+ getOrderPrintHtml(r, e) {
6389
+ return this.get(`/internal/orders/${r}/print/view`, { ...e }, (t) => new Blob([t.data], { type: "text/html" }));
6390
+ }
6391
+ /**
6392
+ * Возвращает файл печатной формы заказа в формате PDF.
6393
+ *
6394
+ * @param orderId Идентификатор заказа.
6395
+ * @param options Параметры состава печатной формы.
6396
+ *
6397
+ * @see /doc/api/internal#/Заказы/api_internal_order_print_download
6398
+ */
6399
+ getOrderPrintPdf(r, e) {
6400
+ return this.getBlob(`/internal/orders/${r}/print/download`, { ...e }, (t) => new Blob([t.request.response], { type: "application/pdf" }));
6401
+ }
6402
+ /**
6403
+ * Отправляет печатную форму заказа в формате PDF на указанный адрес электронной почты.
6404
+ *
6405
+ * @param orderId Идентификатор заказа.
6406
+ * @param data Данные для отправки (e-mail, дополнительные файлы, параметры состава печатной формы).
6407
+ *
6408
+ * @see /doc/api/internal#/Заказы/api_internal_order_print_send
6409
+ */
6410
+ sendOrderPrint(r, e) {
6411
+ return this.post(`/internal/orders/${r}/print/send`, e);
6412
+ }
6369
6413
  /**
6370
6414
  * Заменяет закреплённого за заказом оператора и возвращает обновлённые данные заказа.
6371
6415
  *
@@ -6375,7 +6419,7 @@ class Ds extends Ce {
6375
6419
  * @see /doc/api/internal#/Заказы/api_internal_orders_change_attached_operator
6376
6420
  */
6377
6421
  changeAttachedOperator(r, e) {
6378
- return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (t) => new S(t.data));
6422
+ return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (t) => new b(t.data));
6379
6423
  }
6380
6424
  /**
6381
6425
  * Удаляет файл, прикреплённый к заказу клиентом, и возвращает обновлённые данные заказа.
@@ -6385,7 +6429,7 @@ class Ds extends Ce {
6385
6429
  * @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
6386
6430
  */
6387
6431
  deleteOrderAttachedFile(r) {
6388
- return this.delete(`/internal/orders/${r}/file/attached`, (e) => new S(e.data));
6432
+ return this.delete(`/internal/orders/${r}/file/attached`, (e) => new b(e.data));
6389
6433
  }
6390
6434
  /**
6391
6435
  * Удаляет продукт из заказа и возвращает обновлённые данные заказа.
@@ -6396,7 +6440,7 @@ class Ds extends Ce {
6396
6440
  * @see /doc/api/internal#/operations/api_internal_orders_product_delete
6397
6441
  */
6398
6442
  deleteOrderProduct(r, e) {
6399
- return this.delete(`/internal/orders/${r}/products/${e}`, (t) => new S(t.data));
6443
+ return this.delete(`/internal/orders/${r}/products/${e}`, (t) => new b(t.data));
6400
6444
  }
6401
6445
  /**
6402
6446
  * Изменяет продукт заказа и возвращает обновлённые данные заказа.
@@ -6424,7 +6468,7 @@ class Ds extends Ce {
6424
6468
  marker: t.marker,
6425
6469
  ...t.configuratorParams
6426
6470
  },
6427
- (o) => new S(o.data),
6471
+ (o) => new b(o.data),
6428
6472
  i
6429
6473
  );
6430
6474
  }
@@ -6513,7 +6557,7 @@ const xe = (n) => {
6513
6557
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
6514
6558
  hideNotActive: n.hideNotActive
6515
6559
  },
6516
- (c) => $(c) || (H(c) || je(c)) && re(c)
6560
+ (c) => $(c) || (H(c) || Me(c)) && re(c)
6517
6561
  ) : {};
6518
6562
  }, or = (n) => {
6519
6563
  const r = {};
@@ -6630,7 +6674,7 @@ class Tt {
6630
6674
  this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ge(r.product) : void 0, this.client = r.client ? new I(r.client) : void 0, this.executor = r.executor ? new I(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
6631
6675
  }
6632
6676
  }
6633
- class St extends ge {
6677
+ class bt extends ge {
6634
6678
  /**
6635
6679
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6636
6680
  *
@@ -6662,10 +6706,10 @@ class As extends h {
6662
6706
  to: qe((u = r.costDate) == null ? void 0 : u.to) ? L(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
6663
6707
  }
6664
6708
  }),
6665
- (f) => $(f) || (H(f) || je(f)) && re(f)
6709
+ (f) => $(f) || (H(f) || Me(f)) && re(f)
6666
6710
  ), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6667
6711
  return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((f) => [
6668
- new St(he(f[0], { history: f }))
6712
+ new bt(he(f[0], { history: f }))
6669
6713
  ]);
6670
6714
  }
6671
6715
  }
@@ -6733,7 +6777,7 @@ class $s extends h {
6733
6777
  });
6734
6778
  }
6735
6779
  }
6736
- var bt = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(bt || {}), kt = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(kt || {});
6780
+ var St = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(St || {}), kt = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(kt || {});
6737
6781
  class Lt extends w {
6738
6782
  }
6739
6783
  class Ts extends w {
@@ -6746,7 +6790,7 @@ class Ot extends w {
6746
6790
  }
6747
6791
  class xt extends w {
6748
6792
  }
6749
- class Ss {
6793
+ class bs {
6750
6794
  /**
6751
6795
  * Генерирует и возвращает данные-заглушку неопределённой записи справочника.
6752
6796
  *
@@ -6783,7 +6827,7 @@ class T extends fe {
6783
6827
  * первичного интереса.
6784
6828
  */
6785
6829
  getChannelPrimaryInterest() {
6786
- return this.getTypedDataArrayRequester(Sr, "/internal/references/channel-primary-interest", !0);
6830
+ return this.getTypedDataArrayRequester(br, "/internal/references/channel-primary-interest", !0);
6787
6831
  }
6788
6832
  /**
6789
6833
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
@@ -6862,7 +6906,7 @@ class T extends fe {
6862
6906
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
6863
6907
  */
6864
6908
  getSourcePrimaryInterest() {
6865
- return this.getTypedDataArrayRequester(br, "/internal/references/source-primary-interest", !0);
6909
+ return this.getTypedDataArrayRequester(Sr, "/internal/references/source-primary-interest", !0);
6866
6910
  }
6867
6911
  /**
6868
6912
  * Выполняет поиск данных о городах по терму в названии.
@@ -6920,7 +6964,7 @@ class T extends fe {
6920
6964
  }
6921
6965
  }
6922
6966
  const d = W("common.references_private", () => {
6923
- const n = y({}), r = y(void 0), e = y(void 0), t = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0), ie = y(void 0), ne = y(void 0), E = y(void 0), K = y(void 0), Te = y(void 0), Se = y(void 0), be = y(void 0), l = y(void 0);
6967
+ const n = y({}), r = y(void 0), e = y(void 0), t = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0), ie = y(void 0), ne = y(void 0), E = y(void 0), K = y(void 0), Te = y(void 0), be = y(void 0), Se = y(void 0), l = y(void 0);
6924
6968
  return {
6925
6969
  /**
6926
6970
  * Список загружаемых/загруженных на данный момент значений.
@@ -6993,108 +7037,108 @@ const d = W("common.references_private", () => {
6993
7037
  /**
6994
7038
  * Справочник складов.
6995
7039
  */
6996
- warehousesReference: Se,
7040
+ warehousesReference: be,
6997
7041
  /**
6998
7042
  * Справочник типов свойств.
6999
7043
  */
7000
- propertyTypesReference: be,
7044
+ propertyTypesReference: Se,
7001
7045
  /**
7002
7046
  * Справочник коэффициентов цен.
7003
7047
  */
7004
7048
  priceCoefficientsReference: l
7005
7049
  };
7006
- }), bs = W("common.references", () => {
7007
- const n = P(() => {
7050
+ }), Ss = W("common.references", () => {
7051
+ const n = R(() => {
7008
7052
  const l = d();
7009
7053
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
7010
7054
  l.channelPrimaryInterestReference = g;
7011
7055
  }).catch(v)), l.channelPrimaryInterestReference;
7012
- }), r = P(() => {
7056
+ }), r = R(() => {
7013
7057
  const l = d();
7014
7058
  return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
7015
7059
  l.contactPositionsReference = g;
7016
7060
  }).catch(v)), l.contactPositionsReference;
7017
- }), e = P(() => {
7061
+ }), e = R(() => {
7018
7062
  const l = d();
7019
7063
  return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
7020
7064
  l.currencyReference = g;
7021
7065
  }).catch(v)), l.currencyReference;
7022
- }), t = P(() => {
7066
+ }), t = R(() => {
7023
7067
  const l = d();
7024
7068
  return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
7025
7069
  l.opfReference = g;
7026
7070
  }).catch(v)), l.opfReference;
7027
- }), i = P(() => {
7071
+ }), i = R(() => {
7028
7072
  const l = d();
7029
7073
  return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(T).getOperators().then((g) => {
7030
7074
  l.operatorReference = g;
7031
7075
  }).catch(v)), l.operatorReference;
7032
- }), o = P(() => {
7076
+ }), o = R(() => {
7033
7077
  const l = d();
7034
7078
  return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
7035
7079
  l.orderPaymentStatusReference = g;
7036
7080
  }).catch(v)), l.orderPaymentStatusReference;
7037
- }), c = P(() => {
7081
+ }), c = R(() => {
7038
7082
  const l = d();
7039
7083
  return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
7040
7084
  l.orderStatusReference = g;
7041
7085
  }).catch(v)), l.orderStatusReference;
7042
- }), u = P(() => {
7086
+ }), u = R(() => {
7043
7087
  const l = d();
7044
7088
  return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(T).getOrderStatusDetails().then((g) => {
7045
7089
  l.orderStatusDetailReference = g;
7046
7090
  }).catch(v)), l.orderStatusDetailReference;
7047
- }), p = P(() => {
7091
+ }), p = R(() => {
7048
7092
  const l = d();
7049
7093
  return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
7050
7094
  l.paymentTypeReference = g;
7051
7095
  }).catch(v)), l.paymentTypeReference;
7052
- }), m = P(() => {
7096
+ }), m = R(() => {
7053
7097
  const l = d();
7054
7098
  return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
7055
7099
  l.partnerGroupReference = g;
7056
7100
  }).catch(v)), l.partnerGroupReference;
7057
- }), f = P(() => {
7101
+ }), f = R(() => {
7058
7102
  const l = d();
7059
7103
  return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
7060
7104
  l.productFileTypeReference = g;
7061
7105
  }).catch(v)), l.productFileTypeReference;
7062
- }), D = P(() => {
7106
+ }), D = R(() => {
7063
7107
  const l = d();
7064
7108
  return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
7065
7109
  l.resourceTypesReference = g;
7066
7110
  }).catch(v)), l.resourceTypesReference;
7067
- }), ie = P(() => {
7111
+ }), ie = R(() => {
7068
7112
  const l = d();
7069
7113
  return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
7070
7114
  l.salesDirectionsReference = g;
7071
7115
  }).catch(v)), l.salesDirectionsReference;
7072
- }), ne = P(() => {
7116
+ }), ne = R(() => {
7073
7117
  const l = d();
7074
7118
  return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
7075
7119
  l.sourcePrimaryInterestReference = g;
7076
7120
  }).catch(v)), l.sourcePrimaryInterestReference;
7077
- }), E = P(() => {
7121
+ }), E = R(() => {
7078
7122
  const l = d();
7079
7123
  return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
7080
7124
  l.deliveryTypeReference = g;
7081
7125
  }).catch(v)), l.deliveryTypeReference;
7082
- }), K = P(() => {
7126
+ }), K = R(() => {
7083
7127
  const l = d();
7084
7128
  return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Dt).getManagers().then((g) => {
7085
7129
  l.managersList = g;
7086
7130
  }).catch(v)), l.managersList;
7087
- }), Te = P(() => {
7131
+ }), Te = R(() => {
7088
7132
  const l = d();
7089
7133
  return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
7090
7134
  l.warehousesReference = g;
7091
7135
  }).catch(v)), l.warehousesReference;
7092
- }), Se = P(() => {
7136
+ }), be = R(() => {
7093
7137
  const l = d();
7094
7138
  return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
7095
7139
  l.propertyTypesReference = g;
7096
7140
  }).catch(v)), l.propertyTypesReference;
7097
- }), be = P(() => {
7141
+ }), Se = R(() => {
7098
7142
  const l = d();
7099
7143
  return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
7100
7144
  l.priceCoefficientsReference = g;
@@ -7172,11 +7216,11 @@ const d = W("common.references_private", () => {
7172
7216
  /**
7173
7217
  * Справочник типов свойств.
7174
7218
  */
7175
- propertyTypesReference: Se,
7219
+ propertyTypesReference: be,
7176
7220
  /**
7177
7221
  * Справочник коэффициентов цен.
7178
7222
  */
7179
- priceCoefficientsReference: be
7223
+ priceCoefficientsReference: Se
7180
7224
  };
7181
7225
  });
7182
7226
  class qt {
@@ -7319,7 +7363,7 @@ class Ls extends h {
7319
7363
  }
7320
7364
  }
7321
7365
  var Nt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Nt || {});
7322
- class Ut extends Pr {
7366
+ class Ut extends Rr {
7323
7367
  /**
7324
7368
  * Инициализирует экземпляр класса {@link User}.
7325
7369
  *
@@ -7387,7 +7431,7 @@ const Ht = W("common.user_state_private", () => {
7387
7431
  /**
7388
7432
  * Данные о текущем пользователе.
7389
7433
  */
7390
- currentUser: P(() => {
7434
+ currentUser: R(() => {
7391
7435
  const r = Ht();
7392
7436
  return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Ft).getCurrentUser().then((e) => {
7393
7437
  r.currentUser = e;
@@ -7431,16 +7475,16 @@ export {
7431
7475
  yr as CatalogableItem,
7432
7476
  N as Category,
7433
7477
  rr as CategoryPricingRule,
7434
- Sr as ChannelPrimaryInterest,
7478
+ br as ChannelPrimaryInterest,
7435
7479
  Ts as City,
7436
7480
  Ae as CityWithRegionAndCountry,
7437
7481
  nr as Client,
7438
7482
  at as ClientAdditionalData,
7439
- Pe as ClientCategory,
7483
+ Re as ClientCategory,
7440
7484
  O as ClientDataProvider,
7441
7485
  Zt as ClientPriceProvider,
7442
7486
  es as ClientPriceTemplateProvider,
7443
- j as ClientProduct,
7487
+ M as ClientProduct,
7444
7488
  ss as ClientProductCategoryDataProvider,
7445
7489
  is as ClientProductDataProvider,
7446
7490
  V as ClientShortInfo,
@@ -7448,10 +7492,10 @@ export {
7448
7492
  us as ClientsListFilters,
7449
7493
  ge as CodedIdentity,
7450
7494
  gs as ConfiguratorProvider,
7451
- Rt as ConfiguratorsEnum,
7495
+ Pt as ConfiguratorsEnum,
7452
7496
  He as Contact,
7453
7497
  ar as ContactLinks,
7454
- B as ContactPerson,
7498
+ G as ContactPerson,
7455
7499
  Ct as ContactPersonRelated,
7456
7500
  _t as ContactPosition,
7457
7501
  Ie as ContactRelation,
@@ -7475,7 +7519,7 @@ export {
7475
7519
  st as DeviceTypeResolutionConfig,
7476
7520
  lt as DiscountShortInfo,
7477
7521
  Os as FieldValidationResultData,
7478
- G as FilterGroup,
7522
+ j as FilterGroup,
7479
7523
  tr as FilterItem,
7480
7524
  Ke as FilterOpEnum,
7481
7525
  fr as GeoCoordinates,
@@ -7485,13 +7529,13 @@ export {
7485
7529
  h as HttpRequester,
7486
7530
  J as Identity,
7487
7531
  ht as Image,
7488
- M as JwtPayload,
7532
+ B as JwtPayload,
7489
7533
  ae as Manager,
7490
7534
  Je as ManagerCommon,
7491
7535
  vs as ManagerDataFactory,
7492
7536
  Dt as ManagerDataProvider,
7493
7537
  qt as MetaTagItem,
7494
- b as NamedIdentity,
7538
+ S as NamedIdentity,
7495
7539
  X as Offer,
7496
7540
  _r as OfferShortInfo,
7497
7541
  Cs as OffersDataProvider,
@@ -7499,9 +7543,9 @@ export {
7499
7543
  Or as Operator,
7500
7544
  z as Opf,
7501
7545
  U as OpfEnum,
7502
- S as Order,
7546
+ b as Order,
7503
7547
  At as OrderAction,
7504
- Rs as OrderEditorData,
7548
+ Ps as OrderEditorData,
7505
7549
  Ir as OrderInfo,
7506
7550
  dt as OrderItem,
7507
7551
  wr as OrderItemBase,
@@ -7510,14 +7554,14 @@ export {
7510
7554
  $e as OrderStatus,
7511
7555
  Ot as OrderStatusDetail,
7512
7556
  kt as OrderStatusDetailEnum,
7513
- bt as OrderStatusEnum,
7557
+ St as OrderStatusEnum,
7514
7558
  $t as OrderStatusHistoryInfo,
7515
7559
  Ds as OrdersDataProvider,
7516
- Ps as OrdersListFilters,
7560
+ Rs as OrdersListFilters,
7517
7561
  Qe as PaginationFiltersBase,
7518
7562
  se as PartnerGroup,
7519
7563
  xr as PaymentType,
7520
- Re as PreferencesStorageProvider,
7564
+ Pe as PreferencesStorageProvider,
7521
7565
  Oe as PriceAnalyze,
7522
7566
  ds as PriceAnalyzeProvider,
7523
7567
  de as PriceCoefficient,
@@ -7527,7 +7571,7 @@ export {
7527
7571
  Z as PriceTemplate,
7528
7572
  Le as PriceTemplateCategory,
7529
7573
  ce as PriceTemplateClient,
7530
- Rr as PriceTemplateICatalogableItem,
7574
+ Pr as PriceTemplateICatalogableItem,
7531
7575
  _e as PriceTemplateProduct,
7532
7576
  ns as PriceTemplateProvider,
7533
7577
  ue as PricingRole,
@@ -7537,8 +7581,8 @@ export {
7537
7581
  rs as ProductCategoryDataProvider,
7538
7582
  ts as ProductDataProvider,
7539
7583
  xt as ProductFileType,
7540
- Be as ProductPriceCoefficient,
7541
- St as ProductPriceHistory,
7584
+ Ge as ProductPriceCoefficient,
7585
+ bt as ProductPriceHistory,
7542
7586
  er as ProductUnit,
7543
7587
  cs as PropertiesProvider,
7544
7588
  le as Property,
@@ -7548,7 +7592,7 @@ export {
7548
7592
  $s as RecommendationsDataProvider,
7549
7593
  cr as RecommendationsList,
7550
7594
  w as Reference,
7551
- Ss as ReferenceDataFactory,
7595
+ bs as ReferenceDataFactory,
7552
7596
  T as ReferenceDataProvider,
7553
7597
  me as Region,
7554
7598
  qr as ResourceType,
@@ -7556,10 +7600,10 @@ export {
7556
7600
  nt as SentryConfig,
7557
7601
  lr as Seo,
7558
7602
  ks as SeoDataProvider,
7559
- br as SourcePrimaryInterest,
7603
+ Sr as SourcePrimaryInterest,
7560
7604
  ut as StockCount,
7561
7605
  ms as TableDataPagination,
7562
- Pt as TableDataPaginationRequestParams,
7606
+ Rt as TableDataPaginationRequestParams,
7563
7607
  fs as TableDataSortRequestParams,
7564
7608
  ls as TemplateProductCategoryDataProvider,
7565
7609
  Yt as TemplatesListFilters,
@@ -7569,7 +7613,7 @@ export {
7569
7613
  gr as UpdatableNamedIdentity,
7570
7614
  Ut as User,
7571
7615
  _s as UserAuthDataProvider,
7572
- Pr as UserCommonInfo,
7616
+ Rr as UserCommonInfo,
7573
7617
  Ft as UserDataProvider,
7574
7618
  Cr as UserPricingRole,
7575
7619
  I as UserShortInfo,
@@ -7582,6 +7626,6 @@ export {
7582
7626
  ws as pluralize,
7583
7627
  ke as useAuthStateStore,
7584
7628
  k as useBaseConfigStateStore,
7585
- bs as useReferencesStore,
7629
+ Ss as useReferencesStore,
7586
7630
  Is as useUserStateStore
7587
7631
  };