· 6 years ago · Mar 30, 2020, 11:02 PM
1! function(e) {
2 "function" == typeof define && define.amd ? define(e) : e()
3}((function() {
4 "use strict";
5 var e, t = function(e) {
6 var t, r = e.Symbol;
7 return "function" == typeof r ? r.observable ? t = r.observable : (t = r("observable"), r.observable = t) : t = "@@observable", t
8 }("undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof module ? module : Function("return this")()),
9 r = function() {
10 return Math.random().toString(36).substring(7).split("").join(".")
11 },
12 n = {
13 INIT: "@@redux/INIT" + r(),
14 REPLACE: "@@redux/REPLACE" + r(),
15 PROBE_UNKNOWN_ACTION: function() {
16 return "@@redux/PROBE_UNKNOWN_ACTION" + r()
17 }
18 };
19
20 function i(e, r, o) {
21 var a;
22 if ("function" == typeof r && "function" == typeof o || "function" == typeof o && "function" == typeof arguments[3]) throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");
23 if ("function" == typeof r && void 0 === o && (o = r, r = void 0), void 0 !== o) {
24 if ("function" != typeof o) throw new Error("Expected the enhancer to be a function.");
25 return o(i)(e, r)
26 }
27 if ("function" != typeof e) throw new Error("Expected the reducer to be a function.");
28 var s = e,
29 u = r,
30 c = [],
31 l = c,
32 f = !1;
33
34 function h() {
35 l === c && (l = c.slice())
36 }
37
38 function d() {
39 if (f) throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
40 return u
41 }
42
43 function p(e) {
44 if ("function" != typeof e) throw new Error("Expected the listener to be a function.");
45 if (f) throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");
46 var t = !0;
47 return h(), l.push(e),
48 function() {
49 if (t) {
50 if (f) throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");
51 t = !1, h();
52 var r = l.indexOf(e);
53 l.splice(r, 1), c = null
54 }
55 }
56 }
57
58 function y(e) {
59 if (! function(e) {
60 if ("object" != typeof e || null === e) return !1;
61 for (var t = e; null !== Object.getPrototypeOf(t);) t = Object.getPrototypeOf(t);
62 return Object.getPrototypeOf(e) === t
63 }(e)) throw new Error("Actions must be plain objects. Use custom middleware for async actions.");
64 if (void 0 === e.type) throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');
65 if (f) throw new Error("Reducers may not dispatch actions.");
66 try {
67 f = !0, u = s(u, e)
68 } finally {
69 f = !1
70 }
71 for (var t = c = l, r = 0; r < t.length; r++) {
72 (0, t[r])()
73 }
74 return e
75 }
76 return y({
77 type: n.INIT
78 }), (a = {
79 dispatch: y,
80 subscribe: p,
81 getState: d,
82 replaceReducer: function(e) {
83 if ("function" != typeof e) throw new Error("Expected the nextReducer to be a function.");
84 s = e, y({
85 type: n.REPLACE
86 })
87 }
88 })[t] = function() {
89 var e, r = p;
90 return (e = {
91 subscribe: function(e) {
92 if ("object" != typeof e || null === e) throw new TypeError("Expected the observer to be an object.");
93
94 function t() {
95 e.next && e.next(d())
96 }
97 return t(), {
98 unsubscribe: r(t)
99 }
100 }
101 })[t] = function() {
102 return this
103 }, e
104 }, a
105 }
106
107 function o(e, t) {
108 var r = t && t.type;
109 return "Given " + (r && 'action "' + String(r) + '"' || "an action") + ', reducer "' + e + '" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'
110 }
111
112 function a(e) {
113 for (var t = Object.keys(e), r = {}, i = 0; i < t.length; i++) {
114 var a = t[i];
115 "function" == typeof e[a] && (r[a] = e[a])
116 }
117 var s, u = Object.keys(r);
118 try {
119 ! function(e) {
120 Object.keys(e).forEach((function(t) {
121 var r = e[t];
122 if (void 0 === r(void 0, {
123 type: n.INIT
124 })) throw new Error('Reducer "' + t + "\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");
125 if (void 0 === r(void 0, {
126 type: n.PROBE_UNKNOWN_ACTION()
127 })) throw new Error('Reducer "' + t + "\" returned undefined when probed with a random type. Don't try to handle " + n.INIT + ' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')
128 }))
129 }(r)
130 } catch (e) {
131 s = e
132 }
133 return function(e, t) {
134 if (void 0 === e && (e = {}), s) throw s;
135 for (var n = !1, i = {}, a = 0; a < u.length; a++) {
136 var c = u[a],
137 l = r[c],
138 f = e[c],
139 h = l(f, t);
140 if (void 0 === h) {
141 var d = o(c, t);
142 throw new Error(d)
143 }
144 i[c] = h, n = n || h !== f
145 }
146 return (n = n || u.length !== Object.keys(e).length) ? i : e
147 }
148 }
149
150 function s(e, t, r) {
151 return t in e ? Object.defineProperty(e, t, {
152 value: r,
153 enumerable: !0,
154 configurable: !0,
155 writable: !0
156 }) : e[t] = r, e
157 }
158
159 function u(e, t) {
160 var r = Object.keys(e);
161 return Object.getOwnPropertySymbols && r.push.apply(r, Object.getOwnPropertySymbols(e)), t && (r = r.filter((function(t) {
162 return Object.getOwnPropertyDescriptor(e, t).enumerable
163 }))), r
164 }
165
166 function c(e) {
167 for (var t = 1; t < arguments.length; t++) {
168 var r = null != arguments[t] ? arguments[t] : {};
169 t % 2 ? u(r, !0).forEach((function(t) {
170 s(e, t, r[t])
171 })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : u(r).forEach((function(t) {
172 Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t))
173 }))
174 }
175 return e
176 }
177
178 function l() {
179 for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];
180 return 0 === t.length ? function(e) {
181 return e
182 } : 1 === t.length ? t[0] : t.reduce((function(e, t) {
183 return function() {
184 return e(t.apply(void 0, arguments))
185 }
186 }))
187 }
188
189 function f() {
190 for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];
191 return function(e) {
192 return function() {
193 var r = e.apply(void 0, arguments),
194 n = function() {
195 throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")
196 },
197 i = {
198 getState: r.getState,
199 dispatch: function() {
200 return n.apply(void 0, arguments)
201 }
202 },
203 o = t.map((function(e) {
204 return e(i)
205 }));
206 return c({}, r, {
207 dispatch: n = l.apply(void 0, o)(r.dispatch)
208 })
209 }
210 }
211 }
212 var h = "undefined" != typeof Symbol ? Symbol("immer-nothing") : ((e = {})["immer-nothing"] = !0, e),
213 d = "undefined" != typeof Symbol && Symbol.for ? Symbol.for("immer-draftable") : "__$immer_draftable",
214 p = "undefined" != typeof Symbol && Symbol.for ? Symbol.for("immer-state") : "__$immer_state";
215
216 function y(e) {
217 return !!e && !!e[p]
218 }
219
220 function m(e) {
221 return !!e && (function(e) {
222 if (!e || "object" != typeof e) return !1;
223 if (Array.isArray(e)) return !0;
224 var t = Object.getPrototypeOf(e);
225 return !t || t === Object.prototype
226 }(e) || !!e[d] || !!e.constructor[d])
227 }
228 var b = Object.assign || function(e, t) {
229 for (var r in t) S(t, r) && (e[r] = t[r]);
230 return e
231 },
232 v = "undefined" != typeof Reflect && Reflect.ownKeys ? Reflect.ownKeys : void 0 !== Object.getOwnPropertySymbols ? function(e) {
233 return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))
234 } : Object.getOwnPropertyNames;
235
236 function g(e, t) {
237 if (void 0 === t && (t = !1), Array.isArray(e)) return e.slice();
238 var r = Object.create(Object.getPrototypeOf(e));
239 return v(e).forEach((function(n) {
240 if (n !== p) {
241 var i = Object.getOwnPropertyDescriptor(e, n),
242 o = i.value;
243 if (i.get) {
244 if (!t) throw new Error("Immer drafts cannot have computed properties");
245 o = i.get.call(e)
246 }
247 i.enumerable ? r[n] = o : Object.defineProperty(r, n, {
248 value: o,
249 writable: !0,
250 configurable: !0
251 })
252 }
253 })), r
254 }
255
256 function w(e, t) {
257 if (Array.isArray(e))
258 for (var r = 0; r < e.length; r++) t(r, e[r], e);
259 else v(e).forEach((function(r) {
260 return t(r, e[r], e)
261 }))
262 }
263
264 function E(e, t) {
265 var r = Object.getOwnPropertyDescriptor(e, t);
266 return !!r && r.enumerable
267 }
268
269 function S(e, t) {
270 return Object.prototype.hasOwnProperty.call(e, t)
271 }
272
273 function _(e, t) {
274 return e === t ? 0 !== e || 1 / e == 1 / t : e != e && t != t
275 }
276
277 function T(e) {
278 if (!m(e)) return e;
279 if (Array.isArray(e)) return e.map(T);
280 var t = Object.create(Object.getPrototypeOf(e));
281 for (var r in e) t[r] = T(e[r]);
282 return t
283 }
284
285 function x(e) {
286 if (m(e) && !y(e) && !Object.isFrozen(e))
287 if (Object.freeze(e), Array.isArray(e)) e.forEach(x);
288 else
289 for (var t in e) x(e[t])
290 }
291 var P = function(e) {
292 this.drafts = [], this.parent = e, this.canAutoFreeze = !0, this.patches = null
293 };
294
295 function O(e) {
296 e[p].revoke()
297 }
298 P.prototype.usePatches = function(e) {
299 e && (this.patches = [], this.inversePatches = [], this.patchListener = e)
300 }, P.prototype.revoke = function() {
301 this.leave(), this.drafts.forEach(O), this.drafts = null
302 }, P.prototype.leave = function() {
303 this === P.current && (P.current = this.parent)
304 }, P.current = null, P.enter = function() {
305 return this.current = new P(this.current)
306 };
307 var A = {};
308
309 function j(e, t) {
310 var r = Array.isArray(e),
311 n = I(e);
312 w(n, (function(t) {
313 ! function(e, t, r) {
314 var n = A[t];
315 n ? n.enumerable = r : A[t] = n = {
316 configurable: !0,
317 enumerable: r,
318 get: function() {
319 return function(e, t) {
320 L(e);
321 var r = D(k(e), t);
322 if (e.finalizing) return r;
323 if (r === D(e.base, t) && m(r)) return M(e), e.copy[t] = j(r, e);
324 return r
325 }(this[p], t)
326 },
327 set: function(e) {
328 ! function(e, t, r) {
329 if (L(e), e.assigned[t] = !0, !e.modified) {
330 if (_(r, D(k(e), t))) return;
331 N(e), M(e)
332 }
333 e.copy[t] = r
334 }(this[p], t, e)
335 }
336 };
337 Object.defineProperty(e, t, n)
338 }(n, t, r || E(e, t))
339 }));
340 var i, o, a, s = t ? t.scope : P.current;
341 return i = n, o = p, a = {
342 scope: s,
343 modified: !1,
344 finalizing: !1,
345 finalized: !1,
346 assigned: {},
347 parent: t,
348 base: e,
349 draft: n,
350 copy: null,
351 revoke: C,
352 revoked: !1
353 }, Object.defineProperty(i, o, {
354 value: a,
355 enumerable: !1,
356 writable: !0
357 }), s.drafts.push(n), n
358 }
359
360 function C() {
361 this.revoked = !0
362 }
363
364 function k(e) {
365 return e.copy || e.base
366 }
367
368 function D(e, t) {
369 var r = e[p];
370 if (r && !r.finalizing) {
371 r.finalizing = !0;
372 var n = e[t];
373 return r.finalizing = !1, n
374 }
375 return e[t]
376 }
377
378 function N(e) {
379 e.modified || (e.modified = !0, e.parent && N(e.parent))
380 }
381
382 function M(e) {
383 e.copy || (e.copy = I(e.base))
384 }
385
386 function I(e) {
387 var t = e && e[p];
388 if (t) {
389 t.finalizing = !0;
390 var r = g(t.draft, !0);
391 return t.finalizing = !1, r
392 }
393 return g(e)
394 }
395
396 function L(e) {
397 if (!0 === e.revoked) throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(k(e)))
398 }
399
400 function q(e) {
401 for (var t = e.length - 1; t >= 0; t--) {
402 var r = e[t][p];
403 r.modified || (Array.isArray(r.base) ? z(r) && N(r) : F(r) && N(r))
404 }
405 }
406
407 function F(e) {
408 for (var t = e.base, r = e.draft, n = Object.keys(r), i = n.length - 1; i >= 0; i--) {
409 var o = n[i],
410 a = t[o];
411 if (void 0 === a && !S(t, o)) return !0;
412 var s = r[o],
413 u = s && s[p];
414 if (u ? u.base !== a : !_(s, a)) return !0
415 }
416 return n.length !== Object.keys(t).length
417 }
418
419 function z(e) {
420 var t = e.draft;
421 if (t.length !== e.base.length) return !0;
422 var r = Object.getOwnPropertyDescriptor(t, t.length - 1);
423 return !(!r || r.get)
424 }
425 var U = Object.freeze({
426 willFinalize: function(e, t, r) {
427 e.drafts.forEach((function(e) {
428 e[p].finalizing = !0
429 })), r ? y(t) && t[p].scope === e && q(e.drafts) : (e.patches && function e(t) {
430 if (!t || "object" != typeof t) return;
431 var r = t[p];
432 if (!r) return;
433 var n = r.base,
434 i = r.draft,
435 o = r.assigned;
436 if (Array.isArray(t)) {
437 if (z(r)) {
438 if (N(r), o.length = !0, i.length < n.length)
439 for (var a = i.length; a < n.length; a++) o[a] = !1;
440 else
441 for (var s = n.length; s < i.length; s++) o[s] = !0;
442 for (var u = 0; u < i.length; u++) void 0 === o[u] && e(i[u])
443 }
444 } else Object.keys(i).forEach((function(t) {
445 void 0 !== n[t] || S(n, t) ? o[t] || e(i[t]) : (o[t] = !0, N(r))
446 })), Object.keys(n).forEach((function(e) {
447 void 0 !== i[e] || S(i, e) || (o[e] = !1, N(r))
448 }))
449 }(e.drafts[0]), q(e.drafts))
450 },
451 createProxy: j
452 });
453
454 function W(e, t) {
455 var r = t ? t.scope : P.current,
456 n = {
457 scope: r,
458 modified: !1,
459 finalized: !1,
460 assigned: {},
461 parent: t,
462 base: e,
463 draft: null,
464 drafts: {},
465 copy: null,
466 revoke: null
467 },
468 i = Array.isArray(e) ? Proxy.revocable([n], $) : Proxy.revocable(n, R),
469 o = i.revoke,
470 a = i.proxy;
471 return n.draft = a, n.revoke = o, r.drafts.push(a), a
472 }
473 var R = {
474 get: function(e, t) {
475 if (t === p) return e;
476 var r = e.drafts;
477 if (!e.modified && S(r, t)) return r[t];
478 var n = Y(e)[t];
479 if (e.finalized || !m(n)) return n;
480 if (e.modified) {
481 if (n !== H(e.base, t)) return n;
482 r = e.copy
483 }
484 return r[t] = W(n, e)
485 },
486 has: function(e, t) {
487 return t in Y(e)
488 },
489 ownKeys: function(e) {
490 return Reflect.ownKeys(Y(e))
491 },
492 set: function(e, t, r) {
493 if (!e.modified) {
494 var n = H(e.base, t);
495 if (r ? _(n, r) || r === e.drafts[t] : _(n, r) && t in e.base) return !0;
496 V(e)
497 }
498 return e.assigned[t] = !0, e.copy[t] = r, !0
499 },
500 deleteProperty: function(e, t) {
501 void 0 !== H(e.base, t) || t in e.base ? (e.assigned[t] = !1, V(e)) : e.assigned[t] && delete e.assigned[t];
502 e.copy && delete e.copy[t];
503 return !0
504 },
505 getOwnPropertyDescriptor: function(e, t) {
506 var r = Y(e),
507 n = Reflect.getOwnPropertyDescriptor(r, t);
508 n && (n.writable = !0, n.configurable = !Array.isArray(r) || "length" !== t);
509 return n
510 },
511 defineProperty: function() {
512 throw new Error("Object.defineProperty() cannot be used on an Immer draft")
513 },
514 getPrototypeOf: function(e) {
515 return Object.getPrototypeOf(e.base)
516 },
517 setPrototypeOf: function() {
518 throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft")
519 }
520 },
521 $ = {};
522
523 function Y(e) {
524 return e.copy || e.base
525 }
526
527 function H(e, t) {
528 var r = e[p],
529 n = Reflect.getOwnPropertyDescriptor(r ? Y(r) : e, t);
530 return n && n.value
531 }
532
533 function V(e) {
534 e.modified || (e.modified = !0, e.copy = b(g(e.base), e.drafts), e.drafts = null, e.parent && V(e.parent))
535 }
536 w(R, (function(e, t) {
537 $[e] = function() {
538 return arguments[0] = arguments[0][0], t.apply(this, arguments)
539 }
540 })), $.deleteProperty = function(e, t) {
541 if (isNaN(parseInt(t))) throw new Error("Immer only supports deleting array indices");
542 return R.deleteProperty.call(this, e[0], t)
543 }, $.set = function(e, t, r) {
544 if ("length" !== t && isNaN(parseInt(t))) throw new Error("Immer only supports setting array indices and the 'length' property");
545 return R.set.call(this, e[0], t, r)
546 };
547 var B = Object.freeze({
548 willFinalize: function() {},
549 createProxy: W
550 });
551
552 function G(e, t, r, n) {
553 Array.isArray(e.base) ? function(e, t, r, n) {
554 var i, o, a = e.base,
555 s = e.copy,
556 u = e.assigned;
557 s.length < a.length && (a = (i = [s, a])[0], s = i[1], r = (o = [n, r])[0], n = o[1]);
558 var c = s.length - a.length,
559 l = 0;
560 for (; a[l] === s[l] && l < a.length;) ++l;
561 var f = a.length;
562 for (; f > l && a[f - 1] === s[f + c - 1];) --f;
563 for (var h = l; h < f; ++h)
564 if (u[h] && s[h] !== a[h]) {
565 var d = t.concat([h]);
566 r.push({
567 op: "replace",
568 path: d,
569 value: s[h]
570 }), n.push({
571 op: "replace",
572 path: d,
573 value: a[h]
574 })
575 }
576 for (var p = r.length, y = f + c - 1; y >= f; --y) {
577 var m = t.concat([y]);
578 r[p + y - f] = {
579 op: "add",
580 path: m,
581 value: s[y]
582 }, n.push({
583 op: "remove",
584 path: m
585 })
586 }
587 }(e, t, r, n) : function(e, t, r, n) {
588 var i = e.base,
589 o = e.copy;
590 w(e.assigned, (function(e, a) {
591 var s = i[e],
592 u = o[e],
593 c = a ? e in i ? "replace" : "add" : "remove";
594 if (s !== u || "replace" !== c) {
595 var l = t.concat(e);
596 r.push("remove" === c ? {
597 op: c,
598 path: l
599 } : {
600 op: c,
601 path: l,
602 value: u
603 }), n.push("add" === c ? {
604 op: "remove",
605 path: l
606 } : "remove" === c ? {
607 op: "add",
608 path: l,
609 value: s
610 } : {
611 op: "replace",
612 path: l,
613 value: s
614 })
615 }
616 }))
617 }(e, t, r, n)
618 }
619 var X = function(e, t) {
620 for (var r = 0, n = t; r < n.length; r += 1) {
621 var i = n[r],
622 o = i.path,
623 a = i.op,
624 s = T(i.value);
625 if (!o.length) throw new Error("Illegal state");
626 for (var u = e, c = 0; c < o.length - 1; c++)
627 if (!(u = u[o[c]]) || "object" != typeof u) throw new Error("Cannot apply patch, path doesn't resolve: " + o.join("/"));
628 var l = o[o.length - 1];
629 switch (a) {
630 case "replace":
631 u[l] = s;
632 break;
633 case "add":
634 Array.isArray(u) ? u.splice(l, 0, s) : u[l] = s;
635 break;
636 case "remove":
637 Array.isArray(u) ? u.splice(l, 1) : delete u[l];
638 break;
639 default:
640 throw new Error("Unsupported patch operation: " + a)
641 }
642 }
643 return e
644 };
645 var Q = {
646 useProxies: "undefined" != typeof Proxy && void 0 !== Proxy.revocable && "undefined" != typeof Reflect,
647 autoFreeze: "undefined" == typeof process && "verifyMinified" === function() {}.name,
648 onAssign: null,
649 onDelete: null,
650 onCopy: null
651 },
652 K = function(e) {
653 b(this, Q, e), this.setUseProxies(this.useProxies), this.produce = this.produce.bind(this)
654 };
655 K.prototype.produce = function(e, t, r) {
656 var n, i = this;
657 if ("function" == typeof e && "function" != typeof t) {
658 var o = t;
659 t = e;
660 var a = this;
661 return function(e) {
662 var r = this;
663 void 0 === e && (e = o);
664 for (var n = [], i = arguments.length - 1; i-- > 0;) n[i] = arguments[i + 1];
665 return a.produce(e, (function(e) {
666 return t.call.apply(t, [r, e].concat(n))
667 }))
668 }
669 }
670 if ("function" != typeof t) throw new Error("The first or second argument to `produce` must be a function");
671 if (void 0 !== r && "function" != typeof r) throw new Error("The third argument to `produce` must be a function or undefined");
672 if (m(e)) {
673 var s = P.enter(),
674 u = this.createProxy(e),
675 c = !0;
676 try {
677 n = t(u), c = !1
678 } finally {
679 c ? s.revoke() : s.leave()
680 }
681 return n instanceof Promise ? n.then((function(e) {
682 return s.usePatches(r), i.processResult(e, s)
683 }), (function(e) {
684 throw s.revoke(), e
685 })) : (s.usePatches(r), this.processResult(n, s))
686 }
687 if ((n = t(e)) !== h) return void 0 === n && (n = e), this.maybeFreeze(n, !0), n
688 }, K.prototype.produceWithPatches = function(e, t, r) {
689 var n, i, o = this;
690 if ("function" == typeof e) return function(t) {
691 for (var r = [], n = arguments.length - 1; n-- > 0;) r[n] = arguments[n + 1];
692 return o.produceWithPatches(t, (function(t) {
693 return e.apply(void 0, [t].concat(r))
694 }))
695 };
696 if (r) throw new Error("A patch listener cannot be passed to produceWithPatches");
697 return [this.produce(e, t, (function(e, t) {
698 n = e, i = t
699 })), n, i]
700 }, K.prototype.createDraft = function(e) {
701 if (!m(e)) throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object");
702 var t = P.enter(),
703 r = this.createProxy(e);
704 return r[p].isManual = !0, t.leave(), r
705 }, K.prototype.finishDraft = function(e, t) {
706 var r = e && e[p];
707 if (!r || !r.isManual) throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`");
708 if (r.finalized) throw new Error("The given draft is already finalized");
709 var n = r.scope;
710 return n.usePatches(t), this.processResult(void 0, n)
711 }, K.prototype.setAutoFreeze = function(e) {
712 this.autoFreeze = e
713 }, K.prototype.setUseProxies = function(e) {
714 this.useProxies = e, b(this, e ? B : U)
715 }, K.prototype.applyPatches = function(e, t) {
716 var r;
717 for (r = t.length - 1; r >= 0; r--) {
718 var n = t[r];
719 if (0 === n.path.length && "replace" === n.op) {
720 e = n.value;
721 break
722 }
723 }
724 return y(e) ? X(e, t) : this.produce(e, (function(e) {
725 return X(e, t.slice(r + 1))
726 }))
727 }, K.prototype.processResult = function(e, t) {
728 var r = t.drafts[0],
729 n = void 0 !== e && e !== r;
730 if (this.willFinalize(t, e, n), n) {
731 if (r[p].modified) throw t.revoke(), new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.");
732 m(e) && (e = this.finalize(e, null, t), this.maybeFreeze(e)), t.patches && (t.patches.push({
733 op: "replace",
734 path: [],
735 value: e
736 }), t.inversePatches.push({
737 op: "replace",
738 path: [],
739 value: r[p].base
740 }))
741 } else e = this.finalize(r, [], t);
742 return t.revoke(), t.patches && t.patchListener(t.patches, t.inversePatches), e !== h ? e : void 0
743 }, K.prototype.finalize = function(e, t, r) {
744 var n = this,
745 i = e[p];
746 if (!i) return Object.isFrozen(e) ? e : this.finalizeTree(e, null, r);
747 if (i.scope !== r) return e;
748 if (!i.modified) return this.maybeFreeze(i.base, !0), i.base;
749 if (!i.finalized) {
750 if (i.finalized = !0, this.finalizeTree(i.draft, t, r), this.onDelete)
751 if (this.useProxies) {
752 var o = i.assigned;
753 for (var a in o) o[a] || this.onDelete(i, a)
754 } else {
755 var s = i.base,
756 u = i.copy;
757 w(s, (function(e) {
758 S(u, e) || n.onDelete(i, e)
759 }))
760 }
761 this.onCopy && this.onCopy(i), this.autoFreeze && r.canAutoFreeze && Object.freeze(i.copy), t && r.patches && G(i, t, r.patches, r.inversePatches)
762 }
763 return i.copy
764 }, K.prototype.finalizeTree = function(e, t, r) {
765 var n = this,
766 i = e[p];
767 i && (this.useProxies || (i.copy = g(i.draft, !0)), e = i.copy);
768 var o = !!t && !!r.patches,
769 a = function(s, u, c) {
770 if (u === c) throw Error("Immer forbids circular references");
771 var l = !!i && c === e;
772 if (y(u)) {
773 var f = l && o && !i.assigned[s] ? t.concat(s) : null;
774 if (y(u = n.finalize(u, f, r)) && (r.canAutoFreeze = !1), Array.isArray(c) || E(c, s) ? c[s] = u : Object.defineProperty(c, s, {
775 value: u
776 }), l && u === i.base[s]) return
777 } else {
778 if (l && _(u, i.base[s])) return;
779 m(u) && !Object.isFrozen(u) && (w(u, a), n.maybeFreeze(u))
780 }
781 l && n.onAssign && n.onAssign(i, s, u)
782 };
783 return w(e, a), e
784 }, K.prototype.maybeFreeze = function(e, t) {
785 void 0 === t && (t = !1), this.autoFreeze && !y(e) && (t ? x(e) : Object.freeze(e))
786 };
787 var J = new K,
788 Z = J.produce;
789 J.produceWithPatches.bind(J), J.setAutoFreeze.bind(J), J.setUseProxies.bind(J), J.applyPatches.bind(J), J.createDraft.bind(J), J.finishDraft.bind(J);
790
791 function ee(e, t) {
792 return e === t
793 }
794
795 function te(e, t, r) {
796 if (null === t || null === r || t.length !== r.length) return !1;
797 for (var n = t.length, i = 0; i < n; i++)
798 if (!e(t[i], r[i])) return !1;
799 return !0
800 }
801
802 function re(e) {
803 var t = Array.isArray(e[0]) ? e[0] : e;
804 if (!t.every((function(e) {
805 return "function" == typeof e
806 }))) {
807 var r = t.map((function(e) {
808 return typeof e
809 })).join(", ");
810 throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: [" + r + "]")
811 }
812 return t
813 }! function(e) {
814 for (var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) r[n - 1] = arguments[n]
815 }((function(e) {
816 var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ee,
817 r = null,
818 n = null;
819 return function() {
820 return te(t, r, arguments) || (n = e.apply(null, arguments)), r = arguments, n
821 }
822 }));
823
824 function ne(e) {
825 return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e
826 }
827
828 function ie(e, t) {
829 return e(t = {
830 exports: {}
831 }, t.exports), t.exports
832 }
833 var oe = function() {
834 return Math.random().toString(36).substring(7).split("").join(".")
835 },
836 ae = {
837 INIT: "@@redux/INIT" + oe(),
838 REPLACE: "@@redux/REPLACE" + oe(),
839 PROBE_UNKNOWN_ACTION: function() {
840 return "@@redux/PROBE_UNKNOWN_ACTION" + oe()
841 }
842 };
843
844 function se(e, t) {
845 var r = t && t.type;
846 return "Given " + (r && 'action "' + String(r) + '"' || "an action") + ', reducer "' + e + '" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'
847 }
848
849 function ue(e, t) {
850 return function() {
851 return t(e.apply(this, arguments))
852 }
853 }
854
855 function ce(e, t, r) {
856 return t in e ? Object.defineProperty(e, t, {
857 value: r,
858 enumerable: !0,
859 configurable: !0,
860 writable: !0
861 }) : e[t] = r, e
862 }
863
864 function le(e, t) {
865 var r = Object.keys(e);
866 return Object.getOwnPropertySymbols && r.push.apply(r, Object.getOwnPropertySymbols(e)), t && (r = r.filter((function(t) {
867 return Object.getOwnPropertyDescriptor(e, t).enumerable
868 }))), r
869 }
870
871 function fe(e) {
872 for (var t = 1; t < arguments.length; t++) {
873 var r = null != arguments[t] ? arguments[t] : {};
874 t % 2 ? le(r, !0).forEach((function(t) {
875 ce(e, t, r[t])
876 })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : le(r).forEach((function(t) {
877 Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t))
878 }))
879 }
880 return e
881 }
882
883 function he() {
884 for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];
885 return 0 === t.length ? function(e) {
886 return e
887 } : 1 === t.length ? t[0] : t.reduce((function(e, t) {
888 return function() {
889 return e(t.apply(void 0, arguments))
890 }
891 }))
892 }
893 var de = Object.freeze({
894 __DO_NOT_USE__ActionTypes: ae,
895 applyMiddleware: function() {
896 for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) t[r] = arguments[r];
897 return function(e) {
898 return function() {
899 var r = e.apply(void 0, arguments),
900 n = function() {
901 throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")
902 },
903 i = {
904 getState: r.getState,
905 dispatch: function() {
906 return n.apply(void 0, arguments)
907 }
908 },
909 o = t.map((function(e) {
910 return e(i)
911 }));
912 return fe({}, r, {
913 dispatch: n = he.apply(void 0, o)(r.dispatch)
914 })
915 }
916 }
917 },
918 bindActionCreators: function(e, t) {
919 if ("function" == typeof e) return ue(e, t);
920 if ("object" != typeof e || null === e) throw new Error("bindActionCreators expected an object or a function, instead received " + (null === e ? "null" : typeof e) + '. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
921 var r = {};
922 for (var n in e) {
923 var i = e[n];
924 "function" == typeof i && (r[n] = ue(i, t))
925 }
926 return r
927 },
928 combineReducers: function(e) {
929 for (var t = Object.keys(e), r = {}, n = 0; n < t.length; n++) {
930 var i = t[n];
931 "function" == typeof e[i] && (r[i] = e[i])
932 }
933 var o, a = Object.keys(r);
934 try {
935 ! function(e) {
936 Object.keys(e).forEach((function(t) {
937 var r = e[t];
938 if (void 0 === r(void 0, {
939 type: ae.INIT
940 })) throw new Error('Reducer "' + t + "\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");
941 if (void 0 === r(void 0, {
942 type: ae.PROBE_UNKNOWN_ACTION()
943 })) throw new Error('Reducer "' + t + "\" returned undefined when probed with a random type. Don't try to handle " + ae.INIT + ' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')
944 }))
945 }(r)
946 } catch (e) {
947 o = e
948 }
949 return function(e, t) {
950 if (void 0 === e && (e = {}), o) throw o;
951 for (var n = !1, i = {}, s = 0; s < a.length; s++) {
952 var u = a[s],
953 c = r[u],
954 l = e[u],
955 f = c(l, t);
956 if (void 0 === f) {
957 var h = se(u, t);
958 throw new Error(h)
959 }
960 i[u] = f, n = n || f !== l
961 }
962 return (n = n || a.length !== Object.keys(e).length) ? i : e
963 }
964 },
965 compose: he,
966 createStore: function e(r, n, i) {
967 var o;
968 if ("function" == typeof n && "function" == typeof i || "function" == typeof i && "function" == typeof arguments[3]) throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");
969 if ("function" == typeof n && void 0 === i && (i = n, n = void 0), void 0 !== i) {
970 if ("function" != typeof i) throw new Error("Expected the enhancer to be a function.");
971 return i(e)(r, n)
972 }
973 if ("function" != typeof r) throw new Error("Expected the reducer to be a function.");
974 var a = r,
975 s = n,
976 u = [],
977 c = u,
978 l = !1;
979
980 function f() {
981 c === u && (c = u.slice())
982 }
983
984 function h() {
985 if (l) throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
986 return s
987 }
988
989 function d(e) {
990 if ("function" != typeof e) throw new Error("Expected the listener to be a function.");
991 if (l) throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");
992 var t = !0;
993 return f(), c.push(e),
994 function() {
995 if (t) {
996 if (l) throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");
997 t = !1, f();
998 var r = c.indexOf(e);
999 c.splice(r, 1), u = null
1000 }
1001 }
1002 }
1003
1004 function p(e) {
1005 if (! function(e) {
1006 if ("object" != typeof e || null === e) return !1;
1007 for (var t = e; null !== Object.getPrototypeOf(t);) t = Object.getPrototypeOf(t);
1008 return Object.getPrototypeOf(e) === t
1009 }(e)) throw new Error("Actions must be plain objects. Use custom middleware for async actions.");
1010 if (void 0 === e.type) throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');
1011 if (l) throw new Error("Reducers may not dispatch actions.");
1012 try {
1013 l = !0, s = a(s, e)
1014 } finally {
1015 l = !1
1016 }
1017 for (var t = u = c, r = 0; r < t.length; r++) {
1018 (0, t[r])()
1019 }
1020 return e
1021 }
1022 return p({
1023 type: ae.INIT
1024 }), (o = {
1025 dispatch: p,
1026 subscribe: d,
1027 getState: h,
1028 replaceReducer: function(e) {
1029 if ("function" != typeof e) throw new Error("Expected the nextReducer to be a function.");
1030 a = e, p({
1031 type: ae.REPLACE
1032 })
1033 }
1034 })[t] = function() {
1035 var e, r = d;
1036 return (e = {
1037 subscribe: function(e) {
1038 if ("object" != typeof e || null === e) throw new TypeError("Expected the observer to be an object.");
1039
1040 function t() {
1041 e.next && e.next(h())
1042 }
1043 return t(), {
1044 unsubscribe: r(t)
1045 }
1046 }
1047 })[t] = function() {
1048 return this
1049 }, e
1050 }, o
1051 }
1052 }),
1053 pe = ie((function(e, t) {
1054 var r = de.compose;
1055 t.__esModule = !0, t.composeWithDevTools = "undefined" != typeof window && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
1056 if (0 !== arguments.length) return "object" == typeof arguments[0] ? r : r.apply(null, arguments)
1057 }, t.devToolsEnhancer = "undefined" != typeof window && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function() {
1058 return function(e) {
1059 return e
1060 }
1061 }
1062 }));
1063 ne(pe);
1064 var ye = pe.composeWithDevTools;
1065 pe.devToolsEnhancer;
1066
1067 function me(e) {
1068 return function(t) {
1069 var r = t.dispatch,
1070 n = t.getState;
1071 return function(t) {
1072 return function(i) {
1073 return "function" == typeof i ? i(r, n, e) : t(i)
1074 }
1075 }
1076 }
1077 }
1078 var be = me();
1079 be.withExtraArgument = me;
1080 var ve = function(e, t, r, n, i, o, a, s) {
1081 if (!e) {
1082 var u;
1083 if (void 0 === t) u = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
1084 else {
1085 var c = [r, n, i, o, a, s],
1086 l = 0;
1087 (u = new Error(t.replace(/%s/g, (function() {
1088 return c[l++]
1089 })))).name = "Invariant Violation"
1090 }
1091 throw u.framesToPop = 1, u
1092 }
1093 },
1094 ge = ie((function(e, t) {
1095 function r(e, t) {
1096 var r = [],
1097 n = [];
1098 return null == t && (t = function(e, t) {
1099 return r[0] === t ? "[Circular ~]" : "[Circular ~." + n.slice(0, r.indexOf(t)).join(".") + "]"
1100 }),
1101 function(i, o) {
1102 if (r.length > 0) {
1103 var a = r.indexOf(this);
1104 ~a ? r.splice(a + 1) : r.push(this), ~a ? n.splice(a, 1 / 0, i) : n.push(i), ~r.indexOf(o) && (o = t.call(this, i, o))
1105 } else r.push(o);
1106 return null == e ? o : e.call(this, i, o)
1107 }
1108 }(e.exports = function(e, t, n, i) {
1109 return JSON.stringify(e, r(t, i), n)
1110 }).getSerialize = r
1111 })),
1112 we = (ge.getSerialize, ie((function(e, t) {
1113 Object.defineProperty(t, "__esModule", {
1114 value: !0
1115 });
1116 var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1117 return typeof e
1118 } : function(e) {
1119 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
1120 };
1121 t.default = function(e) {
1122 return "object" !== (void 0 === e ? "undefined" : r(e)) || null == e
1123 }
1124 })));
1125 ne(we);
1126 var Ee = ie((function(e, t) {
1127 Object.defineProperty(t, "__esModule", {
1128 value: !0
1129 }), t.default = function(e, t, r) {
1130 var n = function e(t) {
1131 var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
1132 n = arguments[2],
1133 i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [],
1134 o = {
1135 value: n
1136 };
1137 if (!t(n))
1138 for (var a in o.children = {}, n) {
1139 var s = i.concat(a);
1140 r.length && -1 !== r.indexOf(s.join(".")) || (o.children[a] = e(t, r, n[a], s))
1141 }
1142 return o
1143 }(e, t, r);
1144 return {
1145 detectMutations: function() {
1146 return function e(t) {
1147 var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [],
1148 n = arguments[2],
1149 i = arguments[3],
1150 o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4],
1151 a = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : [],
1152 s = n ? n.value : void 0,
1153 u = s === i;
1154 if (o && !u && !Number.isNaN(i)) return {
1155 wasMutated: !0,
1156 path: a
1157 };
1158 if (t(s) || t(i)) return {
1159 wasMutated: !1
1160 };
1161 var c = {};
1162 Object.keys(n.children).forEach((function(e) {
1163 c[e] = !0
1164 })), Object.keys(i).forEach((function(e) {
1165 c[e] = !0
1166 }));
1167 for (var l = Object.keys(c), f = 0; f < l.length; f++) {
1168 var h = l[f],
1169 d = a.concat(h);
1170 if (!r.length || -1 === r.indexOf(d.join("."))) {
1171 var p = e(t, r, n.children[h], i[h], u, d);
1172 if (p.wasMutated) return p
1173 }
1174 }
1175 return {
1176 wasMutated: !1
1177 }
1178 }(e, t, n, r)
1179 }
1180 }
1181 }
1182 }));
1183
1184 function Se() {
1185 return (Se = Object.assign || function(e) {
1186 for (var t = 1; t < arguments.length; t++) {
1187 var r = arguments[t];
1188 for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
1189 }
1190 return e
1191 }).apply(this, arguments)
1192 }
1193 ne(Ee), ne(ie((function(e, t) {
1194 Object.defineProperty(t, "__esModule", {
1195 value: !0
1196 }), t.default = function() {
1197 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
1198 t = e.isImmutable,
1199 a = void 0 === t ? i.default : t,
1200 c = e.ignore,
1201 l = o.default.bind(null, a, c);
1202 return function(e) {
1203 var t = e.getState,
1204 i = t(),
1205 o = l(i),
1206 a = void 0;
1207 return function(e) {
1208 return function(c) {
1209 i = t(), a = o.detectMutations(), o = l(i), (0, r.default)(!a.wasMutated, s, (a.path || []).join("."));
1210 var f = e(c);
1211 return i = t(), a = o.detectMutations(), o = l(i), a.wasMutated && (0, r.default)(!a.wasMutated, u, (a.path || []).join("."), (0, n.default)(c)), f
1212 }
1213 }
1214 }
1215 };
1216 var r = a(ve),
1217 n = a(ge),
1218 i = a(we),
1219 o = a(Ee);
1220
1221 function a(e) {
1222 return e && e.__esModule ? e : {
1223 default: e
1224 }
1225 }
1226 var s = ["A state mutation was detected between dispatches, in the path `%s`.", "This may cause incorrect behavior.", "(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" "),
1227 u = ["A state mutation was detected inside a dispatch, in the path: `%s`.", "Take a look at the reducer(s) handling the action %s.", "(http://redux.js.org/docs/Troubleshooting.html#never-mutate-reducer-arguments)"].join(" ")
1228 })));
1229 var _e = !0;
1230
1231 function Te(e) {
1232 var t, r = e || {},
1233 n = r.reducer,
1234 o = void 0 === n ? void 0 : n,
1235 s = r.middleware,
1236 u = void 0 === s ? function(e) {
1237 void 0 === e && (e = {});
1238 var t = e,
1239 r = t.thunk,
1240 n = void 0 === r || r,
1241 i = (t.immutableCheck, t.serializableCheck, []);
1242 return n && ("boolean" == typeof n ? i.push(be) : i.push(be.withExtraArgument(n.extraArgument))), i
1243 }() : s,
1244 c = r.devTools,
1245 h = void 0 === c || c,
1246 d = r.preloadedState,
1247 p = void 0 === d ? void 0 : d,
1248 y = r.enhancers,
1249 m = void 0 === y ? void 0 : y;
1250 if ("function" == typeof o) t = o;
1251 else {
1252 if (! function(e) {
1253 if ("object" != typeof e || null === e) return !1;
1254 for (var t = e; null !== Object.getPrototypeOf(t);) t = Object.getPrototypeOf(t);
1255 return Object.getPrototypeOf(e) === t
1256 }(o)) throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
1257 t = a(o)
1258 }
1259 var b = f.apply(void 0, u),
1260 v = l;
1261 h && (v = ye(Se({
1262 trace: !_e
1263 }, "object" == typeof h && h)));
1264 var g = [b];
1265 return Array.isArray(m) ? g = [b].concat(m) : "function" == typeof m && (g = m(g)), i(t, p, v.apply(void 0, g))
1266 }
1267
1268 function xe(e, t) {
1269 function r() {
1270 if (t) {
1271 var r = t.apply(void 0, arguments);
1272 if (!r) throw new Error("prepareAction did not return an object");
1273 return Se({
1274 type: e,
1275 payload: r.payload
1276 }, "meta" in r && {
1277 meta: r.meta
1278 }, {}, "error" in r && {
1279 error: r.error
1280 })
1281 }
1282 return {
1283 type: e,
1284 payload: arguments.length <= 0 ? void 0 : arguments[0]
1285 }
1286 }
1287 return r.toString = function() {
1288 return "" + e
1289 }, r.type = e, r.match = function(t) {
1290 return t.type === e
1291 }, r
1292 }
1293
1294 function Pe(e) {
1295 var t = {},
1296 r = {
1297 addCase: function(e, n) {
1298 var i = "string" == typeof e ? e : e.type;
1299 if (i in t) throw new Error("addCase cannot be called with two reducers for the same action type");
1300 return t[i] = n, r
1301 }
1302 };
1303 return e(r), t
1304 }
1305 /*! *****************************************************************************
1306 Copyright (c) Microsoft Corporation. All rights reserved.
1307 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
1308 this file except in compliance with the License. You may obtain a copy of the
1309 License at http://www.apache.org/licenses/LICENSE-2.0
1310
1311 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1312 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
1313 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
1314 MERCHANTABLITY OR NON-INFRINGEMENT.
1315
1316 See the Apache Version 2.0 License for specific language governing permissions
1317 and limitations under the License.
1318 ***************************************************************************** */
1319 var Oe = function(e, t) {
1320 return (Oe = Object.setPrototypeOf || {
1321 __proto__: []
1322 }
1323 instanceof Array && function(e, t) {
1324 e.__proto__ = t
1325 } || function(e, t) {
1326 for (var r in t) t.hasOwnProperty(r) && (e[r] = t[r])
1327 })(e, t)
1328 };
1329
1330 function Ae(e, t) {
1331 function r() {
1332 this.constructor = e
1333 }
1334 Oe(e, t), e.prototype = null === t ? Object.create(t) : (r.prototype = t.prototype, new r)
1335 }
1336
1337 function je(e, t, r, n) {
1338 return new(r || (r = Promise))((function(i, o) {
1339 function a(e) {
1340 try {
1341 u(n.next(e))
1342 } catch (e) {
1343 o(e)
1344 }
1345 }
1346
1347 function s(e) {
1348 try {
1349 u(n.throw(e))
1350 } catch (e) {
1351 o(e)
1352 }
1353 }
1354
1355 function u(e) {
1356 e.done ? i(e.value) : new r((function(t) {
1357 t(e.value)
1358 })).then(a, s)
1359 }
1360 u((n = n.apply(e, t || [])).next())
1361 }))
1362 }
1363
1364 function Ce(e) {
1365 return "function" == typeof e
1366 }
1367 var ke = !1,
1368 De = {
1369 Promise: void 0,
1370 set useDeprecatedSynchronousErrorHandling(e) {
1371 e && (new Error).stack;
1372 ke = e
1373 },
1374 get useDeprecatedSynchronousErrorHandling() {
1375 return ke
1376 }
1377 };
1378
1379 function Ne(e) {
1380 setTimeout((function() {
1381 throw e
1382 }), 0)
1383 }
1384 var Me = {
1385 closed: !0,
1386 next: function(e) {},
1387 error: function(e) {
1388 if (De.useDeprecatedSynchronousErrorHandling) throw e;
1389 Ne(e)
1390 },
1391 complete: function() {}
1392 },
1393 Ie = function() {
1394 return Array.isArray || function(e) {
1395 return e && "number" == typeof e.length
1396 }
1397 }();
1398
1399 function Le(e) {
1400 return null !== e && "object" == typeof e
1401 }
1402 var qe = function() {
1403 function e(e) {
1404 return Error.call(this), this.message = e ? e.length + " errors occurred during unsubscription:\n" + e.map((function(e, t) {
1405 return t + 1 + ") " + e.toString()
1406 })).join("\n ") : "", this.name = "UnsubscriptionError", this.errors = e, this
1407 }
1408 return e.prototype = Object.create(Error.prototype), e
1409 }(),
1410 Fe = function() {
1411 function e(e) {
1412 this.closed = !1, this._parentOrParents = null, this._subscriptions = null, e && (this._unsubscribe = e)
1413 }
1414 return e.prototype.unsubscribe = function() {
1415 var t;
1416 if (!this.closed) {
1417 var r = this._parentOrParents,
1418 n = this._unsubscribe,
1419 i = this._subscriptions;
1420 if (this.closed = !0, this._parentOrParents = null, this._subscriptions = null, r instanceof e) r.remove(this);
1421 else if (null !== r)
1422 for (var o = 0; o < r.length; ++o) {
1423 r[o].remove(this)
1424 }
1425 if (Ce(n)) try {
1426 n.call(this)
1427 } catch (e) {
1428 t = e instanceof qe ? ze(e.errors) : [e]
1429 }
1430 if (Ie(i)) {
1431 o = -1;
1432 for (var a = i.length; ++o < a;) {
1433 var s = i[o];
1434 if (Le(s)) try {
1435 s.unsubscribe()
1436 } catch (e) {
1437 t = t || [], e instanceof qe ? t = t.concat(ze(e.errors)) : t.push(e)
1438 }
1439 }
1440 }
1441 if (t) throw new qe(t)
1442 }
1443 }, e.prototype.add = function(t) {
1444 var r = t;
1445 if (!t) return e.EMPTY;
1446 switch (typeof t) {
1447 case "function":
1448 r = new e(t);
1449 case "object":
1450 if (r === this || r.closed || "function" != typeof r.unsubscribe) return r;
1451 if (this.closed) return r.unsubscribe(), r;
1452 if (!(r instanceof e)) {
1453 var n = r;
1454 (r = new e)._subscriptions = [n]
1455 }
1456 break;
1457 default:
1458 throw new Error("unrecognized teardown " + t + " added to Subscription.")
1459 }
1460 var i = r._parentOrParents;
1461 if (null === i) r._parentOrParents = this;
1462 else if (i instanceof e) {
1463 if (i === this) return r;
1464 r._parentOrParents = [i, this]
1465 } else {
1466 if (-1 !== i.indexOf(this)) return r;
1467 i.push(this)
1468 }
1469 var o = this._subscriptions;
1470 return null === o ? this._subscriptions = [r] : o.push(r), r
1471 }, e.prototype.remove = function(e) {
1472 var t = this._subscriptions;
1473 if (t) {
1474 var r = t.indexOf(e); - 1 !== r && t.splice(r, 1)
1475 }
1476 }, e.EMPTY = function(e) {
1477 return e.closed = !0, e
1478 }(new e), e
1479 }();
1480
1481 function ze(e) {
1482 return e.reduce((function(e, t) {
1483 return e.concat(t instanceof qe ? t.errors : t)
1484 }), [])
1485 }
1486 var Ue = function() {
1487 return "function" == typeof Symbol ? Symbol("rxSubscriber") : "@@rxSubscriber_" + Math.random()
1488 }(),
1489 We = function(e) {
1490 function t(r, n, i) {
1491 var o = e.call(this) || this;
1492 switch (o.syncErrorValue = null, o.syncErrorThrown = !1, o.syncErrorThrowable = !1, o.isStopped = !1, arguments.length) {
1493 case 0:
1494 o.destination = Me;
1495 break;
1496 case 1:
1497 if (!r) {
1498 o.destination = Me;
1499 break
1500 }
1501 if ("object" == typeof r) {
1502 r instanceof t ? (o.syncErrorThrowable = r.syncErrorThrowable, o.destination = r, r.add(o)) : (o.syncErrorThrowable = !0, o.destination = new Re(o, r));
1503 break
1504 }
1505 default:
1506 o.syncErrorThrowable = !0, o.destination = new Re(o, r, n, i)
1507 }
1508 return o
1509 }
1510 return Ae(t, e), t.prototype[Ue] = function() {
1511 return this
1512 }, t.create = function(e, r, n) {
1513 var i = new t(e, r, n);
1514 return i.syncErrorThrowable = !1, i
1515 }, t.prototype.next = function(e) {
1516 this.isStopped || this._next(e)
1517 }, t.prototype.error = function(e) {
1518 this.isStopped || (this.isStopped = !0, this._error(e))
1519 }, t.prototype.complete = function() {
1520 this.isStopped || (this.isStopped = !0, this._complete())
1521 }, t.prototype.unsubscribe = function() {
1522 this.closed || (this.isStopped = !0, e.prototype.unsubscribe.call(this))
1523 }, t.prototype._next = function(e) {
1524 this.destination.next(e)
1525 }, t.prototype._error = function(e) {
1526 this.destination.error(e), this.unsubscribe()
1527 }, t.prototype._complete = function() {
1528 this.destination.complete(), this.unsubscribe()
1529 }, t.prototype._unsubscribeAndRecycle = function() {
1530 var e = this._parentOrParents;
1531 return this._parentOrParents = null, this.unsubscribe(), this.closed = !1, this.isStopped = !1, this._parentOrParents = e, this
1532 }, t
1533 }(Fe),
1534 Re = function(e) {
1535 function t(t, r, n, i) {
1536 var o, a = e.call(this) || this;
1537 a._parentSubscriber = t;
1538 var s = a;
1539 return Ce(r) ? o = r : r && (o = r.next, n = r.error, i = r.complete, r !== Me && (Ce((s = Object.create(r)).unsubscribe) && a.add(s.unsubscribe.bind(s)), s.unsubscribe = a.unsubscribe.bind(a))), a._context = s, a._next = o, a._error = n, a._complete = i, a
1540 }
1541 return Ae(t, e), t.prototype.next = function(e) {
1542 if (!this.isStopped && this._next) {
1543 var t = this._parentSubscriber;
1544 De.useDeprecatedSynchronousErrorHandling && t.syncErrorThrowable ? this.__tryOrSetError(t, this._next, e) && this.unsubscribe() : this.__tryOrUnsub(this._next, e)
1545 }
1546 }, t.prototype.error = function(e) {
1547 if (!this.isStopped) {
1548 var t = this._parentSubscriber,
1549 r = De.useDeprecatedSynchronousErrorHandling;
1550 if (this._error) r && t.syncErrorThrowable ? (this.__tryOrSetError(t, this._error, e), this.unsubscribe()) : (this.__tryOrUnsub(this._error, e), this.unsubscribe());
1551 else if (t.syncErrorThrowable) r ? (t.syncErrorValue = e, t.syncErrorThrown = !0) : Ne(e), this.unsubscribe();
1552 else {
1553 if (this.unsubscribe(), r) throw e;
1554 Ne(e)
1555 }
1556 }
1557 }, t.prototype.complete = function() {
1558 var e = this;
1559 if (!this.isStopped) {
1560 var t = this._parentSubscriber;
1561 if (this._complete) {
1562 var r = function() {
1563 return e._complete.call(e._context)
1564 };
1565 De.useDeprecatedSynchronousErrorHandling && t.syncErrorThrowable ? (this.__tryOrSetError(t, r), this.unsubscribe()) : (this.__tryOrUnsub(r), this.unsubscribe())
1566 } else this.unsubscribe()
1567 }
1568 }, t.prototype.__tryOrUnsub = function(e, t) {
1569 try {
1570 e.call(this._context, t)
1571 } catch (e) {
1572 if (this.unsubscribe(), De.useDeprecatedSynchronousErrorHandling) throw e;
1573 Ne(e)
1574 }
1575 }, t.prototype.__tryOrSetError = function(e, t, r) {
1576 if (!De.useDeprecatedSynchronousErrorHandling) throw new Error("bad call");
1577 try {
1578 t.call(this._context, r)
1579 } catch (t) {
1580 return De.useDeprecatedSynchronousErrorHandling ? (e.syncErrorValue = t, e.syncErrorThrown = !0, !0) : (Ne(t), !0)
1581 }
1582 return !1
1583 }, t.prototype._unsubscribe = function() {
1584 var e = this._parentSubscriber;
1585 this._context = null, this._parentSubscriber = null, e.unsubscribe()
1586 }, t
1587 }(We);
1588 var $e = function() {
1589 return "function" == typeof Symbol && Symbol.observable || "@@observable"
1590 }();
1591
1592 function Ye() {}
1593
1594 function He(e) {
1595 return e ? 1 === e.length ? e[0] : function(t) {
1596 return e.reduce((function(e, t) {
1597 return t(e)
1598 }), t)
1599 } : Ye
1600 }
1601 var Ve = function() {
1602 function e(e) {
1603 this._isScalar = !1, e && (this._subscribe = e)
1604 }
1605 return e.prototype.lift = function(t) {
1606 var r = new e;
1607 return r.source = this, r.operator = t, r
1608 }, e.prototype.subscribe = function(e, t, r) {
1609 var n = this.operator,
1610 i = function(e, t, r) {
1611 if (e) {
1612 if (e instanceof We) return e;
1613 if (e[Ue]) return e[Ue]()
1614 }
1615 return e || t || r ? new We(e, t, r) : new We(Me)
1616 }(e, t, r);
1617 if (n ? i.add(n.call(i, this.source)) : i.add(this.source || De.useDeprecatedSynchronousErrorHandling && !i.syncErrorThrowable ? this._subscribe(i) : this._trySubscribe(i)), De.useDeprecatedSynchronousErrorHandling && i.syncErrorThrowable && (i.syncErrorThrowable = !1, i.syncErrorThrown)) throw i.syncErrorValue;
1618 return i
1619 }, e.prototype._trySubscribe = function(e) {
1620 try {
1621 return this._subscribe(e)
1622 } catch (t) {
1623 De.useDeprecatedSynchronousErrorHandling && (e.syncErrorThrown = !0, e.syncErrorValue = t), ! function(e) {
1624 for (; e;) {
1625 var t = e,
1626 r = t.closed,
1627 n = t.destination,
1628 i = t.isStopped;
1629 if (r || i) return !1;
1630 e = n && n instanceof We ? n : null
1631 }
1632 return !0
1633 }(e) ? console.warn(t) : e.error(t)
1634 }
1635 }, e.prototype.forEach = function(e, t) {
1636 var r = this;
1637 return new(t = Be(t))((function(t, n) {
1638 var i;
1639 i = r.subscribe((function(t) {
1640 try {
1641 e(t)
1642 } catch (e) {
1643 n(e), i && i.unsubscribe()
1644 }
1645 }), n, t)
1646 }))
1647 }, e.prototype._subscribe = function(e) {
1648 var t = this.source;
1649 return t && t.subscribe(e)
1650 }, e.prototype[$e] = function() {
1651 return this
1652 }, e.prototype.pipe = function() {
1653 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
1654 return 0 === e.length ? this : He(e)(this)
1655 }, e.prototype.toPromise = function(e) {
1656 var t = this;
1657 return new(e = Be(e))((function(e, r) {
1658 var n;
1659 t.subscribe((function(e) {
1660 return n = e
1661 }), (function(e) {
1662 return r(e)
1663 }), (function() {
1664 return e(n)
1665 }))
1666 }))
1667 }, e.create = function(t) {
1668 return new e(t)
1669 }, e
1670 }();
1671
1672 function Be(e) {
1673 if (e || (e = Promise), !e) throw new Error("no Promise impl found");
1674 return e
1675 }
1676 var Ge = function() {
1677 function e() {
1678 return Error.call(this), this.message = "object unsubscribed", this.name = "ObjectUnsubscribedError", this
1679 }
1680 return e.prototype = Object.create(Error.prototype), e
1681 }(),
1682 Xe = function(e) {
1683 function t(t, r) {
1684 var n = e.call(this) || this;
1685 return n.subject = t, n.subscriber = r, n.closed = !1, n
1686 }
1687 return Ae(t, e), t.prototype.unsubscribe = function() {
1688 if (!this.closed) {
1689 this.closed = !0;
1690 var e = this.subject,
1691 t = e.observers;
1692 if (this.subject = null, t && 0 !== t.length && !e.isStopped && !e.closed) {
1693 var r = t.indexOf(this.subscriber); - 1 !== r && t.splice(r, 1)
1694 }
1695 }
1696 }, t
1697 }(Fe),
1698 Qe = function(e) {
1699 function t(t) {
1700 var r = e.call(this, t) || this;
1701 return r.destination = t, r
1702 }
1703 return Ae(t, e), t
1704 }(We),
1705 Ke = function(e) {
1706 function t() {
1707 var t = e.call(this) || this;
1708 return t.observers = [], t.closed = !1, t.isStopped = !1, t.hasError = !1, t.thrownError = null, t
1709 }
1710 return Ae(t, e), t.prototype[Ue] = function() {
1711 return new Qe(this)
1712 }, t.prototype.lift = function(e) {
1713 var t = new Je(this, this);
1714 return t.operator = e, t
1715 }, t.prototype.next = function(e) {
1716 if (this.closed) throw new Ge;
1717 if (!this.isStopped)
1718 for (var t = this.observers, r = t.length, n = t.slice(), i = 0; i < r; i++) n[i].next(e)
1719 }, t.prototype.error = function(e) {
1720 if (this.closed) throw new Ge;
1721 this.hasError = !0, this.thrownError = e, this.isStopped = !0;
1722 for (var t = this.observers, r = t.length, n = t.slice(), i = 0; i < r; i++) n[i].error(e);
1723 this.observers.length = 0
1724 }, t.prototype.complete = function() {
1725 if (this.closed) throw new Ge;
1726 this.isStopped = !0;
1727 for (var e = this.observers, t = e.length, r = e.slice(), n = 0; n < t; n++) r[n].complete();
1728 this.observers.length = 0
1729 }, t.prototype.unsubscribe = function() {
1730 this.isStopped = !0, this.closed = !0, this.observers = null
1731 }, t.prototype._trySubscribe = function(t) {
1732 if (this.closed) throw new Ge;
1733 return e.prototype._trySubscribe.call(this, t)
1734 }, t.prototype._subscribe = function(e) {
1735 if (this.closed) throw new Ge;
1736 return this.hasError ? (e.error(this.thrownError), Fe.EMPTY) : this.isStopped ? (e.complete(), Fe.EMPTY) : (this.observers.push(e), new Xe(this, e))
1737 }, t.prototype.asObservable = function() {
1738 var e = new Ve;
1739 return e.source = this, e
1740 }, t.create = function(e, t) {
1741 return new Je(e, t)
1742 }, t
1743 }(Ve),
1744 Je = function(e) {
1745 function t(t, r) {
1746 var n = e.call(this) || this;
1747 return n.destination = t, n.source = r, n
1748 }
1749 return Ae(t, e), t.prototype.next = function(e) {
1750 var t = this.destination;
1751 t && t.next && t.next(e)
1752 }, t.prototype.error = function(e) {
1753 var t = this.destination;
1754 t && t.error && this.destination.error(e)
1755 }, t.prototype.complete = function() {
1756 var e = this.destination;
1757 e && e.complete && this.destination.complete()
1758 }, t.prototype._subscribe = function(e) {
1759 return this.source ? this.source.subscribe(e) : Fe.EMPTY
1760 }, t
1761 }(Ke),
1762 Ze = function(e) {
1763 function t(t, r) {
1764 var n = e.call(this, t, r) || this;
1765 return n.scheduler = t, n.work = r, n.pending = !1, n
1766 }
1767 return Ae(t, e), t.prototype.schedule = function(e, t) {
1768 if (void 0 === t && (t = 0), this.closed) return this;
1769 this.state = e;
1770 var r = this.id,
1771 n = this.scheduler;
1772 return null != r && (this.id = this.recycleAsyncId(n, r, t)), this.pending = !0, this.delay = t, this.id = this.id || this.requestAsyncId(n, this.id, t), this
1773 }, t.prototype.requestAsyncId = function(e, t, r) {
1774 return void 0 === r && (r = 0), setInterval(e.flush.bind(e, this), r)
1775 }, t.prototype.recycleAsyncId = function(e, t, r) {
1776 if (void 0 === r && (r = 0), null !== r && this.delay === r && !1 === this.pending) return t;
1777 clearInterval(t)
1778 }, t.prototype.execute = function(e, t) {
1779 if (this.closed) return new Error("executing a cancelled action");
1780 this.pending = !1;
1781 var r = this._execute(e, t);
1782 if (r) return r;
1783 !1 === this.pending && null != this.id && (this.id = this.recycleAsyncId(this.scheduler, this.id, null))
1784 }, t.prototype._execute = function(e, t) {
1785 var r = !1,
1786 n = void 0;
1787 try {
1788 this.work(e)
1789 } catch (e) {
1790 r = !0, n = !!e && e || new Error(e)
1791 }
1792 if (r) return this.unsubscribe(), n
1793 }, t.prototype._unsubscribe = function() {
1794 var e = this.id,
1795 t = this.scheduler,
1796 r = t.actions,
1797 n = r.indexOf(this);
1798 this.work = null, this.state = null, this.pending = !1, this.scheduler = null, -1 !== n && r.splice(n, 1), null != e && (this.id = this.recycleAsyncId(t, e, null)), this.delay = null
1799 }, t
1800 }(function(e) {
1801 function t(t, r) {
1802 return e.call(this) || this
1803 }
1804 return Ae(t, e), t.prototype.schedule = function(e, t) {
1805 return void 0 === t && (t = 0), this
1806 }, t
1807 }(Fe)),
1808 et = function(e) {
1809 function t(t, r) {
1810 var n = e.call(this, t, r) || this;
1811 return n.scheduler = t, n.work = r, n
1812 }
1813 return Ae(t, e), t.prototype.schedule = function(t, r) {
1814 return void 0 === r && (r = 0), r > 0 ? e.prototype.schedule.call(this, t, r) : (this.delay = r, this.state = t, this.scheduler.flush(this), this)
1815 }, t.prototype.execute = function(t, r) {
1816 return r > 0 || this.closed ? e.prototype.execute.call(this, t, r) : this._execute(t, r)
1817 }, t.prototype.requestAsyncId = function(t, r, n) {
1818 return void 0 === n && (n = 0), null !== n && n > 0 || null === n && this.delay > 0 ? e.prototype.requestAsyncId.call(this, t, r, n) : t.flush(this)
1819 }, t
1820 }(Ze),
1821 tt = function() {
1822 function e(t, r) {
1823 void 0 === r && (r = e.now), this.SchedulerAction = t, this.now = r
1824 }
1825 return e.prototype.schedule = function(e, t, r) {
1826 return void 0 === t && (t = 0), new this.SchedulerAction(this, e).schedule(r, t)
1827 }, e.now = function() {
1828 return Date.now()
1829 }, e
1830 }(),
1831 rt = function(e) {
1832 function t(r, n) {
1833 void 0 === n && (n = tt.now);
1834 var i = e.call(this, r, (function() {
1835 return t.delegate && t.delegate !== i ? t.delegate.now() : n()
1836 })) || this;
1837 return i.actions = [], i.active = !1, i.scheduled = void 0, i
1838 }
1839 return Ae(t, e), t.prototype.schedule = function(r, n, i) {
1840 return void 0 === n && (n = 0), t.delegate && t.delegate !== this ? t.delegate.schedule(r, n, i) : e.prototype.schedule.call(this, r, n, i)
1841 }, t.prototype.flush = function(e) {
1842 var t = this.actions;
1843 if (this.active) t.push(e);
1844 else {
1845 var r;
1846 this.active = !0;
1847 do {
1848 if (r = e.execute(e.state, e.delay)) break
1849 } while (e = t.shift());
1850 if (this.active = !1, r) {
1851 for (; e = t.shift();) e.unsubscribe();
1852 throw r
1853 }
1854 }
1855 }, t
1856 }(tt),
1857 nt = new(function(e) {
1858 function t() {
1859 return null !== e && e.apply(this, arguments) || this
1860 }
1861 return Ae(t, e), t
1862 }(rt))(et),
1863 it = new Ve((function(e) {
1864 return e.complete()
1865 }));
1866
1867 function ot(e) {
1868 return e ? function(e) {
1869 return new Ve((function(t) {
1870 return e.schedule((function() {
1871 return t.complete()
1872 }))
1873 }))
1874 }(e) : it
1875 }
1876
1877 function at(e) {
1878 return e && "function" == typeof e.schedule
1879 }
1880 var st = function(e) {
1881 return function(t) {
1882 for (var r = 0, n = e.length; r < n && !t.closed; r++) t.next(e[r]);
1883 t.complete()
1884 }
1885 };
1886
1887 function ut(e, t) {
1888 return new Ve((function(r) {
1889 var n = new Fe,
1890 i = 0;
1891 return n.add(t.schedule((function() {
1892 i !== e.length ? (r.next(e[i++]), r.closed || n.add(this.schedule())) : r.complete()
1893 }))), n
1894 }))
1895 }
1896
1897 function ct(e, t) {
1898 return t ? ut(e, t) : new Ve(st(e))
1899 }
1900
1901 function lt() {
1902 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
1903 var r = e[e.length - 1];
1904 return at(r) ? (e.pop(), ut(e, r)) : ct(e)
1905 }
1906
1907 function ft(e) {
1908 var t = e.error;
1909 e.subscriber.error(t)
1910 }
1911 var ht = function() {
1912 function e(e, t, r) {
1913 this.kind = e, this.value = t, this.error = r, this.hasValue = "N" === e
1914 }
1915 return e.prototype.observe = function(e) {
1916 switch (this.kind) {
1917 case "N":
1918 return e.next && e.next(this.value);
1919 case "E":
1920 return e.error && e.error(this.error);
1921 case "C":
1922 return e.complete && e.complete()
1923 }
1924 }, e.prototype.do = function(e, t, r) {
1925 switch (this.kind) {
1926 case "N":
1927 return e && e(this.value);
1928 case "E":
1929 return t && t(this.error);
1930 case "C":
1931 return r && r()
1932 }
1933 }, e.prototype.accept = function(e, t, r) {
1934 return e && "function" == typeof e.next ? this.observe(e) : this.do(e, t, r)
1935 }, e.prototype.toObservable = function() {
1936 var e, t;
1937 switch (this.kind) {
1938 case "N":
1939 return lt(this.value);
1940 case "E":
1941 return e = this.error, new Ve(t ? function(r) {
1942 return t.schedule(ft, 0, {
1943 error: e,
1944 subscriber: r
1945 })
1946 } : function(t) {
1947 return t.error(e)
1948 });
1949 case "C":
1950 return ot()
1951 }
1952 throw new Error("unexpected notification kind value")
1953 }, e.createNext = function(t) {
1954 return void 0 !== t ? new e("N", t) : e.undefinedValueNotification
1955 }, e.createError = function(t) {
1956 return new e("E", void 0, t)
1957 }, e.createComplete = function() {
1958 return e.completeNotification
1959 }, e.completeNotification = new e("C"), e.undefinedValueNotification = new e("N", void 0), e
1960 }();
1961
1962 function dt(e, t) {
1963 return void 0 === t && (t = 0),
1964 function(r) {
1965 return r.lift(new pt(e, t))
1966 }
1967 }
1968 var pt = function() {
1969 function e(e, t) {
1970 void 0 === t && (t = 0), this.scheduler = e, this.delay = t
1971 }
1972 return e.prototype.call = function(e, t) {
1973 return t.subscribe(new yt(e, this.scheduler, this.delay))
1974 }, e
1975 }(),
1976 yt = function(e) {
1977 function t(t, r, n) {
1978 void 0 === n && (n = 0);
1979 var i = e.call(this, t) || this;
1980 return i.scheduler = r, i.delay = n, i
1981 }
1982 return Ae(t, e), t.dispatch = function(e) {
1983 var t = e.notification,
1984 r = e.destination;
1985 t.observe(r), this.unsubscribe()
1986 }, t.prototype.scheduleMessage = function(e) {
1987 this.destination.add(this.scheduler.schedule(t.dispatch, this.delay, new mt(e, this.destination)))
1988 }, t.prototype._next = function(e) {
1989 this.scheduleMessage(ht.createNext(e))
1990 }, t.prototype._error = function(e) {
1991 this.scheduleMessage(ht.createError(e)), this.unsubscribe()
1992 }, t.prototype._complete = function() {
1993 this.scheduleMessage(ht.createComplete()), this.unsubscribe()
1994 }, t
1995 }(We),
1996 mt = function() {
1997 return function(e, t) {
1998 this.notification = e, this.destination = t
1999 }
2000 }(),
2001 bt = 1,
2002 vt = function() {
2003 return Promise.resolve()
2004 }(),
2005 gt = {};
2006
2007 function wt(e) {
2008 return e in gt && (delete gt[e], !0)
2009 }
2010 var Et = function(e) {
2011 var t = bt++;
2012 return gt[t] = !0, vt.then((function() {
2013 return wt(t) && e()
2014 })), t
2015 },
2016 St = function(e) {
2017 wt(e)
2018 },
2019 _t = function(e) {
2020 function t(t, r) {
2021 var n = e.call(this, t, r) || this;
2022 return n.scheduler = t, n.work = r, n
2023 }
2024 return Ae(t, e), t.prototype.requestAsyncId = function(t, r, n) {
2025 return void 0 === n && (n = 0), null !== n && n > 0 ? e.prototype.requestAsyncId.call(this, t, r, n) : (t.actions.push(this), t.scheduled || (t.scheduled = Et(t.flush.bind(t, null))))
2026 }, t.prototype.recycleAsyncId = function(t, r, n) {
2027 if (void 0 === n && (n = 0), null !== n && n > 0 || null === n && this.delay > 0) return e.prototype.recycleAsyncId.call(this, t, r, n);
2028 0 === t.actions.length && (St(r), t.scheduled = void 0)
2029 }, t
2030 }(Ze),
2031 Tt = new(function(e) {
2032 function t() {
2033 return null !== e && e.apply(this, arguments) || this
2034 }
2035 return Ae(t, e), t.prototype.flush = function(e) {
2036 this.active = !0, this.scheduled = void 0;
2037 var t, r = this.actions,
2038 n = -1,
2039 i = r.length;
2040 e = e || r.shift();
2041 do {
2042 if (t = e.execute(e.state, e.delay)) break
2043 } while (++n < i && (e = r.shift()));
2044 if (this.active = !1, t) {
2045 for (; ++n < i && (e = r.shift());) e.unsubscribe();
2046 throw t
2047 }
2048 }, t
2049 }(rt))(_t),
2050 xt = new rt(Ze);
2051
2052 function Pt(e) {
2053 return e
2054 }
2055 var Ot = function() {
2056 function e() {
2057 return Error.call(this), this.message = "argument out of range", this.name = "ArgumentOutOfRangeError", this
2058 }
2059 return e.prototype = Object.create(Error.prototype), e
2060 }();
2061
2062 function At(e, t) {
2063 return function(r) {
2064 if ("function" != typeof e) throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");
2065 return r.lift(new jt(e, t))
2066 }
2067 }
2068 var jt = function() {
2069 function e(e, t) {
2070 this.project = e, this.thisArg = t
2071 }
2072 return e.prototype.call = function(e, t) {
2073 return t.subscribe(new Ct(e, this.project, this.thisArg))
2074 }, e
2075 }(),
2076 Ct = function(e) {
2077 function t(t, r, n) {
2078 var i = e.call(this, t) || this;
2079 return i.project = r, i.count = 0, i.thisArg = n || i, i
2080 }
2081 return Ae(t, e), t.prototype._next = function(e) {
2082 var t;
2083 try {
2084 t = this.project.call(this.thisArg, e, this.count++)
2085 } catch (e) {
2086 return void this.destination.error(e)
2087 }
2088 this.destination.next(t)
2089 }, t
2090 }(We),
2091 kt = function(e) {
2092 function t() {
2093 return null !== e && e.apply(this, arguments) || this
2094 }
2095 return Ae(t, e), t.prototype.notifyNext = function(e, t, r, n, i) {
2096 this.destination.next(t)
2097 }, t.prototype.notifyError = function(e, t) {
2098 this.destination.error(e)
2099 }, t.prototype.notifyComplete = function(e) {
2100 this.destination.complete()
2101 }, t
2102 }(We),
2103 Dt = function(e) {
2104 function t(t, r, n) {
2105 var i = e.call(this) || this;
2106 return i.parent = t, i.outerValue = r, i.outerIndex = n, i.index = 0, i
2107 }
2108 return Ae(t, e), t.prototype._next = function(e) {
2109 this.parent.notifyNext(this.outerValue, e, this.outerIndex, this.index++, this)
2110 }, t.prototype._error = function(e) {
2111 this.parent.notifyError(e, this), this.unsubscribe()
2112 }, t.prototype._complete = function() {
2113 this.parent.notifyComplete(this), this.unsubscribe()
2114 }, t
2115 }(We);
2116
2117 function Nt() {
2118 return "function" == typeof Symbol && Symbol.iterator ? Symbol.iterator : "@@iterator"
2119 }
2120 var Mt = Nt(),
2121 It = function(e) {
2122 return e && "number" == typeof e.length && "function" != typeof e
2123 };
2124
2125 function Lt(e) {
2126 return !!e && "function" != typeof e.subscribe && "function" == typeof e.then
2127 }
2128 var qt = function(e) {
2129 if (e && "function" == typeof e[$e]) return function(e) {
2130 return function(t) {
2131 var r = e[$e]();
2132 if ("function" != typeof r.subscribe) throw new TypeError("Provided object does not correctly implement Symbol.observable");
2133 return r.subscribe(t)
2134 }
2135 }(e);
2136 if (It(e)) return st(e);
2137 if (Lt(e)) return r = e,
2138 function(e) {
2139 return r.then((function(t) {
2140 e.closed || (e.next(t), e.complete())
2141 }), (function(t) {
2142 return e.error(t)
2143 })).then(null, Ne), e
2144 };
2145 if (e && "function" == typeof e[Mt]) return t = e,
2146 function(e) {
2147 for (var r = t[Mt]();;) {
2148 var n = r.next();
2149 if (n.done) {
2150 e.complete();
2151 break
2152 }
2153 if (e.next(n.value), e.closed) break
2154 }
2155 return "function" == typeof r.return && e.add((function() {
2156 r.return && r.return()
2157 })), e
2158 };
2159 var t, r, n = Le(e) ? "an invalid object" : "'" + e + "'";
2160 throw new TypeError("You provided " + n + " where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")
2161 };
2162
2163 function Ft(e, t, r, n, i) {
2164 if (void 0 === i && (i = new Dt(e, r, n)), !i.closed) return t instanceof Ve ? t.subscribe(i) : qt(t)(i)
2165 }
2166
2167 function zt(e, t) {
2168 if (null != e) {
2169 if (function(e) {
2170 return e && "function" == typeof e[$e]
2171 }(e)) return function(e, t) {
2172 return new Ve((function(r) {
2173 var n = new Fe;
2174 return n.add(t.schedule((function() {
2175 var i = e[$e]();
2176 n.add(i.subscribe({
2177 next: function(e) {
2178 n.add(t.schedule((function() {
2179 return r.next(e)
2180 })))
2181 },
2182 error: function(e) {
2183 n.add(t.schedule((function() {
2184 return r.error(e)
2185 })))
2186 },
2187 complete: function() {
2188 n.add(t.schedule((function() {
2189 return r.complete()
2190 })))
2191 }
2192 }))
2193 }))), n
2194 }))
2195 }(e, t);
2196 if (Lt(e)) return function(e, t) {
2197 return new Ve((function(r) {
2198 var n = new Fe;
2199 return n.add(t.schedule((function() {
2200 return e.then((function(e) {
2201 n.add(t.schedule((function() {
2202 r.next(e), n.add(t.schedule((function() {
2203 return r.complete()
2204 })))
2205 })))
2206 }), (function(e) {
2207 n.add(t.schedule((function() {
2208 return r.error(e)
2209 })))
2210 }))
2211 }))), n
2212 }))
2213 }(e, t);
2214 if (It(e)) return ut(e, t);
2215 if (function(e) {
2216 return e && "function" == typeof e[Mt]
2217 }(e) || "string" == typeof e) return function(e, t) {
2218 if (!e) throw new Error("Iterable cannot be null");
2219 return new Ve((function(r) {
2220 var n, i = new Fe;
2221 return i.add((function() {
2222 n && "function" == typeof n.return && n.return()
2223 })), i.add(t.schedule((function() {
2224 n = e[Mt](), i.add(t.schedule((function() {
2225 if (!r.closed) {
2226 var e, t;
2227 try {
2228 var i = n.next();
2229 e = i.value, t = i.done
2230 } catch (e) {
2231 return void r.error(e)
2232 }
2233 t ? r.complete() : (r.next(e), this.schedule())
2234 }
2235 })))
2236 }))), i
2237 }))
2238 }(e, t)
2239 }
2240 throw new TypeError((null !== e && typeof e || e) + " is not observable")
2241 }
2242
2243 function Ut(e, t) {
2244 return t ? zt(e, t) : e instanceof Ve ? e : new Ve(qt(e))
2245 }
2246
2247 function Wt(e, t, r) {
2248 return void 0 === r && (r = Number.POSITIVE_INFINITY), "function" == typeof t ? function(n) {
2249 return n.pipe(Wt((function(r, n) {
2250 return Ut(e(r, n)).pipe(At((function(e, i) {
2251 return t(r, e, n, i)
2252 })))
2253 }), r))
2254 } : ("number" == typeof t && (r = t), function(t) {
2255 return t.lift(new Rt(e, r))
2256 })
2257 }
2258 var Rt = function() {
2259 function e(e, t) {
2260 void 0 === t && (t = Number.POSITIVE_INFINITY), this.project = e, this.concurrent = t
2261 }
2262 return e.prototype.call = function(e, t) {
2263 return t.subscribe(new $t(e, this.project, this.concurrent))
2264 }, e
2265 }(),
2266 $t = function(e) {
2267 function t(t, r, n) {
2268 void 0 === n && (n = Number.POSITIVE_INFINITY);
2269 var i = e.call(this, t) || this;
2270 return i.project = r, i.concurrent = n, i.hasCompleted = !1, i.buffer = [], i.active = 0, i.index = 0, i
2271 }
2272 return Ae(t, e), t.prototype._next = function(e) {
2273 this.active < this.concurrent ? this._tryNext(e) : this.buffer.push(e)
2274 }, t.prototype._tryNext = function(e) {
2275 var t, r = this.index++;
2276 try {
2277 t = this.project(e, r)
2278 } catch (e) {
2279 return void this.destination.error(e)
2280 }
2281 this.active++, this._innerSub(t, e, r)
2282 }, t.prototype._innerSub = function(e, t, r) {
2283 var n = new Dt(this, t, r),
2284 i = this.destination;
2285 i.add(n);
2286 var o = Ft(this, e, void 0, void 0, n);
2287 o !== n && i.add(o)
2288 }, t.prototype._complete = function() {
2289 this.hasCompleted = !0, 0 === this.active && 0 === this.buffer.length && this.destination.complete(), this.unsubscribe()
2290 }, t.prototype.notifyNext = function(e, t, r, n, i) {
2291 this.destination.next(t)
2292 }, t.prototype.notifyComplete = function(e) {
2293 var t = this.buffer;
2294 this.remove(e), this.active--, t.length > 0 ? this._next(t.shift()) : 0 === this.active && this.hasCompleted && this.destination.complete()
2295 }, t
2296 }(kt);
2297
2298 function Yt(e, t, r, n) {
2299 return Ce(r) && (n = r, r = void 0), n ? Yt(e, t, r).pipe(At((function(e) {
2300 return Ie(e) ? n.apply(void 0, e) : n(e)
2301 }))) : new Ve((function(n) {
2302 ! function e(t, r, n, i, o) {
2303 var a;
2304 if (function(e) {
2305 return e && "function" == typeof e.addEventListener && "function" == typeof e.removeEventListener
2306 }(t)) {
2307 var s = t;
2308 t.addEventListener(r, n, o), a = function() {
2309 return s.removeEventListener(r, n, o)
2310 }
2311 } else if (function(e) {
2312 return e && "function" == typeof e.on && "function" == typeof e.off
2313 }(t)) {
2314 var u = t;
2315 t.on(r, n), a = function() {
2316 return u.off(r, n)
2317 }
2318 } else if (function(e) {
2319 return e && "function" == typeof e.addListener && "function" == typeof e.removeListener
2320 }(t)) {
2321 var c = t;
2322 t.addListener(r, n), a = function() {
2323 return c.removeListener(r, n)
2324 }
2325 } else {
2326 if (!t || !t.length) throw new TypeError("Invalid event target");
2327 for (var l = 0, f = t.length; l < f; l++) e(t[l], r, n, i, o)
2328 }
2329 i.add(a)
2330 }(e, t, (function(e) {
2331 arguments.length > 1 ? n.next(Array.prototype.slice.call(arguments)) : n.next(e)
2332 }), n, r)
2333 }))
2334 }
2335
2336 function Ht() {
2337 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
2338 var r = Number.POSITIVE_INFINITY,
2339 n = null,
2340 i = e[e.length - 1];
2341 return at(i) ? (n = e.pop(), e.length > 1 && "number" == typeof e[e.length - 1] && (r = e.pop())) : "number" == typeof i && (r = e.pop()), null === n && 1 === e.length && e[0] instanceof Ve ? e[0] : function(e) {
2342 return void 0 === e && (e = Number.POSITIVE_INFINITY), Wt(Pt, e)
2343 }(r)(ct(e, n))
2344 }
2345
2346 function Vt(e, t) {
2347 return function(r) {
2348 return r.lift(new Bt(e, t))
2349 }
2350 }
2351 var Bt = function() {
2352 function e(e, t) {
2353 this.predicate = e, this.thisArg = t
2354 }
2355 return e.prototype.call = function(e, t) {
2356 return t.subscribe(new Gt(e, this.predicate, this.thisArg))
2357 }, e
2358 }(),
2359 Gt = function(e) {
2360 function t(t, r, n) {
2361 var i = e.call(this, t) || this;
2362 return i.predicate = r, i.thisArg = n, i.count = 0, i
2363 }
2364 return Ae(t, e), t.prototype._next = function(e) {
2365 var t;
2366 try {
2367 t = this.predicate.call(this.thisArg, e, this.count++)
2368 } catch (e) {
2369 return void this.destination.error(e)
2370 }
2371 t && this.destination.next(e)
2372 }, t
2373 }(We);
2374
2375 function Xt(e) {
2376 return function(t) {
2377 var r = new Qt(e),
2378 n = t.lift(r);
2379 return r.caught = n
2380 }
2381 }
2382 var Qt = function() {
2383 function e(e) {
2384 this.selector = e
2385 }
2386 return e.prototype.call = function(e, t) {
2387 return t.subscribe(new Kt(e, this.selector, this.caught))
2388 }, e
2389 }(),
2390 Kt = function(e) {
2391 function t(t, r, n) {
2392 var i = e.call(this, t) || this;
2393 return i.selector = r, i.caught = n, i
2394 }
2395 return Ae(t, e), t.prototype.error = function(t) {
2396 if (!this.isStopped) {
2397 var r = void 0;
2398 try {
2399 r = this.selector(t, this.caught)
2400 } catch (t) {
2401 return void e.prototype.error.call(this, t)
2402 }
2403 this._unsubscribeAndRecycle();
2404 var n = new Dt(this, void 0, void 0);
2405 this.add(n);
2406 var i = Ft(this, r, void 0, void 0, n);
2407 i !== n && this.add(i)
2408 }
2409 }, t
2410 }(kt);
2411
2412 function Jt(e, t) {
2413 return void 0 === t && (t = xt),
2414 function(r) {
2415 return r.lift(new Zt(e, t))
2416 }
2417 }
2418 var Zt = function() {
2419 function e(e, t) {
2420 this.dueTime = e, this.scheduler = t
2421 }
2422 return e.prototype.call = function(e, t) {
2423 return t.subscribe(new er(e, this.dueTime, this.scheduler))
2424 }, e
2425 }(),
2426 er = function(e) {
2427 function t(t, r, n) {
2428 var i = e.call(this, t) || this;
2429 return i.dueTime = r, i.scheduler = n, i.debouncedSubscription = null, i.lastValue = null, i.hasValue = !1, i
2430 }
2431 return Ae(t, e), t.prototype._next = function(e) {
2432 this.clearDebounce(), this.lastValue = e, this.hasValue = !0, this.add(this.debouncedSubscription = this.scheduler.schedule(tr, this.dueTime, this))
2433 }, t.prototype._complete = function() {
2434 this.debouncedNext(), this.destination.complete()
2435 }, t.prototype.debouncedNext = function() {
2436 if (this.clearDebounce(), this.hasValue) {
2437 var e = this.lastValue;
2438 this.lastValue = null, this.hasValue = !1, this.destination.next(e)
2439 }
2440 }, t.prototype.clearDebounce = function() {
2441 var e = this.debouncedSubscription;
2442 null !== e && (this.remove(e), e.unsubscribe(), this.debouncedSubscription = null)
2443 }, t
2444 }(We);
2445
2446 function tr(e) {
2447 e.debouncedNext()
2448 }
2449
2450 function rr(e, t) {
2451 return function(r) {
2452 return r.lift(new nr(e, t))
2453 }
2454 }
2455 var nr = function() {
2456 function e(e, t) {
2457 this.compare = e, this.keySelector = t
2458 }
2459 return e.prototype.call = function(e, t) {
2460 return t.subscribe(new ir(e, this.compare, this.keySelector))
2461 }, e
2462 }(),
2463 ir = function(e) {
2464 function t(t, r, n) {
2465 var i = e.call(this, t) || this;
2466 return i.keySelector = n, i.hasKey = !1, "function" == typeof r && (i.compare = r), i
2467 }
2468 return Ae(t, e), t.prototype.compare = function(e, t) {
2469 return e === t
2470 }, t.prototype._next = function(e) {
2471 var t;
2472 try {
2473 var r = this.keySelector;
2474 t = r ? r(e) : e
2475 } catch (e) {
2476 return this.destination.error(e)
2477 }
2478 var n = !1;
2479 if (this.hasKey) try {
2480 n = (0, this.compare)(this.key, t)
2481 } catch (e) {
2482 return this.destination.error(e)
2483 } else this.hasKey = !0;
2484 n || (this.key = t, this.destination.next(e))
2485 }, t
2486 }(We);
2487
2488 function or(e) {
2489 return function(t) {
2490 return 0 === e ? ot() : t.lift(new ar(e))
2491 }
2492 }
2493 var ar = function() {
2494 function e(e) {
2495 if (this.total = e, this.total < 0) throw new Ot
2496 }
2497 return e.prototype.call = function(e, t) {
2498 return t.subscribe(new sr(e, this.total))
2499 }, e
2500 }(),
2501 sr = function(e) {
2502 function t(t, r) {
2503 var n = e.call(this, t) || this;
2504 return n.total = r, n.count = 0, n
2505 }
2506 return Ae(t, e), t.prototype._next = function(e) {
2507 var t = this.total,
2508 r = ++this.count;
2509 r <= t && (this.destination.next(e), r === t && (this.destination.complete(), this.unsubscribe()))
2510 }, t
2511 }(We);
2512
2513 function ur() {
2514 for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
2515 var r = e.length;
2516 if (0 === r) throw new Error("list of properties cannot be empty.");
2517 return function(t) {
2518 return At(function(e, t) {
2519 return function(r) {
2520 for (var n = r, i = 0; i < t; i++) {
2521 var o = n[e[i]];
2522 if (void 0 === o) return;
2523 n = o
2524 }
2525 return n
2526 }
2527 }(e, r))(t)
2528 }
2529 }
2530 var cr = function() {
2531 function e(e) {
2532 this.total = e
2533 }
2534 return e.prototype.call = function(e, t) {
2535 return t.subscribe(new lr(e, this.total))
2536 }, e
2537 }(),
2538 lr = function(e) {
2539 function t(t, r) {
2540 var n = e.call(this, t) || this;
2541 return n.total = r, n.count = 0, n
2542 }
2543 return Ae(t, e), t.prototype._next = function(e) {
2544 ++this.count > this.total && this.destination.next(e)
2545 }, t
2546 }(We),
2547 fr = function(e) {
2548 function t(t, r, n) {
2549 void 0 === r && (r = 0), void 0 === n && (n = Tt);
2550 var i, o = e.call(this) || this;
2551 return o.source = t, o.delayTime = r, o.scheduler = n, (Ie(i = r) || !(i - parseFloat(i) + 1 >= 0) || r < 0) && (o.delayTime = 0), n && "function" == typeof n.schedule || (o.scheduler = Tt), o
2552 }
2553 return Ae(t, e), t.create = function(e, r, n) {
2554 return void 0 === r && (r = 0), void 0 === n && (n = Tt), new t(e, r, n)
2555 }, t.dispatch = function(e) {
2556 var t = e.source,
2557 r = e.subscriber;
2558 return this.add(t.subscribe(r))
2559 }, t.prototype._subscribe = function(e) {
2560 var r = this.delayTime,
2561 n = this.source;
2562 return this.scheduler.schedule(t.dispatch, r, {
2563 source: n,
2564 subscriber: e
2565 })
2566 }, t
2567 }(Ve);
2568 var hr = function() {
2569 function e(e, t) {
2570 this.scheduler = e, this.delay = t
2571 }
2572 return e.prototype.call = function(e, t) {
2573 return new fr(t, this.delay, this.scheduler).subscribe(e)
2574 }, e
2575 }();
2576
2577 function dr(e, t) {
2578 return "function" == typeof t ? function(r) {
2579 return r.pipe(dr((function(r, n) {
2580 return Ut(e(r, n)).pipe(At((function(e, i) {
2581 return t(r, e, n, i)
2582 })))
2583 })))
2584 } : function(t) {
2585 return t.lift(new pr(e))
2586 }
2587 }
2588 var pr = function() {
2589 function e(e) {
2590 this.project = e
2591 }
2592 return e.prototype.call = function(e, t) {
2593 return t.subscribe(new yr(e, this.project))
2594 }, e
2595 }(),
2596 yr = function(e) {
2597 function t(t, r) {
2598 var n = e.call(this, t) || this;
2599 return n.project = r, n.index = 0, n
2600 }
2601 return Ae(t, e), t.prototype._next = function(e) {
2602 var t, r = this.index++;
2603 try {
2604 t = this.project(e, r)
2605 } catch (e) {
2606 return void this.destination.error(e)
2607 }
2608 this._innerSub(t, e, r)
2609 }, t.prototype._innerSub = function(e, t, r) {
2610 var n = this.innerSubscription;
2611 n && n.unsubscribe();
2612 var i = new Dt(this, t, r),
2613 o = this.destination;
2614 o.add(i), this.innerSubscription = Ft(this, e, void 0, void 0, i), this.innerSubscription !== i && o.add(this.innerSubscription)
2615 }, t.prototype._complete = function() {
2616 var t = this.innerSubscription;
2617 t && !t.closed || e.prototype._complete.call(this), this.unsubscribe()
2618 }, t.prototype._unsubscribe = function() {
2619 this.innerSubscription = null
2620 }, t.prototype.notifyComplete = function(t) {
2621 this.destination.remove(t), this.innerSubscription = null, this.isStopped && e.prototype._complete.call(this)
2622 }, t.prototype.notifyNext = function(e, t, r, n, i) {
2623 this.destination.next(t)
2624 }, t
2625 }(kt),
2626 mr = {
2627 leading: !0,
2628 trailing: !1
2629 };
2630 var br = function() {
2631 function e(e, t, r, n) {
2632 this.duration = e, this.scheduler = t, this.leading = r, this.trailing = n
2633 }
2634 return e.prototype.call = function(e, t) {
2635 return t.subscribe(new vr(e, this.duration, this.scheduler, this.leading, this.trailing))
2636 }, e
2637 }(),
2638 vr = function(e) {
2639 function t(t, r, n, i, o) {
2640 var a = e.call(this, t) || this;
2641 return a.duration = r, a.scheduler = n, a.leading = i, a.trailing = o, a._hasTrailingValue = !1, a._trailingValue = null, a
2642 }
2643 return Ae(t, e), t.prototype._next = function(e) {
2644 this.throttled ? this.trailing && (this._trailingValue = e, this._hasTrailingValue = !0) : (this.add(this.throttled = this.scheduler.schedule(gr, this.duration, {
2645 subscriber: this
2646 })), this.leading ? this.destination.next(e) : this.trailing && (this._trailingValue = e, this._hasTrailingValue = !0))
2647 }, t.prototype._complete = function() {
2648 this._hasTrailingValue ? (this.destination.next(this._trailingValue), this.destination.complete()) : this.destination.complete()
2649 }, t.prototype.clearThrottle = function() {
2650 var e = this.throttled;
2651 e && (this.trailing && this._hasTrailingValue && (this.destination.next(this._trailingValue), this._trailingValue = null, this._hasTrailingValue = !1), e.unsubscribe(), this.remove(e), this.throttled = null)
2652 }, t
2653 }(We);
2654
2655 function gr(e) {
2656 e.subscriber.clearThrottle()
2657 }
2658 var wr = function(e, t) {
2659 return e === t || "function" == typeof t && e === t.toString()
2660 },
2661 Er = function() {
2662 for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
2663 return function(e) {
2664 return e.pipe(Vt((function(e) {
2665 var r = e.type,
2666 n = t.length;
2667 if (1 === n) return wr(r, t[0]);
2668 for (var i = 0; i < n; i++)
2669 if (wr(r, t[i])) return !0;
2670 return !1
2671 })))
2672 }
2673 },
2674 Sr = function() {
2675 function e(e, t) {
2676 for (var r = 0; r < t.length; r++) {
2677 var n = t[r];
2678 n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
2679 }
2680 }
2681 return function(t, r, n) {
2682 return r && e(t.prototype, r), n && e(t, n), t
2683 }
2684 }();
2685 var _r = function(e) {
2686 function t(e) {
2687 ! function(e, t) {
2688 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
2689 }(this, t);
2690 var r = function(e, t) {
2691 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2692 return !t || "object" != typeof t && "function" != typeof t ? e : t
2693 }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));
2694 return r.source = e, r
2695 }
2696 return function(e, t) {
2697 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
2698 e.prototype = Object.create(t && t.prototype, {
2699 constructor: {
2700 value: e,
2701 enumerable: !1,
2702 writable: !0,
2703 configurable: !0
2704 }
2705 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
2706 }(t, e), Sr(t, null, [{
2707 key: "of",
2708 value: function() {
2709 return new this(lt.apply(void 0, arguments))
2710 }
2711 }, {
2712 key: "from",
2713 value: function(e, t) {
2714 return new this(Ut(e, t))
2715 }
2716 }]), Sr(t, [{
2717 key: "lift",
2718 value: function(e) {
2719 var r = new t(this);
2720 return r.operator = e, r
2721 }
2722 }, {
2723 key: "ofType",
2724 value: function() {
2725 return Er.apply(void 0, arguments)(this)
2726 }
2727 }]), t
2728 }(Ve);
2729 var Tr = function(e) {
2730 function t(e, r) {
2731 ! function(e, t) {
2732 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
2733 }(this, t);
2734 var n = function(e, t) {
2735 if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2736 return !t || "object" != typeof t && "function" != typeof t ? e : t
2737 }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, (function(e) {
2738 var t = n.__notifier.subscribe(e);
2739 return t && !t.closed && e.next(n.value), t
2740 })));
2741 return n.value = r, n.__notifier = new Ke, n.__subscription = e.subscribe((function(e) {
2742 e !== n.value && (n.value = e, n.__notifier.next(e))
2743 })), n
2744 }
2745 return function(e, t) {
2746 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
2747 e.prototype = Object.create(t && t.prototype, {
2748 constructor: {
2749 value: e,
2750 enumerable: !1,
2751 writable: !0,
2752 configurable: !0
2753 }
2754 }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
2755 }(t, e), t
2756 }(Ve),
2757 xr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2758 return typeof e
2759 } : function(e) {
2760 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
2761 };
2762 "object" === ("undefined" == typeof console ? "undefined" : xr(console)) && console.warn;
2763
2764 function Pr(e) {
2765 if (Array.isArray(e)) {
2766 for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t];
2767 return r
2768 }
2769 return Array.from(e)
2770 }
2771 var Or = function() {
2772 for (var e = arguments.length, t = Array(e), r = 0; r < e; r++) t[r] = arguments[r];
2773 var n = function() {
2774 for (var e = arguments.length, r = Array(e), n = 0; n < e; n++) r[n] = arguments[n];
2775 return Ht.apply(void 0, Pr(t.map((function(e) {
2776 var t = e.apply(void 0, r);
2777 if (!t) throw new TypeError('combineEpics: one of the provided Epics "' + (e.name || "<anonymous>") + "\" does not return a stream. Double check you're not missing a return statement!");
2778 return t
2779 }))))
2780 };
2781 try {
2782 Object.defineProperty(n, "name", {
2783 value: "combineEpics(" + t.map((function(e) {
2784 return e.name || "<anonymous>"
2785 })).join(", ") + ")"
2786 })
2787 } catch (e) {}
2788 return n
2789 };
2790
2791 function Ar(e, t) {
2792 if (e.length !== t.length) return !0;
2793 for (let r = 0; r < e.length; r++)
2794 if (e[r].slug !== t[r].slug) return !0;
2795 return !1
2796 }
2797
2798 function jr(e, t, r) {
2799 e = [...e];
2800 const n = Object.keys(t);
2801 if (0 == n.length) return e; {
2802 let i = e;
2803 for (let e of n) {
2804 let n = t[e];
2805 switch (e) {
2806 case "search":
2807 n = Array.isArray(n) ? n[0] : n, i = i.filter(e => {
2808 for (let t of r.searchFields) {
2809 let r = window._udyGet(e, t, "");
2810 if (r = Array.isArray(r) ? r.map(e => e.toLowerCase()) : r.toLowerCase(), r.includes(n)) return !0
2811 }
2812 return !1
2813 });
2814 break;
2815 case "sort":
2816 let t = Array.isArray(n) ? n[0] : n,
2817 o = t.startsWith("-");
2818 o && (t = t.substring(1)), i = i.sort((e, r) => {
2819 const n = window._udyGet(e, t, ""),
2820 i = window._udyGet(r, t, "");
2821 return o ? n > i ? -1 : 1 : n > i ? 1 : -1
2822 });
2823 break;
2824 default:
2825 if (Array.isArray(n)) {
2826 const t = n;
2827 i = i.filter(r => {
2828 const n = r[e];
2829 return !!n && (Array.isArray(n) ? n.some(e => t.some(t => {
2830 var r;
2831 return null === (r = e) || void 0 === r ? void 0 : r.name.includes(t)
2832 })) : "object" == typeof n ? t.some(e => {
2833 var t;
2834 return null === (t = n.name) || void 0 === t ? void 0 : t.includes(e)
2835 }) : "boolean" == typeof n ? !0 == !!n : t.some(e => {
2836 var t;
2837 return null === (t = n) || void 0 === t ? void 0 : t.toString().includes(e)
2838 }))
2839 })
2840 } else i = i.filter(t => {
2841 var r, i;
2842 const o = t[e];
2843 return !!o && (Array.isArray(o) ? o.some(e => {
2844 var t;
2845 return null === (t = e) || void 0 === t ? void 0 : t.name.includes(n)
2846 }) : "object" == typeof o ? null === (r = o.name) || void 0 === r ? void 0 : r.includes(n) : "boolean" == typeof o ? !0 == !!o : null === (i = o) || void 0 === i ? void 0 : i.toString().includes(n))
2847 })
2848 }
2849 }
2850 return i
2851 }
2852 }
2853 const Cr = function(e) {
2854 var t = e.name,
2855 r = e.initialState;
2856 if (!t) throw new Error("`name` is a required option for createSlice");
2857 var n = e.reducers || {},
2858 i = void 0 === e.extraReducers ? {} : "function" == typeof e.extraReducers ? Pe(e.extraReducers) : e.extraReducers,
2859 o = Object.keys(n),
2860 a = {},
2861 s = {},
2862 u = {};
2863 o.forEach((function(e) {
2864 var r, i, o = n[e],
2865 c = t + "/" + e;
2866 "reducer" in o ? (r = o.reducer, i = o.prepare) : r = o, a[e] = r, s[c] = r, u[e] = i ? xe(c, i) : xe(c)
2867 }));
2868 var c = function(e, t) {
2869 var r = "function" == typeof t ? Pe(t) : t;
2870 return function(t, n) {
2871 return void 0 === t && (t = e), Z(t, (function(e) {
2872 var t = r[n.type];
2873 return t ? t(e, n) : void 0
2874 }))
2875 }
2876 }(r, Se({}, i, {}, s));
2877 return {
2878 name: t,
2879 reducer: c,
2880 actions: u,
2881 caseReducers: a
2882 }
2883 }({
2884 name: "cms",
2885 initialState: {
2886 status: "idle",
2887 name: "",
2888 rawPosts: [],
2889 posts: [],
2890 properties: {},
2891 configuration: {
2892 hide: [],
2893 restartInteractionsAfterDisplay: !1,
2894 booleanLabel: "Yes",
2895 searchFields: ["name"],
2896 animationStart: "animation-start",
2897 animationEnd: "animation-end"
2898 },
2899 mode: "normal",
2900 filterState: {}
2901 },
2902 reducers: {
2903 init: (e, t) => {
2904 e.name = t.payload.name, t.payload.mode && (e.mode = t.payload.mode), t.payload.config && (e.configuration = Object.assign(Object.assign({}, e.configuration), t.payload.config)), Array.isArray(e.configuration.searchFields) || (e.configuration.searchFields = [e.configuration.searchFields]), Array.isArray(e.configuration.hide) || (e.configuration.hide = [e.configuration.hide]), e.status = "loading"
2905 },
2906 loadFromRemote: e => {
2907 e.status = "loading"
2908 },
2909 error: (e, t) => {
2910 e.status = "error", e.error = t.payload
2911 },
2912 loadCmsScheme: (e, t) => {
2913 e.status = "loading", e.cmsScheme = t.payload
2914 },
2915 loadDataSuccess: (e, t) => {
2916 if (e.status = "ready", window.udeslyCmsFiltersChangeProperties ? e.properties = window.udeslyCmsFiltersChangeProperties(e.name, t.payload.properties) : e.properties = t.payload.properties, window.udeslyCmsFiltersChangePosts ? e.rawPosts = window.udeslyCmsFiltersChangePosts(e.name, t.payload.items) : e.rawPosts = t.payload.items, "normal" === e.mode) {
2917 const t = jr(e.rawPosts, e.filterState, e.configuration);
2918 Ar(e.posts, t) && (e.posts = t)
2919 }
2920 },
2921 savedToCache: e => {},
2922 changeFilterState: (e, t) => {
2923 if (e.filterState = t.payload, "ready" !== e.status) return;
2924 const r = jr(e.rawPosts, e.filterState, e.configuration);
2925 Ar(e.posts, r) && (e.posts = r)
2926 }
2927 }
2928 }),
2929 kr = Cr.actions,
2930 Dr = () => {
2931 const e = document.cookie.match("(^|;)\\s*wf-csrf\\s*=\\s*([^;]+)");
2932 return e ? e.pop() : null
2933 },
2934 Nr = (...e) => je(void 0, void 0, void 0, (function*() {
2935 let t = Dr();
2936 t || (t = yield je(void 0, void 0, void 0, (function*() {
2937 return yield fetch("/.wf_graphql/csrf", {
2938 method: "POST",
2939 credentials: "include",
2940 headers: {
2941 "X-Requested-With": "XMLHttpRequest"
2942 }
2943 }), Dr()
2944 })));
2945 const r = yield((e, t) => {
2946 const r = new Headers;
2947 return r.append("Content-Type", "application/json"), r.append("X-Requested-With", "XMLHttpRequest"), r.append("X-Wf-CSRF", e), fetch("/.wf_graphql/apollo", {
2948 method: "POST",
2949 credentials: "include",
2950 headers: r,
2951 body: "object" == typeof t ? JSON.stringify(t) : t
2952 })
2953 })(t, e),
2954 n = yield r.json();
2955 if (n.some(e => e.errors)) throw n.map(e => e.errors);
2956 return n.map(e => e.data)
2957 }));
2958
2959 function Mr(e) {
2960 return je(this, void 0, void 0, (function*() {
2961 const [t] = yield Nr({
2962 operationName: "Introspection",
2963 variables: {},
2964 query: `\n query Introspection {\n __type(name: "${e}") {\n fields {\n name\n type {\n name\n kind \n ofType {\n name, \n kind\n }\n }\n }\n } \n }`
2965 });
2966 return t.__type.fields
2967 }))
2968 }
2969 const Ir = (e, t, r) => {
2970 const n = Object.entries(t);
2971 let i = {};
2972 const o = e.map(e => {
2973 const t = Object.values(e),
2974 r = {};
2975 return n.forEach(([e, n], o) => {
2976 const a = new Set;
2977 if (r[e] = Lr(n, t[o], a), a.size > 0)
2978 if (i[e])
2979 for (let t of Array.from(a.values())) i[e].add(t);
2980 else i[e] = a
2981 }), r
2982 });
2983 if ("function" == typeof window._udeslyCmsFiltersFilterItems) try {
2984 let t = window._udeslyCmsFiltersFilterItems(r, {
2985 items: o,
2986 properties: i
2987 });
2988 e = t.items, i = t.properties
2989 } catch (e) {
2990 console.error("User defined filters failed:", e)
2991 }
2992 return {
2993 items: o,
2994 properties: i
2995 }
2996 },
2997 Lr = (e, t, r) => {
2998 var n, i;
2999 if (!t) return null;
3000 if ("object" == typeof t) {
3001 if (Array.isArray(t)) {
3002 const n = Object.entries(e),
3003 i = [];
3004 return t.forEach(e => {
3005 var t, o;
3006 if (e) {
3007 e.f_name_ ? null === (t = r) || void 0 === t || t.add(e.f_name_) : e.name && (null === (o = r) || void 0 === o || o.add(e.name));
3008 const a = Object.values(e),
3009 s = {};
3010 n.forEach(([e, t], n) => {
3011 s[e] = Lr(t, a[n], r)
3012 }), i.push(s)
3013 }
3014 }), i
3015 } {
3016 t.f_name_ ? null === (n = r) || void 0 === n || n.add(t.f_name_) : t.name && (null === (i = r) || void 0 === i || i.add(t.name));
3017 const o = Object.entries(e),
3018 a = Object.values(t),
3019 s = {};
3020 return o.forEach(([e, t], n) => {
3021 s[e] = Lr(t, a[n], r)
3022 }), s
3023 }
3024 }
3025 if ("RichText" == e) return function(e) {
3026 if (!e) return "";
3027 if ("string" == typeof e) return e; {
3028 const r = document.createDocumentFragment(),
3029 n = {};
3030 e.forEach(e => {
3031 n[e._id] = e
3032 }), e.forEach(e => {
3033 n[e._id] && r.append(function e(t, r) {
3034 let n;
3035 if (t.tag) {
3036 if (n = document.createElement(t.tag), t.children)
3037 for (let i of t.children) {
3038 const t = e(r[i], r);
3039 delete r[i], n.append(t)
3040 }
3041 delete r[t._id]
3042 } else t.text && (n = t.v, delete r[t._id]);
3043 return n
3044 }(e, n))
3045 });
3046 var t = document.createElement("div");
3047 return t.appendChild(r.cloneNode(!0)), t.innerHTML
3048 }
3049 }(t);
3050 if (r) switch (e) {
3051 case "Boolean":
3052 case "Float":
3053 case "Int":
3054 r.add(t);
3055 break;
3056 case "String":
3057 (t.startsWith("#") || t.startsWith("rgb")) && r.add(t)
3058 }
3059 return t
3060 };
3061 const qr = (e, t) => je(void 0, void 0, void 0, (function*() {
3062 let {
3063 items: r,
3064 count: n
3065 } = yield Fr(e, t, 0);
3066 if (n > 100) {
3067 let i = [];
3068 for (let r = 100; r < n; r += 100) i.push(Fr(e, t, r));
3069 const o = yield Promise.all(i);
3070 for (let e of o) r = r.concat(e.items)
3071 }
3072 return r
3073 })),
3074 Fr = (e, t, r) => je(void 0, void 0, void 0, (function*() {
3075 const [n] = yield Nr({
3076 operationName: "GetData",
3077 variables: null,
3078 query: `query GetData {\n database {\n collections {\n ${e} {\n items(offset: ${r}) {\n ${t}\n },\n count\n }\n }\n }\n }`
3079 });
3080 let {
3081 items: i,
3082 count: o
3083 } = n.database.collections[e];
3084 return {
3085 items: i,
3086 count: o
3087 }
3088 })),
3089 zr = e => {
3090 var t;
3091 let r = {},
3092 n = "";
3093 for (let i of e) {
3094 const e = /f_(.*?)_(\d|$)/gm.exec(i.name),
3095 o = e ? e[1] : i.name;
3096 switch (i.type.name) {
3097 case "video":
3098 case "image":
3099 r[o] = {
3100 url: "String"
3101 }, n += `\n ${i.name} { url }`;
3102 break;
3103 case "option":
3104 r[o] = {
3105 name: "String"
3106 }, n += `\n ${i.name} { name }`;
3107 break;
3108 case null:
3109 switch (null === (t = i.type.ofType) || void 0 === t ? void 0 : t.name) {
3110 case "video":
3111 case "image":
3112 r[o] = {
3113 url: "String"
3114 }, n += `\n ${i.name} { url }`;
3115 break;
3116 case "option":
3117 r[o] = {
3118 name: "String"
3119 }, n += `\n ${i.name} { name }`;
3120 break;
3121 default:
3122 if (i.type.fields) {
3123 r[o] = {};
3124 let e = "";
3125 for (let t of i.type.fields) {
3126 const n = /f_(.*?)_(\d|$)/gm.exec(t.name),
3127 i = n ? n[1] : t.name;
3128 switch (t.type.name) {
3129 case "video":
3130 case "image":
3131 r[o][i] = {
3132 url: "String"
3133 }, e += `\n ${t.name} { \n url \n }`;
3134 break;
3135 case "option":
3136 r[o][i] = {
3137 name: "String"
3138 }, e += `\n ${t.name} { \n name \n }`;
3139 break;
3140 case "BasicId":
3141 case "file":
3142 break;
3143 case "Int":
3144 case "Float":
3145 case "Date":
3146 case "Datetime":
3147 case "String":
3148 case "RichText":
3149 case "Boolean":
3150 r[o][i] = t.type.name, e += `\n ${t.name}`
3151 }
3152 }
3153 n += `\n ${i.name} { \n ${e} \n }`
3154 }
3155 }
3156 break;
3157 case "BasicId":
3158 case "file":
3159 break;
3160 case "Int":
3161 case "Float":
3162 case "Date":
3163 case "DateTime":
3164 case "String":
3165 case "RichText":
3166 case "Boolean":
3167 r[o] = i.type.name, n += `\n ${i.name}`;
3168 break;
3169 default:
3170 if (i.type.fields) {
3171 r[o] = {};
3172 let e = "";
3173 for (let t of i.type.fields) {
3174 const n = /f_(.*?)_(\d|$)/gm.exec(t.name),
3175 i = n ? n[1] : t.name;
3176 switch (t.type.name) {
3177 case "video":
3178 r[o][i] = {
3179 url: "String"
3180 }, e += `\n ${t.name} { \n url \n }`;
3181 break;
3182 case "image":
3183 r[o][i] = {
3184 url: "String"
3185 }, e += `\n ${t.name} { \n url\n }`;
3186 break;
3187 case "option":
3188 r[o][i] = {
3189 name: "String"
3190 }, e += `\n ${t.name} { \n name\n }`;
3191 break;
3192 case "BasicId":
3193 case "file":
3194 break;
3195 case "Int":
3196 case "Float":
3197 case "Date":
3198 case "DateTime":
3199 case "String":
3200 case "RichText":
3201 case "Boolean":
3202 r[o][i] = t.type.name, e += `\n ${t.name}`
3203 }
3204 }
3205 n += `\n ${i.name} { \n ${e} \n }`
3206 }
3207 }
3208 }
3209 return {
3210 query: n,
3211 fieldsMap: r
3212 }
3213 };
3214 class Ur {
3215 constructor(e = "keyval-store", t = "keyval") {
3216 this.storeName = t, this._dbp = new Promise((r, n) => {
3217 const i = indexedDB.open(e, 1);
3218 i.onerror = () => n(i.error), i.onsuccess = () => r(i.result), i.onupgradeneeded = () => {
3219 i.result.createObjectStore(t)
3220 }
3221 })
3222 }
3223 _withIDBStore(e, t) {
3224 return this._dbp.then(r => new Promise((n, i) => {
3225 const o = r.transaction(this.storeName, e);
3226 o.oncomplete = () => n(), o.onabort = o.onerror = () => i(o.error), t(o.objectStore(this.storeName))
3227 }))
3228 }
3229 }
3230 let Wr;
3231
3232 function Rr() {
3233 return Wr || (Wr = new Ur), Wr
3234 }
3235
3236 function $r(e, t = Rr()) {
3237 let r;
3238 return t._withIDBStore("readonly", t => {
3239 r = t.get(e)
3240 }).then(() => r.result)
3241 }
3242
3243 function Yr(e, t, r = Rr()) {
3244 return r._withIDBStore("readwrite", r => {
3245 r.put(t, e)
3246 })
3247 }
3248 const Hr = function(e) {
3249 for (var t = [], r = 0; r < e.childNodes.length; r++) {
3250 var n = e.childNodes[r];
3251 8 === n.nodeType ? t.push(n) : t.push.apply(t, Hr(n))
3252 }
3253 return t
3254 },
3255 Vr = Hr(document),
3256 Br = function() {
3257 var e, t;
3258 try {
3259 if (Vr[1] && (null === (e = Vr[1].nodeValue) || void 0 === e ? void 0 : e.includes("Last Published"))) return new Date(Vr[1].nodeValue.replace("Last Published:", "").trim()).getTime();
3260 if (Vr[0] && (null === (t = Vr[0].nodeValue) || void 0 === t ? void 0 : t.includes("Last Published"))) return new Date(Vr[0].nodeValue.replace("Last Published:", "").trim()).getTime()
3261 } catch (e) {
3262 return Date.now() + 9e5
3263 }
3264 },
3265 Gr = (e, t) => je(void 0, void 0, void 0, (function*() {
3266 return ((yield $r(e + "_cached_on")) || Date.now()) != Br() ? (Yr(e, t), yield Yr(e + "_cached_on", Br())) : null
3267 })),
3268 Xr = e => je(void 0, void 0, void 0, (function*() {
3269 return ((yield $r(e + "_cached_on")) || Date.now()) != Br() ? null : yield $r(e)
3270 }));
3271 var Qr = Or((e, t) => e.pipe(Er(kr.init), Wt(() => Ut((e => je(void 0, void 0, void 0, (function*() {
3272 const [t, r] = yield Promise.all([Xr(e + "_items"), Xr(e + "_properties")]);
3273 return !(!t || !r) && {
3274 items: t,
3275 properties: r
3276 }
3277 })))(t.value.name))), dr(e => !1 !== e ? [kr.loadDataSuccess(e)] : [kr.loadFromRemote()])), (e, t) => e.pipe(Er(kr.loadFromRemote), Wt(() => Ut((e => je(void 0, void 0, void 0, (function*() {
3278 const t = e.includes("-") ? `item1_c_${e.replace("-","_")}_3dr` : `item1_c_${e}_`,
3279 [r] = yield Nr({
3280 operationName: "Introspection",
3281 variables: {},
3282 query: `\n query Introspection {\n __type(name: "${t}") {\n fields {\n name\n type {\n name\n kind \n ofType {\n name, \n kind\n }\n fields {\n name\n type {\n name\n kind, \n fields { \n name \n type {\n name \n kind \n } \n }\n }\n }\n }\n }\n } \n }`
3283 }),
3284 n = {};
3285 r.__type.fields.forEach(e => {
3286 "image" != e.type.name && "video" != e.type.name && "file" != e.type.name && "option" != e.type.name && e.type.fields && (n[e.type.name] = e.type.fields)
3287 });
3288 for (const e of r.__type.fields)
3289 if (e.type.name || !e.type.ofType || "image" == e.type.ofType.name || n[e.type.ofType.name]) !e.type.name && e.type.ofType && "image" != e.type.ofType.name && n[e.type.ofType.name] && (e.type.fields = n[e.type.ofType.name]);
3290 else {
3291 const t = yield Mr(e.type.ofType.name);
3292 e.type.fields = t
3293 }
3294 return {
3295 collectionNameInSchema: t.replace("item1_", ""),
3296 fields: r.__type.fields
3297 }
3298 })))(t.value.name)).pipe(dr(e => [kr.loadCmsScheme(e)]), Xt(e => lt(kr.error("Failed to load CMS data" + e.toString())))))), (e, t) => e.pipe(Er(kr.loadCmsScheme), Wt(() => Ut(((e, t) => je(void 0, void 0, void 0, (function*() {
3299 const {
3300 query: r,
3301 fieldsMap: n
3302 } = zr(t.fields), i = yield qr(t.collectionNameInSchema, r);
3303 return Ir(i, n, e)
3304 })))(t.value.name, t.value.cmsScheme)).pipe(dr(e => [kr.loadDataSuccess(e)]), Xt(e => lt(kr.error("Failed to load CMS data" + e.toString())))))), (e, t) => e.pipe(Er(kr.loadDataSuccess), Wt(() => Ut(((e, t) => je(void 0, void 0, void 0, (function*() {
3305 yield Promise.all([Gr(e + "_items", t.items), Gr(e + "_properties", t.properties)])
3306 })))(t.value.name, {
3307 items: t.value.rawPosts,
3308 properties: t.value.properties
3309 })).pipe(dr(() => [kr.savedToCache()]), Xt(e => lt(kr.error("Failed to save CMS cache data")))))));
3310 const Kr = Or(Qr),
3311 Jr = function() {
3312 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
3313 t = new(0, nt.constructor)(nt.SchedulerAction),
3314 r = new Ke,
3315 n = void 0,
3316 i = function(i) {
3317 n = i;
3318 var o = (new Ke).pipe(dt(t)),
3319 a = (new Ke).pipe(dt(t)),
3320 s = new _r(o),
3321 u = new Tr(a, n.getState());
3322 return r.pipe(At((function(t) {
3323 var r = "dependencies" in e ? t(s, u, e.dependencies) : t(s, u);
3324 if (!r) throw new TypeError('Your root Epic "' + (t.name || "<anonymous>") + "\" does not return a stream. Double check you're not missing a return statement!");
3325 return r
3326 })), Wt((function(e) {
3327 return Ut(e).pipe((r = t, void 0 === n && (n = 0), function(e) {
3328 return e.lift(new hr(r, n))
3329 }), dt(t));
3330 var r, n
3331 }))).subscribe(n.dispatch),
3332 function(e) {
3333 return function(t) {
3334 var r = e(t);
3335 return a.next(n.getState()), o.next(t), r
3336 }
3337 }
3338 };
3339 return i.run = function(e) {
3340 r.next(e)
3341 }, i
3342 }(),
3343 Zr = () => {
3344 const e = Te({
3345 reducer: Cr.reducer,
3346 middleware: [Jr],
3347 devTools: !1
3348 });
3349 return Jr.run(Kr), e
3350 };
3351 class en {
3352 constructor(e, t, r) {
3353 this.form = e, this.dispatch = t, this.config = r, this.properties = {}, Yt(this.form, "submit").subscribe(e => {
3354 e.preventDefault(), e.stopPropagation()
3355 }), Yt(this.form, "change").pipe(Jt(200)).subscribe(() => {
3356 const e = new FormData(this.form),
3357 t = Array.from(e.keys()),
3358 r = {};
3359 for (let n of t) {
3360 const t = e.getAll(n);
3361 t.length && (t.length > 1 ? r[n.replace("[]", "")] = t : "" !== t[0] && (r[n.replace("[]", "")] = t[0]))
3362 }
3363 this.dispatch(kr.changeFilterState(r))
3364 }), Yt(this.form, "reset").pipe(Jt(100)).subscribe(() => {
3365 this.dispatch(kr.changeFilterState({}))
3366 });
3367 const n = this.form.querySelectorAll('input[name="search"]');
3368 n.length > 0 && Yt(n, "input").pipe(Jt(200)).subscribe(() => {
3369 this.form.dispatchEvent(new Event("change", {
3370 bubbles: !0
3371 }))
3372 }), this.form.querySelectorAll('input[type="submit"]').forEach(e => e.type = "reset"), this.form.dispatchEvent(new Event("change")), this.filterWrapper = this.form.querySelector('[filter="wrapper"]'), this.filterWrapper && (this.filterWrapperParent = this.filterWrapper.parentElement, this.filterWrapper = this.filterWrapper.cloneNode(!0), this.filterWrapperParent.innerHTML = "")
3373 }
3374 changeProperties(e) {
3375 this.properties = e, this.displayProperties()
3376 }
3377 displayProperties() {
3378 if (this.filterWrapper && this.filterWrapperParent)
3379 for (let e in this.properties) this.constructFilterHTML(e, this.properties[e])
3380 }
3381 constructFilterHTML(e, t) {
3382 var r, n;
3383 if (this.config.hide.includes(e)) return;
3384 let i = null === (r = this.filterWrapper) || void 0 === r ? void 0 : r.cloneNode(!0);
3385 i.dataset.filterName = e;
3386 let o, a = i.querySelector("select"),
3387 s = i.querySelector(".w-checkbox"),
3388 u = i.querySelector(".w-radio");
3389 if (i.querySelectorAll("label").forEach(e => {
3390 e.classList.contains("w-checkbox") || e.classList.contains("w-radio") || (o = e)
3391 }), o && (o.textContent = e.replace(/_/, " ")), a) {
3392 a.name = e, a.id = e;
3393 let r = a.options[0].value ? "<option value>Select one...</option>" : `<option value>${a.options[0].innerText}</option>`;
3394 t.forEach(e => r += `<option value="${e}">${"true"==e.toString()?this.config.booleanLabel:e}</option>`), a.innerHTML = r
3395 } else if (s) {
3396 const r = document.createDocumentFragment();
3397 t.forEach(t => {
3398 var n;
3399 const i = null === (n = s) || void 0 === n ? void 0 : n.cloneNode(!0),
3400 o = i.querySelector("input");
3401 o.id = e + "[]", o.name = e + "[]", o.value = t;
3402 const a = i.querySelector(".w-form-label");
3403 a && (a.textContent = "true" == t.toString() ? this.config.booleanLabel : t), r.append(i)
3404 }), s.replaceWith(r)
3405 } else if (u) {
3406 const r = document.createDocumentFragment();
3407 t.forEach(t => {
3408 var n;
3409 const i = null === (n = u) || void 0 === n ? void 0 : n.cloneNode(!0),
3410 o = i.querySelector("input");
3411 o.id = e + "[]", o.name = e + "[]", o.value = t;
3412 const a = i.querySelector(".w-form-label");
3413 a && (a.textContent = "true" == t.toString() ? this.config.booleanLabel : t), r.append(i)
3414 }), u.replaceWith(r)
3415 }
3416 null === (n = this.filterWrapperParent) || void 0 === n || n.append(i)
3417 }
3418 }
3419 class tn {
3420 constructor(e, t, r, n) {
3421 var i;
3422 this.list = e, this.collectionName = t, this.config = r, this.wrapper = n, this.items = [], this.postsPerPage = 0, this.itemsToShow = [], this.currentPage = 0, this.maxPages = 0, this.start = 0, this.end = 0, this.renderedTimes = 0, this.paginationElements = this.wrapper.querySelectorAll("[pagination]"), this.postsFound = this.wrapper.querySelectorAll('[filter="found-posts"]'), this.paginationElements.length && (this.postsPerPage = e.childElementCount, Yt(this.paginationElements, "click").pipe(function(e, t, r) {
3423 return void 0 === t && (t = xt), void 0 === r && (r = mr),
3424 function(n) {
3425 return n.lift(new br(e, t, r.leading, r.trailing))
3426 }
3427 }(200), Vt(e => "false" == (e.target.dataset.disabled || "true")), At(e => e.target.getAttribute("pagination")), Vt(e => !!e)).subscribe(e => {
3428 "next" == e ? this.goNext() : "previous" == e && this.goPrevious()
3429 }));
3430 const o = null === (i = this.list.firstElementChild) || void 0 === i ? void 0 : i.cloneNode(!0);
3431 if (!o) throw new Error("List has not items inside?!");
3432 this.list.innerHTML = "", this.parseTemplate(o)
3433 }
3434 goNext() {
3435 this.maxPages - 1 > this.currentPage && (this.currentPage += 1, this.updateItemsToShow())
3436 }
3437 goPrevious() {
3438 this.currentPage > 0 && (this.currentPage -= 1, this.updateItemsToShow())
3439 }
3440 parseText(e) {
3441 const t = e.getAttribute("card:text").toLowerCase().replace(/ /gm, "_");
3442 e.removeAttribute("card:text"), e.innerText = `\${_udyGet(item, '${t}', '')}`
3443 }
3444 parseDate(e) {
3445 const t = e.getAttribute("card:date").toLowerCase().replace(/ /gm, "_");
3446 e.removeAttribute("card:date"), e.innerText = `\${_udyFormatDate(_udyGet(item, '${t}', new Date()), '')}`
3447 }
3448 parseDefaultLink(e) {
3449 e.removeAttribute("card"), e.setAttribute("href", `/${this.collectionName}/\${_udyGet(item, 'slug', '#')}`)
3450 }
3451 parseImage(e) {
3452 const t = e.getAttribute("card:image").toLowerCase().replace(/ /gm, "_");
3453 e.removeAttribute("card:image"), "IMG" == e.tagName ? (e.setAttribute("src", `\${_udyGet(item, '${t}.url', '')}`), e.removeAttribute("srcset"), e.removeAttribute("sizes")) : e.setAttribute("data-style", `${e.getAttribute("data-style")||""} background-image: url(\${_udyGet(item, '${t}.url', '')});`)
3454 }
3455 parseLink(e) {
3456 const t = e.getAttribute("card:link").toLowerCase().replace(/ /gm, "_");
3457 e.removeAttribute("card:link"), e.setAttribute("href", `\${_udyGet(item, '${t}', '#')}`)
3458 }
3459 parseColor(e) {
3460 const t = e.getAttribute("card:color").toLowerCase().replace(/ /gm, "_");
3461 e.removeAttribute("card:color"), e.setAttribute("data-style", `${e.getAttribute("data-style")||""} \${_udyGet(item, '${t}', '')}`)
3462 }
3463 parseBgColor(e) {
3464 const t = e.getAttribute("card:bgcolor").toLowerCase().replace(/ /gm, "_");
3465 e.removeAttribute("card:bgcolor"), e.setAttribute("data-style", `${e.getAttribute("data-style")||""} background-color: \${_udyGet(item, '${t}', '')};`)
3466 }
3467 parseBrColor(e) {
3468 const t = e.getAttribute("card:brcolor").toLowerCase().replace(/ /gm, "_");
3469 e.removeAttribute("card:brcolor"), e.setAttribute("data-style", `${e.getAttribute("data-style")||""} border-color: \${_udyGet(item, '${t}', '')};`)
3470 }
3471 parseIf(e) {
3472 const t = e.getAttribute("card:if").toLowerCase().replace(/ /gm, "_");
3473 e.removeAttribute("card:if"), e.classList.remove("w-condition-invisible");
3474 const r = `${e.getAttribute("class")||""} \${!!_udyGet(item, '${t}', false) ? '' : 'w-condition-invisible'}`;
3475 e.setAttribute("class", r)
3476 }
3477 parseTemplate(e) {
3478 e.classList.add(this.config.animationStart), e.querySelectorAll("[card\\3A text]").forEach(e => this.parseText(e)), e.hasAttribute("card:text") && this.parseText(e), e.querySelectorAll("[card\\3A date]").forEach(e => this.parseDate(e)), e.hasAttribute("card:date") && this.parseDate(e), e.querySelectorAll('[card="link"]').forEach(e => this.parseDefaultLink(e)), "link" === e.getAttribute("card") && this.parseDefaultLink(e), e.querySelectorAll("[card\\3A image]").forEach(e => this.parseImage(e)), e.hasAttribute("card:image") && this.parseImage(e), e.querySelectorAll("[card\\3A link]").forEach(e => this.parseLink(e)), e.hasAttribute("card:image") && this.parseLink(e), e.querySelectorAll("[card\\3A color]").forEach(e => this.parseColor(e)), e.hasAttribute("card:color") && this.parseColor(e), e.querySelectorAll("[card\\3A bgcolor]").forEach(e => this.parseBgColor(e)), e.hasAttribute("card:bgcolor") && this.parseBgColor(e), e.querySelectorAll("[card\\3A brcolor]").forEach(e => this.parseBrColor(e)), e.hasAttribute("card:brcolor") && this.parseBrColor(e), e.querySelectorAll("[card\\3A if]").forEach(e => this.parseIf(e)), e.hasAttribute("card:if") && this.parseIf(e), e.hasAttribute("data-style") && (e.setAttribute("style", e.getAttribute("data-style") || ""), e.removeAttribute("data-style")), e.querySelectorAll("[data-style]").forEach(e => {
3479 e.setAttribute("style", e.dataset.style || ""), e.removeAttribute("data-style")
3480 }), this.createPostTemplate = new Function("item", "return `" + e.outerHTML + "`")
3481 }
3482 changeItems(e) {
3483 this.items = e, this.currentPage = 0, this.maxPages = 0 !== this.postsPerPage ? Math.ceil(this.items.length / this.postsPerPage) : 1, this.updateItemsToShow()
3484 }
3485 updateItemsToShow() {
3486 0 == this.postsPerPage ? (this.itemsToShow = this.items, this.start = 0, this.end = this.itemsToShow.length) : (this.start = this.currentPage * this.postsPerPage, this.end = this.start + this.postsPerPage, this.itemsToShow = this.items.slice(this.start, this.end), 0 == this.itemsToShow.length && (this.start = -1, this.end = 0), this.end - this.start > this.itemsToShow.length && (this.end = this.itemsToShow.length + this.start, this.end < 0 && (this.end = 0))), this.displayItems(), this.updatePagination(), this.updatePostsFound(), this.checkEmpty(), (this.renderedTimes > 0 || this.itemsToShow.length > 0) && (document.body.dispatchEvent(new CustomEvent("udesly-filter-posts-changed", {
3487 bubbles: !0
3488 })), this.wrapper.querySelectorAll(".loading").forEach(e => e.classList.replace("loading", "loaded")), this.wrapper.querySelectorAll("[hidden]").forEach(e => e.removeAttribute("hidden"))), this.renderedTimes++
3489 }
3490 updatePagination() {
3491 let e = "none",
3492 t = "none",
3493 r = !0,
3494 n = !0;
3495 this.currentPage > 0 && (e = "", r = !1), this.maxPages - 1 > this.currentPage && (t = "", n = !1), this.paginationElements.forEach(i => {
3496 "previous" == i.getAttribute("pagination") ? (i.style.display = e, i.dataset.disabled = r.toString()) : (i.style.display = t, i.dataset.disabled = n.toString())
3497 })
3498 }
3499 checkEmpty() {
3500 0 == this.itemsToShow.length ? (this.wrapper.querySelectorAll('[filter="empty"]').forEach(e => {
3501 e.classList.add("empty"), e.style.display = ""
3502 }), this.list.classList.add("empty"), this.wrapper.classList.add("empty")) : (this.wrapper.querySelectorAll('[filter="empty"]').forEach(e => {
3503 e.classList.remove("empty"), e.style.display = "none;"
3504 }), this.list.classList.remove("empty"), this.wrapper.classList.remove("empty"))
3505 }
3506 displayItems() {
3507 var e;
3508 if (!this.createPostTemplate) return;
3509 const t = null === (e = this.itemsToShow) || void 0 === e ? void 0 : e.reduce((e, t) => e + this.createPostTemplate(t), "");
3510 if (this.list.querySelectorAll(`.${this.config.animationStart}`).forEach(e => e.classList.replace(this.config.animationStart, this.config.animationEnd)), this.list.querySelector(`.${this.config.animationEnd}`)) {
3511 const e = this.hasCssAnimation(this.list.querySelector(`.${this.config.animationEnd}`));
3512 !1 !== e ? Yt(this.list, e).pipe(or(1)).subscribe(e => {
3513 e.target && e.target.classList.contains(this.config.animationEnd) && (this.list.innerHTML = t.toString())
3514 }) : (this.list.innerHTML = t.toString(), this.restartInteractions())
3515 }
3516 0 == this.list.childElementCount && (this.list.innerHTML = t.toString(), this.restartInteractions())
3517 }
3518 updatePostsFound() {
3519 this.postsFound.forEach(e => {
3520 e.hasAttribute("data-raw-text") || e.setAttribute("data-raw-text", e.innerHTML || "");
3521 const t = e.getAttribute("data-raw-text");
3522 e.innerHTML = t.replace(/{{total}}/gm, this.items.length.toString()).replace(/{{currentPage}}/gm, (this.currentPage + 1).toString()).replace(/{{postsPerPage}}/gm, this.postsPerPage.toString()).replace(/{{maxPages}}/gm, this.maxPages.toString()).replace(/{{from}}/gm, (this.start + 1).toString()).replace(/{{to}}/gm, this.end.toString())
3523 })
3524 }
3525 restartInteractions() {
3526 if (this.config.restartInteractionsAfterDisplay && window.Webflow) {
3527 const e = window.Webflow.require("ix2");
3528 e && e.init();
3529 const t = window.Webflow.require("lottie");
3530 t && t.init()
3531 }
3532 }
3533 hasCssAnimation(e) {
3534 for (var t = [e].concat(Array.prototype.slice.call(e.getElementsByTagName("*"))), r = t.length; r--;) {
3535 var n = window.getComputedStyle(t[r], null);
3536 if (parseFloat(n.getPropertyValue("animation-duration") || "0") > 0) return "animationend"
3537 }
3538 return !1
3539 }
3540 }
3541 class rn {
3542 constructor(e) {
3543 var t, r;
3544 this.wrapper = e, this.store = Zr();
3545 const n = e.querySelector("form");
3546 if (!n) throw Error("Missing form");
3547 const i = this.store.getState();
3548 if (this.config = i.configuration, window.udeslyCmsFilterOptions && (this.config = Object.assign(Object.assign({}, this.config), window.udeslyCmsFilterOptions), this.config.searchFields = this.config.searchFields.map(e => e.toLowerCase().trim().replace(/ /gm, "_")), this.config.hide = this.config.hide.map(e => e.toLowerCase().trim().replace(/ /gm, "_"))), this.wrapper.hasAttribute("hide") && (this.config.hide = (this.wrapper.getAttribute("hide") || "").split(",").map(e => e.toLowerCase().trim().replace(/ /gm, "_"))), this.wrapper.hasAttribute("restart-interactions") && (this.config.restartInteractionsAfterDisplay = !0), this.wrapper.hasAttribute("animation-start")) {
3549 const e = null === (t = this.wrapper.getAttribute("animation-start")) || void 0 === t ? void 0 : t.toLowerCase().trim().replace(/ /gm, "-");
3550 this.config.animationStart = e || "animation-start"
3551 }
3552 if (this.wrapper.hasAttribute("animation-end")) {
3553 const e = null === (r = this.wrapper.getAttribute("animation-end")) || void 0 === r ? void 0 : r.toLowerCase().trim().replace(/ /gm, "-");
3554 this.config.animationEnd = e || "animation-end"
3555 }
3556 this.wrapper.hasAttribute("search-fields") && (this.config.searchFields = (this.wrapper.getAttribute("search-fields") || "").split(",").map(e => e.toLowerCase().trim().replace(/ /gm, "_"))), this.wrapper.hasAttribute("boolean-label") && (this.config.booleanLabel = this.wrapper.getAttribute("boolean-label") || "Yes"), this.formFilters = new en(n, this.store.dispatch, this.config);
3557 const o = e.querySelector(".w-dyn-items");
3558 if (!o) throw Error("Missing List");
3559 const a = (this.wrapper.getAttribute("udesly-cms-filters") || "").trim().toLowerCase();
3560 var s;
3561 this.itemList = new tn(o, a, this.config, this.wrapper), this.store.dispatch(kr.init({
3562 name: a,
3563 config: this.config
3564 })), this.store$ = Ut(this.store), this.store$.pipe(ur("properties"), rr(), or(2)).subscribe(e => {
3565 e && Object.keys(e).length && this.formFilters.changeProperties(e)
3566 }), this.store$.pipe(ur("posts"), (s = 1, function(e) {
3567 return e.lift(new cr(s))
3568 }), rr()).subscribe(e => {
3569 this.itemList.changeItems(e)
3570 })
3571 }
3572 onChange(e, t) {
3573 this.store$.pipe(ur(e), rr()).subscribe(t)
3574 }
3575 }
3576
3577 function nn(e) {
3578 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
3579 var t = Object.prototype.toString.call(e);
3580 return e instanceof Date || "object" == typeof e && "[object Date]" === t ? new Date(e.getTime()) : "number" == typeof e || "[object Number]" === t ? new Date(e) : ("string" != typeof e && "[object String]" !== t || "undefined" == typeof console || (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"), console.warn((new Error).stack)), new Date(NaN))
3581 }
3582
3583 function on(e) {
3584 if (null === e || !0 === e || !1 === e) return NaN;
3585 var t = Number(e);
3586 return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t)
3587 }
3588 var an = 6e4;
3589 var sn = {
3590 lessThanXSeconds: {
3591 one: "less than a second",
3592 other: "less than {{count}} seconds"
3593 },
3594 xSeconds: {
3595 one: "1 second",
3596 other: "{{count}} seconds"
3597 },
3598 halfAMinute: "half a minute",
3599 lessThanXMinutes: {
3600 one: "less than a minute",
3601 other: "less than {{count}} minutes"
3602 },
3603 xMinutes: {
3604 one: "1 minute",
3605 other: "{{count}} minutes"
3606 },
3607 aboutXHours: {
3608 one: "about 1 hour",
3609 other: "about {{count}} hours"
3610 },
3611 xHours: {
3612 one: "1 hour",
3613 other: "{{count}} hours"
3614 },
3615 xDays: {
3616 one: "1 day",
3617 other: "{{count}} days"
3618 },
3619 aboutXMonths: {
3620 one: "about 1 month",
3621 other: "about {{count}} months"
3622 },
3623 xMonths: {
3624 one: "1 month",
3625 other: "{{count}} months"
3626 },
3627 aboutXYears: {
3628 one: "about 1 year",
3629 other: "about {{count}} years"
3630 },
3631 xYears: {
3632 one: "1 year",
3633 other: "{{count}} years"
3634 },
3635 overXYears: {
3636 one: "over 1 year",
3637 other: "over {{count}} years"
3638 },
3639 almostXYears: {
3640 one: "almost 1 year",
3641 other: "almost {{count}} years"
3642 }
3643 };
3644
3645 function un(e) {
3646 return function(t) {
3647 var r = t || {},
3648 n = r.width ? String(r.width) : e.defaultWidth;
3649 return e.formats[n] || e.formats[e.defaultWidth]
3650 }
3651 }
3652 var cn = {
3653 date: un({
3654 formats: {
3655 full: "EEEE, MMMM do, y",
3656 long: "MMMM do, y",
3657 medium: "MMM d, y",
3658 short: "MM/dd/yyyy"
3659 },
3660 defaultWidth: "full"
3661 }),
3662 time: un({
3663 formats: {
3664 full: "h:mm:ss a zzzz",
3665 long: "h:mm:ss a z",
3666 medium: "h:mm:ss a",
3667 short: "h:mm a"
3668 },
3669 defaultWidth: "full"
3670 }),
3671 dateTime: un({
3672 formats: {
3673 full: "{{date}} 'at' {{time}}",
3674 long: "{{date}} 'at' {{time}}",
3675 medium: "{{date}}, {{time}}",
3676 short: "{{date}}, {{time}}"
3677 },
3678 defaultWidth: "full"
3679 })
3680 },
3681 ln = {
3682 lastWeek: "'last' eeee 'at' p",
3683 yesterday: "'yesterday at' p",
3684 today: "'today at' p",
3685 tomorrow: "'tomorrow at' p",
3686 nextWeek: "eeee 'at' p",
3687 other: "P"
3688 };
3689
3690 function fn(e) {
3691 return function(t, r) {
3692 var n, i = r || {};
3693 if ("formatting" === (i.context ? String(i.context) : "standalone") && e.formattingValues) {
3694 var o = e.defaultFormattingWidth || e.defaultWidth,
3695 a = i.width ? String(i.width) : o;
3696 n = e.formattingValues[a] || e.formattingValues[o]
3697 } else {
3698 var s = e.defaultWidth,
3699 u = i.width ? String(i.width) : e.defaultWidth;
3700 n = e.values[u] || e.values[s]
3701 }
3702 return n[e.argumentCallback ? e.argumentCallback(t) : t]
3703 }
3704 }
3705
3706 function hn(e) {
3707 return function(t, r) {
3708 var n = String(t),
3709 i = r || {},
3710 o = i.width,
3711 a = o && e.matchPatterns[o] || e.matchPatterns[e.defaultMatchWidth],
3712 s = n.match(a);
3713 if (!s) return null;
3714 var u, c = s[0],
3715 l = o && e.parsePatterns[o] || e.parsePatterns[e.defaultParseWidth];
3716 return u = "[object Array]" === Object.prototype.toString.call(l) ? function(e, t) {
3717 for (var r = 0; r < e.length; r++)
3718 if (t(e[r])) return r
3719 }(l, (function(e) {
3720 return e.test(n)
3721 })) : function(e, t) {
3722 for (var r in e)
3723 if (e.hasOwnProperty(r) && t(e[r])) return r
3724 }(l, (function(e) {
3725 return e.test(n)
3726 })), u = e.valueCallback ? e.valueCallback(u) : u, {
3727 value: u = i.valueCallback ? i.valueCallback(u) : u,
3728 rest: n.slice(c.length)
3729 }
3730 }
3731 }
3732 var dn, pn = {
3733 code: "en-US",
3734 formatDistance: function(e, t, r) {
3735 var n;
3736 return r = r || {}, n = "string" == typeof sn[e] ? sn[e] : 1 === t ? sn[e].one : sn[e].other.replace("{{count}}", t), r.addSuffix ? r.comparison > 0 ? "in " + n : n + " ago" : n
3737 },
3738 formatLong: cn,
3739 formatRelative: function(e, t, r, n) {
3740 return ln[e]
3741 },
3742 localize: {
3743 ordinalNumber: function(e, t) {
3744 var r = Number(e),
3745 n = r % 100;
3746 if (n > 20 || n < 10) switch (n % 10) {
3747 case 1:
3748 return r + "st";
3749 case 2:
3750 return r + "nd";
3751 case 3:
3752 return r + "rd"
3753 }
3754 return r + "th"
3755 },
3756 era: fn({
3757 values: {
3758 narrow: ["B", "A"],
3759 abbreviated: ["BC", "AD"],
3760 wide: ["Before Christ", "Anno Domini"]
3761 },
3762 defaultWidth: "wide"
3763 }),
3764 quarter: fn({
3765 values: {
3766 narrow: ["1", "2", "3", "4"],
3767 abbreviated: ["Q1", "Q2", "Q3", "Q4"],
3768 wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
3769 },
3770 defaultWidth: "wide",
3771 argumentCallback: function(e) {
3772 return Number(e) - 1
3773 }
3774 }),
3775 month: fn({
3776 values: {
3777 narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
3778 abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
3779 wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
3780 },
3781 defaultWidth: "wide"
3782 }),
3783 day: fn({
3784 values: {
3785 narrow: ["S", "M", "T", "W", "T", "F", "S"],
3786 short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
3787 abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
3788 wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
3789 },
3790 defaultWidth: "wide"
3791 }),
3792 dayPeriod: fn({
3793 values: {
3794 narrow: {
3795 am: "a",
3796 pm: "p",
3797 midnight: "mi",
3798 noon: "n",
3799 morning: "morning",
3800 afternoon: "afternoon",
3801 evening: "evening",
3802 night: "night"
3803 },
3804 abbreviated: {
3805 am: "AM",
3806 pm: "PM",
3807 midnight: "midnight",
3808 noon: "noon",
3809 morning: "morning",
3810 afternoon: "afternoon",
3811 evening: "evening",
3812 night: "night"
3813 },
3814 wide: {
3815 am: "a.m.",
3816 pm: "p.m.",
3817 midnight: "midnight",
3818 noon: "noon",
3819 morning: "morning",
3820 afternoon: "afternoon",
3821 evening: "evening",
3822 night: "night"
3823 }
3824 },
3825 defaultWidth: "wide",
3826 formattingValues: {
3827 narrow: {
3828 am: "a",
3829 pm: "p",
3830 midnight: "mi",
3831 noon: "n",
3832 morning: "in the morning",
3833 afternoon: "in the afternoon",
3834 evening: "in the evening",
3835 night: "at night"
3836 },
3837 abbreviated: {
3838 am: "AM",
3839 pm: "PM",
3840 midnight: "midnight",
3841 noon: "noon",
3842 morning: "in the morning",
3843 afternoon: "in the afternoon",
3844 evening: "in the evening",
3845 night: "at night"
3846 },
3847 wide: {
3848 am: "a.m.",
3849 pm: "p.m.",
3850 midnight: "midnight",
3851 noon: "noon",
3852 morning: "in the morning",
3853 afternoon: "in the afternoon",
3854 evening: "in the evening",
3855 night: "at night"
3856 }
3857 },
3858 defaultFormattingWidth: "wide"
3859 })
3860 },
3861 match: {
3862 ordinalNumber: (dn = {
3863 matchPattern: /^(\d+)(th|st|nd|rd)?/i,
3864 parsePattern: /\d+/i,
3865 valueCallback: function(e) {
3866 return parseInt(e, 10)
3867 }
3868 }, function(e, t) {
3869 var r = String(e),
3870 n = t || {},
3871 i = r.match(dn.matchPattern);
3872 if (!i) return null;
3873 var o = i[0],
3874 a = r.match(dn.parsePattern);
3875 if (!a) return null;
3876 var s = dn.valueCallback ? dn.valueCallback(a[0]) : a[0];
3877 return {
3878 value: s = n.valueCallback ? n.valueCallback(s) : s,
3879 rest: r.slice(o.length)
3880 }
3881 }),
3882 era: hn({
3883 matchPatterns: {
3884 narrow: /^(b|a)/i,
3885 abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
3886 wide: /^(before christ|before common era|anno domini|common era)/i
3887 },
3888 defaultMatchWidth: "wide",
3889 parsePatterns: {
3890 any: [/^b/i, /^(a|c)/i]
3891 },
3892 defaultParseWidth: "any"
3893 }),
3894 quarter: hn({
3895 matchPatterns: {
3896 narrow: /^[1234]/i,
3897 abbreviated: /^q[1234]/i,
3898 wide: /^[1234](th|st|nd|rd)? quarter/i
3899 },
3900 defaultMatchWidth: "wide",
3901 parsePatterns: {
3902 any: [/1/i, /2/i, /3/i, /4/i]
3903 },
3904 defaultParseWidth: "any",
3905 valueCallback: function(e) {
3906 return e + 1
3907 }
3908 }),
3909 month: hn({
3910 matchPatterns: {
3911 narrow: /^[jfmasond]/i,
3912 abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
3913 wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
3914 },
3915 defaultMatchWidth: "wide",
3916 parsePatterns: {
3917 narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
3918 any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
3919 },
3920 defaultParseWidth: "any"
3921 }),
3922 day: hn({
3923 matchPatterns: {
3924 narrow: /^[smtwf]/i,
3925 short: /^(su|mo|tu|we|th|fr|sa)/i,
3926 abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
3927 wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
3928 },
3929 defaultMatchWidth: "wide",
3930 parsePatterns: {
3931 narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
3932 any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
3933 },
3934 defaultParseWidth: "any"
3935 }),
3936 dayPeriod: hn({
3937 matchPatterns: {
3938 narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
3939 any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
3940 },
3941 defaultMatchWidth: "any",
3942 parsePatterns: {
3943 any: {
3944 am: /^a/i,
3945 pm: /^p/i,
3946 midnight: /^mi/i,
3947 noon: /^no/i,
3948 morning: /morning/i,
3949 afternoon: /afternoon/i,
3950 evening: /evening/i,
3951 night: /night/i
3952 }
3953 },
3954 defaultParseWidth: "any"
3955 })
3956 },
3957 options: {
3958 weekStartsOn: 0,
3959 firstWeekContainsDate: 1
3960 }
3961 };
3962
3963 function yn(e, t) {
3964 if (arguments.length < 2) throw new TypeError("2 arguments required, but only " + arguments.length + " present");
3965 return function(e, t) {
3966 if (arguments.length < 2) throw new TypeError("2 arguments required, but only " + arguments.length + " present");
3967 var r = nn(e).getTime(),
3968 n = on(t);
3969 return new Date(r + n)
3970 }(e, -on(t))
3971 }
3972
3973 function mn(e, t) {
3974 for (var r = e < 0 ? "-" : "", n = Math.abs(e).toString(); n.length < t;) n = "0" + n;
3975 return r + n
3976 }
3977 var bn = function(e, t) {
3978 var r = e.getUTCFullYear(),
3979 n = r > 0 ? r : 1 - r;
3980 return mn("yy" === t ? n % 100 : n, t.length)
3981 },
3982 vn = function(e, t) {
3983 var r = e.getUTCMonth();
3984 return "M" === t ? String(r + 1) : mn(r + 1, 2)
3985 },
3986 gn = function(e, t) {
3987 return mn(e.getUTCDate(), t.length)
3988 },
3989 wn = function(e, t) {
3990 return mn(e.getUTCHours() % 12 || 12, t.length)
3991 },
3992 En = function(e, t) {
3993 return mn(e.getUTCHours(), t.length)
3994 },
3995 Sn = function(e, t) {
3996 return mn(e.getUTCMinutes(), t.length)
3997 },
3998 _n = function(e, t) {
3999 return mn(e.getUTCSeconds(), t.length)
4000 },
4001 Tn = function(e, t) {
4002 var r = t.length,
4003 n = e.getUTCMilliseconds();
4004 return mn(Math.floor(n * Math.pow(10, r - 3)), t.length)
4005 },
4006 xn = 864e5;
4007
4008 function Pn(e) {
4009 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4010 var t = nn(e),
4011 r = t.getUTCDay(),
4012 n = (r < 1 ? 7 : 0) + r - 1;
4013 return t.setUTCDate(t.getUTCDate() - n), t.setUTCHours(0, 0, 0, 0), t
4014 }
4015
4016 function On(e) {
4017 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4018 var t = nn(e),
4019 r = t.getUTCFullYear(),
4020 n = new Date(0);
4021 n.setUTCFullYear(r + 1, 0, 4), n.setUTCHours(0, 0, 0, 0);
4022 var i = Pn(n),
4023 o = new Date(0);
4024 o.setUTCFullYear(r, 0, 4), o.setUTCHours(0, 0, 0, 0);
4025 var a = Pn(o);
4026 return t.getTime() >= i.getTime() ? r + 1 : t.getTime() >= a.getTime() ? r : r - 1
4027 }
4028 var An = 6048e5;
4029
4030 function jn(e) {
4031 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4032 var t = nn(e),
4033 r = Pn(t).getTime() - function(e) {
4034 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4035 var t = On(e),
4036 r = new Date(0);
4037 return r.setUTCFullYear(t, 0, 4), r.setUTCHours(0, 0, 0, 0), Pn(r)
4038 }(t).getTime();
4039 return Math.round(r / An) + 1
4040 }
4041
4042 function Cn(e, t) {
4043 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4044 var r = t || {},
4045 n = r.locale,
4046 i = n && n.options && n.options.weekStartsOn,
4047 o = null == i ? 0 : on(i),
4048 a = null == r.weekStartsOn ? o : on(r.weekStartsOn);
4049 if (!(a >= 0 && a <= 6)) throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
4050 var s = nn(e),
4051 u = s.getUTCDay(),
4052 c = (u < a ? 7 : 0) + u - a;
4053 return s.setUTCDate(s.getUTCDate() - c), s.setUTCHours(0, 0, 0, 0), s
4054 }
4055
4056 function kn(e, t) {
4057 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4058 var r = nn(e, t),
4059 n = r.getUTCFullYear(),
4060 i = t || {},
4061 o = i.locale,
4062 a = o && o.options && o.options.firstWeekContainsDate,
4063 s = null == a ? 1 : on(a),
4064 u = null == i.firstWeekContainsDate ? s : on(i.firstWeekContainsDate);
4065 if (!(u >= 1 && u <= 7)) throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4066 var c = new Date(0);
4067 c.setUTCFullYear(n + 1, 0, u), c.setUTCHours(0, 0, 0, 0);
4068 var l = Cn(c, t),
4069 f = new Date(0);
4070 f.setUTCFullYear(n, 0, u), f.setUTCHours(0, 0, 0, 0);
4071 var h = Cn(f, t);
4072 return r.getTime() >= l.getTime() ? n + 1 : r.getTime() >= h.getTime() ? n : n - 1
4073 }
4074 var Dn = 6048e5;
4075
4076 function Nn(e, t) {
4077 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4078 var r = nn(e),
4079 n = Cn(r, t).getTime() - function(e, t) {
4080 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4081 var r = t || {},
4082 n = r.locale,
4083 i = n && n.options && n.options.firstWeekContainsDate,
4084 o = null == i ? 1 : on(i),
4085 a = null == r.firstWeekContainsDate ? o : on(r.firstWeekContainsDate),
4086 s = kn(e, t),
4087 u = new Date(0);
4088 return u.setUTCFullYear(s, 0, a), u.setUTCHours(0, 0, 0, 0), Cn(u, t)
4089 }(r, t).getTime();
4090 return Math.round(n / Dn) + 1
4091 }
4092 var Mn = "midnight",
4093 In = "noon",
4094 Ln = "morning",
4095 qn = "afternoon",
4096 Fn = "evening",
4097 zn = "night",
4098 Un = {
4099 G: function(e, t, r) {
4100 var n = e.getUTCFullYear() > 0 ? 1 : 0;
4101 switch (t) {
4102 case "G":
4103 case "GG":
4104 case "GGG":
4105 return r.era(n, {
4106 width: "abbreviated"
4107 });
4108 case "GGGGG":
4109 return r.era(n, {
4110 width: "narrow"
4111 });
4112 case "GGGG":
4113 default:
4114 return r.era(n, {
4115 width: "wide"
4116 })
4117 }
4118 },
4119 y: function(e, t, r) {
4120 if ("yo" === t) {
4121 var n = e.getUTCFullYear(),
4122 i = n > 0 ? n : 1 - n;
4123 return r.ordinalNumber(i, {
4124 unit: "year"
4125 })
4126 }
4127 return bn(e, t)
4128 },
4129 Y: function(e, t, r, n) {
4130 var i = kn(e, n),
4131 o = i > 0 ? i : 1 - i;
4132 return "YY" === t ? mn(o % 100, 2) : "Yo" === t ? r.ordinalNumber(o, {
4133 unit: "year"
4134 }) : mn(o, t.length)
4135 },
4136 R: function(e, t) {
4137 return mn(On(e), t.length)
4138 },
4139 u: function(e, t) {
4140 return mn(e.getUTCFullYear(), t.length)
4141 },
4142 Q: function(e, t, r) {
4143 var n = Math.ceil((e.getUTCMonth() + 1) / 3);
4144 switch (t) {
4145 case "Q":
4146 return String(n);
4147 case "QQ":
4148 return mn(n, 2);
4149 case "Qo":
4150 return r.ordinalNumber(n, {
4151 unit: "quarter"
4152 });
4153 case "QQQ":
4154 return r.quarter(n, {
4155 width: "abbreviated",
4156 context: "formatting"
4157 });
4158 case "QQQQQ":
4159 return r.quarter(n, {
4160 width: "narrow",
4161 context: "formatting"
4162 });
4163 case "QQQQ":
4164 default:
4165 return r.quarter(n, {
4166 width: "wide",
4167 context: "formatting"
4168 })
4169 }
4170 },
4171 q: function(e, t, r) {
4172 var n = Math.ceil((e.getUTCMonth() + 1) / 3);
4173 switch (t) {
4174 case "q":
4175 return String(n);
4176 case "qq":
4177 return mn(n, 2);
4178 case "qo":
4179 return r.ordinalNumber(n, {
4180 unit: "quarter"
4181 });
4182 case "qqq":
4183 return r.quarter(n, {
4184 width: "abbreviated",
4185 context: "standalone"
4186 });
4187 case "qqqqq":
4188 return r.quarter(n, {
4189 width: "narrow",
4190 context: "standalone"
4191 });
4192 case "qqqq":
4193 default:
4194 return r.quarter(n, {
4195 width: "wide",
4196 context: "standalone"
4197 })
4198 }
4199 },
4200 M: function(e, t, r) {
4201 var n = e.getUTCMonth();
4202 switch (t) {
4203 case "M":
4204 case "MM":
4205 return vn(e, t);
4206 case "Mo":
4207 return r.ordinalNumber(n + 1, {
4208 unit: "month"
4209 });
4210 case "MMM":
4211 return r.month(n, {
4212 width: "abbreviated",
4213 context: "formatting"
4214 });
4215 case "MMMMM":
4216 return r.month(n, {
4217 width: "narrow",
4218 context: "formatting"
4219 });
4220 case "MMMM":
4221 default:
4222 return r.month(n, {
4223 width: "wide",
4224 context: "formatting"
4225 })
4226 }
4227 },
4228 L: function(e, t, r) {
4229 var n = e.getUTCMonth();
4230 switch (t) {
4231 case "L":
4232 return String(n + 1);
4233 case "LL":
4234 return mn(n + 1, 2);
4235 case "Lo":
4236 return r.ordinalNumber(n + 1, {
4237 unit: "month"
4238 });
4239 case "LLL":
4240 return r.month(n, {
4241 width: "abbreviated",
4242 context: "standalone"
4243 });
4244 case "LLLLL":
4245 return r.month(n, {
4246 width: "narrow",
4247 context: "standalone"
4248 });
4249 case "LLLL":
4250 default:
4251 return r.month(n, {
4252 width: "wide",
4253 context: "standalone"
4254 })
4255 }
4256 },
4257 w: function(e, t, r, n) {
4258 var i = Nn(e, n);
4259 return "wo" === t ? r.ordinalNumber(i, {
4260 unit: "week"
4261 }) : mn(i, t.length)
4262 },
4263 I: function(e, t, r) {
4264 var n = jn(e);
4265 return "Io" === t ? r.ordinalNumber(n, {
4266 unit: "week"
4267 }) : mn(n, t.length)
4268 },
4269 d: function(e, t, r) {
4270 return "do" === t ? r.ordinalNumber(e.getUTCDate(), {
4271 unit: "date"
4272 }) : gn(e, t)
4273 },
4274 D: function(e, t, r) {
4275 var n = function(e) {
4276 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4277 var t = nn(e),
4278 r = t.getTime();
4279 t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
4280 var n = r - t.getTime();
4281 return Math.floor(n / xn) + 1
4282 }(e);
4283 return "Do" === t ? r.ordinalNumber(n, {
4284 unit: "dayOfYear"
4285 }) : mn(n, t.length)
4286 },
4287 E: function(e, t, r) {
4288 var n = e.getUTCDay();
4289 switch (t) {
4290 case "E":
4291 case "EE":
4292 case "EEE":
4293 return r.day(n, {
4294 width: "abbreviated",
4295 context: "formatting"
4296 });
4297 case "EEEEE":
4298 return r.day(n, {
4299 width: "narrow",
4300 context: "formatting"
4301 });
4302 case "EEEEEE":
4303 return r.day(n, {
4304 width: "short",
4305 context: "formatting"
4306 });
4307 case "EEEE":
4308 default:
4309 return r.day(n, {
4310 width: "wide",
4311 context: "formatting"
4312 })
4313 }
4314 },
4315 e: function(e, t, r, n) {
4316 var i = e.getUTCDay(),
4317 o = (i - n.weekStartsOn + 8) % 7 || 7;
4318 switch (t) {
4319 case "e":
4320 return String(o);
4321 case "ee":
4322 return mn(o, 2);
4323 case "eo":
4324 return r.ordinalNumber(o, {
4325 unit: "day"
4326 });
4327 case "eee":
4328 return r.day(i, {
4329 width: "abbreviated",
4330 context: "formatting"
4331 });
4332 case "eeeee":
4333 return r.day(i, {
4334 width: "narrow",
4335 context: "formatting"
4336 });
4337 case "eeeeee":
4338 return r.day(i, {
4339 width: "short",
4340 context: "formatting"
4341 });
4342 case "eeee":
4343 default:
4344 return r.day(i, {
4345 width: "wide",
4346 context: "formatting"
4347 })
4348 }
4349 },
4350 c: function(e, t, r, n) {
4351 var i = e.getUTCDay(),
4352 o = (i - n.weekStartsOn + 8) % 7 || 7;
4353 switch (t) {
4354 case "c":
4355 return String(o);
4356 case "cc":
4357 return mn(o, t.length);
4358 case "co":
4359 return r.ordinalNumber(o, {
4360 unit: "day"
4361 });
4362 case "ccc":
4363 return r.day(i, {
4364 width: "abbreviated",
4365 context: "standalone"
4366 });
4367 case "ccccc":
4368 return r.day(i, {
4369 width: "narrow",
4370 context: "standalone"
4371 });
4372 case "cccccc":
4373 return r.day(i, {
4374 width: "short",
4375 context: "standalone"
4376 });
4377 case "cccc":
4378 default:
4379 return r.day(i, {
4380 width: "wide",
4381 context: "standalone"
4382 })
4383 }
4384 },
4385 i: function(e, t, r) {
4386 var n = e.getUTCDay(),
4387 i = 0 === n ? 7 : n;
4388 switch (t) {
4389 case "i":
4390 return String(i);
4391 case "ii":
4392 return mn(i, t.length);
4393 case "io":
4394 return r.ordinalNumber(i, {
4395 unit: "day"
4396 });
4397 case "iii":
4398 return r.day(n, {
4399 width: "abbreviated",
4400 context: "formatting"
4401 });
4402 case "iiiii":
4403 return r.day(n, {
4404 width: "narrow",
4405 context: "formatting"
4406 });
4407 case "iiiiii":
4408 return r.day(n, {
4409 width: "short",
4410 context: "formatting"
4411 });
4412 case "iiii":
4413 default:
4414 return r.day(n, {
4415 width: "wide",
4416 context: "formatting"
4417 })
4418 }
4419 },
4420 a: function(e, t, r) {
4421 var n = e.getUTCHours() / 12 >= 1 ? "pm" : "am";
4422 switch (t) {
4423 case "a":
4424 case "aa":
4425 case "aaa":
4426 return r.dayPeriod(n, {
4427 width: "abbreviated",
4428 context: "formatting"
4429 });
4430 case "aaaaa":
4431 return r.dayPeriod(n, {
4432 width: "narrow",
4433 context: "formatting"
4434 });
4435 case "aaaa":
4436 default:
4437 return r.dayPeriod(n, {
4438 width: "wide",
4439 context: "formatting"
4440 })
4441 }
4442 },
4443 b: function(e, t, r) {
4444 var n, i = e.getUTCHours();
4445 switch (n = 12 === i ? In : 0 === i ? Mn : i / 12 >= 1 ? "pm" : "am", t) {
4446 case "b":
4447 case "bb":
4448 case "bbb":
4449 return r.dayPeriod(n, {
4450 width: "abbreviated",
4451 context: "formatting"
4452 });
4453 case "bbbbb":
4454 return r.dayPeriod(n, {
4455 width: "narrow",
4456 context: "formatting"
4457 });
4458 case "bbbb":
4459 default:
4460 return r.dayPeriod(n, {
4461 width: "wide",
4462 context: "formatting"
4463 })
4464 }
4465 },
4466 B: function(e, t, r) {
4467 var n, i = e.getUTCHours();
4468 switch (n = i >= 17 ? Fn : i >= 12 ? qn : i >= 4 ? Ln : zn, t) {
4469 case "B":
4470 case "BB":
4471 case "BBB":
4472 return r.dayPeriod(n, {
4473 width: "abbreviated",
4474 context: "formatting"
4475 });
4476 case "BBBBB":
4477 return r.dayPeriod(n, {
4478 width: "narrow",
4479 context: "formatting"
4480 });
4481 case "BBBB":
4482 default:
4483 return r.dayPeriod(n, {
4484 width: "wide",
4485 context: "formatting"
4486 })
4487 }
4488 },
4489 h: function(e, t, r) {
4490 if ("ho" === t) {
4491 var n = e.getUTCHours() % 12;
4492 return 0 === n && (n = 12), r.ordinalNumber(n, {
4493 unit: "hour"
4494 })
4495 }
4496 return wn(e, t)
4497 },
4498 H: function(e, t, r) {
4499 return "Ho" === t ? r.ordinalNumber(e.getUTCHours(), {
4500 unit: "hour"
4501 }) : En(e, t)
4502 },
4503 K: function(e, t, r) {
4504 var n = e.getUTCHours() % 12;
4505 return "Ko" === t ? r.ordinalNumber(n, {
4506 unit: "hour"
4507 }) : mn(n, t.length)
4508 },
4509 k: function(e, t, r) {
4510 var n = e.getUTCHours();
4511 return 0 === n && (n = 24), "ko" === t ? r.ordinalNumber(n, {
4512 unit: "hour"
4513 }) : mn(n, t.length)
4514 },
4515 m: function(e, t, r) {
4516 return "mo" === t ? r.ordinalNumber(e.getUTCMinutes(), {
4517 unit: "minute"
4518 }) : Sn(e, t)
4519 },
4520 s: function(e, t, r) {
4521 return "so" === t ? r.ordinalNumber(e.getUTCSeconds(), {
4522 unit: "second"
4523 }) : _n(e, t)
4524 },
4525 S: function(e, t) {
4526 return Tn(e, t)
4527 },
4528 X: function(e, t, r, n) {
4529 var i = (n._originalDate || e).getTimezoneOffset();
4530 if (0 === i) return "Z";
4531 switch (t) {
4532 case "X":
4533 return Rn(i);
4534 case "XXXX":
4535 case "XX":
4536 return $n(i);
4537 case "XXXXX":
4538 case "XXX":
4539 default:
4540 return $n(i, ":")
4541 }
4542 },
4543 x: function(e, t, r, n) {
4544 var i = (n._originalDate || e).getTimezoneOffset();
4545 switch (t) {
4546 case "x":
4547 return Rn(i);
4548 case "xxxx":
4549 case "xx":
4550 return $n(i);
4551 case "xxxxx":
4552 case "xxx":
4553 default:
4554 return $n(i, ":")
4555 }
4556 },
4557 O: function(e, t, r, n) {
4558 var i = (n._originalDate || e).getTimezoneOffset();
4559 switch (t) {
4560 case "O":
4561 case "OO":
4562 case "OOO":
4563 return "GMT" + Wn(i, ":");
4564 case "OOOO":
4565 default:
4566 return "GMT" + $n(i, ":")
4567 }
4568 },
4569 z: function(e, t, r, n) {
4570 var i = (n._originalDate || e).getTimezoneOffset();
4571 switch (t) {
4572 case "z":
4573 case "zz":
4574 case "zzz":
4575 return "GMT" + Wn(i, ":");
4576 case "zzzz":
4577 default:
4578 return "GMT" + $n(i, ":")
4579 }
4580 },
4581 t: function(e, t, r, n) {
4582 var i = n._originalDate || e;
4583 return mn(Math.floor(i.getTime() / 1e3), t.length)
4584 },
4585 T: function(e, t, r, n) {
4586 return mn((n._originalDate || e).getTime(), t.length)
4587 }
4588 };
4589
4590 function Wn(e, t) {
4591 var r = e > 0 ? "-" : "+",
4592 n = Math.abs(e),
4593 i = Math.floor(n / 60),
4594 o = n % 60;
4595 if (0 === o) return r + String(i);
4596 var a = t || "";
4597 return r + String(i) + a + mn(o, 2)
4598 }
4599
4600 function Rn(e, t) {
4601 return e % 60 == 0 ? (e > 0 ? "-" : "+") + mn(Math.abs(e) / 60, 2) : $n(e, t)
4602 }
4603
4604 function $n(e, t) {
4605 var r = t || "",
4606 n = e > 0 ? "-" : "+",
4607 i = Math.abs(e);
4608 return n + mn(Math.floor(i / 60), 2) + r + mn(i % 60, 2)
4609 }
4610
4611 function Yn(e, t) {
4612 switch (e) {
4613 case "P":
4614 return t.date({
4615 width: "short"
4616 });
4617 case "PP":
4618 return t.date({
4619 width: "medium"
4620 });
4621 case "PPP":
4622 return t.date({
4623 width: "long"
4624 });
4625 case "PPPP":
4626 default:
4627 return t.date({
4628 width: "full"
4629 })
4630 }
4631 }
4632
4633 function Hn(e, t) {
4634 switch (e) {
4635 case "p":
4636 return t.time({
4637 width: "short"
4638 });
4639 case "pp":
4640 return t.time({
4641 width: "medium"
4642 });
4643 case "ppp":
4644 return t.time({
4645 width: "long"
4646 });
4647 case "pppp":
4648 default:
4649 return t.time({
4650 width: "full"
4651 })
4652 }
4653 }
4654 var Vn = {
4655 p: Hn,
4656 P: function(e, t) {
4657 var r, n = e.match(/(P+)(p+)?/),
4658 i = n[1],
4659 o = n[2];
4660 if (!o) return Yn(e, t);
4661 switch (i) {
4662 case "P":
4663 r = t.dateTime({
4664 width: "short"
4665 });
4666 break;
4667 case "PP":
4668 r = t.dateTime({
4669 width: "medium"
4670 });
4671 break;
4672 case "PPP":
4673 r = t.dateTime({
4674 width: "long"
4675 });
4676 break;
4677 case "PPPP":
4678 default:
4679 r = t.dateTime({
4680 width: "full"
4681 })
4682 }
4683 return r.replace("{{date}}", Yn(i, t)).replace("{{time}}", Hn(o, t))
4684 }
4685 },
4686 Bn = ["D", "DD"],
4687 Gn = ["YY", "YYYY"];
4688
4689 function Xn(e) {
4690 if ("YYYY" === e) throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");
4691 if ("YY" === e) throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");
4692 if ("D" === e) throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");
4693 if ("DD" === e) throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")
4694 }
4695 var Qn = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,
4696 Kn = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,
4697 Jn = /^'([^]*?)'?$/,
4698 Zn = /''/g,
4699 ei = /[a-zA-Z]/;
4700
4701 function ti(e, t, r) {
4702 if (arguments.length < 2) throw new TypeError("2 arguments required, but only " + arguments.length + " present");
4703 var n = String(t),
4704 i = r || {},
4705 o = i.locale || pn,
4706 a = o.options && o.options.firstWeekContainsDate,
4707 s = null == a ? 1 : on(a),
4708 u = null == i.firstWeekContainsDate ? s : on(i.firstWeekContainsDate);
4709 if (!(u >= 1 && u <= 7)) throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
4710 var c = o.options && o.options.weekStartsOn,
4711 l = null == c ? 0 : on(c),
4712 f = null == i.weekStartsOn ? l : on(i.weekStartsOn);
4713 if (!(f >= 0 && f <= 6)) throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
4714 if (!o.localize) throw new RangeError("locale must contain localize property");
4715 if (!o.formatLong) throw new RangeError("locale must contain formatLong property");
4716 var h = nn(e);
4717 if (! function(e) {
4718 if (arguments.length < 1) throw new TypeError("1 argument required, but only " + arguments.length + " present");
4719 var t = nn(e);
4720 return !isNaN(t)
4721 }(h)) throw new RangeError("Invalid time value");
4722 var d = yn(h, function(e) {
4723 var t = new Date(e.getTime()),
4724 r = Math.ceil(t.getTimezoneOffset());
4725 t.setSeconds(0, 0);
4726 var n = t.getTime() % an;
4727 return r * an + n
4728 }(h)),
4729 p = {
4730 firstWeekContainsDate: u,
4731 weekStartsOn: f,
4732 locale: o,
4733 _originalDate: h
4734 };
4735 return n.match(Kn).map((function(e) {
4736 var t = e[0];
4737 return "p" === t || "P" === t ? (0, Vn[t])(e, o.formatLong, p) : e
4738 })).join("").match(Qn).map((function(e) {
4739 if ("''" === e) return "'";
4740 var t = e[0];
4741 if ("'" === t) return e.match(Jn)[1].replace(Zn, "'");
4742 var r, n = Un[t];
4743 if (n) return i.useAdditionalWeekYearTokens || (r = e, -1 === Gn.indexOf(r)) || Xn(e), !i.useAdditionalDayOfYearTokens && function(e) {
4744 return -1 !== Bn.indexOf(e)
4745 }(e) && Xn(e), n(d, e, o.localize, p);
4746 if (t.match(ei)) throw new RangeError("Format string contains an unescaped latin alphabet character `" + t + "`");
4747 return e
4748 })).join("")
4749 }! function() {
4750 var e, t;
4751 if (window._udyFormatDate = function(e, t) {
4752 let r;
4753 if ("string" == typeof e) try {
4754 r = new Date(e)
4755 } catch (e) {
4756 r = new Date
4757 } else r = e;
4758 return t && "" != t || (t = "MM/dd/yyyy"), ti(r, t)
4759 }, window._udyGet = function(e, t, r) {
4760 t = function(e) {
4761 if ("string" != typeof e) return e;
4762 var t = [];
4763 return e.split(".").forEach((function(e, r) {
4764 e.split(/\[([^}]+)\]/g).forEach((function(e) {
4765 e.length > 0 && t.push(e)
4766 }))
4767 })), t
4768 }(t);
4769 for (var n = e, i = 0; i < t.length; i++) {
4770 if (!n[t[i]]) return r;
4771 n = n[t[i]]
4772 }
4773 return n
4774 }, null === (e = document.currentScript) || void 0 === e ? void 0 : e.dataset.preload) {
4775 (null === (t = document.currentScript) || void 0 === t ? void 0 : t.dataset.preload).split(",").map(e => e.trim().toLowerCase()).forEach(e => {
4776 Zr().dispatch(kr.init({
4777 name: e,
4778 mode: "preload"
4779 }))
4780 })
4781 } else document.body.addEventListener("udesly-filter-posts-changed", () => {
4782 document.body.classList.add("udesly-filter-posts-rendered")
4783 }, {
4784 once: !0
4785 }), document.querySelectorAll("[udesly-cms-filters]").forEach(e => {
4786 new rn(e)
4787 })
4788 }()
4789}));