@snabcentr/common-lib 4.4.0-dev → 4.5.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/sc-common-lib.js +564 -507
  3. package/dist/sc-common-lib.js.map +1 -1
  4. package/dist/sc-common-lib.umd.cjs +1 -1
  5. package/dist/sc-common-lib.umd.cjs.map +1 -1
  6. package/dist/src/admins/classes/admin-full-info.d.ts +18 -0
  7. package/dist/src/admins/classes/admin-full-info.d.ts.map +1 -0
  8. package/dist/src/admins/classes/admin-short-info.d.ts +18 -0
  9. package/dist/src/admins/classes/admin-short-info.d.ts.map +1 -0
  10. package/dist/src/admins/classes/admins-list-filters.d.ts +38 -0
  11. package/dist/src/admins/classes/admins-list-filters.d.ts.map +1 -0
  12. package/dist/src/admins/classes/index.d.ts +4 -0
  13. package/dist/src/admins/classes/index.d.ts.map +1 -0
  14. package/dist/src/admins/index.d.ts +4 -0
  15. package/dist/src/admins/index.d.ts.map +1 -0
  16. package/dist/src/admins/interfaces/i-admin-full-info.d.ts +11 -0
  17. package/dist/src/admins/interfaces/i-admin-full-info.d.ts.map +1 -0
  18. package/dist/src/admins/interfaces/i-admin-short-info.d.ts +11 -0
  19. package/dist/src/admins/interfaces/i-admin-short-info.d.ts.map +1 -0
  20. package/dist/src/admins/interfaces/i-admins-list-filters.d.ts +27 -0
  21. package/dist/src/admins/interfaces/i-admins-list-filters.d.ts.map +1 -0
  22. package/dist/src/admins/interfaces/index.d.ts +4 -0
  23. package/dist/src/admins/interfaces/index.d.ts.map +1 -0
  24. package/dist/src/admins/providers/admin-provider.d.ts +69 -0
  25. package/dist/src/admins/providers/admin-provider.d.ts.map +1 -0
  26. package/dist/src/admins/providers/index.d.ts +2 -0
  27. package/dist/src/admins/providers/index.d.ts.map +1 -0
  28. package/dist/src/index.d.ts +1 -0
  29. package/dist/src/index.d.ts.map +1 -1
  30. package/package.json +1 -1
@@ -1,41 +1,106 @@
1
- import { BasePaginationProvider as e, ChannelPrimaryInterest as t, CityWithRegionAndCountry as n, ContactLinks as r, Country as i, CuratedDirection as a, Currency as o, DateHelper as s, DeliveryType as c, FieldValidationResultData as l, FilterGroup as ee, FilterOpEnum as te, GeoCoordinates as ne, HttpRequester as u, Identity as d, Manager as f, ManagerCommon as re, ManagerDataProvider as ie, NamedIdentity as p, Operator as ae, Opf as oe, OpfEnum as m, OrderStatus as se, PartnerGroup as h, PaymentType as ce, PriceCoefficient as le, PropertyType as ue, Reference as de, Region as fe, ResourceType as pe, SalesDirection as g, Shop as me, SourcePrimaryInterest as he, TypedInstanceFactory as _, UpdatableNamedIdentity as ge, User as _e, UserCommonInfo as ve, UserRegionShortInfo as ye, Warehouse as be, useBaseConfigStore as v } from "@snabcentr/common-core";
2
- import { addBusinessDays as xe, addDays as y, addMonths as b, addQuarters as Se, addWeeks as Ce, addYears as we, differenceInCalendarDays as Te, differenceInCalendarMonths as Ee, endOfDay as x, endOfMonth as S, endOfQuarter as De, endOfToday as Oe, endOfTomorrow as ke, endOfWeek as Ae, endOfYear as je, endOfYesterday as Me, format as C, getDate as Ne, getDaysInMonth as Pe, parseISO as w, setDate as Fe, startOfDay as T, startOfMonth as E, startOfQuarter as Ie, startOfToday as Le, startOfTomorrow as Re, startOfWeek as D, startOfYear as O, startOfYesterday as ze, subDays as Be, subMonths as Ve, subQuarters as He, subWeeks as Ue, subYears as We } from "date-fns";
3
- import { cloneDeep as Ge, endsWith as Ke, forEach as qe, includes as Je, isArray as Ye, isDate as Xe, isEmpty as Ze, isFunction as Qe, isNil as k, isObject as $e, isString as A, isUndefined as et, map as j, merge as tt, omitBy as nt, round as rt, some as it, startsWith as at, toUpper as ot } from "lodash-es";
1
+ import { BasePaginationProvider as e, ChannelPrimaryInterest as t, CityWithRegionAndCountry as n, ContactLinks as r, Country as i, CuratedDirection as a, Currency as o, DateHelper as s, DeliveryType as c, FieldValidationResultData as ee, FilterGroup as te, FilterOpEnum as ne, GeoCoordinates as re, HttpRequester as l, Identity as u, Manager as d, ManagerCommon as ie, ManagerDataProvider as ae, NamedIdentity as f, Operator as oe, Opf as se, OpfEnum as p, OrderStatus as ce, PartnerGroup as m, PaymentType as le, PriceCoefficient as ue, PropertyType as de, Reference as fe, Region as pe, ResourceType as me, SalesDirection as h, Shop as he, SourcePrimaryInterest as ge, TypedInstanceFactory as g, UpdatableNamedIdentity as _e, User as ve, UserCommonInfo as ye, UserRegionShortInfo as be, Warehouse as xe, useBaseConfigStore as _ } from "@snabcentr/common-core";
2
+ import { cloneDeep as Se, endsWith as Ce, forEach as we, includes as Te, isArray as Ee, isDate as De, isEmpty as Oe, isFunction as ke, isNil as v, isObject as Ae, isString as y, isUndefined as je, map as b, merge as Me, omitBy as Ne, round as Pe, some as Fe, startsWith as Ie, toUpper as Le } from "lodash-es";
3
+ import { addBusinessDays as Re, addDays as x, addMonths as S, addQuarters as ze, addWeeks as Be, addYears as Ve, differenceInCalendarDays as He, differenceInCalendarMonths as Ue, endOfDay as C, endOfMonth as w, endOfQuarter as We, endOfToday as Ge, endOfTomorrow as Ke, endOfWeek as qe, endOfYear as Je, endOfYesterday as Ye, format as T, getDate as Xe, getDaysInMonth as Ze, parseISO as E, setDate as Qe, startOfDay as D, startOfMonth as O, startOfQuarter as $e, startOfToday as et, startOfTomorrow as tt, startOfWeek as k, startOfYear as A, startOfYesterday as nt, subDays as rt, subMonths as it, subQuarters as at, subWeeks as ot, subYears as st } from "date-fns";
4
4
  export * from "@snabcentr/common-core";
5
- //#region src/blog/enums/blog-post-media-type-enum.ts
6
- var st = /* @__PURE__ */ function(e) {
5
+ //#region src/admins/classes/admin-short-info.ts
6
+ var ct = class extends ve {
7
+ isSuperadmin;
8
+ constructor(e) {
9
+ super(e), this.isSuperadmin = e?.isSuperadmin ?? !1;
10
+ }
11
+ }, lt = class extends ct {
12
+ showAllCosts;
13
+ constructor(e) {
14
+ super(e), this.showAllCosts = e?.showAllCosts;
15
+ }
16
+ }, j = class {
17
+ asClearRaw() {
18
+ let e = {};
19
+ return Object.keys(this).forEach((t) => {
20
+ let n = this[t];
21
+ v(n) || y(n) && n.trim().length === 0 || ke(n.isNewRec) && n.isNewRec() || (e[t] = n);
22
+ }), e;
23
+ }
24
+ }, ut = class extends j {
25
+ name;
26
+ phone;
27
+ email;
28
+ isActive;
29
+ isSuperadmin;
30
+ constructor(e) {
31
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.isActive = e?.isActive, this.isSuperadmin = e?.isSuperadmin;
32
+ }
33
+ resetFilterValue(e) {
34
+ switch (e) {
35
+ case "name":
36
+ case "phone":
37
+ case "email":
38
+ case "isActive":
39
+ case "isSuperadmin": this[e] = void 0;
40
+ }
41
+ return this;
42
+ }
43
+ }, dt = class t extends e {
44
+ static transformAdminDataToRequest(e) {
45
+ return {
46
+ name: e.name,
47
+ phone: e.phone,
48
+ email: e.email,
49
+ password: e.password,
50
+ isActive: e.isActive,
51
+ isSuperadmin: e.isSuperadmin,
52
+ pricingRoleId: e.pricingRole?.id,
53
+ showAllCosts: e.showAllCosts ?? !1
54
+ };
55
+ }
56
+ getAdminsList(e, t, n, r) {
57
+ return this.getTypedPaginated(ct, "/internal/admins", e, t, n, {}, void 0, r);
58
+ }
59
+ getAdmin(e, t = !1) {
60
+ return this.get(`/internal/admins/${e}`, {}, (e) => new lt(e.data), t);
61
+ }
62
+ createAdmin(e, n = {}) {
63
+ return this.post("/internal/admins", t.transformAdminDataToRequest(e), (e) => new lt(e.data), n);
64
+ }
65
+ updateAdmin(e, n = {}) {
66
+ return this.patch(`/internal/admins/${e.id}`, t.transformAdminDataToRequest(e), (e) => new lt(e.data), n);
67
+ }
68
+ deleteAdmin(e) {
69
+ return this.delete(`/internal/admins/${e}`);
70
+ }
71
+ }, ft = /* @__PURE__ */ function(e) {
7
72
  return e.Image = "image", e.Video = "video", e;
8
- }({}), ct = class extends d {
73
+ }({}), pt = class extends u {
9
74
  mediaType;
10
75
  isCover;
11
76
  isUnused;
12
77
  url;
13
78
  urlWebp;
14
79
  constructor(e) {
15
- super(e, ""), this.mediaType = e?.mediaType ?? st.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
80
+ super(e, ""), this.mediaType = e?.mediaType ?? ft.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
16
81
  }
17
82
  isImage() {
18
- return this.mediaType === st.Image;
83
+ return this.mediaType === ft.Image;
19
84
  }
20
85
  isVideo() {
21
- return this.mediaType === st.Video;
86
+ return this.mediaType === ft.Video;
22
87
  }
23
- }, lt = /* @__PURE__ */ function(e) {
88
+ }, mt = /* @__PURE__ */ function(e) {
24
89
  return e.Draft = "draft", e.Published = "published", e.Scheduled = "scheduled", e;
25
- }({}), M = class extends d {
90
+ }({}), M = class extends u {
26
91
  createdAt;
27
92
  constructor(e, t) {
28
93
  super(e, t), this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date();
29
94
  }
30
- }, ut = class e extends M {
95
+ }, ht = class e extends M {
31
96
  static resolvePublicationStatus(e) {
32
- return k(e) ? lt.Draft : e.getTime() > Date.now() ? lt.Scheduled : lt.Published;
97
+ return v(e) ? mt.Draft : e.getTime() > Date.now() ? mt.Scheduled : mt.Published;
33
98
  }
34
99
  static getSlugError(e) {
35
- return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : at(e, "-") || Ke(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Je(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
100
+ return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : Ie(e, "-") || Ce(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Te(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
36
101
  }
37
102
  static parseDate(e) {
38
- return k(e) ? null : A(e) ? w(e) : e;
103
+ return v(e) ? null : y(e) ? E(e) : e;
39
104
  }
40
105
  slug;
41
106
  title;
@@ -46,11 +111,11 @@ var st = /* @__PURE__ */ function(e) {
46
111
  getPublicationStatus() {
47
112
  return e.resolvePublicationStatus(this.publishedAt);
48
113
  }
49
- }, dt = class extends ut {
114
+ }, gt = class extends ht {
50
115
  content;
51
116
  media;
52
117
  constructor(e) {
53
- super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new ct(e));
118
+ super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new pt(e));
54
119
  }
55
120
  toSaveData(e = !1) {
56
121
  return {
@@ -67,20 +132,12 @@ var st = /* @__PURE__ */ function(e) {
67
132
  return this.media.filter((e) => e.isUnused);
68
133
  }
69
134
  }, N = class {
70
- asClearRaw() {
71
- let e = {};
72
- return Object.keys(this).forEach((t) => {
73
- let n = this[t];
74
- k(n) || A(n) && n.trim().length === 0 || Qe(n.isNewRec) && n.isNewRec() || (e[t] = n);
75
- }), e;
76
- }
77
- }, P = class {
78
135
  from;
79
136
  to;
80
137
  constructor(e) {
81
- this.from = A(e?.from) ? w(e.from) : e?.from ?? null, this.to = A(e?.to) ? w(e.to) : e?.to ?? null;
138
+ this.from = y(e?.from) ? E(e.from) : e?.from ?? null, this.to = y(e?.to) ? E(e.to) : e?.to ?? null;
82
139
  }
83
- }, ft = class extends N {
140
+ }, _t = class extends j {
84
141
  id;
85
142
  title;
86
143
  slug;
@@ -89,7 +146,7 @@ var st = /* @__PURE__ */ function(e) {
89
146
  publishedAt;
90
147
  createdAt;
91
148
  constructor(e) {
92
- super(), this.id = e?.id, this.title = e?.title, this.slug = e?.slug, this.content = e?.content, this.publicationStatus = e?.publicationStatus, this.publishedAt = new P(e?.publishedAt), this.createdAt = new P(e?.createdAt);
149
+ super(), this.id = e?.id, this.title = e?.title, this.slug = e?.slug, this.content = e?.content, this.publicationStatus = e?.publicationStatus, this.publishedAt = new N(e?.publishedAt), this.createdAt = new N(e?.createdAt);
93
150
  }
94
151
  resetFilterValue(e) {
95
152
  switch (e) {
@@ -111,29 +168,29 @@ var st = /* @__PURE__ */ function(e) {
111
168
  let e = super.asClearRaw();
112
169
  return !e?.publishedAt?.from && !e?.publishedAt?.to && delete e.publishedAt, !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
113
170
  }
114
- }, pt = class t extends e {
171
+ }, vt = class t extends e {
115
172
  static preparePostSaveData(e) {
116
173
  let t = {};
117
- if (et(e.title) || (t.title = e.title), et(e.slug) || (t.slug = e.slug), et(e.content) || (t.content = e.content), !et(e.publishedAt)) {
118
- let n = v().config.dateFormats.api;
119
- t.publishedAt = k(e.publishedAt) ? null : C(e.publishedAt, n);
174
+ if (je(e.title) || (t.title = e.title), je(e.slug) || (t.slug = e.slug), je(e.content) || (t.content = e.content), !je(e.publishedAt)) {
175
+ let n = _().config.dateFormats.api;
176
+ t.publishedAt = v(e.publishedAt) ? null : T(e.publishedAt, n);
120
177
  }
121
178
  return t;
122
179
  }
123
180
  getPostList(e, t, n) {
124
181
  return this.getPaginated("/internal/blog", e, t, n, {}, (e) => ({
125
182
  ...e.data,
126
- data: e.data.data.map((e) => new ut(e))
183
+ data: e.data.data.map((e) => new ht(e))
127
184
  }));
128
185
  }
129
186
  getPost(e) {
130
- return this.get(`/internal/blog/${e}`, {}, (e) => new dt(e.data));
187
+ return this.get(`/internal/blog/${e}`, {}, (e) => new gt(e.data));
131
188
  }
132
189
  createPost(e, n = {}) {
133
- return this.post("/internal/blog", t.preparePostSaveData(e), (e) => new dt(e.data), n);
190
+ return this.post("/internal/blog", t.preparePostSaveData(e), (e) => new gt(e.data), n);
134
191
  }
135
192
  updatePost(e, n, r = {}) {
136
- return this.patch(`/internal/blog/${e}`, t.preparePostSaveData(n), (e) => new dt(e.data), r);
193
+ return this.patch(`/internal/blog/${e}`, t.preparePostSaveData(n), (e) => new gt(e.data), r);
137
194
  }
138
195
  removePost(e) {
139
196
  return this.delete(`/internal/blog/${e}`);
@@ -149,26 +206,26 @@ var st = /* @__PURE__ */ function(e) {
149
206
  onUploadProgress: (e) => {
150
207
  r && r(e.total ? Math.round(e.loaded / e.total * 100) : 0);
151
208
  }
152
- }, (e) => new ct(e.data), i);
209
+ }, (e) => new pt(e.data), i);
153
210
  }
154
211
  updateMedia(e, t, n, r = {}) {
155
- return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new ct(e.data), r);
212
+ return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new pt(e.data), r);
156
213
  }
157
214
  removeMedia(e, t) {
158
215
  return this.delete(`/internal/blog/${e}/media/${t}`);
159
216
  }
160
- }, mt = class extends ge {
217
+ }, P = class extends _e {
161
218
  deletedAt;
162
219
  constructor(e) {
163
220
  super(e), this.deletedAt = s.parse(e?.deletedAt);
164
221
  }
165
- }, F = class extends p {
222
+ }, F = class extends f {
166
223
  type;
167
224
  isActive;
168
225
  constructor(e) {
169
226
  super(e), this.type = e?.type, this.isActive = e?.isActive ?? !0;
170
227
  }
171
- }, ht = class extends mt {
228
+ }, yt = class extends P {
172
229
  costCoefficient;
173
230
  isLowPriceAllowed;
174
231
  publishedAt;
@@ -178,28 +235,28 @@ var st = /* @__PURE__ */ function(e) {
178
235
  constructor(e) {
179
236
  super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.isLowPriceAllowed = e?.isLowPriceAllowed ?? !1, this.publishedAt = s.parse(e?.publishedAt), this.description = e?.description ?? void 0, this.percent = e?.percent ?? 0, this.owner = new F(e?.owner);
180
237
  }
181
- }, I = class extends ge {
238
+ }, I = class extends _e {
182
239
  description;
183
240
  owner;
184
241
  constructor(e) {
185
242
  super(e), this.description = e?.description ?? "", this.owner = e?.owner ? new F(e.owner) : void 0;
186
243
  }
187
- }, gt = class {
244
+ }, bt = class {
188
245
  coefficient;
189
246
  value;
190
247
  cost;
191
248
  percent;
192
249
  readOnly;
193
250
  constructor(e) {
194
- this.coefficient = new le(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
251
+ this.coefficient = new ue(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
195
252
  }
196
- }, _t = class {
253
+ }, xt = class {
197
254
  warehouse;
198
255
  count;
199
256
  constructor(e) {
200
- this.warehouse = new be(e?.warehouse), this.count = e?.count ?? 0;
257
+ this.warehouse = new xe(e?.warehouse), this.count = e?.count ?? 0;
201
258
  }
202
- }, vt = class extends p {
259
+ }, St = class extends f {
203
260
  slug = "";
204
261
  description;
205
262
  isSquare = !1;
@@ -207,35 +264,35 @@ var st = /* @__PURE__ */ function(e) {
207
264
  constructor(e) {
208
265
  super(e), e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
209
266
  }
210
- }, L = class extends p {
267
+ }, L = class extends f {
211
268
  code = "";
212
269
  constructor(e) {
213
270
  super(e), this.code = e?.code ?? "";
214
271
  }
215
- }, yt = class extends L {
272
+ }, Ct = class extends L {
216
273
  slug;
217
274
  type;
218
275
  constructor(e) {
219
276
  super(e), this.slug = e?.slug ?? "";
220
277
  }
221
- }, bt = class extends yt {
278
+ }, wt = class extends Ct {
222
279
  isHidden;
223
280
  constructor(e) {
224
281
  super(e), this.isHidden = e?.isHidden ?? !1;
225
282
  }
226
- }, xt = class {
283
+ }, Tt = class {
227
284
  image;
228
285
  preview;
229
286
  isDefault;
230
287
  constructor(e, t) {
231
288
  this.image = `${t ?? ""}${e.image}`, this.preview = `${t ?? ""}${e.preview}`, this.isDefault = e.isDefault;
232
289
  }
233
- }, St = class extends yt {
290
+ }, Et = class extends Ct {
234
291
  isPrimary;
235
292
  constructor(e) {
236
293
  super(e), this.isPrimary = e?.isPrimary ?? !1;
237
294
  }
238
- }, R = class extends bt {
295
+ }, R = class extends wt {
239
296
  supplierSku;
240
297
  unit;
241
298
  pack;
@@ -254,12 +311,12 @@ var st = /* @__PURE__ */ function(e) {
254
311
  retailCostRub;
255
312
  priceCoefficients;
256
313
  constructor(e) {
257
- super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new vt(e.unit) : new vt(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new o(e.currency) : new o(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = A(e?.costDate) ? w(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new _t(e)) ?? [], this.type = "product";
314
+ super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new St(e.unit) : new St(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new o(e.currency) : new o(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = y(e?.costDate) ? E(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new xt(e)) ?? [], this.type = "product";
258
315
  let t = e?.category ?? e?.categories?.find((e) => e.isPrimary);
259
- t && (this.category = new St({
316
+ t && (this.category = new Et({
260
317
  ...t,
261
318
  isPrimary: !0
262
- }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new St(e))), this.images = e?.images?.map((e) => new xt(e, v().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new gt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
319
+ }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new Et(e))), this.images = e?.images?.map((e) => new Tt(e, _().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new bt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
263
320
  }
264
321
  getIsMeasurable() {
265
322
  return this.unit.isLinear || this.unit.isSquare;
@@ -270,7 +327,7 @@ var st = /* @__PURE__ */ function(e) {
270
327
  getRetailCostRub() {
271
328
  return this.retailCostRub ?? this.costRub;
272
329
  }
273
- }, Ct = /* @__PURE__ */ function(e) {
330
+ }, Dt = /* @__PURE__ */ function(e) {
274
331
  return e.Discount = "discount", e.PriceTemplate = "price_template", e.ClientPrice = "client_price", e.Product = "product", e;
275
332
  }({}), z = class extends R {
276
333
  costCoefficient;
@@ -283,17 +340,17 @@ var st = /* @__PURE__ */ function(e) {
283
340
  isRequired;
284
341
  isFavorite;
285
342
  constructor(e) {
286
- super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? Ct.Product, this.discount = e?.discount ? new ht(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new I(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new le(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
343
+ super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? Dt.Product, this.discount = e?.discount ? new yt(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new I(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new ue(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
287
344
  }
288
- }, B = class extends St {
345
+ }, B = class extends Et {
289
346
  isHidden;
290
347
  parentCategoryId;
291
348
  properties;
292
349
  currencyRates;
293
350
  constructor(e) {
294
- super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [ot(e), t])) : void 0;
351
+ super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [Le(e), t])) : void 0;
295
352
  }
296
- }, wt = class extends d {
353
+ }, Ot = class extends u {
297
354
  category;
298
355
  product;
299
356
  quantity;
@@ -312,9 +369,9 @@ var st = /* @__PURE__ */ function(e) {
312
369
  originalId;
313
370
  replacementId;
314
371
  constructor(e) {
315
- super(e), this.product = new z(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new B(), this.currency = e.currency ? new o(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ge(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new F(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
372
+ super(e), this.product = new z(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new B(), this.currency = e.currency ? new o(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Se(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new F(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
316
373
  }
317
- }, Tt = class extends wt {
374
+ }, kt = class extends Ot {
318
375
  cost;
319
376
  costOne;
320
377
  costOneRub;
@@ -325,16 +382,16 @@ var st = /* @__PURE__ */ function(e) {
325
382
  sawing;
326
383
  currency;
327
384
  constructor(e) {
328
- super(e), 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 = Ye(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new o(e.currency);
385
+ super(e), 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 = Ee(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new o(e.currency);
329
386
  }
330
387
  }, V = class {
331
388
  items;
332
389
  resultSum;
333
390
  directionsSum;
334
391
  constructor(e) {
335
- this.items = e.items.map((e) => new Tt(e)), this.resultSum = e.resultSum, this.directionsSum = e.directionsSum;
392
+ this.items = e.items.map((e) => new kt(e)), this.resultSum = e.resultSum, this.directionsSum = e.directionsSum;
336
393
  }
337
- }, Et = class extends u {
394
+ }, At = class extends l {
338
395
  getCart(e) {
339
396
  return this.get(`internal/clients/${e.id}/cart`, {}, (e) => new V(e.data));
340
397
  }
@@ -378,9 +435,9 @@ var st = /* @__PURE__ */ function(e) {
378
435
  getCartItemFromCSVExample(e) {
379
436
  return this.get(`internal/clients/${e.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
380
437
  }
381
- }, Dt = /* @__PURE__ */ function(e) {
438
+ }, jt = /* @__PURE__ */ function(e) {
382
439
  return e.m2Cost = "m2Cost", e.percent = "percent", e.value = "value", e;
383
- }({}), Ot = /* @__PURE__ */ function(e) {
440
+ }({}), Mt = /* @__PURE__ */ function(e) {
384
441
  return e.Checkbox = "checkbox", e.Range = "range", e.Toggle = "toggle", e;
385
442
  }({}), H = class e extends B {
386
443
  categories;
@@ -388,44 +445,44 @@ var st = /* @__PURE__ */ function(e) {
388
445
  constructor(t) {
389
446
  super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new R(e));
390
447
  }
391
- }, kt = class extends B {
448
+ }, Nt = class extends B {
392
449
  isDisabled;
393
450
  isRequired;
394
451
  isFavorite;
395
452
  hidingComment;
396
453
  manager;
397
454
  constructor(e) {
398
- super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new f(e.manager) : void 0;
455
+ super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new d(e.manager) : void 0;
399
456
  }
400
- }, At = class e extends kt {
457
+ }, Pt = class e extends Nt {
401
458
  categories;
402
459
  products;
403
460
  constructor(t) {
404
461
  super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new z(e));
405
462
  }
406
- }, jt = class {
463
+ }, Ft = class {
407
464
  priceCoefficient;
408
465
  increasePercent;
409
466
  constructor(e) {
410
- this.priceCoefficient = e?.priceCoefficient && new le(e.priceCoefficient), this.increasePercent = e?.increasePercent;
467
+ this.priceCoefficient = e?.priceCoefficient && new ue(e.priceCoefficient), this.increasePercent = e?.increasePercent;
411
468
  }
412
- }, Mt = class extends jt {
469
+ }, It = class extends Ft {
413
470
  constructor(e) {
414
471
  super(e);
415
472
  }
416
- }, Nt = class extends Mt {
473
+ }, Lt = class extends It {
417
474
  productCategory;
418
475
  constructor(e) {
419
476
  super(e), this.productCategory = new B(e?.productCategory);
420
477
  }
421
- }, Pt = class extends p {
478
+ }, Rt = class extends f {
422
479
  photo;
423
480
  contacts;
424
481
  curatedDirection;
425
482
  constructor(e) {
426
483
  super(e), this.photo = e.photo, this.contacts = new r(e.contacts), this.curatedDirection = new a(e.curatedDirection);
427
484
  }
428
- }, U = class extends ve {
485
+ }, U = class extends ye {
429
486
  salesDirection;
430
487
  debt;
431
488
  alternativeName;
@@ -436,31 +493,31 @@ var st = /* @__PURE__ */ function(e) {
436
493
  managers;
437
494
  curators;
438
495
  constructor(e) {
439
- super(e), this.salesDirection = new g(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new n(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new re(e)) ?? [], this.curators = e?.curators?.map((e) => new Pt(e)) ?? void 0;
496
+ super(e), this.salesDirection = new h(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new n(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new ie(e)) ?? [], this.curators = e?.curators?.map((e) => new Rt(e)) ?? void 0;
440
497
  }
441
- }, Ft = class extends M {
498
+ }, zt = class extends M {
442
499
  deletedAt;
443
500
  constructor(e, t) {
444
501
  super(e, t), this.deletedAt = s.parse(e?.deletedAt);
445
502
  }
446
- }, W = class extends Ft {
503
+ }, W = class extends zt {
447
504
  client;
448
505
  priceTemplate;
449
506
  constructor(e) {
450
507
  super(e), this.client = new U(e?.client), this.priceTemplate = new I(e?.priceTemplate);
451
508
  }
452
- }, It = class extends Mt {
509
+ }, Bt = class extends It {
453
510
  product;
454
511
  constructor(e) {
455
512
  super(e), this.product = new R(e?.product);
456
513
  }
457
- }, G = class extends p {
514
+ }, G = class extends f {
458
515
  type;
459
516
  description;
460
517
  metadata;
461
518
  isFilterable;
462
519
  constructor(e) {
463
- super(e), this.type = new ue(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
520
+ super(e), this.type = new de(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
464
521
  }
465
522
  }, K = class {
466
523
  property;
@@ -468,15 +525,15 @@ var st = /* @__PURE__ */ function(e) {
468
525
  constructor(e) {
469
526
  this.property = new G(e?.property), this.value = e?.value ?? "";
470
527
  }
471
- }, Lt = class {
528
+ }, Vt = class {
472
529
  id;
473
530
  name;
474
531
  description;
475
532
  ownerName;
476
- createdAt = new P();
477
- updatedAt = new P();
533
+ createdAt = new N();
534
+ updatedAt = new N();
478
535
  constructor(e) {
479
- this.id = e?.id, this.name = e?.name, this.description = e?.description, this.ownerName = e?.ownerName, this.createdAt = new P(e?.createdAt), this.updatedAt = new P(e?.updatedAt);
536
+ this.id = e?.id, this.name = e?.name, this.description = e?.description, this.ownerName = e?.ownerName, this.createdAt = new N(e?.createdAt), this.updatedAt = new N(e?.updatedAt);
480
537
  }
481
538
  resetFilterValue(e) {
482
539
  switch (e) {
@@ -497,26 +554,26 @@ var st = /* @__PURE__ */ function(e) {
497
554
  let e = {};
498
555
  return Object.keys(this).forEach((t) => {
499
556
  let n = this[t];
500
- k(n) || A(n) && n.trim().length === 0 || Qe(n.isNewRec) && n.isNewRec() || (e[t] = n);
557
+ v(n) || y(n) && n.trim().length === 0 || ke(n.isNewRec) && n.isNewRec() || (e[t] = n);
501
558
  }), !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.updatedAt?.from && !e?.updatedAt?.to && delete e.updatedAt, e;
502
559
  }
503
- }, Rt = class extends jt {
560
+ }, Ht = class extends Ft {
504
561
  executor;
505
562
  createdAt;
506
563
  constructor(e) {
507
564
  super(e), this.executor = e?.executor ? new F(e.executor) : void 0, this.createdAt = s.parse(e?.createdAt);
508
565
  }
509
- }, zt = class extends Rt {
566
+ }, Ut = class extends Ht {
510
567
  product;
511
568
  constructor(e) {
512
569
  super(e), this.product = new R(e?.product);
513
570
  }
514
- }, Bt = class extends Rt {
571
+ }, Wt = class extends Ht {
515
572
  productCategory;
516
573
  constructor(e) {
517
574
  super(e), this.productCategory = new B(e?.productCategory);
518
575
  }
519
- }, q = class extends p {
576
+ }, q = class extends f {
520
577
  description;
521
578
  canChangeLowCost;
522
579
  parentRoleId;
@@ -526,14 +583,14 @@ var st = /* @__PURE__ */ function(e) {
526
583
  constructor(e) {
527
584
  super(e), this.description = e?.description, this.canChangeLowCost = e?.canChangeLowCost ?? !1, this.parentRoleId = e?.parentRoleId;
528
585
  }
529
- }, Vt = class {
586
+ }, Gt = class {
530
587
  role;
531
588
  category;
532
589
  minCoefficient;
533
590
  constructor(e) {
534
- this.role = new q(e?.role), this.category = new B(e?.category), this.minCoefficient = new le(e?.minCoefficient);
591
+ this.role = new q(e?.role), this.category = new B(e?.category), this.minCoefficient = new ue(e?.minCoefficient);
535
592
  }
536
- }, Ht = class {
593
+ }, Kt = class {
537
594
  isFake;
538
595
  isHidden;
539
596
  isMultiple;
@@ -542,20 +599,20 @@ var st = /* @__PURE__ */ function(e) {
542
599
  constructor(e) {
543
600
  this.isFake = e?.isFake ?? !1, this.isHidden = e?.isHidden ?? !1, this.isMultiple = e?.isMultiple ?? null, this.type = e?.type ?? null, this.ord = e?.ord ?? 0;
544
601
  }
545
- }, Ut = class {
602
+ }, qt = class {
546
603
  category;
547
604
  property;
548
605
  settings;
549
606
  constructor(e) {
550
- this.category = new B(e?.category), this.property = new G(e?.property), this.settings = new Ht(e?.settings);
607
+ this.category = new B(e?.category), this.property = new G(e?.property), this.settings = new Kt(e?.settings);
551
608
  }
552
- }, Wt = class {
609
+ }, Jt = class {
553
610
  id;
554
611
  label;
555
612
  constructor(e) {
556
613
  this.id = e?.id ?? "", this.label = e?.label ?? "";
557
614
  }
558
- }, Gt = class {
615
+ }, Yt = class {
559
616
  id;
560
617
  label;
561
618
  type;
@@ -565,9 +622,9 @@ var st = /* @__PURE__ */ function(e) {
565
622
  min;
566
623
  max;
567
624
  constructor(e) {
568
- this.id = e?.id ?? "", this.label = e?.label ?? "", this.type = e?.type ?? Ot.Checkbox, this.ord = e?.ord ?? 0, this.isMultiple = e?.isMultiple ?? null, this.values = e?.values?.map((e) => new Wt(e)) ?? [], this.min = e?.min ?? null, this.max = e?.max ?? null;
625
+ this.id = e?.id ?? "", this.label = e?.label ?? "", this.type = e?.type ?? Mt.Checkbox, this.ord = e?.ord ?? 0, this.isMultiple = e?.isMultiple ?? null, this.values = e?.values?.map((e) => new Jt(e)) ?? [], this.min = e?.min ?? null, this.max = e?.max ?? null;
569
626
  }
570
- }, Kt = class extends u {
627
+ }, Xt = class extends l {
571
628
  search(e, t = !1) {
572
629
  return this.get("/internal/catalog/search", {
573
630
  term: e,
@@ -575,18 +632,18 @@ var st = /* @__PURE__ */ function(e) {
575
632
  });
576
633
  }
577
634
  getPriceExportLink(e = "csv", t = !1, n = void 0, r = void 0) {
578
- let i = `${v().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
635
+ let i = `${_().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
579
636
  return n && (i += `&category_id=${n}`), r && (i += `&client_id=${r}`), i;
580
637
  }
581
- }, qt = class extends u {
638
+ }, Zt = class extends l {
582
639
  importPrices(e, t, n = !1) {
583
640
  return this.post(`/internal/clients/${e}/price/import`, t, void 0, {}, n);
584
641
  }
585
642
  getCategoryPrices(e) {
586
- return this.getTypedList(Bt, `/internal/clients/${e}/price/categories`);
643
+ return this.getTypedList(Wt, `/internal/clients/${e}/price/categories`);
587
644
  }
588
645
  getCategoryPrice(e, t) {
589
- return this.get(`/internal/clients/${e}/price/categories/${t}`, {}, (e) => new Bt(e.data));
646
+ return this.get(`/internal/clients/${e}/price/categories/${t}`, {}, (e) => new Wt(e.data));
590
647
  }
591
648
  updateCategoryPrices(e, t, n, r = !1) {
592
649
  return this.request({
@@ -632,16 +689,16 @@ var st = /* @__PURE__ */ function(e) {
632
689
  return this.delete(`/internal/clients/${e}/price/categories/${t}/manager`);
633
690
  }
634
691
  getProductPrices(e) {
635
- return this.getTypedList(zt, `/internal/clients/${e}/price/products`);
692
+ return this.getTypedList(Ut, `/internal/clients/${e}/price/products`);
636
693
  }
637
694
  getProductPrice(e, t) {
638
- return this.get(`/internal/clients/${e}/price/products/${t}`, {}, (e) => new zt(e.data));
695
+ return this.get(`/internal/clients/${e}/price/products/${t}`, {}, (e) => new Ut(e.data));
639
696
  }
640
697
  updateProductPrice(e, t, n) {
641
698
  return this.patch(`/internal/clients/${e}/price/products/${t}`, {
642
699
  price_coefficient_id: n.coefficient?.id,
643
700
  increase_percent: n.value
644
- }, (e) => new zt(e.data));
701
+ }, (e) => new Ut(e.data));
645
702
  }
646
703
  removeProductPrice(e, t) {
647
704
  return this.delete(`/internal/clients/${e}/price/products/${t}`);
@@ -661,7 +718,7 @@ var st = /* @__PURE__ */ function(e) {
661
718
  sendCommercialOffer(e, t) {
662
719
  return this.post(`/internal/clients/${e}/price/commercial-offer/send`, t);
663
720
  }
664
- }, Jt = class extends u {
721
+ }, Qt = class extends l {
665
722
  getTemplateList(e) {
666
723
  return this.getTypedList(W, `/internal/clients/${e}/price/templates`);
667
724
  }
@@ -669,26 +726,26 @@ var st = /* @__PURE__ */ function(e) {
669
726
  return this.get(`/internal/clients/${e}/price/templates/active`, {}, (e) => new W(e.data), !0);
670
727
  }
671
728
  attachTemplate(e, t, n) {
672
- let r = v().config.dateFormats.api;
729
+ let r = _().config.dateFormats.api;
673
730
  return this.post(`/internal/clients/${e}/price/templates/${t}`, n && {
674
- startAt: n.startAt && C(n.startAt, r),
675
- endAt: n.endAt && C(n.endAt, r)
731
+ startAt: n.startAt && T(n.startAt, r),
732
+ endAt: n.endAt && T(n.endAt, r)
676
733
  }, (e) => new W(e.data), {}, !0);
677
734
  }
678
735
  applyTemplate(e, t) {
679
736
  return this.post(`/internal/clients/${e}/price/templates/${t}/apply`, {}, void 0, {}, !0);
680
737
  }
681
738
  changeTemplate(e, t, n, r) {
682
- let i = v().config.dateFormats.api;
739
+ let i = _().config.dateFormats.api;
683
740
  return this.patch(`/internal/clients/${e}/price/templates/${t}/${n}`, r && {
684
- startAt: r.startAt && C(r.startAt, i),
685
- endAt: r.endAt && C(r.endAt, i)
741
+ startAt: r.startAt && T(r.startAt, i),
742
+ endAt: r.endAt && T(r.endAt, i)
686
743
  }, (e) => new W(e.data));
687
744
  }
688
745
  detachTemplate(e, t, n) {
689
746
  return this.delete(`/internal/clients/${e}/price/templates/${t}/${n}`);
690
747
  }
691
- }, Yt = class extends u {
748
+ }, $t = class extends l {
692
749
  getRootCategoriesList(e = !1) {
693
750
  return this.getTypedList(H, "/internal/catalog/categories", { showHidden: e });
694
751
  }
@@ -705,12 +762,12 @@ var st = /* @__PURE__ */ function(e) {
705
762
  return this.get(`/internal/catalog/categories/${e}/products`, {
706
763
  showHidden: n,
707
764
  withPriceCoefficients: t
708
- }, (e) => j(e.data, (e) => new R(e)));
765
+ }, (e) => b(e.data, (e) => new R(e)));
709
766
  }
710
767
  getCategoryProductsCoefficients(e) {
711
768
  return this.get(`/internal/catalog/categories/${e}/products/coefficients`, {}, (e) => {
712
769
  let { data: t } = e;
713
- return qe(t, (e) => e.map((e) => new gt(e))), t;
770
+ return we(t, (e) => e.map((e) => new bt(e))), t;
714
771
  });
715
772
  }
716
773
  publicSimpleSearch(e, t = 10) {
@@ -722,7 +779,7 @@ var st = /* @__PURE__ */ function(e) {
722
779
  });
723
780
  });
724
781
  }
725
- }, Xt = class extends e {
782
+ }, en = class extends e {
726
783
  getProductData(e, t = !1) {
727
784
  return this.get(`/internal/catalog/products/${e}`, { withPriceCoefficients: t }, (e) => new R(e.data));
728
785
  }
@@ -730,12 +787,12 @@ var st = /* @__PURE__ */ function(e) {
730
787
  return this.get(`/public/catalog/products/${e}`, {}, (e) => new R(e.data));
731
788
  }
732
789
  getProductPriceCoefficients(e) {
733
- return this.get(`/internal/catalog/products/${e}/coefficients`, {}, (e) => j(e.data, (e) => new gt(e)));
790
+ return this.get(`/internal/catalog/products/${e}/coefficients`, {}, (e) => b(e.data, (e) => new bt(e)));
734
791
  }
735
792
  getNewProducts(e, t, n = !0) {
736
- let r = v().config.dateFormats.api;
793
+ let r = _().config.dateFormats.api;
737
794
  return this.getTypedPaginated(R, "/internal/catalog/products/new", void 0, void 0, t, {
738
- period: { from: C(e, r) },
795
+ period: { from: T(e, r) },
739
796
  withPriceCoefficients: n
740
797
  });
741
798
  }
@@ -748,9 +805,9 @@ var st = /* @__PURE__ */ function(e) {
748
805
  });
749
806
  });
750
807
  }
751
- }, Zt = class extends u {
808
+ }, tn = class extends l {
752
809
  getRootCategoriesList(e, t = !1) {
753
- return this.getTypedList(At, "/internal/catalog/categories", {
810
+ return this.getTypedList(Pt, "/internal/catalog/categories", {
754
811
  clientId: e,
755
812
  showHidden: t
756
813
  });
@@ -760,16 +817,16 @@ var st = /* @__PURE__ */ function(e) {
760
817
  clientId: e,
761
818
  showHidden: n,
762
819
  withNestedCategories: r
763
- }, (e) => new At(e.data));
820
+ }, (e) => new Pt(e.data));
764
821
  }
765
822
  getCategoryProductsList(e, t, n = !0, r = !1) {
766
823
  return this.get(`/internal/catalog/categories/${t}/products`, {
767
824
  client_id: e,
768
825
  showHidden: r,
769
826
  withPriceCoefficients: n
770
- }, (e) => j(e.data, (e) => new z(e)));
827
+ }, (e) => b(e.data, (e) => new z(e)));
771
828
  }
772
- }, Qt = class extends e {
829
+ }, nn = class extends e {
773
830
  getProductData(e, t, n = !1) {
774
831
  return this.get(`/internal/catalog/products/${e}`, {
775
832
  clientId: t,
@@ -777,14 +834,14 @@ var st = /* @__PURE__ */ function(e) {
777
834
  }, (e) => new z(e.data));
778
835
  }
779
836
  getNewProducts(e, t, n, r = !0) {
780
- let i = v().config.dateFormats.api;
837
+ let i = _().config.dateFormats.api;
781
838
  return this.getTypedPaginated(z, "/internal/catalog/products/new", void 0, void 0, n, {
782
839
  clientId: e,
783
- period: { from: C(t, i) },
840
+ period: { from: T(t, i) },
784
841
  withPriceCoefficients: r
785
842
  });
786
843
  }
787
- }, $t = class extends e {
844
+ }, rn = class extends e {
788
845
  getTemplateList(e, t, n) {
789
846
  return this.getTypedPaginated(I, "/internal/price/templates", e, t, n);
790
847
  }
@@ -801,25 +858,25 @@ var st = /* @__PURE__ */ function(e) {
801
858
  return this.delete(`/internal/price/templates/${e}`);
802
859
  }
803
860
  getProductTemplatePrices(e) {
804
- return this.getTypedList(It, `/internal/price/templates/${e}/products`);
861
+ return this.getTypedList(Bt, `/internal/price/templates/${e}/products`);
805
862
  }
806
863
  getProductTemplatePrice(e, t) {
807
- return this.get(`/internal/price/templates/${e}/products/${t}`, {}, (e) => new It(e.data));
864
+ return this.get(`/internal/price/templates/${e}/products/${t}`, {}, (e) => new Bt(e.data));
808
865
  }
809
866
  saveProductTemplatePrice(e, t, n) {
810
867
  return this.post(`/internal/price/templates/${e}/products/${t}`, {
811
868
  price_coefficient_id: n.coefficient?.id,
812
869
  increase_percent: n.value
813
- }, (e) => new It(e.data));
870
+ }, (e) => new Bt(e.data));
814
871
  }
815
872
  deleteProductTemplatePrice(e, t) {
816
873
  return this.delete(`/internal/price/templates/${e}/products/${t}`);
817
874
  }
818
875
  getCategoryTemplatePrices(e) {
819
- return this.getTypedList(Nt, `/internal/price/templates/${e}/categories`);
876
+ return this.getTypedList(Lt, `/internal/price/templates/${e}/categories`);
820
877
  }
821
878
  getCategoryTemplatePrice(e, t) {
822
- return this.get(`/internal/price/templates/${e}/categories/${t}`, {}, (e) => new Nt(e.data));
879
+ return this.get(`/internal/price/templates/${e}/categories/${t}`, {}, (e) => new Lt(e.data));
823
880
  }
824
881
  saveCategoryTemplatePrice(e, t, n, r = !1) {
825
882
  return this.request({
@@ -830,7 +887,7 @@ var st = /* @__PURE__ */ function(e) {
830
887
  increase_percent: n.value
831
888
  },
832
889
  params: r ? { recursively: !0 } : {}
833
- }, (e) => new Nt(e.data));
890
+ }, (e) => new Lt(e.data));
834
891
  }
835
892
  deleteCategoryTemplatePrice(e, t, n = !1) {
836
893
  return this.request({
@@ -842,7 +899,7 @@ var st = /* @__PURE__ */ function(e) {
842
899
  getTemplateClients(e) {
843
900
  return this.getTypedList(W, `/internal/price/templates/${e}/clients`);
844
901
  }
845
- }, en = class extends u {
902
+ }, an = class extends l {
846
903
  getRoles() {
847
904
  return this.getTypedList(q, "/internal/price/roles");
848
905
  }
@@ -859,12 +916,12 @@ var st = /* @__PURE__ */ function(e) {
859
916
  return this.delete(`/internal/price/roles/${e}`);
860
917
  }
861
918
  getCategoryRules(e) {
862
- return this.getTypedList(Vt, `/internal/price/roles/rules/categories/${e}`);
919
+ return this.getTypedList(Gt, `/internal/price/roles/rules/categories/${e}`);
863
920
  }
864
921
  updateCategoryRules(e, t) {
865
- return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => _.instanceListInitializer(Vt, e.data));
922
+ return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => g.instanceListInitializer(Gt, e.data));
866
923
  }
867
- }, tn = class extends e {
924
+ }, on = class extends e {
868
925
  getProperties(e, t, n) {
869
926
  return this.getTypedPaginated(G, "/internal/catalog/properties", e, t, n);
870
927
  }
@@ -982,18 +1039,18 @@ var st = /* @__PURE__ */ function(e) {
982
1039
  return this.post(`/internal/catalog/categories/${e}/image`, { image: t });
983
1040
  }
984
1041
  getCategoryFilters(e, t = !1) {
985
- return this.get(`/internal/catalog/categories/${e}/filters`, { recursively: t }, (e) => e.data.map((e) => new Gt(e)));
1042
+ return this.get(`/internal/catalog/categories/${e}/filters`, { recursively: t }, (e) => e.data.map((e) => new Yt(e)));
986
1043
  }
987
1044
  getCategoryFilterSettings(e) {
988
- return this.getTypedList(Ut, `/internal/catalog/categories/${e}/filter-settings`);
1045
+ return this.getTypedList(qt, `/internal/catalog/categories/${e}/filter-settings`);
989
1046
  }
990
1047
  saveCategoryFilterSetting(e, t, n) {
991
- return this.patch(`/internal/catalog/categories/${e}/filter-settings/${t}`, n, (e) => new Ut(e.data));
1048
+ return this.patch(`/internal/catalog/categories/${e}/filter-settings/${t}`, n, (e) => new qt(e.data));
992
1049
  }
993
1050
  deleteCategoryFilterSetting(e, t) {
994
1051
  return this.delete(`/internal/catalog/categories/${e}/filter-settings/${t}`);
995
1052
  }
996
- }, nn = class extends u {
1053
+ }, sn = class extends l {
997
1054
  getRootCategoriesList(e, t = !1) {
998
1055
  return this.getTypedList(H, "/internal/catalog/categories", {
999
1056
  priceTemplateId: e,
@@ -1012,23 +1069,23 @@ var st = /* @__PURE__ */ function(e) {
1012
1069
  priceTemplateId: e,
1013
1070
  showHidden: r,
1014
1071
  withPriceCoefficients: n
1015
- }, (e) => j(e.data, (e) => new R(e)));
1072
+ }, (e) => b(e.data, (e) => new R(e)));
1016
1073
  }
1017
1074
  };
1018
1075
  //#endregion
1019
1076
  //#region src/catalog/methods/find-catalog-item.ts
1020
- function rn(e, t, n) {
1077
+ function cn(e, t, n) {
1021
1078
  let r;
1022
1079
  return e.some((e) => {
1023
1080
  if (e.type === n && e.id === t) return r = e, !0;
1024
1081
  if (e.type === "product") return !1;
1025
1082
  let i = e;
1026
1083
  if (i.products && i.products.length > 0) {
1027
- let e = rn(i.products, t, n);
1084
+ let e = cn(i.products, t, n);
1028
1085
  if (e) return r = e, !0;
1029
1086
  }
1030
1087
  if (i.categories && i.categories.length > 0) {
1031
- let e = rn(i.categories, t, n);
1088
+ let e = cn(i.categories, t, n);
1032
1089
  if (e) return r = e, !0;
1033
1090
  }
1034
1091
  return !1;
@@ -1036,20 +1093,20 @@ function rn(e, t, n) {
1036
1093
  }
1037
1094
  //#endregion
1038
1095
  //#region src/catalog/methods/flatten-catalog-items.ts
1039
- function an(e) {
1096
+ function ln(e) {
1040
1097
  let t = [];
1041
1098
  return e.forEach((e) => {
1042
1099
  if (t.push(e), e.type === "category") {
1043
1100
  let n = e;
1044
- n.products && n.products.length > 0 && t.push(...an(n.products)), n.categories && n.categories.length > 0 && t.push(...an(n.categories));
1101
+ n.products && n.products.length > 0 && t.push(...ln(n.products)), n.categories && n.categories.length > 0 && t.push(...ln(n.categories));
1045
1102
  }
1046
1103
  }), t;
1047
1104
  }
1048
1105
  //#endregion
1049
1106
  //#region src/clients/enums/clients-additional-data-request-type-enum.ts
1050
- var on = /* @__PURE__ */ function(e) {
1107
+ var un = /* @__PURE__ */ function(e) {
1051
1108
  return e.LastOrder = "last_order", e.Contacts = "contacts", e.PartnerGroups = "partner_groups", e.PreferredDeliveryType = "preferred_delivery_type", e.SalesDirection = "sales_direction", e.Managers = "managers", e.Curators = "curators", e;
1052
- }({}), sn = class extends d {
1109
+ }({}), dn = class extends u {
1053
1110
  bankName = "";
1054
1111
  bic = "";
1055
1112
  accountNumber = "";
@@ -1058,13 +1115,13 @@ var on = /* @__PURE__ */ function(e) {
1058
1115
  constructor(e) {
1059
1116
  super(e), e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new o(e.currency));
1060
1117
  }
1061
- }, cn = class extends mt {
1118
+ }, fn = class extends P {
1062
1119
  phone;
1063
1120
  email;
1064
1121
  constructor(e) {
1065
1122
  super(e), this.email = e?.email, this.phone = /^\d+$/.test(e?.phone ?? "") ? `+${e?.phone}` : e?.phone;
1066
1123
  }
1067
- }, J = class extends cn {
1124
+ }, J = class extends fn {
1068
1125
  isPrimary;
1069
1126
  position;
1070
1127
  notDisturb;
@@ -1072,9 +1129,9 @@ var on = /* @__PURE__ */ function(e) {
1072
1129
  constructor(e) {
1073
1130
  super(e), this.isPrimary = e?.isPrimary ?? !1, this.position = e?.position, this.notDisturb = e?.notDisturb ?? !1, this.comment = e?.comment;
1074
1131
  }
1075
- }, ln = class extends mt {
1076
- opf = oe.generatePersonItem();
1077
- partnerGroup = new h();
1132
+ }, pn = class extends P {
1133
+ opf = se.generatePersonItem();
1134
+ partnerGroup = new m();
1078
1135
  contacts = [];
1079
1136
  bankAccounts = [];
1080
1137
  comment;
@@ -1083,7 +1140,7 @@ var on = /* @__PURE__ */ function(e) {
1083
1140
  updater;
1084
1141
  constructor(e) {
1085
1142
  if (super(e), e) {
1086
- if (this.opf = new oe(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new F(e.creator) : void 0, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new h(e.partnerGroup)), e.contacts) {
1143
+ if (this.opf = new se(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new F(e.creator) : void 0, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new m(e.partnerGroup)), e.contacts) {
1087
1144
  let t = [];
1088
1145
  e.contacts.forEach((e) => {
1089
1146
  t.push(new J(e));
@@ -1092,16 +1149,16 @@ var on = /* @__PURE__ */ function(e) {
1092
1149
  if (e.bankAccounts) {
1093
1150
  let t = [];
1094
1151
  e.bankAccounts.forEach((e) => {
1095
- t.push(new sn(e));
1152
+ t.push(new dn(e));
1096
1153
  }), this.bankAccounts = t;
1097
1154
  }
1098
1155
  }
1099
1156
  }
1100
- }, un = class extends ln {
1157
+ }, mn = class extends pn {
1101
1158
  constructor(e) {
1102
1159
  super(e);
1103
1160
  }
1104
- }, dn = class extends ln {
1161
+ }, hn = class extends pn {
1105
1162
  inn = "";
1106
1163
  okpo = "";
1107
1164
  ogrn = "";
@@ -1114,34 +1171,34 @@ var on = /* @__PURE__ */ function(e) {
1114
1171
  constructor(e) {
1115
1172
  super(e), e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.ogrn = e.ogrn ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
1116
1173
  }
1117
- }, fn = class extends dn {
1174
+ }, gn = class extends hn {
1118
1175
  kpp = "";
1119
1176
  constructor(e) {
1120
1177
  super(e), e && (this.kpp = e.kpp ?? "");
1121
1178
  }
1122
- }, pn = class extends fn {
1179
+ }, _n = class extends gn {
1123
1180
  registrationCountry = new i();
1124
1181
  registrationNumber = "";
1125
1182
  taxNumber = "";
1126
1183
  constructor(e) {
1127
1184
  super(e), e && (this.registrationCountry = new i(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
1128
1185
  }
1129
- }, mn = class {
1186
+ }, vn = class {
1130
1187
  static createInstance(e) {
1131
1188
  switch (e.opf.slug) {
1132
- case m.Ic: return new dn(e);
1133
- case m.UlR: return new fn(e);
1134
- case m.UlNr: return new pn(e);
1135
- default: return new un(e);
1189
+ case p.Ic: return new hn(e);
1190
+ case p.UlR: return new gn(e);
1191
+ case p.UlNr: return new _n(e);
1192
+ default: return new mn(e);
1136
1193
  }
1137
1194
  }
1138
- }, hn = class extends p {
1195
+ }, yn = class extends f {
1139
1196
  city;
1140
1197
  isActive;
1141
1198
  constructor(e) {
1142
1199
  super(e), this.city = e?.city ? new n(e.city) : void 0, this.isActive = e?.isActive ?? !1;
1143
1200
  }
1144
- }, Y = class extends mt {
1201
+ }, Y = class extends P {
1145
1202
  address = "";
1146
1203
  coordinates;
1147
1204
  contacts;
@@ -1150,9 +1207,9 @@ var on = /* @__PURE__ */ function(e) {
1150
1207
  isOneTime;
1151
1208
  isTransportCompanyAddress;
1152
1209
  constructor(e) {
1153
- super(e), this.address = e?.address ?? "", this.coordinates = new ne(e?.coordinates), this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1210
+ super(e), this.address = e?.address ?? "", this.coordinates = new re(e?.coordinates), this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1154
1211
  }
1155
- }, gn = class extends U {
1212
+ }, bn = class extends U {
1156
1213
  contragents;
1157
1214
  partnerGroups;
1158
1215
  contacts;
@@ -1164,9 +1221,9 @@ var on = /* @__PURE__ */ function(e) {
1164
1221
  preferredWarehouse;
1165
1222
  extraData;
1166
1223
  constructor(e) {
1167
- super(e), this.contragents = e?.contragents?.map((e) => mn.createInstance(e)) ?? [], this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)) ?? [], this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.deliveryAddresses = e?.deliveryAddresses?.map((e) => new Y(e)) ?? [], this.channelPrimaryInterest = new t(e?.channelPrimaryInterest), this.sourcePrimaryInterest = new he(e?.sourcePrimaryInterest), this.preferredDeliveryType = new c(e?.preferredDeliveryType), this.primaryDemand = e?.primaryDemand, this.preferredWarehouse = e?.preferredWarehouse ? new be(e.preferredWarehouse) : void 0, this.extraData = e?.extraData ?? {};
1224
+ super(e), this.contragents = e?.contragents?.map((e) => vn.createInstance(e)) ?? [], this.partnerGroups = e?.partnerGroups?.map((e) => new m(e)) ?? [], this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.deliveryAddresses = e?.deliveryAddresses?.map((e) => new Y(e)) ?? [], this.channelPrimaryInterest = new t(e?.channelPrimaryInterest), this.sourcePrimaryInterest = new ge(e?.sourcePrimaryInterest), this.preferredDeliveryType = new c(e?.preferredDeliveryType), this.primaryDemand = e?.primaryDemand, this.preferredWarehouse = e?.preferredWarehouse ? new xe(e.preferredWarehouse) : void 0, this.extraData = e?.extraData ?? {};
1168
1225
  }
1169
- }, _n = class extends N {
1226
+ }, xn = class extends j {
1170
1227
  id;
1171
1228
  guid;
1172
1229
  name;
@@ -1178,8 +1235,8 @@ var on = /* @__PURE__ */ function(e) {
1178
1235
  phone;
1179
1236
  email;
1180
1237
  isActive;
1181
- createdAt = new P();
1182
- lastLoginDate = new P();
1238
+ createdAt = new N();
1239
+ lastLoginDate = new N();
1183
1240
  lastLoginDateHasOrder;
1184
1241
  managers;
1185
1242
  includeSubordinateManagers;
@@ -1192,13 +1249,13 @@ var on = /* @__PURE__ */ function(e) {
1192
1249
  partnerGroups;
1193
1250
  contact;
1194
1251
  lastOrder;
1195
- noOrdersPeriod = new P();
1252
+ noOrdersPeriod = new N();
1196
1253
  constructor(e) {
1197
- super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new n(e)), this.region = new fe(e?.region), this.country = new i(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new P(e?.createdAt), this.lastLoginDate = new P(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new f(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Pt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.contragentInn = e?.contragentInn, this.contragentType = new oe(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new c(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)), this.contact = new cn(e?.contact), this.lastOrder = {
1198
- createdAt: new P(e?.lastOrder?.createdAt),
1254
+ super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new n(e)), this.region = new pe(e?.region), this.country = new i(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new N(e?.createdAt), this.lastLoginDate = new N(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new d(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Rt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.contragentInn = e?.contragentInn, this.contragentType = new se(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new c(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new m(e)), this.contact = new fn(e?.contact), this.lastOrder = {
1255
+ createdAt: new N(e?.lastOrder?.createdAt),
1199
1256
  creator: e?.lastOrder?.creator,
1200
1257
  isApproved: e?.lastOrder?.isApproved
1201
- }, this.noOrdersPeriod = new P(e?.noOrdersPeriod);
1258
+ }, this.noOrdersPeriod = new N(e?.noOrdersPeriod);
1202
1259
  }
1203
1260
  resetFilterValue(e) {
1204
1261
  switch (e) {
@@ -1206,7 +1263,7 @@ var on = /* @__PURE__ */ function(e) {
1206
1263
  this.cities = [];
1207
1264
  break;
1208
1265
  case "region":
1209
- this.region = new fe();
1266
+ this.region = new pe();
1210
1267
  break;
1211
1268
  case "isActive":
1212
1269
  this.isActive = !0;
@@ -1233,7 +1290,7 @@ var on = /* @__PURE__ */ function(e) {
1233
1290
  this.salesDirections = [];
1234
1291
  break;
1235
1292
  case "contragentType":
1236
- this.contragentType = new oe();
1293
+ this.contragentType = new se();
1237
1294
  break;
1238
1295
  case "preferredDeliveryType":
1239
1296
  this.preferredDeliveryType = new c();
@@ -1242,7 +1299,7 @@ var on = /* @__PURE__ */ function(e) {
1242
1299
  this.partnerGroups = [];
1243
1300
  break;
1244
1301
  case "contact":
1245
- this.contact = new cn();
1302
+ this.contact = new fn();
1246
1303
  break;
1247
1304
  default: this[e] = void 0;
1248
1305
  }
@@ -1252,12 +1309,12 @@ var on = /* @__PURE__ */ function(e) {
1252
1309
  let e = super.asClearRaw();
1253
1310
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.lastLoginDate?.from && !e?.lastLoginDate?.to && delete e.lastLoginDate, !e?.noOrdersPeriod?.from && !e?.noOrdersPeriod?.to && delete e.noOrdersPeriod, e;
1254
1311
  }
1255
- }, vn = class extends M {
1312
+ }, Sn = class extends M {
1256
1313
  creator;
1257
1314
  constructor(e) {
1258
1315
  super(e), this.creator = new F(e?.creator);
1259
1316
  }
1260
- }, yn = class extends p {
1317
+ }, Cn = class extends f {
1261
1318
  contacts = [];
1262
1319
  preferredDeliveryType;
1263
1320
  partnerGroups = [];
@@ -1266,23 +1323,23 @@ var on = /* @__PURE__ */ function(e) {
1266
1323
  managers;
1267
1324
  curators;
1268
1325
  constructor(e) {
1269
- super(e), this.contacts = e.contacts?.map((e) => new J(e)) ?? void 0, this.lastOrder = e.lastOrder ? new vn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new h(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new c(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new g(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new re(e)) ?? void 0, this.curators = e.curators?.map((e) => new Pt(e)) ?? void 0;
1326
+ super(e), this.contacts = e.contacts?.map((e) => new J(e)) ?? void 0, this.lastOrder = e.lastOrder ? new Sn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new m(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new c(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new h(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new ie(e)) ?? void 0, this.curators = e.curators?.map((e) => new Rt(e)) ?? void 0;
1270
1327
  }
1271
- }, bn = class extends d {
1328
+ }, wn = class extends u {
1272
1329
  isPrimary;
1273
1330
  constructor(e) {
1274
1331
  super(e), this.isPrimary = e.isPrimary;
1275
1332
  }
1276
- }, xn = class extends J {
1333
+ }, Tn = class extends J {
1277
1334
  relations = {
1278
1335
  clients: [],
1279
1336
  contragents: [],
1280
1337
  addresses: []
1281
1338
  };
1282
1339
  constructor(e) {
1283
- super(e), e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((e) => new bn(e))), e.relations.clients && (this.relations.clients = e.relations.clients.map((e) => new bn(e))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((e) => new bn(e))));
1340
+ super(e), e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((e) => new wn(e))), e.relations.clients && (this.relations.clients = e.relations.clients.map((e) => new wn(e))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((e) => new wn(e))));
1284
1341
  }
1285
- }, Sn = class t extends e {
1342
+ }, En = class t extends e {
1286
1343
  static transformClientDataToRequest(e) {
1287
1344
  return {
1288
1345
  name: e.name,
@@ -1301,7 +1358,7 @@ var on = /* @__PURE__ */ function(e) {
1301
1358
  static transformContragentClientDataToRequest(e) {
1302
1359
  let t, n = e, r = e, i = e;
1303
1360
  switch (e.opf.slug) {
1304
- case m.Ic:
1361
+ case p.Ic:
1305
1362
  t = {
1306
1363
  opf: n.opf.slug,
1307
1364
  name: n.name,
@@ -1319,7 +1376,7 @@ var on = /* @__PURE__ */ function(e) {
1319
1376
  actual_address: n.actualAddress
1320
1377
  };
1321
1378
  break;
1322
- case m.UlR:
1379
+ case p.UlR:
1323
1380
  t = {
1324
1381
  opf: r.opf.slug,
1325
1382
  name: r.name,
@@ -1338,7 +1395,7 @@ var on = /* @__PURE__ */ function(e) {
1338
1395
  actual_address: r.actualAddress
1339
1396
  };
1340
1397
  break;
1341
- case m.UlNr:
1398
+ case p.UlNr:
1342
1399
  t = {
1343
1400
  opf: i.opf.slug,
1344
1401
  name: i.name,
@@ -1391,7 +1448,7 @@ var on = /* @__PURE__ */ function(e) {
1391
1448
  };
1392
1449
  }
1393
1450
  getClient(e) {
1394
- return this.get(`/internal/clients/${e}`, {}, (e) => new gn(e.data));
1451
+ return this.get(`/internal/clients/${e}`, {}, (e) => new bn(e.data));
1395
1452
  }
1396
1453
  getClientsList(e, t, n, r, i) {
1397
1454
  return this.getTypedPaginated(U, "/internal/clients", e, t, n, r, void 0, i);
@@ -1405,7 +1462,7 @@ var on = /* @__PURE__ */ function(e) {
1405
1462
  groups: [],
1406
1463
  filters: [{
1407
1464
  field: "phone",
1408
- op: te.Contains,
1465
+ op: ne.Contains,
1409
1466
  value: e
1410
1467
  }]
1411
1468
  });
@@ -1415,13 +1472,13 @@ var on = /* @__PURE__ */ function(e) {
1415
1472
  return this.post("/internal/clients/additional-data", {
1416
1473
  clients: n,
1417
1474
  requested_data_types: t
1418
- }, (e) => _.instanceListInitializer(yn, e.data));
1475
+ }, (e) => g.instanceListInitializer(Cn, e.data));
1419
1476
  }
1420
1477
  getAllClientContacts(e) {
1421
- return this.getTypedList(xn, `/internal/clients/${e}/contacts/all`);
1478
+ return this.getTypedList(Tn, `/internal/clients/${e}/contacts/all`);
1422
1479
  }
1423
1480
  createClientCommonData(e, n = {}) {
1424
- return this.post("/internal/clients", t.transformClientDataToRequest(e), (e) => new gn(e.data), n);
1481
+ return this.post("/internal/clients", t.transformClientDataToRequest(e), (e) => new bn(e.data), n);
1425
1482
  }
1426
1483
  updateClientCommonData(e, n = {}) {
1427
1484
  return this.patch(`/internal/clients/${e.id}`, t.transformClientDataToRequest(e), void 0, n);
@@ -1463,10 +1520,10 @@ var on = /* @__PURE__ */ function(e) {
1463
1520
  })) });
1464
1521
  }
1465
1522
  createContragentClientData(e, n, r = {}) {
1466
- return this.post(`/internal/clients/${e}/contragents`, t.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1523
+ return this.post(`/internal/clients/${e}/contragents`, t.transformContragentClientDataToRequest(n), (e) => vn.createInstance(e.data), r);
1467
1524
  }
1468
1525
  updateContragentClientData(e, n, r = {}) {
1469
- return this.patch(`/internal/clients/${e}/contragents/${n.id}`, t.transformContragentClientDataToRequest(n), (e) => mn.createInstance(e.data), r);
1526
+ return this.patch(`/internal/clients/${e}/contragents/${n.id}`, t.transformContragentClientDataToRequest(n), (e) => vn.createInstance(e.data), r);
1470
1527
  }
1471
1528
  deleteClientContragent(e, t) {
1472
1529
  return this.delete(`/internal/clients/${e}/contragents/${t.id}`);
@@ -1484,10 +1541,10 @@ var on = /* @__PURE__ */ function(e) {
1484
1541
  return this.delete(`/internal/clients/${e}/delivery-addresses/${t.id}`);
1485
1542
  }
1486
1543
  createContragentBankAccount(e, n, r, i = {}) {
1487
- return this.post(`/internal/clients/${e}/contragents/${n}/bank-accounts`, t.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1544
+ return this.post(`/internal/clients/${e}/contragents/${n}/bank-accounts`, t.transformClientContragentBankAccountToRequest(r), (e) => new dn(e.data), i);
1488
1545
  }
1489
1546
  updateContragentBankAccount(e, n, r, i = {}) {
1490
- return this.patch(`/internal/clients/${e}/contragents/${n}/bank-accounts/${r.id}`, t.transformClientContragentBankAccountToRequest(r), (e) => new sn(e.data), i);
1547
+ return this.patch(`/internal/clients/${e}/contragents/${n}/bank-accounts/${r.id}`, t.transformClientContragentBankAccountToRequest(r), (e) => new dn(e.data), i);
1491
1548
  }
1492
1549
  deleteContragentBankAccount(e, t, n) {
1493
1550
  return this.delete(`/internal/clients/${e}/contragents/${t}/bank-accounts/${n.id}`);
@@ -1559,7 +1616,7 @@ var on = /* @__PURE__ */ function(e) {
1559
1616
  sendClientEmailConfirmation(e) {
1560
1617
  return this.get(`/internal/clients/${e.id}/verification/email?email=${e.email}`);
1561
1618
  }
1562
- }, Cn = class extends u {
1619
+ }, Dn = class extends l {
1563
1620
  checkPhoneIsBusy(e) {
1564
1621
  return new Promise((t, n) => {
1565
1622
  this.request({
@@ -1571,16 +1628,16 @@ var on = /* @__PURE__ */ function(e) {
1571
1628
  }).catch(n);
1572
1629
  });
1573
1630
  }
1574
- }, wn = class {
1631
+ }, On = class {
1575
1632
  date;
1576
1633
  name;
1577
1634
  version;
1578
1635
  constructor(e) {
1579
- this.date = A(e?.date) ? w(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1636
+ this.date = y(e?.date) ? E(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1580
1637
  }
1581
- }, Tn = /* @__PURE__ */ function(e) {
1638
+ }, kn = /* @__PURE__ */ function(e) {
1582
1639
  return e.Kozyrek = "kozyrek", e.Mosquitto = "mosquitto", e.Strip = "strip", e.MetalForDoors = "metal_for_doors", e.Sandwich = "sandwich", e.SandwichM2 = "sandwich_m2", e;
1583
- }({}), En = class extends u {
1640
+ }({}), An = class extends l {
1584
1641
  getConfiguratorSettings(e, t) {
1585
1642
  return this.get(`internal/catalog/categories/${e.id}/configurators/${e.properties?.configurator}/settings?client_id=${t}`);
1586
1643
  }
@@ -1606,13 +1663,13 @@ var on = /* @__PURE__ */ function(e) {
1606
1663
  ...n
1607
1664
  });
1608
1665
  }
1609
- }, Dn = class {
1666
+ }, jn = class {
1610
1667
  page = 1;
1611
1668
  pageSize = 50;
1612
1669
  constructor(e) {
1613
1670
  this.page = e?.page ?? 1, this.pageSize = e?.pageSize ?? 50;
1614
1671
  }
1615
- }, On = class extends Dn {
1672
+ }, Mn = class extends jn {
1616
1673
  itemCount = 0;
1617
1674
  pageCount = 1;
1618
1675
  pageSlot = 5;
@@ -1629,7 +1686,7 @@ var on = /* @__PURE__ */ function(e) {
1629
1686
  100
1630
1687
  ], this.showSizePicker = e?.showSizePicker ?? !0;
1631
1688
  }
1632
- }, kn = class {
1689
+ }, Nn = class {
1633
1690
  field;
1634
1691
  direction;
1635
1692
  constructor(e) {
@@ -1654,47 +1711,47 @@ var on = /* @__PURE__ */ function(e) {
1654
1711
  return new Date(e.getFullYear(), e.getMonth() < 6 ? 0 : 6, 1);
1655
1712
  }
1656
1713
  static endOfHalfYear(e) {
1657
- return S(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1714
+ return w(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1658
1715
  }
1659
1716
  static addHalfYears(e, t) {
1660
- return b(e, t * 6);
1717
+ return S(e, t * 6);
1661
1718
  }
1662
1719
  static intervalTillSameDate(e, t, n) {
1663
- let r = Ee(E(n), E(e)), i = E(b(t, r)), a = Math.min(Ne(n), Pe(i));
1720
+ let r = Ue(O(n), O(e)), i = O(S(t, r)), a = Math.min(Xe(n), Ze(i));
1664
1721
  return {
1665
- from: T(t),
1666
- to: x(Fe(i, a))
1722
+ from: D(t),
1723
+ to: C(Qe(i, a))
1667
1724
  };
1668
1725
  }
1669
1726
  static weekTillSameWeekday(e, t) {
1670
- let n = D(Ce(e, t), { weekStartsOn: 1 }), r = Te(e, D(e, { weekStartsOn: 1 }));
1727
+ let n = k(Be(e, t), { weekStartsOn: 1 }), r = He(e, k(e, { weekStartsOn: 1 }));
1671
1728
  return {
1672
1729
  from: n,
1673
- to: x(y(n, r))
1730
+ to: C(x(n, r))
1674
1731
  };
1675
1732
  }
1676
1733
  static decadeTillSameDayNumber(t, n) {
1677
- let [r] = e.shiftedDecadeBounds(t, 0), i = Te(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = Te(o, a) + 1;
1734
+ let [r] = e.shiftedDecadeBounds(t, 0), i = He(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = He(o, a) + 1;
1678
1735
  return {
1679
1736
  from: a,
1680
- to: x(y(a, Math.min(i, s) - 1))
1737
+ to: C(x(a, Math.min(i, s) - 1))
1681
1738
  };
1682
1739
  }
1683
1740
  static shiftedDecadeBounds(e, t) {
1684
- let n = Ne(e), r = 2;
1741
+ let n = Xe(e), r = 2;
1685
1742
  n <= 10 ? r = 0 : n <= 20 && (r = 1);
1686
- let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = E(b(e, a)), c = y(s, o * 10);
1687
- return [c, o === 2 ? S(s) : x(y(c, 9))];
1743
+ let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = O(S(e, a)), c = x(s, o * 10);
1744
+ return [c, o === 2 ? w(s) : C(x(c, 9))];
1688
1745
  }
1689
1746
  };
1690
1747
  //#endregion
1691
1748
  //#region src/date-time/helpers/days-ago-iso.ts
1692
- function An(e) {
1693
- return C(Be(Le(), e), "yyyy-MM-dd");
1749
+ function Pn(e) {
1750
+ return T(rt(et(), e), "yyyy-MM-dd");
1694
1751
  }
1695
1752
  //#endregion
1696
1753
  //#region src/i18n/helpers/pluralize.ts
1697
- function jn(e, t) {
1754
+ function Fn(e, t) {
1698
1755
  let n = [
1699
1756
  2,
1700
1757
  0,
@@ -1707,13 +1764,13 @@ function jn(e, t) {
1707
1764
  }
1708
1765
  //#endregion
1709
1766
  //#region src/date-time/helpers/format-relative-date.ts
1710
- function Mn(e) {
1711
- let t = w(e), n = Te(Le(), t);
1767
+ function In(e) {
1768
+ let t = E(e), n = He(et(), t);
1712
1769
  switch (!0) {
1713
1770
  case n === 0: return "Сегодня";
1714
1771
  case n === 1: return "Вчера";
1715
1772
  case n < 0: return e;
1716
- default: return `${n} ${jn(n, [
1773
+ default: return `${n} ${Fn(n, [
1717
1774
  "день",
1718
1775
  "дня",
1719
1776
  "дней"
@@ -1722,83 +1779,83 @@ function Mn(e) {
1722
1779
  }
1723
1780
  //#endregion
1724
1781
  //#region src/date-time/providers/date-time-provider.ts
1725
- var Nn = class {
1782
+ var Ln = class {
1726
1783
  static defaultDateRanges(e) {
1727
- let t = xe(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = O(e === void 0 ? n : new Date(e, 0, 1)), i = je(r);
1784
+ let t = Re(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = A(e === void 0 ? n : new Date(e, 0, 1)), i = Je(r);
1728
1785
  return {
1729
1786
  nextWorkingDay: {
1730
1787
  label: "Следующий рабочий день",
1731
- from: T(t),
1732
- to: x(t)
1788
+ from: D(t),
1789
+ to: C(t)
1733
1790
  },
1734
1791
  today: {
1735
1792
  label: "Сегодня",
1736
- from: Le(),
1737
- to: Oe()
1793
+ from: et(),
1794
+ to: Ge()
1738
1795
  },
1739
1796
  yesterday: {
1740
1797
  label: "Вчера",
1741
- from: ze(),
1742
- to: Me()
1798
+ from: nt(),
1799
+ to: Ye()
1743
1800
  },
1744
1801
  tomorrow: {
1745
1802
  label: "Завтра",
1746
- from: Re(),
1747
- to: ke()
1803
+ from: tt(),
1804
+ to: Ke()
1748
1805
  },
1749
1806
  currentWeek: {
1750
1807
  label: "Неделя",
1751
- from: D(n, { weekStartsOn: 1 }),
1752
- to: Ae(n, { weekStartsOn: 1 })
1808
+ from: k(n, { weekStartsOn: 1 }),
1809
+ to: qe(n, { weekStartsOn: 1 })
1753
1810
  },
1754
1811
  currentMonth: {
1755
1812
  label: "Месяц",
1756
- from: E(n),
1757
- to: S(n)
1813
+ from: O(n),
1814
+ to: w(n)
1758
1815
  },
1759
1816
  oneMonth: {
1760
1817
  label: "1 месяц",
1761
1818
  from: r,
1762
- to: S(r)
1819
+ to: w(r)
1763
1820
  },
1764
1821
  threeMonths: {
1765
1822
  label: "3 месяца",
1766
1823
  from: r,
1767
- to: S(b(r, 2))
1824
+ to: w(S(r, 2))
1768
1825
  },
1769
1826
  nineMonths: {
1770
1827
  label: "9 месяцев",
1771
1828
  from: r,
1772
- to: S(b(r, 8))
1829
+ to: w(S(r, 8))
1773
1830
  },
1774
1831
  firstQuarter: {
1775
1832
  label: "I квартал",
1776
1833
  from: r,
1777
- to: S(b(r, 2))
1834
+ to: w(S(r, 2))
1778
1835
  },
1779
1836
  secondQuarter: {
1780
1837
  label: "II квартал",
1781
- from: b(r, 3),
1782
- to: S(b(r, 5))
1838
+ from: S(r, 3),
1839
+ to: w(S(r, 5))
1783
1840
  },
1784
1841
  thirdQuarter: {
1785
1842
  label: "III квартал",
1786
- from: b(r, 6),
1787
- to: S(b(r, 8))
1843
+ from: S(r, 6),
1844
+ to: w(S(r, 8))
1788
1845
  },
1789
1846
  fourthQuarter: {
1790
1847
  label: "IV квартал",
1791
- from: b(r, 9),
1792
- to: S(b(r, 11))
1848
+ from: S(r, 9),
1849
+ to: w(S(r, 11))
1793
1850
  },
1794
1851
  firstHalfYear: {
1795
1852
  label: "I полугодие",
1796
1853
  from: r,
1797
- to: S(b(r, 5))
1854
+ to: w(S(r, 5))
1798
1855
  },
1799
1856
  secondHalfYear: {
1800
1857
  label: "II полугодие",
1801
- from: b(r, 6),
1858
+ from: S(r, 6),
1802
1859
  to: i
1803
1860
  },
1804
1861
  currentYear: {
@@ -1809,13 +1866,13 @@ var Nn = class {
1809
1866
  };
1810
1867
  }
1811
1868
  static standardPeriods(e = /* @__PURE__ */ new Date()) {
1812
- let t = { weekStartsOn: 1 }, n = T(e), r = x(e), i = X.decadeInterval(e), a = E(e), o = Ie(e), s = X.startOfHalfYear(e), c = O(e), l = X.addHalfYears(e, -1), ee = X.addHalfYears(e, 1);
1869
+ let t = { weekStartsOn: 1 }, n = D(e), r = C(e), i = X.decadeInterval(e), a = O(e), o = $e(e), s = X.startOfHalfYear(e), c = A(e), ee = X.addHalfYears(e, -1), te = X.addHalfYears(e, 1);
1813
1870
  return {
1814
1871
  yesterday: {
1815
1872
  label: "Вчера",
1816
1873
  group: "day",
1817
- from: T(Be(e, 1)),
1818
- to: x(Be(e, 1))
1874
+ from: D(rt(e, 1)),
1875
+ to: C(rt(e, 1))
1819
1876
  },
1820
1877
  today: {
1821
1878
  label: "Сегодня",
@@ -1826,26 +1883,26 @@ var Nn = class {
1826
1883
  tomorrow: {
1827
1884
  label: "Завтра",
1828
1885
  group: "day",
1829
- from: T(y(e, 1)),
1830
- to: x(y(e, 1))
1886
+ from: D(x(e, 1)),
1887
+ to: C(x(e, 1))
1831
1888
  },
1832
1889
  lastWeek: {
1833
1890
  label: "Прошлая неделя",
1834
1891
  group: "week",
1835
- from: D(Ue(e, 1), t),
1836
- to: Ae(Ue(e, 1), t)
1892
+ from: k(ot(e, 1), t),
1893
+ to: qe(ot(e, 1), t)
1837
1894
  },
1838
1895
  thisWeek: {
1839
1896
  label: "Эта неделя",
1840
1897
  group: "week",
1841
- from: D(e, t),
1842
- to: Ae(e, t)
1898
+ from: k(e, t),
1899
+ to: qe(e, t)
1843
1900
  },
1844
1901
  nextWeek: {
1845
1902
  label: "Следующая неделя",
1846
1903
  group: "week",
1847
- from: D(Ce(e, 1), t),
1848
- to: Ae(Ce(e, 1), t)
1904
+ from: k(Be(e, 1), t),
1905
+ to: qe(Be(e, 1), t)
1849
1906
  },
1850
1907
  lastTenDays: {
1851
1908
  label: "Прошлая декада",
@@ -1865,44 +1922,44 @@ var Nn = class {
1865
1922
  lastMonth: {
1866
1923
  label: "Прошлый месяц",
1867
1924
  group: "month",
1868
- from: E(Ve(e, 1)),
1869
- to: S(Ve(e, 1))
1925
+ from: O(it(e, 1)),
1926
+ to: w(it(e, 1))
1870
1927
  },
1871
1928
  thisMonth: {
1872
1929
  label: "Этот месяц",
1873
1930
  group: "month",
1874
1931
  from: a,
1875
- to: S(e)
1932
+ to: w(e)
1876
1933
  },
1877
1934
  nextMonth: {
1878
1935
  label: "Следующий месяц",
1879
1936
  group: "month",
1880
- from: E(b(e, 1)),
1881
- to: S(b(e, 1))
1937
+ from: O(S(e, 1)),
1938
+ to: w(S(e, 1))
1882
1939
  },
1883
1940
  lastQuarter: {
1884
1941
  label: "Прошлый квартал",
1885
1942
  group: "quarter",
1886
- from: Ie(He(e, 1)),
1887
- to: De(He(e, 1))
1943
+ from: $e(at(e, 1)),
1944
+ to: We(at(e, 1))
1888
1945
  },
1889
1946
  thisQuarter: {
1890
1947
  label: "Этот квартал",
1891
1948
  group: "quarter",
1892
1949
  from: o,
1893
- to: De(e)
1950
+ to: We(e)
1894
1951
  },
1895
1952
  nextQuarter: {
1896
1953
  label: "Следующий квартал",
1897
1954
  group: "quarter",
1898
- from: Ie(Se(e, 1)),
1899
- to: De(Se(e, 1))
1955
+ from: $e(ze(e, 1)),
1956
+ to: We(ze(e, 1))
1900
1957
  },
1901
1958
  lastHalfYear: {
1902
1959
  label: "Прошлое полугодие",
1903
1960
  group: "halfYear",
1904
- from: X.startOfHalfYear(l),
1905
- to: X.endOfHalfYear(l)
1961
+ from: X.startOfHalfYear(ee),
1962
+ to: X.endOfHalfYear(ee)
1906
1963
  },
1907
1964
  thisHalfYear: {
1908
1965
  label: "Это полугодие",
@@ -1913,32 +1970,32 @@ var Nn = class {
1913
1970
  nextHalfYear: {
1914
1971
  label: "Следующее полугодие",
1915
1972
  group: "halfYear",
1916
- from: X.startOfHalfYear(ee),
1917
- to: X.endOfHalfYear(ee)
1973
+ from: X.startOfHalfYear(te),
1974
+ to: X.endOfHalfYear(te)
1918
1975
  },
1919
1976
  lastYear: {
1920
1977
  label: "Прошлый год",
1921
1978
  group: "year",
1922
- from: O(We(e, 1)),
1923
- to: je(We(e, 1))
1979
+ from: A(st(e, 1)),
1980
+ to: Je(st(e, 1))
1924
1981
  },
1925
1982
  thisYear: {
1926
1983
  label: "Этот год",
1927
1984
  group: "year",
1928
1985
  from: c,
1929
- to: je(e)
1986
+ to: Je(e)
1930
1987
  },
1931
1988
  nextYear: {
1932
1989
  label: "Следующий год",
1933
1990
  group: "year",
1934
- from: O(we(e, 1)),
1935
- to: je(we(e, 1))
1991
+ from: A(Ve(e, 1)),
1992
+ to: Je(Ve(e, 1))
1936
1993
  },
1937
1994
  fromBeginningOfThisWeek: {
1938
1995
  label: "С начала этой недели",
1939
1996
  group: "other",
1940
1997
  section: "fromBeginning",
1941
- from: D(e, t),
1998
+ from: k(e, t),
1942
1999
  to: r
1943
2000
  },
1944
2001
  fromBeginningOfThisTenDays: {
@@ -1981,7 +2038,7 @@ var Nn = class {
1981
2038
  group: "other",
1982
2039
  section: "tillEnd",
1983
2040
  from: n,
1984
- to: Ae(e, t)
2041
+ to: qe(e, t)
1985
2042
  },
1986
2043
  tillEndOfThisTenDays: {
1987
2044
  label: "До конца этой декады",
@@ -1995,14 +2052,14 @@ var Nn = class {
1995
2052
  group: "other",
1996
2053
  section: "tillEnd",
1997
2054
  from: n,
1998
- to: S(e)
2055
+ to: w(e)
1999
2056
  },
2000
2057
  tillEndOfThisQuarter: {
2001
2058
  label: "До конца этого квартала",
2002
2059
  group: "other",
2003
2060
  section: "tillEnd",
2004
2061
  from: n,
2005
- to: De(e)
2062
+ to: We(e)
2006
2063
  },
2007
2064
  tillEndOfThisHalfYear: {
2008
2065
  label: "До конца этого полугодия",
@@ -2016,7 +2073,7 @@ var Nn = class {
2016
2073
  group: "other",
2017
2074
  section: "tillEnd",
2018
2075
  from: n,
2019
- to: je(e)
2076
+ to: Je(e)
2020
2077
  },
2021
2078
  lastWeekTillSameWeekDay: {
2022
2079
  label: "Прошлая неделя, до такого же дня недели",
@@ -2034,25 +2091,25 @@ var Nn = class {
2034
2091
  label: "Прошлый месяц, до такой же даты",
2035
2092
  group: "other",
2036
2093
  section: "lastTillSame",
2037
- ...X.intervalTillSameDate(a, E(Ve(e, 1)), e)
2094
+ ...X.intervalTillSameDate(a, O(it(e, 1)), e)
2038
2095
  },
2039
2096
  lastQuarterTillSameDate: {
2040
2097
  label: "Прошлый квартал, до такой же даты",
2041
2098
  group: "other",
2042
2099
  section: "lastTillSame",
2043
- ...X.intervalTillSameDate(o, Ie(He(e, 1)), e)
2100
+ ...X.intervalTillSameDate(o, $e(at(e, 1)), e)
2044
2101
  },
2045
2102
  lastHalfYearTillSameDate: {
2046
2103
  label: "Прошлое полугодие, до такой же даты",
2047
2104
  group: "other",
2048
2105
  section: "lastTillSame",
2049
- ...X.intervalTillSameDate(s, X.startOfHalfYear(l), e)
2106
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(ee), e)
2050
2107
  },
2051
2108
  lastYearTillSameDate: {
2052
2109
  label: "Прошлый год, до такой же даты",
2053
2110
  group: "other",
2054
2111
  section: "lastTillSame",
2055
- ...X.intervalTillSameDate(c, O(We(e, 1)), e)
2112
+ ...X.intervalTillSameDate(c, A(st(e, 1)), e)
2056
2113
  },
2057
2114
  nextWeekTillSameWeekDay: {
2058
2115
  label: "Следующая неделя, до такого же дня недели",
@@ -2070,31 +2127,31 @@ var Nn = class {
2070
2127
  label: "Следующий месяц, до такой же даты",
2071
2128
  group: "other",
2072
2129
  section: "nextTillSame",
2073
- ...X.intervalTillSameDate(a, E(b(e, 1)), e)
2130
+ ...X.intervalTillSameDate(a, O(S(e, 1)), e)
2074
2131
  },
2075
2132
  nextQuarterTillSameDate: {
2076
2133
  label: "Следующий квартал, до такой же даты",
2077
2134
  group: "other",
2078
2135
  section: "nextTillSame",
2079
- ...X.intervalTillSameDate(o, Ie(Se(e, 1)), e)
2136
+ ...X.intervalTillSameDate(o, $e(ze(e, 1)), e)
2080
2137
  },
2081
2138
  nextHalfYearTillSameDate: {
2082
2139
  label: "Следующее полугодие, до такой же даты",
2083
2140
  group: "other",
2084
2141
  section: "nextTillSame",
2085
- ...X.intervalTillSameDate(s, X.startOfHalfYear(ee), e)
2142
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(te), e)
2086
2143
  },
2087
2144
  nextYearTillSameDate: {
2088
2145
  label: "Следующий год, до такой же даты",
2089
2146
  group: "other",
2090
2147
  section: "nextTillSame",
2091
- ...X.intervalTillSameDate(c, O(we(e, 1)), e)
2148
+ ...X.intervalTillSameDate(c, A(Ve(e, 1)), e)
2092
2149
  },
2093
2150
  last7Days: {
2094
2151
  label: "Последние 7 дней",
2095
2152
  group: "other",
2096
2153
  section: "rollingDays",
2097
- from: T(Be(e, 6)),
2154
+ from: D(rt(e, 6)),
2098
2155
  to: r
2099
2156
  },
2100
2157
  next7Days: {
@@ -2102,11 +2159,11 @@ var Nn = class {
2102
2159
  group: "other",
2103
2160
  section: "rollingDays",
2104
2161
  from: n,
2105
- to: x(y(e, 6))
2162
+ to: C(x(e, 6))
2106
2163
  }
2107
2164
  };
2108
2165
  }
2109
- }, Pn = [
2166
+ }, Rn = [
2110
2167
  {
2111
2168
  key: "day",
2112
2169
  label: "День"
@@ -2139,7 +2196,7 @@ var Nn = class {
2139
2196
  key: "other",
2140
2197
  label: "Прочее"
2141
2198
  }
2142
- ], Fn = [
2199
+ ], zn = [
2143
2200
  {
2144
2201
  key: "fromBeginning",
2145
2202
  label: "С начала периода"
@@ -2160,7 +2217,7 @@ var Nn = class {
2160
2217
  key: "rollingDays",
2161
2218
  label: "7 дней"
2162
2219
  }
2163
- ], In = class extends hn {}, Ln = class {
2220
+ ], Bn = class extends yn {}, Vn = class {
2164
2221
  salesDirections;
2165
2222
  partnerGroups;
2166
2223
  managers;
@@ -2171,10 +2228,10 @@ var Nn = class {
2171
2228
  lastLoginDate;
2172
2229
  lastOrderDate;
2173
2230
  constructor(e) {
2174
- this.salesDirections = j(e?.salesDirections ?? [], (e) => new g(e)), this.partnerGroups = j(e?.partnerGroups ?? [], (e) => new h(e)), this.managers = j(e?.managers ?? [], (e) => new F(e)), this.additionalClients = j(e?.additionalClients ?? [], (e) => new In(e)), this.fixedClients = j(e?.fixedClients ?? [], (e) => new In(e)), this.regions = j(e?.regions ?? [], (e) => new fe(e)), this.cities = j(e?.cities ?? [], (e) => new n(e)), this.lastLoginDate = new P(e?.lastLoginDate), this.lastOrderDate = new P(e?.lastOrderDate);
2231
+ this.salesDirections = b(e?.salesDirections ?? [], (e) => new h(e)), this.partnerGroups = b(e?.partnerGroups ?? [], (e) => new m(e)), this.managers = b(e?.managers ?? [], (e) => new F(e)), this.additionalClients = b(e?.additionalClients ?? [], (e) => new Bn(e)), this.fixedClients = b(e?.fixedClients ?? [], (e) => new Bn(e)), this.regions = b(e?.regions ?? [], (e) => new pe(e)), this.cities = b(e?.cities ?? [], (e) => new n(e)), this.lastLoginDate = new N(e?.lastLoginDate), this.lastOrderDate = new N(e?.lastOrderDate);
2175
2232
  }
2176
2233
  hasClientConditions() {
2177
- return it([
2234
+ return Fe([
2178
2235
  this.salesDirections,
2179
2236
  this.partnerGroups,
2180
2237
  this.managers,
@@ -2182,33 +2239,33 @@ var Nn = class {
2182
2239
  this.fixedClients,
2183
2240
  this.regions,
2184
2241
  this.cities
2185
- ], (e) => !Ze(e)) || it([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2242
+ ], (e) => !Oe(e)) || Fe([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2186
2243
  }
2187
2244
  setPeriod(e, t) {
2188
- return this[e] = new P({
2189
- from: t?.from ? T(t.from) : null,
2190
- to: t?.to ? x(t.to) : null
2245
+ return this[e] = new N({
2246
+ from: t?.from ? D(t.from) : null,
2247
+ to: t?.to ? C(t.to) : null
2191
2248
  }), this;
2192
2249
  }
2193
2250
  toSaveData() {
2194
2251
  return {
2195
- salesDirections: j(this.salesDirections, "id"),
2196
- partnerGroups: j(this.partnerGroups, "id"),
2197
- managers: j(this.managers, "id"),
2198
- additionalClients: j(this.additionalClients, "id"),
2199
- regions: j(this.regions, "id"),
2200
- cities: j(this.cities, "id"),
2201
- lastLoginDate: new P(this.lastLoginDate),
2202
- lastOrderDate: new P(this.lastOrderDate)
2252
+ salesDirections: b(this.salesDirections, "id"),
2253
+ partnerGroups: b(this.partnerGroups, "id"),
2254
+ managers: b(this.managers, "id"),
2255
+ additionalClients: b(this.additionalClients, "id"),
2256
+ regions: b(this.regions, "id"),
2257
+ cities: b(this.cities, "id"),
2258
+ lastLoginDate: new N(this.lastLoginDate),
2259
+ lastOrderDate: new N(this.lastOrderDate)
2203
2260
  };
2204
2261
  }
2205
- }, Rn = /* @__PURE__ */ function(e) {
2262
+ }, Hn = /* @__PURE__ */ function(e) {
2206
2263
  return e.Active = "active", e.Scheduled = "scheduled", e.Completed = "completed", e;
2207
- }({}), zn = class {
2264
+ }({}), Un = class {
2208
2265
  static resolve(e, t = /* @__PURE__ */ new Date()) {
2209
- return e.deletedAt && e.deletedAt.getTime() <= t.getTime() ? Rn.Completed : e.publishedAt && e.publishedAt.getTime() > t.getTime() ? Rn.Scheduled : Rn.Active;
2266
+ return e.deletedAt && e.deletedAt.getTime() <= t.getTime() ? Hn.Completed : e.publishedAt && e.publishedAt.getTime() > t.getTime() ? Hn.Scheduled : Hn.Active;
2210
2267
  }
2211
- }, Bn = class extends ht {
2268
+ }, Wn = class extends yt {
2212
2269
  conditions;
2213
2270
  products;
2214
2271
  productCategories;
@@ -2217,10 +2274,10 @@ var Nn = class {
2217
2274
  countDiscountedProducts;
2218
2275
  countDiscountedClients;
2219
2276
  constructor(e) {
2220
- super(e), this.conditions = new Ln(e?.conditions), this.products = j(e?.products ?? [], (e) => new R(e)), this.productCategories = j(e?.productCategories ?? [], (e) => new H(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2277
+ super(e), this.conditions = new Vn(e?.conditions), this.products = b(e?.products ?? [], (e) => new R(e)), this.productCategories = b(e?.productCategories ?? [], (e) => new H(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2221
2278
  }
2222
2279
  getState(e = /* @__PURE__ */ new Date()) {
2223
- return zn.resolve(this, e);
2280
+ return Un.resolve(this, e);
2224
2281
  }
2225
2282
  assignCounters(e) {
2226
2283
  this.countDiscountedPrices = e.countDiscountedPrices, this.expectedCountDiscountedPrices = e.expectedCountDiscountedPrices, this.countDiscountedProducts = e.countDiscountedProducts, this.countDiscountedClients = e.countDiscountedClients;
@@ -2236,12 +2293,12 @@ var Nn = class {
2236
2293
  publishedAt: this.publishedAt ?? null,
2237
2294
  deletedAt: this.deletedAt ?? null,
2238
2295
  description: this.description ?? "",
2239
- products: j(this.products, "id"),
2240
- productCategories: j(this.productCategories, "id"),
2296
+ products: b(this.products, "id"),
2297
+ productCategories: b(this.productCategories, "id"),
2241
2298
  conditions: this.conditions.toSaveData()
2242
2299
  };
2243
2300
  }
2244
- }, Vn = class {
2301
+ }, Gn = class {
2245
2302
  client;
2246
2303
  additionalClientsCondition;
2247
2304
  fixedClientsCondition;
@@ -2251,12 +2308,12 @@ var Nn = class {
2251
2308
  regionsCondition;
2252
2309
  salesDirectionsCondition;
2253
2310
  constructor(e) {
2254
- this.client = new In(e?.client), this.additionalClientsCondition = e?.additionalClientsCondition ?? !1, this.fixedClientsCondition = e?.fixedClientsCondition ?? !1, this.partnerGroupsCondition = e?.partnerGroupsCondition ?? !1, this.managersCondition = e?.managersCondition ?? !1, this.citiesCondition = e?.citiesCondition ?? !1, this.regionsCondition = e?.regionsCondition ?? !1, this.salesDirectionsCondition = e?.salesDirectionsCondition ?? !1;
2311
+ this.client = new Bn(e?.client), this.additionalClientsCondition = e?.additionalClientsCondition ?? !1, this.fixedClientsCondition = e?.fixedClientsCondition ?? !1, this.partnerGroupsCondition = e?.partnerGroupsCondition ?? !1, this.managersCondition = e?.managersCondition ?? !1, this.citiesCondition = e?.citiesCondition ?? !1, this.regionsCondition = e?.regionsCondition ?? !1, this.salesDirectionsCondition = e?.salesDirectionsCondition ?? !1;
2255
2312
  }
2256
2313
  isEligible() {
2257
2314
  return this.additionalClientsCondition || this.fixedClientsCondition || this.partnerGroupsCondition || this.managersCondition || this.citiesCondition || this.regionsCondition || this.salesDirectionsCondition;
2258
2315
  }
2259
- }, Hn = class extends N {
2316
+ }, Kn = class extends j {
2260
2317
  id;
2261
2318
  name;
2262
2319
  states;
@@ -2271,7 +2328,7 @@ var Nn = class {
2271
2328
  }
2272
2329
  return this;
2273
2330
  }
2274
- }, Un = class t extends e {
2331
+ }, qn = class t extends e {
2275
2332
  static prepareSaveData(e, t) {
2276
2333
  return {
2277
2334
  ...e,
@@ -2286,32 +2343,32 @@ var Nn = class {
2286
2343
  };
2287
2344
  }
2288
2345
  getDiscountsList(e, t, n, r) {
2289
- return this.getTypedPaginated(ht, "/internal/price/discounts", e, t, n, {}, void 0, r);
2346
+ return this.getTypedPaginated(yt, "/internal/price/discounts", e, t, n, {}, void 0, r);
2290
2347
  }
2291
2348
  getDiscount(e) {
2292
- return this.get(`/internal/price/discounts/${e}`, {}, (e) => new Bn(e.data));
2349
+ return this.get(`/internal/price/discounts/${e}`, {}, (e) => new Wn(e.data));
2293
2350
  }
2294
2351
  createDiscount(e, n, r = {}) {
2295
- return this.post("/internal/price/discounts", t.prepareSaveData(e, n), (e) => new Bn(e.data), r);
2352
+ return this.post("/internal/price/discounts", t.prepareSaveData(e, n), (e) => new Wn(e.data), r);
2296
2353
  }
2297
2354
  updateDiscount(e, n, r, i = {}) {
2298
- return this.patch(`/internal/price/discounts/${e}`, t.prepareSaveData(n, r), (e) => new Bn(e.data), i);
2355
+ return this.patch(`/internal/price/discounts/${e}`, t.prepareSaveData(n, r), (e) => new Wn(e.data), i);
2299
2356
  }
2300
2357
  removeDiscount(e) {
2301
2358
  return this.delete(`/internal/price/discounts/${e}`);
2302
2359
  }
2303
2360
  getEligibleClients(e) {
2304
- return this.getTypedList(Vn, `/internal/price/discounts/${e}/clients`);
2361
+ return this.getTypedList(Gn, `/internal/price/discounts/${e}/clients`);
2305
2362
  }
2306
2363
  checkClient(e, t) {
2307
- return this.get(`/internal/price/discounts/${e}/clients/${t}/check`, {}, (e) => new Vn(e.data));
2364
+ return this.get(`/internal/price/discounts/${e}/clients/${t}/check`, {}, (e) => new Gn(e.data));
2308
2365
  }
2309
- }, Wn = class extends _e {
2366
+ }, Jn = class extends ve {
2310
2367
  showAllCosts;
2311
2368
  constructor(e) {
2312
2369
  super(e), this.showAllCosts = e?.showAllCosts;
2313
2370
  }
2314
- }, Gn = class extends N {
2371
+ }, Yn = class extends j {
2315
2372
  name;
2316
2373
  phone;
2317
2374
  email;
@@ -2328,7 +2385,7 @@ var Nn = class {
2328
2385
  }
2329
2386
  return this;
2330
2387
  }
2331
- }, Kn = class t extends e {
2388
+ }, Xn = class t extends e {
2332
2389
  static transformExternalSeoDataToRequest(e) {
2333
2390
  return {
2334
2391
  name: e.name,
@@ -2341,62 +2398,62 @@ var Nn = class {
2341
2398
  };
2342
2399
  }
2343
2400
  getExternalSeoList(e, t, n, r) {
2344
- return this.getTypedPaginated(_e, "/internal/external-seo", e, t, n, {}, void 0, r);
2401
+ return this.getTypedPaginated(ve, "/internal/external-seo", e, t, n, {}, void 0, r);
2345
2402
  }
2346
2403
  getExternalSeo(e, t = !1) {
2347
- return this.get(`/internal/external-seo/${e}`, {}, (e) => new Wn(e.data), t);
2404
+ return this.get(`/internal/external-seo/${e}`, {}, (e) => new Jn(e.data), t);
2348
2405
  }
2349
2406
  createExternalSeo(e, n = {}) {
2350
- return this.post("/internal/external-seo", t.transformExternalSeoDataToRequest(e), (e) => new Wn(e.data), n);
2407
+ return this.post("/internal/external-seo", t.transformExternalSeoDataToRequest(e), (e) => new Jn(e.data), n);
2351
2408
  }
2352
2409
  updateExternalSeo(e, n = {}) {
2353
- return this.patch(`/internal/external-seo/${e.id}`, t.transformExternalSeoDataToRequest(e), (e) => new Wn(e.data), n);
2410
+ return this.patch(`/internal/external-seo/${e.id}`, t.transformExternalSeoDataToRequest(e), (e) => new Jn(e.data), n);
2354
2411
  }
2355
2412
  deleteExternalSeo(e) {
2356
2413
  return this.delete(`/internal/external-seo/${e}`);
2357
2414
  }
2358
- }, qn = class extends p {
2415
+ }, Zn = class extends f {
2359
2416
  constructor(e) {
2360
2417
  super(e);
2361
2418
  }
2362
- }, Jn = class extends d {
2419
+ }, Qn = class extends u {
2363
2420
  question;
2364
2421
  answer;
2365
2422
  groups;
2366
2423
  constructor(e) {
2367
- super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = j(e?.groups ?? [], (e) => new qn(e));
2424
+ super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = b(e?.groups ?? [], (e) => new Zn(e));
2368
2425
  }
2369
2426
  toSaveData() {
2370
2427
  return {
2371
2428
  question: this.question,
2372
2429
  answer: this.answer,
2373
- groups: j(this.groups, "id")
2430
+ groups: b(this.groups, "id")
2374
2431
  };
2375
2432
  }
2376
- }, Yn = class extends e {
2433
+ }, $n = class extends e {
2377
2434
  getFaqList(e, t) {
2378
- return this.getTypedPaginated(Jn, "/internal/faq", void 0, void 0, t, k(e) ? {} : { group: e });
2435
+ return this.getTypedPaginated(Qn, "/internal/faq", void 0, void 0, t, v(e) ? {} : { group: e });
2379
2436
  }
2380
2437
  getFaq(e) {
2381
- return this.get(`/internal/faq/${e}`, {}, (e) => new Jn(e.data));
2438
+ return this.get(`/internal/faq/${e}`, {}, (e) => new Qn(e.data));
2382
2439
  }
2383
2440
  createFaq(e, t = {}) {
2384
- return this.post("/internal/faq", e, (e) => new Jn(e.data), t);
2441
+ return this.post("/internal/faq", e, (e) => new Qn(e.data), t);
2385
2442
  }
2386
2443
  updateFaq(e, t, n = {}) {
2387
- return this.patch(`/internal/faq/${e}`, t, (e) => new Jn(e.data), n);
2444
+ return this.patch(`/internal/faq/${e}`, t, (e) => new Qn(e.data), n);
2388
2445
  }
2389
2446
  removeFaq(e) {
2390
2447
  return this.delete(`/internal/faq/${e}`);
2391
2448
  }
2392
2449
  getGroupsList() {
2393
- return this.getTypedList(qn, "/internal/faq/groups");
2450
+ return this.getTypedList(Zn, "/internal/faq/groups");
2394
2451
  }
2395
2452
  createGroup(e, t = {}) {
2396
- return this.post("/internal/faq/groups", e, (e) => new qn(e.data), t);
2453
+ return this.post("/internal/faq/groups", e, (e) => new Zn(e.data), t);
2397
2454
  }
2398
2455
  updateGroup(e, t, n = {}) {
2399
- return this.patch(`/internal/faq/groups/${e}`, t, (e) => new qn(e.data), n);
2456
+ return this.patch(`/internal/faq/groups/${e}`, t, (e) => new Zn(e.data), n);
2400
2457
  }
2401
2458
  removeGroup(e) {
2402
2459
  return this.delete(`/internal/faq/groups/${e}`);
@@ -2404,13 +2461,13 @@ var Nn = class {
2404
2461
  };
2405
2462
  //#endregion
2406
2463
  //#region src/helpers/format-percent-change.ts
2407
- function Xn(e) {
2408
- let t = rt(e * 100);
2464
+ function er(e) {
2465
+ let t = Pe(e * 100);
2409
2466
  return `${t >= 0 ? "+" : ""}${t}%`;
2410
2467
  }
2411
2468
  //#endregion
2412
2469
  //#region src/helpers/units-helper.ts
2413
- var Zn = class e {
2470
+ var tr = class e {
2414
2471
  static productIsMeasurable(e) {
2415
2472
  return e.unit.isLinear || e.unit.isSquare;
2416
2473
  }
@@ -2420,9 +2477,9 @@ var Zn = class e {
2420
2477
  static getProductLengthMultiplicity(e) {
2421
2478
  return e.properties?.lengthStep == null ? !e.properties?.ignoreMinCountCheck && e.properties?.minCount != null ? e.properties.minCount : .01 : e.properties.lengthStep;
2422
2479
  }
2423
- }, Qn = class {
2480
+ }, nr = class {
2424
2481
  static generateUndefinedManagerInstance() {
2425
- return new f({
2482
+ return new d({
2426
2483
  id: 0,
2427
2484
  name: "- Не назначен -",
2428
2485
  isActive: !0,
@@ -2432,7 +2489,7 @@ var Zn = class e {
2432
2489
  static isUndefinedManagerInstance(e) {
2433
2490
  return e.id === 0 && e.guid === "-undefined-";
2434
2491
  }
2435
- }, $n = class extends N {
2492
+ }, rr = class extends j {
2436
2493
  name;
2437
2494
  phone;
2438
2495
  email;
@@ -2441,7 +2498,7 @@ var Zn = class e {
2441
2498
  isSupervisor;
2442
2499
  canDoReclamations;
2443
2500
  constructor(e) {
2444
- super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.isActive = e?.isActive, this.isSupervisor = e?.isSupervisor, this.canDoReclamations = e?.canDoReclamations;
2501
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.isActive = e?.isActive, this.isSupervisor = e?.isSupervisor, this.canDoReclamations = e?.canDoReclamations;
2445
2502
  }
2446
2503
  resetFilterValue(e) {
2447
2504
  switch (e) {
@@ -2455,7 +2512,7 @@ var Zn = class e {
2455
2512
  }
2456
2513
  return this;
2457
2514
  }
2458
- }, er = class e extends ie {
2515
+ }, ir = class e extends ae {
2459
2516
  static transformManagerDataToRequest(e) {
2460
2517
  return {
2461
2518
  name: e.name,
@@ -2469,37 +2526,37 @@ var Zn = class e {
2469
2526
  salesDirectionId: e.salesDirection.id,
2470
2527
  pricingRoleId: e.pricingRole?.id,
2471
2528
  showAllCosts: e.showAllCosts ?? !1,
2472
- storeIds: j(e.stores, "id"),
2473
- curatedDirectionIds: j(e.curatedDirections, "id"),
2474
- managerRegionIds: j(e.managerRegions, "id"),
2475
- managerIds: j(e.managers, "id"),
2529
+ storeIds: b(e.stores, "id"),
2530
+ curatedDirectionIds: b(e.curatedDirections, "id"),
2531
+ managerRegionIds: b(e.managerRegions, "id"),
2532
+ managerIds: b(e.managers, "id"),
2476
2533
  photo: e.photoFile
2477
2534
  };
2478
2535
  }
2479
2536
  getManagersList(e, t, n, r) {
2480
- return this.getTypedPaginated(f, "/internal/managers", e, t, n, {}, void 0, r);
2537
+ return this.getTypedPaginated(d, "/internal/managers", e, t, n, {}, void 0, r);
2481
2538
  }
2482
2539
  createManager(t, n = {}) {
2483
- return this.post("/internal/managers", e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2540
+ return this.post("/internal/managers", e.transformManagerDataToRequest(t), (e) => new d(e.data), n);
2484
2541
  }
2485
2542
  updateManager(t, n = {}) {
2486
- return this.patch(`/internal/managers/${t.id}`, e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2543
+ return this.patch(`/internal/managers/${t.id}`, e.transformManagerDataToRequest(t), (e) => new d(e.data), n);
2487
2544
  }
2488
2545
  getManagerRegionsList(e, t, n) {
2489
- return this.getTypedPaginated(ye, "/internal/managers/regions", e, t, n);
2546
+ return this.getTypedPaginated(be, "/internal/managers/regions", e, t, n);
2490
2547
  }
2491
- }, tr = /* @__PURE__ */ function(e) {
2548
+ }, ar = /* @__PURE__ */ function(e) {
2492
2549
  return e.Processing = "processing", e.Completed = "completed", e.Error = "error", e.NeedsActualization = "needs_actualization", e;
2493
- }({}), nr = class {
2550
+ }({}), or = class {
2494
2551
  status;
2495
2552
  actualizedAt;
2496
2553
  expiresAt;
2497
2554
  error;
2498
2555
  constructor(e) {
2499
- this.status = e?.status ?? tr.Processing, this.actualizedAt = s.parse(e?.actualizedAt), this.expiresAt = s.parse(e?.expiresAt), this.error = e?.error;
2556
+ this.status = e?.status ?? ar.Processing, this.actualizedAt = s.parse(e?.actualizedAt), this.expiresAt = s.parse(e?.expiresAt), this.error = e?.error;
2500
2557
  }
2501
2558
  get isProcessing() {
2502
- return this.status === tr.Processing;
2559
+ return this.status === ar.Processing;
2503
2560
  }
2504
2561
  get isOutdated() {
2505
2562
  return this.isOutdatedAt(/* @__PURE__ */ new Date());
@@ -2508,12 +2565,12 @@ var Zn = class e {
2508
2565
  return this.isOrderAllowedAt(/* @__PURE__ */ new Date());
2509
2566
  }
2510
2567
  isOutdatedAt(e) {
2511
- return this.status !== tr.Completed || k(this.actualizedAt) ? !0 : !k(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2568
+ return this.status !== ar.Completed || v(this.actualizedAt) ? !0 : !v(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2512
2569
  }
2513
2570
  isOrderAllowedAt(e) {
2514
- return this.status === tr.Completed && !this.isOutdatedAt(e);
2571
+ return this.status === ar.Completed && !this.isOutdatedAt(e);
2515
2572
  }
2516
- }, rr = class extends M {
2573
+ }, sr = class extends M {
2517
2574
  name;
2518
2575
  client;
2519
2576
  sum;
@@ -2521,9 +2578,9 @@ var Zn = class e {
2521
2578
  actualization;
2522
2579
  file;
2523
2580
  constructor(e) {
2524
- super(e), this.name = e?.name, this.client = new U(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new nr(e.actualization), this.file = e?.file;
2581
+ super(e), this.name = e?.name, this.client = new U(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new or(e.actualization), this.file = e?.file;
2525
2582
  }
2526
- }, ir = class extends Tt {
2583
+ }, cr = class extends kt {
2527
2584
  groupName;
2528
2585
  supplierSku;
2529
2586
  isIgnored;
@@ -2532,24 +2589,24 @@ var Zn = class e {
2532
2589
  super(e), this.groupName = e.groupName, this.supplierSku = e.supplierSku ?? e.product.supplierSku, this.isIgnored = e.isIgnored, this.lineError = e.lineError;
2533
2590
  }
2534
2591
  get isProductStub() {
2535
- return k(this.product.id);
2592
+ return v(this.product.id);
2536
2593
  }
2537
2594
  get isOrderable() {
2538
- return !this.isProductStub && !this.isIgnored && Ze(this.lineError);
2595
+ return !this.isProductStub && !this.isIgnored && Oe(this.lineError);
2539
2596
  }
2540
- }, Z = class extends rr {
2597
+ }, Z = class extends sr {
2541
2598
  sum;
2542
2599
  products;
2543
2600
  constructor(e) {
2544
- super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new ir(t) : new Tt(t));
2601
+ super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new cr(t) : new kt(t));
2545
2602
  }
2546
- }, ar = class extends N {
2603
+ }, lr = class extends j {
2547
2604
  id;
2548
2605
  clientSearchTerm;
2549
2606
  name;
2550
- createdAt = new P();
2607
+ createdAt = new N();
2551
2608
  constructor(e) {
2552
- super(), this.id = e?.id, this.clientSearchTerm = e?.clientSearchTerm, this.name = e?.name, this.createdAt = new P(e?.createdAt);
2609
+ super(), this.id = e?.id, this.clientSearchTerm = e?.clientSearchTerm, this.name = e?.name, this.createdAt = new N(e?.createdAt);
2553
2610
  }
2554
2611
  resetFilterValue(e) {
2555
2612
  return e === "createdAt" ? (this.createdAt.from = null, this.createdAt.to = null) : this[e] = void 0, this;
@@ -2558,7 +2615,7 @@ var Zn = class e {
2558
2615
  let e = super.asClearRaw();
2559
2616
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
2560
2617
  }
2561
- }, or = class extends vn {
2618
+ }, ur = class extends Sn {
2562
2619
  client;
2563
2620
  payment;
2564
2621
  delivery;
@@ -2579,14 +2636,14 @@ var Zn = class e {
2579
2636
  onlinePaymentLink: e?.payment?.onlinePaymentLink
2580
2637
  }, this.delivery = {
2581
2638
  type: e?.delivery?.type ?? -1,
2582
- date: A(e?.delivery?.date) ? w(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2639
+ date: y(e?.delivery?.date) ? E(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2583
2640
  address: e?.delivery?.address ? new Y(e.delivery.address) : void 0,
2584
- warehouse: e?.delivery?.warehouse ? new be(e.delivery.warehouse) : void 0
2585
- }, this.attachedUser = e?.attachedUser ? new F(e?.attachedUser) : void 0, this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0, this.salesDirection = new g(e?.salesDirection);
2641
+ warehouse: e?.delivery?.warehouse ? new xe(e.delivery.warehouse) : void 0
2642
+ }, this.attachedUser = e?.attachedUser ? new F(e?.attachedUser) : void 0, this.status = new ce(e?.status), this.statusDetail = e?.statusDetail ? new fe(e.statusDetail) : void 0, this.salesDirection = new h(e?.salesDirection);
2586
2643
  let t = e?.attachedAt;
2587
- this.attachedAt = A(t) ? w(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2644
+ this.attachedAt = y(t) ? E(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2588
2645
  }
2589
- }, sr = class extends wt {
2646
+ }, dr = class extends Ot {
2590
2647
  product;
2591
2648
  cost;
2592
2649
  costOne;
@@ -2600,9 +2657,9 @@ var Zn = class e {
2600
2657
  changedFields = [];
2601
2658
  replacement;
2602
2659
  constructor(e, t) {
2603
- super(e), this.product = new z(e.product), this.currency = new o(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 = Ye(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
2660
+ super(e), this.product = new z(e.product), this.currency = new o(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 = Ee(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
2604
2661
  }
2605
- }, Q = class extends or {
2662
+ }, Q = class extends ur {
2606
2663
  products;
2607
2664
  invoices;
2608
2665
  comment;
@@ -2618,11 +2675,11 @@ var Zn = class e {
2618
2675
  erpOrderUrl;
2619
2676
  numberDoc;
2620
2677
  constructor(e) {
2621
- super(e), this.products = (e.products ?? []).map((t) => new sr(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? mn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new de(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new se(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2678
+ super(e), this.products = (e.products ?? []).map((t) => new dr(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? vn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new fe(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new ce(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2622
2679
  }
2623
- }, cr = class extends e {
2680
+ }, fr = class extends e {
2624
2681
  getOffers(e, t, n, r) {
2625
- return this.getTypedPaginated(rr, "/internal/orders/offers", e, t, n, {}, void 0, r);
2682
+ return this.getTypedPaginated(sr, "/internal/orders/offers", e, t, n, {}, void 0, r);
2626
2683
  }
2627
2684
  createOfferFromCart(e, t, n) {
2628
2685
  return this.post(`/internal/orders/offers/${e}`, {
@@ -2652,12 +2709,12 @@ var Zn = class e {
2652
2709
  return this.delete(`/internal/orders/offers/${e}`);
2653
2710
  }
2654
2711
  createOrderFromDraft(e, t, n, r = {}) {
2655
- let i = v().config.dateFormats.api;
2712
+ let i = _().config.dateFormats.api;
2656
2713
  return this.post(`/internal/orders/offers/${e}/create-order`, {
2657
2714
  ...t,
2658
- deliveryDate: t.deliveryDate ? C(t.deliveryDate, i) : void 0,
2715
+ deliveryDate: t.deliveryDate ? T(t.deliveryDate, i) : void 0,
2659
2716
  items: n?.length ? n : void 0
2660
- }, (e) => _.instanceListInitializer(Q, e.data), r);
2717
+ }, (e) => g.instanceListInitializer(Q, e.data), r);
2661
2718
  }
2662
2719
  addOfferProduct(e, t, n = {}) {
2663
2720
  return this.post(`/internal/orders/offers/${e}/products`, {
@@ -2706,25 +2763,25 @@ var Zn = class e {
2706
2763
  sendOffer(e, t) {
2707
2764
  return this.post(`/internal/orders/offers/${e}/send`, t);
2708
2765
  }
2709
- }, lr = class {
2766
+ }, pr = class {
2710
2767
  static isProfstroy(e) {
2711
2768
  return !!e?.isProfstroy;
2712
2769
  }
2713
2770
  static isProfstroyOffer(e) {
2714
- return !k(e) && e.isProfstroy === !0 && !k(e.actualization);
2771
+ return !v(e) && e.isProfstroy === !0 && !v(e.actualization);
2715
2772
  }
2716
- }, ur = class extends _e {
2773
+ }, mr = class extends ve {
2717
2774
  isBillingSupervisor;
2718
2775
  constructor(e) {
2719
2776
  super(e), this.isBillingSupervisor = e?.isBillingSupervisor ?? !1;
2720
2777
  }
2721
- }, dr = class extends ur {
2778
+ }, hr = class extends mr {
2722
2779
  showAllCosts;
2723
2780
  stores;
2724
2781
  constructor(e) {
2725
- super(e), this.showAllCosts = e?.showAllCosts, this.stores = e?.stores?.map((e) => new me(e));
2782
+ super(e), this.showAllCosts = e?.showAllCosts, this.stores = e?.stores?.map((e) => new he(e));
2726
2783
  }
2727
- }, fr = class extends N {
2784
+ }, gr = class extends j {
2728
2785
  name;
2729
2786
  phone;
2730
2787
  email;
@@ -2733,7 +2790,7 @@ var Zn = class e {
2733
2790
  isBillingSupervisor;
2734
2791
  canDoReclamations;
2735
2792
  constructor(e) {
2736
- super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.isActive = e?.isActive, this.isBillingSupervisor = e?.isBillingSupervisor, this.canDoReclamations = e?.canDoReclamations;
2793
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.isActive = e?.isActive, this.isBillingSupervisor = e?.isBillingSupervisor, this.canDoReclamations = e?.canDoReclamations;
2737
2794
  }
2738
2795
  resetFilterValue(e) {
2739
2796
  switch (e) {
@@ -2747,7 +2804,7 @@ var Zn = class e {
2747
2804
  }
2748
2805
  return this;
2749
2806
  }
2750
- }, pr = class t extends e {
2807
+ }, _r = class t extends e {
2751
2808
  static transformOperatorDataToRequest(e) {
2752
2809
  return {
2753
2810
  name: e.name,
@@ -2760,25 +2817,25 @@ var Zn = class e {
2760
2817
  salesDirectionId: e.salesDirection?.id,
2761
2818
  pricingRoleId: e.pricingRole?.id,
2762
2819
  showAllCosts: e.showAllCosts ?? !1,
2763
- storeIds: j(e.stores, "id"),
2820
+ storeIds: b(e.stores, "id"),
2764
2821
  photo: e.photoFile
2765
2822
  };
2766
2823
  }
2767
2824
  getOperatorsList(e, t, n, r) {
2768
- return this.getTypedPaginated(ur, "/internal/operators", e, t, n, {}, void 0, r);
2825
+ return this.getTypedPaginated(mr, "/internal/operators", e, t, n, {}, void 0, r);
2769
2826
  }
2770
2827
  getOperator(e, t = !1) {
2771
- return this.get(`/internal/operators/${e}`, {}, (e) => new dr(e.data), t);
2828
+ return this.get(`/internal/operators/${e}`, {}, (e) => new hr(e.data), t);
2772
2829
  }
2773
2830
  createOperator(e, n = {}) {
2774
- return this.post("/internal/operators", t.transformOperatorDataToRequest(e), (e) => new dr(e.data), n);
2831
+ return this.post("/internal/operators", t.transformOperatorDataToRequest(e), (e) => new hr(e.data), n);
2775
2832
  }
2776
2833
  updateOperator(e, n = {}) {
2777
- return this.patch(`/internal/operators/${e.id}`, t.transformOperatorDataToRequest(e), (e) => new dr(e.data), n);
2834
+ return this.patch(`/internal/operators/${e.id}`, t.transformOperatorDataToRequest(e), (e) => new hr(e.data), n);
2778
2835
  }
2779
- }, mr = /* @__PURE__ */ function(e) {
2836
+ }, vr = /* @__PURE__ */ function(e) {
2780
2837
  return e.View = "view", e.Share = "share", e.EditTags = "edit_tags", e.SaveOrderIgnoredProducts = "save_order_ignored_products", e.ChangeStatus = "change_status", e.ChangeProducts = "change_products", e.ChangeOrderParameters = "change_order_parameters", e.Recalculate = "recalculate", e.AttachOrder = "attach_order", e.DetachOrder = "detach_order", e.ChangeAttachedOperator = "change_attached_operator", e.SendOnlinePaymentLink = "send_online_payment_link", e.ConfirmOnlineFullPayment = "confirm_online_full_payment", e.MergeOrders = "merge_orders", e.GetHistory = "get_history", e.CloneOrder = "clone_order", e.DeleteAttachedFile = "delete_attached_file", e;
2781
- }({}), hr = class {
2838
+ }({}), yr = class {
2782
2839
  paymentType;
2783
2840
  deliveryType;
2784
2841
  contragentId;
@@ -2796,21 +2853,21 @@ var Zn = class e {
2796
2853
  constructor(e) {
2797
2854
  this.paymentType = e?.payment.type, this.deliveryType = e?.delivery.type, this.contragentId = e?.contragent?.id, this.deliveryDate = e?.delivery.date ? new Date(e.delivery.date) : void 0, this.addressId = e?.delivery.address?.id, this.warehouseId = e?.delivery.warehouse?.id, this.comment = e?.comment, this.barcode = e?.barcode, this.operatorsComment = e?.operatorsComment, this.operatorsForWarehouseComment = e?.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = e?.isAllowProcessingWithoutPayment;
2798
2855
  }
2799
- }, gr = class extends N {
2856
+ }, br = class extends j {
2800
2857
  attachedUsers;
2801
2858
  clientSearchTerm;
2802
2859
  client;
2803
2860
  contragent;
2804
- createdAt = new P();
2861
+ createdAt = new N();
2805
2862
  creator;
2806
- deliveryDate = new P();
2863
+ deliveryDate = new N();
2807
2864
  deliveryAddressSearch;
2808
2865
  clientCities;
2809
2866
  id;
2810
2867
  isApproved;
2811
2868
  isNotInStock;
2812
2869
  isOnOrder;
2813
- attachedAt = new P();
2870
+ attachedAt = new N();
2814
2871
  salesDirections;
2815
2872
  status;
2816
2873
  statusDetail;
@@ -2821,7 +2878,7 @@ var Zn = class e {
2821
2878
  isToProcess;
2822
2879
  onlyMyRegions;
2823
2880
  constructor(e) {
2824
- super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new f(e) : new ae(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new P(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new P(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new P(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new ce(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new be(e)), this.isToProcess = e?.isToProcess;
2881
+ super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new d(e) : new oe(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new N(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new N(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new N(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new h(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new le(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new xe(e)), this.isToProcess = e?.isToProcess;
2825
2882
  }
2826
2883
  resetFilterValue(e) {
2827
2884
  switch (e) {
@@ -2862,22 +2919,22 @@ var Zn = class e {
2862
2919
  let e = super.asClearRaw();
2863
2920
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.deliveryDate?.from && !e?.deliveryDate?.to && delete e.deliveryDate, !e?.attachedAt?.from && !e?.attachedAt?.to && delete e.attachedAt, e;
2864
2921
  }
2865
- }, _r = class {
2922
+ }, xr = class {
2866
2923
  user;
2867
2924
  status;
2868
2925
  statusDetail;
2869
2926
  createdAt;
2870
2927
  constructor(e) {
2871
- this.user = new F(e?.user), this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0;
2928
+ this.user = new F(e?.user), this.status = new ce(e?.status), this.statusDetail = e?.statusDetail ? new fe(e.statusDetail) : void 0;
2872
2929
  let t = e?.createdAt;
2873
- this.createdAt = A(t) ? w(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2930
+ this.createdAt = y(t) ? E(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2874
2931
  }
2875
- }, vr = class extends e {
2932
+ }, Sr = class extends e {
2876
2933
  getOrders(e, t, n, r) {
2877
- return this.getTypedPaginated(or, "/internal/orders", e, t, n, {}, void 0, r);
2934
+ return this.getTypedPaginated(ur, "/internal/orders", e, t, n, {}, void 0, r);
2878
2935
  }
2879
2936
  getOrdersCount(e, t) {
2880
- return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof ee ? e : new ee(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2937
+ return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2881
2938
  }
2882
2939
  getClientOrderStatistics(e, t) {
2883
2940
  return this.get(`/internal/clients/${e}/orders/statistics`, t ? { period: t } : {});
@@ -2886,12 +2943,12 @@ var Zn = class e {
2886
2943
  return this.get(`/internal/orders/${e}`, {}, (e) => new Q(e.data));
2887
2944
  }
2888
2945
  createClientOrder(e, t, n, r = {}) {
2889
- let i = v().config.dateFormats.api;
2946
+ let i = _().config.dateFormats.api;
2890
2947
  return this.post(`/internal/clients/${e}/orders`, {
2891
2948
  ...t,
2892
- deliveryDate: C(t.deliveryDate, i),
2949
+ deliveryDate: T(t.deliveryDate, i),
2893
2950
  items: n?.length ? n : void 0
2894
- }, (e) => _.instanceListInitializer(Q, e.data), r);
2951
+ }, (e) => g.instanceListInitializer(Q, e.data), r);
2895
2952
  }
2896
2953
  attachOrder(e) {
2897
2954
  return this.patch(`/internal/orders/${e}/attach`, {}, (e) => new Q(e.data));
@@ -2909,10 +2966,10 @@ var Zn = class e {
2909
2966
  return this.get(`/internal/orders/${e}/clone`, {});
2910
2967
  }
2911
2968
  updateOrder(e, t, n = {}) {
2912
- let r = v().config.dateFormats.api;
2969
+ let r = _().config.dateFormats.api;
2913
2970
  return this.patch(`/internal/orders/${e}`, {
2914
2971
  ...t,
2915
- deliveryDate: t.deliveryDate ? C(t.deliveryDate, r) : void 0
2972
+ deliveryDate: t.deliveryDate ? T(t.deliveryDate, r) : void 0
2916
2973
  }, (e) => new Q(e.data), n);
2917
2974
  }
2918
2975
  addOrderProduct(e, t, n = {}) {
@@ -2939,7 +2996,7 @@ var Zn = class e {
2939
2996
  return this.patch(`/internal/orders/${e}/status`, { statusDetail: t }, (e) => new Q(e.data));
2940
2997
  }
2941
2998
  getOrderStatusHistory(e) {
2942
- return this.getTypedList(_r, `/internal/orders/${e}/history`);
2999
+ return this.getTypedList(xr, `/internal/orders/${e}/history`);
2943
3000
  }
2944
3001
  getOrderPrintHtml(e, t) {
2945
3002
  return this.get(`/internal/orders/${e}/print/view`, { ...t }, (e) => new Blob([e.data], { type: "text/html" }));
@@ -2980,51 +3037,51 @@ var Zn = class e {
2980
3037
  return this.get(`/internal/orders/self-delivery/${e}/nearest-dates`, {}, (e) => e.data, void 0, t);
2981
3038
  }
2982
3039
  getDeliveryCost(e, t, n, r) {
2983
- let i = v().config.dateFormats.api;
3040
+ let i = _().config.dateFormats.api;
2984
3041
  return this.get(`/internal/orders/delivery/${e}/cost`, {
2985
- date: C(t, i),
3042
+ date: T(t, i),
2986
3043
  warehouse_id: n
2987
3044
  }, (e) => e.data, void 0, r);
2988
3045
  }
2989
- }, yr = Symbol("currentOrder"), br = class {
3046
+ }, Cr = Symbol("currentOrder"), wr = class {
2990
3047
  client;
2991
3048
  product;
2992
3049
  cost;
2993
3050
  costCoefficient;
2994
3051
  source;
2995
3052
  constructor(e) {
2996
- this.client = new U(e?.client), this.product = new R(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? Ct.Product;
3053
+ this.client = new U(e?.client), this.product = new R(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? Dt.Product;
2997
3054
  }
2998
- }, xr = (e) => e ? nt({
3055
+ }, Tr = (e) => e ? Ne({
2999
3056
  cities: e.cities?.map((e) => e.id),
3000
3057
  clients: e.clients?.map((e) => e.id),
3001
3058
  managers: e.managers?.map((e) => e.id),
3002
3059
  partnerGroups: e.partnerGroups?.map((e) => e.id),
3003
3060
  salesDirections: e.salesDirections?.map((e) => e.id),
3004
3061
  hideNotActive: e.hideNotActive
3005
- }, (e) => k(e) || (Ye(e) || $e(e)) && Ze(e)) : {}, Sr = (e) => {
3062
+ }, (e) => v(e) || (Ee(e) || Ae(e)) && Oe(e)) : {}, Er = (e) => {
3006
3063
  let t = {};
3007
3064
  return e.from && (e.from.coefficient || e.from.value) && (t.from = {}, e.from.coefficient && (t.from.priceCoefficientId = e.from.coefficient.id), e.from.value && (t.from.increasePercent = e.from.value)), e.to && (e.to.coefficient || e.to.value) && (t.to = {}, e.to.coefficient && (t.to.priceCoefficientId = e.to.coefficient.id), e.to.value && (t.to.increasePercent = e.to.value)), t;
3008
- }, Cr = class extends u {
3065
+ }, Dr = class extends l {
3009
3066
  analyzeProductPrices(e, t, n) {
3010
3067
  return this.get(`/internal/price/products/${e}/analyze`, {
3011
- ...Sr(t),
3012
- filters: xr(n)
3013
- }, (e) => _.instanceListInitializer(br, e.data));
3068
+ ...Er(t),
3069
+ filters: Tr(n)
3070
+ }, (e) => g.instanceListInitializer(wr, e.data));
3014
3071
  }
3015
3072
  analyzeCategoryPrices(e, t, n) {
3016
3073
  return this.get(`/internal/price/categories/${e}/analyze`, {
3017
- ...Sr(t),
3018
- filters: xr(n)
3019
- }, (e) => _.instanceListInitializer(br, e.data));
3074
+ ...Er(t),
3075
+ filters: Tr(n)
3076
+ }, (e) => g.instanceListInitializer(wr, e.data));
3020
3077
  }
3021
3078
  analyzeCategoryPricesBySquare(e, t, n) {
3022
3079
  return this.get(`/internal/price/categories/${e}/analyze/square`, {
3023
3080
  ...t,
3024
- filters: xr(n)
3025
- }, (e) => _.instanceListInitializer(br, e.data));
3081
+ filters: Tr(n)
3082
+ }, (e) => g.instanceListInitializer(wr, e.data));
3026
3083
  }
3027
- }, wr = class {
3084
+ }, Or = class {
3028
3085
  cost;
3029
3086
  isLowCost;
3030
3087
  isRetail;
@@ -3036,43 +3093,43 @@ var Zn = class e {
3036
3093
  executor;
3037
3094
  currency;
3038
3095
  constructor(e) {
3039
- this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = A(e.costDate) ? w(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new L(e.product) : void 0, this.client = e.client ? new F(e.client) : void 0, this.executor = e.executor ? new F(e.executor) : void 0, this.currency = e.currency ? new o(e.currency) : void 0;
3096
+ this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = y(e.costDate) ? E(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new L(e.product) : void 0, this.client = e.client ? new F(e.client) : void 0, this.executor = e.executor ? new F(e.executor) : void 0, this.currency = e.currency ? new o(e.currency) : void 0;
3040
3097
  }
3041
- }, Tr = class extends L {
3098
+ }, kr = class extends L {
3042
3099
  history;
3043
3100
  constructor(e) {
3044
- super(e), this.history = j(e.history, (e) => new wr(e));
3101
+ super(e), this.history = b(e.history, (e) => new Or(e));
3045
3102
  }
3046
- }, Er = class extends u {
3103
+ }, Ar = class extends l {
3047
3104
  getProductPriceHistory(e) {
3048
- let t = v().config.dateFormats.api, n = nt(tt(e, { costDate: {
3049
- from: Xe(e.costDate?.from) ? C(e.costDate.from, t) : e.costDate?.from,
3050
- to: Xe(e.costDate?.to) ? C(e.costDate.to, t) : e.costDate?.to
3051
- } }), (e) => k(e) || (Ye(e) || $e(e)) && Ze(e)), r = e.product?.[0] ?? 0;
3052
- return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new Tr(tt(e[0], { history: e }))]);
3105
+ let t = _().config.dateFormats.api, n = Ne(Me(e, { costDate: {
3106
+ from: De(e.costDate?.from) ? T(e.costDate.from, t) : e.costDate?.from,
3107
+ to: De(e.costDate?.to) ? T(e.costDate.to, t) : e.costDate?.to
3108
+ } }), (e) => v(e) || (Ee(e) || Ae(e)) && Oe(e)), r = e.product?.[0] ?? 0;
3109
+ return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new kr(Me(e[0], { history: e }))]);
3053
3110
  }
3054
- }, Dr = class {
3111
+ }, jr = class {
3055
3112
  createdAt;
3056
3113
  creator;
3057
3114
  files;
3058
3115
  text;
3059
3116
  status;
3060
3117
  constructor(e) {
3061
- this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = k(e?.creator) ? void 0 : new F(e.creator), this.files = e?.files ?? [], this.text = e?.text ?? void 0, this.status = e?.status ?? void 0;
3118
+ this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = v(e?.creator) ? void 0 : new F(e.creator), this.files = e?.files ?? [], this.text = e?.text ?? void 0, this.status = e?.status ?? void 0;
3062
3119
  }
3063
3120
  isStatusChanged() {
3064
- return !k(this.status);
3121
+ return !v(this.status);
3065
3122
  }
3066
3123
  }, $ = /* @__PURE__ */ function(e) {
3067
3124
  return e[e.Initiated = 1] = "Initiated", e[e.InfoRequired = 2] = "InfoRequired", e[e.Pending = 3] = "Pending", e[e.Completed = 4] = "Completed", e;
3068
- }({}), Or = class extends M {
3125
+ }({}), Mr = class extends M {
3069
3126
  status;
3070
3127
  closedAt;
3071
3128
  isRead;
3072
3129
  isDeleted;
3073
3130
  client;
3074
3131
  constructor(e) {
3075
- super(e), this.status = e?.status ?? $.Initiated, this.closedAt = s.parse(e?.closedAt), this.isRead = e?.isRead ?? !1, this.isDeleted = e?.isDeleted ?? !1, this.client = new hn(e?.client);
3132
+ super(e), this.status = e?.status ?? $.Initiated, this.closedAt = s.parse(e?.closedAt), this.isRead = e?.isRead ?? !1, this.isDeleted = e?.isDeleted ?? !1, this.client = new yn(e?.client);
3076
3133
  }
3077
3134
  isClosed() {
3078
3135
  return this.status === $.Completed;
@@ -3084,17 +3141,17 @@ var Zn = class e {
3084
3141
  return !this.isClosed();
3085
3142
  }
3086
3143
  getConsiderationDays(e = /* @__PURE__ */ new Date()) {
3087
- return Math.max(Te(this.closedAt ?? e, this.createdAt), 0);
3144
+ return Math.max(He(this.closedAt ?? e, this.createdAt), 0);
3088
3145
  }
3089
- }, kr = class extends Or {
3146
+ }, Nr = class extends Mr {
3090
3147
  items;
3091
3148
  constructor(e) {
3092
- super(e), this.items = j(e?.items ?? [], (e) => new Dr(e));
3149
+ super(e), this.items = b(e?.items ?? [], (e) => new jr(e));
3093
3150
  }
3094
3151
  isClientMessage(e) {
3095
3152
  return e.creator?.id === this.client.id;
3096
3153
  }
3097
- }, Ar = class extends N {
3154
+ }, Pr = class extends j {
3098
3155
  id;
3099
3156
  statuses;
3100
3157
  createdAt;
@@ -3107,7 +3164,7 @@ var Zn = class e {
3107
3164
  super(), this.id = {
3108
3165
  from: e?.id?.from ?? null,
3109
3166
  to: e?.id?.to ?? null
3110
- }, this.statuses = e?.statuses, this.createdAt = new P(e?.createdAt), this.closedAt = new P(e?.closedAt), this.isRead = e?.isRead, this.isDeleted = e?.isDeleted, this.clientName = e?.clientName, this.cityName = e?.cityName;
3167
+ }, this.statuses = e?.statuses, this.createdAt = new N(e?.createdAt), this.closedAt = new N(e?.closedAt), this.isRead = e?.isRead, this.isDeleted = e?.isDeleted, this.clientName = e?.clientName, this.cityName = e?.cityName;
3111
3168
  }
3112
3169
  resetFilterValue(e) {
3113
3170
  switch (e) {
@@ -3130,7 +3187,7 @@ var Zn = class e {
3130
3187
  }
3131
3188
  return this;
3132
3189
  }
3133
- }, jr = class e {
3190
+ }, Fr = class e {
3134
3191
  static apiCodes = {
3135
3192
  [$.Initiated]: "initiated",
3136
3193
  [$.InfoRequired]: "info_required",
@@ -3141,23 +3198,23 @@ var Zn = class e {
3141
3198
  return e.apiCodes[t];
3142
3199
  }
3143
3200
  static toApiCodes(t) {
3144
- return j(t, (t) => e.toApiCode(t));
3201
+ return b(t, (t) => e.toApiCode(t));
3145
3202
  }
3146
- }, Mr = class extends e {
3203
+ }, Ir = class extends e {
3147
3204
  getReclamationsList(e, t, n, r, i = !1) {
3148
- return this.getTypedPaginated(Or, "/internal/reclamations", e, t, n, {}, i, r);
3205
+ return this.getTypedPaginated(Mr, "/internal/reclamations", e, t, n, {}, i, r);
3149
3206
  }
3150
3207
  getReclamation(e, t, n = !1) {
3151
- return this.get(`/internal/reclamations/${e}`, {}, (e) => new kr(e.data), n, t);
3208
+ return this.get(`/internal/reclamations/${e}`, {}, (e) => new Nr(e.data), n, t);
3152
3209
  }
3153
3210
  createMessage(e, t, n = {}) {
3154
- return this.post(`/internal/reclamations/${e}/messages`, t, (e) => new kr(e.data), n);
3211
+ return this.post(`/internal/reclamations/${e}/messages`, t, (e) => new Nr(e.data), n);
3155
3212
  }
3156
3213
  deleteReclamation(e) {
3157
3214
  return this.delete(`/internal/reclamations/${e}`);
3158
3215
  }
3159
3216
  restoreReclamation(e) {
3160
- return this.post(`/internal/reclamations/${e}/restore`, {}, (e) => new kr(e.data));
3217
+ return this.post(`/internal/reclamations/${e}/restore`, {}, (e) => new Nr(e.data));
3161
3218
  }
3162
3219
  downloadReclamation(e, t = !1) {
3163
3220
  return this.getBlob(`/internal/reclamations/${e}/download`, {}, (e) => new Blob([e.request.response], { type: "application/pdf" }), t);
@@ -3165,18 +3222,18 @@ var Zn = class e {
3165
3222
  getUpdates(e, t = !1) {
3166
3223
  return this.get("/internal/reclamations/updates", {}, void 0, t, e);
3167
3224
  }
3168
- }, Nr = class {
3225
+ }, Lr = class {
3169
3226
  products = [];
3170
3227
  productCategories = [];
3171
3228
  constructor(e) {
3172
3229
  e?.products && (this.products = e.products.map((e) => new L(e))), e?.productCategories && (this.productCategories = e.productCategories.map((e) => new L(e)));
3173
3230
  }
3174
- }, Pr = class extends u {
3231
+ }, Rr = class extends l {
3175
3232
  getProductCategoryRecommendations(e) {
3176
- return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new Nr(e.data));
3233
+ return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new Lr(e.data));
3177
3234
  }
3178
3235
  getProductRecommendations(e) {
3179
- return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new Nr(e.data));
3236
+ return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new Lr(e.data));
3180
3237
  }
3181
3238
  saveProductCategoryRecommendations(e, t) {
3182
3239
  return this.post(`/internal/catalog/recommendations/categories/${e.id}`, {
@@ -3190,7 +3247,7 @@ var Zn = class e {
3190
3247
  products: t.products.map((e) => e.id)
3191
3248
  });
3192
3249
  }
3193
- }, Fr = class {
3250
+ }, zr = class {
3194
3251
  static generateUndefinedInstance(e, t = "- Не определён -") {
3195
3252
  return new e({
3196
3253
  id: 0,
@@ -3201,13 +3258,13 @@ var Zn = class e {
3201
3258
  static isUndefinedInstance(e) {
3202
3259
  return e.id === 0 && e.slug === "-undefined-";
3203
3260
  }
3204
- }, Ir = class {
3261
+ }, Br = class {
3205
3262
  name;
3206
3263
  content;
3207
3264
  constructor(e) {
3208
3265
  this.name = e.name, this.content = e.content;
3209
3266
  }
3210
- }, Lr = class {
3267
+ }, Vr = class {
3211
3268
  resourceType;
3212
3269
  resourceId;
3213
3270
  h1;
@@ -3217,42 +3274,42 @@ var Zn = class e {
3217
3274
  meta;
3218
3275
  tags;
3219
3276
  constructor(e) {
3220
- this.resourceType = new pe(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new Ir(e)) ?? [], this.tags = e?.tags;
3277
+ this.resourceType = new me(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new Br(e)) ?? [], this.tags = e?.tags;
3221
3278
  }
3222
- }, Rr = class extends u {
3279
+ }, Hr = class extends l {
3223
3280
  getResourceSeoData(e, t) {
3224
- return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new Lr(e.data));
3281
+ return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new Vr(e.data));
3225
3282
  }
3226
3283
  saveResourceSeoData(e, t = {}) {
3227
- return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new Lr(e.data), t);
3284
+ return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new Vr(e.data), t);
3228
3285
  }
3229
3286
  deleteResourceSeoData(e, t) {
3230
3287
  return this.delete(`/internal/seo/${e.slug}/${t}`);
3231
3288
  }
3232
- }, zr = class extends d {
3289
+ }, Ur = class extends u {
3233
3290
  text;
3234
3291
  searchCount;
3235
3292
  lastSearchedAt;
3236
3293
  constructor(e) {
3237
3294
  super(e), this.text = e?.text ?? "", this.searchCount = e?.searchCount ?? 0, this.lastSearchedAt = s.parse(e?.lastSearchedAt);
3238
3295
  }
3239
- }, Br = class extends u {
3296
+ }, Wr = class extends l {
3240
3297
  getSearchProductsStatistics(e, t) {
3241
- return this.getTypedList(zr, "/internal/statistics/search/products", { date: s.periodToApiFormat(e) }, !1, t);
3298
+ return this.getTypedList(Ur, "/internal/statistics/search/products", { date: s.periodToApiFormat(e) }, !1, t);
3242
3299
  }
3243
3300
  removeSearchProductStatistic(e) {
3244
3301
  return this.delete(`/internal/statistics/search/products/${e}`);
3245
3302
  }
3246
- }, Vr = /* @__PURE__ */ function(e) {
3303
+ }, Gr = /* @__PURE__ */ function(e) {
3247
3304
  return e[e.Undetermined = 0] = "Undetermined", e[e.Complete = 1] = "Complete", e[e.Incomplete = 2] = "Incomplete", e;
3248
- }({}), Hr = class e {
3305
+ }({}), Kr = class e {
3249
3306
  static isBlocked(e, t) {
3250
- return t && e === Vr.Incomplete;
3307
+ return t && e === Gr.Incomplete;
3251
3308
  }
3252
3309
  static getValidationResult(t, n) {
3253
- return e.isBlocked(t, n) ? new l("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === Vr.Incomplete || t === Vr.Undetermined ? new l("Проверьте правильность адреса", "warning") : void 0;
3310
+ return e.isBlocked(t, n) ? new ee("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === Gr.Incomplete || t === Gr.Undetermined ? new ee("Проверьте правильность адреса", "warning") : void 0;
3254
3311
  }
3255
- }, Ur = class extends u {
3312
+ }, qr = class extends l {
3256
3313
  searchAddresses(e) {
3257
3314
  return this.execSuggestionQuery("/public/suggestions/address", e);
3258
3315
  }
@@ -3270,26 +3327,26 @@ var Zn = class e {
3270
3327
  }), t;
3271
3328
  });
3272
3329
  }
3273
- }, Wr = class extends u {
3330
+ }, Jr = class extends l {
3274
3331
  constructor() {
3275
- super(), this.baseUrl = `${v().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3332
+ super(), this.baseUrl = `${_().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3276
3333
  }
3277
3334
  getAccessToken() {
3278
3335
  return this.get("internal/users/current-tokens").then((e) => e.accessToken);
3279
3336
  }
3280
- }, Gr = class {
3337
+ }, Yr = class {
3281
3338
  user;
3282
3339
  salesDirection;
3283
3340
  constructor(e) {
3284
- this.user = new F(e?.user), this.salesDirection = new g(e?.salesDirection);
3341
+ this.user = new F(e?.user), this.salesDirection = new h(e?.salesDirection);
3285
3342
  }
3286
- }, Kr = class extends ye {
3343
+ }, Xr = class extends be {
3287
3344
  cities;
3288
3345
  users;
3289
3346
  constructor(e) {
3290
- super(e), this.cities = e?.cities?.map((e) => new n(e)) ?? [], this.users = e?.users?.map((e) => new Gr(e)) ?? [];
3347
+ super(e), this.cities = e?.cities?.map((e) => new n(e)) ?? [], this.users = e?.users?.map((e) => new Yr(e)) ?? [];
3291
3348
  }
3292
- }, qr = class extends N {
3349
+ }, Zr = class extends j {
3293
3350
  id;
3294
3351
  name;
3295
3352
  abbr;
@@ -3304,27 +3361,27 @@ var Zn = class e {
3304
3361
  }
3305
3362
  return this;
3306
3363
  }
3307
- }, Jr = class extends e {
3364
+ }, Qr = class extends e {
3308
3365
  getRegionsList(e, t, n) {
3309
- return this.getTypedPaginated(ye, "/internal/users/regions", e, t, n);
3366
+ return this.getTypedPaginated(be, "/internal/users/regions", e, t, n);
3310
3367
  }
3311
3368
  getRegion(e) {
3312
- return this.get(`/internal/users/regions/${e}`, {}, (e) => new Kr(e.data));
3369
+ return this.get(`/internal/users/regions/${e}`, {}, (e) => new Xr(e.data));
3313
3370
  }
3314
3371
  createRegion(e, t = {}) {
3315
- return this.post("/internal/users/regions", e, (e) => new Kr(e.data), t);
3372
+ return this.post("/internal/users/regions", e, (e) => new Xr(e.data), t);
3316
3373
  }
3317
3374
  updateRegion(e, t, n = {}) {
3318
- return this.patch(`/internal/users/regions/${e}`, t, (e) => new Kr(e.data), n);
3375
+ return this.patch(`/internal/users/regions/${e}`, t, (e) => new Xr(e.data), n);
3319
3376
  }
3320
3377
  removeRegion(e) {
3321
3378
  return this.delete(`/internal/users/regions/${e}`);
3322
3379
  }
3323
3380
  getRegionEmployees(e) {
3324
- return this.getTypedList(Gr, `/internal/users/regions/${e}/users`);
3381
+ return this.getTypedList(Yr, `/internal/users/regions/${e}/users`);
3325
3382
  }
3326
3383
  attachRegionEmployee(e, t, n) {
3327
- return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Gr(e.data));
3384
+ return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Yr(e.data));
3328
3385
  }
3329
3386
  detachRegionEmployee(e, t, n) {
3330
3387
  return this.request({
@@ -3335,4 +3392,4 @@ var Zn = class e {
3335
3392
  }
3336
3393
  };
3337
3394
  //#endregion
3338
- export { Vr as AddressQualityEnum, Hr as AddressQualityHelper, sn as BankAccount, dt as BlogPost, ct as BlogPostMediaFile, st as BlogPostMediaTypeEnum, lt as BlogPostPublicationStatusEnum, ut as BlogPostShortInfo, ft as BlogPostsListFilters, pt as BlogProvider, Dt as CalculationTypeEnum, X as CalendarHelper, V as Cart, Et as CartProvider, Kt as CatalogProvider, yt as CatalogableItem, H as Category, Gt as CategoryFilter, Ut as CategoryFilterSetting, Wt as CategoryFilterValue, Vt as CategoryPricingRule, gn as Client, yn as ClientAdditionalData, hn as ClientBaseInfo, At as ClientCategory, Sn as ClientDataProvider, Rt as ClientPriceCatalogableItem, Bt as ClientPriceCategory, zt as ClientPriceProduct, qt as ClientPriceProvider, Jt as ClientPriceTemplateProvider, z as ClientProduct, Zt as ClientProductCategoryDataProvider, Qt as ClientProductDataProvider, U as ClientShortInfo, on as ClientsAdditionalDataRequestTypeEnum, _n as ClientsListFilters, L as CodedIdentity, En as ConfiguratorProvider, Tn as ConfiguratorsEnum, cn as Contact, J as ContactPerson, xn as ContactPersonRelated, bn as ContactRelation, ln as ContragentBase, mn as ContragentFactory, dn as ContragentIc, un as ContragentPerson, pn as ContragentUlNr, fn as ContragentUlR, Ct as CostSourceEnum, M as CreatableIdentity, Pt as Curator, Ur as DataSuggestionProvider, Nn as DateTimeProvider, Ft as DeletableIdentity, mt as DeletableNamedIdentity, Y as DeliveryAddress, Bn as Discount, In as DiscountClient, Vn as DiscountClientEligibility, Ln as DiscountConditions, Un as DiscountProvider, ht as DiscountShortInfo, Rn as DiscountStateEnum, zn as DiscountStateHelper, Hn as DiscountsListFilters, Wn as ExternalSeoFullInfo, Gn as ExternalSeoListFilters, Kn as ExternalSeoProvider, Jn as Faq, qn as FaqGroup, Yn as FaqProvider, Ht as FilterSettings, bt as HiddenCatalogableItem, xt as Image, Qn as ManagerDataFactory, er as ManagerProvider, $n as ManagersListFilters, Ir as MetaTagItem, Z as Offer, nr as OfferActualization, tr as OfferActualizationStatus, lr as OfferHelper, rr as OfferShortInfo, cr as OffersDataProvider, ar as OffersListFilters, dr as OperatorFullInfo, pr as OperatorProvider, ur as OperatorShortInfo, fr as OperatorsListFilters, Q as Order, mr as OrderAction, hr as OrderEditorData, or as OrderInfo, sr as OrderItem, wt as OrderItemBase, vn as OrderShortInfo, _r as OrderStatusHistoryInfo, vr as OrdersDataProvider, gr as OrdersListFilters, N as PaginationFiltersBase, br as PriceAnalyze, Cr as PriceAnalyzeProvider, jt as PriceCatalogableItem, Er as PriceHistoryDataProvider, wr as PriceHistoryItem, I as PriceTemplate, Nt as PriceTemplateCategory, W as PriceTemplateClient, Mt as PriceTemplateICatalogableItem, It as PriceTemplateProduct, $t as PriceTemplateProvider, q as PricingRole, en as PricingRoleProvider, St as PrimaryCatalogableItem, R as Product, Yt as ProductCategoryDataProvider, Xt as ProductDataProvider, Ot as ProductFilterTypeEnum, gt as ProductPriceCoefficient, Tr as ProductPriceHistory, vt as ProductUnit, ir as ProfstroyOfferItem, tn as PropertiesProvider, G as Property, K as PropertyValue, kr as Reclamation, Dr as ReclamationItem, Mr as ReclamationProvider, Or as ReclamationShortInfo, $ as ReclamationStatusEnum, jr as ReclamationStatusHelper, Ar as ReclamationsListFilters, Pr as RecommendationsDataProvider, Nr as RecommendationsList, Fr as ReferenceDataFactory, Pn as STANDARD_PERIOD_GROUPS, Fn as STANDARD_PERIOD_SECTIONS, zr as SearchProductStatistic, Lr as Seo, Rr as SeoDataProvider, Br as StatisticsProvider, _t as StockCount, On as TableDataPagination, Dn as TableDataPaginationRequestParams, kn as TableDataSortRequestParams, nn as TemplateProductCategoryDataProvider, Lt as TemplatesListFilters, Zn as UnitsHelper, Cn as UnknownClientDataProvider, Wr as UserAuthDataProvider, Kr as UserRegion, Gr as UserRegionEmployee, Jr as UserRegionProvider, qr as UserRegionsListFilters, F as UserShortInfo, wn as VersionConfig, yr as currentOrderInjectionKey, An as daysAgoIso, rn as findCatalogItemByIdRecursive, an as flattenCatalogItems, Xn as formatPercentChange, Mn as formatRelativeDate, jn as pluralize };
3395
+ export { Gr as AddressQualityEnum, Kr as AddressQualityHelper, lt as AdminFullInfo, dt as AdminProvider, ct as AdminShortInfo, ut as AdminsListFilters, dn as BankAccount, gt as BlogPost, pt as BlogPostMediaFile, ft as BlogPostMediaTypeEnum, mt as BlogPostPublicationStatusEnum, ht as BlogPostShortInfo, _t as BlogPostsListFilters, vt as BlogProvider, jt as CalculationTypeEnum, X as CalendarHelper, V as Cart, At as CartProvider, Xt as CatalogProvider, Ct as CatalogableItem, H as Category, Yt as CategoryFilter, qt as CategoryFilterSetting, Jt as CategoryFilterValue, Gt as CategoryPricingRule, bn as Client, Cn as ClientAdditionalData, yn as ClientBaseInfo, Pt as ClientCategory, En as ClientDataProvider, Ht as ClientPriceCatalogableItem, Wt as ClientPriceCategory, Ut as ClientPriceProduct, Zt as ClientPriceProvider, Qt as ClientPriceTemplateProvider, z as ClientProduct, tn as ClientProductCategoryDataProvider, nn as ClientProductDataProvider, U as ClientShortInfo, un as ClientsAdditionalDataRequestTypeEnum, xn as ClientsListFilters, L as CodedIdentity, An as ConfiguratorProvider, kn as ConfiguratorsEnum, fn as Contact, J as ContactPerson, Tn as ContactPersonRelated, wn as ContactRelation, pn as ContragentBase, vn as ContragentFactory, hn as ContragentIc, mn as ContragentPerson, _n as ContragentUlNr, gn as ContragentUlR, Dt as CostSourceEnum, M as CreatableIdentity, Rt as Curator, qr as DataSuggestionProvider, Ln as DateTimeProvider, zt as DeletableIdentity, P as DeletableNamedIdentity, Y as DeliveryAddress, Wn as Discount, Bn as DiscountClient, Gn as DiscountClientEligibility, Vn as DiscountConditions, qn as DiscountProvider, yt as DiscountShortInfo, Hn as DiscountStateEnum, Un as DiscountStateHelper, Kn as DiscountsListFilters, Jn as ExternalSeoFullInfo, Yn as ExternalSeoListFilters, Xn as ExternalSeoProvider, Qn as Faq, Zn as FaqGroup, $n as FaqProvider, Kt as FilterSettings, wt as HiddenCatalogableItem, Tt as Image, nr as ManagerDataFactory, ir as ManagerProvider, rr as ManagersListFilters, Br as MetaTagItem, Z as Offer, or as OfferActualization, ar as OfferActualizationStatus, pr as OfferHelper, sr as OfferShortInfo, fr as OffersDataProvider, lr as OffersListFilters, hr as OperatorFullInfo, _r as OperatorProvider, mr as OperatorShortInfo, gr as OperatorsListFilters, Q as Order, vr as OrderAction, yr as OrderEditorData, ur as OrderInfo, dr as OrderItem, Ot as OrderItemBase, Sn as OrderShortInfo, xr as OrderStatusHistoryInfo, Sr as OrdersDataProvider, br as OrdersListFilters, j as PaginationFiltersBase, wr as PriceAnalyze, Dr as PriceAnalyzeProvider, Ft as PriceCatalogableItem, Ar as PriceHistoryDataProvider, Or as PriceHistoryItem, I as PriceTemplate, Lt as PriceTemplateCategory, W as PriceTemplateClient, It as PriceTemplateICatalogableItem, Bt as PriceTemplateProduct, rn as PriceTemplateProvider, q as PricingRole, an as PricingRoleProvider, Et as PrimaryCatalogableItem, R as Product, $t as ProductCategoryDataProvider, en as ProductDataProvider, Mt as ProductFilterTypeEnum, bt as ProductPriceCoefficient, kr as ProductPriceHistory, St as ProductUnit, cr as ProfstroyOfferItem, on as PropertiesProvider, G as Property, K as PropertyValue, Nr as Reclamation, jr as ReclamationItem, Ir as ReclamationProvider, Mr as ReclamationShortInfo, $ as ReclamationStatusEnum, Fr as ReclamationStatusHelper, Pr as ReclamationsListFilters, Rr as RecommendationsDataProvider, Lr as RecommendationsList, zr as ReferenceDataFactory, Rn as STANDARD_PERIOD_GROUPS, zn as STANDARD_PERIOD_SECTIONS, Ur as SearchProductStatistic, Vr as Seo, Hr as SeoDataProvider, Wr as StatisticsProvider, xt as StockCount, Mn as TableDataPagination, jn as TableDataPaginationRequestParams, Nn as TableDataSortRequestParams, sn as TemplateProductCategoryDataProvider, Vt as TemplatesListFilters, tr as UnitsHelper, Dn as UnknownClientDataProvider, Jr as UserAuthDataProvider, Xr as UserRegion, Yr as UserRegionEmployee, Qr as UserRegionProvider, Zr as UserRegionsListFilters, F as UserShortInfo, On as VersionConfig, Cr as currentOrderInjectionKey, Pn as daysAgoIso, cn as findCatalogItemByIdRecursive, ln as flattenCatalogItems, er as formatPercentChange, In as formatRelativeDate, Fn as pluralize };