mp-front-cli 0.0.51 → 0.0.53

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 (82) hide show
  1. package/package.json +5 -1
  2. package/dist/core/errors/error-catalog.d.ts +0 -15
  3. package/dist/core/errors/error-catalog.d.ts.map +0 -1
  4. package/dist/core/errors/index.d.ts +0 -2
  5. package/dist/core/errors/index.d.ts.map +0 -1
  6. package/dist/core/errors/message-error.d.ts +0 -16
  7. package/dist/core/errors/message-error.d.ts.map +0 -1
  8. package/dist/core/index.d.ts +0 -6
  9. package/dist/core/index.d.ts.map +0 -1
  10. package/dist/core/interfaces/api-response.d.ts +0 -41
  11. package/dist/core/interfaces/api-response.d.ts.map +0 -1
  12. package/dist/core/interfaces/index.d.ts +0 -3
  13. package/dist/core/interfaces/index.d.ts.map +0 -1
  14. package/dist/core/interfaces/message.d.ts +0 -15
  15. package/dist/core/interfaces/message.d.ts.map +0 -1
  16. package/dist/core/interfaces/method.d.ts +0 -2
  17. package/dist/core/interfaces/method.d.ts.map +0 -1
  18. package/dist/core/interfaces/session.d.ts +0 -19
  19. package/dist/core/interfaces/session.d.ts.map +0 -1
  20. package/dist/core/middleware/index.d.ts +0 -17
  21. package/dist/core/middleware/index.d.ts.map +0 -1
  22. package/dist/core/services/index.d.ts +0 -2
  23. package/dist/core/services/index.d.ts.map +0 -1
  24. package/dist/core/services/service-token.d.ts +0 -13
  25. package/dist/core/services/service-token.d.ts.map +0 -1
  26. package/dist/core/utils/api-request/fetch-service-be.d.ts +0 -12
  27. package/dist/core/utils/api-request/fetch-service-be.d.ts.map +0 -1
  28. package/dist/core/utils/api-request/fetch-service-fe.d.ts +0 -14
  29. package/dist/core/utils/api-request/fetch-service-fe.d.ts.map +0 -1
  30. package/dist/core/utils/api-request/index.d.ts +0 -3
  31. package/dist/core/utils/api-request/index.d.ts.map +0 -1
  32. package/dist/core/utils/custom-cache.d.ts +0 -57
  33. package/dist/core/utils/custom-cache.d.ts.map +0 -1
  34. package/dist/core/utils/custom-encoder.d.ts +0 -8
  35. package/dist/core/utils/custom-encoder.d.ts.map +0 -1
  36. package/dist/core/utils/custom-encrypter.d.ts +0 -10
  37. package/dist/core/utils/custom-encrypter.d.ts.map +0 -1
  38. package/dist/core/utils/custom-header.d.ts +0 -9
  39. package/dist/core/utils/custom-header.d.ts.map +0 -1
  40. package/dist/core/utils/custom-logger.d.ts +0 -16
  41. package/dist/core/utils/custom-logger.d.ts.map +0 -1
  42. package/dist/core/utils/index.d.ts +0 -3
  43. package/dist/core/utils/index.d.ts.map +0 -1
  44. package/dist/core/utils/rxjs/index.d.ts +0 -4
  45. package/dist/core/utils/rxjs/index.d.ts.map +0 -1
  46. package/dist/core/utils/rxjs/loading-handler.d.ts +0 -7
  47. package/dist/core/utils/rxjs/loading-handler.d.ts.map +0 -1
  48. package/dist/core/utils/rxjs/message-handler.d.ts +0 -8
  49. package/dist/core/utils/rxjs/message-handler.d.ts.map +0 -1
  50. package/dist/core/utils/rxjs/rx-subject-manager.d.ts +0 -9
  51. package/dist/core/utils/rxjs/rx-subject-manager.d.ts.map +0 -1
  52. package/dist/custom-encoder-70a77460.js +0 -3734
  53. package/dist/custom-encrypter-8d9d2783.js +0 -20318
  54. package/dist/custom-header-17ded9ec.js +0 -866
  55. package/dist/index-df4e0539.js +0 -31
  56. package/dist/index.d.ts +0 -2
  57. package/dist/index.d.ts.map +0 -1
  58. package/dist/lang/common/errors/en_EN/index.d.ts +0 -5
  59. package/dist/lang/common/errors/en_EN/index.d.ts.map +0 -1
  60. package/dist/lang/common/errors/es_MX/index.d.ts +0 -30
  61. package/dist/lang/common/errors/es_MX/index.d.ts.map +0 -1
  62. package/dist/lang/common/errors/index.d.ts +0 -3
  63. package/dist/lang/common/errors/index.d.ts.map +0 -1
  64. package/dist/lang/common/index.d.ts +0 -2
  65. package/dist/lang/common/index.d.ts.map +0 -1
  66. package/dist/lang/index.d.ts +0 -3
  67. package/dist/lang/index.d.ts.map +0 -1
  68. package/dist/lang/validator/en_EN/index.d.ts +0 -5
  69. package/dist/lang/validator/en_EN/index.d.ts.map +0 -1
  70. package/dist/lang/validator/es_MX/index.d.ts +0 -41
  71. package/dist/lang/validator/es_MX/index.d.ts.map +0 -1
  72. package/dist/lang/validator/index.d.ts +0 -3
  73. package/dist/lang/validator/index.d.ts.map +0 -1
  74. package/dist/mp-front-cli-all.es.js +0 -19
  75. package/dist/mp-front-cli-cache.es.js +0 -6858
  76. package/dist/mp-front-cli-core.es.js +0 -1780
  77. package/dist/mp-front-cli-encoder.es.js +0 -5
  78. package/dist/mp-front-cli-encrypter.es.js +0 -7
  79. package/dist/mp-front-cli-header.es.js +0 -9
  80. package/dist/mp-front-cli-locale.es.js +0 -50
  81. package/dist/mp-front-cli-logger.es.js +0 -55
  82. package/dist/mp-front-cli-utils-rxjs.es.js +0 -46
@@ -1,866 +0,0 @@
1
- var G = Object.defineProperty;
2
- var J = (r, t, e) => t in r ? G(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var v = (r, t, e) => (J(r, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { switchMap as g, of as T, catchError as V } from "rxjs";
5
- import { CustomLogger as q } from "./mp-front-cli-logger.es.js";
6
- import { C as z } from "./custom-encrypter-8d9d2783.js";
7
- var O = function(r, t) {
8
- return O = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
9
- e.__proto__ = n;
10
- } || function(e, n) {
11
- for (var i in n)
12
- Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
13
- }, O(r, t);
14
- };
15
- function B(r, t) {
16
- if (typeof t != "function" && t !== null)
17
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
18
- O(r, t);
19
- function e() {
20
- this.constructor = r;
21
- }
22
- r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
23
- }
24
- var w = function() {
25
- return w = Object.assign || function(t) {
26
- for (var e, n = 1, i = arguments.length; n < i; n++) {
27
- e = arguments[n];
28
- for (var o in e)
29
- Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
30
- }
31
- return t;
32
- }, w.apply(this, arguments);
33
- };
34
- function Q(r, t) {
35
- var e = {};
36
- for (var n in r)
37
- Object.prototype.hasOwnProperty.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
38
- if (r != null && typeof Object.getOwnPropertySymbols == "function")
39
- for (var i = 0, n = Object.getOwnPropertySymbols(r); i < n.length; i++)
40
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (e[n[i]] = r[n[i]]);
41
- return e;
42
- }
43
- function X(r, t, e, n) {
44
- function i(o) {
45
- return o instanceof e ? o : new e(function(u) {
46
- u(o);
47
- });
48
- }
49
- return new (e || (e = Promise))(function(o, u) {
50
- function c(f) {
51
- try {
52
- s(n.next(f));
53
- } catch (y) {
54
- u(y);
55
- }
56
- }
57
- function a(f) {
58
- try {
59
- s(n.throw(f));
60
- } catch (y) {
61
- u(y);
62
- }
63
- }
64
- function s(f) {
65
- f.done ? o(f.value) : i(f.value).then(c, a);
66
- }
67
- s((n = n.apply(r, t || [])).next());
68
- });
69
- }
70
- function F(r, t) {
71
- var e = { label: 0, sent: function() {
72
- if (o[0] & 1)
73
- throw o[1];
74
- return o[1];
75
- }, trys: [], ops: [] }, n, i, o, u;
76
- return u = { next: c(0), throw: c(1), return: c(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
77
- return this;
78
- }), u;
79
- function c(s) {
80
- return function(f) {
81
- return a([s, f]);
82
- };
83
- }
84
- function a(s) {
85
- if (n)
86
- throw new TypeError("Generator is already executing.");
87
- for (; u && (u = 0, s[0] && (e = 0)), e; )
88
- try {
89
- if (n = 1, i && (o = s[0] & 2 ? i.return : s[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, s[1])).done)
90
- return o;
91
- switch (i = 0, o && (s = [s[0] & 2, o.value]), s[0]) {
92
- case 0:
93
- case 1:
94
- o = s;
95
- break;
96
- case 4:
97
- return e.label++, { value: s[1], done: !1 };
98
- case 5:
99
- e.label++, i = s[1], s = [0];
100
- continue;
101
- case 7:
102
- s = e.ops.pop(), e.trys.pop();
103
- continue;
104
- default:
105
- if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (s[0] === 6 || s[0] === 2)) {
106
- e = 0;
107
- continue;
108
- }
109
- if (s[0] === 3 && (!o || s[1] > o[0] && s[1] < o[3])) {
110
- e.label = s[1];
111
- break;
112
- }
113
- if (s[0] === 6 && e.label < o[1]) {
114
- e.label = o[1], o = s;
115
- break;
116
- }
117
- if (o && e.label < o[2]) {
118
- e.label = o[2], e.ops.push(s);
119
- break;
120
- }
121
- o[2] && e.ops.pop(), e.trys.pop();
122
- continue;
123
- }
124
- s = t.call(r, e);
125
- } catch (f) {
126
- s = [6, f], i = 0;
127
- } finally {
128
- n = o = 0;
129
- }
130
- if (s[0] & 5)
131
- throw s[1];
132
- return { value: s[0] ? s[1] : void 0, done: !0 };
133
- }
134
- }
135
- function _(r) {
136
- var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
137
- if (e)
138
- return e.call(r);
139
- if (r && typeof r.length == "number")
140
- return {
141
- next: function() {
142
- return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
143
- }
144
- };
145
- throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
146
- }
147
- function P(r, t) {
148
- var e = typeof Symbol == "function" && r[Symbol.iterator];
149
- if (!e)
150
- return r;
151
- var n = e.call(r), i, o = [], u;
152
- try {
153
- for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; )
154
- o.push(i.value);
155
- } catch (c) {
156
- u = { error: c };
157
- } finally {
158
- try {
159
- i && !i.done && (e = n.return) && e.call(n);
160
- } finally {
161
- if (u)
162
- throw u.error;
163
- }
164
- }
165
- return o;
166
- }
167
- function U(r, t, e) {
168
- if (e || arguments.length === 2)
169
- for (var n = 0, i = t.length, o; n < i; n++)
170
- (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
171
- return r.concat(o || Array.prototype.slice.call(t));
172
- }
173
- function m(r) {
174
- return this instanceof m ? (this.v = r, this) : new m(r);
175
- }
176
- function Z(r, t, e) {
177
- if (!Symbol.asyncIterator)
178
- throw new TypeError("Symbol.asyncIterator is not defined.");
179
- var n = e.apply(r, t || []), i, o = [];
180
- return i = {}, u("next"), u("throw"), u("return"), i[Symbol.asyncIterator] = function() {
181
- return this;
182
- }, i;
183
- function u(l) {
184
- n[l] && (i[l] = function(d) {
185
- return new Promise(function(A, p) {
186
- o.push([l, d, A, p]) > 1 || c(l, d);
187
- });
188
- });
189
- }
190
- function c(l, d) {
191
- try {
192
- a(n[l](d));
193
- } catch (A) {
194
- y(o[0][3], A);
195
- }
196
- }
197
- function a(l) {
198
- l.value instanceof m ? Promise.resolve(l.value.v).then(s, f) : y(o[0][2], l);
199
- }
200
- function s(l) {
201
- c("next", l);
202
- }
203
- function f(l) {
204
- c("throw", l);
205
- }
206
- function y(l, d) {
207
- l(d), o.shift(), o.length && c(o[0][0], o[0][1]);
208
- }
209
- }
210
- function N(r) {
211
- if (!Symbol.asyncIterator)
212
- throw new TypeError("Symbol.asyncIterator is not defined.");
213
- var t = r[Symbol.asyncIterator], e;
214
- return t ? t.call(r) : (r = typeof _ == "function" ? _(r) : r[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
215
- return this;
216
- }, e);
217
- function n(o) {
218
- e[o] = r[o] && function(u) {
219
- return new Promise(function(c, a) {
220
- u = r[o](u), i(c, a, u.done, u.value);
221
- });
222
- };
223
- }
224
- function i(o, u, c, a) {
225
- Promise.resolve(a).then(function(s) {
226
- o({ value: s, done: c });
227
- }, u);
228
- }
229
- }
230
- function h(r) {
231
- return typeof r == "function";
232
- }
233
- function rr(r) {
234
- var t = function(n) {
235
- Error.call(n), n.stack = new Error().stack;
236
- }, e = r(t);
237
- return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
238
- }
239
- var E = rr(function(r) {
240
- return function(e) {
241
- r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
242
- ` + e.map(function(n, i) {
243
- return i + 1 + ") " + n.toString();
244
- }).join(`
245
- `) : "", this.name = "UnsubscriptionError", this.errors = e;
246
- };
247
- });
248
- function k(r, t) {
249
- if (r) {
250
- var e = r.indexOf(t);
251
- 0 <= e && r.splice(e, 1);
252
- }
253
- }
254
- var x = function() {
255
- function r(t) {
256
- this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
257
- }
258
- return r.prototype.unsubscribe = function() {
259
- var t, e, n, i, o;
260
- if (!this.closed) {
261
- this.closed = !0;
262
- var u = this._parentage;
263
- if (u)
264
- if (this._parentage = null, Array.isArray(u))
265
- try {
266
- for (var c = _(u), a = c.next(); !a.done; a = c.next()) {
267
- var s = a.value;
268
- s.remove(this);
269
- }
270
- } catch (p) {
271
- t = { error: p };
272
- } finally {
273
- try {
274
- a && !a.done && (e = c.return) && e.call(c);
275
- } finally {
276
- if (t)
277
- throw t.error;
278
- }
279
- }
280
- else
281
- u.remove(this);
282
- var f = this.initialTeardown;
283
- if (h(f))
284
- try {
285
- f();
286
- } catch (p) {
287
- o = p instanceof E ? p.errors : [p];
288
- }
289
- var y = this._finalizers;
290
- if (y) {
291
- this._finalizers = null;
292
- try {
293
- for (var l = _(y), d = l.next(); !d.done; d = l.next()) {
294
- var A = d.value;
295
- try {
296
- j(A);
297
- } catch (p) {
298
- o = o ?? [], p instanceof E ? o = U(U([], P(o)), P(p.errors)) : o.push(p);
299
- }
300
- }
301
- } catch (p) {
302
- n = { error: p };
303
- } finally {
304
- try {
305
- d && !d.done && (i = l.return) && i.call(l);
306
- } finally {
307
- if (n)
308
- throw n.error;
309
- }
310
- }
311
- }
312
- if (o)
313
- throw new E(o);
314
- }
315
- }, r.prototype.add = function(t) {
316
- var e;
317
- if (t && t !== this)
318
- if (this.closed)
319
- j(t);
320
- else {
321
- if (t instanceof r) {
322
- if (t.closed || t._hasParent(this))
323
- return;
324
- t._addParent(this);
325
- }
326
- (this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
327
- }
328
- }, r.prototype._hasParent = function(t) {
329
- var e = this._parentage;
330
- return e === t || Array.isArray(e) && e.includes(t);
331
- }, r.prototype._addParent = function(t) {
332
- var e = this._parentage;
333
- this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
334
- }, r.prototype._removeParent = function(t) {
335
- var e = this._parentage;
336
- e === t ? this._parentage = null : Array.isArray(e) && k(e, t);
337
- }, r.prototype.remove = function(t) {
338
- var e = this._finalizers;
339
- e && k(e, t), t instanceof r && t._removeParent(this);
340
- }, r.EMPTY = function() {
341
- var t = new r();
342
- return t.closed = !0, t;
343
- }(), r;
344
- }();
345
- x.EMPTY;
346
- function $(r) {
347
- return r instanceof x || r && "closed" in r && h(r.remove) && h(r.add) && h(r.unsubscribe);
348
- }
349
- function j(r) {
350
- h(r) ? r() : r.unsubscribe();
351
- }
352
- var M = {
353
- onUnhandledError: null,
354
- onStoppedNotification: null,
355
- Promise: void 0,
356
- useDeprecatedSynchronousErrorHandling: !1,
357
- useDeprecatedNextContext: !1
358
- }, C = {
359
- setTimeout: function(r, t) {
360
- for (var e = [], n = 2; n < arguments.length; n++)
361
- e[n - 2] = arguments[n];
362
- var i = C.delegate;
363
- return i != null && i.setTimeout ? i.setTimeout.apply(i, U([r, t], P(e))) : setTimeout.apply(void 0, U([r, t], P(e)));
364
- },
365
- clearTimeout: function(r) {
366
- var t = C.delegate;
367
- return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
368
- },
369
- delegate: void 0
370
- };
371
- function Y(r) {
372
- C.setTimeout(function() {
373
- throw r;
374
- });
375
- }
376
- function D() {
377
- }
378
- function er(r) {
379
- r();
380
- }
381
- var R = function(r) {
382
- B(t, r);
383
- function t(e) {
384
- var n = r.call(this) || this;
385
- return n.isStopped = !1, e ? (n.destination = e, $(e) && e.add(n)) : n.destination = ir, n;
386
- }
387
- return t.create = function(e, n, i) {
388
- return new H(e, n, i);
389
- }, t.prototype.next = function(e) {
390
- this.isStopped || this._next(e);
391
- }, t.prototype.error = function(e) {
392
- this.isStopped || (this.isStopped = !0, this._error(e));
393
- }, t.prototype.complete = function() {
394
- this.isStopped || (this.isStopped = !0, this._complete());
395
- }, t.prototype.unsubscribe = function() {
396
- this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
397
- }, t.prototype._next = function(e) {
398
- this.destination.next(e);
399
- }, t.prototype._error = function(e) {
400
- try {
401
- this.destination.error(e);
402
- } finally {
403
- this.unsubscribe();
404
- }
405
- }, t.prototype._complete = function() {
406
- try {
407
- this.destination.complete();
408
- } finally {
409
- this.unsubscribe();
410
- }
411
- }, t;
412
- }(x), tr = Function.prototype.bind;
413
- function I(r, t) {
414
- return tr.call(r, t);
415
- }
416
- var nr = function() {
417
- function r(t) {
418
- this.partialObserver = t;
419
- }
420
- return r.prototype.next = function(t) {
421
- var e = this.partialObserver;
422
- if (e.next)
423
- try {
424
- e.next(t);
425
- } catch (n) {
426
- S(n);
427
- }
428
- }, r.prototype.error = function(t) {
429
- var e = this.partialObserver;
430
- if (e.error)
431
- try {
432
- e.error(t);
433
- } catch (n) {
434
- S(n);
435
- }
436
- else
437
- S(t);
438
- }, r.prototype.complete = function() {
439
- var t = this.partialObserver;
440
- if (t.complete)
441
- try {
442
- t.complete();
443
- } catch (e) {
444
- S(e);
445
- }
446
- }, r;
447
- }(), H = function(r) {
448
- B(t, r);
449
- function t(e, n, i) {
450
- var o = r.call(this) || this, u;
451
- if (h(e) || !e)
452
- u = {
453
- next: e ?? void 0,
454
- error: n ?? void 0,
455
- complete: i ?? void 0
456
- };
457
- else {
458
- var c;
459
- o && M.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
460
- return o.unsubscribe();
461
- }, u = {
462
- next: e.next && I(e.next, c),
463
- error: e.error && I(e.error, c),
464
- complete: e.complete && I(e.complete, c)
465
- }) : u = e;
466
- }
467
- return o.destination = new nr(u), o;
468
- }
469
- return t;
470
- }(R);
471
- function S(r) {
472
- Y(r);
473
- }
474
- function or(r) {
475
- throw r;
476
- }
477
- var ir = {
478
- closed: !0,
479
- next: D,
480
- error: or,
481
- complete: D
482
- };
483
- function ur(r, t, e, n, i) {
484
- return new sr(r, t, e, n, i);
485
- }
486
- var sr = function(r) {
487
- B(t, r);
488
- function t(e, n, i, o, u, c) {
489
- var a = r.call(this, e) || this;
490
- return a.onFinalize = u, a.shouldUnsubscribe = c, a._next = n ? function(s) {
491
- try {
492
- n(s);
493
- } catch (f) {
494
- e.error(f);
495
- }
496
- } : r.prototype._next, a._error = o ? function(s) {
497
- try {
498
- o(s);
499
- } catch (f) {
500
- e.error(f);
501
- } finally {
502
- this.unsubscribe();
503
- }
504
- } : r.prototype._error, a._complete = i ? function() {
505
- try {
506
- i();
507
- } catch (s) {
508
- e.error(s);
509
- } finally {
510
- this.unsubscribe();
511
- }
512
- } : r.prototype._complete, a;
513
- }
514
- return t.prototype.unsubscribe = function() {
515
- var e;
516
- if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
517
- var n = this.closed;
518
- r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
519
- }
520
- }, t;
521
- }(R), K = function() {
522
- return typeof Symbol == "function" && Symbol.observable || "@@observable";
523
- }();
524
- function cr(r) {
525
- return r;
526
- }
527
- function ar(r) {
528
- return r.length === 0 ? cr : r.length === 1 ? r[0] : function(e) {
529
- return r.reduce(function(n, i) {
530
- return i(n);
531
- }, e);
532
- };
533
- }
534
- var b = function() {
535
- function r(t) {
536
- t && (this._subscribe = t);
537
- }
538
- return r.prototype.lift = function(t) {
539
- var e = new r();
540
- return e.source = this, e.operator = t, e;
541
- }, r.prototype.subscribe = function(t, e, n) {
542
- var i = this, o = fr(t) ? t : new H(t, e, n);
543
- return er(function() {
544
- var u = i, c = u.operator, a = u.source;
545
- o.add(c ? c.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
546
- }), o;
547
- }, r.prototype._trySubscribe = function(t) {
548
- try {
549
- return this._subscribe(t);
550
- } catch (e) {
551
- t.error(e);
552
- }
553
- }, r.prototype.forEach = function(t, e) {
554
- var n = this;
555
- return e = L(e), new e(function(i, o) {
556
- var u = new H({
557
- next: function(c) {
558
- try {
559
- t(c);
560
- } catch (a) {
561
- o(a), u.unsubscribe();
562
- }
563
- },
564
- error: o,
565
- complete: i
566
- });
567
- n.subscribe(u);
568
- });
569
- }, r.prototype._subscribe = function(t) {
570
- var e;
571
- return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
572
- }, r.prototype[K] = function() {
573
- return this;
574
- }, r.prototype.pipe = function() {
575
- for (var t = [], e = 0; e < arguments.length; e++)
576
- t[e] = arguments[e];
577
- return ar(t)(this);
578
- }, r.prototype.toPromise = function(t) {
579
- var e = this;
580
- return t = L(t), new t(function(n, i) {
581
- var o;
582
- e.subscribe(function(u) {
583
- return o = u;
584
- }, function(u) {
585
- return i(u);
586
- }, function() {
587
- return n(o);
588
- });
589
- });
590
- }, r.create = function(t) {
591
- return new r(t);
592
- }, r;
593
- }();
594
- function L(r) {
595
- var t;
596
- return (t = r ?? M.Promise) !== null && t !== void 0 ? t : Promise;
597
- }
598
- function lr(r) {
599
- return r && h(r.next) && h(r.error) && h(r.complete);
600
- }
601
- function fr(r) {
602
- return r && r instanceof R || lr(r) && $(r);
603
- }
604
- var hr = function(r) {
605
- return r && typeof r.length == "number" && typeof r != "function";
606
- };
607
- function pr(r) {
608
- return h(r == null ? void 0 : r.then);
609
- }
610
- function yr(r) {
611
- return h(r[K]);
612
- }
613
- function dr(r) {
614
- return Symbol.asyncIterator && h(r == null ? void 0 : r[Symbol.asyncIterator]);
615
- }
616
- function vr(r) {
617
- return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
618
- }
619
- function br() {
620
- return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
621
- }
622
- var mr = br();
623
- function Ar(r) {
624
- return h(r == null ? void 0 : r[mr]);
625
- }
626
- function _r(r) {
627
- return Z(this, arguments, function() {
628
- var e, n, i, o;
629
- return F(this, function(u) {
630
- switch (u.label) {
631
- case 0:
632
- e = r.getReader(), u.label = 1;
633
- case 1:
634
- u.trys.push([1, , 9, 10]), u.label = 2;
635
- case 2:
636
- return [4, m(e.read())];
637
- case 3:
638
- return n = u.sent(), i = n.value, o = n.done, o ? [4, m(void 0)] : [3, 5];
639
- case 4:
640
- return [2, u.sent()];
641
- case 5:
642
- return [4, m(i)];
643
- case 6:
644
- return [4, u.sent()];
645
- case 7:
646
- return u.sent(), [3, 2];
647
- case 8:
648
- return [3, 10];
649
- case 9:
650
- return e.releaseLock(), [7];
651
- case 10:
652
- return [2];
653
- }
654
- });
655
- });
656
- }
657
- function Sr(r) {
658
- return h(r == null ? void 0 : r.getReader);
659
- }
660
- function gr(r) {
661
- if (r instanceof b)
662
- return r;
663
- if (r != null) {
664
- if (yr(r))
665
- return Tr(r);
666
- if (hr(r))
667
- return wr(r);
668
- if (pr(r))
669
- return Pr(r);
670
- if (dr(r))
671
- return W(r);
672
- if (Ar(r))
673
- return Ur(r);
674
- if (Sr(r))
675
- return Er(r);
676
- }
677
- throw vr(r);
678
- }
679
- function Tr(r) {
680
- return new b(function(t) {
681
- var e = r[K]();
682
- if (h(e.subscribe))
683
- return e.subscribe(t);
684
- throw new TypeError("Provided object does not correctly implement Symbol.observable");
685
- });
686
- }
687
- function wr(r) {
688
- return new b(function(t) {
689
- for (var e = 0; e < r.length && !t.closed; e++)
690
- t.next(r[e]);
691
- t.complete();
692
- });
693
- }
694
- function Pr(r) {
695
- return new b(function(t) {
696
- r.then(function(e) {
697
- t.closed || (t.next(e), t.complete());
698
- }, function(e) {
699
- return t.error(e);
700
- }).then(null, Y);
701
- });
702
- }
703
- function Ur(r) {
704
- return new b(function(t) {
705
- var e, n;
706
- try {
707
- for (var i = _(r), o = i.next(); !o.done; o = i.next()) {
708
- var u = o.value;
709
- if (t.next(u), t.closed)
710
- return;
711
- }
712
- } catch (c) {
713
- e = { error: c };
714
- } finally {
715
- try {
716
- o && !o.done && (n = i.return) && n.call(i);
717
- } finally {
718
- if (e)
719
- throw e.error;
720
- }
721
- }
722
- t.complete();
723
- });
724
- }
725
- function W(r) {
726
- return new b(function(t) {
727
- Ir(r, t).catch(function(e) {
728
- return t.error(e);
729
- });
730
- });
731
- }
732
- function Er(r) {
733
- return W(_r(r));
734
- }
735
- function Ir(r, t) {
736
- var e, n, i, o;
737
- return X(this, void 0, void 0, function() {
738
- var u, c;
739
- return F(this, function(a) {
740
- switch (a.label) {
741
- case 0:
742
- a.trys.push([0, 5, 6, 11]), e = N(r), a.label = 1;
743
- case 1:
744
- return [4, e.next()];
745
- case 2:
746
- if (n = a.sent(), !!n.done)
747
- return [3, 4];
748
- if (u = n.value, t.next(u), t.closed)
749
- return [2];
750
- a.label = 3;
751
- case 3:
752
- return [3, 1];
753
- case 4:
754
- return [3, 11];
755
- case 5:
756
- return c = a.sent(), i = { error: c }, [3, 11];
757
- case 6:
758
- return a.trys.push([6, , 9, 10]), n && !n.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
759
- case 7:
760
- a.sent(), a.label = 8;
761
- case 8:
762
- return [3, 10];
763
- case 9:
764
- if (i)
765
- throw i.error;
766
- return [7];
767
- case 10:
768
- return [7];
769
- case 11:
770
- return t.complete(), [2];
771
- }
772
- });
773
- });
774
- }
775
- function Or(r, t) {
776
- t === void 0 && (t = {});
777
- var e = t.selector, n = Q(t, ["selector"]);
778
- return new b(function(i) {
779
- var o = new AbortController(), u = o.signal, c = !0, a = n.signal;
780
- if (a)
781
- if (a.aborted)
782
- o.abort();
783
- else {
784
- var s = function() {
785
- u.aborted || o.abort();
786
- };
787
- a.addEventListener("abort", s), i.add(function() {
788
- return a.removeEventListener("abort", s);
789
- });
790
- }
791
- var f = w(w({}, n), { signal: u }), y = function(l) {
792
- c = !1, i.error(l);
793
- };
794
- return fetch(r, f).then(function(l) {
795
- e ? gr(e(l)).subscribe(ur(i, void 0, function() {
796
- c = !1, i.complete();
797
- }, y)) : (c = !1, i.next(l), i.complete());
798
- }).catch(y), function() {
799
- c && o.abort();
800
- };
801
- });
802
- }
803
- class Cr extends q {
804
- constructor() {
805
- super();
806
- v(this, "API_AUTH_BACK_URL");
807
- v(this, "API_AUTH_BACK_USERNAME_AUTH");
808
- v(this, "API_AUTH_BACK_PASSWORD_AUTH");
809
- v(this, "API_AUTH_BACK_USER");
810
- v(this, "API_AUTH_BACK_SCOPE");
811
- v(this, "API_AUTH_BACK_PASSWORD");
812
- v(this, "headers");
813
- this.API_AUTH_BACK_URL = process.env.API_AUTH_BACK_URL, this.API_AUTH_BACK_USERNAME_AUTH = process.env.API_AUTH_BACK_USERNAME_AUTH, this.API_AUTH_BACK_PASSWORD_AUTH = process.env.API_AUTH_BACK_PASSWORD_AUTH, this.API_AUTH_BACK_USER = process.env.API_AUTH_BACK_USER, this.API_AUTH_BACK_SCOPE = process.env.API_AUTH_BACK_SCOPE, this.API_AUTH_BACK_PASSWORD = process.env.API_AUTH_BACK_PASSWORD;
814
- const e = `${this.API_AUTH_BACK_USERNAME_AUTH}:${this.API_AUTH_BACK_PASSWORD_AUTH}`, n = Buffer.from(e).toString("base64");
815
- this.headers = {
816
- Accept: "application/json",
817
- "Content-Type": "application/json;charset=UTF-8",
818
- Authorization: `Basic ${n}`
819
- };
820
- }
821
- get() {
822
- return this.logDebug("get ServiceToken"), Or(this.API_AUTH_BACK_URL, {
823
- method: "POST",
824
- headers: this.headers,
825
- body: JSON.stringify({
826
- user: this.API_AUTH_BACK_USER,
827
- scope: this.API_AUTH_BACK_SCOPE,
828
- password: this.API_AUTH_BACK_PASSWORD
829
- })
830
- }).pipe(
831
- g((e) => e.json()),
832
- g((e) => {
833
- var n;
834
- return this.logDebug(
835
- `ServiceToken <URL>: \x1B[33m ${this.API_AUTH_BACK_URL} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(this.headers)} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(e)} \x1B[37m`
836
- ), T(((n = e == null ? void 0 : e.data) == null ? void 0 : n.Token) || "");
837
- }),
838
- V((e) => (this.logError(`ServiceToken ${e}`), T("")))
839
- );
840
- }
841
- }
842
- class Kr extends z {
843
- constructor() {
844
- super();
845
- v(this, "headers");
846
- this.headers = {
847
- Accept: "application/json",
848
- "Content-Type": "application/json"
849
- };
850
- }
851
- addTokenBackend(e) {
852
- return this.logDebug("addTokenBackend CustomHeader", JSON.stringify(e)), new Cr().get().pipe(
853
- g((n) => T({ ...e, Authorization: `Bearer ${n}` }))
854
- );
855
- }
856
- getHeaders() {
857
- return this.logDebug("getHeaders CustomHeader"), T({
858
- ...this.headers
859
- }).pipe(g((e) => this.addTokenBackend(e)));
860
- }
861
- }
862
- export {
863
- Kr as C,
864
- Cr as S,
865
- Or as f
866
- };