@mp-front/common 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +1 -0
  2. package/dist/adapters/index.d.ts +2 -0
  3. package/dist/adapters/index.d.ts.map +1 -0
  4. package/dist/adapters/redis-adapter.d.ts +15 -0
  5. package/dist/adapters/redis-adapter.d.ts.map +1 -0
  6. package/dist/auth/authorization-service.d.ts +11 -0
  7. package/dist/auth/authorization-service.d.ts.map +1 -0
  8. package/dist/auth/index.d.ts +2 -0
  9. package/dist/auth/index.d.ts.map +1 -0
  10. package/dist/authorization-service-DE-hoYji.js +48 -0
  11. package/dist/authorization-service-DkLS18Us.cjs +1 -0
  12. package/dist/cache/index.d.ts +3 -0
  13. package/dist/cache/index.d.ts.map +1 -0
  14. package/dist/cache/session-handler/constants/index.d.ts +6 -0
  15. package/dist/cache/session-handler/constants/index.d.ts.map +1 -0
  16. package/dist/cache/session-handler/index.d.ts +2 -0
  17. package/dist/cache/session-handler/index.d.ts.map +1 -0
  18. package/dist/cache/session-handler/session-cache.d.ts +52 -0
  19. package/dist/cache/session-handler/session-cache.d.ts.map +1 -0
  20. package/dist/cache/session-handler/types/index.d.ts +37 -0
  21. package/dist/cache/session-handler/types/index.d.ts.map +1 -0
  22. package/dist/cache/terminal-handler/constants/environments.d.ts +3 -0
  23. package/dist/cache/terminal-handler/constants/environments.d.ts.map +1 -0
  24. package/dist/cache/terminal-handler/constants/identifier.d.ts +3 -0
  25. package/dist/cache/terminal-handler/constants/identifier.d.ts.map +1 -0
  26. package/dist/cache/terminal-handler/constants/index.d.ts +3 -0
  27. package/dist/cache/terminal-handler/constants/index.d.ts.map +1 -0
  28. package/dist/cache/terminal-handler/index.d.ts +2 -0
  29. package/dist/cache/terminal-handler/index.d.ts.map +1 -0
  30. package/dist/cache/terminal-handler/terminal.d.ts +11 -0
  31. package/dist/cache/terminal-handler/terminal.d.ts.map +1 -0
  32. package/dist/cache/terminal-handler/types/index.d.ts +2 -0
  33. package/dist/cache/terminal-handler/types/index.d.ts.map +1 -0
  34. package/dist/cache/terminal-handler/types/terminal.d.ts +7 -0
  35. package/dist/cache/terminal-handler/types/terminal.d.ts.map +1 -0
  36. package/dist/cache-providers/index.d.ts +2 -0
  37. package/dist/cache-providers/index.d.ts.map +1 -0
  38. package/dist/cache-providers/redis/index.d.ts +2 -0
  39. package/dist/cache-providers/redis/index.d.ts.map +1 -0
  40. package/dist/cache-providers/redis/ioredis-instance.d.ts +3 -0
  41. package/dist/cache-providers/redis/ioredis-instance.d.ts.map +1 -0
  42. package/dist/cache-providers/redis/redis-cache.d.ts +23 -0
  43. package/dist/cache-providers/redis/redis-cache.d.ts.map +1 -0
  44. package/dist/cache-providers/redis/types/index.d.ts +37 -0
  45. package/dist/cache-providers/redis/types/index.d.ts.map +1 -0
  46. package/dist/client-Btua9wfS.js +230 -0
  47. package/dist/client-Bv9OflsW.cjs +1 -0
  48. package/dist/default-errors-DiEIEEE2.cjs +1 -0
  49. package/dist/default-errors-DsKmUZbG.js +59 -0
  50. package/dist/encoder-BEp9qfLf.cjs +1 -0
  51. package/dist/encoder-CXAlLf5T.js +39 -0
  52. package/dist/encrypter-CgZLhLnj.cjs +1 -0
  53. package/dist/encrypter-ZTjrp3uD.js +54 -0
  54. package/dist/engine/auth-engine.d.ts +29 -0
  55. package/dist/engine/auth-engine.d.ts.map +1 -0
  56. package/dist/engine/entra-id.d.ts +12 -0
  57. package/dist/engine/entra-id.d.ts.map +1 -0
  58. package/dist/engine/index.d.ts +2 -0
  59. package/dist/engine/index.d.ts.map +1 -0
  60. package/dist/engine/types/index.d.ts +51 -0
  61. package/dist/engine/types/index.d.ts.map +1 -0
  62. package/dist/errors/default-errors.d.ts +31 -0
  63. package/dist/errors/default-errors.d.ts.map +1 -0
  64. package/dist/errors/error-handler.d.ts +8 -0
  65. package/dist/errors/error-handler.d.ts.map +1 -0
  66. package/dist/errors/i18n.d.ts +30 -0
  67. package/dist/errors/i18n.d.ts.map +1 -0
  68. package/dist/errors/index.d.ts +6 -0
  69. package/dist/errors/index.d.ts.map +1 -0
  70. package/dist/errors/runtime-error-code.d.ts +16 -0
  71. package/dist/errors/runtime-error-code.d.ts.map +1 -0
  72. package/dist/errors/runtime-error.d.ts +6 -0
  73. package/dist/errors/runtime-error.d.ts.map +1 -0
  74. package/dist/fetch-BZP9DZLg.cjs +3 -0
  75. package/dist/fetch-CUIb9XhZ.js +761 -0
  76. package/dist/helpers/encoder.d.ts +8 -0
  77. package/dist/helpers/encoder.d.ts.map +1 -0
  78. package/dist/helpers/encrypter.d.ts +10 -0
  79. package/dist/helpers/encrypter.d.ts.map +1 -0
  80. package/dist/helpers/escape-unicode.d.ts +2 -0
  81. package/dist/helpers/escape-unicode.d.ts.map +1 -0
  82. package/dist/helpers/index.d.ts +5 -0
  83. package/dist/helpers/index.d.ts.map +1 -0
  84. package/dist/helpers/logger.d.ts +16 -0
  85. package/dist/helpers/logger.d.ts.map +1 -0
  86. package/dist/http/backend.d.ts +18 -0
  87. package/dist/http/backend.d.ts.map +1 -0
  88. package/dist/http/client.d.ts +20 -0
  89. package/dist/http/client.d.ts.map +1 -0
  90. package/dist/http/headers.d.ts +9 -0
  91. package/dist/http/headers.d.ts.map +1 -0
  92. package/dist/http/index.d.ts +4 -0
  93. package/dist/http/index.d.ts.map +1 -0
  94. package/dist/http/types/http-options.d.ts +13 -0
  95. package/dist/http/types/http-options.d.ts.map +1 -0
  96. package/dist/http/types/index.d.ts +5 -0
  97. package/dist/http/types/index.d.ts.map +1 -0
  98. package/dist/http/types/method.d.ts +2 -0
  99. package/dist/http/types/method.d.ts.map +1 -0
  100. package/dist/http/types/request-config.d.ts +10 -0
  101. package/dist/http/types/request-config.d.ts.map +1 -0
  102. package/dist/http/types/response.d.ts +39 -0
  103. package/dist/http/types/response.d.ts.map +1 -0
  104. package/dist/i18n-CEBemBIX.js +31 -0
  105. package/dist/i18n-vIm9wuAG.cjs +1 -0
  106. package/dist/index.d.ts +4 -0
  107. package/dist/index.d.ts.map +1 -0
  108. package/dist/ioredis-instance-BaXfqmqC.js +11 -0
  109. package/dist/ioredis-instance-PenLE7vi.cjs +1 -0
  110. package/dist/loading-handler-BrN0O37N.cjs +1 -0
  111. package/dist/loading-handler-ivYFmS_V.js +17 -0
  112. package/dist/lodash-DNCgFYS7.cjs +27 -0
  113. package/dist/lodash-QjAkD17S.js +3677 -0
  114. package/dist/logger-BMbeDoGU.cjs +1 -0
  115. package/dist/logger-DtlFWyFO.js +60 -0
  116. package/dist/middleware/api-middleware.d.ts +22 -0
  117. package/dist/middleware/api-middleware.d.ts.map +1 -0
  118. package/dist/middleware/index.d.ts +2 -0
  119. package/dist/middleware/index.d.ts.map +1 -0
  120. package/dist/middleware/types/index.d.ts +2 -0
  121. package/dist/middleware/types/index.d.ts.map +1 -0
  122. package/dist/mp-front-common-adapters.cjs +1 -0
  123. package/dist/mp-front-common-adapters.js +169 -0
  124. package/dist/mp-front-common-all.cjs +1 -0
  125. package/dist/mp-front-common-all.js +126 -0
  126. package/dist/mp-front-common-auth.cjs +1 -0
  127. package/dist/mp-front-common-auth.js +4 -0
  128. package/dist/mp-front-common-cache.cjs +1 -0
  129. package/dist/mp-front-common-cache.js +132 -0
  130. package/dist/mp-front-common-cacheProviders.cjs +1 -0
  131. package/dist/mp-front-common-cacheProviders.js +4 -0
  132. package/dist/mp-front-common-engine.cjs +1 -0
  133. package/dist/mp-front-common-engine.js +185 -0
  134. package/dist/mp-front-common-errors.cjs +1 -0
  135. package/dist/mp-front-common-errors.js +9 -0
  136. package/dist/mp-front-common-helpers.cjs +1 -0
  137. package/dist/mp-front-common-helpers.js +9 -0
  138. package/dist/mp-front-common-http.cjs +1 -0
  139. package/dist/mp-front-common-http.js +6 -0
  140. package/dist/mp-front-common-rxjs.cjs +1 -0
  141. package/dist/mp-front-common-rxjs.js +4 -0
  142. package/dist/redis-cache-BoKAFYQi.js +83 -0
  143. package/dist/redis-cache-DjKTqllz.cjs +1 -0
  144. package/dist/rx-subject-manager-ZC9CWBWH.cjs +1 -0
  145. package/dist/rx-subject-manager-_4urHn8A.js +24 -0
  146. package/dist/rxjs/index.d.ts +2 -0
  147. package/dist/rxjs/index.d.ts.map +1 -0
  148. package/dist/rxjs/loading-handler.d.ts +7 -0
  149. package/dist/rxjs/loading-handler.d.ts.map +1 -0
  150. package/dist/rxjs/rx-subject-manager.d.ts +9 -0
  151. package/dist/rxjs/rx-subject-manager.d.ts.map +1 -0
  152. package/dist/stringify-93tp0umt.js +9 -0
  153. package/dist/stringify-BN6t_WDt.cjs +1 -0
  154. package/dist/types.d.ts +4 -0
  155. package/dist/types.d.ts.map +1 -0
  156. package/dist/v5-BTqP79vV.cjs +1 -0
  157. package/dist/v5-Cu1sjPlx.js +91 -0
  158. package/package.json +107 -0
@@ -0,0 +1,761 @@
1
+ var x = function(r, t) {
2
+ return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
3
+ e.__proto__ = n;
4
+ } || function(e, n) {
5
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
6
+ }, x(r, t);
7
+ };
8
+ function P(r, t) {
9
+ if (typeof t != "function" && t !== null)
10
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
11
+ x(r, t);
12
+ function e() {
13
+ this.constructor = r;
14
+ }
15
+ r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
16
+ }
17
+ var g = function() {
18
+ return g = Object.assign || function(t) {
19
+ for (var e, n = 1, i = arguments.length; n < i; n++) {
20
+ e = arguments[n];
21
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
22
+ }
23
+ return t;
24
+ }, g.apply(this, arguments);
25
+ };
26
+ function B(r, t) {
27
+ var e = {};
28
+ for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && t.indexOf(n) < 0 && (e[n] = r[n]);
29
+ if (r != null && typeof Object.getOwnPropertySymbols == "function")
30
+ for (var i = 0, n = Object.getOwnPropertySymbols(r); i < n.length; i++)
31
+ t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(r, n[i]) && (e[n[i]] = r[n[i]]);
32
+ return e;
33
+ }
34
+ function C(r, t, e, n) {
35
+ function i(o) {
36
+ return o instanceof e ? o : new e(function(u) {
37
+ u(o);
38
+ });
39
+ }
40
+ return new (e || (e = Promise))(function(o, u) {
41
+ function s(l) {
42
+ try {
43
+ c(n.next(l));
44
+ } catch (p) {
45
+ u(p);
46
+ }
47
+ }
48
+ function a(l) {
49
+ try {
50
+ c(n.throw(l));
51
+ } catch (p) {
52
+ u(p);
53
+ }
54
+ }
55
+ function c(l) {
56
+ l.done ? o(l.value) : i(l.value).then(s, a);
57
+ }
58
+ c((n = n.apply(r, t || [])).next());
59
+ });
60
+ }
61
+ function F(r, t) {
62
+ var e = { label: 0, sent: function() {
63
+ if (o[0] & 1) throw o[1];
64
+ return o[1];
65
+ }, trys: [], ops: [] }, n, i, o, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
66
+ return u.next = s(0), u.throw = s(1), u.return = s(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
67
+ return this;
68
+ }), u;
69
+ function s(c) {
70
+ return function(l) {
71
+ return a([c, l]);
72
+ };
73
+ }
74
+ function a(c) {
75
+ if (n) throw new TypeError("Generator is already executing.");
76
+ for (; u && (u = 0, c[0] && (e = 0)), e; ) try {
77
+ if (n = 1, i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, c[1])).done) return o;
78
+ switch (i = 0, o && (c = [c[0] & 2, o.value]), c[0]) {
79
+ case 0:
80
+ case 1:
81
+ o = c;
82
+ break;
83
+ case 4:
84
+ return e.label++, { value: c[1], done: !1 };
85
+ case 5:
86
+ e.label++, i = c[1], c = [0];
87
+ continue;
88
+ case 7:
89
+ c = e.ops.pop(), e.trys.pop();
90
+ continue;
91
+ default:
92
+ if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
93
+ e = 0;
94
+ continue;
95
+ }
96
+ if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
97
+ e.label = c[1];
98
+ break;
99
+ }
100
+ if (c[0] === 6 && e.label < o[1]) {
101
+ e.label = o[1], o = c;
102
+ break;
103
+ }
104
+ if (o && e.label < o[2]) {
105
+ e.label = o[2], e.ops.push(c);
106
+ break;
107
+ }
108
+ o[2] && e.ops.pop(), e.trys.pop();
109
+ continue;
110
+ }
111
+ c = t.call(r, e);
112
+ } catch (l) {
113
+ c = [6, l], i = 0;
114
+ } finally {
115
+ n = o = 0;
116
+ }
117
+ if (c[0] & 5) throw c[1];
118
+ return { value: c[0] ? c[1] : void 0, done: !0 };
119
+ }
120
+ }
121
+ function w(r) {
122
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], n = 0;
123
+ if (e) return e.call(r);
124
+ if (r && typeof r.length == "number") return {
125
+ next: function() {
126
+ return r && n >= r.length && (r = void 0), { value: r && r[n++], done: !r };
127
+ }
128
+ };
129
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
130
+ }
131
+ function E(r, t) {
132
+ var e = typeof Symbol == "function" && r[Symbol.iterator];
133
+ if (!e) return r;
134
+ var n = e.call(r), i, o = [], u;
135
+ try {
136
+ for (; (t === void 0 || t-- > 0) && !(i = n.next()).done; ) o.push(i.value);
137
+ } catch (s) {
138
+ u = { error: s };
139
+ } finally {
140
+ try {
141
+ i && !i.done && (e = n.return) && e.call(n);
142
+ } finally {
143
+ if (u) throw u.error;
144
+ }
145
+ }
146
+ return o;
147
+ }
148
+ function _(r, t, e) {
149
+ if (e || arguments.length === 2) for (var n = 0, i = t.length, o; n < i; n++)
150
+ (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
151
+ return r.concat(o || Array.prototype.slice.call(t));
152
+ }
153
+ function m(r) {
154
+ return this instanceof m ? (this.v = r, this) : new m(r);
155
+ }
156
+ function D(r, t, e) {
157
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
158
+ var n = e.apply(r, t || []), i, o = [];
159
+ return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", u), i[Symbol.asyncIterator] = function() {
160
+ return this;
161
+ }, i;
162
+ function u(f) {
163
+ return function(d) {
164
+ return Promise.resolve(d).then(f, p);
165
+ };
166
+ }
167
+ function s(f, d) {
168
+ n[f] && (i[f] = function(y) {
169
+ return new Promise(function(V, q) {
170
+ o.push([f, y, V, q]) > 1 || a(f, y);
171
+ });
172
+ }, d && (i[f] = d(i[f])));
173
+ }
174
+ function a(f, d) {
175
+ try {
176
+ c(n[f](d));
177
+ } catch (y) {
178
+ v(o[0][3], y);
179
+ }
180
+ }
181
+ function c(f) {
182
+ f.value instanceof m ? Promise.resolve(f.value.v).then(l, p) : v(o[0][2], f);
183
+ }
184
+ function l(f) {
185
+ a("next", f);
186
+ }
187
+ function p(f) {
188
+ a("throw", f);
189
+ }
190
+ function v(f, d) {
191
+ f(d), o.shift(), o.length && a(o[0][0], o[0][1]);
192
+ }
193
+ }
194
+ function H(r) {
195
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
196
+ var t = r[Symbol.asyncIterator], e;
197
+ return t ? t.call(r) : (r = typeof w == "function" ? w(r) : r[Symbol.iterator](), e = {}, n("next"), n("throw"), n("return"), e[Symbol.asyncIterator] = function() {
198
+ return this;
199
+ }, e);
200
+ function n(o) {
201
+ e[o] = r[o] && function(u) {
202
+ return new Promise(function(s, a) {
203
+ u = r[o](u), i(s, a, u.done, u.value);
204
+ });
205
+ };
206
+ }
207
+ function i(o, u, s, a) {
208
+ Promise.resolve(a).then(function(c) {
209
+ o({ value: c, done: s });
210
+ }, u);
211
+ }
212
+ }
213
+ function h(r) {
214
+ return typeof r == "function";
215
+ }
216
+ function J(r) {
217
+ var t = function(n) {
218
+ Error.call(n), n.stack = new Error().stack;
219
+ }, e = r(t);
220
+ return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
221
+ }
222
+ var O = J(function(r) {
223
+ return function(e) {
224
+ r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
225
+ ` + e.map(function(n, i) {
226
+ return i + 1 + ") " + n.toString();
227
+ }).join(`
228
+ `) : "", this.name = "UnsubscriptionError", this.errors = e;
229
+ };
230
+ });
231
+ function k(r, t) {
232
+ if (r) {
233
+ var e = r.indexOf(t);
234
+ 0 <= e && r.splice(e, 1);
235
+ }
236
+ }
237
+ var A = (function() {
238
+ function r(t) {
239
+ this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
240
+ }
241
+ return r.prototype.unsubscribe = function() {
242
+ var t, e, n, i, o;
243
+ if (!this.closed) {
244
+ this.closed = !0;
245
+ var u = this._parentage;
246
+ if (u)
247
+ if (this._parentage = null, Array.isArray(u))
248
+ try {
249
+ for (var s = w(u), a = s.next(); !a.done; a = s.next()) {
250
+ var c = a.value;
251
+ c.remove(this);
252
+ }
253
+ } catch (y) {
254
+ t = { error: y };
255
+ } finally {
256
+ try {
257
+ a && !a.done && (e = s.return) && e.call(s);
258
+ } finally {
259
+ if (t) throw t.error;
260
+ }
261
+ }
262
+ else
263
+ u.remove(this);
264
+ var l = this.initialTeardown;
265
+ if (h(l))
266
+ try {
267
+ l();
268
+ } catch (y) {
269
+ o = y instanceof O ? y.errors : [y];
270
+ }
271
+ var p = this._finalizers;
272
+ if (p) {
273
+ this._finalizers = null;
274
+ try {
275
+ for (var v = w(p), f = v.next(); !f.done; f = v.next()) {
276
+ var d = f.value;
277
+ try {
278
+ L(d);
279
+ } catch (y) {
280
+ o = o ?? [], y instanceof O ? o = _(_([], E(o)), E(y.errors)) : o.push(y);
281
+ }
282
+ }
283
+ } catch (y) {
284
+ n = { error: y };
285
+ } finally {
286
+ try {
287
+ f && !f.done && (i = v.return) && i.call(v);
288
+ } finally {
289
+ if (n) throw n.error;
290
+ }
291
+ }
292
+ }
293
+ if (o)
294
+ throw new O(o);
295
+ }
296
+ }, r.prototype.add = function(t) {
297
+ var e;
298
+ if (t && t !== this)
299
+ if (this.closed)
300
+ L(t);
301
+ else {
302
+ if (t instanceof r) {
303
+ if (t.closed || t._hasParent(this))
304
+ return;
305
+ t._addParent(this);
306
+ }
307
+ (this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
308
+ }
309
+ }, r.prototype._hasParent = function(t) {
310
+ var e = this._parentage;
311
+ return e === t || Array.isArray(e) && e.includes(t);
312
+ }, r.prototype._addParent = function(t) {
313
+ var e = this._parentage;
314
+ this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
315
+ }, r.prototype._removeParent = function(t) {
316
+ var e = this._parentage;
317
+ e === t ? this._parentage = null : Array.isArray(e) && k(e, t);
318
+ }, r.prototype.remove = function(t) {
319
+ var e = this._finalizers;
320
+ e && k(e, t), t instanceof r && t._removeParent(this);
321
+ }, r.EMPTY = (function() {
322
+ var t = new r();
323
+ return t.closed = !0, t;
324
+ })(), r;
325
+ })();
326
+ A.EMPTY;
327
+ function Y(r) {
328
+ return r instanceof A || r && "closed" in r && h(r.remove) && h(r.add) && h(r.unsubscribe);
329
+ }
330
+ function L(r) {
331
+ h(r) ? r() : r.unsubscribe();
332
+ }
333
+ var K = {
334
+ Promise: void 0
335
+ }, Q = {
336
+ setTimeout: function(r, t) {
337
+ for (var e = [], n = 2; n < arguments.length; n++)
338
+ e[n - 2] = arguments[n];
339
+ return setTimeout.apply(void 0, _([r, t], E(e)));
340
+ },
341
+ clearTimeout: function(r) {
342
+ return clearTimeout(r);
343
+ },
344
+ delegate: void 0
345
+ };
346
+ function G(r) {
347
+ Q.setTimeout(function() {
348
+ throw r;
349
+ });
350
+ }
351
+ function R() {
352
+ }
353
+ function X(r) {
354
+ r();
355
+ }
356
+ var T = (function(r) {
357
+ P(t, r);
358
+ function t(e) {
359
+ var n = r.call(this) || this;
360
+ return n.isStopped = !1, e ? (n.destination = e, Y(e) && e.add(n)) : n.destination = z, n;
361
+ }
362
+ return t.create = function(e, n, i) {
363
+ return new I(e, n, i);
364
+ }, t.prototype.next = function(e) {
365
+ this.isStopped || this._next(e);
366
+ }, t.prototype.error = function(e) {
367
+ this.isStopped || (this.isStopped = !0, this._error(e));
368
+ }, t.prototype.complete = function() {
369
+ this.isStopped || (this.isStopped = !0, this._complete());
370
+ }, t.prototype.unsubscribe = function() {
371
+ this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
372
+ }, t.prototype._next = function(e) {
373
+ this.destination.next(e);
374
+ }, t.prototype._error = function(e) {
375
+ try {
376
+ this.destination.error(e);
377
+ } finally {
378
+ this.unsubscribe();
379
+ }
380
+ }, t.prototype._complete = function() {
381
+ try {
382
+ this.destination.complete();
383
+ } finally {
384
+ this.unsubscribe();
385
+ }
386
+ }, t;
387
+ })(A), Z = (function() {
388
+ function r(t) {
389
+ this.partialObserver = t;
390
+ }
391
+ return r.prototype.next = function(t) {
392
+ var e = this.partialObserver;
393
+ if (e.next)
394
+ try {
395
+ e.next(t);
396
+ } catch (n) {
397
+ S(n);
398
+ }
399
+ }, r.prototype.error = function(t) {
400
+ var e = this.partialObserver;
401
+ if (e.error)
402
+ try {
403
+ e.error(t);
404
+ } catch (n) {
405
+ S(n);
406
+ }
407
+ else
408
+ S(t);
409
+ }, r.prototype.complete = function() {
410
+ var t = this.partialObserver;
411
+ if (t.complete)
412
+ try {
413
+ t.complete();
414
+ } catch (e) {
415
+ S(e);
416
+ }
417
+ }, r;
418
+ })(), I = (function(r) {
419
+ P(t, r);
420
+ function t(e, n, i) {
421
+ var o = r.call(this) || this, u;
422
+ return h(e) || !e ? u = {
423
+ next: e ?? void 0,
424
+ error: n ?? void 0,
425
+ complete: i ?? void 0
426
+ } : u = e, o.destination = new Z(u), o;
427
+ }
428
+ return t;
429
+ })(T);
430
+ function S(r) {
431
+ G(r);
432
+ }
433
+ function $(r) {
434
+ throw r;
435
+ }
436
+ var z = {
437
+ closed: !0,
438
+ next: R,
439
+ error: $,
440
+ complete: R
441
+ };
442
+ function W(r, t, e, n, i) {
443
+ return new N(r, t, e, n, i);
444
+ }
445
+ var N = (function(r) {
446
+ P(t, r);
447
+ function t(e, n, i, o, u, s) {
448
+ var a = r.call(this, e) || this;
449
+ return a.onFinalize = u, a.shouldUnsubscribe = s, a._next = n ? function(c) {
450
+ try {
451
+ n(c);
452
+ } catch (l) {
453
+ e.error(l);
454
+ }
455
+ } : r.prototype._next, a._error = o ? function(c) {
456
+ try {
457
+ o(c);
458
+ } catch (l) {
459
+ e.error(l);
460
+ } finally {
461
+ this.unsubscribe();
462
+ }
463
+ } : r.prototype._error, a._complete = i ? function() {
464
+ try {
465
+ i();
466
+ } catch (c) {
467
+ e.error(c);
468
+ } finally {
469
+ this.unsubscribe();
470
+ }
471
+ } : r.prototype._complete, a;
472
+ }
473
+ return t.prototype.unsubscribe = function() {
474
+ var e;
475
+ if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
476
+ var n = this.closed;
477
+ r.prototype.unsubscribe.call(this), !n && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
478
+ }
479
+ }, t;
480
+ })(T), j = (function() {
481
+ return typeof Symbol == "function" && Symbol.observable || "@@observable";
482
+ })();
483
+ function rr(r) {
484
+ return r;
485
+ }
486
+ function er(r) {
487
+ return r.length === 0 ? rr : r.length === 1 ? r[0] : function(e) {
488
+ return r.reduce(function(n, i) {
489
+ return i(n);
490
+ }, e);
491
+ };
492
+ }
493
+ var b = (function() {
494
+ function r(t) {
495
+ t && (this._subscribe = t);
496
+ }
497
+ return r.prototype.lift = function(t) {
498
+ var e = new r();
499
+ return e.source = this, e.operator = t, e;
500
+ }, r.prototype.subscribe = function(t, e, n) {
501
+ var i = this, o = nr(t) ? t : new I(t, e, n);
502
+ return X(function() {
503
+ var u = i, s = u.operator, a = u.source;
504
+ o.add(s ? s.call(o, a) : a ? i._subscribe(o) : i._trySubscribe(o));
505
+ }), o;
506
+ }, r.prototype._trySubscribe = function(t) {
507
+ try {
508
+ return this._subscribe(t);
509
+ } catch (e) {
510
+ t.error(e);
511
+ }
512
+ }, r.prototype.forEach = function(t, e) {
513
+ var n = this;
514
+ return e = U(e), new e(function(i, o) {
515
+ var u = new I({
516
+ next: function(s) {
517
+ try {
518
+ t(s);
519
+ } catch (a) {
520
+ o(a), u.unsubscribe();
521
+ }
522
+ },
523
+ error: o,
524
+ complete: i
525
+ });
526
+ n.subscribe(u);
527
+ });
528
+ }, r.prototype._subscribe = function(t) {
529
+ var e;
530
+ return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
531
+ }, r.prototype[j] = function() {
532
+ return this;
533
+ }, r.prototype.pipe = function() {
534
+ for (var t = [], e = 0; e < arguments.length; e++)
535
+ t[e] = arguments[e];
536
+ return er(t)(this);
537
+ }, r.prototype.toPromise = function(t) {
538
+ var e = this;
539
+ return t = U(t), new t(function(n, i) {
540
+ var o;
541
+ e.subscribe(function(u) {
542
+ return o = u;
543
+ }, function(u) {
544
+ return i(u);
545
+ }, function() {
546
+ return n(o);
547
+ });
548
+ });
549
+ }, r.create = function(t) {
550
+ return new r(t);
551
+ }, r;
552
+ })();
553
+ function U(r) {
554
+ var t;
555
+ return (t = r ?? K.Promise) !== null && t !== void 0 ? t : Promise;
556
+ }
557
+ function tr(r) {
558
+ return r && h(r.next) && h(r.error) && h(r.complete);
559
+ }
560
+ function nr(r) {
561
+ return r && r instanceof T || tr(r) && Y(r);
562
+ }
563
+ var or = (function(r) {
564
+ return r && typeof r.length == "number" && typeof r != "function";
565
+ });
566
+ function ir(r) {
567
+ return h(r == null ? void 0 : r.then);
568
+ }
569
+ function ur(r) {
570
+ return h(r[j]);
571
+ }
572
+ function cr(r) {
573
+ return Symbol.asyncIterator && h(r == null ? void 0 : r[Symbol.asyncIterator]);
574
+ }
575
+ function ar(r) {
576
+ 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.");
577
+ }
578
+ function sr() {
579
+ return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
580
+ }
581
+ var fr = sr();
582
+ function lr(r) {
583
+ return h(r == null ? void 0 : r[fr]);
584
+ }
585
+ function yr(r) {
586
+ return D(this, arguments, function() {
587
+ var e, n, i, o;
588
+ return F(this, function(u) {
589
+ switch (u.label) {
590
+ case 0:
591
+ e = r.getReader(), u.label = 1;
592
+ case 1:
593
+ u.trys.push([1, , 9, 10]), u.label = 2;
594
+ case 2:
595
+ return [4, m(e.read())];
596
+ case 3:
597
+ return n = u.sent(), i = n.value, o = n.done, o ? [4, m(void 0)] : [3, 5];
598
+ case 4:
599
+ return [2, u.sent()];
600
+ case 5:
601
+ return [4, m(i)];
602
+ case 6:
603
+ return [4, u.sent()];
604
+ case 7:
605
+ return u.sent(), [3, 2];
606
+ case 8:
607
+ return [3, 10];
608
+ case 9:
609
+ return e.releaseLock(), [7];
610
+ case 10:
611
+ return [2];
612
+ }
613
+ });
614
+ });
615
+ }
616
+ function hr(r) {
617
+ return h(r == null ? void 0 : r.getReader);
618
+ }
619
+ function pr(r) {
620
+ if (r instanceof b)
621
+ return r;
622
+ if (r != null) {
623
+ if (ur(r))
624
+ return vr(r);
625
+ if (or(r))
626
+ return dr(r);
627
+ if (ir(r))
628
+ return br(r);
629
+ if (cr(r))
630
+ return M(r);
631
+ if (lr(r))
632
+ return mr(r);
633
+ if (hr(r))
634
+ return wr(r);
635
+ }
636
+ throw ar(r);
637
+ }
638
+ function vr(r) {
639
+ return new b(function(t) {
640
+ var e = r[j]();
641
+ if (h(e.subscribe))
642
+ return e.subscribe(t);
643
+ throw new TypeError("Provided object does not correctly implement Symbol.observable");
644
+ });
645
+ }
646
+ function dr(r) {
647
+ return new b(function(t) {
648
+ for (var e = 0; e < r.length && !t.closed; e++)
649
+ t.next(r[e]);
650
+ t.complete();
651
+ });
652
+ }
653
+ function br(r) {
654
+ return new b(function(t) {
655
+ r.then(function(e) {
656
+ t.closed || (t.next(e), t.complete());
657
+ }, function(e) {
658
+ return t.error(e);
659
+ }).then(null, G);
660
+ });
661
+ }
662
+ function mr(r) {
663
+ return new b(function(t) {
664
+ var e, n;
665
+ try {
666
+ for (var i = w(r), o = i.next(); !o.done; o = i.next()) {
667
+ var u = o.value;
668
+ if (t.next(u), t.closed)
669
+ return;
670
+ }
671
+ } catch (s) {
672
+ e = { error: s };
673
+ } finally {
674
+ try {
675
+ o && !o.done && (n = i.return) && n.call(i);
676
+ } finally {
677
+ if (e) throw e.error;
678
+ }
679
+ }
680
+ t.complete();
681
+ });
682
+ }
683
+ function M(r) {
684
+ return new b(function(t) {
685
+ Sr(r, t).catch(function(e) {
686
+ return t.error(e);
687
+ });
688
+ });
689
+ }
690
+ function wr(r) {
691
+ return M(yr(r));
692
+ }
693
+ function Sr(r, t) {
694
+ var e, n, i, o;
695
+ return C(this, void 0, void 0, function() {
696
+ var u, s;
697
+ return F(this, function(a) {
698
+ switch (a.label) {
699
+ case 0:
700
+ a.trys.push([0, 5, 6, 11]), e = H(r), a.label = 1;
701
+ case 1:
702
+ return [4, e.next()];
703
+ case 2:
704
+ if (n = a.sent(), !!n.done) return [3, 4];
705
+ if (u = n.value, t.next(u), t.closed)
706
+ return [2];
707
+ a.label = 3;
708
+ case 3:
709
+ return [3, 1];
710
+ case 4:
711
+ return [3, 11];
712
+ case 5:
713
+ return s = a.sent(), i = { error: s }, [3, 11];
714
+ case 6:
715
+ return a.trys.push([6, , 9, 10]), n && !n.done && (o = e.return) ? [4, o.call(e)] : [3, 8];
716
+ case 7:
717
+ a.sent(), a.label = 8;
718
+ case 8:
719
+ return [3, 10];
720
+ case 9:
721
+ if (i) throw i.error;
722
+ return [7];
723
+ case 10:
724
+ return [7];
725
+ case 11:
726
+ return t.complete(), [2];
727
+ }
728
+ });
729
+ });
730
+ }
731
+ function gr(r, t) {
732
+ t === void 0 && (t = {});
733
+ var e = t.selector, n = B(t, ["selector"]);
734
+ return new b(function(i) {
735
+ var o = new AbortController(), u = o.signal, s = !0, a = n.signal;
736
+ if (a)
737
+ if (a.aborted)
738
+ o.abort();
739
+ else {
740
+ var c = function() {
741
+ u.aborted || o.abort();
742
+ };
743
+ a.addEventListener("abort", c), i.add(function() {
744
+ return a.removeEventListener("abort", c);
745
+ });
746
+ }
747
+ var l = g(g({}, n), { signal: u }), p = function(v) {
748
+ s = !1, i.error(v);
749
+ };
750
+ return fetch(r, l).then(function(v) {
751
+ e ? pr(e(v)).subscribe(W(i, void 0, function() {
752
+ s = !1, i.complete();
753
+ }, p)) : (s = !1, i.next(v), i.complete());
754
+ }).catch(p), function() {
755
+ s && o.abort();
756
+ };
757
+ });
758
+ }
759
+ export {
760
+ gr as f
761
+ };